From db082fa222e5a9001cf7ceaf1bfee6b5a800a9a4 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 3 Aug 2025 21:22:20 +0200 Subject: [PATCH 001/166] :rocket: Initial setup * The library compiles and the current functions runs without crashing. --- .Rbuildignore | 2 + .gitignore | 1 + DESCRIPTION | 14 + Makefile | 31 + NAMESPACE | 5 + R/average_price.R | 32 + R/bollinger_bands.R | 16 + R/talib-package.R | 4 + cleanup | 3 + configure | 92 + man/average_price.Rd | 14 + man/bollinger_bands.Rd | 14 + src/.gitignore | 5 + src/Makevars | 3 + src/api.h | 10 + src/bollinger_bands.c | 167 + src/common.h | 37 + src/init.c | 16 + src/lib.h | 31 + src/ta-lib/.editorconfig | 14 + src/ta-lib/.github/actions/diffs/action.yml | 34 + .../.github/workflows/dev-nightly-tests.yml | 114 + src/ta-lib/.github/workflows/docs.yml | 35 + .../.github/workflows/main-nightly-tests.yml | 92 + .../.github/workflows/release-step-1.yml | 214 + .../.github/workflows/release-step-2.yml | 87 + src/ta-lib/.gitignore | 89 + src/ta-lib/.vscode/settings.json | 9 + src/ta-lib/Makefile.am | 19 + src/ta-lib/README.md | 11 + src/ta-lib/VERSION | 1 + src/ta-lib/configure.ac | 51 + src/ta-lib/include/ta_abstract.h | 553 + src/ta-lib/include/ta_common.h | 160 + src/ta-lib/include/ta_defs.h | 328 + src/ta-lib/include/ta_func.h | 5346 ++++++++++ src/ta-lib/include/ta_libc.h | 51 + src/ta-lib/local/include/ta-lib/ta_abstract.h | 553 + src/ta-lib/local/include/ta-lib/ta_common.h | 160 + src/ta-lib/local/include/ta-lib/ta_defs.h | 328 + src/ta-lib/local/include/ta-lib/ta_func.h | 5346 ++++++++++ src/ta-lib/local/include/ta-lib/ta_libc.h | 51 + src/ta-lib/src/Makefile.am | 12 + src/ta-lib/src/ta_abstract/Makefile.am | 48 + src/ta-lib/src/ta_abstract/frames/ta_frame.c | 3469 +++++++ src/ta-lib/src/ta_abstract/frames/ta_frame.h | 1508 +++ src/ta-lib/src/ta_abstract/ta_abstract.c | 1313 +++ src/ta-lib/src/ta_abstract/ta_def_ui.c | 573 ++ src/ta-lib/src/ta_abstract/ta_def_ui.h | 293 + src/ta-lib/src/ta_abstract/ta_frame_priv.h | 128 + src/ta-lib/src/ta_abstract/ta_func_api.c | 9159 +++++++++++++++++ src/ta-lib/src/ta_abstract/ta_group_idx.c | 453 + src/ta-lib/src/ta_abstract/ta_java_defs.h | 366 + src/ta-lib/src/ta_abstract/tables/table_a.c | 441 + src/ta-lib/src/ta_abstract/tables/table_b.c | 196 + src/ta-lib/src/ta_abstract/tables/table_c.c | 1885 ++++ src/ta-lib/src/ta_abstract/tables/table_d.c | 129 + src/ta-lib/src/ta_abstract/tables/table_e.c | 102 + src/ta-lib/src/ta_abstract/tables/table_f.c | 76 + src/ta-lib/src/ta_abstract/tables/table_g.c | 72 + src/ta-lib/src/ta_abstract/tables/table_h.c | 246 + src/ta-lib/src/ta_abstract/tables/table_i.c | 99 + src/ta-lib/src/ta_abstract/tables/table_j.c | 72 + src/ta-lib/src/ta_abstract/tables/table_k.c | 98 + src/ta-lib/src/ta_abstract/tables/table_l.c | 188 + src/ta-lib/src/ta_abstract/tables/table_m.c | 739 ++ src/ta-lib/src/ta_abstract/tables/table_n.c | 127 + src/ta-lib/src/ta_abstract/tables/table_o.c | 96 + src/ta-lib/src/ta_abstract/tables/table_p.c | 186 + src/ta-lib/src/ta_abstract/tables/table_q.c | 72 + src/ta-lib/src/ta_abstract/tables/table_r.c | 206 + src/ta-lib/src/ta_abstract/tables/table_s.c | 630 ++ src/ta-lib/src/ta_abstract/tables/table_t.c | 277 + src/ta-lib/src/ta_abstract/tables/table_u.c | 142 + src/ta-lib/src/ta_abstract/tables/table_v.c | 98 + src/ta-lib/src/ta_abstract/tables/table_w.c | 149 + src/ta-lib/src/ta_abstract/tables/table_x.c | 72 + src/ta-lib/src/ta_abstract/tables/table_y.c | 72 + src/ta-lib/src/ta_abstract/tables/table_z.c | 72 + src/ta-lib/src/ta_common/Makefile.am | 13 + src/ta-lib/src/ta_common/ta_global.c | 178 + src/ta-lib/src/ta_common/ta_global.h | 119 + src/ta-lib/src/ta_common/ta_magic_nb.h | 31 + src/ta-lib/src/ta_common/ta_memory.h | 362 + src/ta-lib/src/ta_common/ta_pragma.h | 87 + src/ta-lib/src/ta_common/ta_retcode.c | 109 + src/ta-lib/src/ta_common/ta_version.c | 97 + src/ta-lib/src/ta_func/Makefile.am | 171 + src/ta-lib/src/ta_func/ta_ACCBANDS.c | 518 + src/ta-lib/src/ta_func/ta_ACOS.c | 250 + src/ta-lib/src/ta_func/ta_AD.c | 327 + src/ta-lib/src/ta_func/ta_ADD.c | 260 + src/ta-lib/src/ta_func/ta_ADOSC.c | 495 + src/ta-lib/src/ta_func/ta_ADX.c | 798 ++ src/ta-lib/src/ta_func/ta_ADXR.c | 387 + src/ta-lib/src/ta_func/ta_APO.c | 619 ++ src/ta-lib/src/ta_func/ta_AROON.c | 463 + src/ta-lib/src/ta_func/ta_AROONOSC.c | 468 + src/ta-lib/src/ta_func/ta_ASIN.c | 249 + src/ta-lib/src/ta_func/ta_ATAN.c | 251 + src/ta-lib/src/ta_func/ta_ATR.c | 466 + src/ta-lib/src/ta_func/ta_AVGDEV.c | 331 + src/ta-lib/src/ta_func/ta_AVGPRICE.c | 291 + src/ta-lib/src/ta_func/ta_BBANDS.c | 659 ++ src/ta-lib/src/ta_func/ta_BETA.c | 496 + src/ta-lib/src/ta_func/ta_BOP.c | 292 + src/ta-lib/src/ta_func/ta_CCI.c | 429 + src/ta-lib/src/ta_func/ta_CDL2CROWS.c | 369 + src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c | 397 + src/ta-lib/src/ta_func/ta_CDL3INSIDE.c | 388 + src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c | 410 + src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c | 351 + src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c | 465 + src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c | 489 + src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c | 473 + src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c | 561 + src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c | 389 + src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c | 396 + .../src/ta_func/ta_CDLCLOSINGMARUBOZU.c | 390 + .../src/ta_func/ta_CDLCONCEALBABYSWALL.c | 399 + src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c | 392 + src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c | 398 + src/ta-lib/src/ta_func/ta_CDLDOJI.c | 350 + src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c | 382 + src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c | 379 + src/ta-lib/src/ta_func/ta_CDLENGULFING.c | 361 + .../src/ta_func/ta_CDLEVENINGDOJISTAR.c | 441 + src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c | 427 + .../src/ta_func/ta_CDLGAPSIDESIDEWHITE.c | 398 + src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c | 378 + src/ta-lib/src/ta_func/ta_CDLHAMMER.c | 427 + src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c | 427 + src/ta-lib/src/ta_func/ta_CDLHARAMI.c | 401 + src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c | 396 + src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c | 372 + src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c | 412 + src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c | 470 + src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c | 384 + .../src/ta_func/ta_CDLIDENTICAL3CROWS.c | 433 + src/ta-lib/src/ta_func/ta_CDLINNECK.c | 387 + src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c | 403 + src/ta-lib/src/ta_func/ta_CDLKICKING.c | 420 + .../src/ta_func/ta_CDLKICKINGBYLENGTH.c | 421 + src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c | 375 + src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c | 378 + src/ta-lib/src/ta_func/ta_CDLLONGLINE.c | 372 + src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c | 373 + src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c | 359 + src/ta-lib/src/ta_func/ta_CDLMATHOLD.c | 470 + .../src/ta_func/ta_CDLMORNINGDOJISTAR.c | 439 + src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c | 425 + src/ta-lib/src/ta_func/ta_CDLONNECK.c | 386 + src/ta-lib/src/ta_func/ta_CDLPIERCING.c | 377 + src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c | 411 + .../src/ta_func/ta_CDLRISEFALL3METHODS.c | 437 + .../src/ta_func/ta_CDLSEPARATINGLINES.c | 419 + src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c | 403 + src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c | 372 + src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c | 356 + src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c | 469 + src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c | 365 + src/ta-lib/src/ta_func/ta_CDLTAKURI.c | 401 + src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c | 398 + src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c | 388 + src/ta-lib/src/ta_func/ta_CDLTRISTAR.c | 379 + src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c | 388 + .../src/ta_func/ta_CDLUPSIDEGAP2CROWS.c | 390 + .../src/ta_func/ta_CDLXSIDEGAP3METHODS.c | 363 + src/ta-lib/src/ta_func/ta_CEIL.c | 250 + src/ta-lib/src/ta_func/ta_CMO.c | 613 ++ src/ta-lib/src/ta_func/ta_CORREL.c | 416 + src/ta-lib/src/ta_func/ta_COS.c | 250 + src/ta-lib/src/ta_func/ta_COSH.c | 250 + src/ta-lib/src/ta_func/ta_DEMA.c | 498 + src/ta-lib/src/ta_func/ta_DIV.c | 260 + src/ta-lib/src/ta_func/ta_DX.c | 705 ++ src/ta-lib/src/ta_func/ta_EMA.c | 512 + src/ta-lib/src/ta_func/ta_EXP.c | 250 + src/ta-lib/src/ta_func/ta_FLOOR.c | 250 + src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c | 571 + src/ta-lib/src/ta_func/ta_HT_DCPHASE.c | 689 ++ src/ta-lib/src/ta_func/ta_HT_PHASOR.c | 592 ++ src/ta-lib/src/ta_func/ta_HT_SINE.c | 706 ++ src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c | 651 ++ src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c | 804 ++ src/ta-lib/src/ta_func/ta_IMI.c | 340 + src/ta-lib/src/ta_func/ta_KAMA.c | 508 + src/ta-lib/src/ta_func/ta_LINEARREG.c | 365 + src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c | 365 + .../src/ta_func/ta_LINEARREG_INTERCEPT.c | 363 + src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c | 359 + src/ta-lib/src/ta_func/ta_LN.c | 250 + src/ta-lib/src/ta_func/ta_LOG10.c | 250 + src/ta-lib/src/ta_func/ta_MA.c | 488 + src/ta-lib/src/ta_func/ta_MACD.c | 806 ++ src/ta-lib/src/ta_func/ta_MACDEXT.c | 721 ++ src/ta-lib/src/ta_func/ta_MACDFIX.c | 314 + src/ta-lib/src/ta_func/ta_MAMA.c | 727 ++ src/ta-lib/src/ta_func/ta_MAVP.c | 506 + src/ta-lib/src/ta_func/ta_MAX.c | 384 + src/ta-lib/src/ta_func/ta_MAXINDEX.c | 379 + src/ta-lib/src/ta_func/ta_MEDPRICE.c | 275 + src/ta-lib/src/ta_func/ta_MFI.c | 586 ++ src/ta-lib/src/ta_func/ta_MIDPOINT.c | 356 + src/ta-lib/src/ta_func/ta_MIDPRICE.c | 369 + src/ta-lib/src/ta_func/ta_MIN.c | 384 + src/ta-lib/src/ta_func/ta_MININDEX.c | 379 + src/ta-lib/src/ta_func/ta_MINMAX.c | 441 + src/ta-lib/src/ta_func/ta_MINMAXINDEX.c | 441 + src/ta-lib/src/ta_func/ta_MINUS_DI.c | 716 ++ src/ta-lib/src/ta_func/ta_MINUS_DM.c | 591 ++ src/ta-lib/src/ta_func/ta_MOM.c | 346 + src/ta-lib/src/ta_func/ta_MULT.c | 260 + src/ta-lib/src/ta_func/ta_NATR.c | 499 + src/ta-lib/src/ta_func/ta_OBV.c | 291 + src/ta-lib/src/ta_func/ta_PLUS_DI.c | 716 ++ src/ta-lib/src/ta_func/ta_PLUS_DM.c | 592 ++ src/ta-lib/src/ta_func/ta_PPO.c | 367 + src/ta-lib/src/ta_func/ta_ROC.c | 357 + src/ta-lib/src/ta_func/ta_ROCP.c | 358 + src/ta-lib/src/ta_func/ta_ROCR.c | 359 + src/ta-lib/src/ta_func/ta_ROCR100.c | 358 + src/ta-lib/src/ta_func/ta_RSI.c | 617 ++ src/ta-lib/src/ta_func/ta_SAR.c | 724 ++ src/ta-lib/src/ta_func/ta_SAREXT.c | 1004 ++ src/ta-lib/src/ta_func/ta_SIN.c | 250 + src/ta-lib/src/ta_func/ta_SINH.c | 250 + src/ta-lib/src/ta_func/ta_SMA.c | 431 + src/ta-lib/src/ta_func/ta_SQRT.c | 250 + src/ta-lib/src/ta_func/ta_STDDEV.c | 519 + src/ta-lib/src/ta_func/ta_STOCH.c | 820 ++ src/ta-lib/src/ta_func/ta_STOCHF.c | 738 ++ src/ta-lib/src/ta_func/ta_STOCHRSI.c | 522 + src/ta-lib/src/ta_func/ta_SUB.c | 261 + src/ta-lib/src/ta_func/ta_SUM.c | 344 + src/ta-lib/src/ta_func/ta_T3.c | 536 + src/ta-lib/src/ta_func/ta_TAN.c | 249 + src/ta-lib/src/ta_func/ta_TANH.c | 250 + src/ta-lib/src/ta_func/ta_TEMA.c | 492 + src/ta-lib/src/ta_func/ta_TRANGE.c | 340 + src/ta-lib/src/ta_func/ta_TRIMA.c | 659 ++ src/ta-lib/src/ta_func/ta_TRIX.c | 461 + src/ta-lib/src/ta_func/ta_TSF.c | 365 + src/ta-lib/src/ta_func/ta_TYPPRICE.c | 283 + src/ta-lib/src/ta_func/ta_ULTOSC.c | 594 ++ src/ta-lib/src/ta_func/ta_VAR.c | 498 + src/ta-lib/src/ta_func/ta_WCLPRICE.c | 282 + src/ta-lib/src/ta_func/ta_WILLR.c | 466 + src/ta-lib/src/ta_func/ta_WMA.c | 436 + src/ta-lib/src/ta_func/ta_utility.c | 134 + src/ta-lib/src/ta_func/ta_utility.h | 362 + src/ta-lib/src/tools/Makefile.am | 2 + src/ta-lib/src/tools/gen_code/Makefile.am | 16 + src/ta-lib/src/tools/gen_code/gen_code.c | 5005 +++++++++ src/ta-lib/src/tools/post-build-bin.sh | 17 + src/ta-lib/src/tools/ta_regtest/Makefile.am | 43 + .../src/tools/ta_regtest/ta_error_number.h | 297 + .../src/tools/ta_regtest/ta_gDataClose.c | 723 ++ .../src/tools/ta_regtest/ta_gDataHigh.c | 723 ++ src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c | 719 ++ .../src/tools/ta_regtest/ta_gDataOpen.c | 667 ++ src/ta-lib/src/tools/ta_regtest/ta_regtest.c | 301 + .../src/tools/ta_regtest/ta_test_func.h | 28 + .../ta_regtest/ta_test_func/test_1in_1out.c | 507 + .../ta_regtest/ta_test_func/test_1in_2out.c | 469 + .../tools/ta_regtest/ta_test_func/test_adx.c | 682 ++ .../ta_regtest/ta_test_func/test_avgdev.c | 256 + .../ta_regtest/ta_test_func/test_bbands.c | 533 + .../ta_test_func/test_candlestick.c | 744 ++ .../tools/ta_regtest/ta_test_func/test_imi.c | 293 + .../tools/ta_regtest/ta_test_func/test_ma.c | 816 ++ .../tools/ta_regtest/ta_test_func/test_macd.c | 603 ++ .../ta_regtest/ta_test_func/test_minmax.c | 833 ++ .../tools/ta_regtest/ta_test_func/test_mom.c | 553 + .../ta_regtest/ta_test_func/test_per_ema.c | 307 + .../ta_regtest/ta_test_func/test_per_hl.c | 640 ++ .../ta_regtest/ta_test_func/test_per_hlc.c | 651 ++ .../ta_regtest/ta_test_func/test_per_hlcv.c | 710 ++ .../ta_regtest/ta_test_func/test_per_ohlc.c | 527 + .../tools/ta_regtest/ta_test_func/test_po.c | 440 + .../tools/ta_regtest/ta_test_func/test_rsi.c | 507 + .../tools/ta_regtest/ta_test_func/test_sar.c | 301 + .../ta_regtest/ta_test_func/test_stddev.c | 265 + .../ta_regtest/ta_test_func/test_stoch.c | 794 ++ .../ta_regtest/ta_test_func/test_trange.c | 349 + .../src/tools/ta_regtest/ta_test_priv.h | 210 + .../src/tools/ta_regtest/test_abstract.c | 788 ++ src/ta-lib/src/tools/ta_regtest/test_data.c | 145 + .../src/tools/ta_regtest/test_internals.c | 274 + src/ta-lib/src/tools/ta_regtest/test_util.c | 1338 +++ src/ta-lib/ta-lib.dpkg.in | 16 + src/ta-lib/ta-lib.pc.in | 11 + src/ta-lib/ta-lib.spec.in | 70 + src/ta_avgprice.c | 67 + tests/testthat.R | 12 + tests/testthat/test-average_price.R | 24 + 296 files changed, 132698 insertions(+) create mode 100644 .Rbuildignore create mode 100644 DESCRIPTION create mode 100644 Makefile create mode 100644 NAMESPACE create mode 100644 R/average_price.R create mode 100644 R/bollinger_bands.R create mode 100644 R/talib-package.R create mode 100644 cleanup create mode 100755 configure create mode 100644 man/average_price.Rd create mode 100644 man/bollinger_bands.Rd create mode 100644 src/.gitignore create mode 100644 src/Makevars create mode 100644 src/api.h create mode 100644 src/bollinger_bands.c create mode 100644 src/common.h create mode 100644 src/init.c create mode 100644 src/lib.h create mode 100644 src/ta-lib/.editorconfig create mode 100644 src/ta-lib/.github/actions/diffs/action.yml create mode 100644 src/ta-lib/.github/workflows/dev-nightly-tests.yml create mode 100644 src/ta-lib/.github/workflows/docs.yml create mode 100644 src/ta-lib/.github/workflows/main-nightly-tests.yml create mode 100644 src/ta-lib/.github/workflows/release-step-1.yml create mode 100644 src/ta-lib/.github/workflows/release-step-2.yml create mode 100644 src/ta-lib/.gitignore create mode 100644 src/ta-lib/.vscode/settings.json create mode 100644 src/ta-lib/Makefile.am create mode 100644 src/ta-lib/README.md create mode 100644 src/ta-lib/VERSION create mode 100644 src/ta-lib/configure.ac create mode 100644 src/ta-lib/include/ta_abstract.h create mode 100644 src/ta-lib/include/ta_common.h create mode 100644 src/ta-lib/include/ta_defs.h create mode 100644 src/ta-lib/include/ta_func.h create mode 100644 src/ta-lib/include/ta_libc.h create mode 100644 src/ta-lib/local/include/ta-lib/ta_abstract.h create mode 100644 src/ta-lib/local/include/ta-lib/ta_common.h create mode 100644 src/ta-lib/local/include/ta-lib/ta_defs.h create mode 100644 src/ta-lib/local/include/ta-lib/ta_func.h create mode 100644 src/ta-lib/local/include/ta-lib/ta_libc.h create mode 100644 src/ta-lib/src/Makefile.am create mode 100644 src/ta-lib/src/ta_abstract/Makefile.am create mode 100644 src/ta-lib/src/ta_abstract/frames/ta_frame.c create mode 100644 src/ta-lib/src/ta_abstract/frames/ta_frame.h create mode 100644 src/ta-lib/src/ta_abstract/ta_abstract.c create mode 100644 src/ta-lib/src/ta_abstract/ta_def_ui.c create mode 100644 src/ta-lib/src/ta_abstract/ta_def_ui.h create mode 100644 src/ta-lib/src/ta_abstract/ta_frame_priv.h create mode 100644 src/ta-lib/src/ta_abstract/ta_func_api.c create mode 100644 src/ta-lib/src/ta_abstract/ta_group_idx.c create mode 100644 src/ta-lib/src/ta_abstract/ta_java_defs.h create mode 100644 src/ta-lib/src/ta_abstract/tables/table_a.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_b.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_c.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_d.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_e.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_f.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_g.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_h.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_i.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_j.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_k.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_l.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_m.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_n.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_o.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_p.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_q.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_r.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_s.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_t.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_u.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_v.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_w.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_x.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_y.c create mode 100644 src/ta-lib/src/ta_abstract/tables/table_z.c create mode 100644 src/ta-lib/src/ta_common/Makefile.am create mode 100644 src/ta-lib/src/ta_common/ta_global.c create mode 100644 src/ta-lib/src/ta_common/ta_global.h create mode 100644 src/ta-lib/src/ta_common/ta_magic_nb.h create mode 100644 src/ta-lib/src/ta_common/ta_memory.h create mode 100644 src/ta-lib/src/ta_common/ta_pragma.h create mode 100644 src/ta-lib/src/ta_common/ta_retcode.c create mode 100644 src/ta-lib/src/ta_common/ta_version.c create mode 100644 src/ta-lib/src/ta_func/Makefile.am create mode 100644 src/ta-lib/src/ta_func/ta_ACCBANDS.c create mode 100644 src/ta-lib/src/ta_func/ta_ACOS.c create mode 100644 src/ta-lib/src/ta_func/ta_AD.c create mode 100644 src/ta-lib/src/ta_func/ta_ADD.c create mode 100644 src/ta-lib/src/ta_func/ta_ADOSC.c create mode 100644 src/ta-lib/src/ta_func/ta_ADX.c create mode 100644 src/ta-lib/src/ta_func/ta_ADXR.c create mode 100644 src/ta-lib/src/ta_func/ta_APO.c create mode 100644 src/ta-lib/src/ta_func/ta_AROON.c create mode 100644 src/ta-lib/src/ta_func/ta_AROONOSC.c create mode 100644 src/ta-lib/src/ta_func/ta_ASIN.c create mode 100644 src/ta-lib/src/ta_func/ta_ATAN.c create mode 100644 src/ta-lib/src/ta_func/ta_ATR.c create mode 100644 src/ta-lib/src/ta_func/ta_AVGDEV.c create mode 100644 src/ta-lib/src/ta_func/ta_AVGPRICE.c create mode 100644 src/ta-lib/src/ta_func/ta_BBANDS.c create mode 100644 src/ta-lib/src/ta_func/ta_BETA.c create mode 100644 src/ta-lib/src/ta_func/ta_BOP.c create mode 100644 src/ta-lib/src/ta_func/ta_CCI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL2CROWS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL3INSIDE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c create mode 100644 src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLDOJI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLENGULFING.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHAMMER.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHARAMI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLINNECK.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLKICKING.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLLONGLINE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLMATHOLD.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLONNECK.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLPIERCING.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLTAKURI.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLTRISTAR.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c create mode 100644 src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c create mode 100644 src/ta-lib/src/ta_func/ta_CEIL.c create mode 100644 src/ta-lib/src/ta_func/ta_CMO.c create mode 100644 src/ta-lib/src/ta_func/ta_CORREL.c create mode 100644 src/ta-lib/src/ta_func/ta_COS.c create mode 100644 src/ta-lib/src/ta_func/ta_COSH.c create mode 100644 src/ta-lib/src/ta_func/ta_DEMA.c create mode 100644 src/ta-lib/src/ta_func/ta_DIV.c create mode 100644 src/ta-lib/src/ta_func/ta_DX.c create mode 100644 src/ta-lib/src/ta_func/ta_EMA.c create mode 100644 src/ta-lib/src/ta_func/ta_EXP.c create mode 100644 src/ta-lib/src/ta_func/ta_FLOOR.c create mode 100644 src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c create mode 100644 src/ta-lib/src/ta_func/ta_HT_DCPHASE.c create mode 100644 src/ta-lib/src/ta_func/ta_HT_PHASOR.c create mode 100644 src/ta-lib/src/ta_func/ta_HT_SINE.c create mode 100644 src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c create mode 100644 src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c create mode 100644 src/ta-lib/src/ta_func/ta_IMI.c create mode 100644 src/ta-lib/src/ta_func/ta_KAMA.c create mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG.c create mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c create mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c create mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c create mode 100644 src/ta-lib/src/ta_func/ta_LN.c create mode 100644 src/ta-lib/src/ta_func/ta_LOG10.c create mode 100644 src/ta-lib/src/ta_func/ta_MA.c create mode 100644 src/ta-lib/src/ta_func/ta_MACD.c create mode 100644 src/ta-lib/src/ta_func/ta_MACDEXT.c create mode 100644 src/ta-lib/src/ta_func/ta_MACDFIX.c create mode 100644 src/ta-lib/src/ta_func/ta_MAMA.c create mode 100644 src/ta-lib/src/ta_func/ta_MAVP.c create mode 100644 src/ta-lib/src/ta_func/ta_MAX.c create mode 100644 src/ta-lib/src/ta_func/ta_MAXINDEX.c create mode 100644 src/ta-lib/src/ta_func/ta_MEDPRICE.c create mode 100644 src/ta-lib/src/ta_func/ta_MFI.c create mode 100644 src/ta-lib/src/ta_func/ta_MIDPOINT.c create mode 100644 src/ta-lib/src/ta_func/ta_MIDPRICE.c create mode 100644 src/ta-lib/src/ta_func/ta_MIN.c create mode 100644 src/ta-lib/src/ta_func/ta_MININDEX.c create mode 100644 src/ta-lib/src/ta_func/ta_MINMAX.c create mode 100644 src/ta-lib/src/ta_func/ta_MINMAXINDEX.c create mode 100644 src/ta-lib/src/ta_func/ta_MINUS_DI.c create mode 100644 src/ta-lib/src/ta_func/ta_MINUS_DM.c create mode 100644 src/ta-lib/src/ta_func/ta_MOM.c create mode 100644 src/ta-lib/src/ta_func/ta_MULT.c create mode 100644 src/ta-lib/src/ta_func/ta_NATR.c create mode 100644 src/ta-lib/src/ta_func/ta_OBV.c create mode 100644 src/ta-lib/src/ta_func/ta_PLUS_DI.c create mode 100644 src/ta-lib/src/ta_func/ta_PLUS_DM.c create mode 100644 src/ta-lib/src/ta_func/ta_PPO.c create mode 100644 src/ta-lib/src/ta_func/ta_ROC.c create mode 100644 src/ta-lib/src/ta_func/ta_ROCP.c create mode 100644 src/ta-lib/src/ta_func/ta_ROCR.c create mode 100644 src/ta-lib/src/ta_func/ta_ROCR100.c create mode 100644 src/ta-lib/src/ta_func/ta_RSI.c create mode 100644 src/ta-lib/src/ta_func/ta_SAR.c create mode 100644 src/ta-lib/src/ta_func/ta_SAREXT.c create mode 100644 src/ta-lib/src/ta_func/ta_SIN.c create mode 100644 src/ta-lib/src/ta_func/ta_SINH.c create mode 100644 src/ta-lib/src/ta_func/ta_SMA.c create mode 100644 src/ta-lib/src/ta_func/ta_SQRT.c create mode 100644 src/ta-lib/src/ta_func/ta_STDDEV.c create mode 100644 src/ta-lib/src/ta_func/ta_STOCH.c create mode 100644 src/ta-lib/src/ta_func/ta_STOCHF.c create mode 100644 src/ta-lib/src/ta_func/ta_STOCHRSI.c create mode 100644 src/ta-lib/src/ta_func/ta_SUB.c create mode 100644 src/ta-lib/src/ta_func/ta_SUM.c create mode 100644 src/ta-lib/src/ta_func/ta_T3.c create mode 100644 src/ta-lib/src/ta_func/ta_TAN.c create mode 100644 src/ta-lib/src/ta_func/ta_TANH.c create mode 100644 src/ta-lib/src/ta_func/ta_TEMA.c create mode 100644 src/ta-lib/src/ta_func/ta_TRANGE.c create mode 100644 src/ta-lib/src/ta_func/ta_TRIMA.c create mode 100644 src/ta-lib/src/ta_func/ta_TRIX.c create mode 100644 src/ta-lib/src/ta_func/ta_TSF.c create mode 100644 src/ta-lib/src/ta_func/ta_TYPPRICE.c create mode 100644 src/ta-lib/src/ta_func/ta_ULTOSC.c create mode 100644 src/ta-lib/src/ta_func/ta_VAR.c create mode 100644 src/ta-lib/src/ta_func/ta_WCLPRICE.c create mode 100644 src/ta-lib/src/ta_func/ta_WILLR.c create mode 100644 src/ta-lib/src/ta_func/ta_WMA.c create mode 100644 src/ta-lib/src/ta_func/ta_utility.c create mode 100644 src/ta-lib/src/ta_func/ta_utility.h create mode 100644 src/ta-lib/src/tools/Makefile.am create mode 100644 src/ta-lib/src/tools/gen_code/Makefile.am create mode 100644 src/ta-lib/src/tools/gen_code/gen_code.c create mode 100755 src/ta-lib/src/tools/post-build-bin.sh create mode 100644 src/ta-lib/src/tools/ta_regtest/Makefile.am create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_error_number.h create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_regtest.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func.h create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c create mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_priv.h create mode 100644 src/ta-lib/src/tools/ta_regtest/test_abstract.c create mode 100644 src/ta-lib/src/tools/ta_regtest/test_data.c create mode 100644 src/ta-lib/src/tools/ta_regtest/test_internals.c create mode 100644 src/ta-lib/src/tools/ta_regtest/test_util.c create mode 100644 src/ta-lib/ta-lib.dpkg.in create mode 100644 src/ta-lib/ta-lib.pc.in create mode 100644 src/ta-lib/ta-lib.spec.in create mode 100644 src/ta_avgprice.c create mode 100644 tests/testthat.R create mode 100644 tests/testthat/test-average_price.R diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 000000000..c862c744f --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,2 @@ +^curly-giggle\.Rproj$ +^\.Rproj\.user$ diff --git a/.gitignore b/.gitignore index e75435c1b..7cc8b6a31 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ po/*~ # RStudio Connect folder rsconnect/ +.Rproj.user diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 000000000..f6c87d382 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,14 @@ +Package: talib +Title: What the Package Does (One Line, Title Case) +Version: 0.0.0.9000 +Authors@R: + person("First", "Last", , "first.last@example.com", role = c("aut", "cre")) +Description: What the package does (one paragraph). +License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a + license +Encoding: UTF-8 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.2 +Suggests: + testthat (>= 3.0.0) +Config/testthat/edition: 3 diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..e8cdf5b22 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +## Package information +package_name := $(shell grep "^Package:" DESCRIPTION | sed "s/Package: //") +package_version := $(shell grep "^Version:" DESCRIPTION | sed "s/Version: //") +tarball_location := $(package_name)_$(package_version).tar.gz + +## default target +.PHONY: help +help: + @grep -h -E '^[[:space:]]*[A-Za-z0-9_.-]+:.*?## .*$$' $(MAKEFILE_LIST) \ + | sed -E 's/^[[:space:]]*//' \ + | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}' + +build: ## Build the R package + @Rscript -e "devtools::document()" > /dev/null 2>&1 + @R CMD build . && R CMD INSTALL $(tarball_location) + +check: + @Rscript -e "devtools::document()" > /dev/null 2>&1 + @R CMD build . && R CMD check $(tarball_location) + +test: ## Run tests + @Rscript -e "testthat::test_local()" + +clean: ## Remove artifacts + @rm -rf src/*.o + @rm -rf src/*.so + @rm -rf $(tarball_location) + +fmt: ## Formate code (change -style=$1 for other styleguides) + @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h + @rm -rf ./.clang-format \ No newline at end of file diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 000000000..315b3b78f --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,5 @@ +# Generated by roxygen2: do not edit by hand + +export(average_price) +export(bollinger_bands) +useDynLib(talib, .registration = TRUE) diff --git a/R/average_price.R b/R/average_price.R new file mode 100644 index 000000000..8a0f9f44b --- /dev/null +++ b/R/average_price.R @@ -0,0 +1,32 @@ +#' @title Average price +#' +#' @description +#' Calculate the average price +#' +#' +#' @author Serkan Korkmaz +#' @export +average_price <- function(x) { + + m <- as.matrix(x) + if (!is.numeric(m)) stop("Input must be numeric or coercible to numeric matrix.") + if (ncol(m) != 4L) { + stop("Input must have 4 columns: Open, High, Low, Close.") + } + + if (!is.null(colnames(m))) { + cn <- tolower(colnames(m)) + wanted <- c("open", "high", "low", "close") + if (all(wanted %in% cn)) { + m <- m[, match(wanted, cn), drop = FALSE] + } else { + } + } + + res <- .Call("c_average_price", m, PACKAGE = "talib") + if (!is.numeric(res) || length(res) != nrow(m)) { + stop("Unexpected result from native call.") + } + + res +} \ No newline at end of file diff --git a/R/bollinger_bands.R b/R/bollinger_bands.R new file mode 100644 index 000000000..723529487 --- /dev/null +++ b/R/bollinger_bands.R @@ -0,0 +1,16 @@ +#' @title Bollinger Bands +#' +#' @description +#' Calculate Bollinger Bands +#' +#' @param x an object +#' +#' @export +bollinger_bands <- function(a, b, c, d, e) { + .Call("c_bollinger_bands", + as.numeric(a), + as.integer(b), + as.numeric(c), + as.numeric(d), + e) +} \ No newline at end of file diff --git a/R/talib-package.R b/R/talib-package.R new file mode 100644 index 000000000..ce2ec1ed1 --- /dev/null +++ b/R/talib-package.R @@ -0,0 +1,4 @@ + ## usethis namespace: start + #' @useDynLib talib, .registration = TRUE + ## usethis namespace: end + NULL \ No newline at end of file diff --git a/cleanup b/cleanup new file mode 100644 index 000000000..6e045010d --- /dev/null +++ b/cleanup @@ -0,0 +1,3 @@ +#!/bin/sh + +rm -rf src/Makevars \ No newline at end of file diff --git a/configure b/configure new file mode 100755 index 000000000..c8b6b8775 --- /dev/null +++ b/configure @@ -0,0 +1,92 @@ +#!/bin/sh + +## 1) Purpose and setup +## Purpose: Detect or build TA-Lib and emit src/Makevars with correct flags. +## Supports: system TA-Lib (via pkg-config or probe) or vendored in-tree build. +TA_LIB_SRC="src/ta-lib" +TA_LIB_PREFIX="$(cd "$TA_LIB_SRC" && pwd)/local" +USE_SYSTEM=0 +PKG_CPPFLAGS="" +PKG_LIBS="" + +## 2) Locate system TA-Lib via pkg-config +## If TA-Lib provides a pkg-config file, use it for canonical flags. +if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists ta-lib; then + PKG_CPPFLAGS="$(pkg-config --cflags ta-lib)" + PKG_LIBS="$(pkg-config --libs ta-lib)" + USE_SYSTEM=1 + echo "configure: using system TA-Lib via pkg-config" +else + ## 3) Probe system TA-Lib by compile/link test + ## Fallback: compile a tiny program against -lta-lib to detect presence. + echo "configure: probing for system TA-Lib" + cat <<'EOF' > conftest.c +#include +int main(void){ return 0; } +EOF + if cc conftest.c -o conftest -lta-lib >/dev/null 2>&1; then + PKG_CPPFLAGS="" + PKG_LIBS="-lta-lib" + USE_SYSTEM=1 + echo "configure: found system TA-Lib by test compile" + else + echo "configure: system TA-Lib not found" + fi + rm -f conftest conftest.c +fi + +## 4) Vendored build fallback (build TA-Lib in-tree) +## If no usable system TA-Lib was found, bootstrap and build the bundled copy. +if [ "$USE_SYSTEM" -eq 0 ]; then + echo "configure: building vendored TA-Lib in-tree" + + if [ ! -d "$TA_LIB_SRC" ]; then + echo "ERROR: vendored TA-Lib source not found at $TA_LIB_SRC" >&2 + exit 1 + fi + + cd "$TA_LIB_SRC" + + if [ ! -f configure ]; then + if [ -f autogen.sh ]; then + chmod +x autogen.sh + echo "configure: running autogen.sh" + bash autogen.sh + else + echo "ERROR: no configure or autogen.sh in TA-Lib source" >&2 + exit 1 + fi + fi + + ./configure --prefix="$TA_LIB_PREFIX" + make -j2 + make install + + cd - >/dev/null + + ## 5) Normalize static archive name + ## Handle TA-Lib naming change: libta-lib.a vs libta_lib.a + if [ -f "$TA_LIB_PREFIX/lib/libta-lib.a" ]; then + TA_LIB_STATIC="$TA_LIB_PREFIX/lib/libta-lib.a" + elif [ -f "$TA_LIB_PREFIX/lib/libta_lib.a" ]; then + TA_LIB_STATIC="$TA_LIB_PREFIX/lib/libta_lib.a" + else + echo "ERROR: built TA-Lib static archive not found under $TA_LIB_PREFIX/lib" >&2 + exit 1 + fi + + ## 6) Set flags for vendored build + PKG_CPPFLAGS="-I$TA_LIB_PREFIX/include" + PKG_LIBS="$TA_LIB_STATIC -lpthread -ldl" +fi + +## 7) Emit src/Makevars +## Write resolved include and linker flags so R build uses them directly. +echo "configure: writing src/Makevars" +cat < src/Makevars +# autogenerated by configure +PKG_CPPFLAGS = $PKG_CPPFLAGS +PKG_LIBS = $PKG_LIBS +EOF + +echo "configure: done." diff --git a/man/average_price.Rd b/man/average_price.Rd new file mode 100644 index 000000000..dbb168af2 --- /dev/null +++ b/man/average_price.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/average_price.R +\name{average_price} +\alias{average_price} +\title{Average price} +\usage{ +average_price(x) +} +\description{ +Calculate the average price +} +\author{ +Serkan Korkmaz +} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd new file mode 100644 index 000000000..f40d4619f --- /dev/null +++ b/man/bollinger_bands.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bollinger_bands.R +\name{bollinger_bands} +\alias{bollinger_bands} +\title{Bollinger Bands} +\usage{ +bollinger_bands(a, b, c, d, e) +} +\arguments{ +\item{x}{an object} +} +\description{ +Calculate Bollinger Bands +} diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 000000000..1327cf60a --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,5 @@ +*.o +*.so +*.dll +*.a +*.0 \ No newline at end of file diff --git a/src/Makevars b/src/Makevars new file mode 100644 index 000000000..f16d6d9f7 --- /dev/null +++ b/src/Makevars @@ -0,0 +1,3 @@ +# autogenerated by configure +PKG_CPPFLAGS = -I/home/serkor/Documents/Projects/Software/curly-giggle/src/ta-lib/local/include +PKG_LIBS = /home/serkor/Documents/Projects/Software/curly-giggle/src/ta-lib/local/lib/libta-lib.a -lpthread -ldl diff --git a/src/api.h b/src/api.h new file mode 100644 index 000000000..2221bb9cc --- /dev/null +++ b/src/api.h @@ -0,0 +1,10 @@ +#ifndef _API_H_ +#define _API_H_ + +#include + +SEXP c_average_price(const SEXP x); +SEXP c_bollinger_bands(SEXP x, SEXP timePeriod, SEXP nbDevUp, SEXP nbDevDn, + SEXP maType); + +#endif \ No newline at end of file diff --git a/src/bollinger_bands.c b/src/bollinger_bands.c new file mode 100644 index 000000000..e7fa0c54c --- /dev/null +++ b/src/bollinger_bands.c @@ -0,0 +1,167 @@ +/* Bollinger Bands + * + */ +#include "lib.h" + +// Map user-supplied MA type string to TA_MAType enum. Defaults to SMA. +static TA_MAType parse_ma_type(SEXP maTypeSEXP) { + if (maTypeSEXP == R_NilValue || !isString(maTypeSEXP) || + LENGTH(maTypeSEXP) < 1) + return TA_MAType_SMA; + + const char *s = CHAR(STRING_ELT(maTypeSEXP, 0)); + if (strcasecmp(s, "SMA") == 0) + return TA_MAType_SMA; + if (strcasecmp(s, "EMA") == 0) + return TA_MAType_EMA; + if (strcasecmp(s, "WMA") == 0) + return TA_MAType_WMA; + if (strcasecmp(s, "DEMA") == 0) + return TA_MAType_DEMA; + if (strcasecmp(s, "TEMA") == 0) + return TA_MAType_TEMA; + if (strcasecmp(s, "TRIMA") == 0) + return TA_MAType_TRIMA; + if (strcasecmp(s, "KAMA") == 0) + return TA_MAType_KAMA; + if (strcasecmp(s, "MAMA") == 0) + return TA_MAType_MAMA; + if (strcasecmp(s, "T3") == 0) + return TA_MAType_T3; + // fallback + return TA_MAType_SMA; +} + +// .Call interface: x, timePeriod (int scalar or NA), nbDevUp (double or NA), +// nbDevDn, maType (string) +SEXP c_bollinger_bands(SEXP x, SEXP timePeriod, SEXP nbDevUp, SEXP nbDevDn, + SEXP maType) { + static int ta_initialized = 0; + if (!ta_initialized) { + if (TA_Initialize() != TA_SUCCESS) + error("TA_Initialize failed"); + ta_initialized = 1; + } + + if (!isReal(x)) + error("Input vector x must be numeric (double)."); + + int n = LENGTH(x); + double *inReal = REAL(x); + + // Parameters with defaults + int optInTimePeriod = 20; + double optInNbDevUp = 2.0; + double optInNbDevDn = 2.0; + TA_MAType optInMAType = TA_MAType_SMA; + + if (timePeriod != R_NilValue && isInteger(timePeriod) && + LENGTH(timePeriod) >= 1) { + int tp = INTEGER(timePeriod)[0]; + if (tp != NA_INTEGER) + optInTimePeriod = tp; + } else if (timePeriod != R_NilValue && isReal(timePeriod) && + LENGTH(timePeriod) >= 1) { + double tp_d = REAL(timePeriod)[0]; + if (!ISNA(tp_d)) + optInTimePeriod = (int)tp_d; + } + + if (nbDevUp != R_NilValue && isReal(nbDevUp) && LENGTH(nbDevUp) >= 1) { + double v = REAL(nbDevUp)[0]; + if (!ISNA(v)) + optInNbDevUp = v; + } + if (nbDevDn != R_NilValue && isReal(nbDevDn) && LENGTH(nbDevDn) >= 1) { + double v = REAL(nbDevDn)[0]; + if (!ISNA(v)) + optInNbDevDn = v; + } + + optInMAType = parse_ma_type(maType); + + // Compute lookback + int lookback = TA_BBANDS_Lookback(optInTimePeriod, optInNbDevUp, optInNbDevDn, + optInMAType); + if (lookback < 0) + error("Invalid parameters for lookback."); + + // Allocate output vectors of length n (we will pad front with NA) + SEXP upper = PROTECT(allocVector(REALSXP, n)); + SEXP middle = PROTECT(allocVector(REALSXP, n)); + SEXP lower = PROTECT(allocVector(REALSXP, n)); + double *upper_p = REAL(upper); + double *middle_p = REAL(middle); + double *lower_p = REAL(lower); + + // Initialize output to NA + for (int i = 0; i < n; ++i) { + upper_p[i] = NA_REAL; + middle_p[i] = NA_REAL; + lower_p[i] = NA_REAL; + } + + // If not enough data, return early with all NAs and outNBElement=0 + if (n == 0 || n - 1 < lookback) { + SEXP outBegIdx = PROTECT(ScalarInteger(NA_INTEGER)); + SEXP outNBElement = PROTECT(ScalarInteger(0)); + SEXP res = PROTECT(allocVector(VECSXP, 5)); + SET_VECTOR_ELT(res, 0, upper); + SET_VECTOR_ELT(res, 1, middle); + SET_VECTOR_ELT(res, 2, lower); + SET_VECTOR_ELT(res, 3, outBegIdx); + SET_VECTOR_ELT(res, 4, outNBElement); + SEXP names = PROTECT(allocVector(STRSXP, 5)); + SET_STRING_ELT(names, 0, mkChar("upper")); + SET_STRING_ELT(names, 1, mkChar("middle")); + SET_STRING_ELT(names, 2, mkChar("lower")); + SET_STRING_ELT(names, 3, mkChar("outBegIdx")); + SET_STRING_ELT(names, 4, mkChar("outNBElement")); + setAttrib(res, R_NamesSymbol, names); + UNPROTECT(6); + return res; + } + + // Temporary buffers of size at least n (TA will only fill outNBElement + // entries) + int outBegIdx = 0; + int outNBElement = 0; + + TA_RetCode ret = TA_BBANDS( + 0, // startIdx + n - 1, // endIdx + inReal, optInTimePeriod, optInNbDevUp, optInNbDevDn, optInMAType, + &outBegIdx, &outNBElement, + upper_p + outBegIdx, // trick: TA writes starting at 0, so we copy later. + // Simpler to use temporary arrays. + middle_p + outBegIdx, lower_p + outBegIdx); + + if (ret != TA_SUCCESS) { + error("TA_BBANDS failed with code %d", ret); + } + + // Note: TA_BBANDS writes output starting from index 0 in its provided output + // arrays. We passed pointers offset by outBegIdx so valid data is already + // in-place. However TA_BBANDS expects output arrays big enough; we gave + // full-length with shift. + + // Prepare return list + SEXP outBegIdx_SEXP = PROTECT(ScalarInteger(outBegIdx)); + SEXP outNBElement_SEXP = PROTECT(ScalarInteger(outNBElement)); + SEXP res = PROTECT(allocVector(VECSXP, 5)); + SET_VECTOR_ELT(res, 0, upper); + SET_VECTOR_ELT(res, 1, middle); + SET_VECTOR_ELT(res, 2, lower); + SET_VECTOR_ELT(res, 3, outBegIdx_SEXP); + SET_VECTOR_ELT(res, 4, outNBElement_SEXP); + SEXP names = PROTECT(allocVector(STRSXP, 5)); + SET_STRING_ELT(names, 0, mkChar("upper")); + SET_STRING_ELT(names, 1, mkChar("middle")); + SET_STRING_ELT(names, 2, mkChar("lower")); + SET_STRING_ELT(names, 3, mkChar("outBegIdx")); + SET_STRING_ELT(names, 4, mkChar("outNBElement")); + setAttrib(res, R_NamesSymbol, names); + + UNPROTECT(6); // upper,middle,lower + outBegIdx + outNBElement + res names + return res; +} \ No newline at end of file diff --git a/src/common.h b/src/common.h new file mode 100644 index 000000000..69e6fc6ce --- /dev/null +++ b/src/common.h @@ -0,0 +1,37 @@ +/* Common functionality + * + */ +#ifndef _COMMON_H_ +#define _COMMON_H_ + +// Parse moving average types +// Example: Bollinger Bands +static TA_MAType parse_ma_type(SEXP maTypeSEXP) { + if (maTypeSEXP == R_NilValue || !isString(maTypeSEXP) || + LENGTH(maTypeSEXP) < 1) + return TA_MAType_SMA; + + const char *s = CHAR(STRING_ELT(maTypeSEXP, 0)); + if (strcasecmp(s, "SMA") == 0) + return TA_MAType_SMA; + if (strcasecmp(s, "EMA") == 0) + return TA_MAType_EMA; + if (strcasecmp(s, "WMA") == 0) + return TA_MAType_WMA; + if (strcasecmp(s, "DEMA") == 0) + return TA_MAType_DEMA; + if (strcasecmp(s, "TEMA") == 0) + return TA_MAType_TEMA; + if (strcasecmp(s, "TRIMA") == 0) + return TA_MAType_TRIMA; + if (strcasecmp(s, "KAMA") == 0) + return TA_MAType_KAMA; + if (strcasecmp(s, "MAMA") == 0) + return TA_MAType_MAMA; + if (strcasecmp(s, "T3") == 0) + return TA_MAType_T3; + // fallback + return TA_MAType_SMA; +} + +#endif //_COMMON_H_ \ No newline at end of file diff --git a/src/init.c b/src/init.c new file mode 100644 index 000000000..02fcf9822 --- /dev/null +++ b/src/init.c @@ -0,0 +1,16 @@ +#include +#include +#include + +/* Declaration of the wrapper */ +#include "api.h" + +static const R_CallMethodDef CallEntries[] = { + {"c_average_price", (DL_FUNC)&c_average_price, 1}, + {"c_bollinger_bands", (DL_FUNC)&c_bollinger_bands, 5}, + {NULL, NULL, 0}}; + +void R_init_talib(DllInfo *dll) { + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); + R_useDynamicSymbols(dll, FALSE); +} diff --git a/src/lib.h b/src/lib.h new file mode 100644 index 000000000..d6f9ea35c --- /dev/null +++ b/src/lib.h @@ -0,0 +1,31 @@ +/* + +*/ +#ifndef _LIB_H_ +#define _LIB_H_ + +// R Headers +#include +#include +#include + +// C Headers +#include + +// Redifne integers to abvoid +// R definition clashes +#define Int32 TA_Lib_Int32 +#include +#undef Int32 + +static void ensure_ta_initialized(void) { + static int inited = 0; + if (!inited) { + if (TA_Initialize() != TA_SUCCESS) { + Rf_error("TA-Lib initialization failed."); + } + inited = 1; + } +} + +#endif // _LIB_H_ \ No newline at end of file diff --git a/src/ta-lib/.editorconfig b/src/ta-lib/.editorconfig new file mode 100644 index 000000000..875ae3fd1 --- /dev/null +++ b/src/ta-lib/.editorconfig @@ -0,0 +1,14 @@ +# top-most EditorConfig file +root = true + +# Python files +[*.py] +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +# Custom settings for Visual Studio +[*.py] +editor.formatOnPaste = false +editor.formatOnSave = true diff --git a/src/ta-lib/.github/actions/diffs/action.yml b/src/ta-lib/.github/actions/diffs/action.yml new file mode 100644 index 000000000..54045e75b --- /dev/null +++ b/src/ta-lib/.github/actions/diffs/action.yml @@ -0,0 +1,34 @@ +name: Detect Changes +description: Defines variables indicating the parts of the code that changed +outputs: + isDoc: + description: True when changes happened to some documentation + value: "${{ steps.diff.outputs.isDoc }}" + isRust: + description: True when changes happened to the Rust code + value: "${{ steps.diff.outputs.isRust }}" + isMove: + description: True when changes happened to the Move code + value: "${{ steps.diff.outputs.isMove }}" + +runs: + using: composite + steps: + - uses: actions/checkout@v3 + - name: Detect Changes + uses: dorny/paths-filter@v2.11.1 + id: diff + with: + filters: | + isRust: + - 'crates/**' + - '.github/workflows/rust.yml' + isDoc: + - 'docs/**' + - 'mkdocs.yml' + - '*.md' + - '.github/workflows/docs.yml' + isMove: + - 'move/sources/**' + - 'Cargo.toml' + - 'Cargo.lock' diff --git a/src/ta-lib/.github/workflows/dev-nightly-tests.yml b/src/ta-lib/.github/workflows/dev-nightly-tests.yml new file mode 100644 index 000000000..114ec2106 --- /dev/null +++ b/src/ta-lib/.github/workflows/dev-nightly-tests.yml @@ -0,0 +1,114 @@ +# Periodic tests of latest dev branch +# +# This is for early detection of breaking changes. +# + +name: dev nightly tests + +# Controls when the workflow will run +on: + schedule: + - cron: "0 5 * * *" # every day 5AM + + workflow_dispatch: + +jobs: + test: + name: Test ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-2022] + + steps: + - name: Checkout dev Branch + uses: actions/checkout@v4 + with: + ref: dev + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Prepare shell envs (Linux) + if: runner.os == 'Linux' + shell: bash + run: | + echo "PYTHON=python3" >> $GITHUB_ENV + + - name: Build dist assets (Linux) + if: runner.os == 'Linux' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + sudo apt update + sudo apt install -y automake libtool autogen mcpp + sudo apt install -y openjdk-21-jdk + sudo apt install -y gcc-multilib + sudo apt install -y gcc-i686-linux-gnu + sudo apt install -y gcc-aarch64-linux-gnu + $PYTHON $GITHUB_WORKSPACE/scripts/package.py + $PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py + + - name: Prepare shell envs (Windows x64) + if: runner.os == 'Windows' + shell: cmd + run: | + :: call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt + :: set /p MSBUILD_PATH=> %GITHUB_ENV% + echo PYTHON=python >> %GITHUB_ENV% + + - name: Build dist assets (Windows x64) + if: runner.os == 'Windows' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: cmd + run: | + :: call "%VCVARSALL%" x64 + dotnet tool install --global wix + set PATH=%PATH%;%USERPROFILE%\.dotnet\tools + wix extension add --global WixToolset.UI.wixext + wix extension list --global + %PYTHON% %GITHUB_WORKSPACE%\scripts\package.py + %PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py + + - name: Check for changes and commit if any + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + dist_changes=$(git status --porcelain dist/) + ta_common_changes=$(git status --porcelain include/ta_common.h) + if [ -n "$dist_changes" ] || [ -n "$ta_common_changes" ]; then + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + echo "Changes detected by git status:" + if [ -n "$dist_changes" ]; then + echo "$dist_changes" + git add dist/ + fi + if [ -n "$ta_common_changes" ]; then + echo "$ta_common_changes" + git add include/ta_common.h + fi + + git commit -m "Update dist package (from ${{ matrix.os }})" + + # Check for unstaged changes and log them. + # (this help debugging because it should not happen) + if [ -n "$(git status --porcelain)" ]; then + echo "Unstaged changes detected:" + git status --porcelain + fi + + # Retry mechanism for handling concurrent pushes + for i in {1..5}; do + git pull --rebase --strategy-option=ours origin dev && git push origin dev && break || sleep 10 + done + else + echo "No changes detected in dist directory" + fi diff --git a/src/ta-lib/.github/workflows/docs.yml b/src/ta-lib/.github/workflows/docs.yml new file mode 100644 index 000000000..88ce88590 --- /dev/null +++ b/src/ta-lib/.github/workflows/docs.yml @@ -0,0 +1,35 @@ +name: Documentation + +on: + push: + branches: [main] + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + workflow_dispatch: + +permissions: + contents: write + +jobs: + diff: + runs-on: [ubuntu-latest] + outputs: + isDoc: ${{ steps.diff.outputs.isDoc }} + steps: + - uses: actions/checkout@v4 + - name: Detect Changes + uses: "./.github/actions/diffs" + id: diff + + deploy: + runs-on: ubuntu-latest + if: github.event.repository.fork == false + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - run: pip install mkdocs-material + - run: pip install mkdocs-git-revision-date-localized-plugin + - run: pip install mkdocs-minify-plugin + - run: mkdocs gh-deploy --force diff --git a/src/ta-lib/.github/workflows/main-nightly-tests.yml b/src/ta-lib/.github/workflows/main-nightly-tests.yml new file mode 100644 index 000000000..8d0c17c7e --- /dev/null +++ b/src/ta-lib/.github/workflows/main-nightly-tests.yml @@ -0,0 +1,92 @@ +# Periodic tests of latest main branch +# + +name: main nightly tests + +# Controls when the workflow will run +on: + schedule: + - cron: "0 7 * * *" # every day 7AM + + workflow_dispatch: + +jobs: + test: + name: Test ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-2022] + + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: main + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install Python dependencies + run: | + pip install PyGithub + + - name: Prepare shell envs (Linux) + if: runner.os == 'Linux' + shell: bash + run: | + echo "PYTHON=python3" >> $GITHUB_ENV + + - name: Build dist assets (Linux) + if: runner.os == 'Linux' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + sudo apt update + sudo apt install -y automake libtool autogen mcpp + sudo apt install -y openjdk-21-jdk + sudo apt install -y gcc-multilib + sudo apt install -y gcc-i686-linux-gnu + sudo apt install -y gcc-aarch64-linux-gnu + $PYTHON $GITHUB_WORKSPACE/scripts/package.py + $PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py + + - name: Prepare shell envs (Windows x64) + if: runner.os == 'Windows' + shell: cmd + run: | + :: call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt + :: set /p MSBUILD_PATH=> %GITHUB_ENV% + echo PYTHON=python >> %GITHUB_ENV% + + - name: Build dist assets (Windows x64) + if: runner.os == 'Windows' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: cmd + run: | + :: call "%VCVARSALL%" x64 + dotnet tool install --global wix + set PATH=%PATH%;%USERPROFILE%\.dotnet\tools + wix extension add --global WixToolset.UI.wixext + wix extension list --global + %PYTHON% %GITHUB_WORKSPACE%\scripts\package.py + %PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py + + - name: Verify dist assets are up-to-date + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + dist_changes=$(git status --porcelain dist/) + ta_common_changes=$(git status --porcelain include/ta_common.h) + if [ -n "$dist_changes" ] || [ -n "$ta_common_changes" ]; then + echo "Error: Unexpected changes in dist/ assets." + echo "The dev-nigthly-tests.yml should have updated these assets." + exit 1 + fi diff --git a/src/ta-lib/.github/workflows/release-step-1.yml b/src/ta-lib/.github/workflows/release-step-1.yml new file mode 100644 index 000000000..ee4ce33e3 --- /dev/null +++ b/src/ta-lib/.github/workflows/release-step-1.yml @@ -0,0 +1,214 @@ +# Manually triggered for creating a TA-Lib draft release. +# +# You can re-run release-step-1 to refresh with the latest +# commit and assets. +# +# Once you are satisfied with the draft release (review the notes and all expected +# assets are attached), you can trigger release-step-2.yml to make the release public. +# +# More info: README-DEVS.md + +name: Release (step 1) + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + process_draft_release: + runs-on: ubuntu-latest + + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 # Fetch all history for all tags + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Prepare shell envs + shell: bash + run: | + VERSION=$(cat VERSION) + echo "VERSION=${VERSION}" >> $GITHUB_ENV + TAG="v${VERSION}" + echo "TAG=${TAG}" >> $GITHUB_ENV + echo "PYTHON=python3" >> $GITHUB_ENV + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Pre-release checks + shell: bash + run: | + $PYTHON $GITHUB_WORKSPACE/scripts/pre-release-checks.py + + - name: Ensure tagging on latest commit + shell: bash + env: + TAG: ${{ env.TAG }} + run: | + # Ensure latest commit is tag with '$TAG' + LATEST_COMMIT=$(git rev-parse HEAD) + if git rev-parse --verify "$TAG" >/dev/null 2>&1; then + EXISTING_TAG_COMMIT=$(git rev-parse --verify "$TAG") + if [ "$LATEST_COMMIT" != "$EXISTING_TAG_COMMIT" ]; then + echo "Deleting tag $TAG on older commit $EXISTING_TAG_COMMIT" + git tag -d "$TAG" + git push --delete origin "$TAG" + else + echo "Tag $TAG already exists for latest commit. No changes needed." + exit 0 + fi + fi + echo "Creating new tag $TAG on latest commit $LATEST_COMMIT" + git tag "$TAG" + git push origin "$TAG" + + - name: Ensure a draft release exists + id: release_vars + uses: actions/github-script@v7 + env: + TAG: ${{ env.TAG }} + with: + script: | + const fs = require('fs'); + const path = require('path'); + let tag_name = process.env.TAG; + console.log(`tag_name: ${tag_name}`); + let upload_url; + let release_id; + + try { + // Check if the release already exists + const { data: releases } = await github.rest.repos.listReleases({ + owner: context.repo.owner, + repo: context.repo.repo, + }); + let release = releases.find(release => release.tag_name === tag_name); + + if (release) { + console.log(`Existing release found: ${JSON.stringify(release, null, 2)}`); + if (!release.draft) { + console.log(`Release for tag ${tag_name} is already published. Exiting with error.`); + core.setFailed(`Release for tag ${tag_name} is already published.`); + return; + } + + // Update the release to point to potentially new commit (noop when no change) + release_id = release.id; + release = await github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release_id, + tag_name: tag_name, + target_commitish: context.sha, + }); + + console.log(`updateRelease result: ${JSON.stringify(release, null, 2)}`); + + // Retrieve the latest draft release object to get the upload_url + const { data: updatedRelease } = await github.rest.repos.getRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release_id, + }); + + console.log(`getRelease result: ${JSON.stringify(updatedRelease, null, 2)}`); + + upload_url = updatedRelease.upload_url; + } else { + // Read release notes from file + const release_notes_path = path.join(process.env.GITHUB_WORKSPACE, 'temp', 'DRAFT_RELEASE_NOTES.md'); + const release_notes = fs.readFileSync(release_notes_path, 'utf8'); + + // Release does not exists, so create it. + const response = await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: tag_name, + name: tag_name, + body: release_notes, + draft: true, + prerelease: false, + }); + if (response.status >= 200 && response.status < 300 && response.data.upload_url) { + console.log(`updateRelease result: ${JSON.stringify(response, null, 2)}`); + upload_url = response.data.upload_url; + release_id = response.data.id; + console.log(`Draft release created with tag [${tag_name}]`); + } else { + core.setFailed(`Failed to create release with tag [${tag_name}] Status: ${response.status}`); + return; + } + } + } catch (error) { + core.setFailed(`Error while creating draft release: ${error.message}`); + return; + } + + console.log(`upload_url: ${upload_url}`); + console.log(`release_id: ${release_id}`); + core.setOutput("upload_url", upload_url); + core.setOutput("release_id", release_id); + + - name: Attach/Update assets with latest in dist/ + uses: actions/github-script@v7 + env: + UPLOAD_URL: ${{ steps.release_vars.outputs.upload_url }} + RELEASE_ID: ${{ steps.release_vars.outputs.release_id }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + script: | + const fs = require('fs'); + const path = require('path'); + const upload_url = process.env.UPLOAD_URL; + const release_id = process.env.RELEASE_ID; + const dist_dir = path.join(process.env.GITHUB_WORKSPACE, 'dist'); + + console.log(`upload_url: ${upload_url}`); + console.log(`release_id: ${release_id}`); + + const files = fs.readdirSync(dist_dir); + for (const file of files) { + const filePath = path.join(dist_dir, file); + const fileStat = fs.statSync(filePath); + + try { + // Check if the asset already exists and replace it if it does. + const { data: assets } = await github.rest.repos.listReleaseAssets({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release_id, + }); + + const existingAsset = assets.find(asset => asset.name === file); + if (existingAsset) { + await github.rest.repos.deleteReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + asset_id: existingAsset.id, + }); + } + + // Upload the new asset + console.log(`Uploading asset: ${filePath}`); + + await github.rest.repos.uploadReleaseAsset({ + url: upload_url, + headers: { + 'content-type': 'application/octet-stream', + 'content-length': fileStat.size, + }, + name: file, + data: fs.createReadStream(filePath), + }); + + console.log(`Uploaded asset: ${file}`); + } catch (error) { + console.error(`Error processing file ${file}: ${error.message}`); + } + } diff --git a/src/ta-lib/.github/workflows/release-step-2.yml b/src/ta-lib/.github/workflows/release-step-2.yml new file mode 100644 index 000000000..8087ced06 --- /dev/null +++ b/src/ta-lib/.github/workflows/release-step-2.yml @@ -0,0 +1,87 @@ +# Upgrade a draft release to an official public release. +# +# More info: README-DEVS.md + +name: Release (step 2) + +# Controls when the workflow will run +on: + workflow_dispatch: + +jobs: + upgrade_draft_to_official: + runs-on: ubuntu-latest + + steps: + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 # Fetch all history for all tags + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install Python dependencies + run: | + pip install PyGithub + + - name: Prepare shell envs + shell: bash + run: | + VERSION=$(cat VERSION) + echo "VERSION=${VERSION}" >> $GITHUB_ENV + TAG="v${VERSION}" + echo "TAG=${TAG}" >> $GITHUB_ENV + echo "PYTHON=python3" >> $GITHUB_ENV + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Pre-release checks + shell: bash + run: | + $PYTHON $GITHUB_WORKSPACE/scripts/pre-release-checks.py + + - name: Upgrade draft release to public release + id: release_vars + uses: actions/github-script@v7 + env: + TAG: ${{ env.TAG }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + script: | + const tag_name = process.env.TAG; + console.log(`tag_name: ${tag_name}`); + + try { + // Check if the draft release exists + const { data: releases } = await github.rest.repos.listReleases({ + owner: context.repo.owner, + repo: context.repo.repo, + }); + const release = releases.find(release => release.tag_name === tag_name); + + if (!release) { + core.setFailed(`No draft release found for tag ${tag_name}. Please run "Release (step 1)" first.`); + return; + } + + if (!release.draft) { + core.setFailed(`Release for tag ${tag_name} is already officially published.`); + return; + } + + // Publish the draft release + await github.rest.repos.updateRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release.id, + draft: false, + }); + + console.log(`Published release for tag ${tag_name} completed`); + } catch (error) { + core.setFailed(`Error while publishing release: ${error.message}`); + } diff --git a/src/ta-lib/.gitignore b/src/ta-lib/.gitignore new file mode 100644 index 000000000..f8380a809 --- /dev/null +++ b/src/ta-lib/.gitignore @@ -0,0 +1,89 @@ +*.o +*.lo +*.la +*.pc +*.m4 +Makefile +Makefile.in +.deps +.libs +.dirstamp +config.* +ta-lib.dpkg +ta-lib.spec +missing +ltmain.sh +libtool +install-sh +include/ta_config.* +include/stamp-h1 +depcomp +configure +compile +autom4te.cache +ar-lib +**/.history/ + +# TA-Lib tools (must be built by devs on its own platform) +src/tools/gen_code/gen_code +src/tools/ta_regtest/ta_regtest +bin/*.class +bin/gen_code* +bin/ta_* +!bin/HOLDER + +## TA-Lib misc. build and packaging artifacts +msbuild_path.txt +lib/ta_* +lib/ta-* +build/ta-lib-*.tar.gz +LICENSE.rtf + +## File system +.DS_Store +desktop.ini + +## User stuff... +node_modules +__pycache__ +venv +.venv +.env + +# Build files (from mkdocs) +/site +/build +/MANIFEST + +## Temporary files +*~ +\#* +\#*\# +.# +TODO +tmp +temp/ + +## Editors +*.swp +*.swo +Session.vim +.cproject +.idea +*.iml +.project +.favorites.json +.settings/ +.vscode/ltex.disabledRules.en-US.txt +.vscode/ltex.dictionary.en-US.txt + +# Visual Studio +.vs/ +out/ +*.vcxproj.user + +## MSVC Windows builds (debug info) +*.pdb + +# Never ignore .gitkeep files +!**/.gitkeep \ No newline at end of file diff --git a/src/ta-lib/.vscode/settings.json b/src/ta-lib/.vscode/settings.json new file mode 100644 index 000000000..1e845f0d0 --- /dev/null +++ b/src/ta-lib/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "files.associations": { + "stdlib.h": "c", + "random": "c", + "cstdlib": "c", + "string.h": "c", + "ta_memory.h": "c" + } +} diff --git a/src/ta-lib/Makefile.am b/src/ta-lib/Makefile.am new file mode 100644 index 000000000..2016e6381 --- /dev/null +++ b/src/ta-lib/Makefile.am @@ -0,0 +1,19 @@ +ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = foreign 1.4 +SUBDIRS = src src/tools + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = ta-lib.pc + +# Distribute all .h files in the src directory and its subdirectories +HEADER_FILES = $(shell find src -name '*.h') + +# Distribute some C files containing static data used for ta_regtest +GDATA_FILES = $(shell find . -name 'ta_gData*.c') + +# Distribute additional bash scripts needed to "make all" +BUILD_SHELL_FILES = src/tools/post-build-bin.sh + +# Add more files to EXTRA_DIST to be included on "make dist" +# This is only for files that are not auto-discovered by autotools. +EXTRA_DIST = $(HEADER_FILES) $(GDATA_FILES) $(BUILD_SHELL_FILES) VERSION diff --git a/src/ta-lib/README.md b/src/ta-lib/README.md new file mode 100644 index 000000000..45db60eac --- /dev/null +++ b/src/ta-lib/README.md @@ -0,0 +1,11 @@ +[![Discord chat](https://img.shields.io/discord/1038616996062953554.svg?logo=discord&style=flat-square)](https://discord.gg/Erb6SwsVbH) + +[![main nightly tests](https://github.com/TA-Lib/ta-lib/actions/workflows/main-nightly-tests.yml/badge.svg)](https://github.com/TA-Lib/ta-lib/actions/workflows/main-nightly-tests.yml) [![dev nightly tests](https://github.com/TA-Lib/ta-lib/actions/workflows/dev-nightly-tests.yml/badge.svg)](https://github.com/TA-Lib/ta-lib/actions/workflows/dev-nightly-tests.yml) + +# TA-Lib - Technical Analysis Library +This is now the official home for C/C++ TA-Lib (instead of SourceForge). + +More info [https://ta-lib.org](https://ta-lib.org) + +# You want a new TA Function implemented? +First step is to document the algorithm, with a sample of input/output in the [ta-lib-proposal-drafts]( https://github.com/TA-Lib/ta-lib-proposal-drafts ) repos. diff --git a/src/ta-lib/VERSION b/src/ta-lib/VERSION new file mode 100644 index 000000000..d2b13eb64 --- /dev/null +++ b/src/ta-lib/VERSION @@ -0,0 +1 @@ +0.6.4 diff --git a/src/ta-lib/configure.ac b/src/ta-lib/configure.ac new file mode 100644 index 000000000..e53c2f797 --- /dev/null +++ b/src/ta-lib/configure.ac @@ -0,0 +1,51 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.71]) +AC_COPYRIGHT([(c) Mario Fortier 1999-2024]) +AC_INIT([ta-lib], m4_esyscmd([cat VERSION | tr -d '\n']), [https://github.com/TA-Lib/ta-lib/issues], [ta-lib], [https://github.com/TA-Lib/ta-lib]) +AC_CONFIG_MACRO_DIRS([m4]) +AC_CONFIG_SRCDIR([src/ta_func/ta_AD.c]) +AC_CONFIG_HEADERS([include/ta_config.h]) +AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror]) + +# Checks for programs. +AM_PROG_AR +AC_PROG_CC +LT_INIT + +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. +AC_CHECK_INCLUDES_DEFAULT +AC_PROG_EGREP + +AC_CHECK_HEADERS([float.h inttypes.h limits.h locale.h stddef.h stdint.h stdlib.h string.h unistd.h wchar.h wctype.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_STRUCT_TM +AC_C_VOLATILE +AC_CHECK_TYPES([ptrdiff_t]) + +# Checks for library functions. +AC_FUNC_STRCOLL +AC_FUNC_STRFTIME +AC_FUNC_STRTOD +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([floor isascii localeconv mblen memmove memset modf pow sqrt strcasecmp strchr strerror strncasecmp strrchr strstr strtol strtoul]) + +# Checks for libm +LT_LIB_M +AC_SUBST([LIBM]) + +# Versioning: +# Only change this if library is no longer +# ABI compatible with previous version +# (e.g. function declaration changed) +TALIB_LIBRARY_VERSION=0:0:0 + +AC_SUBST(TALIB_LIBRARY_VERSION) + +AC_CONFIG_FILES([Makefile src/Makefile src/ta_abstract/Makefile src/ta_common/Makefile src/ta_func/Makefile src/tools/Makefile src/tools/gen_code/Makefile src/tools/ta_regtest/Makefile ta-lib.pc ta-lib.spec ta-lib.dpkg]) +AC_OUTPUT diff --git a/src/ta-lib/include/ta_abstract.h b/src/ta-lib/include/ta_abstract.h new file mode 100644 index 000000000..c6ceac3a3 --- /dev/null +++ b/src/ta-lib/include/ta_abstract.h @@ -0,0 +1,553 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TA_ABSTRACT_H +#define TA_ABSTRACT_H + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* This file defines the interface for calling all the TA functions without + * knowing at priori the parameters. + * + * This capability is particularly useful for an application who needs + * to support the complete list of TA functions without having to + * re-write new code each time a new function is added to TA-Lib. + * + * Example 1: + * Lets say you are doing a charting software. When the user select + * a price bar, a side list offers blindly all the TA functions + * that could be applied to a price bar. The user selects one of + * these, then a dialog open for allowing to adjust some parameter + * (TA-LIB will tell your software which parameter are needed and the + * valid range for each). Once all the parameter are set, you can + * call blindly the corresponding TA function. The returned + * information can then also blindly be drawn on the chart (some + * output flags allows to get some hint about how the data shall be + * displayed). + * The same "abstract" logic apply to all the TA functions. + * Some TA Functions works only on volume, or can work indiferently + * with any time serie data (the open, close, another indicator...). + * All the applicable functions to the currently selected/available + * data can be determined through this "virtual" interface. + * + * Example 2: + * Let's say you do not like the direct interface for + * calling the TA Functions, you can write a code that + * re-generate a different interface. This is already + * done even for the 'C' interface (ta_func.h is generated). + * + * Example 3: + * With the abstract interface you can easily generate + * glue code. Like generating an interface that integrates + * well within Perl... see the project SWIG if you are + * interested by such things. + * + * The abstract interface is used within TA-Lib to perform at least + * the following: + * - used by gen_code to generate all the glue code. + * - used to generate a XML representation of the TA functions. + */ + +/* The following functions are used to obtain the name of all the + * TA function groups ("Market Strength", "Trend Indicator" etc...). + * + * On success, it becomes the responsibility of the caller to + * call TA_GroupTableFree once the 'table' is no longuer needed. + * + * Example: + * This code snippet will print out the name of all the supported + * function group available: + * + * TA_StringTable *table; + * TA_RetCode retCode; + * int i; + * + * retCode = TA_GroupTableAlloc( &table ); + * + * if( retCode == TA_SUCCESS ) + * { + * for( i=0; i < table->size; i++ ) + * printf( "%s\n", table->string[i] ); + * + * TA_GroupTableFree( table ); + * } + */ +TA_LIB_API TA_RetCode TA_GroupTableAlloc( TA_StringTable **table ); +TA_LIB_API TA_RetCode TA_GroupTableFree ( TA_StringTable *table ); + +/* The following functions are used to obtain the name of all the + * function provided in a certain group. + * + * On success, it becomes the responsibility of the caller to + * call TA_FuncTableFree once the 'table' is no longuer needed. + * + * Example: + * This code snippet will print out the name of all the supported + * function in the "market strength" category: + * + * TA_StringTable *table; + * TA_RetCode retCode; + * int i; + * + * retCode = TA_FuncTableAlloc( "Market Strength", &table ); + * + * if( retCode == TA_SUCCESS ) + * { + * for( i=0; i < table->size; i++ ) + * printf( "%s\n", table->string[i] ); + * + * TA_FuncTableFree( table ); + * } + */ +TA_LIB_API TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table ); +TA_LIB_API TA_RetCode TA_FuncTableFree ( TA_StringTable *table ); + +/* Using the name, you can obtain an handle unique to this function. + * This handle is further used for obtaining information on the + * parameters needed and also for potentially calling this TA function. + * + * For convenience, this handle can also be found in + * the TA_FuncInfo structure (see below). + */ +typedef unsigned int TA_FuncHandle; +TA_LIB_API TA_RetCode TA_GetFuncHandle( const char *name, + const TA_FuncHandle **handle ); + +/* Get some basic information about a function. + * + * A const pointer will be set on the corresponding TA_FuncInfo structure. + * The whole structure are hard coded constants and it can be assumed they + * will not change at runtime. + * + * Example: + * Print the number of inputs used by the MA (moving average) function. + * + * TA_RetCode retCode; + * const TA_FuncHandle *handle; + * const TA_FuncInfo *theInfo; + * + * retCode = TA_GetFuncHandle( "MA", &handle ); + * + * if( retCode == TA_SUCCESS ) + * { + * retCode = TA_GetFuncInfo( handle, &theInfo ); + * if( retCode == TA_SUCCESS ) + * printf( "Nb Input = %d\n", theInfo->nbInput ); + * } + * + */ +typedef int TA_FuncFlags; +#define TA_FUNC_FLG_OVERLAP 0x01000000 /* Output scale same as input data. */ +#define TA_FUNC_FLG_VOLUME 0x04000000 /* Output shall be over the volume data. */ +#define TA_FUNC_FLG_UNST_PER 0x08000000 /* Indicate if this function have an unstable + * initial period. Some additional code exist + * for these functions for allowing to set that + * unstable period. See Documentation. + */ +#define TA_FUNC_FLG_CANDLESTICK 0x10000000 /* Output shall be a candlestick */ + +typedef struct TA_FuncInfo +{ + /* Constant information about the function. The + * information found in this structure is guarantee + * to not change at runtime. + */ + const char * name; + const char * group; + + const char * hint; + const char * camelCaseName; + TA_FuncFlags flags; + + unsigned int nbInput; + unsigned int nbOptInput; + unsigned int nbOutput; + + const TA_FuncHandle *handle; +} TA_FuncInfo; + +TA_LIB_API TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle, + const TA_FuncInfo **funcInfo ); + + +/* An alternate way to access all the functions is through the + * use of the TA_ForEachFunc(). You can setup a function to be + * call back for each TA function in the TA-Lib. + * + * Example: + * This code will print the group and name of all available functions. + * + * void printFuncInfo( const TA_FuncInfo *funcInfo, void *opaqueData ) + * { + * printf( "Group=%s Name=%s\n", funcInfo->group, funcInfo->name ); + * } + * + * void displayListOfTAFunctions( void ) + * { + * TA_ForEachFunc( printFuncInfo, NULL ); + * } + */ +typedef void (*TA_CallForEachFunc)(const TA_FuncInfo *funcInfo, void *opaqueData ); + +TA_LIB_API TA_RetCode TA_ForEachFunc( TA_CallForEachFunc functionToCall, void *opaqueData ); + +/* The next section includes the data structures and function allowing to + * proceed with the call of a Tech. Analysis function. + * + * At first, it may seems a little bit complicated, but it is worth to take the + * effort to learn about it. Once you succeed to interface with TA-Abstract you get + * access to the complete library of TA functions at once without further effort. + */ + +/* Structures representing extended information on a parameter. */ + +typedef struct TA_RealRange +{ + TA_Real min; + TA_Real max; + TA_Integer precision; /* nb of digit after the '.' */ + + /* The following suggested value are used by Tech. Analysis software + * doing parameter "optimization". Can be ignored by most user. + */ + TA_Real suggested_start; + TA_Real suggested_end; + TA_Real suggested_increment; +} TA_RealRange; + +typedef struct TA_IntegerRange +{ + TA_Integer min; + TA_Integer max; + + /* The following suggested value are used by Tech. Analysis software + * doing parameter "optimization". Can be ignored by most user. + */ + TA_Integer suggested_start; + TA_Integer suggested_end; + TA_Integer suggested_increment; +} TA_IntegerRange; + +typedef struct TA_RealDataPair +{ + /* A TA_Real value and the corresponding string. */ + TA_Real value; + const char *string; +} TA_RealDataPair; + +typedef struct TA_IntegerDataPair +{ + /* A TA_Integer value and the corresponding string. */ + TA_Integer value; + const char *string; +} TA_IntegerDataPair; + +typedef struct TA_RealList +{ + const TA_RealDataPair *data; + unsigned int nbElement; +} TA_RealList; + +typedef struct TA_IntegerList +{ + const TA_IntegerDataPair *data; + unsigned int nbElement; +} TA_IntegerList; + +typedef enum +{ + TA_Input_Price, + TA_Input_Real, + TA_Input_Integer +} TA_InputParameterType; + +typedef enum +{ + TA_OptInput_RealRange, + TA_OptInput_RealList, + TA_OptInput_IntegerRange, + TA_OptInput_IntegerList +} TA_OptInputParameterType; + +typedef enum +{ + TA_Output_Real, + TA_Output_Integer +} TA_OutputParameterType; + +/* When the input is a TA_Input_Price, the following + * TA_InputFlags indicates the required components. + * These can be combined for functions requiring more + * than one component. + * + * Example: + * (TA_IN_PRICE_OPEN|TA_IN_PRICE_HIGH) + * Indicates that the functions requires two inputs + * that must be specifically the open and the high. + */ +typedef int TA_InputFlags; +#define TA_IN_PRICE_OPEN 0x00000001 +#define TA_IN_PRICE_HIGH 0x00000002 +#define TA_IN_PRICE_LOW 0x00000004 +#define TA_IN_PRICE_CLOSE 0x00000008 +#define TA_IN_PRICE_VOLUME 0x00000010 +#define TA_IN_PRICE_OPENINTEREST 0x00000020 +#define TA_IN_PRICE_TIMESTAMP 0x00000040 + +/* The following are flags for optional inputs. + * + * TA_OPTIN_IS_PERCENT: Input is a percentage. + * + * TA_OPTIN_IS_DEGREE: Input is a degree (0-360). + * + * TA_OPTIN_IS_CURRENCY: Input is a currency. + * + * TA_OPTIN_ADVANCED: + * Used for parameters who are rarely changed. + * Most application can hide these advanced optional inputs to their + * end-user (or make it harder to change). + */ +typedef int TA_OptInputFlags; +#define TA_OPTIN_IS_PERCENT 0x00100000 /* Input is a percentage. */ +#define TA_OPTIN_IS_DEGREE 0x00200000 /* Input is a degree (0-360). */ +#define TA_OPTIN_IS_CURRENCY 0x00400000 /* Input is a currency. */ +#define TA_OPTIN_ADVANCED 0x01000000 + + +/* The following are flags giving hint on what + * could be done with the output. + */ +typedef int TA_OutputFlags; +#define TA_OUT_LINE 0x00000001 /* Suggest to display as a connected line. */ +#define TA_OUT_DOT_LINE 0x00000002 /* Suggest to display as a 'dotted' line. */ +#define TA_OUT_DASH_LINE 0x00000004 /* Suggest to display as a 'dashed' line. */ +#define TA_OUT_DOT 0x00000008 /* Suggest to display with dots only. */ +#define TA_OUT_HISTO 0x00000010 /* Suggest to display as an histogram. */ +#define TA_OUT_PATTERN_BOOL 0x00000020 /* Indicates if pattern exists (!=0) or not (0) */ +#define TA_OUT_PATTERN_BULL_BEAR 0x00000040 /* =0 no pattern, > 0 bullish, < 0 bearish */ +#define TA_OUT_PATTERN_STRENGTH 0x00000080 /* =0 neutral, ]0..100] getting bullish, ]100..200] bullish, [-100..0[ getting bearish, [-200..100[ bearish */ +#define TA_OUT_POSITIVE 0x00000100 /* Output can be positive */ +#define TA_OUT_NEGATIVE 0x00000200 /* Output can be negative */ +#define TA_OUT_ZERO 0x00000400 /* Output can be zero */ +#define TA_OUT_UPPER_LIMIT 0x00000800 /* Indicates that the values represent an upper limit. */ +#define TA_OUT_LOWER_LIMIT 0x00001000 /* Indicates that the values represent a lower limit. */ + + +/* The following 3 structures will exist for each input, optional + * input and output. + * + * These structures tells you everything you need to know for identifying + * the parameters applicable to the function. + */ +typedef struct TA_InputParameterInfo +{ + TA_InputParameterType type; + const char *paramName; + TA_InputFlags flags; + +} TA_InputParameterInfo; + +typedef struct TA_OptInputParameterInfo +{ + TA_OptInputParameterType type; + const char *paramName; + TA_OptInputFlags flags; + + const char *displayName; + const void *dataSet; + TA_Real defaultValue; + const char *hint; + const char *helpFile; + +} TA_OptInputParameterInfo; + +typedef struct TA_OutputParameterInfo +{ + TA_OutputParameterType type; + const char *paramName; + TA_OutputFlags flags; + +} TA_OutputParameterInfo; + +/* Functions to get a const ptr on the "TA_XXXXXXParameterInfo". + * Max value for the 'paramIndex' can be found in the TA_FuncInfo structure. + * The 'handle' can be obtained from TA_GetFuncHandle or from a TA_FuncInfo. + * + * Short example: + * + * void displayInputType( const TA_FuncInfo *funcInfo ) + * { + * unsigned int i; + * const TA_InputParameterInfo *paramInfo; + * + * for( i=0; i < funcInfo->nbInput; i++ ) + * { + * TA_GetInputParameterInfo( funcInfo->handle, i, ¶mInfo ); + * switch( paramInfo->type ) + * { + * case TA_Input_Price: + * printf( "This function needs price bars as input\n" ); + * break; + * case TA_Input_Real: + * printf( "This function needs an array of floats as input\n" ); + * break; + * (... etc. ...) + * } + * } + * } + */ +TA_LIB_API TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_InputParameterInfo **info ); + +TA_LIB_API TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_OptInputParameterInfo **info ); + +TA_LIB_API TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_OutputParameterInfo **info ); + +/* Alloc a structure allowing to build the list of parameters + * for doing a call. + * + * All input and output parameters must be setup. If not, TA_BAD_PARAM + * will be returned when TA_CallFunc is called. + * + * The optional input are not required to be setup. A default value + * will always be used in that case. + * + * If there is an attempts to set a parameter with the wrong function + * (and thus the wrong type), TA_BAD_PARAM will be immediatly returned. + * + * Although this mechanism looks complicated, it is written for being fairly solid. + * If you provide a wrong parameter value, or wrong type, or wrong pointer etc. the + * library shall return TA_BAD_PARAM or TA_BAD_OBJECT and not hang. + */ +typedef struct TA_ParamHolder +{ + /* Implementation is hidden. */ + void *hiddenData; +} TA_ParamHolder; + +TA_LIB_API TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle, + TA_ParamHolder **allocatedParams ); + +TA_LIB_API TA_RetCode TA_ParamHolderFree( TA_ParamHolder *params ); + +/* Setup the values of the data input parameters. + * + * paramIndex is zero for the first input. + */ +TA_LIB_API TA_RetCode TA_SetInputParamIntegerPtr( TA_ParamHolder *params, + unsigned int paramIndex, + const TA_Integer *value ); + +TA_LIB_API TA_RetCode TA_SetInputParamRealPtr( TA_ParamHolder *params, + unsigned int paramIndex, + const TA_Real *value ); + +TA_LIB_API TA_RetCode TA_SetInputParamPricePtr( TA_ParamHolder *params, + unsigned int paramIndex, + const TA_Real *open, + const TA_Real *high, + const TA_Real *low, + const TA_Real *close, + const TA_Real *volume, + const TA_Real *openInterest ); + +/* Setup the values of the optional input parameters. + * If an optional input is not set, a default value will be used. + * + * paramIndex is zero for the first optional input. + */ +TA_LIB_API TA_RetCode TA_SetOptInputParamInteger( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Integer optInValue ); + +TA_LIB_API TA_RetCode TA_SetOptInputParamReal( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Real optInValue ); + +/* Setup the parameters indicating where to store the output. + * + * The caller is responsible to allocate sufficient memory. A safe bet is to + * always do: nb of output elements == (endIdx-startIdx+1) + * + * paramIndex is zero for the first output. + * + */ +TA_LIB_API TA_RetCode TA_SetOutputParamIntegerPtr( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Integer *out ); + +TA_LIB_API TA_RetCode TA_SetOutputParamRealPtr( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Real *out ); + +/* Once the optional parameter are set, it is possible to + * get the lookback for this call. This information can be + * used to calculate the optimal size for the output buffers. + * (See the documentation for method to calculate the output size). + */ +TA_LIB_API TA_RetCode TA_GetLookback( const TA_ParamHolder *params, + TA_Integer *lookback ); + +/* Finally, call the TA function with the parameters. + * + * The TA function who is going to be called was specified + * when the TA_ParamHolderAlloc was done. + */ +TA_LIB_API TA_RetCode TA_CallFunc( const TA_ParamHolder *params, + TA_Integer startIdx, + TA_Integer endIdx, + TA_Integer *outBegIdx, + TA_Integer *outNbElement ); + + +/* Return XML representation of all the TA functions. + * The returned array is the same as the ta_func_api.xml file. + */ +TA_LIB_API const char *TA_FunctionDescriptionXML( void ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/ta-lib/include/ta_common.h b/src/ta-lib/include/ta_common.h new file mode 100644 index 000000000..2679a5bd9 --- /dev/null +++ b/src/ta-lib/include/ta_common.h @@ -0,0 +1,160 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_COMMON_H +#define TA_COMMON_H + +/* The following macros are used to return internal errors. + * The Id can be from 1 to 999 and translate to the user + * as the return code 5000 to 5999. + * + * Everytime you wish to add a new fatal error code, + * use the "NEXT AVAILABLE NUMBER" and increment the + * number in this file. + * + * NEXT AVAILABLE NUMBER: 181 + */ +#define TA_INTERNAL_ERROR(Id) ((TA_RetCode)(TA_INTERNAL_ERROR+Id)) + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#ifndef TA_DEFS_H + #include "ta_defs.h" +#endif + +/* Some functions to get the version of TA-Lib. + * + * Format is "Major.Minor.Patch (Month Day Year Hour:Min:Sec)" + * + * Example: "1.2.0 (Jan 17 2004 23:59:59)" + * + * Major increments indicates an "Highly Recommended" update. + * + * Minor increments indicates arbitrary milestones in the + * development of the next major version. + * + * Patch are fixes to a "Major.Minor" release. + */ +TA_LIB_API const char *TA_GetVersionString( void ); + +/* Get individual component of the Version string */ +TA_LIB_API const char *TA_GetVersionMajor ( void ); +TA_LIB_API const char *TA_GetVersionMinor ( void ); +TA_LIB_API const char *TA_GetVersionPatch ( void ); +TA_LIB_API const char *TA_GetVersionDate ( void ); +TA_LIB_API const char *TA_GetVersionTime ( void ); + +/* Deprecated */ +TA_LIB_API const char *TA_GetVersionBuild ( void ); +TA_LIB_API const char *TA_GetVersionExtra ( void ); + +/* Misc. declaration used throughout the library code. */ +typedef double TA_Real; +typedef int TA_Integer; + +/* General purpose structure containing an array of string. + * + * Example of usage: + * void printStringTable( TA_StringTable *table ) + * { + * int i; + * for( i=0; i < table->size; i++ ) + * cout << table->string[i] << endl; + * } + * + */ +typedef struct TA_StringTable +{ + unsigned int size; /* Number of string. */ + const char **string; /* Pointer to the strings. */ + + /* Hidden data for internal use by TA-Lib. Do not modify. */ + void *hiddenData; +} TA_StringTable; +/* End-user can get additional information related to a TA_RetCode. + * + * Example: + * TA_RetCodeInfo info; + * + * retCode = TA_Initialize( ... ); + * + * if( retCode != TA_SUCCESS ) + * { + * TA_SetRetCodeInfo( retCode, &info ); + * printf( "Error %d(%s): %s\n", + * retCode, + * info.enumStr, + * info.infoStr ); + * } + * + * Would display: + * "Error 1(TA_LIB_NOT_INITIALIZE): TA_Initialize was not sucessfully called" + */ +typedef struct TA_RetCodeInfo +{ + const char *enumStr; /* Like "TA_LIB_NOT_INITIALIZE" */ + const char *infoStr; /* Like "TA_Initialize was not successfully called" */ +} TA_RetCodeInfo; + +/* Info is always returned, even when 'theRetCode' is invalid. */ +TA_LIB_API void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo ); + +/* TA_Initialize() initialize the ressources used by TA-Lib. This + * function must be called once prior to any other functions declared in + * this file. + * + * TA_Shutdown() allows to free all ressources used by TA-Lib. Following + * a shutdown, TA_Initialize() must be called again for re-using TA-Lib. + * + * TA_Shutdown() should be called prior to exiting the application code. + */ +TA_LIB_API TA_RetCode TA_Initialize( void ); +TA_LIB_API TA_RetCode TA_Shutdown( void ); + +/* TA_LIB_SOURCES_DIGEST helps for TA-Lib automated maintenance. + * + * This value is updated whenever a make, cmake or any source files + * modification should trig a repackaging of TA-Lib. + */ +#define TA_LIB_SOURCES_DIGEST f56bc6c0c0d72f1ee648897220e3ec3f + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/ta-lib/include/ta_defs.h b/src/ta-lib/include/ta_defs.h new file mode 100644 index 000000000..bae153c96 --- /dev/null +++ b/src/ta-lib/include/ta_defs.h @@ -0,0 +1,328 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_DEFS_H +#define TA_DEFS_H + +/*** The following block of code is to define: + *** + *** UInt32 : 32 bits unsigned integer. + *** Int32 : 32 bits signed integer. + *** UInt64 : 64 bits unsigned integer. + *** Int64 : 64 bits signed integer. + *** + *** INT_MIN : The minimal value for Int32 + *** INT_MAX : The maximal value for Int32 + ***/ +#ifndef FD_DEFS_H + #if defined( _MANAGED ) + /* Int32, UInt32, Int64 and UInt64 are built-in for .NET */ + #define INT_MIN (Int32::MinValue) + #define INT_MAX (Int32::MaxValue) + #elif defined( _JAVA ) || defined( _RUST ) + #define INT_MIN Integer.MIN_VALUE + #define INT_MAX Integer.MAX_VALUE + #else + #include + + /* Identify if 64 bits platform with __64BIT__. + * Can also be done from compiler command line. + */ + #if defined(_WIN64) + #define __64BIT__ 1 + #endif + + #if defined( __LP64__ ) || defined( _LP64 ) + #define __64BIT__ 1 + #endif + + /* Check also for some known GCC def for 64 bits platform. */ + #if defined(__alpha__)\ + ||defined(__ia64__)\ + ||defined(__ppc64__)\ + ||defined(__s390x__)\ + ||defined(__x86_64__) + #define __64BIT__ 1 + #endif + + #if !defined(__MACTYPES__) + typedef signed int Int32; + typedef unsigned int UInt32; + + #if defined(_WIN32) || defined(_WIN64) + /* See "Windows Data Types". Platform SDK. MSDN documentation. */ + typedef signed __int64 Int64; + typedef unsigned __int64 UInt64; + #else + #if defined(__64BIT__) + /* Standard LP64 model for 64 bits Unix platform. */ + typedef signed long Int64; + typedef unsigned long UInt64; + #else + /* Standard ILP32 model for 32 bits Unix platform. */ + typedef signed long long Int64; + typedef unsigned long long UInt64; + #endif + #endif + #endif + #endif +#endif + +/* Enumeration and macros to abstract syntax differences + * between C, C++, managed C++ and Java. + */ +#if defined( _MANAGED ) + + /* Enumeration abstraction */ + #define ENUM_BEGIN(w) enum class w { + #define ENUM_DEFINE(x,y) y + #define ENUM_VALUE(w,x,y) (w::y) + #define ENUM_CASE(w,x,y) (w::y) + #define ENUM_DECLARATION(w) w + #define ENUM_END(w) }; + + /* Structure abstraction */ + #define STRUCT_BEGIN(x) struct x { + #define STRUCT_END(x) }; + + /* Pointer/reference abstraction */ + #define VALUE_HANDLE_INT(name) int name + #define VALUE_HANDLE_DEREF(name) name + #define VALUE_HANDLE_DEREF_TO_ZERO(name) name = 0 + #define VALUE_HANDLE_OUT(name) name + + #define VALUE_HANDLE_GET(name) name + #define VALUE_HANDLE_SET(name,x) name = x + + /* Misc. */ + #define CONSTANT_DOUBLE(x) const double x + #define NAMESPACE(x) x:: + #define UNUSED_VARIABLE(x) (void)x + + #define TA_LIB_API + +#elif defined( _JAVA ) || defined( _RUST ) + + #define ENUM_BEGIN(w) public enum w { + #define ENUM_DEFINE(x,y) y + #define ENUM_VALUE(w,x,y) w.y + #define ENUM_CASE(w,x,y) y + #define ENUM_DECLARATION(w) w + #define ENUM_END(w) }; + + #define STRUCT_BEGIN(x) public class x { + #define STRUCT_END(x) }; + + #define VALUE_HANDLE_INT(name) MInteger name = new MInteger() + #define VALUE_HANDLE_DEREF(name) name.value + #define VALUE_HANDLE_DEREF_TO_ZERO(name) name.value = 0 + #define VALUE_HANDLE_OUT(name) name + + #define VALUE_HANDLE_GET(name) name.value + #define VALUE_HANDLE_SET(name,x) name.value = x + + #define CONSTANT_DOUBLE(x) final double x + #define NAMESPACE(x) x. + #define UNUSED_VARIABLE(x) + + #define TA_LIB_API + +#else + + #define ENUM_BEGIN(w) typedef enum { + #define ENUM_DEFINE(x,y) x + #define ENUM_VALUE(w,x,y) x + #define ENUM_CASE(w,x,y) x + #define ENUM_DECLARATION(w) TA_##w + #define ENUM_END(w) } TA_##w; + + #define STRUCT_BEGIN(x) typedef struct { + #define STRUCT_END(x) } x; + + #define VALUE_HANDLE_INT(name) int name + #define VALUE_HANDLE_DEREF(name) (*name) + #define VALUE_HANDLE_DEREF_TO_ZERO(name) (*name) = 0 + #define VALUE_HANDLE_OUT(name) &name + + #define VALUE_HANDLE_GET(name) name + #define VALUE_HANDLE_SET(name,x) name = x + + #define CONSTANT_DOUBLE(x) const double x + #define NAMESPACE(x) + #define UNUSED_VARIABLE(x) (void)x + + #ifdef _WIN32 + #ifdef TA_LIB_SHARED + #define TA_LIB_API __declspec(dllexport) + #else + #define TA_LIB_API + #endif + #elif defined(__GNUC__) && __GNUC__ >= 4 + #define TA_LIB_API __attribute__ ((visibility("default"))) + #else + #define TA_LIB_API + #endif +#endif + +/* Abstraction of function calls within the library. + * Needed because Java/.NET allows overloading, while for C the + * TA_PREFIX allows to select variant of the same function. + */ +#define FUNCTION_CALL(x) TA_PREFIX(x) +#define FUNCTION_CALL_DOUBLE(x) TA_##x +#define LOOKBACK_CALL(x) TA_##x##_Lookback + +/* min/max value for a TA_Integer */ +#define TA_INTEGER_MIN (INT_MIN+1) +#define TA_INTEGER_MAX (INT_MAX) + +/* min/max value for a TA_Real + * + * Use fix value making sense in the + * context of TA-Lib (avoid to use DBL_MIN + * and DBL_MAX standard macro because they + * are troublesome with some compiler). + */ +#define TA_REAL_MIN (-3e+37) +#define TA_REAL_MAX (3e+37) + +/* A value outside of the min/max range + * indicates an undefined or default value. + */ +#define TA_INTEGER_DEFAULT (INT_MIN) +#define TA_REAL_DEFAULT (-4e+37) + +/* Part of this file is generated by gen_code */ + +ENUM_BEGIN( RetCode ) + /* 0 */ ENUM_DEFINE( TA_SUCCESS, Success ), /* No error */ + /* 1 */ ENUM_DEFINE( TA_LIB_NOT_INITIALIZE, LibNotInitialize ), /* TA_Initialize was not sucessfully called */ + /* 2 */ ENUM_DEFINE( TA_BAD_PARAM, BadParam ), /* A parameter is out of range */ + /* 3 */ ENUM_DEFINE( TA_ALLOC_ERR, AllocErr ), /* Possibly out-of-memory */ + /* 4 */ ENUM_DEFINE( TA_GROUP_NOT_FOUND, GroupNotFound ), + /* 5 */ ENUM_DEFINE( TA_FUNC_NOT_FOUND, FuncNotFound ), + /* 6 */ ENUM_DEFINE( TA_INVALID_HANDLE, InvalidHandle ), + /* 7 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER, InvalidParamHolder ), + /* 8 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER_TYPE, InvalidParamHolderType ), + /* 9 */ ENUM_DEFINE( TA_INVALID_PARAM_FUNCTION, InvalidParamFunction ), + /* 10 */ ENUM_DEFINE( TA_INPUT_NOT_ALL_INITIALIZE, InputNotAllInitialize ), + /* 11 */ ENUM_DEFINE( TA_OUTPUT_NOT_ALL_INITIALIZE, OutputNotAllInitialize ), + /* 12 */ ENUM_DEFINE( TA_OUT_OF_RANGE_START_INDEX, OutOfRangeStartIndex ), + /* 13 */ ENUM_DEFINE( TA_OUT_OF_RANGE_END_INDEX, OutOfRangeEndIndex ), + /* 14 */ ENUM_DEFINE( TA_INVALID_LIST_TYPE, InvalidListType ), + /* 15 */ ENUM_DEFINE( TA_BAD_OBJECT, BadObject ), + /* 16 */ ENUM_DEFINE( TA_NOT_SUPPORTED, NotSupported ), + /* 5000 */ ENUM_DEFINE( TA_INTERNAL_ERROR, InternalError ) = 5000, + /* 0xFFFF */ ENUM_DEFINE( TA_UNKNOWN_ERR, UnknownErr ) = 0xFFFF +ENUM_END( RetCode ) + +ENUM_BEGIN( Compatibility ) + ENUM_DEFINE( TA_COMPATIBILITY_DEFAULT, Default ), + ENUM_DEFINE( TA_COMPATIBILITY_METASTOCK, Metastock ) +ENUM_END( Compatibility ) + +ENUM_BEGIN( MAType ) + ENUM_DEFINE( TA_MAType_SMA, Sma ) =0, + ENUM_DEFINE( TA_MAType_EMA, Ema ) =1, + ENUM_DEFINE( TA_MAType_WMA, Wma ) =2, + ENUM_DEFINE( TA_MAType_DEMA, Dema ) =3, + ENUM_DEFINE( TA_MAType_TEMA, Tema ) =4, + ENUM_DEFINE( TA_MAType_TRIMA, Trima ) =5, + ENUM_DEFINE( TA_MAType_KAMA, Kama ) =6, + ENUM_DEFINE( TA_MAType_MAMA, Mama ) =7, + ENUM_DEFINE( TA_MAType_T3, T3 ) =8 +ENUM_END( MAType ) + + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ ENUM_BEGIN( FuncUnstId ) +/* Generated */ /* 000 */ ENUM_DEFINE( TA_FUNC_UNST_ADX, Adx), +/* Generated */ /* 001 */ ENUM_DEFINE( TA_FUNC_UNST_ADXR, Adxr), +/* Generated */ /* 002 */ ENUM_DEFINE( TA_FUNC_UNST_ATR, Atr), +/* Generated */ /* 003 */ ENUM_DEFINE( TA_FUNC_UNST_CMO, Cmo), +/* Generated */ /* 004 */ ENUM_DEFINE( TA_FUNC_UNST_DX, Dx), +/* Generated */ /* 005 */ ENUM_DEFINE( TA_FUNC_UNST_EMA, Ema), +/* Generated */ /* 006 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPERIOD, HtDcPeriod), +/* Generated */ /* 007 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPHASE, HtDcPhase), +/* Generated */ /* 008 */ ENUM_DEFINE( TA_FUNC_UNST_HT_PHASOR, HtPhasor), +/* Generated */ /* 009 */ ENUM_DEFINE( TA_FUNC_UNST_HT_SINE, HtSine), +/* Generated */ /* 010 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDLINE, HtTrendline), +/* Generated */ /* 011 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDMODE, HtTrendMode), +/* Generated */ /* 012 */ ENUM_DEFINE( TA_FUNC_UNST_IMI, Imi), +/* Generated */ /* 013 */ ENUM_DEFINE( TA_FUNC_UNST_KAMA, Kama), +/* Generated */ /* 014 */ ENUM_DEFINE( TA_FUNC_UNST_MAMA, Mama), +/* Generated */ /* 015 */ ENUM_DEFINE( TA_FUNC_UNST_MFI, Mfi), +/* Generated */ /* 016 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DI, MinusDI), +/* Generated */ /* 017 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DM, MinusDM), +/* Generated */ /* 018 */ ENUM_DEFINE( TA_FUNC_UNST_NATR, Natr), +/* Generated */ /* 019 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DI, PlusDI), +/* Generated */ /* 020 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DM, PlusDM), +/* Generated */ /* 021 */ ENUM_DEFINE( TA_FUNC_UNST_RSI, Rsi), +/* Generated */ /* 022 */ ENUM_DEFINE( TA_FUNC_UNST_STOCHRSI, StochRsi), +/* Generated */ /* 023 */ ENUM_DEFINE( TA_FUNC_UNST_T3, T3), +/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll), +/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1 +/* Generated */ ENUM_END( FuncUnstId ) +/* Generated */ +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ + +/* The TA_RangeType enum specifies the types of range that can be considered + * when to compare a part of a candle to other candles + */ + +ENUM_BEGIN( RangeType ) + ENUM_DEFINE( TA_RangeType_RealBody, RealBody ), + ENUM_DEFINE( TA_RangeType_HighLow, HighLow ), + ENUM_DEFINE( TA_RangeType_Shadows, Shadows ) +ENUM_END( RangeType ) + +/* The TA_CandleSettingType enum specifies which kind of setting to consider; + * the settings are based on the parts of the candle and the common words + * indicating the length (short, long, very long) + */ +ENUM_BEGIN( CandleSettingType ) + ENUM_DEFINE( TA_BodyLong, BodyLong ), + ENUM_DEFINE( TA_BodyVeryLong, BodyVeryLong ), + ENUM_DEFINE( TA_BodyShort, BodyShort ), + ENUM_DEFINE( TA_BodyDoji, BodyDoji ), + ENUM_DEFINE( TA_ShadowLong, ShadowLong ), + ENUM_DEFINE( TA_ShadowVeryLong, ShadowVeryLong ), + ENUM_DEFINE( TA_ShadowShort, ShadowShort ), + ENUM_DEFINE( TA_ShadowVeryShort, ShadowVeryShort ), + ENUM_DEFINE( TA_Near, Near ), + ENUM_DEFINE( TA_Far, Far ), + ENUM_DEFINE( TA_Equal, Equal ), + ENUM_DEFINE( TA_AllCandleSettings, AllCandleSettings ) +ENUM_END( CandleSettingType ) + +#endif diff --git a/src/ta-lib/include/ta_func.h b/src/ta-lib/include/ta_func.h new file mode 100644 index 000000000..e01cc42e4 --- /dev/null +++ b/src/ta-lib/include/ta_func.h @@ -0,0 +1,5346 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_FUNC_H +#define TA_FUNC_H + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +/* This header contains the prototype of all the Technical Analysis + * function provided by TA-LIB. + */ + +/* TA-LIB Developer Note: Do not modify this file, it is automaticaly + * generated by gen_code. + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef TA_DEFS_H + #include "ta_defs.h" +#endif + + +/* + * TA_ACCBANDS - Acceleration Bands + * + * Input = High, Low, Close + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ACCBANDS( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API TA_RetCode TA_S_ACCBANDS( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API int TA_ACCBANDS_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_ACOS - Vector Trigonometric ACos + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ACOS( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ACOS( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ACOS_Lookback( void ); + + +/* + * TA_AD - Chaikin A/D Line + * + * Input = High, Low, Close, Volume + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_AD( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + const double inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AD( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + const float inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AD_Lookback( void ); + + +/* + * TA_ADD - Vector Arithmetic Add + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ADD( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADD( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADD_Lookback( void ); + + +/* + * TA_ADOSC - Chaikin A/D Oscillator + * + * Input = High, Low, Close, Volume + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * + */ +TA_LIB_API TA_RetCode TA_ADOSC( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + const double inVolume[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADOSC( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + const float inVolume[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADOSC_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod ); /* From 2 to 100000 */ + + +/* + * TA_ADX - Average Directional Movement Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ADX( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADX( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_ADXR - Average Directional Movement Index Rating + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ADXR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADXR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADXR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_APO - Absolute Price Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_APO( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_APO( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_APO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_AROON - Aroon + * + * Input = High, Low + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_AROON( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outAroonDown[], + double outAroonUp[] ); + +TA_LIB_API TA_RetCode TA_S_AROON( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outAroonDown[], + double outAroonUp[] ); + +TA_LIB_API int TA_AROON_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_AROONOSC - Aroon Oscillator + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_AROONOSC( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AROONOSC( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AROONOSC_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_ASIN - Vector Trigonometric ASin + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ASIN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ASIN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ASIN_Lookback( void ); + + +/* + * TA_ATAN - Vector Trigonometric ATan + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ATAN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ATAN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ATAN_Lookback( void ); + + +/* + * TA_ATR - Average True Range + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ATR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ATR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_AVGPRICE - Average Price + * + * Input = Open, High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_AVGPRICE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AVGPRICE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AVGPRICE_Lookback( void ); + + +/* + * TA_AVGDEV - Average Deviation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_AVGDEV( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AVGDEV( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AVGDEV_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_BBANDS - Bollinger Bands + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInNbDevUp:(From TA_REAL_MIN to TA_REAL_MAX) + * Deviation multiplier for upper band + * + * optInNbDevDn:(From TA_REAL_MIN to TA_REAL_MAX) + * Deviation multiplier for lower band + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_BBANDS( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API TA_RetCode TA_S_BBANDS( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API int TA_BBANDS_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ + TA_MAType optInMAType ); + +/* + * TA_BETA - Beta + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_BETA( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_BETA( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_BETA_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_BOP - Balance Of Power + * + * Input = Open, High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_BOP( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_BOP( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_BOP_Lookback( void ); + + +/* + * TA_CCI - Commodity Channel Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_CCI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CCI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CCI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_CDL2CROWS - Two Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL2CROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL2CROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL2CROWS_Lookback( void ); + + +/* + * TA_CDL3BLACKCROWS - Three Black Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3BLACKCROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3BLACKCROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3BLACKCROWS_Lookback( void ); + + +/* + * TA_CDL3INSIDE - Three Inside Up/Down + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3INSIDE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3INSIDE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3INSIDE_Lookback( void ); + + +/* + * TA_CDL3LINESTRIKE - Three-Line Strike + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3LINESTRIKE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3LINESTRIKE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3LINESTRIKE_Lookback( void ); + + +/* + * TA_CDL3OUTSIDE - Three Outside Up/Down + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3OUTSIDE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3OUTSIDE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3OUTSIDE_Lookback( void ); + + +/* + * TA_CDL3STARSINSOUTH - Three Stars In The South + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3STARSINSOUTH( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3STARSINSOUTH( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3STARSINSOUTH_Lookback( void ); + + +/* + * TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3WHITESOLDIERS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3WHITESOLDIERS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3WHITESOLDIERS_Lookback( void ); + + +/* + * TA_CDLABANDONEDBABY - Abandoned Baby + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLABANDONEDBABY( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLABANDONEDBABY( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLABANDONEDBABY_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLADVANCEBLOCK - Advance Block + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLADVANCEBLOCK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLADVANCEBLOCK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLADVANCEBLOCK_Lookback( void ); + + +/* + * TA_CDLBELTHOLD - Belt-hold + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLBELTHOLD( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLBELTHOLD( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLBELTHOLD_Lookback( void ); + + +/* + * TA_CDLBREAKAWAY - Breakaway + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLBREAKAWAY( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLBREAKAWAY( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLBREAKAWAY_Lookback( void ); + + +/* + * TA_CDLCLOSINGMARUBOZU - Closing Marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLCLOSINGMARUBOZU( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLCLOSINGMARUBOZU( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLCLOSINGMARUBOZU_Lookback( void ); + + +/* + * TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLCONCEALBABYSWALL( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLCONCEALBABYSWALL( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLCONCEALBABYSWALL_Lookback( void ); + + +/* + * TA_CDLCOUNTERATTACK - Counterattack + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLCOUNTERATTACK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLCOUNTERATTACK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLCOUNTERATTACK_Lookback( void ); + + +/* + * TA_CDLDARKCLOUDCOVER - Dark Cloud Cover + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLDARKCLOUDCOVER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDARKCLOUDCOVER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDARKCLOUDCOVER_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLDOJI - Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDOJI_Lookback( void ); + + +/* + * TA_CDLDOJISTAR - Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLDOJISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDOJISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDOJISTAR_Lookback( void ); + + +/* + * TA_CDLDRAGONFLYDOJI - Dragonfly Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLDRAGONFLYDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDRAGONFLYDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDRAGONFLYDOJI_Lookback( void ); + + +/* + * TA_CDLENGULFING - Engulfing Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLENGULFING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLENGULFING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLENGULFING_Lookback( void ); + + +/* + * TA_CDLEVENINGDOJISTAR - Evening Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLEVENINGDOJISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLEVENINGDOJISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLEVENINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLEVENINGSTAR - Evening Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLEVENINGSTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLEVENINGSTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLEVENINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLGAPSIDESIDEWHITE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLGAPSIDESIDEWHITE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLGAPSIDESIDEWHITE_Lookback( void ); + + +/* + * TA_CDLGRAVESTONEDOJI - Gravestone Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLGRAVESTONEDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLGRAVESTONEDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLGRAVESTONEDOJI_Lookback( void ); + + +/* + * TA_CDLHAMMER - Hammer + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHAMMER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHAMMER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHAMMER_Lookback( void ); + + +/* + * TA_CDLHANGINGMAN - Hanging Man + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHANGINGMAN( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHANGINGMAN( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHANGINGMAN_Lookback( void ); + + +/* + * TA_CDLHARAMI - Harami Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHARAMI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHARAMI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHARAMI_Lookback( void ); + + +/* + * TA_CDLHARAMICROSS - Harami Cross Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHARAMICROSS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHARAMICROSS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHARAMICROSS_Lookback( void ); + + +/* + * TA_CDLHIGHWAVE - High-Wave Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHIGHWAVE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHIGHWAVE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHIGHWAVE_Lookback( void ); + + +/* + * TA_CDLHIKKAKE - Hikkake Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHIKKAKE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHIKKAKE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHIKKAKE_Lookback( void ); + + +/* + * TA_CDLHIKKAKEMOD - Modified Hikkake Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHIKKAKEMOD( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHIKKAKEMOD( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHIKKAKEMOD_Lookback( void ); + + +/* + * TA_CDLHOMINGPIGEON - Homing Pigeon + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHOMINGPIGEON( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHOMINGPIGEON( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHOMINGPIGEON_Lookback( void ); + + +/* + * TA_CDLIDENTICAL3CROWS - Identical Three Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLIDENTICAL3CROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLIDENTICAL3CROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLIDENTICAL3CROWS_Lookback( void ); + + +/* + * TA_CDLINNECK - In-Neck Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLINNECK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLINNECK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLINNECK_Lookback( void ); + + +/* + * TA_CDLINVERTEDHAMMER - Inverted Hammer + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLINVERTEDHAMMER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLINVERTEDHAMMER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLINVERTEDHAMMER_Lookback( void ); + + +/* + * TA_CDLKICKING - Kicking + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLKICKING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLKICKING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLKICKING_Lookback( void ); + + +/* + * TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLKICKINGBYLENGTH( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLKICKINGBYLENGTH( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLKICKINGBYLENGTH_Lookback( void ); + + +/* + * TA_CDLLADDERBOTTOM - Ladder Bottom + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLLADDERBOTTOM( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLLADDERBOTTOM( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLLADDERBOTTOM_Lookback( void ); + + +/* + * TA_CDLLONGLEGGEDDOJI - Long Legged Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLLONGLEGGEDDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLLONGLEGGEDDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLLONGLEGGEDDOJI_Lookback( void ); + + +/* + * TA_CDLLONGLINE - Long Line Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLLONGLINE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLLONGLINE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLLONGLINE_Lookback( void ); + + +/* + * TA_CDLMARUBOZU - Marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLMARUBOZU( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMARUBOZU( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMARUBOZU_Lookback( void ); + + +/* + * TA_CDLMATCHINGLOW - Matching Low + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLMATCHINGLOW( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMATCHINGLOW( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMATCHINGLOW_Lookback( void ); + + +/* + * TA_CDLMATHOLD - Mat Hold + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLMATHOLD( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMATHOLD( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMATHOLD_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLMORNINGDOJISTAR - Morning Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLMORNINGDOJISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMORNINGDOJISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMORNINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLMORNINGSTAR - Morning Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLMORNINGSTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMORNINGSTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMORNINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLONNECK - On-Neck Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLONNECK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLONNECK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLONNECK_Lookback( void ); + + +/* + * TA_CDLPIERCING - Piercing Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLPIERCING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLPIERCING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLPIERCING_Lookback( void ); + + +/* + * TA_CDLRICKSHAWMAN - Rickshaw Man + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLRICKSHAWMAN( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLRICKSHAWMAN( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLRICKSHAWMAN_Lookback( void ); + + +/* + * TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLRISEFALL3METHODS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLRISEFALL3METHODS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLRISEFALL3METHODS_Lookback( void ); + + +/* + * TA_CDLSEPARATINGLINES - Separating Lines + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSEPARATINGLINES( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSEPARATINGLINES( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSEPARATINGLINES_Lookback( void ); + + +/* + * TA_CDLSHOOTINGSTAR - Shooting Star + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSHOOTINGSTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSHOOTINGSTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSHOOTINGSTAR_Lookback( void ); + + +/* + * TA_CDLSHORTLINE - Short Line Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSHORTLINE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSHORTLINE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSHORTLINE_Lookback( void ); + + +/* + * TA_CDLSPINNINGTOP - Spinning Top + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSPINNINGTOP( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSPINNINGTOP( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSPINNINGTOP_Lookback( void ); + + +/* + * TA_CDLSTALLEDPATTERN - Stalled Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSTALLEDPATTERN( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSTALLEDPATTERN( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSTALLEDPATTERN_Lookback( void ); + + +/* + * TA_CDLSTICKSANDWICH - Stick Sandwich + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSTICKSANDWICH( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSTICKSANDWICH( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSTICKSANDWICH_Lookback( void ); + + +/* + * TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTAKURI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTAKURI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTAKURI_Lookback( void ); + + +/* + * TA_CDLTASUKIGAP - Tasuki Gap + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTASUKIGAP( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTASUKIGAP( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTASUKIGAP_Lookback( void ); + + +/* + * TA_CDLTHRUSTING - Thrusting Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTHRUSTING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTHRUSTING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTHRUSTING_Lookback( void ); + + +/* + * TA_CDLTRISTAR - Tristar Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTRISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTRISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTRISTAR_Lookback( void ); + + +/* + * TA_CDLUNIQUE3RIVER - Unique 3 River + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLUNIQUE3RIVER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLUNIQUE3RIVER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLUNIQUE3RIVER_Lookback( void ); + + +/* + * TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLUPSIDEGAP2CROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLUPSIDEGAP2CROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLUPSIDEGAP2CROWS_Lookback( void ); + + +/* + * TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLXSIDEGAP3METHODS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLXSIDEGAP3METHODS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLXSIDEGAP3METHODS_Lookback( void ); + + +/* + * TA_CEIL - Vector Ceil + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_CEIL( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CEIL( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CEIL_Lookback( void ); + + +/* + * TA_CMO - Chande Momentum Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_CMO( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CMO( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CMO_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_CORREL - Pearson's Correlation Coefficient (r) + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_CORREL( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CORREL( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CORREL_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_COS - Vector Trigonometric Cos + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_COS( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_COS( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_COS_Lookback( void ); + + +/* + * TA_COSH - Vector Trigonometric Cosh + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_COSH( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_COSH( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_COSH_Lookback( void ); + + +/* + * TA_DEMA - Double Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_DEMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_DEMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_DEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_DIV - Vector Arithmetic Div + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_DIV( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_DIV( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_DIV_Lookback( void ); + + +/* + * TA_DX - Directional Movement Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_DX( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_DX( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_DX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_EMA - Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_EMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_EMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_EMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_EXP - Vector Arithmetic Exp + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_EXP( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_EXP( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_EXP_Lookback( void ); + + +/* + * TA_FLOOR - Vector Floor + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_FLOOR( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_FLOOR( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_FLOOR_Lookback( void ); + + +/* + * TA_HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_HT_DCPERIOD( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_HT_DCPERIOD( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_HT_DCPERIOD_Lookback( void ); + + +/* + * TA_HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_HT_DCPHASE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_HT_DCPHASE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_HT_DCPHASE_Lookback( void ); + + +/* + * TA_HT_PHASOR - Hilbert Transform - Phasor Components + * + * Input = double + * Output = double, double + * + */ +TA_LIB_API TA_RetCode TA_HT_PHASOR( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outInPhase[], + double outQuadrature[] ); + +TA_LIB_API TA_RetCode TA_S_HT_PHASOR( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outInPhase[], + double outQuadrature[] ); + +TA_LIB_API int TA_HT_PHASOR_Lookback( void ); + + +/* + * TA_HT_SINE - Hilbert Transform - SineWave + * + * Input = double + * Output = double, double + * + */ +TA_LIB_API TA_RetCode TA_HT_SINE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outSine[], + double outLeadSine[] ); + +TA_LIB_API TA_RetCode TA_S_HT_SINE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outSine[], + double outLeadSine[] ); + +TA_LIB_API int TA_HT_SINE_Lookback( void ); + + +/* + * TA_HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_HT_TRENDLINE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_HT_TRENDLINE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_HT_TRENDLINE_Lookback( void ); + + +/* + * TA_HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode + * + * Input = double + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_HT_TRENDMODE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_HT_TRENDMODE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_HT_TRENDMODE_Lookback( void ); + + +/* + * TA_IMI - Intraday Momentum Index + * + * Input = Open, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_IMI( int startIdx, + int endIdx, + const double inOpen[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_IMI( int startIdx, + int endIdx, + const float inOpen[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_IMI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_KAMA - Kaufman Adaptive Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_KAMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_KAMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_KAMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG - Linear Regression + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG_ANGLE - Linear Regression Angle + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG_ANGLE( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG_ANGLE( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_ANGLE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG_INTERCEPT - Linear Regression Intercept + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG_INTERCEPT( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG_INTERCEPT( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_INTERCEPT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG_SLOPE - Linear Regression Slope + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG_SLOPE( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG_SLOPE( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_SLOPE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LN - Vector Log Natural + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_LN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LN_Lookback( void ); + + +/* + * TA_LOG10 - Vector Log10 + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_LOG10( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LOG10( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LOG10_Lookback( void ); + + +/* + * TA_MA - Moving average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_MA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MA_Lookback( int optInTimePeriod, /* From 1 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_MACD - Moving Average Convergence/Divergence + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * + */ +TA_LIB_API TA_RetCode TA_MACD( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API TA_RetCode TA_S_MACD( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API int TA_MACD_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int optInSignalPeriod ); /* From 1 to 100000 */ + + +/* + * TA_MACDEXT - MACD with controllable MA type + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInFastMAType: + * Type of Moving Average for fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInSlowMAType: + * Type of Moving Average for slow MA + * + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * optInSignalMAType: + * Type of Moving Average for signal line + * + * + */ +TA_LIB_API TA_RetCode TA_MACDEXT( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + TA_MAType optInFastMAType, + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInSlowMAType, + int optInSignalPeriod, /* From 1 to 100000 */ + TA_MAType optInSignalMAType, + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API TA_RetCode TA_S_MACDEXT( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + TA_MAType optInFastMAType, + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInSlowMAType, + int optInSignalPeriod, /* From 1 to 100000 */ + TA_MAType optInSignalMAType, + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API int TA_MACDEXT_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + TA_MAType optInFastMAType, + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInSlowMAType, + int optInSignalPeriod, /* From 1 to 100000 */ + TA_MAType optInSignalMAType ); + +/* + * TA_MACDFIX - Moving Average Convergence/Divergence Fix 12/26 + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * + */ +TA_LIB_API TA_RetCode TA_MACDFIX( int startIdx, + int endIdx, + const double inReal[], + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API TA_RetCode TA_S_MACDFIX( int startIdx, + int endIdx, + const float inReal[], + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API int TA_MACDFIX_Lookback( int optInSignalPeriod ); /* From 1 to 100000 */ + + +/* + * TA_MAMA - MESA Adaptive Moving Average + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastLimit:(From 0.01 to 0.99) + * Upper limit use in the adaptive algorithm + * + * optInSlowLimit:(From 0.01 to 0.99) + * Lower limit use in the adaptive algorithm + * + * + */ +TA_LIB_API TA_RetCode TA_MAMA( int startIdx, + int endIdx, + const double inReal[], + double optInFastLimit, /* From 0.01 to 0.99 */ + double optInSlowLimit, /* From 0.01 to 0.99 */ + int *outBegIdx, + int *outNBElement, + double outMAMA[], + double outFAMA[] ); + +TA_LIB_API TA_RetCode TA_S_MAMA( int startIdx, + int endIdx, + const float inReal[], + double optInFastLimit, /* From 0.01 to 0.99 */ + double optInSlowLimit, /* From 0.01 to 0.99 */ + int *outBegIdx, + int *outNBElement, + double outMAMA[], + double outFAMA[] ); + +TA_LIB_API int TA_MAMA_Lookback( double optInFastLimit, /* From 0.01 to 0.99 */ + double optInSlowLimit ); /* From 0.01 to 0.99 */ + + +/* + * TA_MAVP - Moving average with variable period + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInMinPeriod:(From 2 to 100000) + * Value less than minimum will be changed to Minimum period + * + * optInMaxPeriod:(From 2 to 100000) + * Value higher than maximum will be changed to Maximum period + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_MAVP( int startIdx, + int endIdx, + const double inReal[], + const double inPeriods[], + int optInMinPeriod, /* From 2 to 100000 */ + int optInMaxPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MAVP( int startIdx, + int endIdx, + const float inReal[], + const float inPeriods[], + int optInMinPeriod, /* From 2 to 100000 */ + int optInMaxPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MAVP_Lookback( int optInMinPeriod, /* From 2 to 100000 */ + int optInMaxPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_MAX - Highest value over a specified period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MAX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MAX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MAXINDEX - Index of highest value over a specified period + * + * Input = double + * Output = int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MAXINDEX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_MAXINDEX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_MAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MEDPRICE - Median Price + * + * Input = High, Low + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_MEDPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MEDPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MEDPRICE_Lookback( void ); + + +/* + * TA_MFI - Money Flow Index + * + * Input = High, Low, Close, Volume + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MFI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + const double inVolume[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MFI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + const float inVolume[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MFI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MIDPOINT - MidPoint over period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MIDPOINT( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MIDPOINT( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MIDPOINT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MIDPRICE - Midpoint Price over period + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MIDPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MIDPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MIDPRICE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MIN - Lowest value over a specified period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MIN( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MIN( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MIN_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MININDEX - Index of lowest value over a specified period + * + * Input = double + * Output = int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MININDEX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_MININDEX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_MININDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MINMAX - Lowest and highest values over a specified period + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINMAX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMin[], + double outMax[] ); + +TA_LIB_API TA_RetCode TA_S_MINMAX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMin[], + double outMax[] ); + +TA_LIB_API int TA_MINMAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MINMAXINDEX - Indexes of lowest and highest values over a specified period + * + * Input = double + * Output = int, int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINMAXINDEX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outMinIdx[], + int outMaxIdx[] ); + +TA_LIB_API TA_RetCode TA_S_MINMAXINDEX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outMinIdx[], + int outMaxIdx[] ); + +TA_LIB_API int TA_MINMAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MINUS_DI - Minus Directional Indicator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINUS_DI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MINUS_DI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MINUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_MINUS_DM - Minus Directional Movement + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINUS_DM( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MINUS_DM( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MINUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_MOM - Momentum + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MOM( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MOM( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MOM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_MULT - Vector Arithmetic Mult + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_MULT( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MULT( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MULT_Lookback( void ); + + +/* + * TA_NATR - Normalized Average True Range + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_NATR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_NATR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_NATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_OBV - On Balance Volume + * + * Input = double, Volume + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_OBV( int startIdx, + int endIdx, + const double inReal[], + const double inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_OBV( int startIdx, + int endIdx, + const float inReal[], + const float inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_OBV_Lookback( void ); + + +/* + * TA_PLUS_DI - Plus Directional Indicator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_PLUS_DI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_PLUS_DI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_PLUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_PLUS_DM - Plus Directional Movement + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_PLUS_DM( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_PLUS_DM( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_PLUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_PPO - Percentage Price Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_PPO( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_PPO( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_PPO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_ROC - Rate of change : ((price/prevPrice)-1)*100 + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROC( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROC( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROC_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROCP( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROCP( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROCP_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_ROCR - Rate of change ratio: (price/prevPrice) + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROCR( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROCR( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROCR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100 + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROCR100( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROCR100( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROCR100_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_RSI - Relative Strength Index + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_RSI( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_RSI( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_RSI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_SAR - Parabolic SAR + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInAcceleration:(From 0 to TA_REAL_MAX) + * Acceleration Factor used up to the Maximum value + * + * optInMaximum:(From 0 to TA_REAL_MAX) + * Acceleration Factor Maximum value + * + * + */ +TA_LIB_API TA_RetCode TA_SAR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + double optInAcceleration, /* From 0 to TA_REAL_MAX */ + double optInMaximum, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SAR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + double optInAcceleration, /* From 0 to TA_REAL_MAX */ + double optInMaximum, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SAR_Lookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ + double optInMaximum ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_SAREXT - Parabolic SAR - Extended + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInStartValue:(From TA_REAL_MIN to TA_REAL_MAX) + * Start value and direction. 0 for Auto, >0 for Long, <0 for Short + * + * optInOffsetOnReverse:(From 0 to TA_REAL_MAX) + * Percent offset added/removed to initial stop on short/long reversal + * + * optInAccelerationInitLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor initial value for the Long direction + * + * optInAccelerationLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor for the Long direction + * + * optInAccelerationMaxLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor maximum value for the Long direction + * + * optInAccelerationInitShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor initial value for the Short direction + * + * optInAccelerationShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor for the Short direction + * + * optInAccelerationMaxShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor maximum value for the Short direction + * + * + */ +TA_LIB_API TA_RetCode TA_SAREXT( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SAREXT( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SAREXT_Lookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxShort ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_SIN - Vector Trigonometric Sin + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SIN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SIN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SIN_Lookback( void ); + + +/* + * TA_SINH - Vector Trigonometric Sinh + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SINH( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SINH( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SINH_Lookback( void ); + + +/* + * TA_SMA - Simple Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_SMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_SQRT - Vector Square Root + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SQRT( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SQRT( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SQRT_Lookback( void ); + + +/* + * TA_STDDEV - Standard Deviation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) + * Nb of deviations + * + * + */ +TA_LIB_API TA_RetCode TA_STDDEV( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_STDDEV( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_STDDEV_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ + + +/* + * TA_STOCH - Stochastic + * + * Input = High, Low, Close + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInSlowK_Period:(From 1 to 100000) + * Smoothing for making the Slow-K line. Usually set to 3 + * + * optInSlowK_MAType: + * Type of Moving Average for Slow-K + * + * optInSlowD_Period:(From 1 to 100000) + * Smoothing for making the Slow-D line + * + * optInSlowD_MAType: + * Type of Moving Average for Slow-D + * + * + */ +TA_LIB_API TA_RetCode TA_STOCH( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInSlowK_Period, /* From 1 to 100000 */ + TA_MAType optInSlowK_MAType, + int optInSlowD_Period, /* From 1 to 100000 */ + TA_MAType optInSlowD_MAType, + int *outBegIdx, + int *outNBElement, + double outSlowK[], + double outSlowD[] ); + +TA_LIB_API TA_RetCode TA_S_STOCH( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInSlowK_Period, /* From 1 to 100000 */ + TA_MAType optInSlowK_MAType, + int optInSlowD_Period, /* From 1 to 100000 */ + TA_MAType optInSlowD_MAType, + int *outBegIdx, + int *outNBElement, + double outSlowK[], + double outSlowD[] ); + +TA_LIB_API int TA_STOCH_Lookback( int optInFastK_Period, /* From 1 to 100000 */ + int optInSlowK_Period, /* From 1 to 100000 */ + TA_MAType optInSlowK_MAType, + int optInSlowD_Period, /* From 1 to 100000 */ + TA_MAType optInSlowD_MAType ); + +/* + * TA_STOCHF - Stochastic Fast + * + * Input = High, Low, Close + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInFastD_Period:(From 1 to 100000) + * Smoothing for making the Fast-D line. Usually set to 3 + * + * optInFastD_MAType: + * Type of Moving Average for Fast-D + * + * + */ +TA_LIB_API TA_RetCode TA_STOCHF( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API TA_RetCode TA_S_STOCHF( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API int TA_STOCHF_Lookback( int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType ); + +/* + * TA_STOCHRSI - Stochastic Relative Strength Index + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInFastD_Period:(From 1 to 100000) + * Smoothing for making the Fast-D line. Usually set to 3 + * + * optInFastD_MAType: + * Type of Moving Average for Fast-D + * + * + */ +TA_LIB_API TA_RetCode TA_STOCHRSI( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API TA_RetCode TA_S_STOCHRSI( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API int TA_STOCHRSI_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType ); + +/* + * TA_SUB - Vector Arithmetic Subtraction + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SUB( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SUB( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SUB_Lookback( void ); + + +/* + * TA_SUM - Summation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_SUM( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SUM( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SUM_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_T3 - Triple Exponential Moving Average (T3) + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInVFactor:(From 0 to 1) + * Volume Factor + * + * + */ +TA_LIB_API TA_RetCode TA_T3( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInVFactor, /* From 0 to 1 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_T3( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInVFactor, /* From 0 to 1 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_T3_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + double optInVFactor ); /* From 0 to 1 */ + + +/* + * TA_TAN - Vector Trigonometric Tan + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TAN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TAN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TAN_Lookback( void ); + + +/* + * TA_TANH - Vector Trigonometric Tanh + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TANH( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TANH( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TANH_Lookback( void ); + + +/* + * TA_TEMA - Triple Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TEMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TEMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_TRANGE - True Range + * + * Input = High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TRANGE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TRANGE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TRANGE_Lookback( void ); + + +/* + * TA_TRIMA - Triangular Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TRIMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TRIMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TRIMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TRIX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TRIX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TRIX_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_TSF - Time Series Forecast + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TSF( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TSF( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TSF_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_TYPPRICE - Typical Price + * + * Input = High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TYPPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TYPPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TYPPRICE_Lookback( void ); + + +/* + * TA_ULTOSC - Ultimate Oscillator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod1:(From 1 to 100000) + * Number of bars for 1st period. + * + * optInTimePeriod2:(From 1 to 100000) + * Number of bars fro 2nd period + * + * optInTimePeriod3:(From 1 to 100000) + * Number of bars for 3rd period + * + * + */ +TA_LIB_API TA_RetCode TA_ULTOSC( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod1, /* From 1 to 100000 */ + int optInTimePeriod2, /* From 1 to 100000 */ + int optInTimePeriod3, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ULTOSC( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod1, /* From 1 to 100000 */ + int optInTimePeriod2, /* From 1 to 100000 */ + int optInTimePeriod3, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ULTOSC_Lookback( int optInTimePeriod1, /* From 1 to 100000 */ + int optInTimePeriod2, /* From 1 to 100000 */ + int optInTimePeriod3 ); /* From 1 to 100000 */ + + +/* + * TA_VAR - Variance + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) + * Nb of deviations + * + * + */ +TA_LIB_API TA_RetCode TA_VAR( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_VAR( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_VAR_Lookback( int optInTimePeriod, /* From 1 to 100000 */ + double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ + + +/* + * TA_WCLPRICE - Weighted Close Price + * + * Input = High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_WCLPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_WCLPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_WCLPRICE_Lookback( void ); + + +/* + * TA_WILLR - Williams' %R + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_WILLR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_WILLR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_WILLR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_WMA - Weighted Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_WMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_WMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_WMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* Some TA functions takes a certain amount of input data + * before stabilizing and outputing meaningful data. This is + * a behavior pertaining to the algo of some TA functions and + * is not particular to the TA-Lib implementation. + * TA-Lib allows you to automatically strip off these unstabl + * data from your output and from any internal processing. + * (See documentation for more info) + * + * Examples: + * TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 30 ); + * Always strip off 30 price bar for the TA_EMA function. + * + * TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 30 ); + * Always strip off 30 price bar from ALL functions + * having an unstable period. + * + * See ta_defs.h for the enumeration TA_FuncUnstId + */ + +TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id, + unsigned int unstablePeriod ); + +unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id ); + +/* You can change slightly the behavior of the TA functions + * by requesting compatibiliy with some existing software. + * + * By default, the behavior is as close as the original + * author of the TA functions intend it to be. + * + * See ta_defs.h for the enumeration TA_Compatibility. + */ +TA_RetCode TA_SetCompatibility( TA_Compatibility value ); +TA_Compatibility TA_GetCompatibility( void ); + +/* Candlesticks struct and functions + * Because candlestick patterns are subjective, it is necessary + * to allow the user to specify what should be the meaning of + * 'long body', 'short shadows', etc. + */ + +/* Call TA_SetCandleSettings to set that when comparing a candle + * basing on settingType it must be compared with the average + * of the last avgPeriod candles' rangeType multiplied by factor. + * This setting is valid until TA_RestoreCandleDefaultSettings is called + */ +TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, + TA_RangeType rangeType, + int avgPeriod, + double factor ); + +/* Call TA_RestoreCandleDefaultSettings after using custom settings + * to restore the default settings for the specified settingType + */ +TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType ); + +#ifdef __cplusplus +} +#endif + +#endif + +/***************/ +/* End of File */ +/***************/ + diff --git a/src/ta-lib/include/ta_libc.h b/src/ta-lib/include/ta_libc.h new file mode 100644 index 000000000..6c1c0bef2 --- /dev/null +++ b/src/ta-lib/include/ta_libc.h @@ -0,0 +1,51 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_LIBC_H +#define TA_LIBC_H + +/* Includes all headers needed for using the ta-lib 'C' library. */ + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +#ifndef TA_FUNC_H + #include "ta_func.h" +#endif + +#ifndef TA_ABSTRACT_H + #include "ta_abstract.h" +#endif + +#endif + diff --git a/src/ta-lib/local/include/ta-lib/ta_abstract.h b/src/ta-lib/local/include/ta-lib/ta_abstract.h new file mode 100644 index 000000000..c6ceac3a3 --- /dev/null +++ b/src/ta-lib/local/include/ta-lib/ta_abstract.h @@ -0,0 +1,553 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TA_ABSTRACT_H +#define TA_ABSTRACT_H + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* This file defines the interface for calling all the TA functions without + * knowing at priori the parameters. + * + * This capability is particularly useful for an application who needs + * to support the complete list of TA functions without having to + * re-write new code each time a new function is added to TA-Lib. + * + * Example 1: + * Lets say you are doing a charting software. When the user select + * a price bar, a side list offers blindly all the TA functions + * that could be applied to a price bar. The user selects one of + * these, then a dialog open for allowing to adjust some parameter + * (TA-LIB will tell your software which parameter are needed and the + * valid range for each). Once all the parameter are set, you can + * call blindly the corresponding TA function. The returned + * information can then also blindly be drawn on the chart (some + * output flags allows to get some hint about how the data shall be + * displayed). + * The same "abstract" logic apply to all the TA functions. + * Some TA Functions works only on volume, or can work indiferently + * with any time serie data (the open, close, another indicator...). + * All the applicable functions to the currently selected/available + * data can be determined through this "virtual" interface. + * + * Example 2: + * Let's say you do not like the direct interface for + * calling the TA Functions, you can write a code that + * re-generate a different interface. This is already + * done even for the 'C' interface (ta_func.h is generated). + * + * Example 3: + * With the abstract interface you can easily generate + * glue code. Like generating an interface that integrates + * well within Perl... see the project SWIG if you are + * interested by such things. + * + * The abstract interface is used within TA-Lib to perform at least + * the following: + * - used by gen_code to generate all the glue code. + * - used to generate a XML representation of the TA functions. + */ + +/* The following functions are used to obtain the name of all the + * TA function groups ("Market Strength", "Trend Indicator" etc...). + * + * On success, it becomes the responsibility of the caller to + * call TA_GroupTableFree once the 'table' is no longuer needed. + * + * Example: + * This code snippet will print out the name of all the supported + * function group available: + * + * TA_StringTable *table; + * TA_RetCode retCode; + * int i; + * + * retCode = TA_GroupTableAlloc( &table ); + * + * if( retCode == TA_SUCCESS ) + * { + * for( i=0; i < table->size; i++ ) + * printf( "%s\n", table->string[i] ); + * + * TA_GroupTableFree( table ); + * } + */ +TA_LIB_API TA_RetCode TA_GroupTableAlloc( TA_StringTable **table ); +TA_LIB_API TA_RetCode TA_GroupTableFree ( TA_StringTable *table ); + +/* The following functions are used to obtain the name of all the + * function provided in a certain group. + * + * On success, it becomes the responsibility of the caller to + * call TA_FuncTableFree once the 'table' is no longuer needed. + * + * Example: + * This code snippet will print out the name of all the supported + * function in the "market strength" category: + * + * TA_StringTable *table; + * TA_RetCode retCode; + * int i; + * + * retCode = TA_FuncTableAlloc( "Market Strength", &table ); + * + * if( retCode == TA_SUCCESS ) + * { + * for( i=0; i < table->size; i++ ) + * printf( "%s\n", table->string[i] ); + * + * TA_FuncTableFree( table ); + * } + */ +TA_LIB_API TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table ); +TA_LIB_API TA_RetCode TA_FuncTableFree ( TA_StringTable *table ); + +/* Using the name, you can obtain an handle unique to this function. + * This handle is further used for obtaining information on the + * parameters needed and also for potentially calling this TA function. + * + * For convenience, this handle can also be found in + * the TA_FuncInfo structure (see below). + */ +typedef unsigned int TA_FuncHandle; +TA_LIB_API TA_RetCode TA_GetFuncHandle( const char *name, + const TA_FuncHandle **handle ); + +/* Get some basic information about a function. + * + * A const pointer will be set on the corresponding TA_FuncInfo structure. + * The whole structure are hard coded constants and it can be assumed they + * will not change at runtime. + * + * Example: + * Print the number of inputs used by the MA (moving average) function. + * + * TA_RetCode retCode; + * const TA_FuncHandle *handle; + * const TA_FuncInfo *theInfo; + * + * retCode = TA_GetFuncHandle( "MA", &handle ); + * + * if( retCode == TA_SUCCESS ) + * { + * retCode = TA_GetFuncInfo( handle, &theInfo ); + * if( retCode == TA_SUCCESS ) + * printf( "Nb Input = %d\n", theInfo->nbInput ); + * } + * + */ +typedef int TA_FuncFlags; +#define TA_FUNC_FLG_OVERLAP 0x01000000 /* Output scale same as input data. */ +#define TA_FUNC_FLG_VOLUME 0x04000000 /* Output shall be over the volume data. */ +#define TA_FUNC_FLG_UNST_PER 0x08000000 /* Indicate if this function have an unstable + * initial period. Some additional code exist + * for these functions for allowing to set that + * unstable period. See Documentation. + */ +#define TA_FUNC_FLG_CANDLESTICK 0x10000000 /* Output shall be a candlestick */ + +typedef struct TA_FuncInfo +{ + /* Constant information about the function. The + * information found in this structure is guarantee + * to not change at runtime. + */ + const char * name; + const char * group; + + const char * hint; + const char * camelCaseName; + TA_FuncFlags flags; + + unsigned int nbInput; + unsigned int nbOptInput; + unsigned int nbOutput; + + const TA_FuncHandle *handle; +} TA_FuncInfo; + +TA_LIB_API TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle, + const TA_FuncInfo **funcInfo ); + + +/* An alternate way to access all the functions is through the + * use of the TA_ForEachFunc(). You can setup a function to be + * call back for each TA function in the TA-Lib. + * + * Example: + * This code will print the group and name of all available functions. + * + * void printFuncInfo( const TA_FuncInfo *funcInfo, void *opaqueData ) + * { + * printf( "Group=%s Name=%s\n", funcInfo->group, funcInfo->name ); + * } + * + * void displayListOfTAFunctions( void ) + * { + * TA_ForEachFunc( printFuncInfo, NULL ); + * } + */ +typedef void (*TA_CallForEachFunc)(const TA_FuncInfo *funcInfo, void *opaqueData ); + +TA_LIB_API TA_RetCode TA_ForEachFunc( TA_CallForEachFunc functionToCall, void *opaqueData ); + +/* The next section includes the data structures and function allowing to + * proceed with the call of a Tech. Analysis function. + * + * At first, it may seems a little bit complicated, but it is worth to take the + * effort to learn about it. Once you succeed to interface with TA-Abstract you get + * access to the complete library of TA functions at once without further effort. + */ + +/* Structures representing extended information on a parameter. */ + +typedef struct TA_RealRange +{ + TA_Real min; + TA_Real max; + TA_Integer precision; /* nb of digit after the '.' */ + + /* The following suggested value are used by Tech. Analysis software + * doing parameter "optimization". Can be ignored by most user. + */ + TA_Real suggested_start; + TA_Real suggested_end; + TA_Real suggested_increment; +} TA_RealRange; + +typedef struct TA_IntegerRange +{ + TA_Integer min; + TA_Integer max; + + /* The following suggested value are used by Tech. Analysis software + * doing parameter "optimization". Can be ignored by most user. + */ + TA_Integer suggested_start; + TA_Integer suggested_end; + TA_Integer suggested_increment; +} TA_IntegerRange; + +typedef struct TA_RealDataPair +{ + /* A TA_Real value and the corresponding string. */ + TA_Real value; + const char *string; +} TA_RealDataPair; + +typedef struct TA_IntegerDataPair +{ + /* A TA_Integer value and the corresponding string. */ + TA_Integer value; + const char *string; +} TA_IntegerDataPair; + +typedef struct TA_RealList +{ + const TA_RealDataPair *data; + unsigned int nbElement; +} TA_RealList; + +typedef struct TA_IntegerList +{ + const TA_IntegerDataPair *data; + unsigned int nbElement; +} TA_IntegerList; + +typedef enum +{ + TA_Input_Price, + TA_Input_Real, + TA_Input_Integer +} TA_InputParameterType; + +typedef enum +{ + TA_OptInput_RealRange, + TA_OptInput_RealList, + TA_OptInput_IntegerRange, + TA_OptInput_IntegerList +} TA_OptInputParameterType; + +typedef enum +{ + TA_Output_Real, + TA_Output_Integer +} TA_OutputParameterType; + +/* When the input is a TA_Input_Price, the following + * TA_InputFlags indicates the required components. + * These can be combined for functions requiring more + * than one component. + * + * Example: + * (TA_IN_PRICE_OPEN|TA_IN_PRICE_HIGH) + * Indicates that the functions requires two inputs + * that must be specifically the open and the high. + */ +typedef int TA_InputFlags; +#define TA_IN_PRICE_OPEN 0x00000001 +#define TA_IN_PRICE_HIGH 0x00000002 +#define TA_IN_PRICE_LOW 0x00000004 +#define TA_IN_PRICE_CLOSE 0x00000008 +#define TA_IN_PRICE_VOLUME 0x00000010 +#define TA_IN_PRICE_OPENINTEREST 0x00000020 +#define TA_IN_PRICE_TIMESTAMP 0x00000040 + +/* The following are flags for optional inputs. + * + * TA_OPTIN_IS_PERCENT: Input is a percentage. + * + * TA_OPTIN_IS_DEGREE: Input is a degree (0-360). + * + * TA_OPTIN_IS_CURRENCY: Input is a currency. + * + * TA_OPTIN_ADVANCED: + * Used for parameters who are rarely changed. + * Most application can hide these advanced optional inputs to their + * end-user (or make it harder to change). + */ +typedef int TA_OptInputFlags; +#define TA_OPTIN_IS_PERCENT 0x00100000 /* Input is a percentage. */ +#define TA_OPTIN_IS_DEGREE 0x00200000 /* Input is a degree (0-360). */ +#define TA_OPTIN_IS_CURRENCY 0x00400000 /* Input is a currency. */ +#define TA_OPTIN_ADVANCED 0x01000000 + + +/* The following are flags giving hint on what + * could be done with the output. + */ +typedef int TA_OutputFlags; +#define TA_OUT_LINE 0x00000001 /* Suggest to display as a connected line. */ +#define TA_OUT_DOT_LINE 0x00000002 /* Suggest to display as a 'dotted' line. */ +#define TA_OUT_DASH_LINE 0x00000004 /* Suggest to display as a 'dashed' line. */ +#define TA_OUT_DOT 0x00000008 /* Suggest to display with dots only. */ +#define TA_OUT_HISTO 0x00000010 /* Suggest to display as an histogram. */ +#define TA_OUT_PATTERN_BOOL 0x00000020 /* Indicates if pattern exists (!=0) or not (0) */ +#define TA_OUT_PATTERN_BULL_BEAR 0x00000040 /* =0 no pattern, > 0 bullish, < 0 bearish */ +#define TA_OUT_PATTERN_STRENGTH 0x00000080 /* =0 neutral, ]0..100] getting bullish, ]100..200] bullish, [-100..0[ getting bearish, [-200..100[ bearish */ +#define TA_OUT_POSITIVE 0x00000100 /* Output can be positive */ +#define TA_OUT_NEGATIVE 0x00000200 /* Output can be negative */ +#define TA_OUT_ZERO 0x00000400 /* Output can be zero */ +#define TA_OUT_UPPER_LIMIT 0x00000800 /* Indicates that the values represent an upper limit. */ +#define TA_OUT_LOWER_LIMIT 0x00001000 /* Indicates that the values represent a lower limit. */ + + +/* The following 3 structures will exist for each input, optional + * input and output. + * + * These structures tells you everything you need to know for identifying + * the parameters applicable to the function. + */ +typedef struct TA_InputParameterInfo +{ + TA_InputParameterType type; + const char *paramName; + TA_InputFlags flags; + +} TA_InputParameterInfo; + +typedef struct TA_OptInputParameterInfo +{ + TA_OptInputParameterType type; + const char *paramName; + TA_OptInputFlags flags; + + const char *displayName; + const void *dataSet; + TA_Real defaultValue; + const char *hint; + const char *helpFile; + +} TA_OptInputParameterInfo; + +typedef struct TA_OutputParameterInfo +{ + TA_OutputParameterType type; + const char *paramName; + TA_OutputFlags flags; + +} TA_OutputParameterInfo; + +/* Functions to get a const ptr on the "TA_XXXXXXParameterInfo". + * Max value for the 'paramIndex' can be found in the TA_FuncInfo structure. + * The 'handle' can be obtained from TA_GetFuncHandle or from a TA_FuncInfo. + * + * Short example: + * + * void displayInputType( const TA_FuncInfo *funcInfo ) + * { + * unsigned int i; + * const TA_InputParameterInfo *paramInfo; + * + * for( i=0; i < funcInfo->nbInput; i++ ) + * { + * TA_GetInputParameterInfo( funcInfo->handle, i, ¶mInfo ); + * switch( paramInfo->type ) + * { + * case TA_Input_Price: + * printf( "This function needs price bars as input\n" ); + * break; + * case TA_Input_Real: + * printf( "This function needs an array of floats as input\n" ); + * break; + * (... etc. ...) + * } + * } + * } + */ +TA_LIB_API TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_InputParameterInfo **info ); + +TA_LIB_API TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_OptInputParameterInfo **info ); + +TA_LIB_API TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_OutputParameterInfo **info ); + +/* Alloc a structure allowing to build the list of parameters + * for doing a call. + * + * All input and output parameters must be setup. If not, TA_BAD_PARAM + * will be returned when TA_CallFunc is called. + * + * The optional input are not required to be setup. A default value + * will always be used in that case. + * + * If there is an attempts to set a parameter with the wrong function + * (and thus the wrong type), TA_BAD_PARAM will be immediatly returned. + * + * Although this mechanism looks complicated, it is written for being fairly solid. + * If you provide a wrong parameter value, or wrong type, or wrong pointer etc. the + * library shall return TA_BAD_PARAM or TA_BAD_OBJECT and not hang. + */ +typedef struct TA_ParamHolder +{ + /* Implementation is hidden. */ + void *hiddenData; +} TA_ParamHolder; + +TA_LIB_API TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle, + TA_ParamHolder **allocatedParams ); + +TA_LIB_API TA_RetCode TA_ParamHolderFree( TA_ParamHolder *params ); + +/* Setup the values of the data input parameters. + * + * paramIndex is zero for the first input. + */ +TA_LIB_API TA_RetCode TA_SetInputParamIntegerPtr( TA_ParamHolder *params, + unsigned int paramIndex, + const TA_Integer *value ); + +TA_LIB_API TA_RetCode TA_SetInputParamRealPtr( TA_ParamHolder *params, + unsigned int paramIndex, + const TA_Real *value ); + +TA_LIB_API TA_RetCode TA_SetInputParamPricePtr( TA_ParamHolder *params, + unsigned int paramIndex, + const TA_Real *open, + const TA_Real *high, + const TA_Real *low, + const TA_Real *close, + const TA_Real *volume, + const TA_Real *openInterest ); + +/* Setup the values of the optional input parameters. + * If an optional input is not set, a default value will be used. + * + * paramIndex is zero for the first optional input. + */ +TA_LIB_API TA_RetCode TA_SetOptInputParamInteger( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Integer optInValue ); + +TA_LIB_API TA_RetCode TA_SetOptInputParamReal( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Real optInValue ); + +/* Setup the parameters indicating where to store the output. + * + * The caller is responsible to allocate sufficient memory. A safe bet is to + * always do: nb of output elements == (endIdx-startIdx+1) + * + * paramIndex is zero for the first output. + * + */ +TA_LIB_API TA_RetCode TA_SetOutputParamIntegerPtr( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Integer *out ); + +TA_LIB_API TA_RetCode TA_SetOutputParamRealPtr( TA_ParamHolder *params, + unsigned int paramIndex, + TA_Real *out ); + +/* Once the optional parameter are set, it is possible to + * get the lookback for this call. This information can be + * used to calculate the optimal size for the output buffers. + * (See the documentation for method to calculate the output size). + */ +TA_LIB_API TA_RetCode TA_GetLookback( const TA_ParamHolder *params, + TA_Integer *lookback ); + +/* Finally, call the TA function with the parameters. + * + * The TA function who is going to be called was specified + * when the TA_ParamHolderAlloc was done. + */ +TA_LIB_API TA_RetCode TA_CallFunc( const TA_ParamHolder *params, + TA_Integer startIdx, + TA_Integer endIdx, + TA_Integer *outBegIdx, + TA_Integer *outNbElement ); + + +/* Return XML representation of all the TA functions. + * The returned array is the same as the ta_func_api.xml file. + */ +TA_LIB_API const char *TA_FunctionDescriptionXML( void ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/ta-lib/local/include/ta-lib/ta_common.h b/src/ta-lib/local/include/ta-lib/ta_common.h new file mode 100644 index 000000000..2679a5bd9 --- /dev/null +++ b/src/ta-lib/local/include/ta-lib/ta_common.h @@ -0,0 +1,160 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_COMMON_H +#define TA_COMMON_H + +/* The following macros are used to return internal errors. + * The Id can be from 1 to 999 and translate to the user + * as the return code 5000 to 5999. + * + * Everytime you wish to add a new fatal error code, + * use the "NEXT AVAILABLE NUMBER" and increment the + * number in this file. + * + * NEXT AVAILABLE NUMBER: 181 + */ +#define TA_INTERNAL_ERROR(Id) ((TA_RetCode)(TA_INTERNAL_ERROR+Id)) + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#ifndef TA_DEFS_H + #include "ta_defs.h" +#endif + +/* Some functions to get the version of TA-Lib. + * + * Format is "Major.Minor.Patch (Month Day Year Hour:Min:Sec)" + * + * Example: "1.2.0 (Jan 17 2004 23:59:59)" + * + * Major increments indicates an "Highly Recommended" update. + * + * Minor increments indicates arbitrary milestones in the + * development of the next major version. + * + * Patch are fixes to a "Major.Minor" release. + */ +TA_LIB_API const char *TA_GetVersionString( void ); + +/* Get individual component of the Version string */ +TA_LIB_API const char *TA_GetVersionMajor ( void ); +TA_LIB_API const char *TA_GetVersionMinor ( void ); +TA_LIB_API const char *TA_GetVersionPatch ( void ); +TA_LIB_API const char *TA_GetVersionDate ( void ); +TA_LIB_API const char *TA_GetVersionTime ( void ); + +/* Deprecated */ +TA_LIB_API const char *TA_GetVersionBuild ( void ); +TA_LIB_API const char *TA_GetVersionExtra ( void ); + +/* Misc. declaration used throughout the library code. */ +typedef double TA_Real; +typedef int TA_Integer; + +/* General purpose structure containing an array of string. + * + * Example of usage: + * void printStringTable( TA_StringTable *table ) + * { + * int i; + * for( i=0; i < table->size; i++ ) + * cout << table->string[i] << endl; + * } + * + */ +typedef struct TA_StringTable +{ + unsigned int size; /* Number of string. */ + const char **string; /* Pointer to the strings. */ + + /* Hidden data for internal use by TA-Lib. Do not modify. */ + void *hiddenData; +} TA_StringTable; +/* End-user can get additional information related to a TA_RetCode. + * + * Example: + * TA_RetCodeInfo info; + * + * retCode = TA_Initialize( ... ); + * + * if( retCode != TA_SUCCESS ) + * { + * TA_SetRetCodeInfo( retCode, &info ); + * printf( "Error %d(%s): %s\n", + * retCode, + * info.enumStr, + * info.infoStr ); + * } + * + * Would display: + * "Error 1(TA_LIB_NOT_INITIALIZE): TA_Initialize was not sucessfully called" + */ +typedef struct TA_RetCodeInfo +{ + const char *enumStr; /* Like "TA_LIB_NOT_INITIALIZE" */ + const char *infoStr; /* Like "TA_Initialize was not successfully called" */ +} TA_RetCodeInfo; + +/* Info is always returned, even when 'theRetCode' is invalid. */ +TA_LIB_API void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo ); + +/* TA_Initialize() initialize the ressources used by TA-Lib. This + * function must be called once prior to any other functions declared in + * this file. + * + * TA_Shutdown() allows to free all ressources used by TA-Lib. Following + * a shutdown, TA_Initialize() must be called again for re-using TA-Lib. + * + * TA_Shutdown() should be called prior to exiting the application code. + */ +TA_LIB_API TA_RetCode TA_Initialize( void ); +TA_LIB_API TA_RetCode TA_Shutdown( void ); + +/* TA_LIB_SOURCES_DIGEST helps for TA-Lib automated maintenance. + * + * This value is updated whenever a make, cmake or any source files + * modification should trig a repackaging of TA-Lib. + */ +#define TA_LIB_SOURCES_DIGEST f56bc6c0c0d72f1ee648897220e3ec3f + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/ta-lib/local/include/ta-lib/ta_defs.h b/src/ta-lib/local/include/ta-lib/ta_defs.h new file mode 100644 index 000000000..bae153c96 --- /dev/null +++ b/src/ta-lib/local/include/ta-lib/ta_defs.h @@ -0,0 +1,328 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_DEFS_H +#define TA_DEFS_H + +/*** The following block of code is to define: + *** + *** UInt32 : 32 bits unsigned integer. + *** Int32 : 32 bits signed integer. + *** UInt64 : 64 bits unsigned integer. + *** Int64 : 64 bits signed integer. + *** + *** INT_MIN : The minimal value for Int32 + *** INT_MAX : The maximal value for Int32 + ***/ +#ifndef FD_DEFS_H + #if defined( _MANAGED ) + /* Int32, UInt32, Int64 and UInt64 are built-in for .NET */ + #define INT_MIN (Int32::MinValue) + #define INT_MAX (Int32::MaxValue) + #elif defined( _JAVA ) || defined( _RUST ) + #define INT_MIN Integer.MIN_VALUE + #define INT_MAX Integer.MAX_VALUE + #else + #include + + /* Identify if 64 bits platform with __64BIT__. + * Can also be done from compiler command line. + */ + #if defined(_WIN64) + #define __64BIT__ 1 + #endif + + #if defined( __LP64__ ) || defined( _LP64 ) + #define __64BIT__ 1 + #endif + + /* Check also for some known GCC def for 64 bits platform. */ + #if defined(__alpha__)\ + ||defined(__ia64__)\ + ||defined(__ppc64__)\ + ||defined(__s390x__)\ + ||defined(__x86_64__) + #define __64BIT__ 1 + #endif + + #if !defined(__MACTYPES__) + typedef signed int Int32; + typedef unsigned int UInt32; + + #if defined(_WIN32) || defined(_WIN64) + /* See "Windows Data Types". Platform SDK. MSDN documentation. */ + typedef signed __int64 Int64; + typedef unsigned __int64 UInt64; + #else + #if defined(__64BIT__) + /* Standard LP64 model for 64 bits Unix platform. */ + typedef signed long Int64; + typedef unsigned long UInt64; + #else + /* Standard ILP32 model for 32 bits Unix platform. */ + typedef signed long long Int64; + typedef unsigned long long UInt64; + #endif + #endif + #endif + #endif +#endif + +/* Enumeration and macros to abstract syntax differences + * between C, C++, managed C++ and Java. + */ +#if defined( _MANAGED ) + + /* Enumeration abstraction */ + #define ENUM_BEGIN(w) enum class w { + #define ENUM_DEFINE(x,y) y + #define ENUM_VALUE(w,x,y) (w::y) + #define ENUM_CASE(w,x,y) (w::y) + #define ENUM_DECLARATION(w) w + #define ENUM_END(w) }; + + /* Structure abstraction */ + #define STRUCT_BEGIN(x) struct x { + #define STRUCT_END(x) }; + + /* Pointer/reference abstraction */ + #define VALUE_HANDLE_INT(name) int name + #define VALUE_HANDLE_DEREF(name) name + #define VALUE_HANDLE_DEREF_TO_ZERO(name) name = 0 + #define VALUE_HANDLE_OUT(name) name + + #define VALUE_HANDLE_GET(name) name + #define VALUE_HANDLE_SET(name,x) name = x + + /* Misc. */ + #define CONSTANT_DOUBLE(x) const double x + #define NAMESPACE(x) x:: + #define UNUSED_VARIABLE(x) (void)x + + #define TA_LIB_API + +#elif defined( _JAVA ) || defined( _RUST ) + + #define ENUM_BEGIN(w) public enum w { + #define ENUM_DEFINE(x,y) y + #define ENUM_VALUE(w,x,y) w.y + #define ENUM_CASE(w,x,y) y + #define ENUM_DECLARATION(w) w + #define ENUM_END(w) }; + + #define STRUCT_BEGIN(x) public class x { + #define STRUCT_END(x) }; + + #define VALUE_HANDLE_INT(name) MInteger name = new MInteger() + #define VALUE_HANDLE_DEREF(name) name.value + #define VALUE_HANDLE_DEREF_TO_ZERO(name) name.value = 0 + #define VALUE_HANDLE_OUT(name) name + + #define VALUE_HANDLE_GET(name) name.value + #define VALUE_HANDLE_SET(name,x) name.value = x + + #define CONSTANT_DOUBLE(x) final double x + #define NAMESPACE(x) x. + #define UNUSED_VARIABLE(x) + + #define TA_LIB_API + +#else + + #define ENUM_BEGIN(w) typedef enum { + #define ENUM_DEFINE(x,y) x + #define ENUM_VALUE(w,x,y) x + #define ENUM_CASE(w,x,y) x + #define ENUM_DECLARATION(w) TA_##w + #define ENUM_END(w) } TA_##w; + + #define STRUCT_BEGIN(x) typedef struct { + #define STRUCT_END(x) } x; + + #define VALUE_HANDLE_INT(name) int name + #define VALUE_HANDLE_DEREF(name) (*name) + #define VALUE_HANDLE_DEREF_TO_ZERO(name) (*name) = 0 + #define VALUE_HANDLE_OUT(name) &name + + #define VALUE_HANDLE_GET(name) name + #define VALUE_HANDLE_SET(name,x) name = x + + #define CONSTANT_DOUBLE(x) const double x + #define NAMESPACE(x) + #define UNUSED_VARIABLE(x) (void)x + + #ifdef _WIN32 + #ifdef TA_LIB_SHARED + #define TA_LIB_API __declspec(dllexport) + #else + #define TA_LIB_API + #endif + #elif defined(__GNUC__) && __GNUC__ >= 4 + #define TA_LIB_API __attribute__ ((visibility("default"))) + #else + #define TA_LIB_API + #endif +#endif + +/* Abstraction of function calls within the library. + * Needed because Java/.NET allows overloading, while for C the + * TA_PREFIX allows to select variant of the same function. + */ +#define FUNCTION_CALL(x) TA_PREFIX(x) +#define FUNCTION_CALL_DOUBLE(x) TA_##x +#define LOOKBACK_CALL(x) TA_##x##_Lookback + +/* min/max value for a TA_Integer */ +#define TA_INTEGER_MIN (INT_MIN+1) +#define TA_INTEGER_MAX (INT_MAX) + +/* min/max value for a TA_Real + * + * Use fix value making sense in the + * context of TA-Lib (avoid to use DBL_MIN + * and DBL_MAX standard macro because they + * are troublesome with some compiler). + */ +#define TA_REAL_MIN (-3e+37) +#define TA_REAL_MAX (3e+37) + +/* A value outside of the min/max range + * indicates an undefined or default value. + */ +#define TA_INTEGER_DEFAULT (INT_MIN) +#define TA_REAL_DEFAULT (-4e+37) + +/* Part of this file is generated by gen_code */ + +ENUM_BEGIN( RetCode ) + /* 0 */ ENUM_DEFINE( TA_SUCCESS, Success ), /* No error */ + /* 1 */ ENUM_DEFINE( TA_LIB_NOT_INITIALIZE, LibNotInitialize ), /* TA_Initialize was not sucessfully called */ + /* 2 */ ENUM_DEFINE( TA_BAD_PARAM, BadParam ), /* A parameter is out of range */ + /* 3 */ ENUM_DEFINE( TA_ALLOC_ERR, AllocErr ), /* Possibly out-of-memory */ + /* 4 */ ENUM_DEFINE( TA_GROUP_NOT_FOUND, GroupNotFound ), + /* 5 */ ENUM_DEFINE( TA_FUNC_NOT_FOUND, FuncNotFound ), + /* 6 */ ENUM_DEFINE( TA_INVALID_HANDLE, InvalidHandle ), + /* 7 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER, InvalidParamHolder ), + /* 8 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER_TYPE, InvalidParamHolderType ), + /* 9 */ ENUM_DEFINE( TA_INVALID_PARAM_FUNCTION, InvalidParamFunction ), + /* 10 */ ENUM_DEFINE( TA_INPUT_NOT_ALL_INITIALIZE, InputNotAllInitialize ), + /* 11 */ ENUM_DEFINE( TA_OUTPUT_NOT_ALL_INITIALIZE, OutputNotAllInitialize ), + /* 12 */ ENUM_DEFINE( TA_OUT_OF_RANGE_START_INDEX, OutOfRangeStartIndex ), + /* 13 */ ENUM_DEFINE( TA_OUT_OF_RANGE_END_INDEX, OutOfRangeEndIndex ), + /* 14 */ ENUM_DEFINE( TA_INVALID_LIST_TYPE, InvalidListType ), + /* 15 */ ENUM_DEFINE( TA_BAD_OBJECT, BadObject ), + /* 16 */ ENUM_DEFINE( TA_NOT_SUPPORTED, NotSupported ), + /* 5000 */ ENUM_DEFINE( TA_INTERNAL_ERROR, InternalError ) = 5000, + /* 0xFFFF */ ENUM_DEFINE( TA_UNKNOWN_ERR, UnknownErr ) = 0xFFFF +ENUM_END( RetCode ) + +ENUM_BEGIN( Compatibility ) + ENUM_DEFINE( TA_COMPATIBILITY_DEFAULT, Default ), + ENUM_DEFINE( TA_COMPATIBILITY_METASTOCK, Metastock ) +ENUM_END( Compatibility ) + +ENUM_BEGIN( MAType ) + ENUM_DEFINE( TA_MAType_SMA, Sma ) =0, + ENUM_DEFINE( TA_MAType_EMA, Ema ) =1, + ENUM_DEFINE( TA_MAType_WMA, Wma ) =2, + ENUM_DEFINE( TA_MAType_DEMA, Dema ) =3, + ENUM_DEFINE( TA_MAType_TEMA, Tema ) =4, + ENUM_DEFINE( TA_MAType_TRIMA, Trima ) =5, + ENUM_DEFINE( TA_MAType_KAMA, Kama ) =6, + ENUM_DEFINE( TA_MAType_MAMA, Mama ) =7, + ENUM_DEFINE( TA_MAType_T3, T3 ) =8 +ENUM_END( MAType ) + + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ ENUM_BEGIN( FuncUnstId ) +/* Generated */ /* 000 */ ENUM_DEFINE( TA_FUNC_UNST_ADX, Adx), +/* Generated */ /* 001 */ ENUM_DEFINE( TA_FUNC_UNST_ADXR, Adxr), +/* Generated */ /* 002 */ ENUM_DEFINE( TA_FUNC_UNST_ATR, Atr), +/* Generated */ /* 003 */ ENUM_DEFINE( TA_FUNC_UNST_CMO, Cmo), +/* Generated */ /* 004 */ ENUM_DEFINE( TA_FUNC_UNST_DX, Dx), +/* Generated */ /* 005 */ ENUM_DEFINE( TA_FUNC_UNST_EMA, Ema), +/* Generated */ /* 006 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPERIOD, HtDcPeriod), +/* Generated */ /* 007 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPHASE, HtDcPhase), +/* Generated */ /* 008 */ ENUM_DEFINE( TA_FUNC_UNST_HT_PHASOR, HtPhasor), +/* Generated */ /* 009 */ ENUM_DEFINE( TA_FUNC_UNST_HT_SINE, HtSine), +/* Generated */ /* 010 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDLINE, HtTrendline), +/* Generated */ /* 011 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDMODE, HtTrendMode), +/* Generated */ /* 012 */ ENUM_DEFINE( TA_FUNC_UNST_IMI, Imi), +/* Generated */ /* 013 */ ENUM_DEFINE( TA_FUNC_UNST_KAMA, Kama), +/* Generated */ /* 014 */ ENUM_DEFINE( TA_FUNC_UNST_MAMA, Mama), +/* Generated */ /* 015 */ ENUM_DEFINE( TA_FUNC_UNST_MFI, Mfi), +/* Generated */ /* 016 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DI, MinusDI), +/* Generated */ /* 017 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DM, MinusDM), +/* Generated */ /* 018 */ ENUM_DEFINE( TA_FUNC_UNST_NATR, Natr), +/* Generated */ /* 019 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DI, PlusDI), +/* Generated */ /* 020 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DM, PlusDM), +/* Generated */ /* 021 */ ENUM_DEFINE( TA_FUNC_UNST_RSI, Rsi), +/* Generated */ /* 022 */ ENUM_DEFINE( TA_FUNC_UNST_STOCHRSI, StochRsi), +/* Generated */ /* 023 */ ENUM_DEFINE( TA_FUNC_UNST_T3, T3), +/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll), +/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1 +/* Generated */ ENUM_END( FuncUnstId ) +/* Generated */ +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ + +/* The TA_RangeType enum specifies the types of range that can be considered + * when to compare a part of a candle to other candles + */ + +ENUM_BEGIN( RangeType ) + ENUM_DEFINE( TA_RangeType_RealBody, RealBody ), + ENUM_DEFINE( TA_RangeType_HighLow, HighLow ), + ENUM_DEFINE( TA_RangeType_Shadows, Shadows ) +ENUM_END( RangeType ) + +/* The TA_CandleSettingType enum specifies which kind of setting to consider; + * the settings are based on the parts of the candle and the common words + * indicating the length (short, long, very long) + */ +ENUM_BEGIN( CandleSettingType ) + ENUM_DEFINE( TA_BodyLong, BodyLong ), + ENUM_DEFINE( TA_BodyVeryLong, BodyVeryLong ), + ENUM_DEFINE( TA_BodyShort, BodyShort ), + ENUM_DEFINE( TA_BodyDoji, BodyDoji ), + ENUM_DEFINE( TA_ShadowLong, ShadowLong ), + ENUM_DEFINE( TA_ShadowVeryLong, ShadowVeryLong ), + ENUM_DEFINE( TA_ShadowShort, ShadowShort ), + ENUM_DEFINE( TA_ShadowVeryShort, ShadowVeryShort ), + ENUM_DEFINE( TA_Near, Near ), + ENUM_DEFINE( TA_Far, Far ), + ENUM_DEFINE( TA_Equal, Equal ), + ENUM_DEFINE( TA_AllCandleSettings, AllCandleSettings ) +ENUM_END( CandleSettingType ) + +#endif diff --git a/src/ta-lib/local/include/ta-lib/ta_func.h b/src/ta-lib/local/include/ta-lib/ta_func.h new file mode 100644 index 000000000..e01cc42e4 --- /dev/null +++ b/src/ta-lib/local/include/ta-lib/ta_func.h @@ -0,0 +1,5346 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_FUNC_H +#define TA_FUNC_H + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +/* This header contains the prototype of all the Technical Analysis + * function provided by TA-LIB. + */ + +/* TA-LIB Developer Note: Do not modify this file, it is automaticaly + * generated by gen_code. + */ +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef TA_DEFS_H + #include "ta_defs.h" +#endif + + +/* + * TA_ACCBANDS - Acceleration Bands + * + * Input = High, Low, Close + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ACCBANDS( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API TA_RetCode TA_S_ACCBANDS( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API int TA_ACCBANDS_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_ACOS - Vector Trigonometric ACos + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ACOS( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ACOS( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ACOS_Lookback( void ); + + +/* + * TA_AD - Chaikin A/D Line + * + * Input = High, Low, Close, Volume + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_AD( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + const double inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AD( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + const float inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AD_Lookback( void ); + + +/* + * TA_ADD - Vector Arithmetic Add + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ADD( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADD( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADD_Lookback( void ); + + +/* + * TA_ADOSC - Chaikin A/D Oscillator + * + * Input = High, Low, Close, Volume + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * + */ +TA_LIB_API TA_RetCode TA_ADOSC( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + const double inVolume[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADOSC( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + const float inVolume[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADOSC_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod ); /* From 2 to 100000 */ + + +/* + * TA_ADX - Average Directional Movement Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ADX( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADX( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_ADXR - Average Directional Movement Index Rating + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ADXR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ADXR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ADXR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_APO - Absolute Price Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_APO( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_APO( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_APO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_AROON - Aroon + * + * Input = High, Low + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_AROON( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outAroonDown[], + double outAroonUp[] ); + +TA_LIB_API TA_RetCode TA_S_AROON( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outAroonDown[], + double outAroonUp[] ); + +TA_LIB_API int TA_AROON_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_AROONOSC - Aroon Oscillator + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_AROONOSC( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AROONOSC( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AROONOSC_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_ASIN - Vector Trigonometric ASin + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ASIN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ASIN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ASIN_Lookback( void ); + + +/* + * TA_ATAN - Vector Trigonometric ATan + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_ATAN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ATAN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ATAN_Lookback( void ); + + +/* + * TA_ATR - Average True Range + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ATR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ATR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_AVGPRICE - Average Price + * + * Input = Open, High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_AVGPRICE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AVGPRICE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AVGPRICE_Lookback( void ); + + +/* + * TA_AVGDEV - Average Deviation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_AVGDEV( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_AVGDEV( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_AVGDEV_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_BBANDS - Bollinger Bands + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInNbDevUp:(From TA_REAL_MIN to TA_REAL_MAX) + * Deviation multiplier for upper band + * + * optInNbDevDn:(From TA_REAL_MIN to TA_REAL_MAX) + * Deviation multiplier for lower band + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_BBANDS( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API TA_RetCode TA_S_BBANDS( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outRealUpperBand[], + double outRealMiddleBand[], + double outRealLowerBand[] ); + +TA_LIB_API int TA_BBANDS_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ + TA_MAType optInMAType ); + +/* + * TA_BETA - Beta + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_BETA( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_BETA( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_BETA_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_BOP - Balance Of Power + * + * Input = Open, High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_BOP( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_BOP( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_BOP_Lookback( void ); + + +/* + * TA_CCI - Commodity Channel Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_CCI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CCI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CCI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_CDL2CROWS - Two Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL2CROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL2CROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL2CROWS_Lookback( void ); + + +/* + * TA_CDL3BLACKCROWS - Three Black Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3BLACKCROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3BLACKCROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3BLACKCROWS_Lookback( void ); + + +/* + * TA_CDL3INSIDE - Three Inside Up/Down + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3INSIDE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3INSIDE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3INSIDE_Lookback( void ); + + +/* + * TA_CDL3LINESTRIKE - Three-Line Strike + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3LINESTRIKE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3LINESTRIKE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3LINESTRIKE_Lookback( void ); + + +/* + * TA_CDL3OUTSIDE - Three Outside Up/Down + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3OUTSIDE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3OUTSIDE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3OUTSIDE_Lookback( void ); + + +/* + * TA_CDL3STARSINSOUTH - Three Stars In The South + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3STARSINSOUTH( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3STARSINSOUTH( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3STARSINSOUTH_Lookback( void ); + + +/* + * TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDL3WHITESOLDIERS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDL3WHITESOLDIERS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDL3WHITESOLDIERS_Lookback( void ); + + +/* + * TA_CDLABANDONEDBABY - Abandoned Baby + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLABANDONEDBABY( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLABANDONEDBABY( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLABANDONEDBABY_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLADVANCEBLOCK - Advance Block + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLADVANCEBLOCK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLADVANCEBLOCK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLADVANCEBLOCK_Lookback( void ); + + +/* + * TA_CDLBELTHOLD - Belt-hold + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLBELTHOLD( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLBELTHOLD( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLBELTHOLD_Lookback( void ); + + +/* + * TA_CDLBREAKAWAY - Breakaway + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLBREAKAWAY( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLBREAKAWAY( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLBREAKAWAY_Lookback( void ); + + +/* + * TA_CDLCLOSINGMARUBOZU - Closing Marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLCLOSINGMARUBOZU( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLCLOSINGMARUBOZU( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLCLOSINGMARUBOZU_Lookback( void ); + + +/* + * TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLCONCEALBABYSWALL( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLCONCEALBABYSWALL( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLCONCEALBABYSWALL_Lookback( void ); + + +/* + * TA_CDLCOUNTERATTACK - Counterattack + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLCOUNTERATTACK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLCOUNTERATTACK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLCOUNTERATTACK_Lookback( void ); + + +/* + * TA_CDLDARKCLOUDCOVER - Dark Cloud Cover + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLDARKCLOUDCOVER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDARKCLOUDCOVER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDARKCLOUDCOVER_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLDOJI - Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDOJI_Lookback( void ); + + +/* + * TA_CDLDOJISTAR - Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLDOJISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDOJISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDOJISTAR_Lookback( void ); + + +/* + * TA_CDLDRAGONFLYDOJI - Dragonfly Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLDRAGONFLYDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLDRAGONFLYDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLDRAGONFLYDOJI_Lookback( void ); + + +/* + * TA_CDLENGULFING - Engulfing Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLENGULFING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLENGULFING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLENGULFING_Lookback( void ); + + +/* + * TA_CDLEVENINGDOJISTAR - Evening Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLEVENINGDOJISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLEVENINGDOJISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLEVENINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLEVENINGSTAR - Evening Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLEVENINGSTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLEVENINGSTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLEVENINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLGAPSIDESIDEWHITE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLGAPSIDESIDEWHITE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLGAPSIDESIDEWHITE_Lookback( void ); + + +/* + * TA_CDLGRAVESTONEDOJI - Gravestone Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLGRAVESTONEDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLGRAVESTONEDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLGRAVESTONEDOJI_Lookback( void ); + + +/* + * TA_CDLHAMMER - Hammer + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHAMMER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHAMMER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHAMMER_Lookback( void ); + + +/* + * TA_CDLHANGINGMAN - Hanging Man + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHANGINGMAN( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHANGINGMAN( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHANGINGMAN_Lookback( void ); + + +/* + * TA_CDLHARAMI - Harami Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHARAMI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHARAMI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHARAMI_Lookback( void ); + + +/* + * TA_CDLHARAMICROSS - Harami Cross Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHARAMICROSS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHARAMICROSS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHARAMICROSS_Lookback( void ); + + +/* + * TA_CDLHIGHWAVE - High-Wave Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHIGHWAVE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHIGHWAVE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHIGHWAVE_Lookback( void ); + + +/* + * TA_CDLHIKKAKE - Hikkake Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHIKKAKE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHIKKAKE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHIKKAKE_Lookback( void ); + + +/* + * TA_CDLHIKKAKEMOD - Modified Hikkake Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHIKKAKEMOD( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHIKKAKEMOD( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHIKKAKEMOD_Lookback( void ); + + +/* + * TA_CDLHOMINGPIGEON - Homing Pigeon + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLHOMINGPIGEON( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLHOMINGPIGEON( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLHOMINGPIGEON_Lookback( void ); + + +/* + * TA_CDLIDENTICAL3CROWS - Identical Three Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLIDENTICAL3CROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLIDENTICAL3CROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLIDENTICAL3CROWS_Lookback( void ); + + +/* + * TA_CDLINNECK - In-Neck Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLINNECK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLINNECK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLINNECK_Lookback( void ); + + +/* + * TA_CDLINVERTEDHAMMER - Inverted Hammer + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLINVERTEDHAMMER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLINVERTEDHAMMER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLINVERTEDHAMMER_Lookback( void ); + + +/* + * TA_CDLKICKING - Kicking + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLKICKING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLKICKING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLKICKING_Lookback( void ); + + +/* + * TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLKICKINGBYLENGTH( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLKICKINGBYLENGTH( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLKICKINGBYLENGTH_Lookback( void ); + + +/* + * TA_CDLLADDERBOTTOM - Ladder Bottom + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLLADDERBOTTOM( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLLADDERBOTTOM( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLLADDERBOTTOM_Lookback( void ); + + +/* + * TA_CDLLONGLEGGEDDOJI - Long Legged Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLLONGLEGGEDDOJI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLLONGLEGGEDDOJI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLLONGLEGGEDDOJI_Lookback( void ); + + +/* + * TA_CDLLONGLINE - Long Line Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLLONGLINE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLLONGLINE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLLONGLINE_Lookback( void ); + + +/* + * TA_CDLMARUBOZU - Marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLMARUBOZU( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMARUBOZU( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMARUBOZU_Lookback( void ); + + +/* + * TA_CDLMATCHINGLOW - Matching Low + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLMATCHINGLOW( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMATCHINGLOW( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMATCHINGLOW_Lookback( void ); + + +/* + * TA_CDLMATHOLD - Mat Hold + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLMATHOLD( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMATHOLD( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMATHOLD_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLMORNINGDOJISTAR - Morning Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLMORNINGDOJISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMORNINGDOJISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMORNINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLMORNINGSTAR - Morning Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +TA_LIB_API TA_RetCode TA_CDLMORNINGSTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLMORNINGSTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + double optInPenetration, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLMORNINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_CDLONNECK - On-Neck Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLONNECK( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLONNECK( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLONNECK_Lookback( void ); + + +/* + * TA_CDLPIERCING - Piercing Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLPIERCING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLPIERCING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLPIERCING_Lookback( void ); + + +/* + * TA_CDLRICKSHAWMAN - Rickshaw Man + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLRICKSHAWMAN( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLRICKSHAWMAN( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLRICKSHAWMAN_Lookback( void ); + + +/* + * TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLRISEFALL3METHODS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLRISEFALL3METHODS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLRISEFALL3METHODS_Lookback( void ); + + +/* + * TA_CDLSEPARATINGLINES - Separating Lines + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSEPARATINGLINES( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSEPARATINGLINES( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSEPARATINGLINES_Lookback( void ); + + +/* + * TA_CDLSHOOTINGSTAR - Shooting Star + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSHOOTINGSTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSHOOTINGSTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSHOOTINGSTAR_Lookback( void ); + + +/* + * TA_CDLSHORTLINE - Short Line Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSHORTLINE( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSHORTLINE( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSHORTLINE_Lookback( void ); + + +/* + * TA_CDLSPINNINGTOP - Spinning Top + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSPINNINGTOP( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSPINNINGTOP( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSPINNINGTOP_Lookback( void ); + + +/* + * TA_CDLSTALLEDPATTERN - Stalled Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSTALLEDPATTERN( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSTALLEDPATTERN( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSTALLEDPATTERN_Lookback( void ); + + +/* + * TA_CDLSTICKSANDWICH - Stick Sandwich + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLSTICKSANDWICH( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLSTICKSANDWICH( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLSTICKSANDWICH_Lookback( void ); + + +/* + * TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTAKURI( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTAKURI( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTAKURI_Lookback( void ); + + +/* + * TA_CDLTASUKIGAP - Tasuki Gap + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTASUKIGAP( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTASUKIGAP( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTASUKIGAP_Lookback( void ); + + +/* + * TA_CDLTHRUSTING - Thrusting Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTHRUSTING( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTHRUSTING( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTHRUSTING_Lookback( void ); + + +/* + * TA_CDLTRISTAR - Tristar Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLTRISTAR( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLTRISTAR( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLTRISTAR_Lookback( void ); + + +/* + * TA_CDLUNIQUE3RIVER - Unique 3 River + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLUNIQUE3RIVER( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLUNIQUE3RIVER( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLUNIQUE3RIVER_Lookback( void ); + + +/* + * TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLUPSIDEGAP2CROWS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLUPSIDEGAP2CROWS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLUPSIDEGAP2CROWS_Lookback( void ); + + +/* + * TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods + * + * Input = Open, High, Low, Close + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_CDLXSIDEGAP3METHODS( int startIdx, + int endIdx, + const double inOpen[], + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_CDLXSIDEGAP3METHODS( int startIdx, + int endIdx, + const float inOpen[], + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_CDLXSIDEGAP3METHODS_Lookback( void ); + + +/* + * TA_CEIL - Vector Ceil + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_CEIL( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CEIL( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CEIL_Lookback( void ); + + +/* + * TA_CMO - Chande Momentum Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_CMO( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CMO( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CMO_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_CORREL - Pearson's Correlation Coefficient (r) + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_CORREL( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_CORREL( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_CORREL_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_COS - Vector Trigonometric Cos + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_COS( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_COS( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_COS_Lookback( void ); + + +/* + * TA_COSH - Vector Trigonometric Cosh + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_COSH( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_COSH( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_COSH_Lookback( void ); + + +/* + * TA_DEMA - Double Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_DEMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_DEMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_DEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_DIV - Vector Arithmetic Div + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_DIV( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_DIV( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_DIV_Lookback( void ); + + +/* + * TA_DX - Directional Movement Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_DX( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_DX( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_DX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_EMA - Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_EMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_EMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_EMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_EXP - Vector Arithmetic Exp + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_EXP( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_EXP( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_EXP_Lookback( void ); + + +/* + * TA_FLOOR - Vector Floor + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_FLOOR( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_FLOOR( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_FLOOR_Lookback( void ); + + +/* + * TA_HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_HT_DCPERIOD( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_HT_DCPERIOD( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_HT_DCPERIOD_Lookback( void ); + + +/* + * TA_HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_HT_DCPHASE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_HT_DCPHASE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_HT_DCPHASE_Lookback( void ); + + +/* + * TA_HT_PHASOR - Hilbert Transform - Phasor Components + * + * Input = double + * Output = double, double + * + */ +TA_LIB_API TA_RetCode TA_HT_PHASOR( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outInPhase[], + double outQuadrature[] ); + +TA_LIB_API TA_RetCode TA_S_HT_PHASOR( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outInPhase[], + double outQuadrature[] ); + +TA_LIB_API int TA_HT_PHASOR_Lookback( void ); + + +/* + * TA_HT_SINE - Hilbert Transform - SineWave + * + * Input = double + * Output = double, double + * + */ +TA_LIB_API TA_RetCode TA_HT_SINE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outSine[], + double outLeadSine[] ); + +TA_LIB_API TA_RetCode TA_S_HT_SINE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outSine[], + double outLeadSine[] ); + +TA_LIB_API int TA_HT_SINE_Lookback( void ); + + +/* + * TA_HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_HT_TRENDLINE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_HT_TRENDLINE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_HT_TRENDLINE_Lookback( void ); + + +/* + * TA_HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode + * + * Input = double + * Output = int + * + */ +TA_LIB_API TA_RetCode TA_HT_TRENDMODE( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_HT_TRENDMODE( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_HT_TRENDMODE_Lookback( void ); + + +/* + * TA_IMI - Intraday Momentum Index + * + * Input = Open, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_IMI( int startIdx, + int endIdx, + const double inOpen[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_IMI( int startIdx, + int endIdx, + const float inOpen[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_IMI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_KAMA - Kaufman Adaptive Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_KAMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_KAMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_KAMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG - Linear Regression + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG_ANGLE - Linear Regression Angle + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG_ANGLE( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG_ANGLE( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_ANGLE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG_INTERCEPT - Linear Regression Intercept + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG_INTERCEPT( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG_INTERCEPT( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_INTERCEPT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LINEARREG_SLOPE - Linear Regression Slope + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_LINEARREG_SLOPE( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LINEARREG_SLOPE( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LINEARREG_SLOPE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_LN - Vector Log Natural + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_LN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LN_Lookback( void ); + + +/* + * TA_LOG10 - Vector Log10 + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_LOG10( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_LOG10( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_LOG10_Lookback( void ); + + +/* + * TA_MA - Moving average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_MA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MA_Lookback( int optInTimePeriod, /* From 1 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_MACD - Moving Average Convergence/Divergence + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * + */ +TA_LIB_API TA_RetCode TA_MACD( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API TA_RetCode TA_S_MACD( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API int TA_MACD_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + int optInSignalPeriod ); /* From 1 to 100000 */ + + +/* + * TA_MACDEXT - MACD with controllable MA type + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInFastMAType: + * Type of Moving Average for fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInSlowMAType: + * Type of Moving Average for slow MA + * + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * optInSignalMAType: + * Type of Moving Average for signal line + * + * + */ +TA_LIB_API TA_RetCode TA_MACDEXT( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + TA_MAType optInFastMAType, + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInSlowMAType, + int optInSignalPeriod, /* From 1 to 100000 */ + TA_MAType optInSignalMAType, + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API TA_RetCode TA_S_MACDEXT( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + TA_MAType optInFastMAType, + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInSlowMAType, + int optInSignalPeriod, /* From 1 to 100000 */ + TA_MAType optInSignalMAType, + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API int TA_MACDEXT_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + TA_MAType optInFastMAType, + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInSlowMAType, + int optInSignalPeriod, /* From 1 to 100000 */ + TA_MAType optInSignalMAType ); + +/* + * TA_MACDFIX - Moving Average Convergence/Divergence Fix 12/26 + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * + */ +TA_LIB_API TA_RetCode TA_MACDFIX( int startIdx, + int endIdx, + const double inReal[], + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API TA_RetCode TA_S_MACDFIX( int startIdx, + int endIdx, + const float inReal[], + int optInSignalPeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ); + +TA_LIB_API int TA_MACDFIX_Lookback( int optInSignalPeriod ); /* From 1 to 100000 */ + + +/* + * TA_MAMA - MESA Adaptive Moving Average + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastLimit:(From 0.01 to 0.99) + * Upper limit use in the adaptive algorithm + * + * optInSlowLimit:(From 0.01 to 0.99) + * Lower limit use in the adaptive algorithm + * + * + */ +TA_LIB_API TA_RetCode TA_MAMA( int startIdx, + int endIdx, + const double inReal[], + double optInFastLimit, /* From 0.01 to 0.99 */ + double optInSlowLimit, /* From 0.01 to 0.99 */ + int *outBegIdx, + int *outNBElement, + double outMAMA[], + double outFAMA[] ); + +TA_LIB_API TA_RetCode TA_S_MAMA( int startIdx, + int endIdx, + const float inReal[], + double optInFastLimit, /* From 0.01 to 0.99 */ + double optInSlowLimit, /* From 0.01 to 0.99 */ + int *outBegIdx, + int *outNBElement, + double outMAMA[], + double outFAMA[] ); + +TA_LIB_API int TA_MAMA_Lookback( double optInFastLimit, /* From 0.01 to 0.99 */ + double optInSlowLimit ); /* From 0.01 to 0.99 */ + + +/* + * TA_MAVP - Moving average with variable period + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInMinPeriod:(From 2 to 100000) + * Value less than minimum will be changed to Minimum period + * + * optInMaxPeriod:(From 2 to 100000) + * Value higher than maximum will be changed to Maximum period + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_MAVP( int startIdx, + int endIdx, + const double inReal[], + const double inPeriods[], + int optInMinPeriod, /* From 2 to 100000 */ + int optInMaxPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MAVP( int startIdx, + int endIdx, + const float inReal[], + const float inPeriods[], + int optInMinPeriod, /* From 2 to 100000 */ + int optInMaxPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MAVP_Lookback( int optInMinPeriod, /* From 2 to 100000 */ + int optInMaxPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_MAX - Highest value over a specified period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MAX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MAX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MAXINDEX - Index of highest value over a specified period + * + * Input = double + * Output = int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MAXINDEX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_MAXINDEX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_MAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MEDPRICE - Median Price + * + * Input = High, Low + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_MEDPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MEDPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MEDPRICE_Lookback( void ); + + +/* + * TA_MFI - Money Flow Index + * + * Input = High, Low, Close, Volume + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MFI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + const double inVolume[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MFI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + const float inVolume[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MFI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MIDPOINT - MidPoint over period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MIDPOINT( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MIDPOINT( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MIDPOINT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MIDPRICE - Midpoint Price over period + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MIDPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MIDPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MIDPRICE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MIN - Lowest value over a specified period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MIN( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MIN( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MIN_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MININDEX - Index of lowest value over a specified period + * + * Input = double + * Output = int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MININDEX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API TA_RetCode TA_S_MININDEX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outInteger[] ); + +TA_LIB_API int TA_MININDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MINMAX - Lowest and highest values over a specified period + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINMAX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMin[], + double outMax[] ); + +TA_LIB_API TA_RetCode TA_S_MINMAX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outMin[], + double outMax[] ); + +TA_LIB_API int TA_MINMAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MINMAXINDEX - Indexes of lowest and highest values over a specified period + * + * Input = double + * Output = int, int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINMAXINDEX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outMinIdx[], + int outMaxIdx[] ); + +TA_LIB_API TA_RetCode TA_S_MINMAXINDEX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + int outMinIdx[], + int outMaxIdx[] ); + +TA_LIB_API int TA_MINMAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_MINUS_DI - Minus Directional Indicator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINUS_DI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MINUS_DI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MINUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_MINUS_DM - Minus Directional Movement + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MINUS_DM( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MINUS_DM( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MINUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_MOM - Momentum + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_MOM( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MOM( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MOM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_MULT - Vector Arithmetic Mult + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_MULT( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_MULT( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_MULT_Lookback( void ); + + +/* + * TA_NATR - Normalized Average True Range + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_NATR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_NATR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_NATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_OBV - On Balance Volume + * + * Input = double, Volume + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_OBV( int startIdx, + int endIdx, + const double inReal[], + const double inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_OBV( int startIdx, + int endIdx, + const float inReal[], + const float inVolume[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_OBV_Lookback( void ); + + +/* + * TA_PLUS_DI - Plus Directional Indicator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_PLUS_DI( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_PLUS_DI( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_PLUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_PLUS_DM - Plus Directional Movement + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_PLUS_DM( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_PLUS_DM( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_PLUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_PPO - Percentage Price Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInMAType: + * Type of Moving Average + * + * + */ +TA_LIB_API TA_RetCode TA_PPO( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_PPO( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType, + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_PPO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ + int optInSlowPeriod, /* From 2 to 100000 */ + TA_MAType optInMAType ); + +/* + * TA_ROC - Rate of change : ((price/prevPrice)-1)*100 + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROC( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROC( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROC_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROCP( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROCP( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROCP_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_ROCR - Rate of change ratio: (price/prevPrice) + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROCR( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROCR( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROCR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100 + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_ROCR100( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ROCR100( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ROCR100_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_RSI - Relative Strength Index + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_RSI( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_RSI( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_RSI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_SAR - Parabolic SAR + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInAcceleration:(From 0 to TA_REAL_MAX) + * Acceleration Factor used up to the Maximum value + * + * optInMaximum:(From 0 to TA_REAL_MAX) + * Acceleration Factor Maximum value + * + * + */ +TA_LIB_API TA_RetCode TA_SAR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + double optInAcceleration, /* From 0 to TA_REAL_MAX */ + double optInMaximum, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SAR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + double optInAcceleration, /* From 0 to TA_REAL_MAX */ + double optInMaximum, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SAR_Lookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ + double optInMaximum ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_SAREXT - Parabolic SAR - Extended + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInStartValue:(From TA_REAL_MIN to TA_REAL_MAX) + * Start value and direction. 0 for Auto, >0 for Long, <0 for Short + * + * optInOffsetOnReverse:(From 0 to TA_REAL_MAX) + * Percent offset added/removed to initial stop on short/long reversal + * + * optInAccelerationInitLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor initial value for the Long direction + * + * optInAccelerationLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor for the Long direction + * + * optInAccelerationMaxLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor maximum value for the Long direction + * + * optInAccelerationInitShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor initial value for the Short direction + * + * optInAccelerationShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor for the Short direction + * + * optInAccelerationMaxShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor maximum value for the Short direction + * + * + */ +TA_LIB_API TA_RetCode TA_SAREXT( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SAREXT( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SAREXT_Lookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ + double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ + double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ + double optInAccelerationMaxShort ); /* From 0 to TA_REAL_MAX */ + + +/* + * TA_SIN - Vector Trigonometric Sin + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SIN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SIN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SIN_Lookback( void ); + + +/* + * TA_SINH - Vector Trigonometric Sinh + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SINH( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SINH( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SINH_Lookback( void ); + + +/* + * TA_SMA - Simple Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_SMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_SQRT - Vector Square Root + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SQRT( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SQRT( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SQRT_Lookback( void ); + + +/* + * TA_STDDEV - Standard Deviation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) + * Nb of deviations + * + * + */ +TA_LIB_API TA_RetCode TA_STDDEV( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_STDDEV( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_STDDEV_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ + + +/* + * TA_STOCH - Stochastic + * + * Input = High, Low, Close + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInSlowK_Period:(From 1 to 100000) + * Smoothing for making the Slow-K line. Usually set to 3 + * + * optInSlowK_MAType: + * Type of Moving Average for Slow-K + * + * optInSlowD_Period:(From 1 to 100000) + * Smoothing for making the Slow-D line + * + * optInSlowD_MAType: + * Type of Moving Average for Slow-D + * + * + */ +TA_LIB_API TA_RetCode TA_STOCH( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInSlowK_Period, /* From 1 to 100000 */ + TA_MAType optInSlowK_MAType, + int optInSlowD_Period, /* From 1 to 100000 */ + TA_MAType optInSlowD_MAType, + int *outBegIdx, + int *outNBElement, + double outSlowK[], + double outSlowD[] ); + +TA_LIB_API TA_RetCode TA_S_STOCH( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInSlowK_Period, /* From 1 to 100000 */ + TA_MAType optInSlowK_MAType, + int optInSlowD_Period, /* From 1 to 100000 */ + TA_MAType optInSlowD_MAType, + int *outBegIdx, + int *outNBElement, + double outSlowK[], + double outSlowD[] ); + +TA_LIB_API int TA_STOCH_Lookback( int optInFastK_Period, /* From 1 to 100000 */ + int optInSlowK_Period, /* From 1 to 100000 */ + TA_MAType optInSlowK_MAType, + int optInSlowD_Period, /* From 1 to 100000 */ + TA_MAType optInSlowD_MAType ); + +/* + * TA_STOCHF - Stochastic Fast + * + * Input = High, Low, Close + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInFastD_Period:(From 1 to 100000) + * Smoothing for making the Fast-D line. Usually set to 3 + * + * optInFastD_MAType: + * Type of Moving Average for Fast-D + * + * + */ +TA_LIB_API TA_RetCode TA_STOCHF( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API TA_RetCode TA_S_STOCHF( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API int TA_STOCHF_Lookback( int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType ); + +/* + * TA_STOCHRSI - Stochastic Relative Strength Index + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInFastD_Period:(From 1 to 100000) + * Smoothing for making the Fast-D line. Usually set to 3 + * + * optInFastD_MAType: + * Type of Moving Average for Fast-D + * + * + */ +TA_LIB_API TA_RetCode TA_STOCHRSI( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API TA_RetCode TA_S_STOCHRSI( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType, + int *outBegIdx, + int *outNBElement, + double outFastK[], + double outFastD[] ); + +TA_LIB_API int TA_STOCHRSI_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + int optInFastK_Period, /* From 1 to 100000 */ + int optInFastD_Period, /* From 1 to 100000 */ + TA_MAType optInFastD_MAType ); + +/* + * TA_SUB - Vector Arithmetic Subtraction + * + * Input = double, double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_SUB( int startIdx, + int endIdx, + const double inReal0[], + const double inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SUB( int startIdx, + int endIdx, + const float inReal0[], + const float inReal1[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SUB_Lookback( void ); + + +/* + * TA_SUM - Summation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_SUM( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_SUM( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_SUM_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_T3 - Triple Exponential Moving Average (T3) + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInVFactor:(From 0 to 1) + * Volume Factor + * + * + */ +TA_LIB_API TA_RetCode TA_T3( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInVFactor, /* From 0 to 1 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_T3( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + double optInVFactor, /* From 0 to 1 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_T3_Lookback( int optInTimePeriod, /* From 2 to 100000 */ + double optInVFactor ); /* From 0 to 1 */ + + +/* + * TA_TAN - Vector Trigonometric Tan + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TAN( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TAN( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TAN_Lookback( void ); + + +/* + * TA_TANH - Vector Trigonometric Tanh + * + * Input = double + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TANH( int startIdx, + int endIdx, + const double inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TANH( int startIdx, + int endIdx, + const float inReal[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TANH_Lookback( void ); + + +/* + * TA_TEMA - Triple Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TEMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TEMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_TRANGE - True Range + * + * Input = High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TRANGE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TRANGE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TRANGE_Lookback( void ); + + +/* + * TA_TRIMA - Triangular Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TRIMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TRIMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TRIMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TRIX( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TRIX( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TRIX_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ + + +/* + * TA_TSF - Time Series Forecast + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_TSF( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TSF( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TSF_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_TYPPRICE - Typical Price + * + * Input = High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_TYPPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_TYPPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_TYPPRICE_Lookback( void ); + + +/* + * TA_ULTOSC - Ultimate Oscillator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod1:(From 1 to 100000) + * Number of bars for 1st period. + * + * optInTimePeriod2:(From 1 to 100000) + * Number of bars fro 2nd period + * + * optInTimePeriod3:(From 1 to 100000) + * Number of bars for 3rd period + * + * + */ +TA_LIB_API TA_RetCode TA_ULTOSC( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod1, /* From 1 to 100000 */ + int optInTimePeriod2, /* From 1 to 100000 */ + int optInTimePeriod3, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_ULTOSC( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod1, /* From 1 to 100000 */ + int optInTimePeriod2, /* From 1 to 100000 */ + int optInTimePeriod3, /* From 1 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_ULTOSC_Lookback( int optInTimePeriod1, /* From 1 to 100000 */ + int optInTimePeriod2, /* From 1 to 100000 */ + int optInTimePeriod3 ); /* From 1 to 100000 */ + + +/* + * TA_VAR - Variance + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) + * Nb of deviations + * + * + */ +TA_LIB_API TA_RetCode TA_VAR( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_VAR( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 1 to 100000 */ + double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_VAR_Lookback( int optInTimePeriod, /* From 1 to 100000 */ + double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ + + +/* + * TA_WCLPRICE - Weighted Close Price + * + * Input = High, Low, Close + * Output = double + * + */ +TA_LIB_API TA_RetCode TA_WCLPRICE( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_WCLPRICE( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_WCLPRICE_Lookback( void ); + + +/* + * TA_WILLR - Williams' %R + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_WILLR( int startIdx, + int endIdx, + const double inHigh[], + const double inLow[], + const double inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_WILLR( int startIdx, + int endIdx, + const float inHigh[], + const float inLow[], + const float inClose[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_WILLR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* + * TA_WMA - Weighted Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +TA_LIB_API TA_RetCode TA_WMA( int startIdx, + int endIdx, + const double inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API TA_RetCode TA_S_WMA( int startIdx, + int endIdx, + const float inReal[], + int optInTimePeriod, /* From 2 to 100000 */ + int *outBegIdx, + int *outNBElement, + double outReal[] ); + +TA_LIB_API int TA_WMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ + + +/* Some TA functions takes a certain amount of input data + * before stabilizing and outputing meaningful data. This is + * a behavior pertaining to the algo of some TA functions and + * is not particular to the TA-Lib implementation. + * TA-Lib allows you to automatically strip off these unstabl + * data from your output and from any internal processing. + * (See documentation for more info) + * + * Examples: + * TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 30 ); + * Always strip off 30 price bar for the TA_EMA function. + * + * TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 30 ); + * Always strip off 30 price bar from ALL functions + * having an unstable period. + * + * See ta_defs.h for the enumeration TA_FuncUnstId + */ + +TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id, + unsigned int unstablePeriod ); + +unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id ); + +/* You can change slightly the behavior of the TA functions + * by requesting compatibiliy with some existing software. + * + * By default, the behavior is as close as the original + * author of the TA functions intend it to be. + * + * See ta_defs.h for the enumeration TA_Compatibility. + */ +TA_RetCode TA_SetCompatibility( TA_Compatibility value ); +TA_Compatibility TA_GetCompatibility( void ); + +/* Candlesticks struct and functions + * Because candlestick patterns are subjective, it is necessary + * to allow the user to specify what should be the meaning of + * 'long body', 'short shadows', etc. + */ + +/* Call TA_SetCandleSettings to set that when comparing a candle + * basing on settingType it must be compared with the average + * of the last avgPeriod candles' rangeType multiplied by factor. + * This setting is valid until TA_RestoreCandleDefaultSettings is called + */ +TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, + TA_RangeType rangeType, + int avgPeriod, + double factor ); + +/* Call TA_RestoreCandleDefaultSettings after using custom settings + * to restore the default settings for the specified settingType + */ +TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType ); + +#ifdef __cplusplus +} +#endif + +#endif + +/***************/ +/* End of File */ +/***************/ + diff --git a/src/ta-lib/local/include/ta-lib/ta_libc.h b/src/ta-lib/local/include/ta-lib/ta_libc.h new file mode 100644 index 000000000..6c1c0bef2 --- /dev/null +++ b/src/ta-lib/local/include/ta-lib/ta_libc.h @@ -0,0 +1,51 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef TA_LIBC_H +#define TA_LIBC_H + +/* Includes all headers needed for using the ta-lib 'C' library. */ + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +#ifndef TA_FUNC_H + #include "ta_func.h" +#endif + +#ifndef TA_ABSTRACT_H + #include "ta_abstract.h" +#endif + +#endif + diff --git a/src/ta-lib/src/Makefile.am b/src/ta-lib/src/Makefile.am new file mode 100644 index 000000000..0ef437226 --- /dev/null +++ b/src/ta-lib/src/Makefile.am @@ -0,0 +1,12 @@ +AUTOMAKE_OPTIONS = foreign 1.4 +SUBDIRS = ta_abstract ta_common ta_func + +lib_LTLIBRARIES = libta-lib.la + +libta_lib_la_SOURCES = + +libta_lib_la_LIBADD = \ + ta_abstract/libta_abstract.la \ + ta_func/libta_func.la \ + ta_common/libta_common.la + diff --git a/src/ta-lib/src/ta_abstract/Makefile.am b/src/ta-lib/src/ta_abstract/Makefile.am new file mode 100644 index 000000000..53d57eb28 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/Makefile.am @@ -0,0 +1,48 @@ + +noinst_LTLIBRARIES = libta_abstract.la libta_abstract_gc.la + +libta_abstract_la_SOURCES = ta_group_idx.c \ + ta_def_ui.c \ + ta_abstract.c \ + ta_func_api.c \ + frames/ta_frame.c \ + tables/table_a.c \ + tables/table_b.c \ + tables/table_c.c \ + tables/table_d.c \ + tables/table_e.c \ + tables/table_f.c \ + tables/table_g.c \ + tables/table_h.c \ + tables/table_i.c \ + tables/table_j.c \ + tables/table_k.c \ + tables/table_l.c \ + tables/table_m.c \ + tables/table_n.c \ + tables/table_o.c \ + tables/table_p.c \ + tables/table_q.c \ + tables/table_r.c \ + tables/table_s.c \ + tables/table_t.c \ + tables/table_u.c \ + tables/table_v.c \ + tables/table_w.c \ + tables/table_x.c \ + tables/table_y.c \ + tables/table_z.c + +libta_abstract_gc_la_SOURCES = $(libta_abstract_la_SOURCES) + +libta_abstract_gc_la_LDFLAGS = $(libta_abstract_la_LDFLAGS) + +libta_abstract_la_CPPFLAGS = -I../ta_common/ -Iframes/ + +# The 'gc' version is a minimal version used to just to compile gen_code +libta_abstract_gc_la_CPPFLAGS = -DTA_GEN_CODE $(libta_abstract_la_CPPFLAGS) + +libta_abstractdir=$(includedir)/ta-lib/ +libta_abstract_HEADERS = ../../include/ta_defs.h \ + ../../include/ta_libc.h \ + ../../include/ta_abstract.h diff --git a/src/ta-lib/src/ta_abstract/frames/ta_frame.c b/src/ta-lib/src/ta_abstract/frames/ta_frame.c new file mode 100644 index 000000000..9b38b5382 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/frames/ta_frame.c @@ -0,0 +1,3469 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Note: This file is generated by gencode, do not + * modify directly. + */ + +/* The function define in this file allows to have a consistent + * framework for calling all the TA function through + * the TA_CallFunc mechanism. + * + * See "ta_abstract.h" + */ + +#ifndef TA_FUNC_H + #include "ta_func.h" +#endif + +#ifndef TA_FRAME_PRIV_H + #include "ta_frame_priv.h" +#endif + +#ifndef TA_FRAME_H + #include "ta_frame.h" +#endif + +/* NEVER CALL directly these functions! Use TA_CallFunc. */ + +/* Generated */ TA_RetCode TA_ACCBANDS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ACCBANDS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outRealUpperBand */ +/* Generated */ params->out[1].data.outReal, /* outRealMiddleBand */ +/* Generated */ params->out[2].data.outReal /* outRealLowerBand */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ACCBANDS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ACCBANDS_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ACOS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ACOS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ACOS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_ACOS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_AD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_AD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->in[0].data.inPrice.volume, /* inVolume */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_AD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_AD_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ADD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ADD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal0 */ +/* Generated */ params->in[1].data.inReal, /* inReal1 */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ADD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_ADD_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ADOSC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ADOSC( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->in[0].data.inPrice.volume, /* inVolume */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ADOSC_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ADOSC_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger /* optInSlowPeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ADX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ADX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ADX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ADX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ADXR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ADXR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ADXR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ADXR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_APO_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_APO( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInMAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_APO_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_APO_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInMAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_AROON_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_AROON( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outAroonDown */ +/* Generated */ params->out[1].data.outReal /* outAroonUp */ ); +/* Generated */ } +/* Generated */ unsigned int TA_AROON_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_AROON_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_AROONOSC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_AROONOSC( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_AROONOSC_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_AROONOSC_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ASIN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ASIN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ASIN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_ASIN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ATAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ATAN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ATAN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_ATAN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ATR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ATR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ATR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ATR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_AVGPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_AVGPRICE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_AVGPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_AVGPRICE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_AVGDEV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_AVGDEV( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_AVGDEV_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_AVGDEV_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_BBANDS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_BBANDS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInNbDevUp*/ +/* Generated */ params->optIn[2].data.optInReal, /* optInNbDevDn*/ +/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInMAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outRealUpperBand */ +/* Generated */ params->out[1].data.outReal, /* outRealMiddleBand */ +/* Generated */ params->out[2].data.outReal /* outRealLowerBand */ ); +/* Generated */ } +/* Generated */ unsigned int TA_BBANDS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_BBANDS_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInNbDevUp*/ +/* Generated */ params->optIn[2].data.optInReal, /* optInNbDevDn*/ +/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger /* optInMAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_BETA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_BETA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal0 */ +/* Generated */ params->in[1].data.inReal, /* inReal1 */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_BETA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_BETA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_BOP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_BOP( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_BOP_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_BOP_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CCI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CCI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CCI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CCI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL2CROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL2CROWS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL2CROWS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL3BLACKCROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL3BLACKCROWS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL3BLACKCROWS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL3BLACKCROWS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL3INSIDE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL3INSIDE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL3INSIDE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL3INSIDE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL3LINESTRIKE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL3LINESTRIKE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL3LINESTRIKE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL3LINESTRIKE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL3OUTSIDE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL3OUTSIDE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL3OUTSIDE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL3OUTSIDE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL3STARSINSOUTH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL3STARSINSOUTH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL3STARSINSOUTH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL3STARSINSOUTH_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDL3WHITESOLDIERS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDL3WHITESOLDIERS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDL3WHITESOLDIERS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDL3WHITESOLDIERS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLABANDONEDBABY_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLABANDONEDBABY( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLABANDONEDBABY_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLABANDONEDBABY_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLADVANCEBLOCK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLADVANCEBLOCK( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLADVANCEBLOCK_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLADVANCEBLOCK_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLBELTHOLD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLBELTHOLD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLBELTHOLD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLBELTHOLD_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLBREAKAWAY_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLBREAKAWAY( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLBREAKAWAY_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLBREAKAWAY_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLCLOSINGMARUBOZU_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLCLOSINGMARUBOZU( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLCLOSINGMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLCLOSINGMARUBOZU_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLCONCEALBABYSWALL_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLCONCEALBABYSWALL( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLCONCEALBABYSWALL_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLCONCEALBABYSWALL_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLCOUNTERATTACK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLCOUNTERATTACK( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLCOUNTERATTACK_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLCOUNTERATTACK_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLDARKCLOUDCOVER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLDARKCLOUDCOVER( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLDARKCLOUDCOVER_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLDARKCLOUDCOVER_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLDOJI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLDOJI_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLDOJISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLDOJISTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLDOJISTAR_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLDRAGONFLYDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLDRAGONFLYDOJI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLDRAGONFLYDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLDRAGONFLYDOJI_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLENGULFING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLENGULFING( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLENGULFING_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLENGULFING_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLEVENINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLEVENINGDOJISTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLEVENINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLEVENINGDOJISTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLEVENINGSTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLEVENINGSTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLEVENINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLEVENINGSTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLGAPSIDESIDEWHITE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLGAPSIDESIDEWHITE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLGAPSIDESIDEWHITE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLGAPSIDESIDEWHITE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLGRAVESTONEDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLGRAVESTONEDOJI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLGRAVESTONEDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLGRAVESTONEDOJI_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHAMMER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHAMMER( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHAMMER_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHANGINGMAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHANGINGMAN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHANGINGMAN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHANGINGMAN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHARAMI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHARAMI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHARAMI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHARAMI_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHARAMICROSS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHARAMICROSS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHARAMICROSS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHARAMICROSS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHIGHWAVE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHIGHWAVE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHIGHWAVE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHIGHWAVE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHIKKAKE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHIKKAKE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHIKKAKE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHIKKAKE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHIKKAKEMOD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHIKKAKEMOD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHIKKAKEMOD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHIKKAKEMOD_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLHOMINGPIGEON_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLHOMINGPIGEON( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLHOMINGPIGEON_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLHOMINGPIGEON_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLIDENTICAL3CROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLIDENTICAL3CROWS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLIDENTICAL3CROWS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLIDENTICAL3CROWS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLINNECK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLINNECK( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLINNECK_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLINNECK_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLINVERTEDHAMMER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLINVERTEDHAMMER( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLINVERTEDHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLINVERTEDHAMMER_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLKICKING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLKICKING( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLKICKING_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLKICKING_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLKICKINGBYLENGTH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLKICKINGBYLENGTH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLKICKINGBYLENGTH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLKICKINGBYLENGTH_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLLADDERBOTTOM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLLADDERBOTTOM( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLLADDERBOTTOM_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLLADDERBOTTOM_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLLONGLEGGEDDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLLONGLEGGEDDOJI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLLONGLEGGEDDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLLONGLEGGEDDOJI_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLLONGLINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLLONGLINE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLLONGLINE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLLONGLINE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLMARUBOZU_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLMARUBOZU( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLMARUBOZU_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLMATCHINGLOW_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLMATCHINGLOW( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLMATCHINGLOW_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLMATCHINGLOW_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLMATHOLD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLMATHOLD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLMATHOLD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLMATHOLD_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLMORNINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLMORNINGDOJISTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLMORNINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLMORNINGDOJISTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLMORNINGSTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLMORNINGSTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLMORNINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CDLMORNINGSTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLONNECK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLONNECK( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLONNECK_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLONNECK_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLPIERCING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLPIERCING( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLPIERCING_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLPIERCING_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLRICKSHAWMAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLRICKSHAWMAN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLRICKSHAWMAN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLRICKSHAWMAN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLRISEFALL3METHODS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLRISEFALL3METHODS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLRISEFALL3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLRISEFALL3METHODS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLSEPARATINGLINES_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLSEPARATINGLINES( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLSEPARATINGLINES_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLSEPARATINGLINES_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLSHOOTINGSTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLSHOOTINGSTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLSHOOTINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLSHOOTINGSTAR_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLSHORTLINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLSHORTLINE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLSHORTLINE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLSHORTLINE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLSPINNINGTOP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLSPINNINGTOP( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLSPINNINGTOP_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLSPINNINGTOP_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLSTALLEDPATTERN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLSTALLEDPATTERN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLSTALLEDPATTERN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLSTALLEDPATTERN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLSTICKSANDWICH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLSTICKSANDWICH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLSTICKSANDWICH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLSTICKSANDWICH_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLTAKURI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLTAKURI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLTAKURI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLTAKURI_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLTASUKIGAP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLTASUKIGAP( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLTASUKIGAP_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLTASUKIGAP_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLTHRUSTING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLTHRUSTING( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLTHRUSTING_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLTHRUSTING_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLTRISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLTRISTAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLTRISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLTRISTAR_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLUNIQUE3RIVER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLUNIQUE3RIVER( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLUNIQUE3RIVER_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLUNIQUE3RIVER_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLUPSIDEGAP2CROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLUPSIDEGAP2CROWS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLUPSIDEGAP2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLUPSIDEGAP2CROWS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CDLXSIDEGAP3METHODS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CDLXSIDEGAP3METHODS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CDLXSIDEGAP3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CDLXSIDEGAP3METHODS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CEIL_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CEIL( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CEIL_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_CEIL_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CMO_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CMO( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CMO_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CMO_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_CORREL_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_CORREL( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal0 */ +/* Generated */ params->in[1].data.inReal, /* inReal1 */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_CORREL_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_CORREL_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_COS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_COS( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_COS_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_COS_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_COSH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_COSH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_COSH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_COSH_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_DEMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_DEMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_DEMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_DEMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_DIV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_DIV( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal0 */ +/* Generated */ params->in[1].data.inReal, /* inReal1 */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_DIV_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_DIV_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_DX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_DX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_DX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_DX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_EMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_EMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_EMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_EMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_EXP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_EXP( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_EXP_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_EXP_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_FLOOR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_FLOOR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_FLOOR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_FLOOR_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_HT_DCPERIOD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_HT_DCPERIOD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_HT_DCPERIOD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_HT_DCPERIOD_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_HT_DCPHASE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_HT_DCPHASE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_HT_DCPHASE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_HT_DCPHASE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_HT_PHASOR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_HT_PHASOR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outInPhase */ +/* Generated */ params->out[1].data.outReal /* outQuadrature */ ); +/* Generated */ } +/* Generated */ unsigned int TA_HT_PHASOR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_HT_PHASOR_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_HT_SINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_HT_SINE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outSine */ +/* Generated */ params->out[1].data.outReal /* outLeadSine */ ); +/* Generated */ } +/* Generated */ unsigned int TA_HT_SINE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_HT_SINE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_HT_TRENDLINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_HT_TRENDLINE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_HT_TRENDLINE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_HT_TRENDLINE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_HT_TRENDMODE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_HT_TRENDMODE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_HT_TRENDMODE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_HT_TRENDMODE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_IMI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_IMI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_IMI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_IMI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_KAMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_KAMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_KAMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_KAMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_LINEARREG_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_LINEARREG( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_LINEARREG_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_LINEARREG_ANGLE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_ANGLE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_LINEARREG_ANGLE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_ANGLE_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_LINEARREG_INTERCEPT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_INTERCEPT( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_LINEARREG_INTERCEPT_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_INTERCEPT_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_LINEARREG_SLOPE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_SLOPE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_LINEARREG_SLOPE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_LINEARREG_SLOPE_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_LN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_LN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_LN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_LN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_LOG10_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_LOG10( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_LOG10_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_LOG10_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger, /* optInMAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MA_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger /* optInMAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MACD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MACD( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ params->optIn[2].data.optInInteger, /* optInSignalPeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outMACD */ +/* Generated */ params->out[1].data.outReal, /* outMACDSignal */ +/* Generated */ params->out[2].data.outReal /* outMACDHist */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MACD_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MACD_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ params->optIn[2].data.optInInteger /* optInSignalPeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MACDEXT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MACDEXT( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger, /* optInFastMAType*/ +/* Generated */ params->optIn[2].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInSlowMAType*/ +/* Generated */ params->optIn[4].data.optInInteger, /* optInSignalPeriod*/ +/* Generated */ (TA_MAType)params->optIn[5].data.optInInteger, /* optInSignalMAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outMACD */ +/* Generated */ params->out[1].data.outReal, /* outMACDSignal */ +/* Generated */ params->out[2].data.outReal /* outMACDHist */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MACDEXT_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MACDEXT_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger, /* optInFastMAType*/ +/* Generated */ params->optIn[2].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInSlowMAType*/ +/* Generated */ params->optIn[4].data.optInInteger, /* optInSignalPeriod*/ +/* Generated */ (TA_MAType)params->optIn[5].data.optInInteger /* optInSignalMAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MACDFIX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MACDFIX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInSignalPeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outMACD */ +/* Generated */ params->out[1].data.outReal, /* outMACDSignal */ +/* Generated */ params->out[2].data.outReal /* outMACDHist */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MACDFIX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MACDFIX_Lookback(params->optIn[0].data.optInInteger /* optInSignalPeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MAMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MAMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInReal, /* optInFastLimit*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInSlowLimit*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outMAMA */ +/* Generated */ params->out[1].data.outReal /* outFAMA */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MAMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MAMA_Lookback(params->optIn[0].data.optInReal, /* optInFastLimit*/ +/* Generated */ params->optIn[1].data.optInReal /* optInSlowLimit*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MAVP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MAVP( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->in[1].data.inReal, /* inPeriods */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInMinPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInMaxPeriod*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInMAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MAVP_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MAVP_Lookback(params->optIn[0].data.optInInteger, /* optInMinPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInMaxPeriod*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInMAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MAX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MAX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MAX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MAX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MAXINDEX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MAXINDEX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MAXINDEX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MEDPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MEDPRICE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MEDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_MEDPRICE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MFI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MFI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->in[0].data.inPrice.volume, /* inVolume */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MFI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MFI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MIDPOINT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MIDPOINT( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MIDPOINT_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MIDPOINT_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MIDPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MIDPRICE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MIDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MIDPRICE_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MIN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MIN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MIN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MIN_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MININDEX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MININDEX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger /* outInteger */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MININDEX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MININDEX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MINMAX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MINMAX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outMin */ +/* Generated */ params->out[1].data.outReal /* outMax */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MINMAX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MINMAX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MINMAXINDEX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MINMAXINDEX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outInteger, /* outMinIdx */ +/* Generated */ params->out[1].data.outInteger /* outMaxIdx */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MINMAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MINMAXINDEX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MINUS_DI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MINUS_DI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MINUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MINUS_DI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MINUS_DM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MINUS_DM( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MINUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MINUS_DM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MOM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MOM( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MOM_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_MOM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_MULT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_MULT( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal0 */ +/* Generated */ params->in[1].data.inReal, /* inReal1 */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_MULT_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_MULT_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_NATR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_NATR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_NATR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_NATR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_OBV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_OBV( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->in[1].data.inPrice.volume, /* inVolume */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_OBV_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_OBV_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_PLUS_DI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_PLUS_DI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_PLUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_PLUS_DI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_PLUS_DM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_PLUS_DM( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_PLUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_PLUS_DM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_PPO_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_PPO( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInMAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_PPO_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_PPO_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInMAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ROC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ROC( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ROC_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ROC_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ROCP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ROCP( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ROCP_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ROCP_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ROCR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ROCR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ROCR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ROCR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ROCR100_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ROCR100( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ROCR100_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ROCR100_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_RSI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_RSI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_RSI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_RSI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInReal, /* optInAcceleration*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInMaximum*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_SAR_Lookback(params->optIn[0].data.optInReal, /* optInAcceleration*/ +/* Generated */ params->optIn[1].data.optInReal /* optInMaximum*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SAREXT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SAREXT( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->optIn[0].data.optInReal, /* optInStartValue*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInOffsetOnReverse*/ +/* Generated */ params->optIn[2].data.optInReal, /* optInAccelerationInitLong*/ +/* Generated */ params->optIn[3].data.optInReal, /* optInAccelerationLong*/ +/* Generated */ params->optIn[4].data.optInReal, /* optInAccelerationMaxLong*/ +/* Generated */ params->optIn[5].data.optInReal, /* optInAccelerationInitShort*/ +/* Generated */ params->optIn[6].data.optInReal, /* optInAccelerationShort*/ +/* Generated */ params->optIn[7].data.optInReal, /* optInAccelerationMaxShort*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SAREXT_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_SAREXT_Lookback(params->optIn[0].data.optInReal, /* optInStartValue*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInOffsetOnReverse*/ +/* Generated */ params->optIn[2].data.optInReal, /* optInAccelerationInitLong*/ +/* Generated */ params->optIn[3].data.optInReal, /* optInAccelerationLong*/ +/* Generated */ params->optIn[4].data.optInReal, /* optInAccelerationMaxLong*/ +/* Generated */ params->optIn[5].data.optInReal, /* optInAccelerationInitShort*/ +/* Generated */ params->optIn[6].data.optInReal, /* optInAccelerationShort*/ +/* Generated */ params->optIn[7].data.optInReal /* optInAccelerationMaxShort*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SIN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SIN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SIN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_SIN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SINH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SINH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SINH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_SINH_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_SMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SQRT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SQRT( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SQRT_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_SQRT_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_STDDEV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_STDDEV( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInNbDev*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_STDDEV_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_STDDEV_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal /* optInNbDev*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_STOCH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_STOCH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastK_Period*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowK_Period*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInSlowK_MAType*/ +/* Generated */ params->optIn[3].data.optInInteger, /* optInSlowD_Period*/ +/* Generated */ (TA_MAType)params->optIn[4].data.optInInteger, /* optInSlowD_MAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outSlowK */ +/* Generated */ params->out[1].data.outReal /* outSlowD */ ); +/* Generated */ } +/* Generated */ unsigned int TA_STOCH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_STOCH_Lookback(params->optIn[0].data.optInInteger, /* optInFastK_Period*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowK_Period*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInSlowK_MAType*/ +/* Generated */ params->optIn[3].data.optInInteger, /* optInSlowD_Period*/ +/* Generated */ (TA_MAType)params->optIn[4].data.optInInteger /* optInSlowD_MAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_STOCHF_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_STOCHF( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInFastK_Period*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInFastD_Period*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInFastD_MAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outFastK */ +/* Generated */ params->out[1].data.outReal /* outFastD */ ); +/* Generated */ } +/* Generated */ unsigned int TA_STOCHF_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_STOCHF_Lookback(params->optIn[0].data.optInInteger, /* optInFastK_Period*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInFastD_Period*/ +/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInFastD_MAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_STOCHRSI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_STOCHRSI( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInFastK_Period*/ +/* Generated */ params->optIn[2].data.optInInteger, /* optInFastD_Period*/ +/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInFastD_MAType*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal, /* outFastK */ +/* Generated */ params->out[1].data.outReal /* outFastD */ ); +/* Generated */ } +/* Generated */ unsigned int TA_STOCHRSI_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_STOCHRSI_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInFastK_Period*/ +/* Generated */ params->optIn[2].data.optInInteger, /* optInFastD_Period*/ +/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger /* optInFastD_MAType*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SUB_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SUB( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal0 */ +/* Generated */ params->in[1].data.inReal, /* inReal1 */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SUB_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_SUB_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_SUM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_SUM( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_SUM_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_SUM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_T3_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_T3( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInVFactor*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_T3_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_T3_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal /* optInVFactor*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TAN( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TAN_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_TAN_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TANH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TANH( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TANH_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_TANH_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TEMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TEMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TEMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_TEMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TRANGE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TRANGE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TRANGE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_TRANGE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TRIMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TRIMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TRIMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_TRIMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TRIX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TRIX( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TRIX_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_TRIX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TSF_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TSF( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TSF_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_TSF_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_TYPPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_TYPPRICE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_TYPPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_TYPPRICE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_ULTOSC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_ULTOSC( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod1*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInTimePeriod2*/ +/* Generated */ params->optIn[2].data.optInInteger, /* optInTimePeriod3*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_ULTOSC_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_ULTOSC_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod1*/ +/* Generated */ params->optIn[1].data.optInInteger, /* optInTimePeriod2*/ +/* Generated */ params->optIn[2].data.optInInteger /* optInTimePeriod3*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_VAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_VAR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal, /* optInNbDev*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_VAR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_VAR_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ params->optIn[1].data.optInReal /* optInNbDev*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_WCLPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_WCLPRICE( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_WCLPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ (void)params; +/* Generated */ return TA_WCLPRICE_Lookback( ); +/* Generated */ } +/* Generated */ TA_RetCode TA_WILLR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_WILLR( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ +/* Generated */ params->in[0].data.inPrice.low, /* inLow */ +/* Generated */ params->in[0].data.inPrice.close, /* inClose */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_WILLR_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_WILLR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } +/* Generated */ TA_RetCode TA_WMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +/* Generated */ { +/* Generated */ return TA_WMA( +/* Generated */ startIdx, +/* Generated */ endIdx, +/* Generated */ params->in[0].data.inReal, /* inReal */ +/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ params->out[0].data.outReal /* outReal */ ); +/* Generated */ } +/* Generated */ unsigned int TA_WMA_FramePPLB( const TA_ParamHolderPriv *params ) +/* Generated */ { +/* Generated */ return TA_WMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); +/* Generated */ } + +/***************/ +/* End of File */ +/***************/ diff --git a/src/ta-lib/src/ta_abstract/frames/ta_frame.h b/src/ta-lib/src/ta_abstract/frames/ta_frame.h new file mode 100644 index 000000000..33b2a5899 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/frames/ta_frame.h @@ -0,0 +1,1508 @@ +/* TA-LIB Copyright (c) 1999-2007, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TA_FRAME_H +#define TA_FRAME_H + +/* Note: This file is generated by gencode, do not + * modify directly. + */ + +/* The function define in this file allows to call a TA + * function through the TA_CallFunc mechanism. + */ + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +#ifndef TA_FRAME_PRIV_H + #include "ta_frame_priv.h" +#endif + + +/* Generated */ TA_RetCode TA_ACCBANDS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ACCBANDS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ACOS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ACOS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_AD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_AD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ADD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ADD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ADOSC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ADOSC_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ADX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ADX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ADXR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ADXR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_APO_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_APO_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_AROON_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_AROON_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_AROONOSC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_AROONOSC_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ASIN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ASIN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ATAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ATAN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ATR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ATR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_AVGPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_AVGPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_AVGDEV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_AVGDEV_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_BBANDS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_BBANDS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_BETA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_BETA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_BOP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_BOP_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CCI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CCI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL2CROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL3BLACKCROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL3BLACKCROWS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL3INSIDE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL3INSIDE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL3LINESTRIKE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL3LINESTRIKE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL3OUTSIDE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL3OUTSIDE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL3STARSINSOUTH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL3STARSINSOUTH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDL3WHITESOLDIERS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDL3WHITESOLDIERS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLABANDONEDBABY_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLABANDONEDBABY_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLADVANCEBLOCK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLADVANCEBLOCK_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLBELTHOLD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLBELTHOLD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLBREAKAWAY_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLBREAKAWAY_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLCLOSINGMARUBOZU_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLCLOSINGMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLCONCEALBABYSWALL_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLCONCEALBABYSWALL_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLCOUNTERATTACK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLCOUNTERATTACK_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLDARKCLOUDCOVER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLDARKCLOUDCOVER_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLDOJISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLDRAGONFLYDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLDRAGONFLYDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLENGULFING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLENGULFING_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLEVENINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLEVENINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLEVENINGSTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLEVENINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLGAPSIDESIDEWHITE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLGAPSIDESIDEWHITE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLGRAVESTONEDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLGRAVESTONEDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHAMMER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHANGINGMAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHANGINGMAN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHARAMI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHARAMI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHARAMICROSS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHARAMICROSS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHIGHWAVE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHIGHWAVE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHIKKAKE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHIKKAKE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHIKKAKEMOD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHIKKAKEMOD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLHOMINGPIGEON_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLHOMINGPIGEON_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLIDENTICAL3CROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLIDENTICAL3CROWS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLINNECK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLINNECK_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLINVERTEDHAMMER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLINVERTEDHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLKICKING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLKICKING_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLKICKINGBYLENGTH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLKICKINGBYLENGTH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLLADDERBOTTOM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLLADDERBOTTOM_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLLONGLEGGEDDOJI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLLONGLEGGEDDOJI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLLONGLINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLLONGLINE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLMARUBOZU_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLMATCHINGLOW_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLMATCHINGLOW_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLMATHOLD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLMATHOLD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLMORNINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLMORNINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLMORNINGSTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLMORNINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLONNECK_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLONNECK_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLPIERCING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLPIERCING_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLRICKSHAWMAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLRICKSHAWMAN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLRISEFALL3METHODS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLRISEFALL3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLSEPARATINGLINES_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLSEPARATINGLINES_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLSHOOTINGSTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLSHOOTINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLSHORTLINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLSHORTLINE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLSPINNINGTOP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLSPINNINGTOP_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLSTALLEDPATTERN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLSTALLEDPATTERN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLSTICKSANDWICH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLSTICKSANDWICH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLTAKURI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLTAKURI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLTASUKIGAP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLTASUKIGAP_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLTHRUSTING_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLTHRUSTING_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLTRISTAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLTRISTAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLUNIQUE3RIVER_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLUNIQUE3RIVER_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLUPSIDEGAP2CROWS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLUPSIDEGAP2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CDLXSIDEGAP3METHODS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CDLXSIDEGAP3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CEIL_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CEIL_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CMO_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CMO_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_CORREL_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_CORREL_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_COS_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_COS_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_COSH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_COSH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_DEMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_DEMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_DIV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_DIV_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_DX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_DX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_EMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_EMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_EXP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_EXP_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_FLOOR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_FLOOR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_HT_DCPERIOD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_HT_DCPERIOD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_HT_DCPHASE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_HT_DCPHASE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_HT_PHASOR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_HT_PHASOR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_HT_SINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_HT_SINE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_HT_TRENDLINE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_HT_TRENDLINE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_HT_TRENDMODE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_HT_TRENDMODE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_IMI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_IMI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_KAMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_KAMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_LINEARREG_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_LINEARREG_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_LINEARREG_ANGLE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_LINEARREG_ANGLE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_LINEARREG_INTERCEPT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_LINEARREG_INTERCEPT_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_LINEARREG_SLOPE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_LINEARREG_SLOPE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_LN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_LN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_LOG10_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_LOG10_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MACD_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MACD_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MACDEXT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MACDEXT_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MACDFIX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MACDFIX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MAMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MAMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MAVP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MAVP_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MAX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MAX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MAXINDEX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MEDPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MEDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MFI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MFI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MIDPOINT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MIDPOINT_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MIDPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MIDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MIN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MIN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MININDEX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MININDEX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MINMAX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MINMAX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MINMAXINDEX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MINMAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MINUS_DI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MINUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MINUS_DM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MINUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MOM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MOM_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_MULT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_MULT_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_NATR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_NATR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_OBV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_OBV_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_PLUS_DI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_PLUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_PLUS_DM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_PLUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_PPO_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_PPO_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ROC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ROC_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ROCP_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ROCP_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ROCR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ROCR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ROCR100_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ROCR100_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_RSI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_RSI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SAREXT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SAREXT_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SIN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SIN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SINH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SINH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SQRT_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SQRT_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_STDDEV_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_STDDEV_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_STOCH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_STOCH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_STOCHF_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_STOCHF_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_STOCHRSI_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_STOCHRSI_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SUB_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SUB_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_SUM_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_SUM_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_T3_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_T3_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TAN_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TAN_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TANH_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TANH_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TEMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TEMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TRANGE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TRANGE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TRIMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TRIMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TRIX_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TRIX_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TSF_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TSF_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_TYPPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_TYPPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_ULTOSC_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_ULTOSC_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_VAR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_VAR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_WCLPRICE_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_WCLPRICE_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_WILLR_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_WILLR_FramePPLB( const TA_ParamHolderPriv *params ) +; + +/* Generated */ TA_RetCode TA_WMA_FramePP( const TA_ParamHolderPriv *params, +/* Generated */ int startIdx, +/* Generated */ int endIdx, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement ) +; +/* Generated */ unsigned int TA_WMA_FramePPLB( const TA_ParamHolderPriv *params ) +; + + +#endif + +/***************/ +/* End of File */ +/***************/ diff --git a/src/ta-lib/src/ta_abstract/ta_abstract.c b/src/ta-lib/src/ta_abstract/ta_abstract.c new file mode 100644 index 000000000..100b18ae7 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_abstract.c @@ -0,0 +1,1313 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 020101 MF First version. + * 110302 MF Re-design the interface related to TA_CallFunc for being + * faster and use less memory allocation. + * 022904 MF Add TA_GetLookback + * 031404 MF Some function renaming for consistency and better + * Perl integration. + * 110206 AC Change volume and open interest to double + */ + +/* Description: + * Provide a way to abstract the call of the TA functions. + */ + +/**** Headers ****/ +#include +#include +#include +#include "ta_common.h" +#include "ta_memory.h" +#include "ta_abstract.h" +#include "ta_def_ui.h" +#include "ta_frame_priv.h" + +#include + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ + +/* The interface definition of all functions are accessible + * through one of the following 26 tables. + */ +extern const TA_FuncDef *TA_DEF_TableA, *TA_DEF_TableB, *TA_DEF_TableC, + *TA_DEF_TableD, *TA_DEF_TableE, *TA_DEF_TableF, + *TA_DEF_TableG, *TA_DEF_TableH, *TA_DEF_TableI, + *TA_DEF_TableJ, *TA_DEF_TableK, *TA_DEF_TableL, + *TA_DEF_TableM, *TA_DEF_TableN, *TA_DEF_TableO, + *TA_DEF_TableP, *TA_DEF_TableQ, *TA_DEF_TableR, + *TA_DEF_TableS, *TA_DEF_TableT, *TA_DEF_TableU, + *TA_DEF_TableV, *TA_DEF_TableW, *TA_DEF_TableX, + *TA_DEF_TableY, *TA_DEF_TableZ; + +extern const unsigned int TA_DEF_TableASize, TA_DEF_TableBSize, + TA_DEF_TableCSize, TA_DEF_TableDSize, + TA_DEF_TableESize, TA_DEF_TableFSize, + TA_DEF_TableGSize, TA_DEF_TableHSize, + TA_DEF_TableISize, TA_DEF_TableJSize, + TA_DEF_TableKSize, TA_DEF_TableLSize, + TA_DEF_TableMSize, TA_DEF_TableNSize, + TA_DEF_TableOSize, TA_DEF_TablePSize, + TA_DEF_TableQSize, TA_DEF_TableRSize, + TA_DEF_TableSSize, TA_DEF_TableTSize, + TA_DEF_TableUSize, TA_DEF_TableVSize, + TA_DEF_TableWSize, TA_DEF_TableXSize, + TA_DEF_TableYSize, TA_DEF_TableZSize; + +#ifndef TA_GEN_CODE + /* In gen_code, these value does not exist (they are generated by + * gen_code itself!) + * Consequently, the code, when being used to make the gen_code + * executable, must provide the same functionality without using + * these shortcuts. + */ + extern const TA_FuncDef **TA_PerGroupFuncDef[]; + extern const unsigned int TA_PerGroupSize[]; +#endif + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +#ifndef min + #define min(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +typedef struct +{ + unsigned int magicNumber; +} TA_StringTablePriv; + + +/**** Local functions declarations. ****/ + + +#ifdef TA_GEN_CODE + static TA_RetCode getGroupId( const char *groupString, unsigned int *groupId ); + static TA_RetCode getGroupSize( TA_GroupId groupId, unsigned int *groupSize ); + static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, + unsigned int idx, + const char **stringPtr ); +#else + static TA_RetCode getGroupId( const char *groupString, unsigned int *groupId ); + static TA_RetCode getGroupSize( TA_GroupId groupId, unsigned int *groupSize ); + static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, + unsigned int idx, + const char **stringPtr ); +#endif + +/**** Local variables definitions. ****/ + +static const TA_FuncDef **TA_DEF_Tables[26] = +{ + &TA_DEF_TableA, &TA_DEF_TableB, &TA_DEF_TableC, &TA_DEF_TableD, &TA_DEF_TableE, + &TA_DEF_TableF, &TA_DEF_TableG, &TA_DEF_TableH, &TA_DEF_TableI, &TA_DEF_TableJ, + &TA_DEF_TableK, &TA_DEF_TableL, &TA_DEF_TableM, &TA_DEF_TableN, &TA_DEF_TableO, + &TA_DEF_TableP, &TA_DEF_TableQ, &TA_DEF_TableR, &TA_DEF_TableS, &TA_DEF_TableT, + &TA_DEF_TableU, &TA_DEF_TableV, &TA_DEF_TableW, &TA_DEF_TableX, &TA_DEF_TableY, + &TA_DEF_TableZ +}; + +static const unsigned int *TA_DEF_TablesSize[26] = +{ + &TA_DEF_TableASize, &TA_DEF_TableBSize, &TA_DEF_TableCSize, + &TA_DEF_TableDSize, &TA_DEF_TableESize, &TA_DEF_TableFSize, + &TA_DEF_TableGSize, &TA_DEF_TableHSize, &TA_DEF_TableISize, + &TA_DEF_TableJSize, &TA_DEF_TableKSize, &TA_DEF_TableLSize, + &TA_DEF_TableMSize, &TA_DEF_TableNSize, &TA_DEF_TableOSize, + &TA_DEF_TablePSize, &TA_DEF_TableQSize, &TA_DEF_TableRSize, + &TA_DEF_TableSSize, &TA_DEF_TableTSize, &TA_DEF_TableUSize, + &TA_DEF_TableVSize, &TA_DEF_TableWSize, &TA_DEF_TableXSize, + &TA_DEF_TableYSize, &TA_DEF_TableZSize +}; + +/**** Global functions definitions. ****/ +TA_RetCode TA_GroupTableAlloc( TA_StringTable **table ) +{ + TA_StringTable *stringTable; + TA_StringTablePriv *stringTablePriv; + + if( table == NULL ) + { + return TA_BAD_PARAM; + } + + stringTable = (TA_StringTable *)TA_Malloc( sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); + if( !stringTable ) + { + *table = NULL; + return TA_ALLOC_ERR; + } + + memset( stringTable, 0, sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); + stringTablePriv = (TA_StringTablePriv *)(((char *)stringTable)+sizeof(TA_StringTable)); + stringTablePriv->magicNumber = TA_STRING_TABLE_GROUP_MAGIC_NB; + + stringTable->size = TA_NB_GROUP_ID; + stringTable->string = &TA_GroupString[0]; + stringTable->hiddenData = stringTablePriv; + + /* From this point, TA_FuncTableFree can be safely called. */ + + /* Success. Return the table to the caller. */ + *table = stringTable; + + return TA_SUCCESS; +} + +TA_RetCode TA_GroupTableFree( TA_StringTable *table ) +{ + TA_StringTablePriv *stringTablePriv; + + if( table ) + { + stringTablePriv = (TA_StringTablePriv *)table->hiddenData; + if( !stringTablePriv ) + { + return TA_INTERNAL_ERROR(1); + } + + if( stringTablePriv->magicNumber != TA_STRING_TABLE_GROUP_MAGIC_NB ) + { + return TA_BAD_OBJECT; + } + + TA_Free( table ); + } + + return TA_SUCCESS; +} + +/* Iterate in alphabetical order */ +TA_RetCode TA_ForEachFunc( TA_CallForEachFunc functionToCall, void *opaqueData ) +{ + const TA_FuncDef **funcDefTable; + const TA_FuncDef *funcDef; + const TA_FuncInfo *funcInfo; + unsigned int i, j, funcDefTableSize; + + if( functionToCall == NULL ) + { + return TA_BAD_PARAM; + } + + /* Iterate the tables (each table is for one letter) */ + for( i=0; i < 26; i++ ) + { + funcDefTable = TA_DEF_Tables[i]; + + /* Identify the table size. */ + funcDefTableSize = *TA_DEF_TablesSize[i]; + for( j=0; j < funcDefTableSize; j++ ) + { + funcDef = funcDefTable[j]; + if( !funcDef || !funcDef->funcInfo ) + return TA_INTERNAL_ERROR(3); + + funcInfo = funcDef->funcInfo; + if( !funcInfo ) + return TA_INTERNAL_ERROR(4); + (*functionToCall)( funcInfo, opaqueData ); + } + } + + return TA_SUCCESS; +} + +TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table ) +{ + TA_RetCode retCode; + unsigned int i; + TA_StringTable *stringTable; + unsigned int groupId; /* TA_GroupId */ + unsigned int groupSize; + const char *stringPtr; + TA_StringTablePriv *stringTablePriv; + + if( (group == NULL) || (table == NULL ) ) + { + return TA_BAD_PARAM; + } + + *table = NULL; + stringPtr = NULL; + + /* Get information on the group. */ + retCode = getGroupId( group, &groupId ); + if( retCode != TA_SUCCESS ) + { + return retCode; + } + + retCode = getGroupSize( (TA_GroupId)groupId, &groupSize ); + if( retCode != TA_SUCCESS ) + { + return retCode; + } + + /* Allocate the table. */ + + stringTable = (TA_StringTable *)TA_Malloc( sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); + if( !stringTable ) + { + *table = NULL; + return TA_ALLOC_ERR; + } + + memset( stringTable, 0, sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); + stringTablePriv = (TA_StringTablePriv *)(((char *)stringTable)+sizeof(TA_StringTable)); + stringTablePriv->magicNumber = TA_STRING_TABLE_FUNC_MAGIC_NB; + stringTable->hiddenData = stringTablePriv; + + /* From this point, TA_FuncTableFree can be safely called. */ + stringTable->size = groupSize; + if( groupSize != 0 ) + { + stringTable->string = (const char **)TA_Malloc( (stringTable->size) * + sizeof(const char *) ); + + if( stringTable->string == NULL ) + { + *table = NULL; + TA_FuncTableFree( stringTable ); + return TA_ALLOC_ERR; + } + + memset( (void *)stringTable->string, 0, + (stringTable->size) * sizeof(const char *) ); + + for( i=0; i < stringTable->size; i++ ) + { + retCode = getFuncNameByIdx( (TA_GroupId)groupId, i, &stringPtr ); + + if( retCode != TA_SUCCESS ) + { + *table = NULL; + TA_FuncTableFree( stringTable ); + return TA_ALLOC_ERR; + } + + (stringTable->string)[i] = stringPtr; + } + } + + /* Return the table to the caller. */ + *table = stringTable; + + return TA_SUCCESS; +} + +TA_RetCode TA_FuncTableFree( TA_StringTable *table ) +{ + TA_StringTablePriv *stringTablePriv; + + if( table ) + { + stringTablePriv = (TA_StringTablePriv *)table->hiddenData; + if( !stringTablePriv ) + { + return TA_INTERNAL_ERROR(3); + } + + if( stringTablePriv->magicNumber != TA_STRING_TABLE_FUNC_MAGIC_NB ) + { + return TA_BAD_OBJECT; + } + + if( table->string ) + TA_Free( (void *)table->string ); + + TA_Free( table ); + } + + return TA_SUCCESS; +} + +TA_RetCode TA_GetFuncHandle( const char *name, const TA_FuncHandle **handle ) +{ + char firstChar, tmp; + const TA_FuncDef **funcDefTable; + const TA_FuncDef *funcDef; + const TA_FuncInfo *funcInfo; + unsigned int i, funcDefTableSize; + + /* A TA_FuncHandle is internally a TA_FuncDef. Let's find it + * by using the alphabetical tables. + */ + if( (name == NULL) || (handle == NULL) ) + { + return TA_BAD_PARAM; + } + + *handle = NULL; + + firstChar = name[0]; + + if( firstChar == '\0' ) + { + return TA_BAD_PARAM; + } + + tmp = (char)tolower( firstChar ); + + if( (tmp < 'a') || (tmp > 'z') ) + { + return TA_FUNC_NOT_FOUND; + } + + /* Identify the table. */ + tmp -= (char)'a'; + funcDefTable = TA_DEF_Tables[(int)tmp]; + + /* Identify the table size. */ + funcDefTableSize = *TA_DEF_TablesSize[(int)tmp]; + if( funcDefTableSize < 1 ) + { + return TA_FUNC_NOT_FOUND; + } + + /* Iterate all entries of the table and return as soon as found. */ + for( i=0; i < funcDefTableSize; i++ ) + { + funcDef = funcDefTable[i]; + if( !funcDef || !funcDef->funcInfo ) + return TA_INTERNAL_ERROR(3); + + funcInfo = funcDef->funcInfo; + if( !funcInfo ) + return TA_INTERNAL_ERROR(4); + + if( strcmp( funcInfo->name, name ) == 0 ) + { + *handle = (TA_FuncHandle *)funcDef; + return TA_SUCCESS; + } + } + + return TA_FUNC_NOT_FOUND; +} + +TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle, + const TA_FuncInfo **funcInfo ) +{ + const TA_FuncDef *funcDef; + + if( !funcInfo || !handle ) + { + return TA_BAD_PARAM; + } + + /* Validate that this is a valid funcHandle. */ + funcDef = (const TA_FuncDef *)handle; + if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) + { + return TA_INVALID_HANDLE; + } + + *funcInfo = funcDef->funcInfo; + if( !funcDef->funcInfo ) + return TA_INVALID_HANDLE; + + return TA_SUCCESS; +} + +TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_InputParameterInfo **info ) +{ + const TA_FuncDef *funcDef; + const TA_FuncInfo *funcInfo; + const TA_InputParameterInfo **inputTable; + + if( (handle == NULL) || (info == NULL) ) + { + return TA_BAD_PARAM; + } + + *info = NULL; + + /* Validate that this is a valid funcHandle. */ + funcDef = (const TA_FuncDef *)handle; + if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) + { + return TA_INVALID_HANDLE; + } + funcInfo = funcDef->funcInfo; + + if( !funcInfo ) return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbInput ) + { + return TA_BAD_PARAM; + } + + inputTable = (const TA_InputParameterInfo **)funcDef->input; + + if( !inputTable ) + return TA_INTERNAL_ERROR(2); + + *info = inputTable[paramIndex]; + + if( !(*info) ) + return TA_INTERNAL_ERROR(3); + + return TA_SUCCESS; +} + +TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_OptInputParameterInfo **info ) +{ + const TA_FuncDef *funcDef; + const TA_FuncInfo *funcInfo; + const TA_OptInputParameterInfo **inputTable; + + if( (handle == NULL) || (info == NULL) ) + { + return TA_BAD_PARAM; + } + + *info = NULL; + + /* Validate that this is a valid funcHandle. */ + funcDef = (const TA_FuncDef *)handle; + if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) + { + return TA_INVALID_HANDLE; + } + + funcInfo = funcDef->funcInfo; + + if( !funcInfo ) + return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbOptInput ) + { + return TA_BAD_PARAM; + } + + inputTable = (const TA_OptInputParameterInfo **)funcDef->optInput; + + if( !inputTable ) + return TA_INTERNAL_ERROR(3); + + *info = inputTable[paramIndex]; + + if( !(*info) ) + return TA_INTERNAL_ERROR(4); + + return TA_SUCCESS; +} + +TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle, + unsigned int paramIndex, + const TA_OutputParameterInfo **info ) +{ + + const TA_FuncDef *funcDef; + const TA_FuncInfo *funcInfo; + const TA_OutputParameterInfo **outputTable; + + if( (handle == NULL) || (info == NULL) ) + { + return TA_BAD_PARAM; + } + + *info = NULL; + + /* Validate that this is a valid funcHandle. */ + funcDef = (const TA_FuncDef *)handle; + if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) + { + return TA_INVALID_HANDLE; + } + + funcInfo = funcDef->funcInfo; + + if( !funcInfo ) + { + return TA_INVALID_HANDLE; + } + + if( paramIndex >= funcInfo->nbOutput ) + { + return TA_BAD_PARAM; + } + + outputTable = (const TA_OutputParameterInfo **)funcDef->output; + + if( !outputTable ) + { + return TA_INTERNAL_ERROR(4); + } + + *info = outputTable[paramIndex]; + + if( !(*info) ) + { + return TA_INTERNAL_ERROR(5); + } + + return TA_SUCCESS; +} + +TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle, + TA_ParamHolder **allocatedParams ) +{ + + TA_FuncDef *funcDef; + unsigned int allocSize, i; + TA_ParamHolderInput *input; + TA_ParamHolderOptInput *optInput; + TA_ParamHolderOutput *output; + + const TA_FuncInfo *funcInfo; + TA_ParamHolder *newParams; + TA_ParamHolderPriv *newParamsPriv; + + const TA_InputParameterInfo **inputInfo; + const TA_OptInputParameterInfo **optInputInfo; + const TA_OutputParameterInfo **outputInfo; + + /* Validate the parameters. */ + if( !handle || !allocatedParams) + { + return TA_BAD_PARAM; + } + + /* Validate that this is a valid funcHandle. */ + funcDef = (TA_FuncDef *)handle; + if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) + { + *allocatedParams = NULL; + return TA_INVALID_HANDLE; + } + + /* Get the TA_FuncInfo. */ + funcInfo = funcDef->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + /* Allocate the TA_ParamHolder. */ + newParams = (TA_ParamHolder *)TA_Malloc( sizeof(TA_ParamHolder) + sizeof(TA_ParamHolderPriv)); + if( !newParams ) + { + *allocatedParams = NULL; + return TA_ALLOC_ERR; + } + + memset( newParams, 0, sizeof(TA_ParamHolder) + sizeof(TA_ParamHolderPriv) ); + newParamsPriv = (TA_ParamHolderPriv *)(((char *)newParams)+sizeof(TA_ParamHolder)); + newParamsPriv->magicNumber = TA_PARAM_HOLDER_PRIV_MAGIC_NB; + newParams->hiddenData = newParamsPriv; + + /* From this point, TA_ParamHolderFree can be safely called. */ + + /* Allocate the array of structure holding the info + * for each parameter. + */ + if( funcInfo->nbInput == 0 ) return TA_INTERNAL_ERROR(2); + + allocSize = (funcInfo->nbInput) * sizeof(TA_ParamHolderInput); + input = (TA_ParamHolderInput *)TA_Malloc( allocSize ); + + if( !input ) + { + TA_ParamHolderFree( newParams ); + *allocatedParams = NULL; + return TA_ALLOC_ERR; + } + memset( input, 0, allocSize ); + newParamsPriv->in = input; + + if( funcInfo->nbOptInput == 0 ) + optInput = NULL; + else + { + allocSize = (funcInfo->nbOptInput) * sizeof(TA_ParamHolderOptInput); + optInput = (TA_ParamHolderOptInput *)TA_Malloc( allocSize ); + + if( !optInput ) + { + TA_ParamHolderFree( newParams ); + *allocatedParams = NULL; + return TA_ALLOC_ERR; + } + memset( optInput, 0, allocSize ); + } + newParamsPriv->optIn = optInput; + + allocSize = (funcInfo->nbOutput) * sizeof(TA_ParamHolderOutput); + output = (TA_ParamHolderOutput *)TA_Malloc( allocSize ); + if( !output ) + { + TA_ParamHolderFree( newParams ); + *allocatedParams = NULL; + return TA_ALLOC_ERR; + } + memset( output, 0, allocSize ); + newParamsPriv->out = output; + + newParamsPriv->funcInfo = funcInfo; + + inputInfo = (const TA_InputParameterInfo **)funcDef->input; + optInputInfo = (const TA_OptInputParameterInfo **)funcDef->optInput; + outputInfo = (const TA_OutputParameterInfo **)funcDef->output; + + for( i=0; i < funcInfo->nbInput; i++ ) + { + input[i].inputInfo = inputInfo[i]; + newParamsPriv->inBitmap <<= 1; + newParamsPriv->inBitmap |= 1; + } + + for( i=0; i < funcInfo->nbOptInput; i++ ) + { + optInput[i].optInputInfo = optInputInfo[i]; + if( optInput[i].optInputInfo->type == TA_OptInput_RealRange ) + optInput[i].data.optInReal = optInputInfo[i]->defaultValue; + else + optInput[i].data.optInInteger = (TA_Integer)optInputInfo[i]->defaultValue; + } + + for( i=0; i < funcInfo->nbOutput; i++ ) + { + output[i].outputInfo = outputInfo[i]; + newParamsPriv->outBitmap <<= 1; + newParamsPriv->outBitmap |= 1; + } + + /* Succcess, return the result to the caller. */ + *allocatedParams = newParams; + + return TA_SUCCESS; +} + +TA_RetCode TA_ParamHolderFree( TA_ParamHolder *paramsToFree ) +{ + TA_ParamHolderPriv *paramPriv; + + TA_ParamHolderInput *input; + TA_ParamHolderOptInput *optInput; + TA_ParamHolderOutput *output; + + if( !paramsToFree ) + { + return TA_SUCCESS; + } + + paramPriv = paramsToFree->hiddenData; + + if( !paramPriv ) + { + return TA_INVALID_PARAM_HOLDER; + } + + if( paramPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + optInput = paramPriv->optIn; + if( optInput ) + TA_Free( optInput ); + + input = paramPriv->in; + if( input ) + TA_Free( input ); + + output = paramPriv->out; + if( output ) + TA_Free( output ); + + TA_Free( paramsToFree ); + + return TA_SUCCESS; +} + + +TA_RetCode TA_SetInputParamIntegerPtr( TA_ParamHolder *param, + unsigned int paramIndex, + const TA_Integer *value ) +{ + + TA_ParamHolderPriv *paramHolderPriv; + const TA_InputParameterInfo *paramInfo; + const TA_FuncInfo *funcInfo; + + if( (param == NULL) || (value == NULL) ) + { + return TA_BAD_PARAM; + } + + paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbInput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->in[paramIndex].inputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( paramInfo->type != TA_Input_Integer ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + paramHolderPriv->in[paramIndex].data.inInteger = value; + + /* This parameter is now initialized, clear the corresponding bit. */ + paramHolderPriv->inBitmap &= ~(1<hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbInput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->in[paramIndex].inputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( paramInfo->type != TA_Input_Real ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + paramHolderPriv->in[paramIndex].data.inReal = value; + + /* This parameter is now initialized, clear the corresponding bit. */ + paramHolderPriv->inBitmap &= ~(1<hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + if( paramIndex >= funcInfo->nbInput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->in[paramIndex].inputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( paramInfo->type != TA_Input_Price ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + #define SET_PARAM_INFO(lowerParam,upperParam) \ + { \ + if( paramInfo->flags & TA_IN_PRICE_##upperParam ) \ + { \ + if( lowerParam == NULL ) \ + { \ + return TA_BAD_PARAM; \ + } \ + paramHolderPriv->in[paramIndex].data.inPrice.lowerParam = lowerParam; \ + } \ + } + + SET_PARAM_INFO(open, OPEN ); + SET_PARAM_INFO(high, HIGH ); + SET_PARAM_INFO(low, LOW ); + SET_PARAM_INFO(close, CLOSE ); + SET_PARAM_INFO(volume, VOLUME ); + SET_PARAM_INFO(openInterest, OPENINTEREST ); + + #undef SET_PARAM_INFO + + /* This parameter is now initialized, clear the corresponding bit. */ + paramHolderPriv->inBitmap &= ~(1<hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + if( paramIndex >= funcInfo->nbOptInput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->optIn[paramIndex].optInputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( (paramInfo->type != TA_OptInput_IntegerRange) && + (paramInfo->type != TA_OptInput_IntegerList) ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + paramHolderPriv->optIn[paramIndex].data.optInInteger = value; + + return TA_SUCCESS; +} + +TA_RetCode TA_SetOptInputParamReal( TA_ParamHolder *param, + unsigned int paramIndex, + TA_Real value ) +{ + TA_ParamHolderPriv *paramHolderPriv; + const TA_OptInputParameterInfo *paramInfo; + const TA_FuncInfo *funcInfo; + + if( param == NULL ) + { + return TA_BAD_PARAM; + } + + paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbOptInput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->optIn[paramIndex].optInputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( (paramInfo->type != TA_OptInput_RealRange) && + (paramInfo->type != TA_OptInput_RealList) ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + paramHolderPriv->optIn[paramIndex].data.optInReal = value; + + return TA_SUCCESS; +} + + +/* Setup the parameters indicating where to store the output. */ +TA_RetCode TA_SetOutputParamIntegerPtr( TA_ParamHolder *param, + unsigned int paramIndex, + TA_Integer *out ) +{ + TA_ParamHolderPriv *paramHolderPriv; + const TA_OutputParameterInfo *paramInfo; + const TA_FuncInfo *funcInfo; + + if( (param == NULL) || (out == NULL) ) + { + return TA_BAD_PARAM; + } + + paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbOutput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->out[paramIndex].outputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( paramInfo->type != TA_Output_Integer ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + paramHolderPriv->out[paramIndex].data.outInteger = out; + + /* This parameter is now initialized, clear the corresponding bit. */ + paramHolderPriv->outBitmap &= ~(1<hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Make sure this index really exist. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + if( paramIndex >= funcInfo->nbOutput ) + { + return TA_BAD_PARAM; + } + + /* Verify the type of the parameter. */ + paramInfo = paramHolderPriv->out[paramIndex].outputInfo; + if( !paramInfo ) return TA_INTERNAL_ERROR(2); + if( paramInfo->type != TA_Output_Real ) + { + return TA_INVALID_PARAM_HOLDER_TYPE; + } + + /* keep a copy of the provided parameter. */ + paramHolderPriv->out[paramIndex].data.outReal = out; + + /* This parameter is now initialized, clear the corresponding bit. */ + paramHolderPriv->outBitmap &= ~(1<hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Get the pointer on the lookback function. */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + + funcDef = (const TA_FuncDef *)funcInfo->handle; + if( !funcDef ) return TA_INTERNAL_ERROR(2); + lookbackFunction = funcDef->lookback; + if( !lookbackFunction ) return TA_INTERNAL_ERROR(2); + + /* Perform the function call. */ + *lookback = (*lookbackFunction)( paramHolderPriv ); + + return TA_SUCCESS; +} + +/* Finally, call a TA function with the parameters. */ +TA_RetCode TA_CallFunc( const TA_ParamHolder *param, + TA_Integer startIdx, + TA_Integer endIdx, + TA_Integer *outBegIdx, + TA_Integer *outNbElement ) +{ + TA_RetCode retCode; + const TA_ParamHolderPriv *paramHolderPriv; + + const TA_FuncDef *funcDef; + const TA_FuncInfo *funcInfo; + TA_FrameFunction function; + + if( (param == NULL) || + (outBegIdx == NULL) || + (outNbElement == NULL) ) + { + return TA_BAD_PARAM; + } + + paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); + if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) + { + return TA_INVALID_PARAM_HOLDER; + } + + /* Check that all parameters are initialize (except the optInput). */ + if( paramHolderPriv->inBitmap != 0 ) + { + return TA_INPUT_NOT_ALL_INITIALIZE; + } + + if( paramHolderPriv->outBitmap != 0 ) + { + return TA_OUTPUT_NOT_ALL_INITIALIZE; + } + + /* Get the pointer on the function */ + funcInfo = paramHolderPriv->funcInfo; + if( !funcInfo ) return TA_INVALID_HANDLE; + funcDef = (const TA_FuncDef *)funcInfo->handle; + if( !funcDef ) return TA_INTERNAL_ERROR(2); + function = funcDef->function; + if( !function ) return TA_INTERNAL_ERROR(2); + + /* Perform the function call. */ + retCode = (*function)( paramHolderPriv, startIdx, endIdx, + outBegIdx, outNbElement ); + return retCode; +} + +/**** Local functions definitions. ****/ +static TA_RetCode getGroupId( const char *groupString, unsigned int *groupId ) +{ + unsigned int i; + + for( i=0; i < TA_NB_GROUP_ID; i++ ) + { + if( strcmp( TA_GroupString[i], groupString ) == 0 ) + { + *groupId = i; + return TA_SUCCESS; + } + } + + return TA_GROUP_NOT_FOUND; +} + +static TA_RetCode getGroupSize( TA_GroupId groupId, unsigned int *groupSize ) +{ + #ifdef TA_GEN_CODE + /* Code used only when compiled with gen_code. */ + + unsigned int i, j; + const TA_FuncDef **funcDefTable; + const TA_FuncDef *funcDef; + unsigned int tableSize; + unsigned int nbFuncFound; + + if( groupId >= TA_NB_GROUP_ID ) return TA_INTERNAL_ERROR(2); + if( !groupSize ) return TA_INTERNAL_ERROR(2); + + nbFuncFound = 0; + for( i=0; i < 26; i++ ) + { + funcDefTable = TA_DEF_Tables[i]; + tableSize = *(TA_DEF_TablesSize[i]); + + for( j=0; j < tableSize; j++ ) + { + funcDef = funcDefTable[j]; + if( funcDef && (funcDef->groupId == groupId) ) + nbFuncFound++; + } + } + + *groupSize = nbFuncFound; + + return TA_SUCCESS; + #else + /* Optimized code in the final library. */ + *groupSize = TA_PerGroupSize[groupId]; + + return TA_SUCCESS; + #endif +} + +#ifdef TA_GEN_CODE + static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, + unsigned int idx, + const char **stringPtr ) +#else + static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, + unsigned int idx, + const char **stringPtr ) +#endif +{ + #ifdef TA_GEN_CODE + /* Code used only when compiled with gen_code. */ + + unsigned int curIdx; + unsigned int i, j, found; + const TA_FuncDef **funcDefTable; + unsigned int tableSize; + const TA_FuncInfo *funcInfo; + + if( !stringPtr ) return TA_INTERNAL_ERROR(2); + + curIdx = 0; + found = 0; + for( i=0; (i < 26) && !found; i++ ) + { + funcDefTable = TA_DEF_Tables[i]; + tableSize = *(TA_DEF_TablesSize[i]); + + for( j=0; (j < tableSize) && !found; j++ ) + { + if( funcDefTable[j]->groupId == groupId ) + { + if( idx == curIdx ) + { + funcInfo = funcDefTable[j]->funcInfo; + if( !funcInfo ) return TA_INTERNAL_ERROR(2); + *stringPtr = funcInfo->name; + found = 1; + } + curIdx++; + } + } + } + + if( found != 1 ) return TA_INTERNAL_ERROR(2); + if( !(*stringPtr) ) return TA_INTERNAL_ERROR(2); + + return TA_SUCCESS; + #else + /* Optimized code in the final library. */ + const TA_FuncDef **funcDefTable; + const TA_FuncInfo *funcInfo; + + funcDefTable = TA_PerGroupFuncDef[groupId]; + funcInfo = funcDefTable[idx]->funcInfo; + *stringPtr = funcInfo->name; + + return TA_SUCCESS; + #endif +} diff --git a/src/ta-lib/src/ta_abstract/ta_def_ui.c b/src/ta-lib/src/ta_abstract/ta_def_ui.c new file mode 100644 index 000000000..a103a9560 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_def_ui.c @@ -0,0 +1,573 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 130101 MF First version. + * 111503 MF Add TA_DEF_UI_Input_Price_CV + */ + +/* Description: + * Defines const structures representing how data can be + * input/output from the TA functions. + * These structure are mainly used to build the tables\table.c files. + */ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +const char TA_GroupId_MathOperatorsString[] = "Math Operators"; +const char TA_GroupId_MathTransformString[] = "Math Transform"; +const char TA_GroupId_OverlapStudiesString[] = "Overlap Studies"; +const char TA_GroupId_VolatilityIndicatorsString[] = "Volatility Indicators"; +const char TA_GroupId_MomentumIndicatorsString[] = "Momentum Indicators"; +const char TA_GroupId_CycleIndicatorsString[] = "Cycle Indicators"; +const char TA_GroupId_VolumeIndicatorsString[] = "Volume Indicators"; +const char TA_GroupId_PatternRecognitionString[] = "Pattern Recognition"; +const char TA_GroupId_StatisticString[] = "Statistic Functions"; +const char TA_GroupId_PriceTransformString[] = "Price Transform"; + +const char *TA_GroupString[TA_NB_GROUP_ID] = +{ + &TA_GroupId_MathOperatorsString[0], + &TA_GroupId_MathTransformString[0], + &TA_GroupId_OverlapStudiesString[0], + &TA_GroupId_VolatilityIndicatorsString[0], + &TA_GroupId_MomentumIndicatorsString[0], + &TA_GroupId_CycleIndicatorsString[0], + &TA_GroupId_VolumeIndicatorsString[0], + &TA_GroupId_PatternRecognitionString[0], + &TA_GroupId_StatisticString[0], + &TA_GroupId_PriceTransformString[0] +}; + +/************************************************************* + * Define from here the TA_InputParameterInfo + * These shall be sufficient for all possible TA functions. + *************************************************************/ +const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLCV = + { TA_Input_Price, "inPriceOHLCV", + TA_IN_PRICE_OPEN | + TA_IN_PRICE_HIGH | + TA_IN_PRICE_LOW | + TA_IN_PRICE_CLOSE | + TA_IN_PRICE_VOLUME }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLCV = + { TA_Input_Price, "inPriceHLCV", + TA_IN_PRICE_HIGH | + TA_IN_PRICE_LOW | + TA_IN_PRICE_CLOSE | + TA_IN_PRICE_VOLUME }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLC = + { TA_Input_Price, "inPriceOHLC", + TA_IN_PRICE_OPEN | + TA_IN_PRICE_HIGH | + TA_IN_PRICE_LOW | + TA_IN_PRICE_CLOSE }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLC = + { TA_Input_Price, "inPriceHLC", + TA_IN_PRICE_HIGH | + TA_IN_PRICE_LOW | + TA_IN_PRICE_CLOSE }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_HL = + { TA_Input_Price, "inPriceHL", + TA_IN_PRICE_HIGH | + TA_IN_PRICE_LOW }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_OC = + { TA_Input_Price, "inPriceOC", + TA_IN_PRICE_OPEN | + TA_IN_PRICE_CLOSE }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_CV = + { TA_Input_Price, "inPriceCV", + TA_IN_PRICE_CLOSE | + TA_IN_PRICE_VOLUME }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Price_V = + { TA_Input_Price, "inPriceV", + TA_IN_PRICE_VOLUME }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Real = + { TA_Input_Real, "inReal", 0 }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Periods = + { TA_Input_Real, "inPeriods", 0 }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Real0 = + { TA_Input_Real, "inReal0", 0 }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Real1 = + { TA_Input_Real, "inReal1", 0 }; + +const TA_InputParameterInfo TA_DEF_UI_Input_Integer = + { TA_Input_Integer, "inInteger", 0 }; + + +/************************************************************* + * Define from here the TA_OutputParameterInfo + * These shall be sufficient for most of the TA functions. + *************************************************************/ +const TA_OutputParameterInfo TA_DEF_UI_Output_Real = + { TA_Output_Real, "outReal", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Integer = + { TA_Output_Integer, "outInteger", TA_OUT_LINE }; + +/***************************************************** + * Define from here the TA_Integer ranges + ****************************************************/ + +const TA_IntegerRange TA_DEF_TimePeriod_Positive = +{ + 1, /* min */ + 100000, /* max */ + 1, /* suggested start */ + 200, /* suggested end */ + 1 /* suggested increment */ +}; + +const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum5 = +{ + 5, /* min */ + 100000, /* max */ + 5, /* suggested start */ + 200, /* suggested end */ + 1 /* suggested increment */ +}; + +const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum2 = +{ + 2, /* min */ + 100000, /* max */ + 4, /* suggested start */ + 200, /* suggested end */ + 1 /* suggested increment */ +}; + +const TA_IntegerRange TA_DEF_HorizontalShiftPeriod = +{ + -200, /* min */ + 200, /* max */ + 0, /* suggested start */ + 8, /* suggested end */ + 1 /* suggested increment */ +}; + + +/***************************************************** + * Define from here the TA_Real ranges + ****************************************************/ +const TA_RealRange TA_DEF_VerticalShiftPercent = +{ + -99.0, /* min */ + 99.0, /* max */ + 1, /* precision */ + -10.0, /* suggested start */ + 10.0, /* suggested end */ + 0.5 /* suggested increment */ +}; + +const TA_RealRange TA_DEF_NbDeviation = +{ + TA_REAL_MIN, /* min */ + TA_REAL_MAX, /* max */ + 2, /* precision */ + -2.0, /* suggested start */ + 2.0, /* suggested end */ + 0.2 /* suggested increment */ +}; + +const TA_RealRange TA_DEF_ZeroToOne = +{ + 0.00, /* min */ + 1.00, /* max */ + 2, /* precision */ + 0.01, /* suggested start */ + 1.00, /* suggested end */ + 0.05 /* suggested increment */ +}; + +const TA_RealRange TA_DEF_RealPositive = +{ + 0.00, /* min */ + TA_REAL_MAX, /* max */ + 0, /* precision */ + 0.0, /* suggested start */ + 0.0, /* suggested end */ + 0.0 /* suggested increment */ +}; + +/***************************************************** + * Define from here the TA_OptInputParameterInfo. + ****************************************************/ + +const TA_OptInputParameterInfo TA_DEF_UI_MinPeriod = +{ + TA_OptInput_IntegerRange, /* type */ + "optInMinPeriod", /* paramName */ + 0, /* flags */ + + "Minimum Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 2, /* defaultValue */ + "Value less than minimum will be changed to Minimum period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_MaxPeriod = +{ + TA_OptInput_IntegerRange, /* type */ + "optInMaxPeriod", /* paramName */ + 0, /* flags */ + + "Maximum Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 30, /* defaultValue */ + "Value higher than maximum will be changed to Maximum period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30_MINIMUM2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 30, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_20_MINIMUM2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 20, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_21_MINIMUM2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 21, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 14, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM5 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum5, /* dataSet */ + 14, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10_MINIMUM2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 10, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5_MINIMUM2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 5, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 30, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 14, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 10, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod", /* paramName */ + 0, /* flags */ + + "Time Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 5, /* defaultValue */ + "Number of period", /* hint */ + + NULL /* helpFile */ +}; + + +/* Use for the multiplier of standard deviations. */ +const TA_OptInputParameterInfo TA_DEF_UI_NbDeviation = +{ + TA_OptInput_RealRange, /* type */ + "optInNbDev", /* paramName */ + 0, /* flags */ + + "Deviations", /* displayName */ + (const void *)&TA_DEF_NbDeviation, /* dataSet */ + 1.0, /* defaultValue */ + "Nb of deviations", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_Penetration_30 = +{ + TA_OptInput_RealRange, /* type */ + "optInPenetration", /* paramName */ + 0, /* flags */ + + "Penetration", /* displayName */ + (const void *)&TA_DEF_RealPositive, /* dataSet */ + 0.3, /* defaultValue */ + "Percentage of penetration of a candle within another candle", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_Penetration_50 = +{ + TA_OptInput_RealRange, /* type */ + "optInPenetration", /* paramName */ + 0, /* flags */ + + "Penetration", /* displayName */ + (const void *)&TA_DEF_RealPositive, /* dataSet */ + 0.5, /* defaultValue */ + "Percentage of penetration of a candle within another candle", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_VerticalShift = +{ + TA_OptInput_RealRange, /* type */ + "optInVertShift", /* paramName */ + TA_OPTIN_IS_PERCENT, /* flags */ + + "Vertical Shift", /* displayName */ + (const void *)&TA_DEF_VerticalShiftPercent, /* dataSet */ + 0, /* defaultValue */ + "Positive number shift upwards, negative downwards", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_HorizontalShift = +{ + TA_OptInput_IntegerRange, /* type */ + "optInHorizShift", /* paramName */ + 0, /* flags */ + + "Horizontal Shift", /* displayName */ + (const void *)&TA_DEF_HorizontalShiftPeriod, /* dataSet */ + 0, /* defaultValue */ + "Positive number shift 'n' period to the right, negative shift to the left", /* hint */ + + NULL /* helpFile */ +}; + +/* Define the values available for the MA function. + * + * Many TA function using the MA internally may wish to + * re-use this parameter as one of their own. That way a + * new MA will provide automatically a new way of calculating + * to a multitude of other TA functions. + */ +static const TA_IntegerDataPair TA_MA_TypeDataPair[] = +{ + {0,"SMA"}, + {1,"EMA"}, + {2,"WMA"}, + {3,"DEMA" }, + {4,"TEMA" }, + {5,"TRIMA"}, + {6,"KAMA" }, + {7,"MAMA" }, + {8,"T3"} + /*{...,"Linear Regression"}*/ +}; + +const TA_IntegerList TA_MA_TypeList = +{ + &TA_MA_TypeDataPair[0], + sizeof(TA_MA_TypeDataPair)/sizeof(TA_IntegerDataPair) +}; + +const TA_OptInputParameterInfo TA_DEF_UI_MA_Method = +{ + TA_OptInput_IntegerList, /* type */ + "optInMAType", /* paramName */ + 0, /* flags */ + + "MA Type", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average", /* hint */ + + NULL /* helpFile */ +}; + +/* When a TA function needs two period (often called + * a fast and slow period). + */ +const TA_OptInputParameterInfo TA_DEF_UI_Fast_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInFastPeriod", /* paramName */ + 0, /* flags */ + + "Fast Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 12, /* defaultValue */ + "Number of period for the fast MA", /* hint */ + + NULL /* helpFile */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_Slow_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInSlowPeriod", /* paramName */ + 0, /* flags */ + + "Slow Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 26, /* defaultValue */ + "Number of period for the slow MA", /* hint */ + + NULL /* helpFile */ +}; + diff --git a/src/ta-lib/src/ta_abstract/ta_def_ui.h b/src/ta-lib/src/ta_abstract/ta_def_ui.h new file mode 100644 index 000000000..38dfd02d0 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_def_ui.h @@ -0,0 +1,293 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TA_DEF_UI_H +#define TA_DEF_UI_H + +/* Offer pre-defined user interface constant. + * + * This allows to avoid to duplicate static data for + * common user interface elements. + */ + +#ifndef TA_ABSTRACT_H + #include "ta_abstract.h" +#endif + +#ifndef TA_FRAME_PRIV_H + #include "ta_frame_priv.h" +#endif + +#if !defined(TA_GEN_CODE) && !defined( TA_FRAME_H ) + #include "ta_frame.h" +#endif + +typedef enum +{ + /* If you modify this enum, make sure you update ta_def_ui.c */ + TA_GroupId_MathOperators, + TA_GroupId_MathTransform, + TA_GroupId_OverlapStudies, + TA_GroupId_VolatilityIndicators, + TA_GroupId_MomentumIndicators, + TA_GroupId_CycleIndicators, + TA_GroupId_VolumeIndicators, + TA_GroupId_PatternRecognition, + TA_GroupId_Statistic, + TA_GroupId_PriceTransform, + TA_NB_GROUP_ID +} TA_GroupId; + +extern const char TA_GroupId_MathOperatorsString[]; +extern const char TA_GroupId_MathTransformString[]; +extern const char TA_GroupId_OverlapStudiesString[]; +extern const char TA_GroupId_VolatilityIndicatorsString[]; +extern const char TA_GroupId_MomentumIndicatorsString[]; +extern const char TA_GroupId_CycleIndicatorsString[]; +extern const char TA_GroupId_VolumeIndicatorsString[]; +extern const char TA_GroupId_PatternRecognitionString[]; +extern const char TA_GroupId_StatisticString[]; +extern const char TA_GroupId_PriceTransformString[]; + +extern const char *TA_GroupString[TA_NB_GROUP_ID]; + +/* Inputs */ +extern const TA_InputParameterInfo TA_DEF_UI_Input_Real; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Real0; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Real1; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Integer; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLCV; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLCV; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLC; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLC; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_HL; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_OC; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_CV; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_V; +extern const TA_InputParameterInfo TA_DEF_UI_Input_Periods; + + +/* Outputs. */ +extern const TA_OutputParameterInfo TA_DEF_UI_Output_Real; +extern const TA_OutputParameterInfo TA_DEF_UI_Output_Integer; +extern const TA_OutputParameterInfo TA_DEF_UI_Output_Lines; + +/* Optional Inputs. */ +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5; + +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30_MINIMUM2; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_20_MINIMUM2; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_21_MINIMUM2; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM2; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM5; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10_MINIMUM2; +extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5_MINIMUM2; + +extern const TA_OptInputParameterInfo TA_DEF_UI_VerticalShift; +extern const TA_OptInputParameterInfo TA_DEF_UI_HorizontalShift; + +extern const TA_OptInputParameterInfo TA_DEF_UI_MA_Method; +extern const TA_OptInputParameterInfo TA_DEF_UI_Fast_Period; +extern const TA_OptInputParameterInfo TA_DEF_UI_Slow_Period; + +extern const TA_OptInputParameterInfo TA_DEF_UI_NbDeviation; + +extern const TA_OptInputParameterInfo TA_DEF_UI_Penetration_30; +extern const TA_OptInputParameterInfo TA_DEF_UI_Penetration_50; + +extern const TA_OptInputParameterInfo TA_DEF_UI_MinPeriod; +extern const TA_OptInputParameterInfo TA_DEF_UI_MaxPeriod; + +/* Re-usable ranges. */ +extern const TA_IntegerRange TA_DEF_TimePeriod_Positive; +extern const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum2; +extern const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum5; + +extern const TA_RealRange TA_DEF_VerticalShiftPercent; +extern const TA_IntegerRange TA_DEF_HorizontalShiftPeriod; +extern const TA_RealRange TA_DEF_NbDeviation; +extern const TA_RealRange TA_DEF_ZeroToOne; +extern const TA_RealRange TA_DEF_RealPositive; + +/* Useful to build your own TA_DEF_UI with the list of + * implemented Moving Average type. + */ +extern const TA_IntegerList TA_MA_TypeList; + +/* An internal structure for coordinating all these const info. + * One TA_FuncDef instance will exist for each TA function. + */ +typedef struct +{ + /* Magic number is used to detect internal error. */ + const unsigned int magicNumber; + + /* The function will belong to this group. */ + const TA_GroupId groupId; + + /* Some more info. */ + const TA_FuncInfo * const funcInfo; + + /* Description of the parameters. */ + const TA_InputParameterInfo * const input; + const TA_OptInputParameterInfo * const optInput; + const TA_OutputParameterInfo * const output; + + /* Entry point of the TA function and its lookback function. */ + const TA_FrameFunction function; + const TA_FrameLookback lookback; +} TA_FuncDef; + +/* The following MACROs are helpers being used in + * the tables\table.c files. + */ +#if !defined( TA_GEN_CODE ) + /* This definition is used when compiling the end-user library. */ + #define DEF_FUNCTION( name, \ + groupId, \ + hint, \ + camelCaseName, \ + flags ) \ + \ + TA_FuncInfo TA_INFO_##name; \ + \ + const TA_FuncDef TA_DEF_##name = \ + { \ + TA_FUNC_DEF_MAGIC_NB, \ + groupId, \ + &TA_INFO_##name, \ + (const TA_InputParameterInfo * const)&TA_##name##_Inputs[0], \ + (const TA_OptInputParameterInfo * const)&TA_##name##_OptInputs[0], \ + (const TA_OutputParameterInfo * const)&TA_##name##_Outputs[0], \ + TA_##name##_FramePP, \ + TA_##name##_FramePPLB \ + }; \ + TA_FuncInfo TA_INFO_##name = \ + { \ + (const char * const)#name, \ + (const char * const)groupId##String, \ + (const char * const)hint, \ + (const char * const)camelCaseName, \ + (const int)flags, \ + (sizeof(TA_##name##_Inputs) / sizeof(TA_InputParameterInfo *)) - 1, \ + (sizeof(TA_##name##_OptInputs)/ sizeof(TA_OptInputParameterInfo *))- 1, \ + (sizeof(TA_##name##_Outputs) / sizeof(TA_OutputParameterInfo *)) - 1, \ + (const TA_FuncHandle * const)&TA_DEF_##name \ + }; +#else + /* This definition is used only when compiling for gencode. + * Because some pointers may not be defined before gencode + * is run at least once, some value are set to NULL. + */ + #define DEF_FUNCTION( name, \ + groupId, \ + hint, \ + camelCaseName, \ + flags ) \ + \ + TA_FuncInfo TA_INFO_##name; \ + \ + const TA_FuncDef TA_DEF_##name = \ + { \ + TA_FUNC_DEF_MAGIC_NB, \ + groupId, \ + &TA_INFO_##name, \ + (const TA_InputParameterInfo * const)&TA_##name##_Inputs[0], \ + (const TA_OptInputParameterInfo * const)&TA_##name##_OptInputs[0], \ + (const TA_OutputParameterInfo * const)&TA_##name##_Outputs[0], \ + NULL, \ + NULL \ + }; \ + TA_FuncInfo TA_INFO_##name = \ + { \ + (const char * const)#name, \ + (const char * const)groupId##String, \ + (const char * const)hint, \ + (const char * const)camelCaseName, \ + (const int)flags, \ + (sizeof(TA_##name##_Inputs) / sizeof(TA_InputParameterInfo *)) - 1, \ + (sizeof(TA_##name##_OptInputs)/ sizeof(TA_OptInputParameterInfo *))- 1, \ + (sizeof(TA_##name##_Outputs) / sizeof(TA_OutputParameterInfo *)) - 1, \ + (const TA_FuncHandle * const)&TA_DEF_##name \ + }; +#endif + +#define ADD_TO_TABLE(name) &TA_DEF_##name + +/* Utility Macro to quickly define Math operator operating on one array + * with no optional parameter. + */ +#define DEF_MATH_UNARY_OPERATOR(NAME,HINT,CAMELCASENAME) \ + static const TA_InputParameterInfo *TA_##NAME##_Inputs[] = \ +{ \ + &TA_DEF_UI_Input_Real, \ + NULL \ +}; \ +static const TA_OutputParameterInfo *TA_##NAME##_Outputs[] = \ +{ \ + &TA_DEF_UI_Output_Real, \ + NULL \ +}; \ + static const TA_OptInputParameterInfo *TA_##NAME##_OptInputs[] = { NULL }; \ +DEF_FUNCTION( NAME, /* name */ \ + TA_GroupId_MathTransform, /* groupId */ \ + HINT, /* hint */ \ + CAMELCASENAME, /* CamelCase name */ \ + 0 /* flags */ \ + ); + +#define DEF_MATH_BINARY_OPERATOR(NAME,HINT,CAMELCASENAME) \ + static const TA_InputParameterInfo *TA_##NAME##_Inputs[] = \ +{ \ + &TA_DEF_UI_Input_Real0, \ + &TA_DEF_UI_Input_Real1, \ + NULL \ +}; \ +static const TA_OutputParameterInfo *TA_##NAME##_Outputs[] = \ +{ \ + &TA_DEF_UI_Output_Real, \ + NULL \ +}; \ + static const TA_OptInputParameterInfo *TA_##NAME##_OptInputs[] = { NULL }; \ +DEF_FUNCTION( NAME, /* name */ \ + TA_GroupId_MathOperators, /* groupId */ \ + HINT, /* hint */ \ + CAMELCASENAME, /* CamelCase name */ \ + 0 /* flags */ \ + ); + +#endif + diff --git a/src/ta-lib/src/ta_abstract/ta_frame_priv.h b/src/ta-lib/src/ta_abstract/ta_frame_priv.h new file mode 100644 index 000000000..c105644fb --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_frame_priv.h @@ -0,0 +1,128 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +/* TA_ParamHolderPriv is the private implementation of a TA_ParamHolder. */ + +/* Definition in this header shall be used only internaly by the + * ta_abstract module. + * End-user of the TA-LIB shall never attempt to access these + * structure directly. + */ + +#ifndef TA_FRAME_PRIV_H +#define TA_FRAME_PRIV_H + +#ifndef TA_ABSTRACT_H + #include "ta_abstract.h" +#endif + +#ifndef TA_MAGIC_NB_H + #include "ta_magic_nb.h" +#endif + +typedef struct +{ + const TA_Real *open; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; + const TA_Real *volume; + const TA_Real *openInterest; +} TA_PricePtrs; + +typedef struct +{ + union TA_ParamHolderInputData + { + const TA_Real *inReal; + const TA_Integer *inInteger; + TA_PricePtrs inPrice; + } data; + + const TA_InputParameterInfo *inputInfo; + +} TA_ParamHolderInput; + +typedef struct +{ + union TA_ParamHolderOptInData + { + TA_Integer optInInteger; + TA_Real optInReal; + } data; + + const TA_OptInputParameterInfo *optInputInfo; + +} TA_ParamHolderOptInput; + +typedef struct +{ + union TA_ParamHolderOutputData + { + TA_Real *outReal; + TA_Integer *outInteger; + } data; + + const TA_OutputParameterInfo *outputInfo; +} TA_ParamHolderOutput; + +typedef struct +{ + /* Magic number is used to detect internal error. */ + unsigned int magicNumber; + + TA_ParamHolderInput *in; + TA_ParamHolderOptInput *optIn; + TA_ParamHolderOutput *out; + + /* Indicate which parameter have been initialized. + * The LSB (Less Significant Bit) is the first parameter + * and a bit equal to '1' indicate that the parameter is + * not initialized. + */ + unsigned int inBitmap; + unsigned int outBitmap; + + const TA_FuncInfo *funcInfo; +} TA_ParamHolderPriv; + +typedef TA_RetCode (*TA_FrameFunction)( const TA_ParamHolderPriv *params, + TA_Integer startIdx, + TA_Integer endIdx, + TA_Integer *outBegIdx, + TA_Integer *outNbElement ); + +typedef unsigned int (*TA_FrameLookback)( const TA_ParamHolderPriv *params ); + +#endif diff --git a/src/ta-lib/src/ta_abstract/ta_func_api.c b/src/ta-lib/src/ta_abstract/ta_func_api.c new file mode 100644 index 000000000..21c5f2a8b --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_func_api.c @@ -0,0 +1,9159 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Important: This file is automatically generated by gen_code. + * Any modification will be lost on next execution + * of gen_code. + * + * This file is a binary representation of the func_api.xml file. + */ + +#include "ta_abstract.h" + +static const char TA_FunctionDescriptionXMLArray[] = +{ +0x3C,0x3F,0x78,0x6D,0x6C,0x20,0x76,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x22,0x31,0x2E,0x30,0x22,0x20,0x65 +,0x6E,0x63,0x6F,0x64,0x69,0x6E,0x67,0x3D,0x22,0x75,0x74,0x66,0x2D,0x38,0x22,0x20,0x3F,0x3E,0x0A,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3E,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x43,0x43,0x42,0x41,0x4E,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09 +,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x43,0x43,0x42 +,0x41,0x4E,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x63,0x63 +,0x62,0x61,0x6E,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x42,0x61,0x6E,0x64,0x73 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53 +,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72 +,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 +,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32 +,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x55,0x70,0x70,0x65,0x72,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x55,0x70,0x70,0x65,0x72,0x20,0x4C,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x4D,0x69,0x64,0x64,0x6C,0x65,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x4C,0x6F,0x77,0x65,0x72,0x42 +,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x6F,0x77,0x65,0x72,0x20 +,0x4C,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x43 +,0x4F,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x41,0x43,0x4F,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x41,0x63,0x6F,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72 +,0x69,0x63,0x20,0x41,0x43,0x6F,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61 +,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D +,0x2D,0x20,0x41,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x41,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x43,0x68,0x61,0x69,0x6B,0x69,0x6E,0x20,0x41,0x2F,0x44,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61 +,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x56,0x6F,0x6C,0x75 +,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x44,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x64,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D,0x65 +,0x74,0x69,0x63,0x20,0x41,0x64,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61 +,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 +,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x44,0x4F,0x53,0x43,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x41,0x44,0x4F,0x53,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x64 +,0x4F,0x73,0x63,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x43,0x68,0x61,0x69,0x6B,0x69,0x6E,0x20,0x41,0x2F,0x44,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74 +,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x20 +,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x46,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F +,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53 +,0x6C,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72 +,0x20,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x44,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x64,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x44,0x69,0x72,0x65,0x63,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x20,0x49,0x6E,0x64,0x65,0x78 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20 +,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F +,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66 +,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C +,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C +,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x41,0x44,0x58,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x58,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x41,0x64,0x78,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x20,0x49,0x6E,0x64,0x65,0x78,0x20,0x52 +,0x61,0x74,0x69,0x6E,0x67,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65 +,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 +,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x50,0x4F,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x50,0x4F,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x70,0x6F,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x62,0x73,0x6F,0x6C,0x75,0x74,0x65,0x20,0x50,0x72,0x69,0x63,0x65 +,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72 +,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x46,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F +,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x32,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x53,0x6C,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F +,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x36,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70 +,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65 +,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x52,0x4F,0x4F,0x4E,0x20,0x2D,0x2D,0x3E,0x0A +,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x52,0x4F +,0x4F,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x72,0x6F,0x6F,0x6E +,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x72,0x6F +,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75 +,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 +,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31 +,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x41,0x72,0x6F,0x6F +,0x6E,0x44,0x6F,0x77,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68 +,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x41,0x72,0x6F,0x6F,0x6E,0x55,0x70,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x52,0x4F,0x4F,0x4E,0x4F,0x53,0x43,0x20,0x2D,0x2D,0x3E,0x0A +,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x52,0x4F +,0x4F,0x4E,0x4F,0x53,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x72 +,0x6F,0x6F,0x6E,0x4F,0x73,0x63,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x41,0x72,0x6F,0x6F,0x6E,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49 +,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 +,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x53,0x49,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x53,0x49,0x4E,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x73,0x69,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67 +,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x41,0x53,0x69,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C +,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x54,0x41,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x54,0x41,0x4E,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x74,0x61,0x6E,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20 +,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x41,0x54,0x61,0x6E,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66 +,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x54,0x52,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x54 +,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x74,0x72,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67 +,0x65,0x20,0x54,0x72,0x75,0x65,0x20,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x61,0x74,0x69,0x6C,0x69,0x74,0x79,0x20,0x49,0x6E,0x64,0x69,0x63,0x61 +,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62 +,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x56,0x47,0x50,0x52,0x49 +,0x43,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x41,0x56,0x47,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x76,0x67,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x50,0x72 +,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65,0x20 +,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F +,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x56,0x47,0x44,0x45,0x56,0x20,0x2D,0x2D +,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41 +,0x56,0x47,0x44,0x45,0x56,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x76 +,0x67,0x44,0x65,0x76,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65,0x20,0x54,0x72,0x61,0x6E,0x73 +,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 +,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x42,0x42 +,0x41,0x4E,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x42,0x41,0x4E,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x42,0x62,0x61,0x6E,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x6F,0x6C,0x6C,0x69,0x6E,0x67,0x65,0x72,0x20,0x42,0x61 +,0x6E,0x64,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 +,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F +,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 +,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x73,0x20,0x75,0x70,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6D,0x75,0x6C,0x74,0x69,0x70,0x6C,0x69,0x65,0x72,0x20 +,0x66,0x6F,0x72,0x20,0x75,0x70,0x70,0x65,0x72,0x20,0x62,0x61,0x6E,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E +,0x3E,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x2D,0x32,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x32,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x73,0x20,0x64,0x6F,0x77,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6D,0x75,0x6C,0x74,0x69,0x70,0x6C,0x69,0x65,0x72,0x20,0x66 +,0x6F,0x72,0x20,0x6C,0x6F,0x77,0x65,0x72,0x20,0x62,0x61,0x6E,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E +,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x2D,0x32,0x2E,0x30,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 +,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x32,0x2E,0x30,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76 +,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x55,0x70,0x70,0x65,0x72,0x42 +,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x70,0x70,0x65,0x72,0x20 +,0x4C,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x4D,0x69,0x64,0x64,0x6C,0x65 +,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x4C,0x6F,0x77,0x65,0x72,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x6F,0x77,0x65,0x72,0x20,0x4C,0x69,0x6D,0x69,0x74,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x42,0x45,0x54,0x41,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x45 +,0x54,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x42,0x65,0x74,0x61,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x65,0x74,0x61 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63 +,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 +,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C +,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x42,0x4F,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x4F,0x50,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x42,0x6F,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x61,0x6C,0x61,0x6E,0x63,0x65,0x20,0x4F,0x66 +,0x20,0x50,0x6F,0x77,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D +,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x43,0x49,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x43 +,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x63,0x69,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x6F,0x6D,0x6D,0x6F,0x64 +,0x69,0x74,0x79,0x20,0x43,0x68,0x61,0x6E,0x6E,0x65,0x6C,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64 +,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65 +,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x32,0x43,0x52,0x4F,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x32,0x43 +,0x52,0x4F,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x32,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x54,0x77,0x6F,0x20,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 +,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x42,0x4C,0x41,0x43 +,0x4B,0x43,0x52,0x4F,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x42,0x4C,0x41,0x43,0x4B,0x43,0x52,0x4F +,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x42 +,0x6C,0x61,0x63,0x6B,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x42,0x6C,0x61,0x63,0x6B,0x20,0x43,0x72 +,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72 +,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F +,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x49,0x4E,0x53,0x49,0x44,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x49 +,0x4E,0x53,0x49,0x44,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x33,0x49,0x6E,0x73,0x69,0x64,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x49,0x6E,0x73,0x69,0x64,0x65,0x20,0x55,0x70 +,0x2F,0x44,0x6F,0x77,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74 +,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F +,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F +,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x4C,0x49,0x4E,0x45,0x53,0x54,0x52,0x49,0x4B,0x45,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x43,0x44,0x4C,0x33,0x4C,0x49,0x4E,0x45,0x53,0x54,0x52,0x49,0x4B,0x45,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x4C,0x69,0x6E,0x65,0x53,0x74,0x72,0x69 +,0x6B,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54 +,0x68,0x72,0x65,0x65,0x2D,0x4C,0x69,0x6E,0x65,0x20,0x53,0x74,0x72,0x69,0x6B,0x65,0x20,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F +,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E +,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C +,0x33,0x4F,0x55,0x54,0x53,0x49,0x44,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x4F,0x55,0x54,0x53,0x49,0x44 +,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x4F,0x75 +,0x74,0x73,0x69,0x64,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x4F,0x75,0x74,0x73,0x69,0x64,0x65,0x20,0x55,0x70,0x2F,0x44 +,0x6F,0x77,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72 +,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F +,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x53,0x54,0x41,0x52,0x53,0x49,0x4E,0x53,0x4F,0x55,0x54,0x48,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x43,0x44,0x4C,0x33,0x53,0x54,0x41,0x52,0x53,0x49,0x4E,0x53,0x4F,0x55,0x54,0x48,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x53,0x74,0x61,0x72,0x73,0x49 +,0x6E,0x53,0x6F,0x75,0x74,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x53,0x74,0x61,0x72,0x73,0x20,0x49,0x6E,0x20,0x54,0x68 +,0x65,0x20,0x53,0x6F,0x75,0x74,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 +,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x57,0x48,0x49,0x54,0x45,0x53,0x4F,0x4C,0x44 +,0x49,0x45,0x52,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x57,0x48,0x49,0x54,0x45,0x53,0x4F,0x4C,0x44,0x49 +,0x45,0x52,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33 +,0x57,0x68,0x69,0x74,0x65,0x53,0x6F,0x6C,0x64,0x69,0x65,0x72,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x41,0x64,0x76,0x61 +,0x6E,0x63,0x69,0x6E,0x67,0x20,0x57,0x68,0x69,0x74,0x65,0x20,0x53,0x6F,0x6C,0x64,0x69,0x65,0x72,0x73 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 +,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x43,0x44,0x4C,0x41,0x42,0x41,0x4E,0x44,0x4F,0x4E,0x45,0x44,0x42,0x41,0x42,0x59,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44 +,0x4C,0x41,0x42,0x41,0x4E,0x44,0x4F,0x4E,0x45,0x44,0x42,0x41,0x42,0x59,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x41,0x62,0x61,0x6E,0x64,0x6F,0x6E,0x65,0x64,0x42 +,0x61,0x62,0x79,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x41,0x62,0x61,0x6E,0x64,0x6F,0x6E,0x65,0x64,0x20,0x42,0x61,0x62,0x79,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 +,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 +,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50 +,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72 +,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69 +,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 +,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73 +,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30 +,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30 +,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x41,0x44,0x56,0x41,0x4E,0x43,0x45,0x42,0x4C,0x4F,0x43,0x4B +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x43,0x44,0x4C,0x41,0x44,0x56,0x41,0x4E,0x43,0x45,0x42,0x4C,0x4F,0x43,0x4B,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x41,0x64,0x76,0x61,0x6E,0x63,0x65 +,0x42,0x6C,0x6F,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x41,0x64,0x76,0x61,0x6E,0x63,0x65,0x20,0x42,0x6C,0x6F,0x63,0x6B,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E +,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C +,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x42,0x45 +,0x4C,0x54,0x48,0x4F,0x4C,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x42,0x45,0x4C,0x54,0x48,0x4F,0x4C,0x44,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x42,0x65,0x6C,0x74,0x48 +,0x6F,0x6C,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x42,0x65,0x6C,0x74,0x2D,0x68,0x6F,0x6C,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C +,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x42,0x52,0x45,0x41,0x4B,0x41,0x57,0x41 +,0x59,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x42,0x52,0x45,0x41,0x4B,0x41,0x57,0x41,0x59,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x42,0x72,0x65,0x61,0x6B,0x61,0x77,0x61,0x79 +,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x72,0x65 +,0x61,0x6B,0x61,0x77,0x61,0x79,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74 +,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x43,0x4C,0x4F,0x53,0x49,0x4E,0x47,0x4D,0x41,0x52,0x55 +,0x42,0x4F,0x5A,0x55,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x43,0x4C,0x4F,0x53,0x49,0x4E,0x47,0x4D,0x41,0x52,0x55 +,0x42,0x4F,0x5A,0x55,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x43,0x6C,0x6F,0x73,0x69,0x6E,0x67,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x6C,0x6F,0x73,0x69,0x6E,0x67,0x20 +,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50 +,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F +,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x43,0x4F,0x4E,0x43,0x45,0x41,0x4C,0x42,0x41 +,0x42,0x59,0x53,0x57,0x41,0x4C,0x4C,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x43,0x4F,0x4E,0x43,0x45,0x41,0x4C,0x42 +,0x41,0x42,0x59,0x53,0x57,0x41,0x4C,0x4C,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x64,0x6C,0x43,0x6F,0x6E,0x63,0x65,0x61,0x6C,0x42,0x61,0x62,0x79,0x73,0x57,0x61,0x6C,0x6C +,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x6F,0x6E +,0x63,0x65,0x61,0x6C,0x69,0x6E,0x67,0x20,0x42,0x61,0x62,0x79,0x20,0x53,0x77,0x61,0x6C,0x6C,0x6F,0x77 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 +,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x43,0x44,0x4C,0x43,0x4F,0x55,0x4E,0x54,0x45,0x52,0x41,0x54,0x54,0x41,0x43,0x4B,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44 +,0x4C,0x43,0x4F,0x55,0x4E,0x54,0x45,0x52,0x41,0x54,0x54,0x41,0x43,0x4B,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x43,0x6F,0x75,0x6E,0x74,0x65,0x72,0x41,0x74,0x74 +,0x61,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x43,0x6F,0x75,0x6E,0x74,0x65,0x72,0x61,0x74,0x74,0x61,0x63,0x6B,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 +,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x44,0x41,0x52,0x4B +,0x43,0x4C,0x4F,0x55,0x44,0x43,0x4F,0x56,0x45,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x41,0x52,0x4B,0x43 +,0x4C,0x4F,0x55,0x44,0x43,0x4F,0x56,0x45,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x43,0x64,0x6C,0x44,0x61,0x72,0x6B,0x43,0x6C,0x6F,0x75,0x64,0x43,0x6F,0x76,0x65,0x72,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x61,0x72,0x6B +,0x20,0x43,0x6C,0x6F,0x75,0x64,0x20,0x43,0x6F,0x76,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 +,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E +,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65 +,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74 +,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68 +,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F +,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x35,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x44,0x6F,0x6A,0x69,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x6F,0x6A,0x69 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 +,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49 +,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x44,0x6F,0x6A,0x69,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x6F,0x6A,0x69,0x20,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 +,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 +,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x44,0x52,0x41 +,0x47,0x4F,0x4E,0x46,0x4C,0x59,0x44,0x4F,0x4A,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x52,0x41,0x47,0x4F +,0x4E,0x46,0x4C,0x59,0x44,0x4F,0x4A,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x64,0x6C,0x44,0x72,0x61,0x67,0x6F,0x6E,0x66,0x6C,0x79,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x72,0x61,0x67,0x6F,0x6E +,0x66,0x6C,0x79,0x20,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50 +,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F +,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x45,0x4E,0x47,0x55,0x4C,0x46,0x49,0x4E,0x47 +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x43,0x44,0x4C,0x45,0x4E,0x47,0x55,0x4C,0x46,0x49,0x4E,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x45,0x6E,0x67,0x75,0x6C,0x66,0x69,0x6E,0x67,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x45,0x6E,0x67,0x75 +,0x6C,0x66,0x69,0x6E,0x67,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 +,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E +,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E +,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x45,0x76,0x65,0x6E,0x69,0x6E,0x67,0x44,0x6F,0x6A,0x69,0x53,0x74 +,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x45 +,0x76,0x65,0x6E,0x69,0x6E,0x67,0x20,0x44,0x6F,0x6A,0x69,0x20,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67 +,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64 +,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x50,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65 +,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20 +,0x77,0x69,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C +,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 +,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C +,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63 +,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 +,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E,0x49,0x4E,0x47,0x53,0x54,0x41 +,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E,0x49,0x4E,0x47,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x45,0x76,0x65,0x6E,0x69,0x6E,0x67 +,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x45,0x76,0x65,0x6E,0x69,0x6E,0x67,0x20,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 +,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65 +,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50 +,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61 +,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74 +,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C +,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69 +,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x47,0x41,0x50,0x53,0x49,0x44,0x45,0x53,0x49,0x44,0x45,0x57,0x48 +,0x49,0x54,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x47,0x41,0x50,0x53,0x49,0x44,0x45,0x53,0x49,0x44,0x45,0x57 +,0x48,0x49,0x54,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x47,0x61,0x70,0x53,0x69,0x64,0x65,0x53,0x69,0x64,0x65,0x57,0x68,0x69,0x74,0x65,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x70,0x2F,0x44,0x6F,0x77,0x6E +,0x2D,0x67,0x61,0x70,0x20,0x73,0x69,0x64,0x65,0x2D,0x62,0x79,0x2D,0x73,0x69,0x64,0x65,0x20,0x77,0x68 +,0x69,0x74,0x65,0x20,0x6C,0x69,0x6E,0x65,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C +,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x47,0x52,0x41,0x56,0x45,0x53,0x54,0x4F +,0x4E,0x45,0x44,0x4F,0x4A,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x47,0x52,0x41,0x56,0x45,0x53,0x54,0x4F,0x4E +,0x45,0x44,0x4F,0x4A,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x47,0x72,0x61,0x76,0x65,0x73,0x74,0x6F,0x6E,0x65,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x47,0x72,0x61,0x76,0x65,0x73,0x74,0x6F +,0x6E,0x65,0x20,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 +,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x4D,0x4D,0x45,0x52,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44 +,0x4C,0x48,0x41,0x4D,0x4D,0x45,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x43,0x64,0x6C,0x48,0x61,0x6D,0x6D,0x65,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x61,0x6D,0x6D,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 +,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x4E,0x47,0x49 +,0x4E,0x47,0x4D,0x41,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x41,0x4E,0x47,0x49,0x4E,0x47,0x4D,0x41,0x4E +,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x48,0x61,0x6E,0x67 +,0x69,0x6E,0x67,0x4D,0x61,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x48,0x61,0x6E,0x67,0x69,0x6E,0x67,0x20,0x4D,0x61,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 +,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 +,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x52 +,0x41,0x4D,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x41,0x52,0x41,0x4D,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x48,0x61,0x72,0x61,0x6D,0x69,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x61,0x72,0x61,0x6D,0x69,0x20 +,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 +,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x52,0x41,0x4D,0x49,0x43,0x52,0x4F,0x53 +,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x41,0x52,0x41,0x4D,0x49,0x43,0x52,0x4F,0x53,0x53,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x48,0x61,0x72,0x61,0x6D,0x69,0x43 +,0x72,0x6F,0x73,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x48,0x61,0x72,0x61,0x6D,0x69,0x20,0x43,0x72,0x6F,0x73,0x73,0x20,0x50,0x61,0x74,0x74,0x65,0x72 +,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 +,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x43,0x44,0x4C,0x48,0x49,0x47,0x48,0x57,0x41,0x56,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x49,0x47 +,0x48,0x57,0x41,0x56,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x48,0x69,0x67,0x6E,0x57,0x61,0x76,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x67,0x68,0x2D,0x57,0x61,0x76,0x65,0x20,0x43,0x61,0x6E,0x64 +,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E +,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70 +,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67 +,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D +,0x2D,0x20,0x43,0x44,0x4C,0x48,0x49,0x4B,0x4B,0x41,0x4B,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x49,0x4B +,0x4B,0x41,0x4B,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x48,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65 +,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43 +,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43 +,0x44,0x4C,0x48,0x49,0x4B,0x4B,0x41,0x4B,0x45,0x4D,0x4F,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x49,0x4B +,0x4B,0x41,0x4B,0x45,0x4D,0x4F,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x43,0x64,0x6C,0x48,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x4D,0x6F,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x64,0x69,0x66,0x69,0x65,0x64,0x20,0x48 +,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 +,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 +,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x4F,0x4D +,0x49,0x4E,0x47,0x50,0x49,0x47,0x45,0x4F,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x4F,0x4D,0x49,0x4E,0x47 +,0x50,0x49,0x47,0x45,0x4F,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43 +,0x64,0x6C,0x48,0x6F,0x6D,0x69,0x6E,0x67,0x50,0x69,0x67,0x65,0x6F,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x6F,0x6D,0x69,0x6E,0x67,0x20,0x50,0x69 +,0x67,0x65,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65 +,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70 +,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67 +,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x49,0x44,0x45,0x4E,0x54,0x49,0x43,0x41,0x4C,0x33,0x43,0x52,0x4F +,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x49,0x44,0x45,0x4E,0x54,0x49,0x43,0x41,0x4C,0x33,0x43,0x52,0x4F +,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x49,0x64 +,0x65,0x6E,0x74,0x69,0x63,0x61,0x6C,0x33,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x64,0x65,0x6E,0x74,0x69,0x63,0x61,0x6C,0x20 +,0x54,0x68,0x72,0x65,0x65,0x20,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F +,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69 +,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x49,0x4E,0x4E,0x45,0x43,0x4B +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x43,0x44,0x4C,0x49,0x4E,0x4E,0x45,0x43,0x4B,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x49,0x6E,0x4E,0x65,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x2D,0x4E,0x65,0x63,0x6B,0x20,0x50,0x61 +,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74 +,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F +,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F +,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x49,0x4E,0x56,0x45,0x52,0x54,0x45,0x44,0x48,0x41,0x4D,0x4D +,0x45,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x49,0x4E,0x56,0x45,0x52,0x54,0x45,0x44,0x48,0x41,0x4D,0x4D,0x45 +,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x49,0x6E,0x76 +,0x65,0x72,0x74,0x65,0x64,0x48,0x61,0x6D,0x6D,0x65,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x48,0x61,0x6D +,0x6D,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72 +,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F +,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4B,0x49,0x43,0x4B,0x49,0x4E,0x47,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4B,0x49 +,0x43,0x4B,0x49,0x4E,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x4B,0x69,0x63,0x6B,0x69,0x6E,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4B,0x69,0x63,0x6B,0x69,0x6E,0x67,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 +,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4B,0x49,0x43,0x4B,0x49 +,0x4E,0x47,0x42,0x59,0x4C,0x45,0x4E,0x47,0x54,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4B,0x49,0x43,0x4B,0x49 +,0x4E,0x47,0x42,0x59,0x4C,0x45,0x4E,0x47,0x54,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4B,0x69,0x63,0x6B,0x69,0x6E,0x67,0x42,0x79,0x4C,0x65,0x6E,0x67,0x74 +,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4B,0x69 +,0x63,0x6B,0x69,0x6E,0x67,0x20,0x2D,0x20,0x62,0x75,0x6C,0x6C,0x2F,0x62,0x65,0x61,0x72,0x20,0x64,0x65 +,0x74,0x65,0x72,0x6D,0x69,0x6E,0x65,0x64,0x20,0x62,0x79,0x20,0x74,0x68,0x65,0x20,0x6C,0x6F,0x6E,0x67 +,0x65,0x72,0x20,0x6D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F +,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69 +,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4C,0x41,0x44,0x44,0x45,0x52 +,0x42,0x4F,0x54,0x54,0x4F,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4C,0x41,0x44,0x44,0x45,0x52,0x42,0x4F,0x54 +,0x54,0x4F,0x4D,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4C +,0x61,0x64,0x64,0x65,0x72,0x42,0x6F,0x74,0x74,0x6F,0x6D,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x61,0x64,0x64,0x65,0x72,0x20,0x42,0x6F,0x74,0x74,0x6F +,0x6D,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 +,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47,0x4C,0x45,0x47,0x47,0x45,0x44,0x44,0x4F,0x4A,0x49,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47,0x4C,0x45,0x47,0x47,0x45,0x44,0x44,0x4F,0x4A,0x49,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4C,0x6F,0x6E,0x67,0x4C,0x65,0x67 +,0x67,0x65,0x64,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x6E,0x67,0x20,0x4C,0x65,0x67,0x67,0x65,0x64,0x20,0x44,0x6F,0x6A,0x69 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 +,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47,0x4C,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47 +,0x4C,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x4C,0x6F,0x6E,0x67,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x6E,0x67,0x20,0x4C,0x69,0x6E,0x65,0x20,0x43,0x61,0x6E,0x64,0x6C +,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 +,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x43,0x44,0x4C,0x4D,0x41,0x52,0x55,0x42,0x4F,0x5A,0x55,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x41,0x52 +,0x55,0x42,0x4F,0x5A,0x55,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 +,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 +,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4D,0x41,0x54 +,0x43,0x48,0x49,0x4E,0x47,0x4C,0x4F,0x57,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x41,0x54,0x43,0x48,0x49,0x4E +,0x47,0x4C,0x4F,0x57,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x4D,0x61,0x74,0x63,0x68,0x69,0x6E,0x67,0x4C,0x6F,0x77,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x61,0x74,0x63,0x68,0x69,0x6E,0x67,0x20,0x4C,0x6F,0x77 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 +,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x43,0x44,0x4C,0x4D,0x41,0x54,0x48,0x4F,0x4C,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x41,0x54,0x48,0x4F +,0x4C,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4D,0x61 +,0x74,0x48,0x6F,0x6C,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x4D,0x61,0x74,0x20,0x48,0x6F,0x6C,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63 +,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E,0x65,0x74 +,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63 +,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F +,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68,0x69,0x6E +,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E +,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30 +,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30 +,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35 +,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x43,0x44,0x4C,0x4D,0x4F,0x52,0x4E,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x43,0x44,0x4C,0x4D,0x4F,0x52,0x4E,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4D,0x6F,0x72,0x6E,0x69 +,0x6E,0x67,0x44,0x6F,0x6A,0x69,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x72,0x6E,0x69,0x6E,0x67,0x20,0x44,0x6F,0x6A,0x69,0x20 +,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65 +,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70 +,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67 +,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65 +,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61 +,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68 +,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30 +,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30 +,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65 +,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30 +,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4D,0x4F +,0x52,0x4E,0x49,0x4E,0x47,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x4F,0x52,0x4E,0x49,0x4E +,0x47,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x4D,0x6F,0x72,0x6E,0x69,0x6E,0x67,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x72,0x6E,0x69,0x6E,0x67,0x20,0x53,0x74,0x61 +,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 +,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 +,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66 +,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61 +,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20 +,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 +,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4F,0x4E,0x4E,0x45,0x43 +,0x4B,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4F,0x4E,0x4E,0x45,0x43,0x4B,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4F,0x6E,0x4E,0x65,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4F,0x6E,0x2D,0x4E,0x65,0x63,0x6B,0x20,0x50 +,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74 +,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x50,0x49,0x45,0x52,0x43,0x49,0x4E,0x47,0x20,0x2D,0x2D +,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43 +,0x44,0x4C,0x50,0x49,0x45,0x52,0x43,0x49,0x4E,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x50,0x69,0x65,0x72,0x63,0x69,0x6E,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x69,0x65,0x72,0x63,0x69,0x6E,0x67,0x20 +,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 +,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x52,0x49,0x43,0x4B,0x53,0x48,0x41,0x57,0x4D,0x41 +,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x52,0x49,0x43,0x4B,0x53,0x48,0x41,0x57,0x4D,0x41,0x4E,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x52,0x69,0x63,0x6B,0x73,0x68,0x61 +,0x77,0x4D,0x61,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x52,0x69,0x63,0x6B,0x73,0x68,0x61,0x77,0x20,0x4D,0x61,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 +,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x52,0x49,0x53,0x45 +,0x46,0x41,0x4C,0x4C,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x52,0x49,0x53 +,0x45,0x46,0x41,0x4C,0x4C,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x52,0x69,0x73,0x65,0x46,0x61,0x6C,0x6C,0x33,0x4D,0x65 +,0x74,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x52,0x69,0x73,0x69,0x6E,0x67,0x2F,0x46,0x61,0x6C,0x6C,0x69,0x6E,0x67,0x20,0x54,0x68,0x72 +,0x65,0x65,0x20,0x4D,0x65,0x74,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63 +,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x45,0x50,0x41,0x52,0x41,0x54 +,0x49,0x4E,0x47,0x4C,0x49,0x4E,0x45,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x45,0x50,0x41,0x52,0x41,0x54 +,0x49,0x4E,0x47,0x4C,0x49,0x4E,0x45,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x64,0x6C,0x53,0x65,0x70,0x65,0x72,0x61,0x74,0x69,0x6E,0x67,0x4C,0x69,0x6E,0x65,0x73,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x65,0x70,0x61 +,0x72,0x61,0x74,0x69,0x6E,0x67,0x20,0x4C,0x69,0x6E,0x65,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 +,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x48,0x4F,0x4F,0x54 +,0x49,0x4E,0x47,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x48,0x4F,0x4F,0x54,0x49,0x4E,0x47 +,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x53,0x68,0x6F,0x6F,0x74,0x69,0x6E,0x67,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x68,0x6F,0x6F,0x74,0x69,0x6E,0x67,0x20,0x53,0x74 +,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E +,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70 +,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67 +,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D +,0x2D,0x20,0x43,0x44,0x4C,0x53,0x48,0x4F,0x52,0x54,0x4C,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09 +,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53 +,0x48,0x4F,0x52,0x54,0x4C,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x64,0x6C,0x53,0x68,0x6F,0x72,0x74,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x68,0x6F,0x72,0x74,0x20,0x4C,0x69,0x6E,0x65 +,0x20,0x43,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 +,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 +,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 +,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x50,0x49,0x4E,0x4E,0x49,0x4E,0x47,0x54,0x4F +,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x50,0x49,0x4E,0x4E,0x49,0x4E,0x47,0x54,0x4F,0x50,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x53,0x70,0x69,0x6E,0x6E,0x69,0x6E +,0x67,0x54,0x6F,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x53,0x70,0x69,0x6E,0x6E,0x69,0x6E,0x67,0x20,0x54,0x6F,0x70,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 +,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x54,0x41,0x4C +,0x4C,0x45,0x44,0x50,0x41,0x54,0x54,0x45,0x52,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x54,0x41,0x4C,0x4C +,0x45,0x44,0x50,0x41,0x54,0x54,0x45,0x52,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x43,0x64,0x6C,0x53,0x74,0x61,0x6C,0x6C,0x65,0x64,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x61,0x6C +,0x6C,0x65,0x64,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F +,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69 +,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x54,0x49,0x43,0x4B,0x53 +,0x41,0x4E,0x44,0x57,0x49,0x43,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x54,0x49,0x43,0x4B,0x53,0x41,0x4E +,0x44,0x57,0x49,0x43,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x53,0x74,0x69,0x63,0x6B,0x53,0x61,0x6E,0x64,0x77,0x69,0x63,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x69,0x63,0x6B,0x20,0x53,0x61,0x6E +,0x64,0x77,0x69,0x63,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74 +,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F +,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F +,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x54,0x41,0x4B,0x55,0x52,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09 +,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54 +,0x41,0x4B,0x55,0x52,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 +,0x6C,0x54,0x61,0x6B,0x75,0x72,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x54,0x61,0x6B,0x75,0x72,0x69,0x20,0x28,0x44,0x72,0x61,0x67,0x6F,0x6E,0x66,0x6C +,0x79,0x20,0x44,0x6F,0x6A,0x69,0x20,0x77,0x69,0x74,0x68,0x20,0x76,0x65,0x72,0x79,0x20,0x6C,0x6F,0x6E +,0x67,0x20,0x6C,0x6F,0x77,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6F,0x77,0x29,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E +,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C +,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x54,0x41 +,0x53,0x55,0x4B,0x49,0x47,0x41,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54,0x41,0x53,0x55,0x4B,0x49,0x47,0x41 +,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x54,0x61,0x73 +,0x75,0x6B,0x69,0x47,0x61,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x54,0x61,0x73,0x75,0x6B,0x69,0x20,0x47,0x61,0x70,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 +,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x54,0x48,0x52,0x55 +,0x53,0x54,0x49,0x4E,0x47,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54,0x48,0x52,0x55,0x53,0x54,0x49,0x4E,0x47,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x54,0x68,0x72,0x75,0x73 +,0x74,0x69,0x6E,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x54,0x68,0x72,0x75,0x73,0x74,0x69,0x6E,0x67,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63 +,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61 +,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44 +,0x4C,0x54,0x52,0x49,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54,0x52,0x49,0x53,0x54,0x41,0x52 +,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x54,0x72,0x69,0x73 +,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x54,0x72,0x69,0x73,0x74,0x61,0x72,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E +,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C +,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x55,0x4E +,0x49,0x51,0x55,0x45,0x33,0x52,0x49,0x56,0x45,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x55,0x4E,0x49,0x51,0x55 +,0x45,0x33,0x52,0x49,0x56,0x45,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x43,0x64,0x6C,0x55,0x6E,0x69,0x71,0x75,0x65,0x33,0x52,0x69,0x76,0x65,0x72,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x6E,0x69,0x71,0x75,0x65,0x20,0x33 +,0x20,0x52,0x69,0x76,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74 +,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F +,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C +,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x55,0x50,0x53,0x49,0x44,0x45,0x47,0x41,0x50,0x32,0x43 +,0x52,0x4F,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x55,0x50,0x53,0x49,0x44,0x45,0x47,0x41,0x50,0x32,0x43 +,0x52,0x4F,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C +,0x55,0x70,0x73,0x69,0x64,0x65,0x47,0x61,0x70,0x32,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x70,0x73,0x69,0x64,0x65,0x20,0x47 +,0x61,0x70,0x20,0x54,0x77,0x6F,0x20,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 +,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x58,0x53,0x49,0x44,0x45 +,0x47,0x41,0x50,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x58,0x53,0x49,0x44 +,0x45,0x47,0x41,0x50,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x58,0x53,0x69,0x64,0x65,0x47,0x61,0x70,0x33,0x4D,0x65,0x74 +,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x55,0x70,0x73,0x69,0x64,0x65,0x2F,0x44,0x6F,0x77,0x6E,0x73,0x69,0x64,0x65,0x20,0x47,0x61,0x70 +,0x20,0x54,0x68,0x72,0x65,0x65,0x20,0x4D,0x65,0x74,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 +,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 +,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 +,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x45,0x49,0x4C,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x43,0x45,0x49,0x4C,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x65,0x69 +,0x6C,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65 +,0x63,0x74,0x6F,0x72,0x20,0x43,0x65,0x69,0x6C,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x43,0x4D,0x4F,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4D,0x4F,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6D,0x6F,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x68,0x61,0x6E,0x64,0x65,0x20,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D +,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72 +,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 +,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x43,0x4F,0x52,0x52,0x45,0x4C,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4F,0x52,0x52,0x45,0x4C,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6F,0x72,0x72,0x65,0x6C,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x61,0x72,0x73,0x6F,0x6E +,0x26,0x61,0x70,0x6F,0x73,0x3B,0x73,0x20,0x43,0x6F,0x72,0x72,0x65,0x6C,0x61,0x74,0x69,0x6F,0x6E,0x20 +,0x43,0x6F,0x65,0x66,0x66,0x69,0x63,0x69,0x65,0x6E,0x74,0x20,0x28,0x72,0x29,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 +,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x4F,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4F,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6F,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F +,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x43,0x6F,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 +,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x4F,0x53,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4F,0x53,0x48,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6F,0x73,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67 +,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x43,0x6F,0x73,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C +,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x44,0x45,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x45,0x4D,0x41,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x6D,0x61,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x45,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 +,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65 +,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D +,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x44,0x49,0x56,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x49,0x56,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x69,0x76,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D +,0x65,0x74,0x69,0x63,0x20,0x44,0x69,0x76,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D +,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E +,0x52,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x44,0x58,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x58 +,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x78,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E +,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E +,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x45,0x4D +,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x45,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x45 +,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x45 +,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76 +,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72 +,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x45,0x58,0x50 +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x45,0x58,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x45,0x78 +,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65 +,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D,0x65,0x74,0x69,0x63,0x20,0x45,0x78,0x70,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73 +,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x46,0x4C,0x4F,0x4F,0x52,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x46,0x4C,0x4F,0x4F,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x46 +,0x6C,0x6F,0x6F,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x46,0x6C,0x6F,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x44,0x43,0x50,0x45,0x52,0x49,0x4F,0x44,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x48,0x54,0x5F,0x44,0x43,0x50,0x45,0x52,0x49,0x4F,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x44,0x63,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20 +,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x44,0x6F,0x6D,0x69,0x6E,0x61,0x6E,0x74 +,0x20,0x43,0x79,0x63,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E +,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x44,0x43,0x50,0x48,0x41,0x53,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54,0x5F,0x44,0x43 +,0x50,0x48,0x41,0x53,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74 +,0x44,0x63,0x50,0x68,0x61,0x73,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72 +,0x6D,0x20,0x2D,0x20,0x44,0x6F,0x6D,0x69,0x6E,0x61,0x6E,0x74,0x20,0x43,0x79,0x63,0x6C,0x65,0x20,0x50 +,0x68,0x61,0x73,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65 +,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x50,0x48,0x41 +,0x53,0x4F,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54,0x5F,0x50,0x48,0x41,0x53,0x4F,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x50,0x68,0x61,0x73,0x6F,0x72,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20 +,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x50,0x68,0x61,0x73,0x6F,0x72,0x20,0x43 +,0x6F,0x6D,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x50,0x68,0x61,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x51,0x75,0x61,0x64,0x72,0x61 +,0x74,0x75,0x72,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65 +,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48 +,0x54,0x5F,0x53,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54,0x5F,0x53,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x53,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20,0x54 +,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x53,0x69,0x6E,0x65,0x57,0x61,0x76,0x65,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69 +,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74 +,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x53,0x69,0x6E +,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x4C,0x65,0x61,0x64,0x53,0x69,0x6E,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4C,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54 +,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4C,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x48,0x74,0x54,0x72,0x65,0x6E,0x64,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20,0x54 +,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x49,0x6E,0x73,0x74,0x61,0x6E,0x74,0x61,0x6E +,0x65,0x6F,0x75,0x73,0x20,0x54,0x72,0x65,0x6E,0x64,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73 +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62 +,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4D,0x4F,0x44,0x45,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x48,0x54,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4D,0x4F,0x44,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x54,0x72,0x65,0x6E,0x64,0x4D,0x6F,0x64,0x65,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72 +,0x74,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x54,0x72,0x65,0x6E,0x64,0x20 +,0x76,0x73,0x20,0x43,0x79,0x63,0x6C,0x65,0x20,0x4D,0x6F,0x64,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E +,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x49,0x4D,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x4D,0x49,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x49,0x6D,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x74,0x72,0x61,0x64,0x61,0x79,0x20,0x4D,0x6F,0x6D +,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72 +,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4B,0x41,0x4D,0x41,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x4B,0x41,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4B,0x61,0x6D +,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4B,0x61 +,0x75,0x66,0x6D,0x61,0x6E,0x20,0x41,0x64,0x61,0x70,0x74,0x69,0x76,0x65,0x20,0x4D,0x6F,0x76,0x69,0x6E +,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69 +,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F +,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 +,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45 +,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72 +,0x52,0x65,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x4C,0x69,0x6E,0x65,0x61,0x72,0x20,0x52,0x65,0x67,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65 +,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69 +,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F +,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 +,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x41,0x4E,0x47,0x4C,0x45,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x49 +,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x41,0x4E,0x47,0x4C,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x52,0x65,0x67,0x41,0x6E,0x67,0x6C,0x65 +,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x69,0x6E +,0x65,0x61,0x72,0x20,0x52,0x65,0x67,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x20,0x41,0x6E,0x67,0x6C,0x65 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63 +,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20 +,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 +,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C +,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x49,0x4E,0x54,0x45,0x52,0x43,0x45,0x50,0x54,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x49,0x4E,0x54,0x45,0x52,0x43,0x45,0x50,0x54,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x52,0x65 +,0x67,0x49,0x6E,0x74,0x65,0x72,0x63,0x65,0x70,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x20,0x52,0x65,0x67,0x72,0x65,0x73 +,0x73,0x69,0x6F,0x6E,0x20,0x49,0x6E,0x74,0x65,0x72,0x63,0x65,0x70,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 +,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C,0x49 +,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x53,0x4C,0x4F,0x50,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x49,0x4E,0x45,0x41 +,0x52,0x52,0x45,0x47,0x5F,0x53,0x4C,0x4F,0x50,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x52,0x65,0x67,0x53,0x6C,0x6F,0x70,0x65,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72 +,0x20,0x52,0x65,0x67,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x20,0x53,0x6C,0x6F,0x70,0x65,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72 +,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C +,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C,0x4E,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x4C,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6E,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72 +,0x20,0x4C,0x6F,0x67,0x20,0x4E,0x61,0x74,0x75,0x72,0x61,0x6C,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C,0x4F,0x47,0x31,0x30,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x4F,0x47,0x31,0x30,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x67,0x31,0x30,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72 +,0x20,0x4C,0x6F,0x67,0x31,0x30,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74 +,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65 +,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x61,0x76,0x65 +,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C +,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65 +,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x41 +,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20 +,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x43,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x43,0x44,0x3C,0x2F +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x63,0x64,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 +,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x43,0x6F,0x6E,0x76,0x65,0x72,0x67,0x65,0x6E,0x63,0x65,0x2F,0x44 +,0x69,0x76,0x65,0x72,0x67,0x65,0x6E,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C +,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61 +,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20 +,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x32,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C +,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20 +,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x36,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x69 +,0x67,0x6E,0x61,0x6C,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73 +,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C,0x69,0x6E,0x65,0x20,0x28,0x6E,0x62,0x20,0x6F,0x66,0x20,0x70,0x65 +,0x72,0x69,0x6F,0x64,0x29,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x39,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x53,0x69,0x67,0x6E,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x48,0x69,0x73,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x48,0x69,0x73,0x74,0x6F,0x67,0x72,0x61,0x6D,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x43,0x44,0x45,0x58,0x54,0x20,0x2D,0x2D,0x3E,0x0A,0x09 +,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x43,0x44 +,0x45,0x58,0x54,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x63,0x64 +,0x45,0x78,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x4D,0x41,0x43,0x44,0x20,0x77,0x69,0x74,0x68,0x20,0x63,0x6F,0x6E,0x74,0x72,0x6F,0x6C,0x6C,0x61,0x62 +,0x6C,0x65,0x20,0x4D,0x41,0x20,0x74,0x79,0x70,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C +,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46 +,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72 +,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x32,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46 +,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65 +,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66 +,0x6F,0x72,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 +,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65 +,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 +,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x36,0x3C,0x2F,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20 +,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20 +,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x73 +,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54 +,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x69,0x67,0x6E,0x61,0x6C,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68 +,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C +,0x69,0x6E,0x65,0x20,0x28,0x6E,0x62,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x29,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x39,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x53,0x69,0x67,0x6E,0x61,0x6C,0x20,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76 +,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x73,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C,0x69,0x6E +,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x4D,0x41,0x43,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x53,0x69,0x67,0x6E,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x4D,0x41,0x43,0x44,0x48,0x69,0x73,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x48,0x69,0x73,0x74,0x6F,0x67,0x72,0x61,0x6D,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E +,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D +,0x2D,0x20,0x4D,0x41,0x43,0x44,0x46,0x49,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x43,0x44,0x46,0x49,0x58,0x3C,0x2F +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x63,0x64,0x46,0x69,0x78,0x3C,0x2F +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E +,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x43,0x6F,0x6E,0x76,0x65,0x72,0x67,0x65,0x6E,0x63 +,0x65,0x2F,0x44,0x69,0x76,0x65,0x72,0x67,0x65,0x6E,0x63,0x65,0x20,0x46,0x69,0x78,0x20,0x31,0x32,0x2F +,0x32,0x36,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75 +,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x69,0x67,0x6E,0x61,0x6C,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68 +,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C +,0x69,0x6E,0x65,0x20,0x28,0x6E,0x62,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x29,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x39,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41 +,0x43,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x4D,0x41,0x43,0x44,0x53,0x69,0x67,0x6E,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D +,0x41,0x43,0x44,0x48,0x69,0x73,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x48,0x69 +,0x73,0x74,0x6F,0x67,0x72,0x61,0x6D,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x4D,0x41,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x4D,0x61,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x4D,0x45,0x53,0x41,0x20,0x41,0x64,0x61,0x70,0x74,0x69,0x76,0x65,0x20,0x4D,0x6F +,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65 +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x20,0x4C +,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x70,0x70,0x65,0x72,0x20 +,0x6C,0x69,0x6D,0x69,0x74,0x20,0x75,0x73,0x65,0x20,0x69,0x6E,0x20,0x74,0x68,0x65,0x20,0x61,0x64,0x61 +,0x70,0x74,0x69,0x76,0x65,0x20,0x61,0x6C,0x67,0x6F,0x72,0x69,0x74,0x68,0x6D,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x39,0x2E,0x39,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32 +,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x38,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20,0x4C,0x69,0x6D,0x69,0x74 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x77,0x65,0x72,0x20,0x6C,0x69,0x6D,0x69 +,0x74,0x20,0x75,0x73,0x65,0x20,0x69,0x6E,0x20,0x74,0x68,0x65,0x20,0x61,0x64,0x61,0x70,0x74,0x69,0x76 +,0x65,0x20,0x61,0x6C,0x67,0x6F,0x72,0x69,0x74,0x68,0x6D,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x39,0x2E,0x39 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50,0x72 +,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x36,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x4D,0x41,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x6F,0x75,0x74,0x46,0x41,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44 +,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x4D,0x41,0x56,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x56,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x56 +,0x61,0x72,0x69,0x61,0x62,0x6C,0x65,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x61,0x76,0x65 +,0x72,0x61,0x67,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6C,0x65,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72 +,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x50,0x65,0x72,0x69,0x6F,0x64,0x73,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x20,0x50,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x61,0x6C,0x75,0x65,0x20,0x6C,0x65,0x73 +,0x73,0x20,0x74,0x68,0x61,0x6E,0x20,0x6D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x20,0x77,0x69,0x6C,0x6C,0x20 +,0x62,0x65,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x64,0x20,0x74,0x6F,0x20,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 +,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x61 +,0x6C,0x75,0x65,0x20,0x68,0x69,0x67,0x68,0x65,0x72,0x20,0x74,0x68,0x61,0x6E,0x20,0x6D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x20,0x77,0x69,0x6C,0x6C,0x20,0x62,0x65,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x64,0x20 +,0x74,0x6F,0x20,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72 +,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x58,0x20,0x2D,0x2D +,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D +,0x41,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x78,0x3C,0x2F +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x67,0x68,0x65 +,0x73,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63 +,0x69,0x66,0x69,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x4D,0x61,0x78,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x64,0x65,0x78,0x20,0x6F,0x66,0x20,0x68,0x69,0x67,0x68 +,0x65,0x73,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65 +,0x63,0x69,0x66,0x69,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D +,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75 +,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30 +,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x45,0x44,0x50,0x52,0x49,0x43,0x45,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x4D,0x45,0x44,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x4D,0x65,0x64,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x65,0x64,0x69,0x61,0x6E,0x20,0x50,0x72,0x69,0x63,0x65,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65,0x20,0x54,0x72,0x61,0x6E +,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C +,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x46,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x46,0x49,0x3C,0x2F,0x41,0x62,0x62 +,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 +,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x66,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x6E,0x65,0x79,0x20,0x46,0x6C,0x6F,0x77,0x20,0x49 +,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E +,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x56 +,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D +,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75 +,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34 +,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x44,0x50,0x4F,0x49,0x4E,0x54,0x20,0x2D,0x2D,0x3E,0x0A +,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x44 +,0x50,0x4F,0x49,0x4E,0x54,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69 +,0x64,0x50,0x6F,0x69,0x6E,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x4D,0x69,0x64,0x50,0x6F,0x69,0x6E,0x74,0x20,0x6F,0x76,0x65,0x72,0x20,0x70,0x65,0x72 +,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 +,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F +,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 +,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x4D,0x49,0x44,0x50,0x52,0x49,0x43,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 +,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x44,0x50,0x52,0x49,0x43 +,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x64,0x50,0x72,0x69 +,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D +,0x69,0x64,0x70,0x6F,0x69,0x6E,0x74,0x20,0x50,0x72,0x69,0x63,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72 +,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x20,0x2D,0x2D,0x3E,0x0A +,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E +,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x77,0x65,0x73,0x74,0x20 +,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69 +,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 +,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33 +,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x49,0x4E,0x44,0x45,0x58,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49 +,0x4E,0x49,0x4E,0x44,0x45,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D +,0x69,0x6E,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x64,0x65,0x78,0x20,0x6F,0x66,0x20,0x6C,0x6F,0x77,0x65,0x73,0x74,0x20 +,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69 +,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 +,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x4D,0x41,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E,0x4D,0x41 +,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x4D,0x61,0x78 +,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x77 +,0x65,0x73,0x74,0x20,0x61,0x6E,0x64,0x20,0x68,0x69,0x67,0x68,0x65,0x73,0x74,0x20,0x76,0x61,0x6C,0x75 +,0x65,0x73,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x65,0x64,0x20 +,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74 +,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 +,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x69,0x6E,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x61,0x78,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x4D,0x49,0x4E,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x4D,0x61,0x78,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x64,0x65,0x78,0x65,0x73,0x20 +,0x6F,0x66,0x20,0x6C,0x6F,0x77,0x65,0x73,0x74,0x20,0x61,0x6E,0x64,0x20,0x68,0x69,0x67,0x68,0x65,0x73 +,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x73,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63 +,0x69,0x66,0x69,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D +,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x69,0x6E,0x49,0x64 +,0x78,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x4D,0x61,0x78,0x49,0x64,0x78,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C +,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x55 +,0x53,0x5F,0x44,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E,0x55,0x53,0x5F,0x44,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x44,0x49,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x20,0x44,0x69,0x72 +,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E +,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E +,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 +,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49 +,0x4E,0x55,0x53,0x5F,0x44,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E,0x55,0x53,0x5F,0x44,0x4D,0x3C,0x2F,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x44,0x4D,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x20,0x44 +,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49 +,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55 +,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67 +,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48 +,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 +,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x4F +,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x4D,0x4F,0x4D,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D +,0x6F,0x6D,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D +,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F +,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D +,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x55,0x4C,0x54,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x55,0x4C,0x54,0x3C,0x2F,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x75,0x6C,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69 +,0x74,0x68,0x6D,0x65,0x74,0x69,0x63,0x20,0x4D,0x75,0x6C,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 +,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4E,0x41 +,0x54,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x4E,0x41,0x54,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x4E,0x61,0x74,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x4E,0x6F,0x72,0x6D,0x61,0x6C,0x69,0x7A,0x65,0x64,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65 +,0x20,0x54,0x72,0x75,0x65,0x20,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x56,0x6F,0x6C,0x61,0x74,0x69,0x6C,0x69,0x74,0x79,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74 +,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C +,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4F,0x42,0x56,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4F,0x42 +,0x56,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x62,0x76,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4F,0x6E,0x20,0x42,0x61,0x6C +,0x61,0x6E,0x63,0x65,0x20,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C +,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x50,0x4C,0x55,0x53,0x5F,0x44,0x49,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x50,0x4C,0x55,0x53,0x5F,0x44,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x50,0x6C,0x75,0x73,0x44,0x49,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x50,0x6C,0x75,0x73,0x20,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65 +,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x50,0x4C,0x55,0x53,0x5F,0x44,0x4D,0x20,0x2D,0x2D +,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x50 +,0x4C,0x55,0x53,0x5F,0x44,0x4D,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x50 +,0x6C,0x75,0x73,0x44,0x4D,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x50,0x6C,0x75,0x73,0x20,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x4D +,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F +,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69 +,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D +,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x50,0x50,0x4F,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x50,0x4F,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x70,0x6F,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x50,0x72 +,0x69,0x63,0x65,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61 +,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64 +,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x31,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64 +,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x32,0x36,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61 +,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x4F +,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x52,0x6F,0x63,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x61,0x74,0x65,0x20,0x6F +,0x66,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x20,0x3A,0x20,0x28,0x28,0x70,0x72,0x69,0x63,0x65,0x2F,0x70 +,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x29,0x2D,0x31,0x29,0x2A,0x31,0x30,0x30,0x3C,0x2F,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69 +,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69 +,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x50,0x20 +,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x52,0x4F,0x43,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x52,0x6F +,0x63,0x50,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52 +,0x61,0x74,0x65,0x20,0x6F,0x66,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x20,0x50,0x65,0x72,0x63,0x65,0x6E +,0x74,0x61,0x67,0x65,0x3A,0x20,0x28,0x70,0x72,0x69,0x63,0x65,0x2D,0x70,0x72,0x65,0x76,0x50,0x72,0x69 +,0x63,0x65,0x29,0x2F,0x70,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74 +,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x52,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x4F +,0x43,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x52,0x6F,0x63,0x52,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x61,0x74,0x65 +,0x20,0x6F,0x66,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x20,0x72,0x61,0x74,0x69,0x6F,0x3A,0x20,0x28,0x70 +,0x72,0x69,0x63,0x65,0x2F,0x70,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x29,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63 +,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x52,0x31,0x30 +,0x30,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x52,0x4F,0x43,0x52,0x31,0x30,0x30,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x52,0x6F,0x63,0x52,0x31,0x30,0x30,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x61,0x74,0x65,0x20,0x6F,0x66,0x20,0x63,0x68,0x61,0x6E,0x67 +,0x65,0x20,0x72,0x61,0x74,0x69,0x6F,0x20,0x31,0x30,0x30,0x20,0x73,0x63,0x61,0x6C,0x65,0x3A,0x20,0x28 +,0x70,0x72,0x69,0x63,0x65,0x2F,0x70,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x29,0x2A,0x31,0x30,0x30 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20 +,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20 +,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 +,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52 +,0x53,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x52,0x53,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x52,0x73,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x52,0x65,0x6C,0x61,0x74,0x69,0x76,0x65,0x20,0x53,0x74,0x72,0x65,0x6E,0x67,0x74,0x68,0x20,0x49,0x6E +,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74 +,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69 +,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x41,0x52,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x53,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x61,0x72,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x61,0x72,0x61 +,0x62,0x6F,0x6C,0x69,0x63,0x20,0x53,0x41,0x52,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67 +,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46 +,0x61,0x63,0x74,0x6F,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C +,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x75,0x73,0x65,0x64,0x20 +,0x75,0x70,0x20,0x74,0x6F,0x20,0x74,0x68,0x65,0x20,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x76,0x61 +,0x6C,0x75,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30 +,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33 +,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72 +,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 +,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41 +,0x46,0x20,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41 +,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x76,0x61,0x6C,0x75,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F +,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 +,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x34,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 +,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x41,0x52,0x45,0x58,0x54 +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x53,0x41,0x52,0x45,0x58,0x54,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x53,0x61,0x72,0x45,0x78,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x50,0x61,0x72,0x61,0x62,0x6F,0x6C,0x69,0x63,0x20,0x53,0x41,0x52,0x20,0x2D,0x20 +,0x45,0x78,0x74,0x65,0x6E,0x64,0x65,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F +,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x61,0x72,0x74,0x20,0x56,0x61,0x6C,0x75,0x65,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x61,0x72,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x61,0x6E +,0x64,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x20,0x30,0x20,0x66,0x6F,0x72,0x20,0x41 +,0x75,0x74,0x6F,0x2C,0x20,0x26,0x67,0x74,0x3B,0x30,0x20,0x66,0x6F,0x72,0x20,0x4C,0x6F,0x6E,0x67,0x2C +,0x20,0x26,0x6C,0x74,0x3B,0x30,0x20,0x66,0x6F,0x72,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C,0x2F,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C +,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69 +,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x66,0x66,0x73,0x65,0x74 +,0x20,0x6F,0x6E,0x20,0x52,0x65,0x76,0x65,0x72,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x20,0x6F,0x66,0x66,0x73,0x65,0x74,0x20,0x61,0x64,0x64,0x65 +,0x64,0x2F,0x72,0x65,0x6D,0x6F,0x76,0x65,0x64,0x20,0x74,0x6F,0x20,0x69,0x6E,0x69,0x74,0x69,0x61,0x6C +,0x20,0x73,0x74,0x6F,0x70,0x20,0x6F,0x6E,0x20,0x73,0x68,0x6F,0x72,0x74,0x2F,0x6C,0x6F,0x6E,0x67,0x20 +,0x72,0x65,0x76,0x65,0x72,0x73,0x61,0x6C,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63 +,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x2E,0x35,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 +,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x41,0x46,0x20,0x49,0x6E,0x69,0x74,0x20,0x4C,0x6F,0x6E,0x67,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46 +,0x61,0x63,0x74,0x6F,0x72,0x20,0x69,0x6E,0x69,0x74,0x69,0x61,0x6C,0x20,0x76,0x61,0x6C,0x75,0x65,0x20 +,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x4C,0x6F,0x6E,0x67,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69 +,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 +,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37 +,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65 +,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 +,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x2E,0x39,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x46 +,0x20,0x4C,0x6F,0x6E,0x67,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C +,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x66,0x6F,0x72,0x20,0x74 +,0x68,0x65,0x20,0x4C,0x6F,0x6E,0x67,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F +,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30 +,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x46,0x20,0x4D,0x61,0x78,0x20 +,0x4C,0x6F,0x6E,0x67,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65 +,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x6D,0x61,0x78,0x69,0x6D,0x75 +,0x6D,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x4C,0x6F,0x6E,0x67 +,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52 +,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E +,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72 +,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x34,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x46,0x20,0x49,0x6E,0x69,0x74,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F +,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x69,0x6E,0x69,0x74,0x69,0x61,0x6C,0x20,0x76,0x61,0x6C +,0x75,0x65,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x53,0x68,0x6F,0x72,0x74,0x20,0x64,0x69,0x72 +,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30 +,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 +,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x2E,0x39,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D +,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x41,0x46,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20 +,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x53,0x68,0x6F,0x72,0x74,0x20,0x64,0x69,0x72,0x65,0x63,0x74 +,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30 +,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33 +,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72 +,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 +,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F +,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41 +,0x46,0x20,0x4D,0x61,0x78,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72 +,0x20,0x6D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x66,0x6F,0x72,0x20,0x74 +,0x68,0x65,0x20,0x53,0x68,0x6F,0x72,0x74,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C +,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69 +,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x34,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C +,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x53,0x49,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x49,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x53,0x69,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69 +,0x63,0x20,0x53,0x69,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68 +,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C +,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 +,0x53,0x49,0x4E,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x49,0x4E,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x53,0x69,0x6E,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65 +,0x74,0x72,0x69,0x63,0x20,0x53,0x69,0x6E,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x53,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x69,0x6D,0x70,0x6C,0x65,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 +,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65 +,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D +,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 +,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C +,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A +,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x51,0x52,0x54,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x51,0x52,0x54,0x3C,0x2F,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x71,0x72,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x53,0x71,0x75 +,0x61,0x72,0x65,0x20,0x52,0x6F,0x6F,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D +,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E +,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 +,0x2D,0x2D,0x20,0x53,0x54,0x44,0x44,0x45,0x56,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x54,0x44,0x44,0x45,0x56,0x3C,0x2F,0x41 +,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x64,0x44,0x65,0x76,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x61,0x6E,0x64,0x61,0x72 +,0x64,0x20,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x4E,0x62,0x20,0x6F,0x66,0x20,0x64,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x73,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B +,0x33,0x37,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C +,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63 +,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x2D,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x53,0x54,0x4F,0x43,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 +,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x54,0x4F,0x43,0x48,0x3C,0x2F,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x6F,0x63,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65 +,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x6F,0x63,0x68,0x61,0x73,0x74,0x69 +,0x63,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D +,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61 +,0x73,0x74,0x2D,0x4B,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x54,0x69,0x6D,0x65,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x62,0x75,0x69 +,0x6C,0x64,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x4B,0x20,0x6C,0x69,0x6E +,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x4B,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20 +,0x66,0x6F,0x72,0x20,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x53,0x6C,0x6F,0x77,0x2D +,0x4B,0x20,0x6C,0x69,0x6E,0x65,0x2E,0x20,0x55,0x73,0x75,0x61,0x6C,0x6C,0x79,0x20,0x73,0x65,0x74,0x20 +,0x74,0x6F,0x20,0x33,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 +,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 +,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x4B,0x20,0x4D,0x41,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76 +,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x53,0x6C,0x6F,0x77 +,0x2D,0x4B,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x44,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20 +,0x66,0x6F,0x72,0x20,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x53,0x6C,0x6F,0x77,0x2D +,0x44,0x20,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 +,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x44,0x20,0x4D +,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D +,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x53,0x6C +,0x6F,0x77,0x2D,0x44,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70 +,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x6F,0x75,0x74,0x53,0x6C,0x6F,0x77,0x4B,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44 +,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x53,0x6C,0x6F,0x77,0x44 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x54,0x4F,0x43,0x48 +,0x46,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x53,0x54,0x4F,0x43,0x48,0x46,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x53,0x74,0x6F,0x63,0x68,0x46,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x6F,0x63,0x68,0x61,0x73,0x74,0x69,0x63,0x20,0x46,0x61,0x73,0x74 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20 +,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73 +,0x74,0x2D,0x4B,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x54,0x69,0x6D,0x65,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x62,0x75,0x69,0x6C +,0x64,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x4B,0x20,0x6C,0x69,0x6E,0x65 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20,0x66 +,0x6F,0x72,0x20,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x44 +,0x20,0x6C,0x69,0x6E,0x65,0x2E,0x20,0x55,0x73,0x75,0x61,0x6C,0x6C,0x79,0x20,0x73,0x65,0x74,0x20,0x74 +,0x6F,0x20,0x33,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x4D,0x41,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 +,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69 +,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x46,0x61,0x73,0x74,0x2D +,0x44,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 +,0x46,0x61,0x73,0x74,0x4B,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x46,0x61,0x73,0x74,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x54 +,0x4F,0x43,0x48,0x52,0x53,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 +,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 +,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x54,0x4F,0x43,0x48,0x52,0x53,0x49,0x3C,0x2F,0x41,0x62 +,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C +,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x6F,0x63,0x68,0x52,0x73,0x69,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x6F,0x63,0x68,0x61 +,0x73,0x74,0x69,0x63,0x20,0x52,0x65,0x6C,0x61,0x74,0x69,0x76,0x65,0x20,0x53,0x74,0x72,0x65,0x6E,0x67 +,0x74,0x68,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D +,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72 +,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65 +,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66 +,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 +,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C +,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 +,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x4B +,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x69,0x6D +,0x65,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x62,0x75,0x69,0x6C,0x64,0x69,0x6E +,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x4B,0x20,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 +,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 +,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20 +,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x6C,0x69 +,0x6E,0x65,0x2E,0x20,0x55,0x73,0x75,0x61,0x6C,0x6C,0x79,0x20,0x73,0x65,0x74,0x20,0x74,0x6F,0x20,0x33 +,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 +,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20 +,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x46,0x61,0x73,0x74,0x2D,0x44,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 +,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 +,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x46,0x61,0x73 +,0x74,0x4B,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x46,0x61,0x73,0x74,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x55,0x42,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x53,0x55,0x42,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x75,0x62,0x3C +,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74 +,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D,0x65,0x74,0x69,0x63,0x20,0x53,0x75,0x62,0x74,0x72,0x61 +,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68 +,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 +,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C +,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x55,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09 +,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x55,0x4D,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x75,0x6D,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x75,0x6D,0x6D,0x61,0x74,0x69,0x6F +,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65 +,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 +,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69 +,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 +,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C +,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 +,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 +,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x33,0x20,0x2D,0x2D +,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54 +,0x33,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x33,0x3C,0x2F,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x72,0x69,0x70,0x6C,0x65,0x20 +,0x45,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 +,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x28,0x54,0x33,0x29,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 +,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47 +,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20 +,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 +,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 +,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 +,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75 +,0x6D,0x65,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56 +,0x6F,0x6C,0x75,0x6D,0x65,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x2E +,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50 +,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 +,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x35,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 +,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x37,0x2E,0x30,0x30,0x30 +,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x41,0x4E,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x41 +,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x61,0x6E,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72 +,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x54,0x61,0x6E,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66 +,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F +,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x41,0x4E,0x48,0x20,0x2D,0x2D +,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54 +,0x41,0x4E,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x61,0x6E,0x68 +,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63 +,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x54,0x61 +,0x6E,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72 +,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 +,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x45,0x4D +,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E +,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x54,0x45,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x54,0x65,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x54,0x72,0x69,0x70,0x6C,0x65,0x20,0x45,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20 +,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72 +,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F +,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73 +,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x52,0x41,0x4E,0x47,0x45 +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x54,0x52,0x41,0x4E,0x47,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x54,0x72,0x75,0x65,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x72,0x75,0x65,0x20,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x61,0x74,0x69,0x6C,0x69,0x74,0x79,0x20,0x49 +,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A +,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 +,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C +,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F +,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A +,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x52,0x49,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 +,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x52,0x49,0x4D,0x41,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x72,0x69,0x6D,0x61,0x3C,0x2F,0x43 +,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x72,0x69,0x61,0x6E,0x67 +,0x75,0x6C,0x61,0x72,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C +,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 +,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74 +,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C +,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 +,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 +,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 +,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20 +,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 +,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F +,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 +,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 +,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 +,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54 +,0x52,0x49,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 +,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 +,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x52,0x49,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x54,0x72,0x69,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x31,0x2D,0x64,0x61,0x79,0x20,0x52,0x61,0x74,0x65,0x2D,0x4F,0x66,0x2D,0x43,0x68,0x61 +,0x6E,0x67,0x65,0x20,0x28,0x52,0x4F,0x43,0x29,0x20,0x6F,0x66,0x20,0x61,0x20,0x54,0x72,0x69,0x70,0x6C +,0x65,0x20,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x20,0x45,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F +,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 +,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C +,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F +,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E +,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 +,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 +,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x53,0x46,0x20,0x2D,0x2D,0x3E,0x0A,0x09 +,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x53,0x46,0x3C +,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 +,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x73,0x66,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x69,0x6D,0x65,0x20,0x53,0x65,0x72 +,0x69,0x65,0x73,0x20,0x46,0x6F,0x72,0x65,0x63,0x61,0x73,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C +,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F +,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 +,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72 +,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 +,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E +,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E +,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C +,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 +,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 +,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C +,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 +,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x59,0x50,0x50 +,0x52,0x49,0x43,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x59,0x50,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 +,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x79,0x70,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D +,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 +,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x69,0x63,0x61,0x6C,0x20 +,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63 +,0x65,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 +,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 +,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F +,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 +,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F +,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E +,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E +,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x55,0x4C,0x54,0x4F,0x53,0x43 +,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F +,0x6E,0x3E,0x55,0x4C,0x54,0x4F,0x53,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 +,0x3E,0x55,0x6C,0x74,0x4F,0x73,0x63,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x55,0x6C,0x74,0x69,0x6D,0x61,0x74,0x65,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61 +,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74 +,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 +,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 +,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 +,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 +,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F +,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E +,0x46,0x69,0x72,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x62,0x61,0x72,0x73,0x20,0x66,0x6F,0x72 +,0x20,0x31,0x73,0x74,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x2E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 +,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 +,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 +,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x37,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x65 +,0x63,0x6F,0x6E,0x64,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E +,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x62,0x61,0x72,0x73,0x20,0x66,0x72,0x6F,0x20 +,0x32,0x6E,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 +,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D +,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D +,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 +,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E +,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65 +,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 +,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x68,0x69 +,0x72,0x64,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x62,0x61,0x72,0x73,0x20,0x66,0x6F,0x72,0x20,0x33,0x72 +,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E +,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 +,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31 +,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 +,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 +,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 +,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x38,0x3C,0x2F,0x44,0x65,0x66,0x61 +,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F +,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 +,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D +,0x20,0x56,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C +,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 +,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D +,0x65,0x3E,0x56,0x61,0x72,0x69,0x61,0x6E,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 +,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x61,0x72,0x69,0x61,0x6E,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 +,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63 +,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E +,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A +,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 +,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F +,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F +,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D +,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 +,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 +,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F +,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 +,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E +,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x62,0x20,0x6F,0x66,0x20,0x64,0x65,0x76,0x69,0x61,0x74,0x69 +,0x6F,0x6E,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F +,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C +,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 +,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 +,0x74,0x61,0x72,0x74,0x3E,0x2D,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30 +,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 +,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53 +,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 +,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B +,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x57,0x43,0x4C,0x50,0x52,0x49,0x43,0x45,0x20,0x2D,0x2D,0x3E +,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x57,0x43 +,0x4C,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E +,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x57 +,0x63,0x6C,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 +,0x69,0x6F,0x6E,0x3E,0x57,0x65,0x69,0x67,0x68,0x74,0x65,0x64,0x20,0x43,0x6C,0x6F,0x73,0x65,0x20,0x50 +,0x72,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65 +,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E +,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E +,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 +,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 +,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 +,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 +,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 +,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 +,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 +,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 +,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C +,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 +,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 +,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x57,0x49,0x4C,0x4C,0x52,0x20,0x2D +,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 +,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x57,0x49,0x4C,0x4C,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E +,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x57,0x69 +,0x6C,0x6C,0x52,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A +,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E +,0x57,0x69,0x6C,0x6C,0x69,0x61,0x6D,0x73,0x26,0x61,0x70,0x6F,0x73,0x3B,0x20,0x25,0x52,0x3C,0x2F,0x53 +,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C +,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64 +,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 +,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 +,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D +,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 +,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C +,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 +,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 +,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 +,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 +,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50 +,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 +,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65 +,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 +,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 +,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 +,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 +,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 +,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 +,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 +,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 +,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 +,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44 +,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 +,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E +,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 +,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 +,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 +,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 +,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E +,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C +,0x21,0x2D,0x2D,0x20,0x57,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 +,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 +,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x57,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 +,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 +,0x4E,0x61,0x6D,0x65,0x3E,0x57,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E +,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 +,0x74,0x69,0x6F,0x6E,0x3E,0x57,0x65,0x69,0x67,0x68,0x74,0x65,0x64,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67 +,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 +,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F +,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 +,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 +,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 +,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 +,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 +,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 +,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E +,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 +,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 +,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 +,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E +,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 +,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 +,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E +,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F +,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C +,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 +,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 +,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F +,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 +,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 +,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C +,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C +,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 +,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E +,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 +,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E +,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33 +,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 +,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D +,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 +,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 +,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 +,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 +,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C +,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A +,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 +,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C +,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C +,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A +,0x0A,0x0A,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F +,0x6E,0x73,0x3E,0x0A}; + +const char *TA_FunctionDescriptionXML() +{ + return TA_FunctionDescriptionXMLArray; +} + +/***************/ +/* End of File */ +/***************/ diff --git a/src/ta-lib/src/ta_abstract/ta_group_idx.c b/src/ta-lib/src/ta_abstract/ta_group_idx.c new file mode 100644 index 000000000..73268133f --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_group_idx.c @@ -0,0 +1,453 @@ +/* TA-LIB Copyright (c) 1999-2007, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Important: This file is automatically generated by gen_code. + * Any modification will be lost on next execution + * of gen_code. + * + * The goal of this file is to build the following global + * constant: + * TA_PerGroupFuncDef + * TA_PerGroupSize + * TA_TotalNbFunction + * + * These constant allows mainly to speed optimize functionality related to + * sequential access to TA_DefFunc by TA_GroupId (see ta_abstract.c) + */ +#include +#include "ta_def_ui.h" +#include "ta_abstract.h" + +extern const TA_FuncDef TA_DEF_ACCBANDS; +extern const TA_FuncDef TA_DEF_ACOS; +extern const TA_FuncDef TA_DEF_AD; +extern const TA_FuncDef TA_DEF_ADD; +extern const TA_FuncDef TA_DEF_ADOSC; +extern const TA_FuncDef TA_DEF_ADX; +extern const TA_FuncDef TA_DEF_ADXR; +extern const TA_FuncDef TA_DEF_APO; +extern const TA_FuncDef TA_DEF_AROON; +extern const TA_FuncDef TA_DEF_AROONOSC; +extern const TA_FuncDef TA_DEF_ASIN; +extern const TA_FuncDef TA_DEF_ATAN; +extern const TA_FuncDef TA_DEF_ATR; +extern const TA_FuncDef TA_DEF_AVGPRICE; +extern const TA_FuncDef TA_DEF_AVGDEV; +extern const TA_FuncDef TA_DEF_BBANDS; +extern const TA_FuncDef TA_DEF_BETA; +extern const TA_FuncDef TA_DEF_BOP; +extern const TA_FuncDef TA_DEF_CCI; +extern const TA_FuncDef TA_DEF_CDL2CROWS; +extern const TA_FuncDef TA_DEF_CDL3BLACKCROWS; +extern const TA_FuncDef TA_DEF_CDL3INSIDE; +extern const TA_FuncDef TA_DEF_CDL3LINESTRIKE; +extern const TA_FuncDef TA_DEF_CDL3OUTSIDE; +extern const TA_FuncDef TA_DEF_CDL3STARSINSOUTH; +extern const TA_FuncDef TA_DEF_CDL3WHITESOLDIERS; +extern const TA_FuncDef TA_DEF_CDLABANDONEDBABY; +extern const TA_FuncDef TA_DEF_CDLADVANCEBLOCK; +extern const TA_FuncDef TA_DEF_CDLBELTHOLD; +extern const TA_FuncDef TA_DEF_CDLBREAKAWAY; +extern const TA_FuncDef TA_DEF_CDLCLOSINGMARUBOZU; +extern const TA_FuncDef TA_DEF_CDLCONCEALBABYSWALL; +extern const TA_FuncDef TA_DEF_CDLCOUNTERATTACK; +extern const TA_FuncDef TA_DEF_CDLDARKCLOUDCOVER; +extern const TA_FuncDef TA_DEF_CDLDOJI; +extern const TA_FuncDef TA_DEF_CDLDOJISTAR; +extern const TA_FuncDef TA_DEF_CDLDRAGONFLYDOJI; +extern const TA_FuncDef TA_DEF_CDLENGULFING; +extern const TA_FuncDef TA_DEF_CDLEVENINGDOJISTAR; +extern const TA_FuncDef TA_DEF_CDLEVENINGSTAR; +extern const TA_FuncDef TA_DEF_CDLGAPSIDESIDEWHITE; +extern const TA_FuncDef TA_DEF_CDLGRAVESTONEDOJI; +extern const TA_FuncDef TA_DEF_CDLHAMMER; +extern const TA_FuncDef TA_DEF_CDLHANGINGMAN; +extern const TA_FuncDef TA_DEF_CDLHARAMI; +extern const TA_FuncDef TA_DEF_CDLHARAMICROSS; +extern const TA_FuncDef TA_DEF_CDLHIGHWAVE; +extern const TA_FuncDef TA_DEF_CDLHIKKAKE; +extern const TA_FuncDef TA_DEF_CDLHIKKAKEMOD; +extern const TA_FuncDef TA_DEF_CDLHOMINGPIGEON; +extern const TA_FuncDef TA_DEF_CDLIDENTICAL3CROWS; +extern const TA_FuncDef TA_DEF_CDLINNECK; +extern const TA_FuncDef TA_DEF_CDLINVERTEDHAMMER; +extern const TA_FuncDef TA_DEF_CDLKICKING; +extern const TA_FuncDef TA_DEF_CDLKICKINGBYLENGTH; +extern const TA_FuncDef TA_DEF_CDLLADDERBOTTOM; +extern const TA_FuncDef TA_DEF_CDLLONGLEGGEDDOJI; +extern const TA_FuncDef TA_DEF_CDLLONGLINE; +extern const TA_FuncDef TA_DEF_CDLMARUBOZU; +extern const TA_FuncDef TA_DEF_CDLMATCHINGLOW; +extern const TA_FuncDef TA_DEF_CDLMATHOLD; +extern const TA_FuncDef TA_DEF_CDLMORNINGDOJISTAR; +extern const TA_FuncDef TA_DEF_CDLMORNINGSTAR; +extern const TA_FuncDef TA_DEF_CDLONNECK; +extern const TA_FuncDef TA_DEF_CDLPIERCING; +extern const TA_FuncDef TA_DEF_CDLRICKSHAWMAN; +extern const TA_FuncDef TA_DEF_CDLRISEFALL3METHODS; +extern const TA_FuncDef TA_DEF_CDLSEPARATINGLINES; +extern const TA_FuncDef TA_DEF_CDLSHOOTINGSTAR; +extern const TA_FuncDef TA_DEF_CDLSHORTLINE; +extern const TA_FuncDef TA_DEF_CDLSPINNINGTOP; +extern const TA_FuncDef TA_DEF_CDLSTALLEDPATTERN; +extern const TA_FuncDef TA_DEF_CDLSTICKSANDWICH; +extern const TA_FuncDef TA_DEF_CDLTAKURI; +extern const TA_FuncDef TA_DEF_CDLTASUKIGAP; +extern const TA_FuncDef TA_DEF_CDLTHRUSTING; +extern const TA_FuncDef TA_DEF_CDLTRISTAR; +extern const TA_FuncDef TA_DEF_CDLUNIQUE3RIVER; +extern const TA_FuncDef TA_DEF_CDLUPSIDEGAP2CROWS; +extern const TA_FuncDef TA_DEF_CDLXSIDEGAP3METHODS; +extern const TA_FuncDef TA_DEF_CEIL; +extern const TA_FuncDef TA_DEF_CMO; +extern const TA_FuncDef TA_DEF_CORREL; +extern const TA_FuncDef TA_DEF_COS; +extern const TA_FuncDef TA_DEF_COSH; +extern const TA_FuncDef TA_DEF_DEMA; +extern const TA_FuncDef TA_DEF_DIV; +extern const TA_FuncDef TA_DEF_DX; +extern const TA_FuncDef TA_DEF_EMA; +extern const TA_FuncDef TA_DEF_EXP; +extern const TA_FuncDef TA_DEF_FLOOR; +extern const TA_FuncDef TA_DEF_HT_DCPERIOD; +extern const TA_FuncDef TA_DEF_HT_DCPHASE; +extern const TA_FuncDef TA_DEF_HT_PHASOR; +extern const TA_FuncDef TA_DEF_HT_SINE; +extern const TA_FuncDef TA_DEF_HT_TRENDLINE; +extern const TA_FuncDef TA_DEF_HT_TRENDMODE; +extern const TA_FuncDef TA_DEF_IMI; +extern const TA_FuncDef TA_DEF_KAMA; +extern const TA_FuncDef TA_DEF_LINEARREG; +extern const TA_FuncDef TA_DEF_LINEARREG_ANGLE; +extern const TA_FuncDef TA_DEF_LINEARREG_INTERCEPT; +extern const TA_FuncDef TA_DEF_LINEARREG_SLOPE; +extern const TA_FuncDef TA_DEF_LN; +extern const TA_FuncDef TA_DEF_LOG10; +extern const TA_FuncDef TA_DEF_MA; +extern const TA_FuncDef TA_DEF_MACD; +extern const TA_FuncDef TA_DEF_MACDEXT; +extern const TA_FuncDef TA_DEF_MACDFIX; +extern const TA_FuncDef TA_DEF_MAMA; +extern const TA_FuncDef TA_DEF_MAVP; +extern const TA_FuncDef TA_DEF_MAX; +extern const TA_FuncDef TA_DEF_MAXINDEX; +extern const TA_FuncDef TA_DEF_MEDPRICE; +extern const TA_FuncDef TA_DEF_MFI; +extern const TA_FuncDef TA_DEF_MIDPOINT; +extern const TA_FuncDef TA_DEF_MIDPRICE; +extern const TA_FuncDef TA_DEF_MIN; +extern const TA_FuncDef TA_DEF_MININDEX; +extern const TA_FuncDef TA_DEF_MINMAX; +extern const TA_FuncDef TA_DEF_MINMAXINDEX; +extern const TA_FuncDef TA_DEF_MINUS_DI; +extern const TA_FuncDef TA_DEF_MINUS_DM; +extern const TA_FuncDef TA_DEF_MOM; +extern const TA_FuncDef TA_DEF_MULT; +extern const TA_FuncDef TA_DEF_NATR; +extern const TA_FuncDef TA_DEF_OBV; +extern const TA_FuncDef TA_DEF_PLUS_DI; +extern const TA_FuncDef TA_DEF_PLUS_DM; +extern const TA_FuncDef TA_DEF_PPO; +extern const TA_FuncDef TA_DEF_ROC; +extern const TA_FuncDef TA_DEF_ROCP; +extern const TA_FuncDef TA_DEF_ROCR; +extern const TA_FuncDef TA_DEF_ROCR100; +extern const TA_FuncDef TA_DEF_RSI; +extern const TA_FuncDef TA_DEF_SAR; +extern const TA_FuncDef TA_DEF_SAREXT; +extern const TA_FuncDef TA_DEF_SIN; +extern const TA_FuncDef TA_DEF_SINH; +extern const TA_FuncDef TA_DEF_SMA; +extern const TA_FuncDef TA_DEF_SQRT; +extern const TA_FuncDef TA_DEF_STDDEV; +extern const TA_FuncDef TA_DEF_STOCH; +extern const TA_FuncDef TA_DEF_STOCHF; +extern const TA_FuncDef TA_DEF_STOCHRSI; +extern const TA_FuncDef TA_DEF_SUB; +extern const TA_FuncDef TA_DEF_SUM; +extern const TA_FuncDef TA_DEF_T3; +extern const TA_FuncDef TA_DEF_TAN; +extern const TA_FuncDef TA_DEF_TANH; +extern const TA_FuncDef TA_DEF_TEMA; +extern const TA_FuncDef TA_DEF_TRANGE; +extern const TA_FuncDef TA_DEF_TRIMA; +extern const TA_FuncDef TA_DEF_TRIX; +extern const TA_FuncDef TA_DEF_TSF; +extern const TA_FuncDef TA_DEF_TYPPRICE; +extern const TA_FuncDef TA_DEF_ULTOSC; +extern const TA_FuncDef TA_DEF_VAR; +extern const TA_FuncDef TA_DEF_WCLPRICE; +extern const TA_FuncDef TA_DEF_WILLR; +extern const TA_FuncDef TA_DEF_WMA; + +const TA_FuncDef *TA_PerGroupFunc_0[] = { +&TA_DEF_ADD, +&TA_DEF_DIV, +&TA_DEF_MAX, +&TA_DEF_MAXINDEX, +&TA_DEF_MIN, +&TA_DEF_MININDEX, +&TA_DEF_MINMAX, +&TA_DEF_MINMAXINDEX, +&TA_DEF_MULT, +&TA_DEF_SUB, +&TA_DEF_SUM, +NULL }; +#define SIZE_GROUP_0 ((sizeof(TA_PerGroupFunc_0)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_1[] = { +&TA_DEF_ACOS, +&TA_DEF_ASIN, +&TA_DEF_ATAN, +&TA_DEF_CEIL, +&TA_DEF_COS, +&TA_DEF_COSH, +&TA_DEF_EXP, +&TA_DEF_FLOOR, +&TA_DEF_LN, +&TA_DEF_LOG10, +&TA_DEF_SIN, +&TA_DEF_SINH, +&TA_DEF_SQRT, +&TA_DEF_TAN, +&TA_DEF_TANH, +NULL }; +#define SIZE_GROUP_1 ((sizeof(TA_PerGroupFunc_1)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_2[] = { +&TA_DEF_ACCBANDS, +&TA_DEF_BBANDS, +&TA_DEF_DEMA, +&TA_DEF_EMA, +&TA_DEF_HT_TRENDLINE, +&TA_DEF_KAMA, +&TA_DEF_MA, +&TA_DEF_MAMA, +&TA_DEF_MAVP, +&TA_DEF_MIDPOINT, +&TA_DEF_MIDPRICE, +&TA_DEF_SAR, +&TA_DEF_SAREXT, +&TA_DEF_SMA, +&TA_DEF_T3, +&TA_DEF_TEMA, +&TA_DEF_TRIMA, +&TA_DEF_WMA, +NULL }; +#define SIZE_GROUP_2 ((sizeof(TA_PerGroupFunc_2)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_3[] = { +&TA_DEF_ATR, +&TA_DEF_NATR, +&TA_DEF_TRANGE, +NULL }; +#define SIZE_GROUP_3 ((sizeof(TA_PerGroupFunc_3)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_4[] = { +&TA_DEF_ADX, +&TA_DEF_ADXR, +&TA_DEF_APO, +&TA_DEF_AROON, +&TA_DEF_AROONOSC, +&TA_DEF_BOP, +&TA_DEF_CCI, +&TA_DEF_CMO, +&TA_DEF_DX, +&TA_DEF_IMI, +&TA_DEF_MACD, +&TA_DEF_MACDEXT, +&TA_DEF_MACDFIX, +&TA_DEF_MFI, +&TA_DEF_MINUS_DI, +&TA_DEF_MINUS_DM, +&TA_DEF_MOM, +&TA_DEF_PLUS_DI, +&TA_DEF_PLUS_DM, +&TA_DEF_PPO, +&TA_DEF_ROC, +&TA_DEF_ROCP, +&TA_DEF_ROCR, +&TA_DEF_ROCR100, +&TA_DEF_RSI, +&TA_DEF_STOCH, +&TA_DEF_STOCHF, +&TA_DEF_STOCHRSI, +&TA_DEF_TRIX, +&TA_DEF_ULTOSC, +&TA_DEF_WILLR, +NULL }; +#define SIZE_GROUP_4 ((sizeof(TA_PerGroupFunc_4)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_5[] = { +&TA_DEF_HT_DCPERIOD, +&TA_DEF_HT_DCPHASE, +&TA_DEF_HT_PHASOR, +&TA_DEF_HT_SINE, +&TA_DEF_HT_TRENDMODE, +NULL }; +#define SIZE_GROUP_5 ((sizeof(TA_PerGroupFunc_5)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_6[] = { +&TA_DEF_AD, +&TA_DEF_ADOSC, +&TA_DEF_OBV, +NULL }; +#define SIZE_GROUP_6 ((sizeof(TA_PerGroupFunc_6)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_7[] = { +&TA_DEF_CDL2CROWS, +&TA_DEF_CDL3BLACKCROWS, +&TA_DEF_CDL3INSIDE, +&TA_DEF_CDL3LINESTRIKE, +&TA_DEF_CDL3OUTSIDE, +&TA_DEF_CDL3STARSINSOUTH, +&TA_DEF_CDL3WHITESOLDIERS, +&TA_DEF_CDLABANDONEDBABY, +&TA_DEF_CDLADVANCEBLOCK, +&TA_DEF_CDLBELTHOLD, +&TA_DEF_CDLBREAKAWAY, +&TA_DEF_CDLCLOSINGMARUBOZU, +&TA_DEF_CDLCONCEALBABYSWALL, +&TA_DEF_CDLCOUNTERATTACK, +&TA_DEF_CDLDARKCLOUDCOVER, +&TA_DEF_CDLDOJI, +&TA_DEF_CDLDOJISTAR, +&TA_DEF_CDLDRAGONFLYDOJI, +&TA_DEF_CDLENGULFING, +&TA_DEF_CDLEVENINGDOJISTAR, +&TA_DEF_CDLEVENINGSTAR, +&TA_DEF_CDLGAPSIDESIDEWHITE, +&TA_DEF_CDLGRAVESTONEDOJI, +&TA_DEF_CDLHAMMER, +&TA_DEF_CDLHANGINGMAN, +&TA_DEF_CDLHARAMI, +&TA_DEF_CDLHARAMICROSS, +&TA_DEF_CDLHIGHWAVE, +&TA_DEF_CDLHIKKAKE, +&TA_DEF_CDLHIKKAKEMOD, +&TA_DEF_CDLHOMINGPIGEON, +&TA_DEF_CDLIDENTICAL3CROWS, +&TA_DEF_CDLINNECK, +&TA_DEF_CDLINVERTEDHAMMER, +&TA_DEF_CDLKICKING, +&TA_DEF_CDLKICKINGBYLENGTH, +&TA_DEF_CDLLADDERBOTTOM, +&TA_DEF_CDLLONGLEGGEDDOJI, +&TA_DEF_CDLLONGLINE, +&TA_DEF_CDLMARUBOZU, +&TA_DEF_CDLMATCHINGLOW, +&TA_DEF_CDLMATHOLD, +&TA_DEF_CDLMORNINGDOJISTAR, +&TA_DEF_CDLMORNINGSTAR, +&TA_DEF_CDLONNECK, +&TA_DEF_CDLPIERCING, +&TA_DEF_CDLRICKSHAWMAN, +&TA_DEF_CDLRISEFALL3METHODS, +&TA_DEF_CDLSEPARATINGLINES, +&TA_DEF_CDLSHOOTINGSTAR, +&TA_DEF_CDLSHORTLINE, +&TA_DEF_CDLSPINNINGTOP, +&TA_DEF_CDLSTALLEDPATTERN, +&TA_DEF_CDLSTICKSANDWICH, +&TA_DEF_CDLTAKURI, +&TA_DEF_CDLTASUKIGAP, +&TA_DEF_CDLTHRUSTING, +&TA_DEF_CDLTRISTAR, +&TA_DEF_CDLUNIQUE3RIVER, +&TA_DEF_CDLUPSIDEGAP2CROWS, +&TA_DEF_CDLXSIDEGAP3METHODS, +NULL }; +#define SIZE_GROUP_7 ((sizeof(TA_PerGroupFunc_7)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_8[] = { +&TA_DEF_BETA, +&TA_DEF_CORREL, +&TA_DEF_LINEARREG, +&TA_DEF_LINEARREG_ANGLE, +&TA_DEF_LINEARREG_INTERCEPT, +&TA_DEF_LINEARREG_SLOPE, +&TA_DEF_STDDEV, +&TA_DEF_TSF, +&TA_DEF_VAR, +NULL }; +#define SIZE_GROUP_8 ((sizeof(TA_PerGroupFunc_8)/sizeof(const TA_FuncDef *))-1) + +const TA_FuncDef *TA_PerGroupFunc_9[] = { +&TA_DEF_AVGPRICE, +&TA_DEF_AVGDEV, +&TA_DEF_MEDPRICE, +&TA_DEF_TYPPRICE, +&TA_DEF_WCLPRICE, +NULL }; +#define SIZE_GROUP_9 ((sizeof(TA_PerGroupFunc_9)/sizeof(const TA_FuncDef *))-1) +/* Generated */ const TA_FuncDef **TA_PerGroupFuncDef[10] = { +&TA_PerGroupFunc_0[0], +&TA_PerGroupFunc_1[0], +&TA_PerGroupFunc_2[0], +&TA_PerGroupFunc_3[0], +&TA_PerGroupFunc_4[0], +&TA_PerGroupFunc_5[0], +&TA_PerGroupFunc_6[0], +&TA_PerGroupFunc_7[0], +&TA_PerGroupFunc_8[0], +&TA_PerGroupFunc_9[0] +/* Generated */ }; + +/* Generated */ const unsigned int TA_PerGroupSize[10] = { +SIZE_GROUP_0, +SIZE_GROUP_1, +SIZE_GROUP_2, +SIZE_GROUP_3, +SIZE_GROUP_4, +SIZE_GROUP_5, +SIZE_GROUP_6, +SIZE_GROUP_7, +SIZE_GROUP_8, +SIZE_GROUP_9 +/* Generated */ }; + +/* Generated */ const unsigned int TA_TotalNbFunction = +SIZE_GROUP_0+ +SIZE_GROUP_1+ +SIZE_GROUP_2+ +SIZE_GROUP_3+ +SIZE_GROUP_4+ +SIZE_GROUP_5+ +SIZE_GROUP_6+ +SIZE_GROUP_7+ +SIZE_GROUP_8+ +SIZE_GROUP_9; + +/***************/ +/* End of File */ +/***************/ diff --git a/src/ta-lib/src/ta_abstract/ta_java_defs.h b/src/ta-lib/src/ta_abstract/ta_java_defs.h new file mode 100644 index 000000000..f93bab0fb --- /dev/null +++ b/src/ta-lib/src/ta_abstract/ta_java_defs.h @@ -0,0 +1,366 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* DO NOT MODIFY this file. + * This file is automatically generated by gen_code. + * + * If you are not re-generating the java code (which is most + * likely the case), just ignore this file. + */ + +#define TA_ACCBANDS_Lookback accbandsLookback +#define TA_ACCBANDS accbands +#define TA_ACOS_Lookback acosLookback +#define TA_ACOS acos +#define TA_AD_Lookback adLookback +#define TA_AD ad +#define TA_ADD_Lookback addLookback +#define TA_ADD add +#define TA_ADOSC_Lookback adOscLookback +#define TA_ADOSC adOsc +#define TA_ADX_Lookback adxLookback +#define TA_ADX adx +#define TA_ADXR_Lookback adxrLookback +#define TA_ADXR adxr +#define TA_APO_Lookback apoLookback +#define TA_APO apo +#define TA_AROON_Lookback aroonLookback +#define TA_AROON aroon +#define TA_AROONOSC_Lookback aroonOscLookback +#define TA_AROONOSC aroonOsc +#define TA_ASIN_Lookback asinLookback +#define TA_ASIN asin +#define TA_ATAN_Lookback atanLookback +#define TA_ATAN atan +#define TA_ATR_Lookback atrLookback +#define TA_ATR atr +#define TA_AVGPRICE_Lookback avgPriceLookback +#define TA_AVGPRICE avgPrice +#define TA_AVGDEV_Lookback avgDevLookback +#define TA_AVGDEV avgDev +#define TA_BBANDS_Lookback bbandsLookback +#define TA_BBANDS bbands +#define TA_BETA_Lookback betaLookback +#define TA_BETA beta +#define TA_BOP_Lookback bopLookback +#define TA_BOP bop +#define TA_CCI_Lookback cciLookback +#define TA_CCI cci +#define TA_CDL2CROWS_Lookback cdl2CrowsLookback +#define TA_CDL2CROWS cdl2Crows +#define TA_CDL3BLACKCROWS_Lookback cdl3BlackCrowsLookback +#define TA_CDL3BLACKCROWS cdl3BlackCrows +#define TA_CDL3INSIDE_Lookback cdl3InsideLookback +#define TA_CDL3INSIDE cdl3Inside +#define TA_CDL3LINESTRIKE_Lookback cdl3LineStrikeLookback +#define TA_CDL3LINESTRIKE cdl3LineStrike +#define TA_CDL3OUTSIDE_Lookback cdl3OutsideLookback +#define TA_CDL3OUTSIDE cdl3Outside +#define TA_CDL3STARSINSOUTH_Lookback cdl3StarsInSouthLookback +#define TA_CDL3STARSINSOUTH cdl3StarsInSouth +#define TA_CDL3WHITESOLDIERS_Lookback cdl3WhiteSoldiersLookback +#define TA_CDL3WHITESOLDIERS cdl3WhiteSoldiers +#define TA_CDLABANDONEDBABY_Lookback cdlAbandonedBabyLookback +#define TA_CDLABANDONEDBABY cdlAbandonedBaby +#define TA_CDLADVANCEBLOCK_Lookback cdlAdvanceBlockLookback +#define TA_CDLADVANCEBLOCK cdlAdvanceBlock +#define TA_CDLBELTHOLD_Lookback cdlBeltHoldLookback +#define TA_CDLBELTHOLD cdlBeltHold +#define TA_CDLBREAKAWAY_Lookback cdlBreakawayLookback +#define TA_CDLBREAKAWAY cdlBreakaway +#define TA_CDLCLOSINGMARUBOZU_Lookback cdlClosingMarubozuLookback +#define TA_CDLCLOSINGMARUBOZU cdlClosingMarubozu +#define TA_CDLCONCEALBABYSWALL_Lookback cdlConcealBabysWallLookback +#define TA_CDLCONCEALBABYSWALL cdlConcealBabysWall +#define TA_CDLCOUNTERATTACK_Lookback cdlCounterAttackLookback +#define TA_CDLCOUNTERATTACK cdlCounterAttack +#define TA_CDLDARKCLOUDCOVER_Lookback cdlDarkCloudCoverLookback +#define TA_CDLDARKCLOUDCOVER cdlDarkCloudCover +#define TA_CDLDOJI_Lookback cdlDojiLookback +#define TA_CDLDOJI cdlDoji +#define TA_CDLDOJISTAR_Lookback cdlDojiStarLookback +#define TA_CDLDOJISTAR cdlDojiStar +#define TA_CDLDRAGONFLYDOJI_Lookback cdlDragonflyDojiLookback +#define TA_CDLDRAGONFLYDOJI cdlDragonflyDoji +#define TA_CDLENGULFING_Lookback cdlEngulfingLookback +#define TA_CDLENGULFING cdlEngulfing +#define TA_CDLEVENINGDOJISTAR_Lookback cdlEveningDojiStarLookback +#define TA_CDLEVENINGDOJISTAR cdlEveningDojiStar +#define TA_CDLEVENINGSTAR_Lookback cdlEveningStarLookback +#define TA_CDLEVENINGSTAR cdlEveningStar +#define TA_CDLGAPSIDESIDEWHITE_Lookback cdlGapSideSideWhiteLookback +#define TA_CDLGAPSIDESIDEWHITE cdlGapSideSideWhite +#define TA_CDLGRAVESTONEDOJI_Lookback cdlGravestoneDojiLookback +#define TA_CDLGRAVESTONEDOJI cdlGravestoneDoji +#define TA_CDLHAMMER_Lookback cdlHammerLookback +#define TA_CDLHAMMER cdlHammer +#define TA_CDLHANGINGMAN_Lookback cdlHangingManLookback +#define TA_CDLHANGINGMAN cdlHangingMan +#define TA_CDLHARAMI_Lookback cdlHaramiLookback +#define TA_CDLHARAMI cdlHarami +#define TA_CDLHARAMICROSS_Lookback cdlHaramiCrossLookback +#define TA_CDLHARAMICROSS cdlHaramiCross +#define TA_CDLHIGHWAVE_Lookback cdlHignWaveLookback +#define TA_CDLHIGHWAVE cdlHignWave +#define TA_CDLHIKKAKE_Lookback cdlHikkakeLookback +#define TA_CDLHIKKAKE cdlHikkake +#define TA_CDLHIKKAKEMOD_Lookback cdlHikkakeModLookback +#define TA_CDLHIKKAKEMOD cdlHikkakeMod +#define TA_CDLHOMINGPIGEON_Lookback cdlHomingPigeonLookback +#define TA_CDLHOMINGPIGEON cdlHomingPigeon +#define TA_CDLIDENTICAL3CROWS_Lookback cdlIdentical3CrowsLookback +#define TA_CDLIDENTICAL3CROWS cdlIdentical3Crows +#define TA_CDLINNECK_Lookback cdlInNeckLookback +#define TA_CDLINNECK cdlInNeck +#define TA_CDLINVERTEDHAMMER_Lookback cdlInvertedHammerLookback +#define TA_CDLINVERTEDHAMMER cdlInvertedHammer +#define TA_CDLKICKING_Lookback cdlKickingLookback +#define TA_CDLKICKING cdlKicking +#define TA_CDLKICKINGBYLENGTH_Lookback cdlKickingByLengthLookback +#define TA_CDLKICKINGBYLENGTH cdlKickingByLength +#define TA_CDLLADDERBOTTOM_Lookback cdlLadderBottomLookback +#define TA_CDLLADDERBOTTOM cdlLadderBottom +#define TA_CDLLONGLEGGEDDOJI_Lookback cdlLongLeggedDojiLookback +#define TA_CDLLONGLEGGEDDOJI cdlLongLeggedDoji +#define TA_CDLLONGLINE_Lookback cdlLongLineLookback +#define TA_CDLLONGLINE cdlLongLine +#define TA_CDLMARUBOZU_Lookback cdlMarubozuLookback +#define TA_CDLMARUBOZU cdlMarubozu +#define TA_CDLMATCHINGLOW_Lookback cdlMatchingLowLookback +#define TA_CDLMATCHINGLOW cdlMatchingLow +#define TA_CDLMATHOLD_Lookback cdlMatHoldLookback +#define TA_CDLMATHOLD cdlMatHold +#define TA_CDLMORNINGDOJISTAR_Lookback cdlMorningDojiStarLookback +#define TA_CDLMORNINGDOJISTAR cdlMorningDojiStar +#define TA_CDLMORNINGSTAR_Lookback cdlMorningStarLookback +#define TA_CDLMORNINGSTAR cdlMorningStar +#define TA_CDLONNECK_Lookback cdlOnNeckLookback +#define TA_CDLONNECK cdlOnNeck +#define TA_CDLPIERCING_Lookback cdlPiercingLookback +#define TA_CDLPIERCING cdlPiercing +#define TA_CDLRICKSHAWMAN_Lookback cdlRickshawManLookback +#define TA_CDLRICKSHAWMAN cdlRickshawMan +#define TA_CDLRISEFALL3METHODS_Lookback cdlRiseFall3MethodsLookback +#define TA_CDLRISEFALL3METHODS cdlRiseFall3Methods +#define TA_CDLSEPARATINGLINES_Lookback cdlSeperatingLinesLookback +#define TA_CDLSEPARATINGLINES cdlSeperatingLines +#define TA_CDLSHOOTINGSTAR_Lookback cdlShootingStarLookback +#define TA_CDLSHOOTINGSTAR cdlShootingStar +#define TA_CDLSHORTLINE_Lookback cdlShortLineLookback +#define TA_CDLSHORTLINE cdlShortLine +#define TA_CDLSPINNINGTOP_Lookback cdlSpinningTopLookback +#define TA_CDLSPINNINGTOP cdlSpinningTop +#define TA_CDLSTALLEDPATTERN_Lookback cdlStalledPatternLookback +#define TA_CDLSTALLEDPATTERN cdlStalledPattern +#define TA_CDLSTICKSANDWICH_Lookback cdlStickSandwichLookback +#define TA_CDLSTICKSANDWICH cdlStickSandwich +#define TA_CDLTAKURI_Lookback cdlTakuriLookback +#define TA_CDLTAKURI cdlTakuri +#define TA_CDLTASUKIGAP_Lookback cdlTasukiGapLookback +#define TA_CDLTASUKIGAP cdlTasukiGap +#define TA_CDLTHRUSTING_Lookback cdlThrustingLookback +#define TA_CDLTHRUSTING cdlThrusting +#define TA_CDLTRISTAR_Lookback cdlTristarLookback +#define TA_CDLTRISTAR cdlTristar +#define TA_CDLUNIQUE3RIVER_Lookback cdlUnique3RiverLookback +#define TA_CDLUNIQUE3RIVER cdlUnique3River +#define TA_CDLUPSIDEGAP2CROWS_Lookback cdlUpsideGap2CrowsLookback +#define TA_CDLUPSIDEGAP2CROWS cdlUpsideGap2Crows +#define TA_CDLXSIDEGAP3METHODS_Lookback cdlXSideGap3MethodsLookback +#define TA_CDLXSIDEGAP3METHODS cdlXSideGap3Methods +#define TA_CEIL_Lookback ceilLookback +#define TA_CEIL ceil +#define TA_CMO_Lookback cmoLookback +#define TA_CMO cmo +#define TA_CORREL_Lookback correlLookback +#define TA_CORREL correl +#define TA_COS_Lookback cosLookback +#define TA_COS cos +#define TA_COSH_Lookback coshLookback +#define TA_COSH cosh +#define TA_DEMA_Lookback demaLookback +#define TA_DEMA dema +#define TA_DIV_Lookback divLookback +#define TA_DIV div +#define TA_DX_Lookback dxLookback +#define TA_DX dx +#define TA_EMA_Lookback emaLookback +#define TA_EMA ema +#define TA_EXP_Lookback expLookback +#define TA_EXP exp +#define TA_FLOOR_Lookback floorLookback +#define TA_FLOOR floor +#define TA_HT_DCPERIOD_Lookback htDcPeriodLookback +#define TA_HT_DCPERIOD htDcPeriod +#define TA_HT_DCPHASE_Lookback htDcPhaseLookback +#define TA_HT_DCPHASE htDcPhase +#define TA_HT_PHASOR_Lookback htPhasorLookback +#define TA_HT_PHASOR htPhasor +#define TA_HT_SINE_Lookback htSineLookback +#define TA_HT_SINE htSine +#define TA_HT_TRENDLINE_Lookback htTrendlineLookback +#define TA_HT_TRENDLINE htTrendline +#define TA_HT_TRENDMODE_Lookback htTrendModeLookback +#define TA_HT_TRENDMODE htTrendMode +#define TA_IMI_Lookback imiLookback +#define TA_IMI imi +#define TA_KAMA_Lookback kamaLookback +#define TA_KAMA kama +#define TA_LINEARREG_Lookback linearRegLookback +#define TA_LINEARREG linearReg +#define TA_LINEARREG_ANGLE_Lookback linearRegAngleLookback +#define TA_LINEARREG_ANGLE linearRegAngle +#define TA_LINEARREG_INTERCEPT_Lookback linearRegInterceptLookback +#define TA_LINEARREG_INTERCEPT linearRegIntercept +#define TA_LINEARREG_SLOPE_Lookback linearRegSlopeLookback +#define TA_LINEARREG_SLOPE linearRegSlope +#define TA_LN_Lookback lnLookback +#define TA_LN ln +#define TA_LOG10_Lookback log10Lookback +#define TA_LOG10 log10 +#define TA_MA_Lookback movingAverageLookback +#define TA_MA movingAverage +#define TA_MACD_Lookback macdLookback +#define TA_MACD macd +#define TA_MACDEXT_Lookback macdExtLookback +#define TA_MACDEXT macdExt +#define TA_MACDFIX_Lookback macdFixLookback +#define TA_MACDFIX macdFix +#define TA_MAMA_Lookback mamaLookback +#define TA_MAMA mama +#define TA_MAVP_Lookback movingAverageVariablePeriodLookback +#define TA_MAVP movingAverageVariablePeriod +#define TA_MAX_Lookback maxLookback +#define TA_MAX max +#define TA_MAXINDEX_Lookback maxIndexLookback +#define TA_MAXINDEX maxIndex +#define TA_MEDPRICE_Lookback medPriceLookback +#define TA_MEDPRICE medPrice +#define TA_MFI_Lookback mfiLookback +#define TA_MFI mfi +#define TA_MIDPOINT_Lookback midPointLookback +#define TA_MIDPOINT midPoint +#define TA_MIDPRICE_Lookback midPriceLookback +#define TA_MIDPRICE midPrice +#define TA_MIN_Lookback minLookback +#define TA_MIN min +#define TA_MININDEX_Lookback minIndexLookback +#define TA_MININDEX minIndex +#define TA_MINMAX_Lookback minMaxLookback +#define TA_MINMAX minMax +#define TA_MINMAXINDEX_Lookback minMaxIndexLookback +#define TA_MINMAXINDEX minMaxIndex +#define TA_MINUS_DI_Lookback minusDILookback +#define TA_MINUS_DI minusDI +#define TA_MINUS_DM_Lookback minusDMLookback +#define TA_MINUS_DM minusDM +#define TA_MOM_Lookback momLookback +#define TA_MOM mom +#define TA_MULT_Lookback multLookback +#define TA_MULT mult +#define TA_NATR_Lookback natrLookback +#define TA_NATR natr +#define TA_OBV_Lookback obvLookback +#define TA_OBV obv +#define TA_PLUS_DI_Lookback plusDILookback +#define TA_PLUS_DI plusDI +#define TA_PLUS_DM_Lookback plusDMLookback +#define TA_PLUS_DM plusDM +#define TA_PPO_Lookback ppoLookback +#define TA_PPO ppo +#define TA_ROC_Lookback rocLookback +#define TA_ROC roc +#define TA_ROCP_Lookback rocPLookback +#define TA_ROCP rocP +#define TA_ROCR_Lookback rocRLookback +#define TA_ROCR rocR +#define TA_ROCR100_Lookback rocR100Lookback +#define TA_ROCR100 rocR100 +#define TA_RSI_Lookback rsiLookback +#define TA_RSI rsi +#define TA_SAR_Lookback sarLookback +#define TA_SAR sar +#define TA_SAREXT_Lookback sarExtLookback +#define TA_SAREXT sarExt +#define TA_SIN_Lookback sinLookback +#define TA_SIN sin +#define TA_SINH_Lookback sinhLookback +#define TA_SINH sinh +#define TA_SMA_Lookback smaLookback +#define TA_SMA sma +#define TA_SQRT_Lookback sqrtLookback +#define TA_SQRT sqrt +#define TA_STDDEV_Lookback stdDevLookback +#define TA_STDDEV stdDev +#define TA_STOCH_Lookback stochLookback +#define TA_STOCH stoch +#define TA_STOCHF_Lookback stochFLookback +#define TA_STOCHF stochF +#define TA_STOCHRSI_Lookback stochRsiLookback +#define TA_STOCHRSI stochRsi +#define TA_SUB_Lookback subLookback +#define TA_SUB sub +#define TA_SUM_Lookback sumLookback +#define TA_SUM sum +#define TA_T3_Lookback t3Lookback +#define TA_T3 t3 +#define TA_TAN_Lookback tanLookback +#define TA_TAN tan +#define TA_TANH_Lookback tanhLookback +#define TA_TANH tanh +#define TA_TEMA_Lookback temaLookback +#define TA_TEMA tema +#define TA_TRANGE_Lookback trueRangeLookback +#define TA_TRANGE trueRange +#define TA_TRIMA_Lookback trimaLookback +#define TA_TRIMA trima +#define TA_TRIX_Lookback trixLookback +#define TA_TRIX trix +#define TA_TSF_Lookback tsfLookback +#define TA_TSF tsf +#define TA_TYPPRICE_Lookback typPriceLookback +#define TA_TYPPRICE typPrice +#define TA_ULTOSC_Lookback ultOscLookback +#define TA_ULTOSC ultOsc +#define TA_VAR_Lookback varianceLookback +#define TA_VAR variance +#define TA_WCLPRICE_Lookback wclPriceLookback +#define TA_WCLPRICE wclPrice +#define TA_WILLR_Lookback willRLookback +#define TA_WILLR willR +#define TA_WMA_Lookback wmaLookback +#define TA_WMA wma + +/*************** + * End of File * + ***************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_a.c b/src/ta-lib/src/ta_abstract/tables/table_a.c new file mode 100644 index 000000000..f85115c98 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_a.c @@ -0,0 +1,441 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'A' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* ACCBANDS BEGIN */ + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_ACCBANDS_Middle = + { TA_Output_Real, "outRealMiddleBand", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_ACCBANDS_Upper = + { TA_Output_Real, "outRealUpperBand", TA_OUT_UPPER_LIMIT }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_ACCBANDS_Lower = + { TA_Output_Real, "outRealLowerBand", TA_OUT_LOWER_LIMIT }; + +static const TA_InputParameterInfo *TA_ACCBANDS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_ACCBANDS_Outputs[] = +{ + &TA_DEF_UI_Output_Real_ACCBANDS_Upper, + &TA_DEF_UI_Output_Real_ACCBANDS_Middle, + &TA_DEF_UI_Output_Real_ACCBANDS_Lower, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ACCBANDS_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_20_MINIMUM2, + NULL +}; + +DEF_FUNCTION( ACCBANDS, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Acceleration Bands", /* hint */ + "Accbands", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* ACCBANDS END */ + + +/* ACOS BEGIN */ +DEF_MATH_UNARY_OPERATOR( ACOS, "Vector Trigonometric ACos", "Acos" ) +/* ACOS END */ + +/* AD BEGIN */ +static const TA_InputParameterInfo *TA_AD_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLCV, + NULL +}; + +static const TA_OutputParameterInfo *TA_AD_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_AD_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( AD, /* name */ + TA_GroupId_VolumeIndicators, /* groupId */ + "Chaikin A/D Line", /* hint */ + "Ad", /* CamelCase name */ + 0 /* flags */ + ); +/* AD END */ + +/* ADD BEGIN */ +DEF_MATH_BINARY_OPERATOR( ADD, "Vector Arithmetic Add", "Add" ) +/* ADD END */ + +/* ADOSC BEGIN */ +static const TA_OptInputParameterInfo TA_DEF_UI_FastADOSC_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInFastPeriod", /* paramName */ + 0, /* flags */ + + "Fast Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 3, /* defaultValue */ + "Number of period for the fast MA", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_SlowADOSC_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInSlowPeriod", /* paramName */ + 0, /* flags */ + + "Slow Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ + 10, /* defaultValue */ + "Number of period for the slow MA", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_InputParameterInfo *TA_ADOSC_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLCV, + NULL +}; + +static const TA_OutputParameterInfo *TA_ADOSC_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ADOSC_OptInputs[] = +{ + &TA_DEF_UI_FastADOSC_Period, + &TA_DEF_UI_SlowADOSC_Period, + NULL +}; + +DEF_FUNCTION( ADOSC, /* name */ + TA_GroupId_VolumeIndicators, /* groupId */ + "Chaikin A/D Oscillator", /* hint */ + "AdOsc", /* CamelCase name */ + 0 /* flags */ + ); +/* ADOSC END */ + +/* ADX BEGIN */ +static const TA_InputParameterInfo *TA_ADX_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_ADX_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ADX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( ADX, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Average Directional Movement Index", /* hint */ + "Adx", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* ADX END */ + +/* ADXR BEGIN */ +static const TA_InputParameterInfo *TA_ADXR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_ADXR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ADXR_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( ADXR, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Average Directional Movement Index Rating", /* hint */ + "Adxr", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* ADXR END */ + +/* APO BEGIN */ +static const TA_InputParameterInfo *TA_APO_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_APO_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_APO_OptInputs[] = +{ &TA_DEF_UI_Fast_Period, + &TA_DEF_UI_Slow_Period, + &TA_DEF_UI_MA_Method, + NULL +}; + +DEF_FUNCTION( APO, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Absolute Price Oscillator", /* hint */ + "Apo", /* CamelCase name */ + 0 /* flags */ + ); +/* APO END */ + +/* AROON BEGIN */ +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_AroonUp = + { TA_Output_Real, "outAroonDown", TA_OUT_DASH_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_AroonDown = + { TA_Output_Real, "outAroonUp", TA_OUT_LINE }; + +static const TA_InputParameterInfo *TA_AROON_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_AROON_Outputs[] = +{ + &TA_DEF_UI_Output_Real_AroonUp, + &TA_DEF_UI_Output_Real_AroonDown, + NULL +}; + +static const TA_OptInputParameterInfo *TA_AROON_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( AROON, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Aroon", /* hint */ + "Aroon", /* CamelCase name */ + 0 /* flags */ + ); + +/* AROON END */ + +/* AROONOSC BEGIN */ +static const TA_InputParameterInfo *TA_AROONOSC_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_AROONOSC_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_AROONOSC_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( AROONOSC, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Aroon Oscillator", /* hint */ + "AroonOsc", /* CamelCase name */ + 0 /* flags */ + ); + +/* AROONOSC END */ + +/* ASIN BEGIN */ +DEF_MATH_UNARY_OPERATOR( ASIN, "Vector Trigonometric ASin", "Asin" ) +/* ASIN END */ + +/* ATAN BEGIN */ +DEF_MATH_UNARY_OPERATOR( ATAN, "Vector Trigonometric ATan", "Atan" ) +/* ATAN END */ + +/* ATR BEGIN */ +static const TA_InputParameterInfo *TA_ATR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_ATR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ATR_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14, + NULL +}; + +DEF_FUNCTION( ATR, /* name */ + TA_GroupId_VolatilityIndicators, /* groupId */ + "Average True Range", /* hint */ + "Atr", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* ATR END */ + +/* AVGPRICE BEGIN */ +static const TA_InputParameterInfo *TA_AVGPRICE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_AVGPRICE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_AVGPRICE_OptInputs[] = { NULL }; + +DEF_FUNCTION( AVGPRICE, /* name */ + TA_GroupId_PriceTransform, /* groupId */ + "Average Price", /* hint */ + "AvgPrice", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* AVGPRICE END */ + +/* AVGDEV BEGIN */ +static const TA_InputParameterInfo *TA_AVGDEV_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_AVGDEV_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_AVGDEV_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( AVGDEV, /* name */ + TA_GroupId_PriceTransform, /* groupId*/ + "Average Deviation", /* hint */ + "AvgDev", /* CamelCase name*/ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* AVGDEV END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableA[] = +{ + ADD_TO_TABLE(ACCBANDS), + ADD_TO_TABLE(ACOS), + ADD_TO_TABLE(AD), + ADD_TO_TABLE(ADD), + ADD_TO_TABLE(ADOSC), + ADD_TO_TABLE(ADX), + ADD_TO_TABLE(ADXR), + ADD_TO_TABLE(APO), + ADD_TO_TABLE(AROON), + ADD_TO_TABLE(AROONOSC), + ADD_TO_TABLE(ASIN), + ADD_TO_TABLE(ATAN), + ADD_TO_TABLE(ATR), + ADD_TO_TABLE(AVGPRICE), + ADD_TO_TABLE(AVGDEV), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableASize = + ((sizeof(TA_DEF_TableA)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_b.c b/src/ta-lib/src/ta_abstract/tables/table_b.c new file mode 100644 index 000000000..e0fdc4bec --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_b.c @@ -0,0 +1,196 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'B' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* BBANDS BEGIN */ + +/* Nb Deviation up/down is used for bollinger bands. */ +const TA_OptInputParameterInfo TA_DEF_UI_NbDeviationUp = +{ + TA_OptInput_RealRange, /* type */ + "optInNbDevUp", /* paramName */ + 0, /* flags */ + + "Deviations up", /* displayName */ + (const void *)&TA_DEF_NbDeviation, /* dataSet */ + 2.0, /* defaultValue */ + "Deviation multiplier for upper band", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_NbDeviationDn = +{ + TA_OptInput_RealRange, /* type */ + "optInNbDevDn", /* paramName */ + 0, /* flags */ + + "Deviations down", /* displayName */ + (const void *)&TA_DEF_NbDeviation, /* dataSet */ + 2.0, /* defaultValue */ + "Deviation multiplier for lower band", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_BBANDS_Middle = + { TA_Output_Real, "outRealMiddleBand", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_BBANDS_Upper = + { TA_Output_Real, "outRealUpperBand", TA_OUT_UPPER_LIMIT }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_BBANDS_Lower = + { TA_Output_Real, "outRealLowerBand", TA_OUT_LOWER_LIMIT }; + +static const TA_InputParameterInfo *TA_BBANDS_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_BBANDS_Outputs[] = +{ + &TA_DEF_UI_Output_Real_BBANDS_Upper, + &TA_DEF_UI_Output_Real_BBANDS_Middle, + &TA_DEF_UI_Output_Real_BBANDS_Lower, + NULL +}; + +static const TA_OptInputParameterInfo *TA_BBANDS_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_5_MINIMUM2, + &TA_DEF_UI_NbDeviationUp, + &TA_DEF_UI_NbDeviationDn, + &TA_DEF_UI_MA_Method, + NULL +}; + +DEF_FUNCTION( BBANDS, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Bollinger Bands", /* hint */ + "Bbands", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* BBANDS END */ + + +/* BOP BEGIN */ +static const TA_InputParameterInfo *TA_BOP_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_BOP_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_BOP_OptInputs[] = { NULL }; + +DEF_FUNCTION( BOP, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Balance Of Power", /* hint */ + "Bop", /* CamelCase name */ + 0 /* flags */ + ); +/* BOP END */ + +/* BETA BEGIN */ +static const TA_InputParameterInfo *TA_BETA_Inputs[] = +{ + &TA_DEF_UI_Input_Real0, + &TA_DEF_UI_Input_Real1, + NULL +}; + +static const TA_OutputParameterInfo *TA_BETA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_BETA_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_5, + NULL +}; + +DEF_FUNCTION( BETA, /* name */ + TA_GroupId_Statistic, /* groupId */ + "Beta", /* hint */ + "Beta", /* CamelCase name */ + 0 /* flags */ + ); +/* BETA END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableB[] = +{ + ADD_TO_TABLE(BBANDS), + ADD_TO_TABLE(BETA), + ADD_TO_TABLE(BOP), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableBSize = + ((sizeof(TA_DEF_TableB)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_c.c b/src/ta-lib/src/ta_abstract/tables/table_c.c new file mode 100644 index 000000000..717f56a1b --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_c.c @@ -0,0 +1,1885 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'C' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* CCI BEGIN */ +static const TA_InputParameterInfo *TA_CCI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CCI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CCI_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( CCI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Commodity Channel Index", /* hint */ + "Cci", /* CamelCase name */ + 0 /* flags */ ); + +/* CCI END */ + +/* CDL2CROWS BEGIN */ +static const TA_InputParameterInfo *TA_CDL2CROWS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL2CROWS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL2CROWS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL2CROWS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Two Crows", /* hint */ + "Cdl2Crows", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL2CROWS END */ + +/* CDL3BLACKCROWS BEGIN */ +static const TA_InputParameterInfo *TA_CDL3BLACKCROWS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL3BLACKCROWS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL3BLACKCROWS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL3BLACKCROWS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Three Black Crows", /* hint */ + "Cdl3BlackCrows", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL3BLACKCROWS END */ + +/* CDL3INSIDE BEGIN */ +static const TA_InputParameterInfo *TA_CDL3INSIDE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL3INSIDE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL3INSIDE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL3INSIDE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Three Inside Up/Down", /* hint */ + "Cdl3Inside", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL3INSIDE END */ + +/* CDL3LINESTRIKE BEGIN */ +static const TA_InputParameterInfo *TA_CDL3LINESTRIKE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL3LINESTRIKE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL3LINESTRIKE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL3LINESTRIKE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Three-Line Strike ", /* hint */ + "Cdl3LineStrike", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL3LINESTRIKE END */ + +/* CDL3OUTSIDE BEGIN */ +static const TA_InputParameterInfo *TA_CDL3OUTSIDE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL3OUTSIDE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL3OUTSIDE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL3OUTSIDE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Three Outside Up/Down", /* hint */ + "Cdl3Outside", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL3OUTSIDE END */ + +/* CDL3STARSINSOUTH BEGIN */ +static const TA_InputParameterInfo *TA_CDL3STARSINSOUTH_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL3STARSINSOUTH_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL3STARSINSOUTH_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL3STARSINSOUTH, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Three Stars In The South", /* hint */ + "Cdl3StarsInSouth", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL3STARSINSOUTH END */ + +/* CDL3WHITESOLDIERS BEGIN */ +static const TA_InputParameterInfo *TA_CDL3WHITESOLDIERS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDL3WHITESOLDIERS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDL3WHITESOLDIERS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDL3WHITESOLDIERS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Three Advancing White Soldiers", /* hint */ + "Cdl3WhiteSoldiers", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDL3WHITESOLDIERS END */ + +/* CDLABANDONEDBABY BEGIN */ +static const TA_InputParameterInfo *TA_CDLABANDONEDBABY_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLABANDONEDBABY_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLABANDONEDBABY_OptInputs[] = +{ + &TA_DEF_UI_Penetration_30, + NULL +}; + +DEF_FUNCTION( CDLABANDONEDBABY, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Abandoned Baby", /* hint */ + "CdlAbandonedBaby", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLABANDONEDBABY END */ + +/* CDLADVANCEBLOCK BEGIN */ +static const TA_InputParameterInfo *TA_CDLADVANCEBLOCK_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLADVANCEBLOCK_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLADVANCEBLOCK_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLADVANCEBLOCK, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Advance Block", /* hint */ + "CdlAdvanceBlock", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLADVANCEBLOCK END */ + +/* CDLBELTHOLD BEGIN */ +static const TA_InputParameterInfo *TA_CDLBELTHOLD_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLBELTHOLD_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLBELTHOLD_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLBELTHOLD, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Belt-hold", /* hint */ + "CdlBeltHold", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLBELTHOLD END */ + +/* CDLBREAKAWAY BEGIN */ +static const TA_InputParameterInfo *TA_CDLBREAKAWAY_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLBREAKAWAY_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLBREAKAWAY_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLBREAKAWAY, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Breakaway", /* hint */ + "CdlBreakaway", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLBREAKAWAY END */ + +/* CDLCLOSINGMARUBOZU BEGIN */ +static const TA_InputParameterInfo *TA_CDLCLOSINGMARUBOZU_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLCLOSINGMARUBOZU_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLCLOSINGMARUBOZU_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLCLOSINGMARUBOZU, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Closing Marubozu", /* hint */ + "CdlClosingMarubozu", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLCLOSINGMARUBOZU END */ + +/* CDLCONCEALBABYSWALL BEGIN */ +static const TA_InputParameterInfo *TA_CDLCONCEALBABYSWALL_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLCONCEALBABYSWALL_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLCONCEALBABYSWALL_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLCONCEALBABYSWALL, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Concealing Baby Swallow", /* hint */ + "CdlConcealBabysWall", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLCONCEALBABYSWALL END */ + +/* CDLCOUNTERATTACK BEGIN */ +static const TA_InputParameterInfo *TA_CDLCOUNTERATTACK_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLCOUNTERATTACK_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLCOUNTERATTACK_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLCOUNTERATTACK, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Counterattack", /* hint */ + "CdlCounterAttack", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLCOUNTERATTACK END */ + +/* CDLDARKCLOUDCOVER BEGIN */ +static const TA_InputParameterInfo *TA_CDLDARKCLOUDCOVER_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLDARKCLOUDCOVER_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLDARKCLOUDCOVER_OptInputs[] = +{ + &TA_DEF_UI_Penetration_50, + NULL +}; + +DEF_FUNCTION( CDLDARKCLOUDCOVER, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Dark Cloud Cover", /* hint */ + "CdlDarkCloudCover", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLDARKCLOUDCOVER END */ + +/* CDLDOJI BEGIN */ +static const TA_InputParameterInfo *TA_CDLDOJI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLDOJI_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLDOJI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLDOJI, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Doji", /* hint */ + "CdlDoji", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLDOJI END */ + +/* CDLDOJISTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLDOJISTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLDOJISTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLDOJISTAR_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLDOJISTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Doji Star", /* hint */ + "CdlDojiStar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLDOJISTAR END */ + +/* CDLDRAGONFLYDOJI BEGIN */ +static const TA_InputParameterInfo *TA_CDLDRAGONFLYDOJI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLDRAGONFLYDOJI_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLDRAGONFLYDOJI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLDRAGONFLYDOJI, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Dragonfly Doji", /* hint */ + "CdlDragonflyDoji", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLDRAGONFLYDOJI END */ + +/* CDLENGULFING BEGIN */ +static const TA_InputParameterInfo *TA_CDLENGULFING_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLENGULFING_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLENGULFING_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLENGULFING, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Engulfing Pattern", /* hint */ + "CdlEngulfing", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLENGULFING END */ + +/* CDLEVENINGDOJISTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLEVENINGDOJISTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLEVENINGDOJISTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLEVENINGDOJISTAR_OptInputs[] = +{ + &TA_DEF_UI_Penetration_30, + NULL +}; + +DEF_FUNCTION( CDLEVENINGDOJISTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Evening Doji Star", /* hint */ + "CdlEveningDojiStar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLEVENINGDOJISTAR END */ + +/* CDLEVENINGSTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLEVENINGSTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLEVENINGSTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLEVENINGSTAR_OptInputs[] = +{ + &TA_DEF_UI_Penetration_30, + NULL +}; + +DEF_FUNCTION( CDLEVENINGSTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Evening Star", /* hint */ + "CdlEveningStar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLEVENINGSTAR END */ + +/* CDLEVENINGDOJISTAR END */ + +/* CDLGAPSIDESIDEWHITE BEGIN */ +static const TA_InputParameterInfo *TA_CDLGAPSIDESIDEWHITE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLGAPSIDESIDEWHITE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLGAPSIDESIDEWHITE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLGAPSIDESIDEWHITE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Up/Down-gap side-by-side white lines", /* hint */ + "CdlGapSideSideWhite", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLGAPSIDESIDEWHITE END */ + +/* CDLGRAVESTONEDOJI BEGIN */ +static const TA_InputParameterInfo *TA_CDLGRAVESTONEDOJI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLGRAVESTONEDOJI_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLGRAVESTONEDOJI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLGRAVESTONEDOJI, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Gravestone Doji", /* hint */ + "CdlGravestoneDoji", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLGRAVESTONEDOJI END */ + +/* CDLHAMMER BEGIN */ +static const TA_InputParameterInfo *TA_CDLHAMMER_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHAMMER_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHAMMER_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHAMMER, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Hammer", /* hint */ + "CdlHammer", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHAMMER END */ + +/* CDLHANGINGMAN BEGIN */ +static const TA_InputParameterInfo *TA_CDLHANGINGMAN_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHANGINGMAN_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHANGINGMAN_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHANGINGMAN, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Hanging Man", /* hint */ + "CdlHangingMan", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHANGINGMAN END */ + +/* CDLHARAMI BEGIN */ +static const TA_InputParameterInfo *TA_CDLHARAMI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHARAMI_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHARAMI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHARAMI, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Harami Pattern", /* hint */ + "CdlHarami", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHARAMI END */ + +/* CDLHARAMICROSS BEGIN */ +static const TA_InputParameterInfo *TA_CDLHARAMICROSS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHARAMICROSS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHARAMICROSS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHARAMICROSS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Harami Cross Pattern", /* hint */ + "CdlHaramiCross", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHARAMICROSS END */ + +/* CDLHIGHWAVE BEGIN */ +static const TA_InputParameterInfo *TA_CDLHIGHWAVE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHIGHWAVE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHIGHWAVE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHIGHWAVE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "High-Wave Candle", /* hint */ + "CdlHignWave", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHIGHWAVE END */ + +/* CDLHIKKAKE BEGIN */ +static const TA_InputParameterInfo *TA_CDLHIKKAKE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHIKKAKE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHIKKAKE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHIKKAKE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Hikkake Pattern", /* hint */ + "CdlHikkake", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHIKKAKE END */ + +/* CDLHIKKAKEMOD BEGIN */ +static const TA_InputParameterInfo *TA_CDLHIKKAKEMOD_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHIKKAKEMOD_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHIKKAKEMOD_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHIKKAKEMOD, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Modified Hikkake Pattern", /* hint */ + "CdlHikkakeMod", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHIKKAKEMOD END */ + +/* CDLHOMINGPIGEON BEGIN */ +static const TA_InputParameterInfo *TA_CDLHOMINGPIGEON_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLHOMINGPIGEON_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLHOMINGPIGEON_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLHOMINGPIGEON, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Homing Pigeon", /* hint */ + "CdlHomingPigeon", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLHOMINGPIGEON END */ + +/* CDLIDENTICAL3CROWS BEGIN */ +static const TA_InputParameterInfo *TA_CDLIDENTICAL3CROWS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLIDENTICAL3CROWS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLIDENTICAL3CROWS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLIDENTICAL3CROWS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Identical Three Crows", /* hint */ + "CdlIdentical3Crows", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLIDENTICAL3CROWS END */ + +/* CDLINNECK BEGIN */ +static const TA_InputParameterInfo *TA_CDLINNECK_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLINNECK_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLINNECK_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLINNECK, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "In-Neck Pattern", /* hint */ + "CdlInNeck", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLINNECK END */ + +/* CDLINVERTEDHAMMER BEGIN */ +static const TA_InputParameterInfo *TA_CDLINVERTEDHAMMER_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLINVERTEDHAMMER_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLINVERTEDHAMMER_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLINVERTEDHAMMER, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Inverted Hammer", /* hint */ + "CdlInvertedHammer", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLINVERTEDHAMMER END */ + +/* CDLKICKING BEGIN */ +static const TA_InputParameterInfo *TA_CDLKICKING_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLKICKING_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLKICKING_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLKICKING, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Kicking", /* hint */ + "CdlKicking", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLKICKING END */ + +/* CDLKICKINGBYLENGTH BEGIN */ +static const TA_InputParameterInfo *TA_CDLKICKINGBYLENGTH_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLKICKINGBYLENGTH_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLKICKINGBYLENGTH_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLKICKINGBYLENGTH, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Kicking - bull/bear determined by the longer marubozu", /* hint */ + "CdlKickingByLength", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLKICKINGBYLENGTH END */ + +/* CDLLADDERBOTTOM BEGIN */ +static const TA_InputParameterInfo *TA_CDLLADDERBOTTOM_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLLADDERBOTTOM_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLLADDERBOTTOM_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLLADDERBOTTOM, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Ladder Bottom", /* hint */ + "CdlLadderBottom", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLLADDERBOTTOM END */ + +/* CDLLONGLEGGEDDOJI BEGIN */ +static const TA_InputParameterInfo *TA_CDLLONGLEGGEDDOJI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLLONGLEGGEDDOJI_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLLONGLEGGEDDOJI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLLONGLEGGEDDOJI, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Long Legged Doji", /* hint */ + "CdlLongLeggedDoji", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLLONGLEGGEDDOJI END */ + +/* CDLLONGLINE BEGIN */ +static const TA_InputParameterInfo *TA_CDLLONGLINE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLLONGLINE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLLONGLINE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLLONGLINE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Long Line Candle", /* hint */ + "CdlLongLine", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLLONGLINE END */ + +/* CDLMARUBOZU BEGIN */ +static const TA_InputParameterInfo *TA_CDLMARUBOZU_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLMARUBOZU_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLMARUBOZU_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLMARUBOZU, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Marubozu", /* hint */ + "CdlMarubozu", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLMARUBOZU END */ + +/* CDLMATCHINGLOW BEGIN */ +static const TA_InputParameterInfo *TA_CDLMATCHINGLOW_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLMATCHINGLOW_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLMATCHINGLOW_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLMATCHINGLOW, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Matching Low", /* hint */ + "CdlMatchingLow", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLMATCHINGLOW END */ + +/* CDLMATHOLD BEGIN */ +static const TA_InputParameterInfo *TA_CDLMATHOLD_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLMATHOLD_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLMATHOLD_OptInputs[] = +{ + &TA_DEF_UI_Penetration_50, + NULL +}; + +DEF_FUNCTION( CDLMATHOLD, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Mat Hold", /* hint */ + "CdlMatHold", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLMATHOLD END */ + +/* CDLMORNINGDOJISTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLMORNINGDOJISTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLMORNINGDOJISTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLMORNINGDOJISTAR_OptInputs[] = +{ + &TA_DEF_UI_Penetration_30, + NULL +}; + +DEF_FUNCTION( CDLMORNINGDOJISTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Morning Doji Star", /* hint */ + "CdlMorningDojiStar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLMORNINGDOJISTAR END */ + +/* CDLMORNINGSTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLMORNINGSTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLMORNINGSTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLMORNINGSTAR_OptInputs[] = +{ + &TA_DEF_UI_Penetration_30, + NULL +}; + +DEF_FUNCTION( CDLMORNINGSTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Morning Star", /* hint */ + "CdlMorningStar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLMORNINGSTAR END */ + +/* CDLONNECK BEGIN */ +static const TA_InputParameterInfo *TA_CDLONNECK_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLONNECK_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLONNECK_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLONNECK, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "On-Neck Pattern", /* hint */ + "CdlOnNeck", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLONNECK END */ + +/* CDLPIERCING BEGIN */ +static const TA_InputParameterInfo *TA_CDLPIERCING_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLPIERCING_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLPIERCING_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLPIERCING, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Piercing Pattern", /* hint */ + "CdlPiercing", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLPIERCING END */ + +/* CDLRICKSHAWMAN BEGIN */ +static const TA_InputParameterInfo *TA_CDLRICKSHAWMAN_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLRICKSHAWMAN_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLRICKSHAWMAN_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLRICKSHAWMAN, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Rickshaw Man", /* hint */ + "CdlRickshawMan", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLRICKSHAWMAN END */ + +/* CDLRISEFALL3METHODS BEGIN */ +static const TA_InputParameterInfo *TA_CDLRISEFALL3METHODS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLRISEFALL3METHODS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLRISEFALL3METHODS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLRISEFALL3METHODS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Rising/Falling Three Methods", /* hint */ + "CdlRiseFall3Methods", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLRISEFALL3METHODS END */ + +/* CDLSEPARATINGLINES BEGIN */ +static const TA_InputParameterInfo *TA_CDLSEPARATINGLINES_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLSEPARATINGLINES_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLSEPARATINGLINES_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLSEPARATINGLINES, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Separating Lines", /* hint */ + "CdlSeperatingLines", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLSEPARATINGLINES END */ + +/* CDLSHOOTINGSTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLSHOOTINGSTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLSHOOTINGSTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLSHOOTINGSTAR_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLSHOOTINGSTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Shooting Star", /* hint */ + "CdlShootingStar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLSHOOTINGSTAR END */ + +/* CDLSHORTLINE BEGIN */ +static const TA_InputParameterInfo *TA_CDLSHORTLINE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLSHORTLINE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLSHORTLINE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLSHORTLINE, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Short Line Candle", /* hint */ + "CdlShortLine", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLSHORTLINE END */ + +/* CDLSPINNINGTOP BEGIN */ +static const TA_InputParameterInfo *TA_CDLSPINNINGTOP_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLSPINNINGTOP_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLSPINNINGTOP_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLSPINNINGTOP, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Spinning Top", /* hint */ + "CdlSpinningTop", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLSPINNINGTOP END */ + +/* CDLSTALLEDPATTERN BEGIN */ +static const TA_InputParameterInfo *TA_CDLSTALLEDPATTERN_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLSTALLEDPATTERN_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLSTALLEDPATTERN_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLSTALLEDPATTERN, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Stalled Pattern", /* hint */ + "CdlStalledPattern", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLSTALLEDPATTERN END */ + +/* CDLSTICKSANDWICH BEGIN */ +static const TA_InputParameterInfo *TA_CDLSTICKSANDWICH_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLSTICKSANDWICH_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLSTICKSANDWICH_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLSTICKSANDWICH, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Stick Sandwich", /* hint */ + "CdlStickSandwich", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLSTICKSANDWICH END */ + +/* CDLTAKURI BEGIN */ +static const TA_InputParameterInfo *TA_CDLTAKURI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLTAKURI_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLTAKURI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLTAKURI, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Takuri (Dragonfly Doji with very long lower shadow)", /* hint */ + "CdlTakuri", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLTAKURI END */ + +/* CDLTASUKIGAP BEGIN */ +static const TA_InputParameterInfo *TA_CDLTASUKIGAP_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLTASUKIGAP_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLTASUKIGAP_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLTASUKIGAP, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Tasuki Gap", /* hint */ + "CdlTasukiGap", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLTASUKIGAP END */ + +/* CDLTHRUSTING BEGIN */ +static const TA_InputParameterInfo *TA_CDLTHRUSTING_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLTHRUSTING_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLTHRUSTING_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLTHRUSTING, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Thrusting Pattern", /* hint */ + "CdlThrusting", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLTHRUSTING END */ + +/* CDLTRISTAR BEGIN */ +static const TA_InputParameterInfo *TA_CDLTRISTAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLTRISTAR_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLTRISTAR_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLTRISTAR, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Tristar Pattern", /* hint */ + "CdlTristar", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLTRISTAR END */ + +/* CDLUNIQUE3RIVER BEGIN */ +static const TA_InputParameterInfo *TA_CDLUNIQUE3RIVER_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLUNIQUE3RIVER_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLUNIQUE3RIVER_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLUNIQUE3RIVER, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Unique 3 River", /* hint */ + "CdlUnique3River", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLUNIQUE3RIVER END */ + +/* CDLUPSIDEGAP2CROWS BEGIN */ +static const TA_InputParameterInfo *TA_CDLUPSIDEGAP2CROWS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLUPSIDEGAP2CROWS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLUPSIDEGAP2CROWS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLUPSIDEGAP2CROWS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Upside Gap Two Crows", /* hint */ + "CdlUpsideGap2Crows", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLUPSIDEGAP2CROWS END */ + +/* CDLXSIDEGAP3METHODS BEGIN */ +static const TA_InputParameterInfo *TA_CDLXSIDEGAP3METHODS_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OHLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_CDLXSIDEGAP3METHODS_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CDLXSIDEGAP3METHODS_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( CDLXSIDEGAP3METHODS, /* name */ + TA_GroupId_PatternRecognition, /* groupId */ + "Upside/Downside Gap Three Methods", /* hint */ + "CdlXSideGap3Methods", /* CamelCase name */ + TA_FUNC_FLG_CANDLESTICK /* flags */ + ); + +/* CDLXSIDEGAP3METHODS END */ + +/* CEIL BEGIN */ +DEF_MATH_UNARY_OPERATOR( CEIL, "Vector Ceil", "Ceil" ) +/* CEIL END */ + +/* CMO BEGIN */ +static const TA_InputParameterInfo *TA_CMO_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_CMO_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CMO_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( CMO, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Chande Momentum Oscillator", /* hint */ + "Cmo", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* CMO END */ + +/* CORREL BEGIN */ +static const TA_InputParameterInfo *TA_CORREL_Inputs[] = +{ + &TA_DEF_UI_Input_Real0, + &TA_DEF_UI_Input_Real1, + NULL +}; + +static const TA_OutputParameterInfo *TA_CORREL_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_CORREL_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30, + NULL +}; + +DEF_FUNCTION( CORREL, /* name */ + TA_GroupId_Statistic, /* groupId */ + "Pearson's Correlation Coefficient (r)", /* hint */ + "Correl", /* CamelCase name */ + 0 /* flags */ + ); +/* CORREL END */ + +/* COS BEGIN */ +DEF_MATH_UNARY_OPERATOR( COS, "Vector Trigonometric Cos", "Cos" ) +/* COS END */ + +/* COSH BEGIN */ +DEF_MATH_UNARY_OPERATOR( COSH, "Vector Trigonometric Cosh", "Cosh" ) +/* COSH END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableC[] = +{ + ADD_TO_TABLE(CCI), + ADD_TO_TABLE(CDL2CROWS), + ADD_TO_TABLE(CDL3BLACKCROWS), + ADD_TO_TABLE(CDL3INSIDE), + ADD_TO_TABLE(CDL3LINESTRIKE), + ADD_TO_TABLE(CDL3OUTSIDE), + ADD_TO_TABLE(CDL3STARSINSOUTH), + ADD_TO_TABLE(CDL3WHITESOLDIERS), + ADD_TO_TABLE(CDLABANDONEDBABY), + ADD_TO_TABLE(CDLADVANCEBLOCK), + ADD_TO_TABLE(CDLBELTHOLD), + ADD_TO_TABLE(CDLBREAKAWAY), + ADD_TO_TABLE(CDLCLOSINGMARUBOZU), + ADD_TO_TABLE(CDLCONCEALBABYSWALL), + ADD_TO_TABLE(CDLCOUNTERATTACK), + ADD_TO_TABLE(CDLDARKCLOUDCOVER), + ADD_TO_TABLE(CDLDOJI), + ADD_TO_TABLE(CDLDOJISTAR), + ADD_TO_TABLE(CDLDRAGONFLYDOJI), + ADD_TO_TABLE(CDLENGULFING), + ADD_TO_TABLE(CDLEVENINGDOJISTAR), + ADD_TO_TABLE(CDLEVENINGSTAR), + ADD_TO_TABLE(CDLGAPSIDESIDEWHITE), + ADD_TO_TABLE(CDLGRAVESTONEDOJI), + ADD_TO_TABLE(CDLHAMMER), + ADD_TO_TABLE(CDLHANGINGMAN), + ADD_TO_TABLE(CDLHARAMI), + ADD_TO_TABLE(CDLHARAMICROSS), + ADD_TO_TABLE(CDLHIGHWAVE), + ADD_TO_TABLE(CDLHIKKAKE), + ADD_TO_TABLE(CDLHIKKAKEMOD), + ADD_TO_TABLE(CDLHOMINGPIGEON), + ADD_TO_TABLE(CDLIDENTICAL3CROWS), + ADD_TO_TABLE(CDLINNECK), + ADD_TO_TABLE(CDLINVERTEDHAMMER), + ADD_TO_TABLE(CDLKICKING), + ADD_TO_TABLE(CDLKICKINGBYLENGTH), + ADD_TO_TABLE(CDLLADDERBOTTOM), + ADD_TO_TABLE(CDLLONGLEGGEDDOJI), + ADD_TO_TABLE(CDLLONGLINE), + ADD_TO_TABLE(CDLMARUBOZU), + ADD_TO_TABLE(CDLMATCHINGLOW), + ADD_TO_TABLE(CDLMATHOLD), + ADD_TO_TABLE(CDLMORNINGDOJISTAR), + ADD_TO_TABLE(CDLMORNINGSTAR), + ADD_TO_TABLE(CDLONNECK), + ADD_TO_TABLE(CDLPIERCING), + ADD_TO_TABLE(CDLRICKSHAWMAN), + ADD_TO_TABLE(CDLRISEFALL3METHODS), + ADD_TO_TABLE(CDLSEPARATINGLINES), + ADD_TO_TABLE(CDLSHOOTINGSTAR), + ADD_TO_TABLE(CDLSHORTLINE), + ADD_TO_TABLE(CDLSPINNINGTOP), + ADD_TO_TABLE(CDLSTALLEDPATTERN), + ADD_TO_TABLE(CDLSTICKSANDWICH), + ADD_TO_TABLE(CDLTAKURI), + ADD_TO_TABLE(CDLTASUKIGAP), + ADD_TO_TABLE(CDLTHRUSTING), + ADD_TO_TABLE(CDLTRISTAR), + ADD_TO_TABLE(CDLUNIQUE3RIVER), + ADD_TO_TABLE(CDLUPSIDEGAP2CROWS), + ADD_TO_TABLE(CDLXSIDEGAP3METHODS), + ADD_TO_TABLE(CEIL), + ADD_TO_TABLE(CMO), + ADD_TO_TABLE(CORREL), + ADD_TO_TABLE(COS), + ADD_TO_TABLE(COSH), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableCSize = + ((sizeof(TA_DEF_TableC)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_d.c b/src/ta-lib/src/ta_abstract/tables/table_d.c new file mode 100644 index 000000000..cb0ebb8f2 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_d.c @@ -0,0 +1,129 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'D' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* DEMA BEGIN */ +static const TA_InputParameterInfo *TA_DEMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_DEMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_DEMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( DEMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Double Exponential Moving Average", /* hint */ + "Dema", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* DEMA END */ + +/* DIV BEGIN */ +DEF_MATH_BINARY_OPERATOR( DIV, "Vector Arithmetic Div", "Div" ) +/* DIV END */ + +/* DX BEGIN */ +static const TA_InputParameterInfo *TA_DX_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_DX_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_DX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( DX, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Directional Movement Index", /* hint */ + "Dx", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* DX END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableD[] = +{ + ADD_TO_TABLE(DEMA), + ADD_TO_TABLE(DIV), + ADD_TO_TABLE(DX), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableDSize = + ((sizeof(TA_DEF_TableD)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_e.c b/src/ta-lib/src/ta_abstract/tables/table_e.c new file mode 100644 index 000000000..f7b87190f --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_e.c @@ -0,0 +1,102 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'E' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* EMA BEGIN */ +static const TA_InputParameterInfo *TA_EMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_EMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_EMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( EMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Exponential Moving Average", /* hint */ + "Ema", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP|TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* EMA END */ + +/* EXP BEGIN */ +DEF_MATH_UNARY_OPERATOR( EXP, "Vector Arithmetic Exp", "Exp" ) +/* EXP END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableE[] = +{ + ADD_TO_TABLE(EMA), + ADD_TO_TABLE(EXP), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableESize = + ((sizeof(TA_DEF_TableE)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_f.c b/src/ta-lib/src/ta_abstract/tables/table_f.c new file mode 100644 index 000000000..5f949e14e --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_f.c @@ -0,0 +1,76 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'F' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* Floor BEGIN */ +DEF_MATH_UNARY_OPERATOR( FLOOR, "Vector Floor", "Floor" ) +/* Floor END */ + + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableF[] = +{ + ADD_TO_TABLE(FLOOR), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableFSize = + ((sizeof(TA_DEF_TableF)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_g.c b/src/ta-lib/src/ta_abstract/tables/table_g.c new file mode 100644 index 000000000..dc4be37e2 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_g.c @@ -0,0 +1,72 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'G' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* None */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableG[] = +{ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableGSize = + ((sizeof(TA_DEF_TableG)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_h.c b/src/ta-lib/src/ta_abstract/tables/table_h.c new file mode 100644 index 000000000..f8490921c --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_h.c @@ -0,0 +1,246 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'H' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* HT_DCPERIOD */ +static const TA_InputParameterInfo *TA_HT_DCPERIOD_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_HT_DCPERIOD_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_HT_DCPERIOD_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( HT_DCPERIOD, /* name */ + TA_GroupId_CycleIndicators, /* groupId */ + "Hilbert Transform - Dominant Cycle Period", /* hint */ + "HtDcPeriod", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* HT_DCPERIOD END */ + +/* HT_DCPHASE */ +static const TA_InputParameterInfo *TA_HT_DCPHASE_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_HT_DCPHASE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_HT_DCPHASE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( HT_DCPHASE, /* name */ + TA_GroupId_CycleIndicators, /* groupId */ + "Hilbert Transform - Dominant Cycle Phase", /* hint */ + "HtDcPhase", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* HT_DCPHASE END */ + +/* HT_PHASOR */ +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_InPhase = + { TA_Output_Real, "outInPhase", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Quadrature = + { TA_Output_Real, "outQuadrature", TA_OUT_DASH_LINE }; + +static const TA_InputParameterInfo *TA_HT_PHASOR_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_HT_PHASOR_Outputs[] = +{ + &TA_DEF_UI_Output_Real_InPhase, + &TA_DEF_UI_Output_Real_Quadrature, + NULL +}; + +static const TA_OptInputParameterInfo *TA_HT_PHASOR_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( HT_PHASOR, /* name */ + TA_GroupId_CycleIndicators, /* groupId */ + "Hilbert Transform - Phasor Components", /* hint */ + "HtPhasor", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* HT_PHASOR END */ + +/* HT_SINE */ +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Sine = + { TA_Output_Real, "outSine", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_LeadSine = + { TA_Output_Real, "outLeadSine", TA_OUT_DASH_LINE }; + +static const TA_InputParameterInfo *TA_HT_SINE_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_HT_SINE_Outputs[] = +{ + &TA_DEF_UI_Output_Real_Sine, + &TA_DEF_UI_Output_Real_LeadSine, + NULL +}; + +static const TA_OptInputParameterInfo *TA_HT_SINE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( HT_SINE, /* name */ + TA_GroupId_CycleIndicators, /* groupId */ + "Hilbert Transform - SineWave", /* hint */ + "HtSine", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* HT_SINE END */ + +/* HT_TRENDLINE */ +static const TA_InputParameterInfo *TA_HT_TRENDLINE_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_HT_TRENDLINE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_HT_TRENDLINE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( HT_TRENDLINE, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Hilbert Transform - Instantaneous Trendline", /* hint */ + "HtTrendline", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER|TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* HT_TRENDLINE END */ + +/* HT_TRENDMODE */ +static const TA_InputParameterInfo *TA_HT_TRENDMODE_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_HT_TRENDMODE_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_HT_TRENDMODE_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( HT_TRENDMODE, /* name */ + TA_GroupId_CycleIndicators, /* groupId */ + "Hilbert Transform - Trend vs Cycle Mode", /* hint */ + "HtTrendMode", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* HT_TRENDMODE END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableH[] = +{ + ADD_TO_TABLE(HT_DCPERIOD), + ADD_TO_TABLE(HT_DCPHASE), + ADD_TO_TABLE(HT_PHASOR), + ADD_TO_TABLE(HT_SINE), + ADD_TO_TABLE(HT_TRENDLINE), + ADD_TO_TABLE(HT_TRENDMODE), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableHSize = + ((sizeof(TA_DEF_TableH)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_i.c b/src/ta-lib/src/ta_abstract/tables/table_i.c new file mode 100644 index 000000000..11f32e842 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_i.c @@ -0,0 +1,99 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'I' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* IMI BEGIN */ +static const TA_InputParameterInfo *TA_IMI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_OC, + NULL +}; + +static const TA_OutputParameterInfo *TA_IMI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_IMI_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( IMI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Intraday Momentum Index", /* hint */ + "Imi", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); + +/* IMI END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableI[] = +{ + ADD_TO_TABLE(IMI), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableISize = + ((sizeof(TA_DEF_TableI)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_j.c b/src/ta-lib/src/ta_abstract/tables/table_j.c new file mode 100644 index 000000000..e185726b2 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_j.c @@ -0,0 +1,72 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'J' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* None */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableJ[] = +{ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableJSize = + ((sizeof(TA_DEF_TableJ)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_k.c b/src/ta-lib/src/ta_abstract/tables/table_k.c new file mode 100644 index 000000000..79d39e35c --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_k.c @@ -0,0 +1,98 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'K' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* KAMA BEGIN */ +static const TA_InputParameterInfo *TA_KAMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_KAMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_KAMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( KAMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Kaufman Adaptive Moving Average", /* hint */ + "Kama", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP|TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* KAMA END */ + + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableK[] = +{ + ADD_TO_TABLE(KAMA), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableKSize = + ((sizeof(TA_DEF_TableK)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_l.c b/src/ta-lib/src/ta_abstract/tables/table_l.c new file mode 100644 index 000000000..e64c3a7e6 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_l.c @@ -0,0 +1,188 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'L' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* LINEARREG BEGIN */ +static const TA_InputParameterInfo *TA_LINEARREG_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_LINEARREG_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_LINEARREG_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( LINEARREG, /* name */ + TA_GroupId_Statistic,/* groupId */ + "Linear Regression", /* hint */ + "LinearReg", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* LINEARREG END */ + +/* LINEARREG_SLOPE BEGIN */ +static const TA_InputParameterInfo *TA_LINEARREG_SLOPE_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_LINEARREG_SLOPE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_LINEARREG_SLOPE_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( LINEARREG_SLOPE, /* name */ + TA_GroupId_Statistic,/* groupId */ + "Linear Regression Slope", /* hint */ + "LinearRegSlope", /* CamelCase name */ + 0 /* flags */ + ); +/* LINEARREG_SLOPE END */ + +/* LINEARREG_ANGLE BEGIN */ +static const TA_InputParameterInfo *TA_LINEARREG_ANGLE_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_LINEARREG_ANGLE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_LINEARREG_ANGLE_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( LINEARREG_ANGLE, /* name */ + TA_GroupId_Statistic,/* groupId */ + "Linear Regression Angle", /* hint */ + "LinearRegAngle", /* CamelCase name */ + 0 /* flags */ + ); +/* LINEARREG_ANGLE END */ + +/* LINEARREG_INTERCEPT BEGIN */ +static const TA_InputParameterInfo *TA_LINEARREG_INTERCEPT_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_LINEARREG_INTERCEPT_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_LINEARREG_INTERCEPT_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( LINEARREG_INTERCEPT, /* name */ + TA_GroupId_Statistic,/* groupId */ + "Linear Regression Intercept", /* hint */ + "LinearRegIntercept", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* LINEARREG_INTERCEPT END */ + +/* LN BEGIN */ +DEF_MATH_UNARY_OPERATOR( LN, "Vector Log Natural", "Ln" ) +/* LN END */ + +/* LOG10 BEGIN */ +DEF_MATH_UNARY_OPERATOR( LOG10, "Vector Log10", "Log10" ) +/* LOG10 END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableL[] = +{ + ADD_TO_TABLE(LINEARREG), + ADD_TO_TABLE(LINEARREG_ANGLE), + ADD_TO_TABLE(LINEARREG_INTERCEPT), + ADD_TO_TABLE(LINEARREG_SLOPE), + ADD_TO_TABLE(LN), + ADD_TO_TABLE(LOG10), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableLSize = + ((sizeof(TA_DEF_TableL)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_m.c b/src/ta-lib/src/ta_abstract/tables/table_m.c new file mode 100644 index 000000000..7e832418c --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_m.c @@ -0,0 +1,739 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'M' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +const TA_OptInputParameterInfo TA_DEF_UI_Signal_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInSignalPeriod", /* paramName */ + 0, /* flags */ + + "Signal Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 9, /* defaultValue */ + "Smoothing for the signal line (nb of period)", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_Slow_MA_Type = +{ + TA_OptInput_IntegerList, /* type */ + "optInSlowMAType", /* paramName */ + 0, /* flags */ + + "Slow MA", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average for slow MA", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_Fast_MA_Type = +{ + TA_OptInput_IntegerList, /* type */ + "optInFastMAType", /* paramName */ + 0, /* flags */ + + "Fast MA", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average for fast MA", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_Signal_MA_Type = +{ + TA_OptInput_IntegerList, /* type */ + "optInSignalMAType", /* paramName */ + 0, /* flags */ + "Signal MA", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average for signal line", /* hint */ + + NULL /* CamelCase name */ +}; + +/* MA BEGIN */ +static const TA_InputParameterInfo *TA_MA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30, + &TA_DEF_UI_MA_Method, + NULL +}; + +DEF_FUNCTION( MA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Moving average", /* hint */ + "MovingAverage", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MA END */ + +/* MACD BEGIN */ +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MACD = + { TA_Output_Real, "outMACD", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MACDSignal = + { TA_Output_Real, "outMACDSignal", TA_OUT_DASH_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MACDHist = + { TA_Output_Real, "outMACDHist", TA_OUT_HISTO }; + +static const TA_InputParameterInfo *TA_MACD_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MACD_Outputs[] = +{ + &TA_DEF_UI_Output_Real_MACD, + &TA_DEF_UI_Output_Real_MACDSignal, + &TA_DEF_UI_Output_Real_MACDHist, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MACD_OptInputs[] = +{ &TA_DEF_UI_Fast_Period, + &TA_DEF_UI_Slow_Period, + &TA_DEF_UI_Signal_Period, + NULL +}; + +DEF_FUNCTION( MACD, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Moving Average Convergence/Divergence", /* hint */ + "Macd", /* CamelCase name */ + 0 /* flags */ + ); +/* MACD END */ + +/* MACDEXT BEGIN */ +static const TA_InputParameterInfo *TA_MACDEXT_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MACDEXT_Outputs[] = +{ + &TA_DEF_UI_Output_Real_MACD, + &TA_DEF_UI_Output_Real_MACDSignal, + &TA_DEF_UI_Output_Real_MACDHist, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MACDEXT_OptInputs[] = +{ &TA_DEF_UI_Fast_Period, + &TA_DEF_UI_Fast_MA_Type, + &TA_DEF_UI_Slow_Period, + &TA_DEF_UI_Slow_MA_Type, + &TA_DEF_UI_Signal_Period, + &TA_DEF_UI_Signal_MA_Type, + NULL +}; + +DEF_FUNCTION( MACDEXT, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "MACD with controllable MA type", /* hint */ + "MacdExt", /* CamelCase name */ + 0 /* flags */ + ); +/* MACDEXT END */ + +/* MACDFIX BEGIN */ +static const TA_InputParameterInfo *TA_MACDFIX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MACDFIX_Outputs[] = +{ + &TA_DEF_UI_Output_Real_MACD, + &TA_DEF_UI_Output_Real_MACDSignal, + &TA_DEF_UI_Output_Real_MACDHist, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MACDFIX_OptInputs[] = +{ &TA_DEF_UI_Signal_Period, + NULL +}; + +DEF_FUNCTION( MACDFIX, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Moving Average Convergence/Divergence Fix 12/26", /* hint */ + "MacdFix", /* CamelCase name */ + 0 /* flags */ + ); +/* MACDFIX END */ + +/* MAMA BEGIN */ +const TA_RealRange TA_DEF_MAMA_FastLimit = +{ + 0.01, /* min */ + 0.99, /* max */ + 2, /* precision */ + 0.21, /* suggested start */ + 0.80, /* suggested end */ + 0.01 /* suggested increment */ +}; + +const TA_RealRange TA_DEF_MAMA_SlowLimit = +{ + 0.01, /* min */ + 0.99, /* max */ + 2, /* precision */ + 0.01, /* suggested start */ + 0.60, /* suggested end */ + 0.01 /* suggested increment */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_MAMA_FastLimit = +{ + TA_OptInput_RealRange, /* type */ + "optInFastLimit", /* paramName */ + 0, /* flags */ + "Fast Limit", /* displayName */ + (const void *)&TA_DEF_MAMA_FastLimit, /* dataSet */ + 0.5, /* defaultValue */ + "Upper limit use in the adaptive algorithm", /* hint */ + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_MAMA_SlowLimit = +{ + TA_OptInput_RealRange, /* type */ + "optInSlowLimit", /* paramName */ + 0, /* flags */ + + "Slow Limit", /* displayName */ + (const void *)&TA_DEF_MAMA_SlowLimit, /* dataSet */ + 0.05, /* defaultValue */ + "Lower limit use in the adaptive algorithm", /* hint */ + NULL /* CamelCase name */ +}; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MAMA = + { TA_Output_Real, "outMAMA", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_FAMA = + { TA_Output_Real, "outFAMA", TA_OUT_DASH_LINE }; + +static const TA_InputParameterInfo *TA_MAMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MAMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real_MAMA, + &TA_DEF_UI_Output_Real_FAMA, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MAMA_OptInputs[] = +{ &TA_DEF_UI_MAMA_FastLimit, + &TA_DEF_UI_MAMA_SlowLimit, + NULL +}; + +DEF_FUNCTION( MAMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "MESA Adaptive Moving Average", /* hint */ + "Mama", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER|TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MAMA END */ + +/* MAVP BEGIN */ +static const TA_InputParameterInfo *TA_MAVP_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + &TA_DEF_UI_Input_Periods, + NULL +}; + +static const TA_OutputParameterInfo *TA_MAVP_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MAVP_OptInputs[] = +{ + &TA_DEF_UI_MinPeriod, + &TA_DEF_UI_MaxPeriod, + &TA_DEF_UI_MA_Method, + NULL +}; + +DEF_FUNCTION( MAVP, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Moving average with variable period", /* hint */ + "MovingAverageVariablePeriod", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MAVP END */ + +/* MAX BEGIN */ +static const TA_InputParameterInfo *TA_MAX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MAX_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MAX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MAX, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Highest value over a specified period", /* hint */ + "Max", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MAX END */ + +/* MAXINDEX BEGIN */ +static const TA_InputParameterInfo *TA_MAXINDEX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MAXINDEX_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MAXINDEX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MAXINDEX, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Index of highest value over a specified period", /* hint */ + "MaxIndex", /* CamelCase name */ + 0 /* flags */ + ); +/* MAXINDEX END */ + +/* MEDPRICE BEGIN */ +static const TA_InputParameterInfo *TA_MEDPRICE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_MEDPRICE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MEDPRICE_OptInputs[] = { NULL }; + +DEF_FUNCTION( MEDPRICE, /* name */ + TA_GroupId_PriceTransform, /* groupId */ + "Median Price", /* hint */ + "MedPrice", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); + +/* MEDPRICE END */ + +/* MFI BEGIN */ +static const TA_InputParameterInfo *TA_MFI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLCV, + NULL +}; + +static const TA_OutputParameterInfo *TA_MFI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MFI_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MFI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Money Flow Index", /* hint */ + "Mfi", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* MFI END */ + +/* MIDPRICE BEGIN */ +static const TA_InputParameterInfo *TA_MIDPRICE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_MIDPRICE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MIDPRICE_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MIDPRICE, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Midpoint Price over period",/* hint */ + "MidPrice", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); + +/* MIDPRICE END */ + +/* MIDPOINT BEGIN */ +static const TA_InputParameterInfo *TA_MIDPOINT_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MIDPOINT_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MIDPOINT_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MIDPOINT, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "MidPoint over period", /* hint */ + "MidPoint", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MIDPOINT END */ + +/* MIN BEGIN */ +static const TA_InputParameterInfo *TA_MIN_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MIN_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MIN_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MIN, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Lowest value over a specified period", /* hint */ + "Min", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MIN END */ + +/* MININDEX BEGIN */ +static const TA_InputParameterInfo *TA_MININDEX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MININDEX_Outputs[] = +{ + &TA_DEF_UI_Output_Integer, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MININDEX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MININDEX, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Index of lowest value over a specified period", /* hint */ + "MinIndex", /* CamelCase name */ + 0 /* flags */ + ); +/* MININDEX END */ + +/* MINMAX BEGIN */ +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Min = + { TA_Output_Real, "outMin", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Max = + { TA_Output_Real, "outMax", TA_OUT_LINE }; + +static const TA_InputParameterInfo *TA_MINMAX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MINMAX_Outputs[] = +{ + &TA_DEF_UI_Output_Real_Min, + &TA_DEF_UI_Output_Real_Max, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MINMAX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MINMAX, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Lowest and highest values over a specified period", /* hint */ + "MinMax", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* MINMAX END */ + +/* MINMAXINDEX BEGIN */ +const TA_OutputParameterInfo TA_DEF_UI_Output_Integer_MinIdx = + { TA_Output_Integer, "outMinIdx", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_Integer_MaxIdx = + { TA_Output_Integer, "outMaxIdx", TA_OUT_LINE }; + +static const TA_InputParameterInfo *TA_MINMAXINDEX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MINMAXINDEX_Outputs[] = +{ + &TA_DEF_UI_Output_Integer_MinIdx, + &TA_DEF_UI_Output_Integer_MaxIdx, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MINMAXINDEX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( MINMAXINDEX, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Indexes of lowest and highest values over a specified period", /* hint */ + "MinMaxIndex", /* CamelCase name */ + 0 /* flags */ + ); +/* MINMAXINDEX END */ + +/* MINUS_DI BEGIN */ +static const TA_InputParameterInfo *TA_MINUS_DI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_MINUS_DI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MINUS_DI_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14, + NULL +}; + +DEF_FUNCTION( MINUS_DI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Minus Directional Indicator", /* hint */ + "MinusDI", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); + +/* MINUS_DI END */ + +/* MINUS_DM BEGIN */ +static const TA_InputParameterInfo *TA_MINUS_DM_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_MINUS_DM_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MINUS_DM_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14, + NULL +}; + +DEF_FUNCTION( MINUS_DM, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Minus Directional Movement", /* hint */ + "MinusDM", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); + +/* MINUS_DM END */ + +/* MOM BEGIN */ +static const TA_InputParameterInfo *TA_MOM_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_MOM_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_MOM_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_10, + NULL +}; + +DEF_FUNCTION( MOM, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Momentum", /* hint */ + "Mom", /* CamelCase name */ + 0 /* flags */ + ); +/* MOM END */ + +/* MULT BEGIN */ +DEF_MATH_BINARY_OPERATOR( MULT, "Vector Arithmetic Mult", "Mult" ) +/* MULT END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableM[] = +{ + ADD_TO_TABLE(MA), + ADD_TO_TABLE(MACD), + ADD_TO_TABLE(MACDEXT), + ADD_TO_TABLE(MACDFIX), + ADD_TO_TABLE(MAMA), + ADD_TO_TABLE(MAVP), + ADD_TO_TABLE(MAX), + ADD_TO_TABLE(MAXINDEX), + ADD_TO_TABLE(MEDPRICE), + ADD_TO_TABLE(MFI), + ADD_TO_TABLE(MIDPOINT), + ADD_TO_TABLE(MIDPRICE), + ADD_TO_TABLE(MIN), + ADD_TO_TABLE(MININDEX), + ADD_TO_TABLE(MINMAX), + ADD_TO_TABLE(MINMAXINDEX), + ADD_TO_TABLE(MINUS_DI), + ADD_TO_TABLE(MINUS_DM), + ADD_TO_TABLE(MOM), + ADD_TO_TABLE(MULT), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableMSize = + ((sizeof(TA_DEF_TableM)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_n.c b/src/ta-lib/src/ta_abstract/tables/table_n.c new file mode 100644 index 000000000..0f0b7a2e8 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_n.c @@ -0,0 +1,127 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'N' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* NATR BEGIN */ +static const TA_InputParameterInfo *TA_NATR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_NATR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_NATR_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14, + NULL +}; + +DEF_FUNCTION( NATR, /* name */ + TA_GroupId_VolatilityIndicators, /* groupId */ + "Normalized Average True Range", /* hint */ + "Natr", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* NATR END */ + +#if 0 +Will be implemented later +/* NVI BEGIN */ +static const TA_InputParameterInfo *TA_NVI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_CV, + NULL +}; + +static const TA_OutputParameterInfo *TA_NVI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_NVI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( NVI, /* name */ + TA_GroupId_VolumeIndicators, /* groupId */ + "Negative Volume Index", /* hint */ + "Nvi", /* CamelCase name */ + 0 /* flags */ + ); + +/* NVI END */ +#endif + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableN[] = +{ + ADD_TO_TABLE(NATR), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableNSize = + ((sizeof(TA_DEF_TableN)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_o.c b/src/ta-lib/src/ta_abstract/tables/table_o.c new file mode 100644 index 000000000..c1000316f --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_o.c @@ -0,0 +1,96 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'O' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* OBV BEGIN */ +static const TA_InputParameterInfo *TA_OBV_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + &TA_DEF_UI_Input_Price_V, + NULL +}; + +static const TA_OutputParameterInfo *TA_OBV_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_OBV_OptInputs[] = +{ NULL }; + +DEF_FUNCTION( OBV, /* name */ + TA_GroupId_VolumeIndicators, /* groupId */ + "On Balance Volume", /* hint */ + "Obv", /* CamelCase name */ + 0 /* flags */ + ); +/* OBV END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableO[] = +{ + ADD_TO_TABLE(OBV), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableOSize = + ((sizeof(TA_DEF_TableO)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_p.c b/src/ta-lib/src/ta_abstract/tables/table_p.c new file mode 100644 index 000000000..e5bbc2252 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_p.c @@ -0,0 +1,186 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'P' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* PLUS_DI BEGIN */ +static const TA_InputParameterInfo *TA_PLUS_DI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_PLUS_DI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_PLUS_DI_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14, + NULL +}; + +DEF_FUNCTION( PLUS_DI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Plus Directional Indicator", /* hint */ + "PlusDI", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); + +/* PLUS_DI END */ + +/* PLUS_DM BEGIN */ +static const TA_InputParameterInfo *TA_PLUS_DM_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_PLUS_DM_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_PLUS_DM_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14, + NULL +}; + +DEF_FUNCTION( PLUS_DM, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Plus Directional Movement", /* hint */ + "PlusDM", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); + +/* PLUS_DM END */ + +/* PPO BEGIN */ +static const TA_InputParameterInfo *TA_PPO_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_PPO_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_PPO_OptInputs[] = +{ &TA_DEF_UI_Fast_Period, + &TA_DEF_UI_Slow_Period, + &TA_DEF_UI_MA_Method, + NULL +}; + +DEF_FUNCTION( PPO, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Percentage Price Oscillator", /* hint */ + "Ppo", /* CamelCase name */ + 0 /* flags */ + ); +/* PPO END */ + +#if 0 +Will be implemented later +/* PVI BEGIN */ +static const TA_InputParameterInfo *TA_PVI_Inputs[] = +{ + &TA_DEF_UI_Input_Price_CV, + NULL +}; + +static const TA_OutputParameterInfo *TA_PVI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_PVI_OptInputs[] = +{ + NULL +}; + +DEF_FUNCTION( PVI, /* name */ + TA_GroupId_VolumeIndicators, /* groupId */ + "Positive Volume Index", /* hint */ + "Pvi", /* CamelCase name */ + 0 /* flags */ + ); + +/* PVI END */ +#endif + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableP[] = +{ + ADD_TO_TABLE(PLUS_DI), + ADD_TO_TABLE(PLUS_DM), + ADD_TO_TABLE(PPO), + /* ADD_TO_TABLE(PVI),*/ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TablePSize = + ((sizeof(TA_DEF_TableP)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_q.c b/src/ta-lib/src/ta_abstract/tables/table_q.c new file mode 100644 index 000000000..29de52ab6 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_q.c @@ -0,0 +1,72 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'Q' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* None */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableQ[] = +{ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableQSize = + ((sizeof(TA_DEF_TableQ)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_r.c b/src/ta-lib/src/ta_abstract/tables/table_r.c new file mode 100644 index 000000000..732e320c0 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_r.c @@ -0,0 +1,206 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'R' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* ROC BEGIN */ +static const TA_InputParameterInfo *TA_ROC_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_ROC_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ROC_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_10, + NULL +}; + +DEF_FUNCTION( ROC, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Rate of change : ((price/prevPrice)-1)*100", /* hint */ + "Roc", /* CamelCase name */ + 0 /* flags */ + ); +/* ROC END */ + +/* ROCP BEGIN */ +static const TA_InputParameterInfo *TA_ROCP_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_ROCP_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ROCP_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_10, + NULL +}; + +DEF_FUNCTION( ROCP, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Rate of change Percentage: (price-prevPrice)/prevPrice", /* hint */ + "RocP", /* CamelCase name */ + 0 /* flags */ + ); +/* ROCP END */ + +/* ROCR BEGIN */ +static const TA_InputParameterInfo *TA_ROCR_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_ROCR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ROCR_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_10, + NULL +}; + +DEF_FUNCTION( ROCR, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Rate of change ratio: (price/prevPrice)", /* hint */ + "RocR", /* CamelCase name */ + 0 /* flags */ + ); +/* ROCR END */ + +/* ROCR100 BEGIN */ +static const TA_InputParameterInfo *TA_ROCR100_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_ROCR100_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ROCR100_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_10, + NULL +}; + +DEF_FUNCTION( ROCR100, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Rate of change ratio 100 scale: (price/prevPrice)*100", /* hint */ + "RocR100", /* CamelCase name */ + 0 /* flags */ + ); +/* ROCR100 END */ + +/* RSI BEGIN */ +static const TA_InputParameterInfo *TA_RSI_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_RSI_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_RSI_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( RSI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Relative Strength Index", /* hint */ + "Rsi", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* RSI END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableR[] = +{ + ADD_TO_TABLE(ROC), + ADD_TO_TABLE(ROCP), + ADD_TO_TABLE(ROCR), + ADD_TO_TABLE(ROCR100), + ADD_TO_TABLE(RSI), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableRSize = + ((sizeof(TA_DEF_TableR)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_s.c b/src/ta-lib/src/ta_abstract/tables/table_s.c new file mode 100644 index 000000000..37423e701 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_s.c @@ -0,0 +1,630 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'S' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* SAR BEGIN */ +static const TA_RealRange TA_DEF_AccelerationFactor = +{ + 0.0, /* min */ + TA_REAL_MAX, /* max */ + 4, /* precision */ + 0.01, /* suggested start */ + 0.20, /* suggested end */ + 0.01 /* suggested increment */ +}; + +static const TA_RealRange TA_DEF_AccelerationMax = +{ + 0.0, /* min */ + TA_REAL_MAX, /* max */ + 4, /* precision */ + 0.20, /* suggested start */ + 0.40, /* suggested end */ + 0.01 /* suggested increment */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationFactor = +{ + TA_OptInput_RealRange, /* type */ + "optInAcceleration", /* paramName */ + 0, /* flags */ + + "Acceleration Factor", /* displayName */ + (const void *)&TA_DEF_AccelerationFactor, /* dataSet */ + 0.02, /* defaultValue */ + "Acceleration Factor used up to the Maximum value", /* hint */ + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationMaximum = +{ + TA_OptInput_RealRange, /* type */ + "optInMaximum", /* paramName */ + 0, /* flags */ + + "AF Maximum", /* displayName */ + (const void *)&TA_DEF_AccelerationMax, /* dataSet */ + 0.20, /* defaultValue */ + "Acceleration Factor Maximum value", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_InputParameterInfo *TA_SAR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_SAR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_SAR_OptInputs[] = +{ &TA_DEF_UI_D_AccelerationFactor, + &TA_DEF_UI_D_AccelerationMaximum, + NULL +}; + +DEF_FUNCTION( SAR, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Parabolic SAR", /* hint */ + "Sar", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); + +/* SAR END */ + +/* SAREXT BEGIN */ +static const TA_RealRange TA_DEF_AccelerationInit = +{ + 0.0, /* min */ + TA_REAL_MAX, /* max */ + 4, /* precision */ + 0.01, /* suggested start */ + 0.19, /* suggested end */ + 0.01 /* suggested increment */ +}; + +static const TA_RealRange TA_DEF_SARStartValue = +{ + TA_REAL_MIN, /* min */ + TA_REAL_MAX, /* max */ + 4, /* precision */ + 0, /* suggested start */ + 0, /* suggested end */ + 0 /* suggested increment */ +}; + +static const TA_RealRange TA_DEF_SAROffsetOnReverse = +{ + 0.0, /* min */ + TA_REAL_MAX, /* max */ + 4, /* precision */ + 0.01, /* suggested start */ + 0.15, /* suggested end */ + 0.01 /* suggested increment */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_StartValue = +{ + TA_OptInput_RealRange, /* type */ + "optInStartValue", /* paramName */ + 0, /* flags */ + + "Start Value", /* displayName */ + (const void *)&TA_DEF_SARStartValue, /* dataSet */ + 0.0, /* defaultValue */ + "Start value and direction. 0 for Auto, >0 for Long, <0 for Short", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_OffsetOnReverse = +{ + TA_OptInput_RealRange, /* type */ + "optInOffsetOnReverse", /* paramName */ + 0, /* flags */ + + "Offset on Reverse", /* displayName */ + (const void *)&TA_DEF_SAROffsetOnReverse, /* dataSet */ + 0.0, /* defaultValue */ + "Percent offset added/removed to initial stop on short/long reversal", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationInitLong = +{ + TA_OptInput_RealRange, /* type */ + "optInAccelerationInitLong", /* paramName */ + 0, /* flags */ + + "AF Init Long", /* displayName */ + (const void *)&TA_DEF_AccelerationInit, /* dataSet */ + 0.02, /* defaultValue */ + "Acceleration Factor initial value for the Long direction", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationLong = +{ + TA_OptInput_RealRange, /* type */ + "optInAccelerationLong", /* paramName */ + 0, /* flags */ + + "AF Long", /* displayName */ + (const void *)&TA_DEF_AccelerationFactor, /* dataSet */ + 0.02, /* defaultValue */ + "Acceleration Factor for the Long direction", /* hint */ + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationMaxLong = +{ + TA_OptInput_RealRange, /* type */ + "optInAccelerationMaxLong", /* paramName */ + 0, /* flags */ + + "AF Max Long", /* displayName */ + (const void *)&TA_DEF_AccelerationMax, /* dataSet */ + 0.20, /* defaultValue */ + "Acceleration Factor maximum value for the Long direction", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationInitShort = +{ + TA_OptInput_RealRange, /* type */ + "optInAccelerationInitShort", /* paramName */ + 0, /* flags */ + + "AF Init Short", /* displayName */ + (const void *)&TA_DEF_AccelerationInit, /* dataSet */ + 0.02, /* defaultValue */ + "Acceleration Factor initial value for the Short direction", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationShort = +{ + TA_OptInput_RealRange, /* type */ + "optInAccelerationShort", /* paramName */ + 0, /* flags */ + + "AF Short", /* displayName */ + (const void *)&TA_DEF_AccelerationFactor, /* dataSet */ + 0.02, /* defaultValue */ + "Acceleration Factor for the Short direction", /* hint */ + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationMaxShort = +{ + TA_OptInput_RealRange, /* type */ + "optInAccelerationMaxShort", /* paramName */ + 0, /* flags */ + + "AF Max Short", /* displayName */ + (const void *)&TA_DEF_AccelerationMax, /* dataSet */ + 0.20, /* defaultValue */ + "Acceleration Factor maximum value for the Short direction", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_InputParameterInfo *TA_SAREXT_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HL, + NULL +}; + +static const TA_OutputParameterInfo *TA_SAREXT_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_SAREXT_OptInputs[] = +{ &TA_DEF_UI_D_StartValue, + &TA_DEF_UI_D_OffsetOnReverse, + &TA_DEF_UI_D_AccelerationInitLong, + &TA_DEF_UI_D_AccelerationLong, + &TA_DEF_UI_D_AccelerationMaxLong, + &TA_DEF_UI_D_AccelerationInitShort, + &TA_DEF_UI_D_AccelerationShort, + &TA_DEF_UI_D_AccelerationMaxShort, + NULL +}; + +DEF_FUNCTION( SAREXT, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Parabolic SAR - Extended", /* hint */ + "SarExt", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); + +/* SAREXT END */ + + +/* SIN BEGIN */ +DEF_MATH_UNARY_OPERATOR( SIN, "Vector Trigonometric Sin", "Sin" ) +/* SIN END */ + +/* SINH BEGIN */ +DEF_MATH_UNARY_OPERATOR( SINH, "Vector Trigonometric Sinh", "Sinh" ) +/* SINH END */ + +/* SMA BEGIN */ +static const TA_InputParameterInfo *TA_SMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_SMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_SMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( SMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Simple Moving Average", /* hint */ + "Sma", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); + +/* SMA END */ + +/* SQRT BEGIN */ +DEF_MATH_UNARY_OPERATOR( SQRT, "Vector Square Root", "Sqrt" ) +/* SQRT END */ + +/* SUB BEGIN */ +DEF_MATH_BINARY_OPERATOR( SUB, "Vector Arithmetic Subtraction", "Sub" ) +/* SUB END */ + +/* SUM BEGIN */ +static const TA_InputParameterInfo *TA_SUM_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_SUM_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_SUM_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( SUM, /* name */ + TA_GroupId_MathOperators, /* groupId */ + "Summation", /* hint */ + "Sum", /* CamelCase name */ + 0 /* flags */ + ); +/* SUM END */ + +/* STDDEV BEGIN */ +static const TA_InputParameterInfo *TA_STDDEV_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_STDDEV_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_STDDEV_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_5_MINIMUM2, + &TA_DEF_UI_NbDeviation, + NULL +}; + +DEF_FUNCTION( STDDEV, /* name */ + TA_GroupId_Statistic, /* groupId */ + "Standard Deviation", /* hint */ + "StdDev", /* CamelCase name */ + 0 /* flags */ + ); +/* STDDEV END */ + +/* STOCH BEGIN */ +static const TA_OptInputParameterInfo TA_DEF_UI_FastK_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInFastK_Period", /* paramName */ + 0, /* flags */ + + "Fast-K Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 5, /* defaultValue */ + "Time period for building the Fast-K line", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_SlowK_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInSlowK_Period", /* paramName */ + 0, /* flags */ + + "Slow-K Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 3, /* defaultValue */ + "Smoothing for making the Slow-K line. Usually set to 3", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_OptInputParameterInfo TA_DEF_UI_SlowD_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInSlowD_Period", /* paramName */ + 0, /* flags */ + + "Slow-D Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 3, /* defaultValue */ + "Smoothing for making the Slow-D line", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_SlowK_MAType = +{ + TA_OptInput_IntegerList, /* type */ + "optInSlowK_MAType", /* paramName */ + 0, /* flags */ + + "Slow-K MA", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average for Slow-K", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_SlowD_MAType = +{ + TA_OptInput_IntegerList, /* type */ + "optInSlowD_MAType", /* paramName */ + 0, /* flags */ + + "Slow-D MA", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average for Slow-D", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OutputParameterInfo TA_DEF_UI_Output_SlowK = + { TA_Output_Real, "outSlowK", TA_OUT_DASH_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_SlowD = + { TA_Output_Real, "outSlowD", TA_OUT_DASH_LINE }; + +static const TA_InputParameterInfo *TA_STOCH_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_STOCH_Outputs[] = +{ + &TA_DEF_UI_Output_SlowK, + &TA_DEF_UI_Output_SlowD, + NULL +}; + +static const TA_OptInputParameterInfo *TA_STOCH_OptInputs[] = +{ &TA_DEF_UI_FastK_Period, + &TA_DEF_UI_SlowK_Period, + &TA_DEF_UI_SlowK_MAType, + &TA_DEF_UI_SlowD_Period, + &TA_DEF_UI_SlowD_MAType, + NULL +}; + +DEF_FUNCTION( STOCH, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Stochastic", /* hint */ + "Stoch", /* CamelCase name */ + 0 /* flags */ + ); +/* STOCH END */ + +/* STOCHF BEGIN */ +static const TA_OptInputParameterInfo TA_DEF_UI_FastD_Period = +{ + TA_OptInput_IntegerRange, /* type */ + "optInFastD_Period", /* paramName */ + 0, /* flags */ + + "Fast-D Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 3, /* defaultValue */ + "Smoothing for making the Fast-D line. Usually set to 3", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_FastD_MAType = +{ + TA_OptInput_IntegerList, /* type */ + "optInFastD_MAType", /* paramName */ + 0, /* flags */ + + "Fast-D MA", /* displayName */ + (const void *)&TA_MA_TypeList, /* dataSet */ + 0, /* defaultValue = simple average */ + "Type of Moving Average for Fast-D", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OutputParameterInfo TA_DEF_UI_Output_FastK = + { TA_Output_Real, "outFastK", TA_OUT_LINE }; + +const TA_OutputParameterInfo TA_DEF_UI_Output_FastD = + { TA_Output_Real, "outFastD", TA_OUT_LINE }; + +static const TA_InputParameterInfo *TA_STOCHF_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_STOCHF_Outputs[] = +{ + &TA_DEF_UI_Output_FastK, + &TA_DEF_UI_Output_FastD, + NULL +}; + +static const TA_OptInputParameterInfo *TA_STOCHF_OptInputs[] = +{ &TA_DEF_UI_FastK_Period, + &TA_DEF_UI_FastD_Period, + &TA_DEF_UI_FastD_MAType, + NULL +}; + +DEF_FUNCTION( STOCHF, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Stochastic Fast", /* hint */ + "StochF", /* CamelCase name */ + 0 /* flags */ + ); +/* STOCHF END */ + +/* STOCHRSI BEGIN */ +static const TA_InputParameterInfo *TA_STOCHRSI_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_STOCHRSI_Outputs[] = +{ + &TA_DEF_UI_Output_FastK, + &TA_DEF_UI_Output_FastD, + NULL +}; + +static const TA_OptInputParameterInfo *TA_STOCHRSI_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_14_MINIMUM2, + &TA_DEF_UI_FastK_Period, + &TA_DEF_UI_FastD_Period, + &TA_DEF_UI_FastD_MAType, + NULL +}; + +DEF_FUNCTION( STOCHRSI, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Stochastic Relative Strength Index", /* hint */ + "StochRsi", /* CamelCase name */ + TA_FUNC_FLG_UNST_PER /* flags */ + ); + +/* STOCHRSI END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableS[] = +{ + ADD_TO_TABLE(SAR), + ADD_TO_TABLE(SAREXT), + ADD_TO_TABLE(SIN), + ADD_TO_TABLE(SINH), + ADD_TO_TABLE(SMA), + ADD_TO_TABLE(SQRT), + ADD_TO_TABLE(STDDEV), + ADD_TO_TABLE(STOCH), + ADD_TO_TABLE(STOCHF), + ADD_TO_TABLE(STOCHRSI), + ADD_TO_TABLE(SUB), + ADD_TO_TABLE(SUM), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableSSize = + ((sizeof(TA_DEF_TableS)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_t.c b/src/ta-lib/src/ta_abstract/tables/table_t.c new file mode 100644 index 000000000..44f0b9701 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_t.c @@ -0,0 +1,277 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'T' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* T3 BEGIN */ +static const TA_OptInputParameterInfo TA_DEF_UI_VFactor = +{ + TA_OptInput_RealRange, /* type */ + "optInVFactor", /* paramName */ + 0, /* flags */ + + "Volume Factor", /* displayName */ + (const void *)&TA_DEF_ZeroToOne, /* dataSet */ + 0.7, /* defaultValue */ + "Volume Factor", /* hint */ + NULL /* CamelCase name */ +}; + +static const TA_InputParameterInfo *TA_T3_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_T3_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_T3_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_5_MINIMUM2, + &TA_DEF_UI_VFactor, + NULL +}; + +DEF_FUNCTION( T3, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Triple Exponential Moving Average (T3)", /* hint */ + "T3", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP|TA_FUNC_FLG_UNST_PER /* flags */ + ); +/* T3 END */ + +/* TAN BEGIN */ +DEF_MATH_UNARY_OPERATOR( TAN, "Vector Trigonometric Tan", "Tan" ) +/* TAN END */ + +/* TANH BEGIN */ +DEF_MATH_UNARY_OPERATOR( TANH, "Vector Trigonometric Tanh", "Tanh" ) +/* TANH END */ + +/* TEMA BEGIN */ +static const TA_InputParameterInfo *TA_TEMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_TEMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_TEMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( TEMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Triple Exponential Moving Average", /* hint */ + "Tema", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* TEMA END */ + +/* TRANGE BEGIN */ +static const TA_InputParameterInfo *TA_TRANGE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_TRANGE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_TRANGE_OptInputs[] = { NULL }; + +DEF_FUNCTION( TRANGE, /* name */ + TA_GroupId_VolatilityIndicators, /* groupId */ + "True Range", /* hint */ + "TrueRange", /* CamelCase name */ + 0 /* flags */ + ); +/* TRANGE END */ + +/* TRIMA BEGIN */ +static const TA_InputParameterInfo *TA_TRIMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_TRIMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_TRIMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( TRIMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Triangular Moving Average", /* hint */ + "Trima", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* TRIMA END */ + +/* TRIX BEGIN */ +static const TA_InputParameterInfo *TA_TRIX_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_TRIX_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_TRIX_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30, + NULL +}; + +DEF_FUNCTION( TRIX, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "1-day Rate-Of-Change (ROC) of a Triple Smooth EMA", /* hint */ + "Trix", /* CamelCase name */ + 0 /* flags */ + ); +/* TRIX END */ + +/* TSF BEGIN */ +static const TA_InputParameterInfo *TA_TSF_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_TSF_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_TSF_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( TSF, /* name */ + TA_GroupId_Statistic, /* groupId */ + "Time Series Forecast",/* hint */ + "Tsf", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* TSF END */ + +/* TYPPRICE BEGIN */ +static const TA_InputParameterInfo *TA_TYPPRICE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_TYPPRICE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_TYPPRICE_OptInputs[] = { NULL }; + +DEF_FUNCTION( TYPPRICE, /* name */ + TA_GroupId_PriceTransform, /* groupId */ + "Typical Price", /* hint */ + "TypPrice", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* TYPPRICE END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableT[] = +{ + ADD_TO_TABLE(T3), + ADD_TO_TABLE(TAN), + ADD_TO_TABLE(TANH), + ADD_TO_TABLE(TEMA), + ADD_TO_TABLE(TRANGE), + ADD_TO_TABLE(TRIMA), + ADD_TO_TABLE(TRIX), + ADD_TO_TABLE(TSF), + ADD_TO_TABLE(TYPPRICE), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableTSize = + ((sizeof(TA_DEF_TableT)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_u.c b/src/ta-lib/src/ta_abstract/tables/table_u.c new file mode 100644 index 000000000..06147a037 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_u.c @@ -0,0 +1,142 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'U' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* ULTOSC BEGIN */ +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_7_PER1 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod1", /* paramName */ + 0, /* flags */ + + "First Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 7, /* defaultValue */ + "Number of bars for 1st period.", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_PER2 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod2", /* paramName */ + 0, /* flags */ + + "Second Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 14, /* defaultValue */ + "Number of bars fro 2nd period", /* hint */ + + NULL /* CamelCase name */ +}; + +const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_28_PER3 = +{ + TA_OptInput_IntegerRange, /* type */ + "optInTimePeriod3", /* paramName */ + 0, /* flags */ + + "Third Period", /* displayName */ + (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ + 28, /* defaultValue */ + "Number of bars for 3rd period", /* hint */ + + NULL /* CamelCase name */ +}; + +static const TA_InputParameterInfo *TA_ULTOSC_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_ULTOSC_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_ULTOSC_OptInputs[] = +{ + &TA_DEF_UI_TimePeriod_7_PER1, + &TA_DEF_UI_TimePeriod_14_PER2, + &TA_DEF_UI_TimePeriod_28_PER3, + NULL +}; + +DEF_FUNCTION( ULTOSC, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Ultimate Oscillator", /* hint */ + "UltOsc", /* CamelCase name */ + 0 /* flags */ + ); +/* ULTOSC END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableU[] = +{ + ADD_TO_TABLE(ULTOSC), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableUSize = + ((sizeof(TA_DEF_TableU)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_v.c b/src/ta-lib/src/ta_abstract/tables/table_v.c new file mode 100644 index 000000000..9865afce4 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_v.c @@ -0,0 +1,98 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'V' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* VAR BEGIN */ +static const TA_InputParameterInfo *TA_VAR_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_VAR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_VAR_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_5, + &TA_DEF_UI_NbDeviation, + NULL +}; + +DEF_FUNCTION( VAR, /* name */ + TA_GroupId_Statistic, /* groupId */ + "Variance", /* hint */ + "Variance", /* CamelCase name */ + 0 /* flags */ + ); +/* VAR END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableV[] = +{ + ADD_TO_TABLE(VAR), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableVSize = + ((sizeof(TA_DEF_TableV)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_w.c b/src/ta-lib/src/ta_abstract/tables/table_w.c new file mode 100644 index 000000000..8875f8ce6 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_w.c @@ -0,0 +1,149 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'W' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* WCL BEGIN */ +static const TA_InputParameterInfo *TA_WCLPRICE_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_WCLPRICE_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_WCLPRICE_OptInputs[] = { NULL }; + +DEF_FUNCTION( WCLPRICE, /* name */ + TA_GroupId_PriceTransform, /* groupId */ + "Weighted Close Price", /* hint */ + "WclPrice", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); +/* WCL END */ + +/* WILLR BEGIN */ +static const TA_InputParameterInfo *TA_WILLR_Inputs[] = +{ + &TA_DEF_UI_Input_Price_HLC, + NULL +}; + +static const TA_OutputParameterInfo *TA_WILLR_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_WILLR_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, + NULL +}; + +DEF_FUNCTION( WILLR, /* name */ + TA_GroupId_MomentumIndicators, /* groupId */ + "Williams' %R", /* hint */ + "WillR", /* CamelCase name */ + 0 /* flags */ + ); +/* WILLR END */ + +/* WMA BEGIN */ +static const TA_InputParameterInfo *TA_WMA_Inputs[] = +{ + &TA_DEF_UI_Input_Real, + NULL +}; + +static const TA_OutputParameterInfo *TA_WMA_Outputs[] = +{ + &TA_DEF_UI_Output_Real, + NULL +}; + +static const TA_OptInputParameterInfo *TA_WMA_OptInputs[] = +{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, + NULL +}; + +DEF_FUNCTION( WMA, /* name */ + TA_GroupId_OverlapStudies, /* groupId */ + "Weighted Moving Average", /* hint */ + "Wma", /* CamelCase name */ + TA_FUNC_FLG_OVERLAP /* flags */ + ); + +/* WMA END */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableW[] = +{ + ADD_TO_TABLE(WCLPRICE), + ADD_TO_TABLE(WILLR), + ADD_TO_TABLE(WMA), + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableWSize = + ((sizeof(TA_DEF_TableW)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_x.c b/src/ta-lib/src/ta_abstract/tables/table_x.c new file mode 100644 index 000000000..136dded8b --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_x.c @@ -0,0 +1,72 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'X' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* None */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableX[] = +{ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableXSize = + ((sizeof(TA_DEF_TableX)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_y.c b/src/ta-lib/src/ta_abstract/tables/table_y.c new file mode 100644 index 000000000..f80eca692 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_y.c @@ -0,0 +1,72 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'Y' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* None */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableY[] = +{ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableYSize = + ((sizeof(TA_DEF_TableY)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_z.c b/src/ta-lib/src/ta_abstract/tables/table_z.c new file mode 100644 index 000000000..1586082b1 --- /dev/null +++ b/src/ta-lib/src/ta_abstract/tables/table_z.c @@ -0,0 +1,72 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/********************************************************************* + * This file contains only TA functions starting with the letter 'Z' * + *********************************************************************/ +#include +#include "ta_abstract.h" +#include "ta_def_ui.h" + +/* Follow the 3 steps defined below for adding a new TA Function to this + * file. + */ + +/**************************************************************************** + * Step 1 - Define here the interface to your TA functions with + * the macro DEF_FUNCTION. + * + ****************************************************************************/ + +/* None */ + +/**************************************************************************** + * Step 2 - Add your TA function to the table. + * Keep in alphabetical order. Must be NULL terminated. + ****************************************************************************/ +const TA_FuncDef *TA_DEF_TableZ[] = +{ + NULL +}; + + +/* Do not modify the following line. */ +const unsigned int TA_DEF_TableZSize = + ((sizeof(TA_DEF_TableZ)/sizeof(TA_FuncDef *))-1); + + +/**************************************************************************** + * Step 3 - Make sure "gen_code" is executed for generating all other + * source files derived from this one. + * You can then re-compile the library as usual and you are done! + ****************************************************************************/ diff --git a/src/ta-lib/src/ta_common/Makefile.am b/src/ta-lib/src/ta_common/Makefile.am new file mode 100644 index 000000000..509a8c6dd --- /dev/null +++ b/src/ta-lib/src/ta_common/Makefile.am @@ -0,0 +1,13 @@ + +noinst_LTLIBRARIES = libta_common.la +AM_CPPFLAGS = -I../ta_common/ + +libta_common_la_SOURCES = ta_global.c \ + ta_retcode.c \ + ta_version.c + +libta_commondir=$(includedir)/ta-lib/ +libta_common_HEADERS = ../../include/ta_defs.h \ + ../../include/ta_libc.h \ + ../../include/ta_common.h + diff --git a/src/ta-lib/src/ta_common/ta_global.c b/src/ta-lib/src/ta_common/ta_global.c new file mode 100644 index 000000000..53965cfb8 --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_global.c @@ -0,0 +1,178 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 082004 AC Add TA_SetCandleSettings, TA_RestoreCandleDefaultSettings + * and call to TA_RestoreCandleDefaultSettings in TA_Initialize + * 041106 MF Add prefix to theGlobals to avoid clash with other libs. + * 040707 MF Change global initialization to eliminate Mac OS X link error. + */ + +/* Description: + * Provides initialization / shutdown functionality for all modules. + */ + +/**** Headers ****/ +#include +#include +#include + +#include "ta_common.h" +#include "ta_magic_nb.h" +#include "ta_global.h" +#include "ta_func.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ + +/* The entry point for all globals */ +TA_LibcPriv ta_theGlobals = {0,{{0,0,0}},0,0,0,0,(TA_Compatibility)0,{0},{{(TA_CandleSettingType)0,(TA_RangeType)0,0,0}}}; + +TA_LibcPriv *TA_Globals = &ta_theGlobals; + +/**** Local declarations. ****/ +/* None */ + +/**** Local functions declarations. ****/ +/* None */ + +/**** Local variables definitions. ****/ +/* None */ + +/**** Global functions definitions. ****/ +TA_RetCode TA_Initialize( void ) +{ + /* Initialize the "global variable" used to manage the global + * variables of all other modules... + */ + memset( TA_Globals, 0, sizeof( TA_LibcPriv ) ); + TA_Globals->magicNb = TA_LIBC_PRIV_MAGIC_NB; + + /*** At this point, TA_Shutdown can be called to clean-up. ***/ + + /* Set the default value to global variables */ + TA_RestoreCandleDefaultSettings( TA_AllCandleSettings ); + + return TA_SUCCESS; +} + +TA_RetCode TA_Shutdown( void ) +{ + if( TA_Globals->magicNb != TA_LIBC_PRIV_MAGIC_NB ) + return TA_LIB_NOT_INITIALIZE; + + /* Initialize to all zero to make sure we invalidate that object. */ + memset( TA_Globals, 0, sizeof( TA_LibcPriv ) ); + + return TA_SUCCESS; +} + +TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, + TA_RangeType rangeType, + int avgPeriod, + double factor ) +{ + /*printf("setcdlset:%d ",settingType);*/ + if( settingType >= TA_AllCandleSettings ) + return TA_BAD_PARAM; + TA_Globals->candleSettings[settingType].settingType = settingType; + TA_Globals->candleSettings[settingType].rangeType = rangeType; + TA_Globals->candleSettings[settingType].avgPeriod = avgPeriod; + TA_Globals->candleSettings[settingType].factor = factor; + /*printf("cdlset: %d %d %d %f\n",TA_Globals->candleSettings[settingType].settingType,TA_Globals->candleSettings[settingType].rangeType, + TA_Globals->candleSettings[settingType].avgPeriod,TA_Globals->candleSettings[settingType].factor);*/ + return TA_SUCCESS; +} + +TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType ) +{ + const TA_CandleSetting TA_CandleDefaultSettings[] = { + /* real body is long when it's longer than the average of the 10 previous candles' real body */ + { TA_BodyLong, TA_RangeType_RealBody, 10, 1.0 }, + /* real body is very long when it's longer than 3 times the average of the 10 previous candles' real body */ + { TA_BodyVeryLong, TA_RangeType_RealBody, 10, 3.0 }, + /* real body is short when it's shorter than the average of the 10 previous candles' real bodies */ + { TA_BodyShort, TA_RangeType_RealBody, 10, 1.0 }, + /* real body is like doji's body when it's shorter than 10% the average of the 10 previous candles' high-low range */ + { TA_BodyDoji, TA_RangeType_HighLow, 10, 0.1 }, + /* shadow is long when it's longer than the real body */ + { TA_ShadowLong, TA_RangeType_RealBody, 0, 1.0 }, + /* shadow is very long when it's longer than 2 times the real body */ + { TA_ShadowVeryLong, TA_RangeType_RealBody, 0, 2.0 }, + /* shadow is short when it's shorter than half the average of the 10 previous candles' sum of shadows */ + { TA_ShadowShort, TA_RangeType_Shadows, 10, 1.0 }, + /* shadow is very short when it's shorter than 10% the average of the 10 previous candles' high-low range */ + { TA_ShadowVeryShort, TA_RangeType_HighLow, 10, 0.1 }, + /* when measuring distance between parts of candles or width of gaps */ + /* "near" means "<= 20% of the average of the 5 previous candles' high-low range" */ + { TA_Near, TA_RangeType_HighLow, 5, 0.2 }, + /* when measuring distance between parts of candles or width of gaps */ + /* "far" means ">= 60% of the average of the 5 previous candles' high-low range" */ + { TA_Far, TA_RangeType_HighLow, 5, 0.6 }, + /* when measuring distance between parts of candles or width of gaps */ + /* "equal" means "<= 5% of the average of the 5 previous candles' high-low range" */ + { TA_Equal, TA_RangeType_HighLow, 5, 0.05 } + }; + + int i; + if( settingType > TA_AllCandleSettings ) + return TA_BAD_PARAM; + if( settingType == TA_AllCandleSettings ) + for( i = 0; i < TA_AllCandleSettings; ++i ) + TA_Globals->candleSettings[i] = TA_CandleDefaultSettings[i]; + else + TA_Globals->candleSettings[settingType] = TA_CandleDefaultSettings[settingType]; + return TA_SUCCESS; +} + +/**** Local functions definitions. ****/ +/* None */ + + diff --git a/src/ta-lib/src/ta_common/ta_global.h b/src/ta-lib/src/ta_common/ta_global.h new file mode 100644 index 000000000..3cdfcf653 --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_global.h @@ -0,0 +1,119 @@ +#ifndef TA_GLOBAL_H +#define TA_GLOBAL_H + +#ifndef TA_COMMON_H + #include "ta_common.h" +#endif + +#ifndef TA_FUNC_H + #include "ta_func.h" +#endif + +/* TA_CandleSetting is the one setting struct */ +typedef struct { + TA_CandleSettingType settingType; + TA_RangeType rangeType; + int avgPeriod; + double factor; +} TA_CandleSetting; + +/* This interface is used exclusively INTERNALY to the TA-LIB. + * There is nothing for the end-user here ;-> + */ + +/* Provides functionality for managing global ressource + * throughout the TA-LIB. + * + * Since not all module are used/link in the application, + * the ta_common simply provides the mechanism for the module + * to optionnaly "register" its initialization/shutdown + * function. + * + * A function shall access its global variable by calling + * TA_GetGlobal. This function will appropriatly call the + * initialization function if its global are not yet initialized. + * + * The call of the init and shutdown function are guaranteed + * to be multithread protected. It is also guarantee that + * these function will always get called in alternance (in + * other word, following an initialization only a shutdown + * can get called). + */ + +typedef enum +{ + /* Module will be shutdown in the order specified here. */ + + TA_ABSTRACTION_GLOBAL_ID, + TA_FUNC_GLOBAL_ID, + TA_MEMORY_GLOBAL_ID, /* Must be last. */ + TA_NB_GLOBAL_ID +} TA_GlobalModuleId; + +typedef TA_RetCode (*TA_GlobalInitFunc) ( void **globalToAlloc ); +typedef TA_RetCode (*TA_GlobalShutdownFunc)( void *globalAllocated ); + +typedef struct +{ + const TA_GlobalModuleId id; + const TA_GlobalInitFunc init; + const TA_GlobalShutdownFunc shutdown; +} TA_GlobalControl; + +TA_RetCode TA_GetGlobal( const TA_GlobalControl * const control, + void **global ); + +/* Occasionaly, code tracing must be disable. + * Example: + * - The memory module needs to know if the tracing is + * still enabled or not when freeing memory on shutdown. + * - We do not want to recursively trace while the tracing + * function themselves gets called ;-> + */ +int TA_IsTraceEnabled( void ); +void TA_TraceEnable ( void ); +void TA_TraceDisable ( void ); + +/* If enabled by the user, use a local drive + * for configuration and/or temporary file. + * TA-LIB must NEVER assume such local drive + * is available. + */ +const char *TA_GetLocalCachePath( void ); + +typedef struct +{ + unsigned int initialize; + const TA_GlobalControl * control; + void *global; +} TA_ModuleControl; + +/* This is the hidden implementation of TA_Libc. */ +typedef struct +{ + unsigned int magicNb; /* Unique identifier of this object. */ + TA_ModuleControl moduleControl[TA_NB_GLOBAL_ID]; + + unsigned int traceEnabled; + unsigned int stdioEnabled; + FILE *stdioFile; + + const char *localCachePath; + + /* For handling the compatibility with other software */ + TA_Compatibility compatibility; + + /* For handling the unstable period of some TA function. */ + unsigned int unstablePeriod[TA_FUNC_UNST_ALL]; + + /* For handling the candlestick global settings */ + TA_CandleSetting candleSettings[TA_AllCandleSettings]; + +} TA_LibcPriv; + +/* The following global is used all over the place + * and is the entry point for all other globals. + */ +extern TA_LibcPriv *TA_Globals; + +#endif diff --git a/src/ta-lib/src/ta_common/ta_magic_nb.h b/src/ta-lib/src/ta_common/ta_magic_nb.h new file mode 100644 index 000000000..72ac109f4 --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_magic_nb.h @@ -0,0 +1,31 @@ +#ifndef TA_MAGIC_NB_H +#define TA_MAGIC_NB_H + +/* Many allocated structures contains a magic number. + * + * These numbers are used solely to make sure that when a pointer is + * provided, it is really pointing on the expected type of data. + * It helps also for the detection of memory corruption. + * This mechanism is simple, but add a non-negligeable level of + * reliability at a very low cost (speed/memory wise). + */ +#define TA_FUNC_DEF_MAGIC_NB 0xA201B201 +#define TA_PARAM_HOLDER_PRIV_MAGIC_NB 0xA202B202 +#define TA_LIBC_PRIV_MAGIC_NB 0xA203B203 +#define TA_UDBASE_MAGIC_NB 0xA204B204 +#define TA_CATEGORY_TABLE_MAGIC_NB 0xA205B205 +#define TA_SYMBOL_TABLE_MAGIC_NB 0xA206B206 +#define TA_WEBPAGE_MAGIC_NB 0xA207B207 +#define TA_STREAM_MAGIC_NB 0xA208B208 +#define TA_STREAM_ACCESS_MAGIC_NB 0xA209B209 +#define TA_YAHOO_IDX_MAGIC_NB 0xA20AB20A +#define TA_STRING_TABLE_GROUP_MAGIC_NB 0xA20BB20B +#define TA_STRING_TABLE_FUNC_MAGIC_NB 0xA20CB20C +#define TA_MARKET_PAGE_MAGIC_NB 0xA20DB20D +#define TA_TRADELOGPRIV_MAGIC_NB 0xA20EB20E +#define TA_PMPRIV_MAGIC_NB 0xA20FB20F +#define TA_PMREPORT_MAGIC_NB 0xA210B210 +#define TA_TRADEREPORT_MAGIC_NB 0xA211B211 +#define TA_HISTORY_MAGIC_NB 0xA212B212 + +#endif diff --git a/src/ta-lib/src/ta_common/ta_memory.h b/src/ta-lib/src/ta_common/ta_memory.h new file mode 100644 index 000000000..4a5de0278 --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_memory.h @@ -0,0 +1,362 @@ +#ifndef TA_MEMORY_H +#define TA_MEMORY_H + +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) + #ifndef TA_COMMON_H + #include "ta_common.h" + #endif + + #include + + /* Interface macros */ + #define TA_Malloc(a) malloc(a) + #define TA_Realloc(a,b) realloc((a),(b)) + #define TA_Free(a) free(a) + + #define FREE_IF_NOT_NULL(x) { if((x)!=NULL) {TA_Free((void *)(x)); (x)=NULL;} } + +#endif /* !defined(_MANAGED) && !defined( _JAVA ) && !defined( _RUST )*/ + + +/* ARRAY : Macros to manipulate arrays of value type. + * + * Using temporary array of double and integer are often needed for the + * TA functions. + * + * These macros allow basic operations to alloc/copy/free array of value type. + * + * These macros works in plain old C/C++, managed C++.and Java. + * + * (Use ARRAY_REF and ARRAY_INT_REF for double/integer arrays). + */ +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) + #define ARRAY_VTYPE_REF(type,name) SubArray^ name + #define ARRAY_VTYPE_LOCAL(type,name,size) SubArray^ name = gcnew SubArrayFrom1D(gcnew cli::array(size),0) + #define ARRAY_VTYPE_ALLOC(type,name,size) name = gcnew SubArrayFrom1D(gcnew cli::array(size),0) + #define ARRAY_VTYPE_COPY(type,dest,src,size) SubArray::Copy( src, 0, dest, 0, size ) + #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) SubArray::Copy( src, srcIdx, dest, destIdx, size ) + #define ARRAY_VTYPE_FREE(type,name) + #define ARRAY_VTYPE_FREE_COND(type,cond,name) +#elif defined( _MANAGED ) + #define ARRAY_VTYPE_REF(type,name) cli::array^ name + #define ARRAY_VTYPE_LOCAL(type,name,size) cli::array^ name = gcnew cli::array(size) + #define ARRAY_VTYPE_ALLOC(type,name,size) name = gcnew cli::array(size) + #define ARRAY_VTYPE_COPY(type,dest,src,size) cli::array::Copy( src, 0, dest, 0, size ) + #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) cli::array::Copy( src, srcIdx, dest, destIdx, size ) + #define ARRAY_VTYPE_FREE(type,name) + #define ARRAY_VTYPE_FREE_COND(type,cond,name) +#elif defined( _JAVA ) || defined( _RUST ) + #define ARRAY_VTYPE_REF(type,name) type []name + #define ARRAY_VTYPE_LOCAL(type,name,size) type []name = new type[size] + #define ARRAY_VTYPE_ALLOC(type,name,size) name = new type[size] + #define ARRAY_VTYPE_COPY(type,dest,src,size) System.arraycopy(src,0,dest,0,size) + #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) System.arraycopy(src,srcIdx,dest,destIdx,size) + #define ARRAY_VTYPE_FREE(type,name) + #define ARRAY_VTYPE_FREE_COND(type,cond,name) +#else + #define ARRAY_VTYPE_REF(type,name) type *name + #define ARRAY_VTYPE_LOCAL(type,name,size) type name[size] + #define ARRAY_VTYPE_ALLOC(type,name,size) name = (type *)TA_Malloc( sizeof(type)*(size)) + #define ARRAY_VTYPE_COPY(type,dest,src,size) memcpy(dest,src,sizeof(type)*(size)) + #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) memmove( &dest[destIdx], &src[srcIdx], (size)*sizeof(type) ) + #define ARRAY_VTYPE_FREE(type,name) TA_Free(name) + #define ARRAY_VTYPE_FREE_COND(type,cond,name) if( cond ){ TA_Free(name); } +#endif + +/* ARRAY : Macros to manipulate arrays of double. */ +#define ARRAY_REF(name) ARRAY_VTYPE_REF(double,name) +#define ARRAY_LOCAL(name,size) ARRAY_VTYPE_LOCAL(double,name,size) +#define ARRAY_ALLOC(name,size) ARRAY_VTYPE_ALLOC(double,name,size) +#define ARRAY_COPY(dest,src,size) ARRAY_VTYPE_COPY(double,dest,src,size) +#define ARRAY_MEMMOVE(dest,destIdx,src,srcIdx,size) ARRAY_VTYPE_MEMMOVE(double,dest,destIdx,src,srcIdx,size) +#define ARRAY_FREE(name) ARRAY_VTYPE_FREE(double,name) +#define ARRAY_FREE_COND(cond,name) ARRAY_VTYPE_FREE_COND(double,cond,name) + +/* ARRAY : Macros to manipulate arrays of integer. */ +#define ARRAY_INT_REF(name) ARRAY_VTYPE_REF(int,name) +#define ARRAY_INT_LOCAL(name,size) ARRAY_VTYPE_LOCAL(int,name,size) +#define ARRAY_INT_ALLOC(name,size) ARRAY_VTYPE_ALLOC(int,name,size) +#define ARRAY_INT_COPY(dest,src,size) ARRAY_VTYPE_COPY(int,dest,src,size) +#define ARRAY_INT_MEMMOVE(dest,destIdx,src,srcIdx,size) ARRAY_VTYPE_MEMMOVE(int,dest,destIdx,src,srcIdx,size) +#define ARRAY_INT_FREE(name) ARRAY_VTYPE_FREE(int,name) +#define ARRAY_INT_FREE_COND(cond,name) ARRAY_VTYPE_FREE_COND(int,cond,name) + +/* ARRAY: Macros to manipulate arrays of mix type. + * This is just a loop doing an element by element copy. + */ +#define ARRAY_MEMMOVEMIX_VAR int mmmixi, mmmixdestIdx, mmmixsrcIdx +#define ARRAY_MEMMOVEMIX(dest,destIdx,src,srcIdx,size) { \ + for( mmmixi=0, mmmixdestIdx=destIdx, mmmixsrcIdx=srcIdx; \ + mmmixi < size; \ + mmmixi++, mmmixdestIdx++, mmmixsrcIdx++ ) \ + { \ + dest[mmmixdestIdx] = src[mmmixsrcIdx]; \ + } \ + } + +/* Access to "Globals" + * + * The globals here just means that these variables are accessible from + * all technical analysis functions. + * + * Depending of the language/platform, the globals might be in reality + * a private member variable of an object... + */ +#if defined( _MANAGED ) + #define TA_GLOBALS_UNSTABLE_PERIOD(x,y) (Globals->unstablePeriod[(int)(FuncUnstId::y)]) + #define TA_GLOBALS_COMPATIBILITY (Globals->compatibility) +#elif defined( _JAVA ) || defined( _RUST) + #define TA_GLOBALS_UNSTABLE_PERIOD(x,y) (this.unstablePeriod[FuncUnstId.y.ordinal()]) + #define TA_GLOBALS_COMPATIBILITY (this.compatibility) +#else + #define TA_GLOBALS_UNSTABLE_PERIOD(x,y) (TA_Globals->unstablePeriod[x]) + #define TA_GLOBALS_COMPATIBILITY (TA_Globals->compatibility) +#endif + + + +/* CIRCBUF : Circular Buffer Macros. + * + * The CIRCBUF is like a FIFO buffer (First In - First Out), except + * that the rate of data coming out is the same as the rate of + * data coming in (for simplification and speed optimization). + * In other word, when you add one new value, you must also consume + * one value (if not consume, the value is lost). + * + * The CIRCBUF size is unlimited, so it will automatically allocate and + * de-allocate memory as needed. In C/C++. when small enough, CIRCBUF will + * instead use a buffer "allocated" on the stack (automatic variable). + * + * Multiple CIRCBUF can be used within the same function. To make that + * possible the first parameter of the MACRO is an "Id" that can be + * any string. + * + * The macros offer the advantage to work in C/C++ and managed C++. + * + * CIRCBUF_PROLOG(Id,Type,Size); + * Will declare all the needed variables. 2 variables are + * important: + * 1) 'Id' will be a ptr of the specified Type. + * 2) 'Id'_Idx indicates from where to consume and + * to add the data. + * + * Important: You must consume the oldest data before + * setting the new data! + * + * The Size must be reasonable since it might "allocate" + * an array of this size on the stack (each element are 'Type'). + * + * CIRCBUF_CONSTRUCT(Id,Type,Size); + * Must be called prior to use the remaining macros. Must be + * followed by CIRCBUF_DESTROY when leaving the function. + * The Size here can be large. If the static Size specified + * with CIRCBUF_PROLOG is not sufficient, this MACRO will + * allocate a new buffer from the Heap. + * + * CIRCBUF_DESTROY(Id,Size); + * Must be call prior to leave the function. + * + * CIRCBUF_NEXT(Id); + * Move forward the indexes. + * + * Example: + * TA_RetCode MyFunc( int size ) + * { + * CIRCBUF_PROLOG(MyBuf,int,4); + * int i, value; + * ... + * CIRCBUF_CONSTRUCT(MyBuf,int,size); + * ... + * // 1st Loop: Fill MyBuf with initial values + * // (must be done). + * value = 0; + * for( i=0; i < size; i++ ) + * { + * // Set the data + * MyBuf[MyBuf_Idx] = value++; + * CIRCBUF_NEXT(MyBuf); + * } + * + * // 2nd Loop: Get and Add subsequent values + * // in MyBuf (optional) + * for( i=0; i < 3; i++ ) + * { + * // Consume the data (must be done first) + * printf( "%d ", MyBuf[MyBuf_Idx] ); + * + * // Set the new data (must be done second) + * MyBuf[MyBuf_Idx] = value++; + * + * // Move the index forward + * CIRCBUF_NEXT(MyBuf); + * } + * + * // 3rd Loop: Empty MyBuf (optional) + * for( i=0; i < size; i++ ) + * { + * printf( "%d ", MyBuf[MyBuf_Idx] ); + * CIRCBUF_NEXT(MyBuf); + * } + * + * CIRCBUF_DESTROY(MyBuf); + * return TA_SUCCESS; + * } + * + * + * A call to MyFunc(5) will output: + * 0 1 2 3 4 5 6 7 + * + * The value 0 to 4 are added by the 1st loop. + * The value 5 to 7 are added by the 2nd loop. + * + * The value 0 to 2 are displayed by the 2nd loop. + * The value 3 to 7 are displayed by the 3rd loop. + * + * Because the size 5 is greater than the + * value provided in CIRCBUF_PROLOG, a buffer will + * be dynamically allocated (and freed). + */ +#if defined( _MANAGED ) + +#define CIRCBUF_PROLOG(Id,Type,Size) int Id##_Idx = 0; \ + cli::array^ Id; \ + int maxIdx_##Id = (Size-1) + +/* Use this macro instead if the Type is a class or a struct. */ +#define CIRCBUF_PROLOG_CLASS(Id,Type,Size) int Id##_Idx = 0; \ + cli::array^ Id; \ + int maxIdx_##Id = (Size-1) + +#define CIRCBUF_INIT(Id,Type,Size) \ + { \ + if( Size <= 0 ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + Id = gcnew cli::array(Size); \ + if( !Id ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + maxIdx_##Id = (Size-1); \ + } + +#define CIRCBUF_INIT_CLASS(Id,Type,Size) \ + { \ + if( Size <= 0 ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + Id = gcnew cli::array(Size); \ + for( int _##Id##_index=0; _##Id##_indexLength; _##Id##_index++) \ + { \ + Id[_##Id##_index]=gcnew Type(); \ + } \ + if( !Id ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + maxIdx_##Id = (Size-1); \ + } + +#define CIRCBUF_INIT_LOCAL_ONLY(Id,Type) \ + { \ + Id = gcnew cli::array(maxIdx_##Id+1); \ + if( !Id ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + } + +#define CIRCBUF_DESTROY(Id) + +/* Use this macro to access the member when type is a class or a struct. */ +#define CIRCBUF_REF(x) (x)-> + +#elif defined(_JAVA) || defined (_RUST) + +#define CIRCBUF_PROLOG(Id,Type,Size) int Id##_Idx = 0; \ + Type []Id; \ + int maxIdx_##Id = (Size-1) + +/* Use this macro instead if the Type is a class or a struct. */ +#define CIRCBUF_PROLOG_CLASS(Id,Type,Size) int Id##_Idx = 0; \ + Type []Id; \ + int maxIdx_##Id = (Size-1) + +#define CIRCBUF_INIT(Id,Type,Size) \ + { \ + if( Size <= 0 ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + Id = new Type[Size]; \ + maxIdx_##Id = (Size-1); \ + } + +#define CIRCBUF_INIT_CLASS(Id,Type,Size) \ + { \ + if( Size <= 0 ) \ + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ + Id = new Type[Size]; \ + for( int _##Id##_index=0; _##Id##_index (int)(sizeof(local_##Id)/sizeof(Type)) ) \ + { \ + Id = TA_Malloc( sizeof(Type)*Size ); \ + if( !Id ) \ + return TA_ALLOC_ERR; \ + } \ + else \ + Id = &local_##Id[0]; \ + maxIdx_##Id = (Size-1); \ + Id##_Idx = 0; \ + } + +#define CIRCBUF_INIT_CLASS(Id,Type,Size) CIRCBUF_INIT(Id,Type,Size) + +#define CIRCBUF_INIT_LOCAL_ONLY(Id,Type) \ + { \ + Id = &local_##Id[0]; \ + maxIdx_##Id = (int)(sizeof(local_##Id)/sizeof(Type))-1; \ + Id##_Idx = 0; \ + } + +#define CIRCBUF_DESTROY(Id) \ + { \ + if( Id != &local_##Id[0] ) \ + TA_Free( Id ); \ + } + +/* Use this macro to access the member when Type is a class or a struct. */ +#define CIRCBUF_REF(x) (x). + +#endif + +#define CIRCBUF_NEXT(Id) \ + { \ + Id##_Idx++; \ + if( Id##_Idx > maxIdx_##Id ) \ + Id##_Idx = 0; \ + } + + +#endif + diff --git a/src/ta-lib/src/ta_common/ta_pragma.h b/src/ta-lib/src/ta_common/ta_pragma.h new file mode 100644 index 000000000..9b35c7314 --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_pragma.h @@ -0,0 +1,87 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * CM Craig Miller (c-miller@users.sourceforge.net) + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011707 CM First version. + */ + +/* Description: + * + * Visual Studio 2005 has extended the C Run-Time Library by including "secure" + * runtime functions and deprecating the previous function prototypes. Since + * we need to use the previous prototypes to maintain compatibility with other + * platform compilers we are going to disable the deprecation warnings when + * compiling with Visual Studio 2005. + * + * Note: this header must be the first inclusion referenced by the code file + * needing these settings!!!!! + * + */ + +#ifndef TA_PRAGMA_H +#define TA_PRAGMA_H + +#if (_MSC_VER >= 1400) // VC8+ nmake and VS2005 + + #ifndef _CRT_SECURE_NO_DEPRECATE //turn off MS 'safe' CRT library routines + #define _CRT_SECURE_NO_DEPRECATE 1 + #endif + +// There are additional macros that may be needed in the future, so we'll list them here + //#ifndef _CRT_SECURE_NO_WARNINGS //turn off MS 'safe' CRT library routines + // #define _CRT_SECURE_NO_WARNINGS 1 + //#endif + // + //#ifndef _SCL_SECURE_NO_DEPRECATE //turn off MS 'safe' C++RT library routines + // #define _SCL_SECURE_NO_DEPRECATE 1 + //#endif + //#ifndef _SCL_SECURE_NO_WARNINGS + // #define _SCL_SECURE_NO_WARNINGS 1 + //#endif + // + //#ifndef _CRT_NONSTDC_NO_DEPRECATE //turn off MS POSIX replacements library routines + // #define _CRT_NONSTDC_NO_DEPRECATE 1 + //#endif + +#endif // VC8+ + +#endif //TA_PRAGMA_H diff --git a/src/ta-lib/src/ta_common/ta_retcode.c b/src/ta-lib/src/ta_common/ta_retcode.c new file mode 100644 index 000000000..f5600cec1 --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_retcode.c @@ -0,0 +1,109 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Important: This file is automatically generated by the utility gen_code. + * Any modification will be lost on next execution of gen_code. + * + * The goal of this file is to provide the functionality TA_SetRetCodeInfo. + * + * This function is a convenient way for the user to translate a TA_RetCode into + * a human readable string. + */ +#include + +typedef struct +{ + TA_RetCode retCode; + const char * const enumStr; + const char * const infoStr; +} TA_InternalRetCodeInfo; + +static TA_InternalRetCodeInfo retCodeInfoTable[] = { + {(TA_RetCode)0,"TA_SUCCESS","No error"}, + {(TA_RetCode)1,"TA_LIB_NOT_INITIALIZE","TA_Initialize was not sucessfully called"}, + {(TA_RetCode)2,"TA_BAD_PARAM","A parameter is out of range"}, + {(TA_RetCode)3,"TA_ALLOC_ERR","Possibly out-of-memory"}, + {(TA_RetCode)4,"TA_GROUP_NOT_FOUND","No Info"}, + {(TA_RetCode)5,"TA_FUNC_NOT_FOUND","No Info"}, + {(TA_RetCode)6,"TA_INVALID_HANDLE","No Info"}, + {(TA_RetCode)7,"TA_INVALID_PARAM_HOLDER","No Info"}, + {(TA_RetCode)8,"TA_INVALID_PARAM_HOLDER_TYPE","No Info"}, + {(TA_RetCode)9,"TA_INVALID_PARAM_FUNCTION","No Info"}, + {(TA_RetCode)10,"TA_INPUT_NOT_ALL_INITIALIZE","No Info"}, + {(TA_RetCode)11,"TA_OUTPUT_NOT_ALL_INITIALIZE","No Info"}, + {(TA_RetCode)12,"TA_OUT_OF_RANGE_START_INDEX","No Info"}, + {(TA_RetCode)13,"TA_OUT_OF_RANGE_END_INDEX","No Info"}, + {(TA_RetCode)14,"TA_INVALID_LIST_TYPE","No Info"}, + {(TA_RetCode)15,"TA_BAD_OBJECT","No Info"}, + {(TA_RetCode)16,"TA_NOT_SUPPORTED","No Info"}, + {(TA_RetCode)5000,"TA_INTERNAL_ERROR","No Info"}, + {(TA_RetCode)0xFFFF,"TA_UNKNOWN_ERR","Unknown Error"} +}; + +#define NB_RET_CODE_INFO (sizeof(retCodeInfoTable)/sizeof(TA_InternalRetCodeInfo)) + +void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo ) +{ + unsigned int i; + + /* Trap internal error code */ + if( (theRetCode >= 5000) && (theRetCode <= 5999) ) + { + retCodeInfo->enumStr = "TA_INTERNAL_ERROR"; + retCodeInfo->infoStr = "Unexpected Internal Error - Contact TA-Lib.org"; + return; + } + + /* Check among all the error code defined in ta_common.h */ + for( i=0; i < (NB_RET_CODE_INFO-1); i++ ) + { + if( theRetCode == retCodeInfoTable[i].retCode ) + { + /* Error code found. */ + retCodeInfo->enumStr = retCodeInfoTable[i].enumStr; + retCodeInfo->infoStr = retCodeInfoTable[i].infoStr; + return; + } + } + + /* Error code not found. */ + + /* "TA_UNKNOWN_ERR" is ALWAYS the last entry in the table. */ + retCodeInfo->enumStr = retCodeInfoTable[i].enumStr; + retCodeInfo->infoStr = retCodeInfoTable[i].infoStr; +} + +/***************/ +/* End of File */ +/***************/ + diff --git a/src/ta-lib/src/ta_common/ta_version.c b/src/ta-lib/src/ta_common/ta_version.c new file mode 100644 index 000000000..4b724226a --- /dev/null +++ b/src/ta-lib/src/ta_common/ta_version.c @@ -0,0 +1,97 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +/* Package versioning. + * + * Must match the VERSION file in the TA-Lib repos root dir. + * + */ +#define MAJOR "0" +#define MINOR "6" +#define PATCH "4" + +/* Deprecated: Use PATCH instead. */ +#define BUILD PATCH + +/* Nothing to modify below this line. */ + +#define TA_VERSION_DT "(" __DATE__ " " __TIME__ ")" + +const char *TA_GetVersionString( void ) +{ + return MAJOR "." MINOR "." PATCH " " TA_VERSION_DT; +} + +const char *TA_GetVersionMajor( void ) +{ + return MAJOR; +} + +const char *TA_GetVersionMinor( void ) +{ + return MINOR; +} + +const char *TA_GetVersionPatch( void ) +{ + return PATCH; +} + +const char *TA_GetVersionBuild( void ) +{ + /* Deprecated: No further support for Build versioning. + * Package versioning are now only MAJOR.MINOR.PATCH + */ + return PATCH; +} + +const char *TA_GetVersionExtra( void ) +{ + /* Deprecated: No further support for Extra versioning. + * Package versioning are now only MAJOR.MINOR.PATCH + */ + return ""; +} + +const char *TA_GetVersionDate( void ) +{ + return __DATE__; +} + +const char *TA_GetVersionTime( void ) +{ + return __TIME__; +} diff --git a/src/ta-lib/src/ta_func/Makefile.am b/src/ta-lib/src/ta_func/Makefile.am new file mode 100644 index 000000000..ac88553d8 --- /dev/null +++ b/src/ta-lib/src/ta_func/Makefile.am @@ -0,0 +1,171 @@ + +noinst_LTLIBRARIES = libta_func.la +AM_CPPFLAGS = -I../ta_common/ + +libta_func_la_SOURCES = ta_utility.c \ + ta_ACCBANDS.c \ + ta_ACOS.c \ + ta_AD.c \ + ta_ADD.c \ + ta_ADOSC.c \ + ta_ADX.c \ + ta_ADXR.c \ + ta_APO.c \ + ta_AROON.c \ + ta_AROONOSC.c \ + ta_ASIN.c \ + ta_ATAN.c \ + ta_ATR.c \ + ta_AVGPRICE.c \ + ta_AVGDEV.c \ + ta_BBANDS.c \ + ta_BETA.c \ + ta_BOP.c \ + ta_CCI.c \ + ta_CDL2CROWS.c \ + ta_CDL3BLACKCROWS.c \ + ta_CDL3INSIDE.c \ + ta_CDL3LINESTRIKE.c \ + ta_CDL3OUTSIDE.c \ + ta_CDL3STARSINSOUTH.c \ + ta_CDL3WHITESOLDIERS.c \ + ta_CDLABANDONEDBABY.c \ + ta_CDLADVANCEBLOCK.c \ + ta_CDLBELTHOLD.c \ + ta_CDLBREAKAWAY.c \ + ta_CDLCLOSINGMARUBOZU.c \ + ta_CDLCONCEALBABYSWALL.c \ + ta_CDLCOUNTERATTACK.c \ + ta_CDLDARKCLOUDCOVER.c \ + ta_CDLDOJI.c \ + ta_CDLDOJISTAR.c \ + ta_CDLDRAGONFLYDOJI.c \ + ta_CDLENGULFING.c \ + ta_CDLEVENINGDOJISTAR.c \ + ta_CDLEVENINGSTAR.c \ + ta_CDLGAPSIDESIDEWHITE.c \ + ta_CDLGRAVESTONEDOJI.c \ + ta_CDLHAMMER.c \ + ta_CDLHANGINGMAN.c \ + ta_CDLHARAMI.c \ + ta_CDLHARAMICROSS.c \ + ta_CDLHIGHWAVE.c \ + ta_CDLHIKKAKE.c \ + ta_CDLHIKKAKEMOD.c \ + ta_CDLHOMINGPIGEON.c \ + ta_CDLIDENTICAL3CROWS.c \ + ta_CDLINNECK.c \ + ta_CDLINVERTEDHAMMER.c \ + ta_CDLKICKING.c \ + ta_CDLKICKINGBYLENGTH.c \ + ta_CDLLADDERBOTTOM.c \ + ta_CDLLONGLEGGEDDOJI.c \ + ta_CDLLONGLINE.c \ + ta_CDLMARUBOZU.c \ + ta_CDLMATCHINGLOW.c \ + ta_CDLMATHOLD.c \ + ta_CDLMORNINGDOJISTAR.c \ + ta_CDLMORNINGSTAR.c \ + ta_CDLONNECK.c \ + ta_CDLPIERCING.c \ + ta_CDLRICKSHAWMAN.c \ + ta_CDLRISEFALL3METHODS.c \ + ta_CDLSEPARATINGLINES.c \ + ta_CDLSHOOTINGSTAR.c \ + ta_CDLSHORTLINE.c \ + ta_CDLSPINNINGTOP.c \ + ta_CDLSTALLEDPATTERN.c \ + ta_CDLSTICKSANDWICH.c \ + ta_CDLTAKURI.c \ + ta_CDLTASUKIGAP.c \ + ta_CDLTHRUSTING.c \ + ta_CDLTRISTAR.c \ + ta_CDLUNIQUE3RIVER.c \ + ta_CDLUPSIDEGAP2CROWS.c \ + ta_CDLXSIDEGAP3METHODS.c \ + ta_CEIL.c \ + ta_CMO.c \ + ta_CORREL.c \ + ta_COS.c \ + ta_COSH.c \ + ta_DEMA.c \ + ta_DIV.c \ + ta_DX.c \ + ta_EMA.c \ + ta_EXP.c \ + ta_FLOOR.c \ + ta_HT_DCPERIOD.c \ + ta_HT_DCPHASE.c \ + ta_HT_PHASOR.c \ + ta_HT_SINE.c \ + ta_HT_TRENDLINE.c \ + ta_HT_TRENDMODE.c \ + ta_IMI.c \ + ta_KAMA.c \ + ta_LINEARREG.c \ + ta_LINEARREG_ANGLE.c \ + ta_LINEARREG_INTERCEPT.c \ + ta_LINEARREG_SLOPE.c \ + ta_LN.c \ + ta_LOG10.c \ + ta_MA.c \ + ta_MACD.c \ + ta_MACDEXT.c \ + ta_MACDFIX.c \ + ta_MAMA.c \ + ta_MAVP.c \ + ta_MAX.c \ + ta_MAXINDEX.c \ + ta_MEDPRICE.c \ + ta_MFI.c \ + ta_MIDPOINT.c \ + ta_MIDPRICE.c \ + ta_MIN.c \ + ta_MININDEX.c \ + ta_MINMAX.c \ + ta_MINMAXINDEX.c \ + ta_MINUS_DI.c \ + ta_MINUS_DM.c \ + ta_MOM.c \ + ta_MULT.c \ + ta_NATR.c \ + ta_OBV.c \ + ta_PLUS_DI.c \ + ta_PLUS_DM.c \ + ta_PPO.c \ + ta_ROC.c \ + ta_ROCP.c \ + ta_ROCR.c \ + ta_ROCR100.c \ + ta_RSI.c \ + ta_SAR.c \ + ta_SAREXT.c \ + ta_SIN.c \ + ta_SINH.c \ + ta_SMA.c \ + ta_SQRT.c \ + ta_STDDEV.c \ + ta_STOCH.c \ + ta_STOCHF.c \ + ta_STOCHRSI.c \ + ta_SUB.c \ + ta_SUM.c \ + ta_T3.c \ + ta_TAN.c \ + ta_TANH.c \ + ta_TEMA.c \ + ta_TRANGE.c \ + ta_TRIMA.c \ + ta_TRIX.c \ + ta_TSF.c \ + ta_TYPPRICE.c \ + ta_ULTOSC.c \ + ta_VAR.c \ + ta_WCLPRICE.c \ + ta_WILLR.c \ + ta_WMA.c + +libta_funcdir=$(includedir)/ta-lib/ +libta_func_HEADERS = ../../include/ta_defs.h \ + ../../include/ta_libc.h \ + ../../include/ta_func.h diff --git a/src/ta-lib/src/ta_func/ta_ACCBANDS.c b/src/ta-lib/src/ta_func/ta_ACCBANDS.c new file mode 100644 index 000000000..97c4e1cbf --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ACCBANDS.c @@ -0,0 +1,518 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * RM Robert Meier + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120307 RM Initial Version + * 120907 MF Handling of a few limit cases + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AccbandsLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int accbandsLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ACCBANDS_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 20; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return LOOKBACK_CALL(SMA)( optInTimePeriod ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ACCBANDS - Acceleration Bands + * + * Input = High, Low, Close + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outRealUpperBand, +/* Generated */ SubArray^ outRealMiddleBand, +/* Generated */ SubArray^ outRealLowerBand ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outRealUpperBand, +/* Generated */ cli::array^ outRealMiddleBand, +/* Generated */ cli::array^ outRealLowerBand ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode accbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ACCBANDS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ENUM_DECLARATION(RetCode) retCode; + ARRAY_REF( tempBuffer1 ); + ARRAY_REF( tempBuffer2 ); + VALUE_HANDLE_INT(outBegIdxDummy); + VALUE_HANDLE_INT(outNbElementDummy); + int i, j, outputSize, bufferSize, lookbackTotal; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 20; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outRealUpperBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outRealMiddleBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outRealLowerBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = LOOKBACK_CALL(SMA)( optInTimePeriod ); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Buffer will contains also the lookback required for SMA + * to satisfy the caller requested startIdx/endIdx. + */ + outputSize = endIdx-startIdx+1; + bufferSize = outputSize+lookbackTotal; + ARRAY_ALLOC(tempBuffer1, bufferSize ); + #if !defined(_JAVA) + if( !tempBuffer1 ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + ARRAY_ALLOC(tempBuffer2, bufferSize ); + #if !defined(_JAVA) + if( !tempBuffer2 ) + { + ARRAY_FREE(tempBuffer1); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + /* Calculate the upper/lower band at the same time (no SMA yet). + * Must start calculation back enough to cover the lookback + * required later for the SMA. + */ + for(j=0, i=startIdx-lookbackTotal; i<=endIdx; i++, j++) + { + tempReal = inHigh[i]+inLow[i]; + if( !TA_IS_ZERO(tempReal) ) + { + tempReal = 4*(inHigh[i]-inLow[i])/tempReal; + tempBuffer1[j] = inHigh[i]*(1+tempReal); + tempBuffer2[j] = inLow[i]*(1-tempReal); + } + else + { + tempBuffer1[j] = inHigh[i]; + tempBuffer2[j] = inLow[i]; + } + } + + /* Calculate the middle band, which is a moving average of the close. */ + retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inClose, + optInTimePeriod, + VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), outRealMiddleBand ); + + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) + { + ARRAY_FREE( tempBuffer1 ); + ARRAY_FREE( tempBuffer2 ); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Now let's take the SMA for the upper band. */ + retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer1, + optInTimePeriod, + VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), + outRealUpperBand ); + + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) + { + ARRAY_FREE( tempBuffer1 ); + ARRAY_FREE( tempBuffer2 ); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Now let's take the SMA for the lower band. */ + retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer2, + optInTimePeriod, + VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), + outRealLowerBand ); + + ARRAY_FREE( tempBuffer1 ); + ARRAY_FREE( tempBuffer2 ); + + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outputSize; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outRealUpperBand, +/* Generated */ SubArray^ outRealMiddleBand, +/* Generated */ SubArray^ outRealLowerBand ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outRealUpperBand, +/* Generated */ cli::array^ outRealMiddleBand, +/* Generated */ cli::array^ outRealLowerBand ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode accbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ACCBANDS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ ARRAY_REF( tempBuffer1 ); +/* Generated */ ARRAY_REF( tempBuffer2 ); +/* Generated */ VALUE_HANDLE_INT(outBegIdxDummy); +/* Generated */ VALUE_HANDLE_INT(outNbElementDummy); +/* Generated */ int i, j, outputSize, bufferSize, lookbackTotal; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 20; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outRealUpperBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outRealMiddleBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outRealLowerBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(SMA)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outputSize = endIdx-startIdx+1; +/* Generated */ bufferSize = outputSize+lookbackTotal; +/* Generated */ ARRAY_ALLOC(tempBuffer1, bufferSize ); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !tempBuffer1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC(tempBuffer2, bufferSize ); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !tempBuffer2 ) +/* Generated */ { +/* Generated */ ARRAY_FREE(tempBuffer1); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ for(j=0, i=startIdx-lookbackTotal; i<=endIdx; i++, j++) +/* Generated */ { +/* Generated */ tempReal = inHigh[i]+inLow[i]; +/* Generated */ if( !TA_IS_ZERO(tempReal) ) +/* Generated */ { +/* Generated */ tempReal = 4*(inHigh[i]-inLow[i])/tempReal; +/* Generated */ tempBuffer1[j] = inHigh[i]*(1+tempReal); +/* Generated */ tempBuffer2[j] = inLow[i]*(1-tempReal); +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ tempBuffer1[j] = inHigh[i]; +/* Generated */ tempBuffer2[j] = inLow[i]; +/* Generated */ } +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inClose, +/* Generated */ optInTimePeriod, +/* Generated */ VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), outRealMiddleBand ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempBuffer1 ); +/* Generated */ ARRAY_FREE( tempBuffer2 ); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer1, +/* Generated */ optInTimePeriod, +/* Generated */ VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), +/* Generated */ outRealUpperBand ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempBuffer1 ); +/* Generated */ ARRAY_FREE( tempBuffer2 ); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer2, +/* Generated */ optInTimePeriod, +/* Generated */ VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), +/* Generated */ outRealLowerBand ); +/* Generated */ ARRAY_FREE( tempBuffer1 ); +/* Generated */ ARRAY_FREE( tempBuffer2 ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outputSize; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ACOS.c b/src/ta-lib/src/ta_func/ta_ACOS.c new file mode 100644 index 000000000..dd74936cf --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ACOS.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AcosLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int acosLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ACOS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ACOS - Vector Trigonometric ACos + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode acos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ACOS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_acos(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode acos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ACOS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_acos(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_AD.c b/src/ta-lib/src/ta_func/ta_AD.c new file mode 100644 index 000000000..bb9a2ac95 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_AD.c @@ -0,0 +1,327 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JD jdoyle + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 111705 MF,JD Fix#1359452 for handling properly start/end range. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AdLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int adLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_AD_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* This function have no lookback needed. */ + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_AD - Chaikin A/D Line + * + * Input = High, Low, Close, Volume + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ SubArray^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ cli::array^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ad( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double inVolume[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_AD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ const double inVolume[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int nbBar, currentBar, outIdx; + + double high, low, close, tmp; + double ad; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Note: Results from this function might vary slightly + * from Metastock outputs. The reason being that + * Metastock use float instead of double and this + * cause a different floating-point precision to + * be used. + * + * For most function, this is not an apparent difference + * but for function using large cummulative values (like + * this AD function), minor imprecision adds up and becomes + * significative. + * + * For better precision, TA-Lib use double in all its + * its calculations. + */ + + /* Default return values */ + nbBar = endIdx-startIdx+1; + VALUE_HANDLE_DEREF(outNBElement) = nbBar; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + currentBar = startIdx; + outIdx = 0; + ad = 0.0; + + while( nbBar != 0 ) + { + high = inHigh[currentBar]; + low = inLow[currentBar]; + tmp = high-low; + close = inClose[currentBar]; + + if( tmp > 0.0 ) + ad += (((close-low)-(high-close))/tmp)*((double)inVolume[currentBar]); + + outReal[outIdx++] = ad; + + currentBar++; + nbBar--; + } + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ SubArray^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ cli::array^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ad( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ float inVolume[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_AD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ const float inVolume[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int nbBar, currentBar, outIdx; +/* Generated */ double high, low, close, tmp; +/* Generated */ double ad; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbBar = endIdx-startIdx+1; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = nbBar; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ currentBar = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ ad = 0.0; +/* Generated */ while( nbBar != 0 ) +/* Generated */ { +/* Generated */ high = inHigh[currentBar]; +/* Generated */ low = inLow[currentBar]; +/* Generated */ tmp = high-low; +/* Generated */ close = inClose[currentBar]; +/* Generated */ if( tmp > 0.0 ) +/* Generated */ ad += (((close-low)-(high-close))/tmp)*((double)inVolume[currentBar]); +/* Generated */ outReal[outIdx++] = ad; +/* Generated */ currentBar++; +/* Generated */ nbBar--; +/* Generated */ } +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ diff --git a/src/ta-lib/src/ta_func/ta_ADD.c b/src/ta-lib/src/ta_func/ta_ADD.c new file mode 100644 index 000000000..b08f36d5b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ADD.c @@ -0,0 +1,260 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AddLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int addLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ADD_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ADD - Vector Arithmetic Add + * + * Input = double, double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Add( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Add( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode add( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal0[], +/* Generated */ double inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ADD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal0[], +/* Generated */ const double inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = inReal0[i]+inReal1[i]; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Add( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Add( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode add( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal0[], +/* Generated */ float inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ADD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal0[], +/* Generated */ const float inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = inReal0[i]+inReal1[i]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ADOSC.c b/src/ta-lib/src/ta_func/ta_ADOSC.c new file mode 100644 index 000000000..1dd8bad3d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ADOSC.c @@ -0,0 +1,495 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AdOscLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int adOscLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ADOSC_Lookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int slowestPeriod; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 3; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 10; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Use the slowest EMA period to evaluate the total lookback. */ + if( optInFastPeriod < optInSlowPeriod ) + slowestPeriod = optInSlowPeriod; + else + slowestPeriod = optInFastPeriod; + + /* Adjust startIdx to account for the lookback period. */ + return LOOKBACK_CALL(EMA)( slowestPeriod ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ADOSC - Chaikin A/D Oscillator + * + * Input = High, Low, Close, Volume + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ SubArray^ inVolume, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ cli::array^ inVolume, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode adOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double inVolume[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ADOSC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ const double inVolume[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int today, outIdx, lookbackTotal; + int slowestPeriod; + double high, low, close, tmp; + + double slowEMA, slowk, one_minus_slowk; + double fastEMA, fastk, one_minus_fastk; + double ad; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 3; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 10; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Implementation Note: + * The fastEMA varaible is not neceseraly the + * fastest EMA. + * In the same way, slowEMA is not neceseraly the + * slowest EMA. + * + * The ADOSC is always the (fastEMA - slowEMA) regardless + * of the period specified. In other word: + * + * ADOSC(3,10) = EMA(3,AD) - EMA(10,AD) + * + * while + * + * ADOSC(10,3) = EMA(10,AD)- EMA(3,AD) + * + * In the first case the EMA(3) is truly a faster EMA, + * while in the second case, the EMA(10) is still call + * fastEMA in the algorithm, even if it is in fact slower. + * + * This gives more flexibility to the user if they want to + * experiment with unusual parameter settings. + */ + + /* Identify the slowest period. + * This infomration is used soleley to bootstrap + * the algorithm (skip the lookback period). + */ + if( optInFastPeriod < optInSlowPeriod ) + slowestPeriod = optInSlowPeriod; + else + slowestPeriod = optInFastPeriod; + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(EMA)( slowestPeriod ); + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + today = startIdx-lookbackTotal; + + /* The following variables and macro are used to + * calculate the "ad". + */ + ad = 0.0; + #define CALCULATE_AD \ + { \ + high = inHigh[today]; \ + low = inLow[today]; \ + tmp = high-low; \ + close = inClose[today]; \ + if( tmp > 0.0 ) \ + ad += (((close-low)-(high-close))/tmp)*((double)inVolume[today]); \ + today++; \ + } + + /* Constants for EMA */ + fastk = PER_TO_K( optInFastPeriod ); + one_minus_fastk = 1.0 - fastk; + + slowk = PER_TO_K( optInSlowPeriod ); + one_minus_slowk = 1.0 - slowk; + + /* Initialize the two EMA + * + * Use the same range of initialization inputs for + * both EMA and simply seed with the first A/D value. + * + * Note: Metastock do the same. + */ + CALCULATE_AD; + fastEMA = ad; + slowEMA = ad; + + /* Initialize the EMA and skip the unstable period. */ + while( today < startIdx ) + { + CALCULATE_AD; + fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); + slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); + } + + /* Perform the calculation for the requested range */ + outIdx = 0; + while( today <= endIdx ) + { + CALCULATE_AD; + fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); + slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); + + outReal[outIdx++] = fastEMA - slowEMA; + } + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ SubArray^ inVolume, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ cli::array^ inVolume, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode adOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ float inVolume[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ADOSC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ const float inVolume[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, outIdx, lookbackTotal; +/* Generated */ int slowestPeriod; +/* Generated */ double high, low, close, tmp; +/* Generated */ double slowEMA, slowk, one_minus_slowk; +/* Generated */ double fastEMA, fastk, one_minus_fastk; +/* Generated */ double ad; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 3; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 10; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( optInFastPeriod < optInSlowPeriod ) +/* Generated */ slowestPeriod = optInSlowPeriod; +/* Generated */ else +/* Generated */ slowestPeriod = optInFastPeriod; +/* Generated */ lookbackTotal = LOOKBACK_CALL(EMA)( slowestPeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ today = startIdx-lookbackTotal; +/* Generated */ ad = 0.0; +/* Generated */ #define CALCULATE_AD \ +/* Generated */ { \ +/* Generated */ high = inHigh[today]; \ +/* Generated */ low = inLow[today]; \ +/* Generated */ tmp = high-low; \ +/* Generated */ close = inClose[today]; \ +/* Generated */ if( tmp > 0.0 ) \ +/* Generated */ ad += (((close-low)-(high-close))/tmp)*((double)inVolume[today]); \ +/* Generated */ today++; \ +/* Generated */ } +/* Generated */ fastk = PER_TO_K( optInFastPeriod ); +/* Generated */ one_minus_fastk = 1.0 - fastk; +/* Generated */ slowk = PER_TO_K( optInSlowPeriod ); +/* Generated */ one_minus_slowk = 1.0 - slowk; +/* Generated */ CALCULATE_AD; +/* Generated */ fastEMA = ad; +/* Generated */ slowEMA = ad; +/* Generated */ while( today < startIdx ) +/* Generated */ { +/* Generated */ CALCULATE_AD; +/* Generated */ fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); +/* Generated */ slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ CALCULATE_AD; +/* Generated */ fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); +/* Generated */ slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); +/* Generated */ outReal[outIdx++] = fastEMA - slowEMA; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ADX.c b/src/ta-lib/src/ta_func/ta_ADX.c new file mode 100644 index 000000000..0f50877e6 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ADX.c @@ -0,0 +1,798 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * MIF Mirek Fontan (mira@fontan.cz) + * GC guycom@users.sourceforge.net + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. + * 062704 MF Fix #965557. Div by zero bug reported by MIF. + * 082206 MF Fix #1544555. Div by zero bug reported by GC. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AdxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int adxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ADX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return (2 * optInTimePeriod) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx) - 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ADX - Average Directional Movement Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode adx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ADX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int today, lookbackTotal, outIdx; + double prevHigh, prevLow, prevClose; + double prevMinusDM, prevPlusDM, prevTR; + double tempReal, tempReal2, diffP, diffM; + double minusDI, plusDI, sumDX, prevADX; + + int i; + + #define TRUE_RANGE(TH,TL,YC,OUT) {\ + OUT = TH-TL; \ + tempReal2 = std_fabs(TH-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + tempReal2 = std_fabs(TL-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + } + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* + * The DM1 (one period) is base on the largest part of + * today's range that is outside of yesterdays range. + * + * The following 7 cases explain how the +DM and -DM are + * calculated on one period: + * + * Case 1: Case 2: + * C| A| + * | | C| + * | +DM1 = (C-A) B| | +DM1 = 0 + * | -DM1 = 0 | -DM1 = (B-D) + * A| | D| + * | D| + * B| + * + * Case 3: Case 4: + * C| C| + * | A| | + * | +DM1 = (C-A) | | +DM1 = 0 + * | -DM1 = 0 B| | -DM1 = (B-D) + * A| | | + * | | D| + * B| | + * D| + * + * Case 5: Case 6: + * A| A| C| + * | C| +DM1 = 0 | | +DM1 = 0 + * | | -DM1 = 0 | | -DM1 = 0 + * | D| | | + * B| B| D| + * + * + * Case 7: + * + * C| + * A| | + * | | +DM=0 + * B| | -DM=0 + * D| + * + * In case 3 and 4, the rule is that the smallest delta between + * (C-A) and (B-D) determine which of +DM or -DM is zero. + * + * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are + * zero. + * + * The rules remain the same when A=B and C=D (when the highs + * equal the lows). + * + * When calculating the DM over a period > 1, the one-period DM + * for the desired period are initialy sum. In other word, + * for a -DM14, sum the -DM1 for the first 14 days (that's + * 13 values because there is no DM for the first day!) + * Subsequent DM are calculated using the Wilder's + * smoothing approach: + * + * Previous -DM14 + * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 + * 14 + * + * (Same thing for +DM14) + * + * Calculation of a -DI14 is as follow: + * + * -DM14 + * -DI14 = -------- + * TR14 + * + * (Same thing for +DI14) + * + * Calculation of the TR14 is: + * + * Previous TR14 + * Today's TR14 = Previous TR14 - -------------- + Today's TR1 + * 14 + * + * The first TR14 is the summation of the first 14 TR1. See the + * TA_TRANGE function on how to calculate the true range. + * + * Calculation of the DX14 is: + * + * diffDI = ABS( (-DI14) - (+DI14) ) + * sumDI = (-DI14) + (+DI14) + * + * DX14 = 100 * (diffDI / sumDI) + * + * Calculation of the first ADX: + * + * ADX14 = SUM of the first 14 DX + * + * Calculation of subsequent ADX: + * + * ((Previous ADX14)*(14-1))+ Today's DX + * ADX14 = ------------------------------------- + * 14 + * + * Reference: + * New Concepts In Technical Trading Systems, J. Welles Wilder Jr + */ + + /* Original implementation from Wilder's book was doing some integer + * rounding in its calculations. + * + * This was understandable in the context that at the time the book + * was written, most user were doing the calculation by hand. + * + * For a computer, rounding is unnecessary (and even problematic when inputs + * are close to 1). + * + * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, + * you can comment out the following #undef/#define and rebuild the library. + */ + #undef round_pos + #define round_pos(x) (x) + + lookbackTotal = (2*optInTimePeriod) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx) - 1; + + /* Adjust startIdx to account for the lookback period. */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Indicate where the next output should be put + * in the outReal. + */ + outIdx = 0; + + /* Process the initial DM and TR */ + VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; + + prevMinusDM = 0.0; + prevPlusDM = 0.0; + prevTR = 0.0; + today = startIdx - lookbackTotal; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + prevClose = inClose[today]; + i = optInTimePeriod-1; + while( i-- > 0 ) + { + /* Calculate the prevMinusDM and prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR += tempReal; + prevClose = inClose[today]; + } + + /* Add up all the initial DX. */ + sumDX = 0.0; + i = optInTimePeriod; + while( i-- > 0 ) + { + /* Calculate the prevMinusDM and prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + prevMinusDM -= prevMinusDM/optInTimePeriod; + prevPlusDM -= prevPlusDM/optInTimePeriod; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + + /* Calculate the DX. The value is rounded (see Wilder book). */ + if( !TA_IS_ZERO(prevTR) ) + { + minusDI = round_pos(100.0*(prevMinusDM/prevTR)); + plusDI = round_pos(100.0*(prevPlusDM/prevTR)); + /* This loop is just to accumulate the initial DX */ + tempReal = minusDI+plusDI; + if( !TA_IS_ZERO(tempReal) ) + sumDX += round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); + } + } + + /* Calculate the first ADX */ + prevADX = round_pos( sumDX / optInTimePeriod ); + + /* Skip the unstable period */ + i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx); + while( i-- > 0 ) + { + /* Calculate the prevMinusDM and prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + prevMinusDM -= prevMinusDM/optInTimePeriod; + prevPlusDM -= prevPlusDM/optInTimePeriod; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + + if( !TA_IS_ZERO(prevTR) ) + { + /* Calculate the DX. The value is rounded (see Wilder book). */ + minusDI = round_pos(100.0*(prevMinusDM/prevTR)); + plusDI = round_pos(100.0*(prevPlusDM/prevTR)); + tempReal = minusDI+plusDI; + if( !TA_IS_ZERO(tempReal) ) + { + tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); + /* Calculate the ADX */ + prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); + } + } + } + + /* Output the first ADX */ + outReal[0] = prevADX; + outIdx = 1; + + /* Calculate and output subsequent ADX */ + while( today < endIdx ) + { + /* Calculate the prevMinusDM and prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + prevMinusDM -= prevMinusDM/optInTimePeriod; + prevPlusDM -= prevPlusDM/optInTimePeriod; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + + if( !TA_IS_ZERO(prevTR) ) + { + /* Calculate the DX. The value is rounded (see Wilder book). */ + minusDI = round_pos(100.0*(prevMinusDM/prevTR)); + plusDI = round_pos(100.0*(prevPlusDM/prevTR)); + tempReal = minusDI+plusDI; + if( !TA_IS_ZERO(tempReal) ) + { + tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); + /* Calculate the ADX */ + prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); + } + } + + /* Output the ADX */ + outReal[outIdx++] = prevADX; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode adx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ADX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, lookbackTotal, outIdx; +/* Generated */ double prevHigh, prevLow, prevClose; +/* Generated */ double prevMinusDM, prevPlusDM, prevTR; +/* Generated */ double tempReal, tempReal2, diffP, diffM; +/* Generated */ double minusDI, plusDI, sumDX, prevADX; +/* Generated */ int i; +/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ +/* Generated */ OUT = TH-TL; \ +/* Generated */ tempReal2 = std_fabs(TH-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ tempReal2 = std_fabs(TL-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ } +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ #undef round_pos +/* Generated */ #define round_pos(x) (x) +/* Generated */ lookbackTotal = (2*optInTimePeriod) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx) - 1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; +/* Generated */ prevMinusDM = 0.0; +/* Generated */ prevPlusDM = 0.0; +/* Generated */ prevTR = 0.0; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ prevClose = inClose[today]; +/* Generated */ i = optInTimePeriod-1; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR += tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ sumDX = 0.0; +/* Generated */ i = optInTimePeriod; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; +/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ { +/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ tempReal = minusDI+plusDI; +/* Generated */ if( !TA_IS_ZERO(tempReal) ) +/* Generated */ sumDX += round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); +/* Generated */ } +/* Generated */ } +/* Generated */ prevADX = round_pos( sumDX / optInTimePeriod ); +/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx); +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; +/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ { +/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ tempReal = minusDI+plusDI; +/* Generated */ if( !TA_IS_ZERO(tempReal) ) +/* Generated */ { +/* Generated */ tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); +/* Generated */ prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ outReal[0] = prevADX; +/* Generated */ outIdx = 1; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; +/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ { +/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ tempReal = minusDI+plusDI; +/* Generated */ if( !TA_IS_ZERO(tempReal) ) +/* Generated */ { +/* Generated */ tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); +/* Generated */ prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); +/* Generated */ } +/* Generated */ } +/* Generated */ outReal[outIdx++] = prevADX; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ADXR.c b/src/ta-lib/src/ta_func/ta_ADXR.c new file mode 100644 index 000000000..84e15e328 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ADXR.c @@ -0,0 +1,387 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AdxrLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int adxrLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ADXR_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + if( optInTimePeriod > 1 ) + return optInTimePeriod + LOOKBACK_CALL(ADX)( optInTimePeriod) - 1; + else + return 3; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ADXR - Average Directional Movement Index Rating + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode adxr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ADXR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ARRAY_REF( adx ); + int adxrLookback, i, j, outIdx, nbElement; + ENUM_DECLARATION(RetCode) retCode; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Original implementation from Wilder's book was doing some integer + * rounding in its calculations. + * + * This was understandable in the context that at the time the book + * was written, most user were doing the calculation by hand. + * + * For a computer, rounding is unnecessary (and even problematic when inputs + * are close to 1). + * + * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, + * you can comment out the following #undef/#define and rebuild the library. + */ + #undef round_pos + #define round_pos(x) (x) + + /* Move up the start index if there is not + * enough initial data. + * Always one price bar gets consumed. + */ + adxrLookback = LOOKBACK_CALL(ADXR)( optInTimePeriod ); + + if( startIdx < adxrLookback ) + startIdx = adxrLookback; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + ARRAY_ALLOC( adx, endIdx-startIdx+optInTimePeriod ); + #if !defined( _JAVA ) + if( !adx ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + + retCode = FUNCTION_CALL(ADX)( startIdx-(optInTimePeriod-1), endIdx, + inHigh, inLow, inClose, + optInTimePeriod, outBegIdx, outNBElement, adx ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + ARRAY_FREE( adx ); + return retCode; + } + + i = optInTimePeriod-1; + j = 0; + outIdx = 0; + nbElement = endIdx-startIdx+2; + while( --nbElement != 0 ) + outReal[outIdx++] = round_pos( (adx[i++]+adx[j++])/2.0 ); + + ARRAY_FREE( adx ); + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode adxr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ADXR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF( adx ); +/* Generated */ int adxrLookback, i, j, outIdx, nbElement; +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ #undef round_pos +/* Generated */ #define round_pos(x) (x) +/* Generated */ adxrLookback = LOOKBACK_CALL(ADXR)( optInTimePeriod ); +/* Generated */ if( startIdx < adxrLookback ) +/* Generated */ startIdx = adxrLookback; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ARRAY_ALLOC( adx, endIdx-startIdx+optInTimePeriod ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !adx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL(ADX)( startIdx-(optInTimePeriod-1), endIdx, +/* Generated */ inHigh, inLow, inClose, +/* Generated */ optInTimePeriod, outBegIdx, outNBElement, adx ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( adx ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ i = optInTimePeriod-1; +/* Generated */ j = 0; +/* Generated */ outIdx = 0; +/* Generated */ nbElement = endIdx-startIdx+2; +/* Generated */ while( --nbElement != 0 ) +/* Generated */ outReal[outIdx++] = round_pos( (adx[i++]+adx[j++])/2.0 ); +/* Generated */ ARRAY_FREE( adx ); +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_APO.c b/src/ta-lib/src/ta_func/ta_APO.c new file mode 100644 index 000000000..6064088f5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_APO.c @@ -0,0 +1,619 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AA Andrew Atkinson + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 062804 MF Resolve div by zero bug on limit case. + * 020605 AA Fix #1117666 Lookback & out-of-bound bug. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::ApoLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int apoLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_APO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* The slow MA is the key factor determining the lookback period. */ + return LOOKBACK_CALL(MA)( max(optInSlowPeriod,optInFastPeriod), optInMAType ); +} + + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_APO - Absolute Price Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInMAType: + * Type of Moving Average + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode apo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_APO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_REF(tempBuffer); + ENUM_DECLARATION(RetCode) retCode; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Allocate an intermediate buffer. */ + ARRAY_ALLOC(tempBuffer, (endIdx-startIdx+1) ); + #if !defined(_JAVA) + if( !tempBuffer ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + + retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, + inReal, + optInFastPeriod, + optInSlowPeriod, + optInMAType, + outBegIdx, + outNBElement, + outReal, + tempBuffer, + 0 /* No percentage. */ ); + + ARRAY_FREE( tempBuffer ); + + return retCode; +} + +/* Internal price oscillator function. + * + * A buffer must be provided for intermediate processing. + */ +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + // No INT fucntion +#else + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) + enum class Core::RetCode Core::TA_INT_PO( int startIdx, + int endIdx, + SubArray^ inReal, + int optInFastPeriod, + int optInSlowPeriod, + MAType optInMethod_2, + [Out]int% outBegIdx, + [Out]int% outNBElement, + SubArray^ outReal, + SubArray^ tempBuffer, + int doPercentageOutput ) + +#elif defined( _MANAGED ) + enum class Core::RetCode Core::TA_INT_PO( int startIdx, + int endIdx, + cli::array^ inReal, + int optInFastPeriod, + int optInSlowPeriod, + MAType optInMethod_2, + [Out]int% outBegIdx, + [Out]int% outNBElement, + cli::array^ outReal, + cli::array^ tempBuffer, + int doPercentageOutput ) +#elif defined( _JAVA ) +RetCode TA_INT_PO( int startIdx, + int endIdx, + INPUT_TYPE inReal[], + int optInFastPeriod, + int optInSlowPeriod, + MAType optInMethod_2, + MInteger outBegIdx, + MInteger outNBElement, + double outReal[], + double tempBuffer[], + int doPercentageOutput ) + +#else +TA_RetCode TA_PREFIX(INT_PO)( int startIdx, + int endIdx, + const INPUT_TYPE *inReal, + int optInFastPeriod, + int optInSlowPeriod, + TA_MAType optInMethod_2, + int *outBegIdx, + int *outNBElement, + double *outReal, + double *tempBuffer, + int doPercentageOutput ) +#endif +{ + ENUM_DECLARATION(RetCode) retCode; + + double tempReal; + int tempInteger; + VALUE_HANDLE_INT(outBegIdx1); + VALUE_HANDLE_INT(outNbElement1); + VALUE_HANDLE_INT(outBegIdx2); + VALUE_HANDLE_INT(outNbElement2); + + int i, j; + + /* Make sure slow is really slower than + * the fast period! if not, swap... + */ + if( optInSlowPeriod < optInFastPeriod ) + { + /* swap */ + tempInteger = optInSlowPeriod; + optInSlowPeriod = optInFastPeriod; + optInFastPeriod = tempInteger; + } + + /* Calculate the fast MA into the tempBuffer. */ + retCode = FUNCTION_CALL(MA)( startIdx, endIdx, + inReal, + optInFastPeriod, + optInMethod_2, + VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), + tempBuffer ); + + if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + /* Calculate the slow MA into the output. */ + retCode = FUNCTION_CALL(MA)( startIdx, endIdx, + inReal, + optInSlowPeriod, + optInMethod_2, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), + outReal ); + + if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + tempInteger = VALUE_HANDLE_GET(outBegIdx1) - VALUE_HANDLE_GET(outBegIdx2); + if( doPercentageOutput != 0 ) + { + /* Calculate ((fast MA)-(slow MA))/(slow MA) in the output. */ + for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) + { + tempReal = outReal[i]; + if( !TA_IS_ZERO(tempReal) ) + outReal[i] = ((tempBuffer[j]-tempReal)/tempReal)*100.0; + else + outReal[i] = 0.0; + } + } + else + { + /* Calculate (fast MA)-(slow MA) in the output. */ + for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) + outReal[i] = tempBuffer[j]-outReal[i]; + } + + VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(outBegIdx1); + VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement1); + } + } + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + } + + return retCode; +} +#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode apo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_APO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(tempBuffer); +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC(tempBuffer, (endIdx-startIdx+1) ); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !tempBuffer ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, +/* Generated */ inReal, +/* Generated */ optInFastPeriod, +/* Generated */ optInSlowPeriod, +/* Generated */ optInMAType, +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ outReal, +/* Generated */ tempBuffer, +/* Generated */ 0 ); +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ // No INT fucntion +/* Generated */ #else +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TA_INT_PO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ MAType optInMethod_2, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal, +/* Generated */ SubArray^ tempBuffer, +/* Generated */ int doPercentageOutput ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TA_INT_PO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ MAType optInMethod_2, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal, +/* Generated */ cli::array^ tempBuffer, +/* Generated */ int doPercentageOutput ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ RetCode TA_INT_PO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ INPUT_TYPE inReal[], +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ MAType optInMethod_2, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[], +/* Generated */ double tempBuffer[], +/* Generated */ int doPercentageOutput ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_PREFIX(INT_PO)( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const INPUT_TYPE *inReal, +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ TA_MAType optInMethod_2, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double *outReal, +/* Generated */ double *tempBuffer, +/* Generated */ int doPercentageOutput ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ double tempReal; +/* Generated */ int tempInteger; +/* Generated */ VALUE_HANDLE_INT(outBegIdx1); +/* Generated */ VALUE_HANDLE_INT(outNbElement1); +/* Generated */ VALUE_HANDLE_INT(outBegIdx2); +/* Generated */ VALUE_HANDLE_INT(outNbElement2); +/* Generated */ int i, j; +/* Generated */ if( optInSlowPeriod < optInFastPeriod ) +/* Generated */ { +/* Generated */ tempInteger = optInSlowPeriod; +/* Generated */ optInSlowPeriod = optInFastPeriod; +/* Generated */ optInFastPeriod = tempInteger; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, +/* Generated */ inReal, +/* Generated */ optInFastPeriod, +/* Generated */ optInMethod_2, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), +/* Generated */ tempBuffer ); +/* Generated */ if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, +/* Generated */ inReal, +/* Generated */ optInSlowPeriod, +/* Generated */ optInMethod_2, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ outReal ); +/* Generated */ if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ tempInteger = VALUE_HANDLE_GET(outBegIdx1) - VALUE_HANDLE_GET(outBegIdx2); +/* Generated */ if( doPercentageOutput != 0 ) +/* Generated */ { +/* Generated */ for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) +/* Generated */ { +/* Generated */ tempReal = outReal[i]; +/* Generated */ if( !TA_IS_ZERO(tempReal) ) +/* Generated */ outReal[i] = ((tempBuffer[j]-tempReal)/tempReal)*100.0; +/* Generated */ else +/* Generated */ outReal[i] = 0.0; +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) +/* Generated */ outReal[i] = tempBuffer[j]-outReal[i]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(outBegIdx1); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement1); +/* Generated */ } +/* Generated */ } +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ } +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_AROON.c b/src/ta-lib/src/ta_func/ta_AROON.c new file mode 100644 index 000000000..a7d10c4ff --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_AROON.c @@ -0,0 +1,463 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 050703 MF Fix algorithm base on Adrian Michel bug report #748163 + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AroonLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int aroonLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_AROON_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_AROON - Aroon + * + * Input = High, Low + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outAroonDown, +/* Generated */ SubArray^ outAroonUp ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outAroonDown, +/* Generated */ cli::array^ outAroonUp ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode aroon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outAroonDown[], +/* Generated */ double outAroonUp[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_AROON( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outAroonDown[], +/* Generated */ double outAroonUp[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double lowest, highest, tmp, factor; + int outIdx; + int trailingIdx, lowestIdx, highestIdx, today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outAroonDown ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outAroonUp ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* This function is using a speed optimized algorithm + * for the min/max logic. + * + * You might want to first look at how TA_MIN/TA_MAX works + * and this function will become easier to understand. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-optInTimePeriod; + lowestIdx = -1; + highestIdx = -1; + lowest = 0.0; + highest = 0.0; + factor = (double)100.0/(double)optInTimePeriod; + + while( today <= endIdx ) + { + /* Keep track of the lowestIdx */ + tmp = inLow[today]; + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inLow[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inLow[i]; + if( tmp <= lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + } + + /* Keep track of the highestIdx */ + tmp = inHigh[today]; + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inHigh[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inHigh[i]; + if( tmp >= highest ) + { + highestIdx = i; + highest = tmp; + } + } + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + } + + /* Note: Do not forget that input and output buffer can be the same, + * so writing to the output is the last thing being done here. + */ + outAroonUp[outIdx] = factor*(optInTimePeriod-(today-highestIdx)); + outAroonDown[outIdx] = factor*(optInTimePeriod-(today-lowestIdx)); + + outIdx++; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outAroonDown, +/* Generated */ SubArray^ outAroonUp ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outAroonDown, +/* Generated */ cli::array^ outAroonUp ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode aroon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outAroonDown[], +/* Generated */ double outAroonUp[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_AROON( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outAroonDown[], +/* Generated */ double outAroonUp[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, highest, tmp, factor; +/* Generated */ int outIdx; +/* Generated */ int trailingIdx, lowestIdx, highestIdx, today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outAroonDown ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outAroonUp ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-optInTimePeriod; +/* Generated */ lowestIdx = -1; +/* Generated */ highestIdx = -1; +/* Generated */ lowest = 0.0; +/* Generated */ highest = 0.0; +/* Generated */ factor = (double)100.0/(double)optInTimePeriod; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inLow[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inLow[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inLow[i]; +/* Generated */ if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ tmp = inHigh[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inHigh[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inHigh[i]; +/* Generated */ if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ outAroonUp[outIdx] = factor*(optInTimePeriod-(today-highestIdx)); +/* Generated */ outAroonDown[outIdx] = factor*(optInTimePeriod-(today-lowestIdx)); +/* Generated */ outIdx++; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_AROONOSC.c b/src/ta-lib/src/ta_func/ta_AROONOSC.c new file mode 100644 index 000000000..fb2bd752d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_AROONOSC.c @@ -0,0 +1,468 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 050703 MF Fix algorithm base on Adrian Michel bug report #748163 + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AroonOscLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int aroonOscLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_AROONOSC_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_AROONOSC - Aroon Oscillator + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode aroonOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_AROONOSC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double lowest, highest, tmp, factor, aroon; + int outIdx; + int trailingIdx, lowestIdx, highestIdx, today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* This code is almost identical to the TA_AROON function + * except that instead of outputing ArroonUp and AroonDown + * individually, an oscillator is build from both. + * + * AroonOsc = AroonUp- AroonDown; + * + */ + + /* This function is using a speed optimized algorithm + * for the min/max logic. + * + * You might want to first look at how TA_MIN/TA_MAX works + * and this function will become easier to understand. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-optInTimePeriod; + lowestIdx = -1; + highestIdx = -1; + lowest = 0.0; + highest = 0.0; + factor = (double)100.0/(double)optInTimePeriod; + + while( today <= endIdx ) + { + /* Keep track of the lowestIdx */ + tmp = inLow[today]; + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inLow[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inLow[i]; + if( tmp <= lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + } + + /* Keep track of the highestIdx */ + tmp = inHigh[today]; + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inHigh[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inHigh[i]; + if( tmp >= highest ) + { + highestIdx = i; + highest = tmp; + } + } + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + } + + /* The oscillator is the following: + * AroonUp = factor*(optInTimePeriod-(today-highestIdx)); + * AroonDown = factor*(optInTimePeriod-(today-lowestIdx)); + * AroonOsc = AroonUp-AroonDown; + * + * An arithmetic simplification give us: + * Aroon = factor*(highestIdx-lowestIdx) + */ + aroon = factor*(highestIdx-lowestIdx); + + /* Note: Do not forget that input and output buffer can be the same, + * so writing to the output is the last thing being done here. + */ + outReal[outIdx] = aroon; + + outIdx++; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode aroonOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_AROONOSC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, highest, tmp, factor, aroon; +/* Generated */ int outIdx; +/* Generated */ int trailingIdx, lowestIdx, highestIdx, today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-optInTimePeriod; +/* Generated */ lowestIdx = -1; +/* Generated */ highestIdx = -1; +/* Generated */ lowest = 0.0; +/* Generated */ highest = 0.0; +/* Generated */ factor = (double)100.0/(double)optInTimePeriod; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inLow[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inLow[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inLow[i]; +/* Generated */ if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ tmp = inHigh[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inHigh[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inHigh[i]; +/* Generated */ if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ aroon = factor*(highestIdx-lowestIdx); +/* Generated */ outReal[outIdx] = aroon; +/* Generated */ outIdx++; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ASIN.c b/src/ta-lib/src/ta_func/ta_ASIN.c new file mode 100644 index 000000000..19b528325 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ASIN.c @@ -0,0 +1,249 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AsinLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int asinLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ASIN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ASIN - Vector Trigonometric ASin + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode asin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ASIN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_asin(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode asin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ASIN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_asin(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ATAN.c b/src/ta-lib/src/ta_func/ta_ATAN.c new file mode 100644 index 000000000..1e2abe22b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ATAN.c @@ -0,0 +1,251 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AtanLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int atanLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ATAN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ATAN - Vector Trigonometric ATan + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode atan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ATAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Default return values */ + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_atan(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode atan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ATAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_atan(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ATR.c b/src/ta-lib/src/ta_func/ta_ATR.c new file mode 100644 index 000000000..178d8afe8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ATR.c @@ -0,0 +1,466 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AtrLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int atrLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ATR_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* The ATR lookback is the sum of: + * 1 + (optInTimePeriod - 1) + * + * Where 1 is for the True Range, and + * (optInTimePeriod-1) is for the simple + * moving average. + */ + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ATR,Atr); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ATR - Average True Range + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode atr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ATR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ENUM_DECLARATION(RetCode) retCode; + int outIdx, today, lookbackTotal; + int nbATR; + VALUE_HANDLE_INT(outBegIdx1); + VALUE_HANDLE_INT(outNbElement1); + + double prevATR; + ARRAY_REF( tempBuffer ); + ARRAY_LOCAL(prevATRTemp,1); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Average True Range is the greatest of the following: + * + * val1 = distance from today's high to today's low. + * val2 = distance from yesterday's close to today's high. + * val3 = distance from yesterday's close to today's low. + * + * These value are averaged for the specified period using + * Wilder method. This method have an unstable period comparable + * to and Exponential Moving Average (EMA). + */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(ATR)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + /* Trap the case where no smoothing is needed. */ + if( optInTimePeriod <= 1 ) + { + /* No smoothing needed. Just do a TRANGE. */ + return FUNCTION_CALL(TRANGE)( startIdx, endIdx, + inHigh, inLow, inClose, + outBegIdx, outNBElement, outReal ); + } + + /* Allocate an intermediate buffer for TRANGE. */ + ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); + + /* Do TRANGE in the intermediate buffer. */ + retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, + inHigh, inLow, inClose, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), + tempBuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + ARRAY_FREE( tempBuffer ); + return retCode; + } + + /* First value of the ATR is a simple Average of + * the TRANGE output for the specified period. + */ + retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, + optInTimePeriod-1, + tempBuffer, optInTimePeriod, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), + prevATRTemp ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + ARRAY_FREE( tempBuffer ); + return retCode; + } + prevATR = prevATRTemp[0]; + + /* Subsequent value are smoothed using the + * previous ATR value (Wilder's approach). + * 1) Multiply the previous ATR by 'period-1'. + * 2) Add today TR value. + * 3) Divide by 'period'. + */ + today = optInTimePeriod; + outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ATR,Atr); + /* Skip the unstable period. */ + while( outIdx != 0 ) + { + prevATR *= optInTimePeriod - 1; + prevATR += tempBuffer[today++]; + prevATR /= optInTimePeriod; + outIdx--; + } + + /* Now start to write the final ATR in the caller + * provided outReal. + */ + outIdx = 1; + outReal[0] = prevATR; + + /* Now do the number of requested ATR. */ + nbATR = (endIdx - startIdx)+1; + + while( --nbATR != 0 ) + { + prevATR *= optInTimePeriod - 1; + prevATR += tempBuffer[today++]; + prevATR /= optInTimePeriod; + outReal[outIdx++] = prevATR; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + ARRAY_FREE( tempBuffer ); + + return retCode; +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode atr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ATR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int outIdx, today, lookbackTotal; +/* Generated */ int nbATR; +/* Generated */ VALUE_HANDLE_INT(outBegIdx1); +/* Generated */ VALUE_HANDLE_INT(outNbElement1); +/* Generated */ double prevATR; +/* Generated */ ARRAY_REF( tempBuffer ); +/* Generated */ ARRAY_LOCAL(prevATRTemp,1); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackTotal = LOOKBACK_CALL(ATR)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ if( optInTimePeriod <= 1 ) +/* Generated */ { +/* Generated */ return FUNCTION_CALL(TRANGE)( startIdx, endIdx, +/* Generated */ inHigh, inLow, inClose, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ } +/* Generated */ ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); +/* Generated */ retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, +/* Generated */ inHigh, inLow, inClose, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ tempBuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, +/* Generated */ optInTimePeriod-1, +/* Generated */ tempBuffer, optInTimePeriod, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ prevATRTemp ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ prevATR = prevATRTemp[0]; +/* Generated */ today = optInTimePeriod; +/* Generated */ outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ATR,Atr); +/* Generated */ while( outIdx != 0 ) +/* Generated */ { +/* Generated */ prevATR *= optInTimePeriod - 1; +/* Generated */ prevATR += tempBuffer[today++]; +/* Generated */ prevATR /= optInTimePeriod; +/* Generated */ outIdx--; +/* Generated */ } +/* Generated */ outIdx = 1; +/* Generated */ outReal[0] = prevATR; +/* Generated */ nbATR = (endIdx - startIdx)+1; +/* Generated */ while( --nbATR != 0 ) +/* Generated */ { +/* Generated */ prevATR *= optInTimePeriod - 1; +/* Generated */ prevATR += tempBuffer[today++]; +/* Generated */ prevATR /= optInTimePeriod; +/* Generated */ outReal[outIdx++] = prevATR; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_AVGDEV.c b/src/ta-lib/src/ta_func/ta_AVGDEV.c new file mode 100644 index 000000000..c6f50a925 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_AVGDEV.c @@ -0,0 +1,331 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AB Anatoliy Belsky + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090812 AB Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AvgDevLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int avgDevLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_AVGDEV_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_AVGDEV - Average Deviation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode avgDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_AVGDEV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int today, outIdx, lookback; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + lookback = optInTimePeriod - 1; + + if (startIdx < lookback) { + startIdx = lookback; + } + today = startIdx; + + /* Make sure there is still something to evaluate. */ + if( today > endIdx ) { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Process the initial DM and TR */ + VALUE_HANDLE_DEREF(outBegIdx) = today; + + outIdx = 0; + + while (today <= endIdx) { + double todaySum, todayDev; + int i; + + todaySum = 0.0; + for (i = 0; i < optInTimePeriod; i++) { + todaySum += inReal[today-i]; + } + + todayDev = 0.0; + for (i = 0; i < optInTimePeriod; i++) { + todayDev += std_fabs(inReal[today-i] - todaySum/optInTimePeriod); + } + outReal[outIdx] = todayDev/optInTimePeriod; + + outIdx++; + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode avgDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_AVGDEV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, outIdx, lookback; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookback = optInTimePeriod - 1; +/* Generated */ if (startIdx < lookback) { +/* Generated */ startIdx = lookback; +/* Generated */ } +/* Generated */ today = startIdx; +/* Generated */ if( today > endIdx ) { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today; +/* Generated */ outIdx = 0; +/* Generated */ while (today <= endIdx) { +/* Generated */ double todaySum, todayDev; +/* Generated */ int i; +/* Generated */ todaySum = 0.0; +/* Generated */ for (i = 0; i < optInTimePeriod; i++) { +/* Generated */ todaySum += inReal[today-i]; +/* Generated */ } +/* Generated */ todayDev = 0.0; +/* Generated */ for (i = 0; i < optInTimePeriod; i++) { +/* Generated */ todayDev += std_fabs(inReal[today-i] - todaySum/optInTimePeriod); +/* Generated */ } +/* Generated */ outReal[outIdx] = todayDev/optInTimePeriod; +/* Generated */ outIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_AVGPRICE.c b/src/ta-lib/src/ta_func/ta_AVGPRICE.c new file mode 100644 index 000000000..cff8c0b0b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_AVGPRICE.c @@ -0,0 +1,291 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 112605 MF Fix outBegIdx when startIdx != 0 + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::AvgPriceLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int avgPriceLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_AVGPRICE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* This function have no lookback needed. */ + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_AVGPRICE - Average Price + * + * Input = Open, High, Low, Close + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode avgPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_AVGPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Average price = (High + Low + Open + Close) / 4 */ + + outIdx = 0; + + for( i=startIdx; i <= endIdx; i++ ) + { + outReal[outIdx++] = ( inHigh [i] + + inLow [i] + + inClose[i] + + inOpen [i]) / 4; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode avgPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_AVGPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ outIdx = 0; +/* Generated */ for( i=startIdx; i <= endIdx; i++ ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = ( inHigh [i] + +/* Generated */ inLow [i] + +/* Generated */ inClose[i] + +/* Generated */ inOpen [i]) / 4; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_BBANDS.c b/src/ta-lib/src/ta_func/ta_BBANDS.c new file mode 100644 index 000000000..7f5be22f2 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_BBANDS.c @@ -0,0 +1,659 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JV Jesus Viver <324122@cienz.unizar.es> + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 010503 MF Fix to always use SMA for the STDDEV (Thanks to JV). + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::BbandsLookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int bbandsLookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_BBANDS_Lookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ TA_MAType optInMAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInNbDevUp == TA_REAL_DEFAULT ) +/* Generated */ optInNbDevUp = 2.000000e+0; +/* Generated */ else if( (optInNbDevUp < -3.000000e+37) ||/* Generated */ (optInNbDevUp > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInNbDevDn == TA_REAL_DEFAULT ) +/* Generated */ optInNbDevDn = 2.000000e+0; +/* Generated */ else if( (optInNbDevDn < -3.000000e+37) ||/* Generated */ (optInNbDevDn > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInNbDevUp); + UNUSED_VARIABLE(optInNbDevDn); + + /* The lookback is driven by the middle band moving average. */ + return LOOKBACK_CALL(MA)( optInTimePeriod, optInMAType ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_BBANDS - Bollinger Bands + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInNbDevUp:(From TA_REAL_MIN to TA_REAL_MAX) + * Deviation multiplier for upper band + * + * optInNbDevDn:(From TA_REAL_MIN to TA_REAL_MAX) + * Deviation multiplier for lower band + * + * optInMAType: + * Type of Moving Average + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outRealUpperBand, +/* Generated */ SubArray^ outRealMiddleBand, +/* Generated */ SubArray^ outRealLowerBand ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outRealUpperBand, +/* Generated */ cli::array^ outRealMiddleBand, +/* Generated */ cli::array^ outRealLowerBand ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode bbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_BBANDS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ENUM_DECLARATION(RetCode) retCode; + int i; + double tempReal, tempReal2; + ARRAY_REF(tempBuffer1); + ARRAY_REF(tempBuffer2); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInNbDevUp == TA_REAL_DEFAULT ) +/* Generated */ optInNbDevUp = 2.000000e+0; +/* Generated */ else if( (optInNbDevUp < -3.000000e+37) ||/* Generated */ (optInNbDevUp > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInNbDevDn == TA_REAL_DEFAULT ) +/* Generated */ optInNbDevDn = 2.000000e+0; +/* Generated */ else if( (optInNbDevDn < -3.000000e+37) ||/* Generated */ (optInNbDevDn > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outRealUpperBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outRealMiddleBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outRealLowerBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify TWO temporary buffer among the outputs. + * + * These temporary buffers allows to perform the + * calculation without any memory allocation. + * + * Whenever possible, make the tempBuffer1 be the + * middle band output. This will save one copy operation. + */ + #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) + tempBuffer1 = outRealMiddleBand; + tempBuffer2 = outRealLowerBand; + #else + if( inReal == outRealUpperBand ) + { + tempBuffer1 = outRealMiddleBand; + tempBuffer2 = outRealLowerBand; + } + else if( inReal == outRealLowerBand ) + { + tempBuffer1 = outRealMiddleBand; + tempBuffer2 = outRealUpperBand; + } + else if( inReal == outRealMiddleBand ) + { + tempBuffer1 = outRealLowerBand; + tempBuffer2 = outRealUpperBand; + } + else + { + tempBuffer1 = outRealMiddleBand; + tempBuffer2 = outRealUpperBand; + } + /* Check that the caller is not doing tricky things. + * (like using the input buffer in two output!) + */ + if( (tempBuffer1 == inReal) || (tempBuffer2 == inReal) ) + return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); + #endif + + + /* Calculate the middle band, which is a moving average. + * The other two bands will simply add/substract the + * standard deviation from this middle band. + */ + retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, + optInTimePeriod, optInMAType, + outBegIdx, outNBElement, tempBuffer1 ); + + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Calculate the standard deviation into tempBuffer2. */ + if( optInMAType == ENUM_VALUE(MAType,TA_MAType_SMA,Sma) ) + { + /* A small speed optimization by re-using the + * already calculated SMA. + */ + FUNCTION_CALL(INT_stddev_using_precalc_ma)( inReal, tempBuffer1, + (int)VALUE_HANDLE_DEREF(outBegIdx), (int)VALUE_HANDLE_DEREF(outNBElement), + optInTimePeriod, tempBuffer2 ); + } + else + { + /* Calculate the Standard Deviation */ + retCode = FUNCTION_CALL(STDDEV)( (int)VALUE_HANDLE_DEREF(outBegIdx), endIdx, inReal, + optInTimePeriod, 1.0, + outBegIdx, outNBElement, tempBuffer2 ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + } + + /* Copy the MA calculation into the middle band ouput, unless + * the calculation was done into it already! + */ + #if !defined(USE_SINGLE_PRECISION_INPUT) + if( tempBuffer1 != outRealMiddleBand ) + { + ARRAY_COPY( outRealMiddleBand, tempBuffer1, VALUE_HANDLE_DEREF(outNBElement) ); + } + #endif + + /* Now do a tight loop to calculate the upper/lower band at + * the same time. + * + * All the following 5 loops are doing the same, except there + * is an attempt to speed optimize by eliminating uneeded + * multiplication. + */ + if( optInNbDevUp == optInNbDevDn ) + { + if( optInNbDevUp == 1.0 ) + { + /* No standard deviation multiplier needed. */ + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = tempBuffer2[i]; + tempReal2 = outRealMiddleBand[i]; + outRealUpperBand[i] = tempReal2 + tempReal; + outRealLowerBand[i] = tempReal2 - tempReal; + } + } + else + { + /* Upper/lower band use the same standard deviation multiplier. */ + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = tempBuffer2[i] * optInNbDevUp; + tempReal2 = outRealMiddleBand[i]; + outRealUpperBand[i] = tempReal2 + tempReal; + outRealLowerBand[i] = tempReal2 - tempReal; + } + } + } + else if( optInNbDevUp == 1.0 ) + { + /* Only lower band has a standard deviation multiplier. */ + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = tempBuffer2[i]; + tempReal2 = outRealMiddleBand[i]; + outRealUpperBand[i] = tempReal2 + tempReal; + outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); + } + } + else if( optInNbDevDn == 1.0 ) + { + /* Only upper band has a standard deviation multiplier. */ + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = tempBuffer2[i]; + tempReal2 = outRealMiddleBand[i]; + outRealLowerBand[i] = tempReal2 - tempReal; + outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); + } + } + else + { + /* Upper/lower band have distinctive standard deviation multiplier. */ + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = tempBuffer2[i]; + tempReal2 = outRealMiddleBand[i]; + outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); + outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); + } + } + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outRealUpperBand, +/* Generated */ SubArray^ outRealMiddleBand, +/* Generated */ SubArray^ outRealLowerBand ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outRealUpperBand, +/* Generated */ cli::array^ outRealMiddleBand, +/* Generated */ cli::array^ outRealLowerBand ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode bbands( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_BBANDS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outRealUpperBand[], +/* Generated */ double outRealMiddleBand[], +/* Generated */ double outRealLowerBand[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int i; +/* Generated */ double tempReal, tempReal2; +/* Generated */ ARRAY_REF(tempBuffer1); +/* Generated */ ARRAY_REF(tempBuffer2); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInNbDevUp == TA_REAL_DEFAULT ) +/* Generated */ optInNbDevUp = 2.000000e+0; +/* Generated */ else if( (optInNbDevUp < -3.000000e+37) || (optInNbDevUp > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInNbDevDn == TA_REAL_DEFAULT ) +/* Generated */ optInNbDevDn = 2.000000e+0; +/* Generated */ else if( (optInNbDevDn < -3.000000e+37) || (optInNbDevDn > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outRealUpperBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outRealMiddleBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outRealLowerBand ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) +/* Generated */ tempBuffer1 = outRealMiddleBand; +/* Generated */ tempBuffer2 = outRealLowerBand; +/* Generated */ #else +/* Generated */ if( inReal == outRealUpperBand ) +/* Generated */ { +/* Generated */ tempBuffer1 = outRealMiddleBand; +/* Generated */ tempBuffer2 = outRealLowerBand; +/* Generated */ } +/* Generated */ else if( inReal == outRealLowerBand ) +/* Generated */ { +/* Generated */ tempBuffer1 = outRealMiddleBand; +/* Generated */ tempBuffer2 = outRealUpperBand; +/* Generated */ } +/* Generated */ else if( inReal == outRealMiddleBand ) +/* Generated */ { +/* Generated */ tempBuffer1 = outRealLowerBand; +/* Generated */ tempBuffer2 = outRealUpperBand; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ tempBuffer1 = outRealMiddleBand; +/* Generated */ tempBuffer2 = outRealUpperBand; +/* Generated */ } +/* Generated */ if( (tempBuffer1 == inReal) || (tempBuffer2 == inReal) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, +/* Generated */ optInTimePeriod, optInMAType, +/* Generated */ outBegIdx, outNBElement, tempBuffer1 ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ if( optInMAType == ENUM_VALUE(MAType,TA_MAType_SMA,Sma) ) +/* Generated */ { +/* Generated */ FUNCTION_CALL(INT_stddev_using_precalc_ma)( inReal, tempBuffer1, +/* Generated */ (int)VALUE_HANDLE_DEREF(outBegIdx), (int)VALUE_HANDLE_DEREF(outNBElement), +/* Generated */ optInTimePeriod, tempBuffer2 ); +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ retCode = FUNCTION_CALL(STDDEV)( (int)VALUE_HANDLE_DEREF(outBegIdx), endIdx, inReal, +/* Generated */ optInTimePeriod, 1.0, +/* Generated */ outBegIdx, outNBElement, tempBuffer2 ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ } +/* Generated */ #if !defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ if( tempBuffer1 != outRealMiddleBand ) +/* Generated */ { +/* Generated */ ARRAY_COPY( outRealMiddleBand, tempBuffer1, VALUE_HANDLE_DEREF(outNBElement) ); +/* Generated */ } +/* Generated */ #endif +/* Generated */ if( optInNbDevUp == optInNbDevDn ) +/* Generated */ { +/* Generated */ if( optInNbDevUp == 1.0 ) +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = tempBuffer2[i]; +/* Generated */ tempReal2 = outRealMiddleBand[i]; +/* Generated */ outRealUpperBand[i] = tempReal2 + tempReal; +/* Generated */ outRealLowerBand[i] = tempReal2 - tempReal; +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = tempBuffer2[i] * optInNbDevUp; +/* Generated */ tempReal2 = outRealMiddleBand[i]; +/* Generated */ outRealUpperBand[i] = tempReal2 + tempReal; +/* Generated */ outRealLowerBand[i] = tempReal2 - tempReal; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( optInNbDevUp == 1.0 ) +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = tempBuffer2[i]; +/* Generated */ tempReal2 = outRealMiddleBand[i]; +/* Generated */ outRealUpperBand[i] = tempReal2 + tempReal; +/* Generated */ outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); +/* Generated */ } +/* Generated */ } +/* Generated */ else if( optInNbDevDn == 1.0 ) +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = tempBuffer2[i]; +/* Generated */ tempReal2 = outRealMiddleBand[i]; +/* Generated */ outRealLowerBand[i] = tempReal2 - tempReal; +/* Generated */ outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = tempBuffer2[i]; +/* Generated */ tempReal2 = outRealMiddleBand[i]; +/* Generated */ outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); +/* Generated */ outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); +/* Generated */ } +/* Generated */ } +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_BETA.c b/src/ta-lib/src/ta_func/ta_BETA.c new file mode 100644 index 000000000..1aae13091 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_BETA.c @@ -0,0 +1,496 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MW Michael Williamson + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 122006 MW Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::BetaLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int betaLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_BETA_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_BETA - Beta + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode beta( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal0[], +/* Generated */ double inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_BETA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal0[], +/* Generated */ const double inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + double S_xx = 0.0f; /* sum of x * x */ + double S_xy = 0.0f; /* sum of x * y */ + double S_x = 0.0f; /* sum of x */ + double S_y = 0.0f; /* sum of y */ + double last_price_x = 0.0f; /* the last price read from inReal0 */ + double last_price_y = 0.0f; /* the last price read from inReal1 */ + double trailing_last_price_x = 0.0f; /* same as last_price_x except used to remove elements from the trailing summation */ + double trailing_last_price_y = 0.0f; /* same as last_price_y except used to remove elements from the trailing summation */ + double tmp_real = 0.0f; /* temporary variable */ + double x; /* the 'x' value, which is the last change between values in inReal0 */ + double y; /* the 'y' value, which is the last change between values in inReal1 */ + double n = 0.0f; + int i, outIdx; + int trailingIdx, nbInitialElementNeeded; + + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /** DESCRIPTION OF ALGORITHM: + * The Beta 'algorithm' is a measure of a stocks volatility vs from index. The stock prices + * are given in inReal0 and the index prices are give in inReal1. The size of these vectors + * should be equal. The algorithm is to calculate the change between prices in both vectors + * and then 'plot' these changes are points in the Euclidean plane. The x value of the point + * is market return and the y value is the security return. The beta value is the slope of a + * linear regression through these points. A beta of 1 is simple the line y=x, so the stock + * varies percisely with the market. A beta of less than one means the stock varies less than + * the market and a beta of more than one means the stock varies more than market. A related + * value is the Alpha value (see TA_ALPHA) which is the Y-intercept of the same linear regression. + */ + + /* Validate the calculation method type and + * identify the minimum number of input + * consume before the first value is output.. + */ + nbInitialElementNeeded = optInTimePeriod; + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Consume first input. */ + trailingIdx = startIdx-nbInitialElementNeeded; + last_price_x = trailing_last_price_x = inReal0[trailingIdx]; + last_price_y = trailing_last_price_y = inReal1[trailingIdx]; + + /* Process remaining of lookback until ready to output the first value. */ + i = ++trailingIdx; + + while( i < startIdx ) + { + tmp_real = inReal0[i]; + if( !TA_IS_ZERO(last_price_x) ) + x = (tmp_real-last_price_x)/last_price_x; + else + x = 0.0; + last_price_x = tmp_real; + + tmp_real = inReal1[i++]; + if( !TA_IS_ZERO(last_price_y) ) + y = (tmp_real-last_price_y)/last_price_y; + else + y = 0.0; + last_price_y = tmp_real; + + S_xx += x*x; + S_xy += x*y; + S_x += x; + S_y += y; + } + + + outIdx = 0; /* First output always start at index zero */ + n = (double)optInTimePeriod; + do + { + tmp_real = inReal0[i]; + if( !TA_IS_ZERO(last_price_x) ) + x = (tmp_real-last_price_x)/last_price_x; + else + x = 0.0; + last_price_x = tmp_real; + + tmp_real = inReal1[i++]; + if( !TA_IS_ZERO(last_price_y) ) + y = (tmp_real-last_price_y)/last_price_y; + else + y = 0.0; + last_price_y = tmp_real; + + S_xx += x*x; + S_xy += x*y; + S_x += x; + S_y += y; + + /* Always read the trailing before writing the output because the input and output + * buffer can be the same. + */ + tmp_real = inReal0[trailingIdx]; + if( !TA_IS_ZERO(trailing_last_price_x) ) + x = (tmp_real-trailing_last_price_x)/trailing_last_price_x; + else + x = 0.0; + trailing_last_price_x = tmp_real; + + tmp_real = inReal1[trailingIdx++]; + if( !TA_IS_ZERO(trailing_last_price_y) ) + y = (tmp_real-trailing_last_price_y)/trailing_last_price_y; + else + y = 0.0; + trailing_last_price_y = tmp_real; + + /* Write the output */ + tmp_real = (n * S_xx) - (S_x * S_x); + if( !TA_IS_ZERO(tmp_real) ) + outReal[outIdx++] = ((n * S_xy) - (S_x * S_y)) / tmp_real; + else + outReal[outIdx++] = 0.0; + + /* Remove the calculation starting with the trailingIdx. */ + S_xx -= x*x; + S_xy -= x*y; + S_x -= x; + S_y -= y; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode beta( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal0[], +/* Generated */ float inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_BETA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal0[], +/* Generated */ const float inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double S_xx = 0.0f; +/* Generated */ double S_xy = 0.0f; +/* Generated */ double S_x = 0.0f; +/* Generated */ double S_y = 0.0f; +/* Generated */ double last_price_x = 0.0f; +/* Generated */ double last_price_y = 0.0f; +/* Generated */ double trailing_last_price_x = 0.0f; +/* Generated */ double trailing_last_price_y = 0.0f; +/* Generated */ double tmp_real = 0.0f; +/* Generated */ double x; +/* Generated */ double y; +/* Generated */ double n = 0.0f; +/* Generated */ int i, outIdx; +/* Generated */ int trailingIdx, nbInitialElementNeeded; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = optInTimePeriod; +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ last_price_x = trailing_last_price_x = inReal0[trailingIdx]; +/* Generated */ last_price_y = trailing_last_price_y = inReal1[trailingIdx]; +/* Generated */ i = ++trailingIdx; +/* Generated */ while( i < startIdx ) +/* Generated */ { +/* Generated */ tmp_real = inReal0[i]; +/* Generated */ if( !TA_IS_ZERO(last_price_x) ) +/* Generated */ x = (tmp_real-last_price_x)/last_price_x; +/* Generated */ else +/* Generated */ x = 0.0; +/* Generated */ last_price_x = tmp_real; +/* Generated */ tmp_real = inReal1[i++]; +/* Generated */ if( !TA_IS_ZERO(last_price_y) ) +/* Generated */ y = (tmp_real-last_price_y)/last_price_y; +/* Generated */ else +/* Generated */ y = 0.0; +/* Generated */ last_price_y = tmp_real; +/* Generated */ S_xx += x*x; +/* Generated */ S_xy += x*y; +/* Generated */ S_x += x; +/* Generated */ S_y += y; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ n = (double)optInTimePeriod; +/* Generated */ do +/* Generated */ { +/* Generated */ tmp_real = inReal0[i]; +/* Generated */ if( !TA_IS_ZERO(last_price_x) ) +/* Generated */ x = (tmp_real-last_price_x)/last_price_x; +/* Generated */ else +/* Generated */ x = 0.0; +/* Generated */ last_price_x = tmp_real; +/* Generated */ tmp_real = inReal1[i++]; +/* Generated */ if( !TA_IS_ZERO(last_price_y) ) +/* Generated */ y = (tmp_real-last_price_y)/last_price_y; +/* Generated */ else +/* Generated */ y = 0.0; +/* Generated */ last_price_y = tmp_real; +/* Generated */ S_xx += x*x; +/* Generated */ S_xy += x*y; +/* Generated */ S_x += x; +/* Generated */ S_y += y; +/* Generated */ tmp_real = inReal0[trailingIdx]; +/* Generated */ if( !TA_IS_ZERO(trailing_last_price_x) ) +/* Generated */ x = (tmp_real-trailing_last_price_x)/trailing_last_price_x; +/* Generated */ else +/* Generated */ x = 0.0; +/* Generated */ trailing_last_price_x = tmp_real; +/* Generated */ tmp_real = inReal1[trailingIdx++]; +/* Generated */ if( !TA_IS_ZERO(trailing_last_price_y) ) +/* Generated */ y = (tmp_real-trailing_last_price_y)/trailing_last_price_y; +/* Generated */ else +/* Generated */ y = 0.0; +/* Generated */ trailing_last_price_y = tmp_real; +/* Generated */ tmp_real = (n * S_xx) - (S_x * S_x); +/* Generated */ if( !TA_IS_ZERO(tmp_real) ) +/* Generated */ outReal[outIdx++] = ((n * S_xy) - (S_x * S_y)) / tmp_real; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ S_xx -= x*x; +/* Generated */ S_xy -= x*y; +/* Generated */ S_x -= x; +/* Generated */ S_y -= y; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_BOP.c b/src/ta-lib/src/ta_func/ta_BOP.c new file mode 100644 index 000000000..bda80a9b8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_BOP.c @@ -0,0 +1,292 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112605 MF Initial coding. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::BopLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int bopLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_BOP_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_BOP - Balance Of Power + * + * Input = Open, High, Low, Close + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode bop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_BOP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx, i; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* BOP = (Close - Open)/(High - Low) */ + + outIdx = 0; + + for( i=startIdx; i <= endIdx; i++ ) + { + tempReal = inHigh[i]-inLow[i]; + if( TA_IS_ZERO_OR_NEG(tempReal) ) + outReal[outIdx++] = 0.0; + else + outReal[outIdx++] = (inClose[i] - inOpen[i])/tempReal; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode bop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_BOP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ outIdx = 0; +/* Generated */ for( i=startIdx; i <= endIdx; i++ ) +/* Generated */ { +/* Generated */ tempReal = inHigh[i]-inLow[i]; +/* Generated */ if( TA_IS_ZERO_OR_NEG(tempReal) ) +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = (inClose[i] - inOpen[i])/tempReal; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CCI.c b/src/ta-lib/src/ta_func/ta_CCI.c new file mode 100644 index 000000000..5b8753cbd --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CCI.c @@ -0,0 +1,429 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 031202 MF Template creation. + * 052603 MF Port to managed C++. Change to use CIRCBUF macros. + * 061704 MF Lower limit for period to 2, and correct algorithm + * to avoid cummulative error when value are close to + * the floating point epsilon. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CciLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cciLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CCI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CCI - Commodity Channel Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cci( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CCI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + + /* insert local variable here */ + double tempReal, tempReal2, theAverage, lastValue; + int i, j, outIdx, lookbackTotal; + + /* This ptr will points on a circular buffer of + * at least "optInTimePeriod" element. + */ + CIRCBUF_PROLOG(circBuffer,double,30); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Allocate a circular buffer equal to the requested + * period. + */ + CIRCBUF_INIT( circBuffer, double, optInTimePeriod ); + + /* Do the MA calculation using tight loops. */ + + /* Add-up the initial period, except for the last value. + * Fill up the circular buffer at the same time. + */ + i=startIdx-lookbackTotal; + if( optInTimePeriod > 1 ) + { + while( i < startIdx ) + { + circBuffer[circBuffer_Idx] = (inHigh[i]+inLow[i]+inClose[i])/3; + i++; + CIRCBUF_NEXT(circBuffer); + } + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the inReal and + * outReal to be the same buffer. + */ + outIdx = 0; + do + { + lastValue = (inHigh[i]+inLow[i]+inClose[i])/3; + circBuffer[circBuffer_Idx] = lastValue; + + /* Calculate the average for the whole period. */ + theAverage = 0; + for( j=0; j < optInTimePeriod; j++ ) + theAverage += circBuffer[j]; + theAverage /= optInTimePeriod; + + /* Do the summation of the ABS(TypePrice-average) + * for the whole period. + */ + tempReal2 = 0; + for( j=0; j < optInTimePeriod; j++ ) + tempReal2 += std_fabs(circBuffer[j]-theAverage); + + /* And finally, the CCI... */ + tempReal = lastValue-theAverage; + + if( (tempReal != 0.0) && (tempReal2 != 0.0) ) + { + outReal[outIdx++] = tempReal/(0.015*(tempReal2/optInTimePeriod)); + } + else + outReal[outIdx++] = 0.0; + + /* Move forward the circular buffer indexes. */ + CIRCBUF_NEXT(circBuffer); + + i++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Free the circular buffer if it was dynamically allocated. */ + CIRCBUF_DESTROY(circBuffer); + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cci( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CCI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double tempReal, tempReal2, theAverage, lastValue; +/* Generated */ int i, j, outIdx, lookbackTotal; +/* Generated */ CIRCBUF_PROLOG(circBuffer,double,30); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = (optInTimePeriod-1); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ CIRCBUF_INIT( circBuffer, double, optInTimePeriod ); +/* Generated */ i=startIdx-lookbackTotal; +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ { +/* Generated */ while( i < startIdx ) +/* Generated */ { +/* Generated */ circBuffer[circBuffer_Idx] = (inHigh[i]+inLow[i]+inClose[i])/3; +/* Generated */ i++; +/* Generated */ CIRCBUF_NEXT(circBuffer); +/* Generated */ } +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ lastValue = (inHigh[i]+inLow[i]+inClose[i])/3; +/* Generated */ circBuffer[circBuffer_Idx] = lastValue; +/* Generated */ theAverage = 0; +/* Generated */ for( j=0; j < optInTimePeriod; j++ ) +/* Generated */ theAverage += circBuffer[j]; +/* Generated */ theAverage /= optInTimePeriod; +/* Generated */ tempReal2 = 0; +/* Generated */ for( j=0; j < optInTimePeriod; j++ ) +/* Generated */ tempReal2 += std_fabs(circBuffer[j]-theAverage); +/* Generated */ tempReal = lastValue-theAverage; +/* Generated */ if( (tempReal != 0.0) && (tempReal2 != 0.0) ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = tempReal/(0.015*(tempReal2/optInTimePeriod)); +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ CIRCBUF_NEXT(circBuffer); +/* Generated */ i++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ CIRCBUF_DESTROY(circBuffer); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL2CROWS.c b/src/ta-lib/src/ta_func/ta_CDL2CROWS.c new file mode 100644 index 000000000..521c13e56 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL2CROWS.c @@ -0,0 +1,369 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl2CrowsLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl2CrowsLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL2CROWS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(BodyLong) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL2CROWS - Two Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL2CROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal; + int i, outIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL2CROWS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white candle + * - second candle: black real body + * - gap between the first and the second candle's real bodies + * - third candle: black candle that opens within the second real body and closes within the first real body + * The meaning of "long" is specified with TA_SetCandleSettings + * outInteger is negative (-1 to -100): two crows is always bearish; + * the user should consider that two crows is significant when it appears in an uptrend, while this function + * does not consider the trend + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white + TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long + TA_CANDLECOLOR(i-1) == -1 && // 2nd: black + TA_REALBODYGAPUP(i-1,i-2) && // gapping up + TA_CANDLECOLOR(i) == -1 && // 3rd: black + inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // opening within 2nd rb + inClose[i] > inOpen[i-2] && inClose[i] < inClose[i-2] // closing within 1st rb + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + i++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL2CROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL2CROWS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white +/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd: black +/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd: black +/* Generated */ inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // opening within 2nd rb +/* Generated */ inClose[i] > inOpen[i-2] && inClose[i] < inClose[i-2] // closing within 1st rb +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c b/src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c new file mode 100644 index 000000000..a4e1ff5b2 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c @@ -0,0 +1,397 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 103004 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl3BlackCrowsLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl3BlackCrowsLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL3BLACKCROWS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(ShadowVeryShort) + 3; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL3BLACKCROWS - Three Black Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3BlackCrows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL3BLACKCROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); + int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL3BLACKCROWS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal[2] = 0; + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortPeriodTotal[0] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three consecutive and declining black candlesticks + * - each candle must have no or very short lower shadow + * - each candle after the first must open within the prior candle's real body + * - the first candle's close should be under the prior white candle's high + * The meaning of "very short" is specified with TA_SetCandleSettings + * outInteger is negative (-1 to -100): three black crows is always bearish; + * the user should consider that 3 black crows is significant when it appears after a mature advance or at high levels, + * while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-3) == 1 && // white + TA_CANDLECOLOR(i-2) == -1 && // 1st black + TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && + // very short lower shadow + TA_CANDLECOLOR(i-1) == -1 && // 2nd black + TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + // very short lower shadow + TA_CANDLECOLOR(i) == -1 && // 3rd black + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + // very short lower shadow + inOpen[i-1] < inOpen[i-2] && inOpen[i-1] > inClose[i-2] && // 2nd black opens within 1st black's rb + inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // 3rd black opens within 2nd black's rb + inHigh[i-3] > inClose[i-2] && // 1st black closes under prior candle's high + inClose[i-2] > inClose[i-1] && // three declining + inClose[i-1] > inClose[i] // three declining + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 2; totIdx >= 0; --totIdx) + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + i++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3BlackCrows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL3BLACKCROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); +/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3BLACKCROWS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-3) == 1 && // white +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // 1st black +/* Generated */ TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && +/* Generated */ // very short lower shadow +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd black +/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ // very short lower shadow +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ // very short lower shadow +/* Generated */ inOpen[i-1] < inOpen[i-2] && inOpen[i-1] > inClose[i-2] && // 2nd black opens within 1st black's rb +/* Generated */ inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // 3rd black opens within 2nd black's rb +/* Generated */ inHigh[i-3] > inClose[i-2] && // 1st black closes under prior candle's high +/* Generated */ inClose[i-2] > inClose[i-1] && // three declining +/* Generated */ inClose[i-1] > inClose[i] // three declining +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL3INSIDE.c b/src/ta-lib/src/ta_func/ta_CDL3INSIDE.c new file mode 100644 index 000000000..ab8a06f9c --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL3INSIDE.c @@ -0,0 +1,388 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl3InsideLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl3InsideLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL3INSIDE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL3INSIDE - Three Inside Up/Down + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3Inside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL3INSIDE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL3INSIDE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx-1 ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white (black) real body + * - second candle: short real body totally engulfed by the first + * - third candle: black (white) candle that closes lower (higher) than the first candle's open + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) for the three inside up or negative (-1 to -100) for the three inside down; + * the user should consider that a three inside up is significant when it appears in a downtrend and a three inside + * down is significant when it appears in an uptrend, while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short + max( inClose[i-1], inOpen[i-1] ) < max( inClose[i-2], inOpen[i-2] ) && // engulfed by 1st + min( inClose[i-1], inOpen[i-1] ) > min( inClose[i-2], inOpen[i-2] ) && + ( ( TA_CANDLECOLOR(i-2) == 1 && TA_CANDLECOLOR(i) == -1 && inClose[i] < inOpen[i-2] ) // 3rd: opposite to 1st + || // and closing out + ( TA_CANDLECOLOR(i-2) == -1 && TA_CANDLECOLOR(i) == 1 && inClose[i] > inOpen[i-2] ) + ) + ) + outInteger[outIdx++] = -TA_CANDLECOLOR(i-2) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3Inside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL3INSIDE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3INSIDE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short +/* Generated */ max( inClose[i-1], inOpen[i-1] ) < max( inClose[i-2], inOpen[i-2] ) && // engulfed by 1st +/* Generated */ min( inClose[i-1], inOpen[i-1] ) > min( inClose[i-2], inOpen[i-2] ) && +/* Generated */ ( ( TA_CANDLECOLOR(i-2) == 1 && TA_CANDLECOLOR(i) == -1 && inClose[i] < inOpen[i-2] ) // 3rd: opposite to 1st +/* Generated */ || // and closing out +/* Generated */ ( TA_CANDLECOLOR(i-2) == -1 && TA_CANDLECOLOR(i) == 1 && inClose[i] > inOpen[i-2] ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-2) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c b/src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c new file mode 100644 index 000000000..695a80333 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c @@ -0,0 +1,410 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl3LineStrikeLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl3LineStrikeLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL3LINESTRIKE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(Near) + 3; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL3LINESTRIKE - Three-Line Strike + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3LineStrike( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL3LINESTRIKE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(NearPeriodTotal,4); + int i, outIdx, totIdx, NearTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL3LINESTRIKE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + NearPeriodTotal[3] = 0; + NearPeriodTotal[2] = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal[3] += TA_CANDLERANGE( Near, i-3 ); + NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three white soldiers (three black crows): three white (black) candlesticks with consecutively higher (lower) closes, + * each opening within or near the previous real body + * - fourth candle: black (white) candle that opens above (below) prior candle's close and closes below (above) + * the first candle's open + * The meaning of "near" is specified with TA_SetCandleSettings; + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that 3-line strike is significant when it appears in a trend in the same direction of + * the first three candles, while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && // three with same color + TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && + TA_CANDLECOLOR(i) == -TA_CANDLECOLOR(i-1) && // 4th opposite color + // 2nd opens within/near 1st rb + inOpen[i-2] >= min( inOpen[i-3], inClose[i-3] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && + inOpen[i-2] <= max( inOpen[i-3], inClose[i-3] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && + // 3rd opens within/near 2nd rb + inOpen[i-1] >= min( inOpen[i-2], inClose[i-2] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && + inOpen[i-1] <= max( inOpen[i-2], inClose[i-2] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && + ( + ( // if three white + TA_CANDLECOLOR(i-1) == 1 && + inClose[i-1] > inClose[i-2] && inClose[i-2] > inClose[i-3] && // consecutive higher closes + inOpen[i] > inClose[i-1] && // 4th opens above prior close + inClose[i] < inOpen[i-3] // 4th closes below 1st open + ) || + ( // if three black + TA_CANDLECOLOR(i-1) == -1 && + inClose[i-1] < inClose[i-2] && inClose[i-2] < inClose[i-3] && // consecutive lower closes + inOpen[i] < inClose[i-1] && // 4th opens below prior close + inClose[i] > inOpen[i-3] // 4th closes above 1st open + ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 3; totIdx >= 2; --totIdx) + NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) + - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); + i++; + NearTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3LineStrike( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL3LINESTRIKE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(NearPeriodTotal,4); +/* Generated */ int i, outIdx, totIdx, NearTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3LINESTRIKE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ NearPeriodTotal[3] = 0; +/* Generated */ NearPeriodTotal[2] = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal[3] += TA_CANDLERANGE( Near, i-3 ); +/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && // three with same color +/* Generated */ TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && +/* Generated */ TA_CANDLECOLOR(i) == -TA_CANDLECOLOR(i-1) && // 4th opposite color +/* Generated */ // 2nd opens within/near 1st rb +/* Generated */ inOpen[i-2] >= min( inOpen[i-3], inClose[i-3] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && +/* Generated */ inOpen[i-2] <= max( inOpen[i-3], inClose[i-3] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && +/* Generated */ // 3rd opens within/near 2nd rb +/* Generated */ inOpen[i-1] >= min( inOpen[i-2], inClose[i-2] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && +/* Generated */ inOpen[i-1] <= max( inOpen[i-2], inClose[i-2] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && +/* Generated */ ( +/* Generated */ ( // if three white +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && +/* Generated */ inClose[i-1] > inClose[i-2] && inClose[i-2] > inClose[i-3] && // consecutive higher closes +/* Generated */ inOpen[i] > inClose[i-1] && // 4th opens above prior close +/* Generated */ inClose[i] < inOpen[i-3] // 4th closes below 1st open +/* Generated */ ) || +/* Generated */ ( // if three black +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && +/* Generated */ inClose[i-1] < inClose[i-2] && inClose[i-2] < inClose[i-3] && // consecutive lower closes +/* Generated */ inOpen[i] < inClose[i-1] && // 4th opens below prior close +/* Generated */ inClose[i] > inOpen[i-3] // 4th closes above 1st open +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 3; totIdx >= 2; --totIdx) +/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ NearTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c b/src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c new file mode 100644 index 000000000..61a2f52a1 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c @@ -0,0 +1,351 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl3OutsideLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl3OutsideLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL3OUTSIDE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return 3; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL3OUTSIDE - Three Outside Up/Down + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3Outside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL3OUTSIDE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int i, outIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL3OUTSIDE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first: black (white) real body + * - second: white (black) real body that engulfs the prior real body + * - third: candle that closes higher (lower) than the second candle + * outInteger is positive (1 to 100) for the three outside up or negative (-1 to -100) for the three outside down; + * the user should consider that a three outside up must appear in a downtrend and three outside down must appear + * in an uptrend, while this function does not consider it + */ + outIdx = 0; + do + { + if( ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLECOLOR(i-2) == -1 && // white engulfs black + inClose[i-1] > inOpen[i-2] && inOpen[i-1] < inClose[i-2] && + inClose[i] > inClose[i-1] // third candle higher + ) + || + ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLECOLOR(i-2) == 1 && // black engulfs white + inOpen[i-1] > inClose[i-2] && inClose[i-1] < inOpen[i-2] && + inClose[i] < inClose[i-1] // third candle lower + ) + ) + { + outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; + } + else + outInteger[outIdx++] = 0; + i++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3Outside( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL3OUTSIDE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i, outIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3OUTSIDE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLECOLOR(i-2) == -1 && // white engulfs black +/* Generated */ inClose[i-1] > inOpen[i-2] && inOpen[i-1] < inClose[i-2] && +/* Generated */ inClose[i] > inClose[i-1] // third candle higher +/* Generated */ ) +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLECOLOR(i-2) == 1 && // black engulfs white +/* Generated */ inOpen[i-1] > inClose[i-2] && inClose[i-1] < inOpen[i-2] && +/* Generated */ inClose[i] < inClose[i-1] // third candle lower +/* Generated */ ) +/* Generated */ ) +/* Generated */ { +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; +/* Generated */ } +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ i++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c b/src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c new file mode 100644 index 000000000..a3a59d7fe --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c @@ -0,0 +1,465 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 022705 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl3StarsInSouthLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl3StarsInSouthLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL3STARSINSOUTH_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(ShadowLong) ), + max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(BodyShort) ) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL3STARSINSOUTH - Three Stars In The South + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3StarsInSouth( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL3STARSINSOUTH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal, BodyShortPeriodTotal, ShadowLongPeriodTotal; + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); + int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, + lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL3STARSINSOUTH)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortPeriodTotal[0] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + BodyShortPeriodTotal = 0; + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle with long lower shadow + * - second candle: smaller black candle that opens higher than prior close but within prior candle's range + * and trades lower than prior close but not lower than prior low and closes off of its low (it has a shadow) + * - third candle: small black marubozu (or candle with very short shadows) engulfed by prior candle's range + * The meanings of "long body", "short body", "very short shadow" are specified with TA_SetCandleSettings; + * outInteger is positive (1 to 100): 3 stars in the south is always bullish; + * the user should consider that 3 stars in the south is significant when it appears in downtrend, while this function + * does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == -1 && // 1st black + TA_CANDLECOLOR(i-1) == -1 && // 2nd black + TA_CANDLECOLOR(i) == -1 && // 3rd black + // 1st: long + TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && + // with long lower shadow + TA_LOWERSHADOW(i-2) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i-2 ) && + TA_REALBODY(i-1) < TA_REALBODY(i-2) && // 2nd: smaller candle + inOpen[i-1] > inClose[i-2] && inOpen[i-1] <= inHigh[i-2] && // that opens higher but within 1st range + inLow[i-1] < inClose[i-2] && // and trades lower than 1st close + inLow[i-1] >= inLow[i-2] && // but not lower than 1st low + // and has a lower shadow + TA_LOWERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + // 3rd: small marubozu + TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + inLow[i] > inLow[i-1] && inHigh[i] < inHigh[i-1] // engulfed by prior candle's range + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ) + - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-2 ); + for (totIdx = 1; totIdx >= 0; --totIdx) + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) + - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + ShadowLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3StarsInSouth( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL3STARSINSOUTH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal, BodyShortPeriodTotal, ShadowLongPeriodTotal; +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); +/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, +/* Generated */ lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3STARSINSOUTH)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == -1 && // 1st black +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd black +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black +/* Generated */ // 1st: long +/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && +/* Generated */ // with long lower shadow +/* Generated */ TA_LOWERSHADOW(i-2) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i-2 ) && +/* Generated */ TA_REALBODY(i-1) < TA_REALBODY(i-2) && // 2nd: smaller candle +/* Generated */ inOpen[i-1] > inClose[i-2] && inOpen[i-1] <= inHigh[i-2] && // that opens higher but within 1st range +/* Generated */ inLow[i-1] < inClose[i-2] && // and trades lower than 1st close +/* Generated */ inLow[i-1] >= inLow[i-2] && // but not lower than 1st low +/* Generated */ // and has a lower shadow +/* Generated */ TA_LOWERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ // 3rd: small marubozu +/* Generated */ TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ inLow[i] > inLow[i-1] && inHigh[i] < inHigh[i-1] // engulfed by prior candle's range +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ) +/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-2 ); +/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c b/src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c new file mode 100644 index 000000000..11ae6f618 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c @@ -0,0 +1,489 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120404 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Cdl3WhiteSoldiersLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdl3WhiteSoldiersLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDL3WHITESOLDIERS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyShort) ), + max( TA_CANDLEAVGPERIOD(Far), TA_CANDLEAVGPERIOD(Near) ) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3WhiteSoldiers( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDL3WHITESOLDIERS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); + ARRAY_LOCAL(NearPeriodTotal,3); + ARRAY_LOCAL(FarPeriodTotal,3); + double BodyShortPeriodTotal; + int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, FarTrailingIdx, BodyShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDL3WHITESOLDIERS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal[2] = 0; + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortPeriodTotal[0] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + NearPeriodTotal[2] = 0; + NearPeriodTotal[1] = 0; + NearPeriodTotal[0] = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + FarPeriodTotal[2] = 0; + FarPeriodTotal[1] = 0; + FarPeriodTotal[0] = 0; + FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); + BodyShortPeriodTotal = 0; + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); + NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); + i++; + } + i = FarTrailingIdx; + while( i < startIdx ) { + FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); + FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three white candlesticks with consecutively higher closes + * - Greg Morris wants them to be long, Steve Nison doesn't; anyway they should not be short + * - each candle opens within or near the previous white real body + * - each candle must have no or very short upper shadow + * - to differentiate this pattern from advance block, each candle must not be far shorter than the prior candle + * The meanings of "not short", "very short shadow", "far" and "near" are specified with TA_SetCandleSettings; + * here the 3 candles must be not short, if you want them to be long use TA_SetCandleSettings on BodyShort; + * outInteger is positive (1 to 100): advancing 3 white soldiers is always bullish; + * the user should consider that 3 white soldiers is significant when it appears in downtrend, while this function + * does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == 1 && // 1st white + TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && + // very short upper shadow + TA_CANDLECOLOR(i-1) == 1 && // 2nd white + TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + // very short upper shadow + TA_CANDLECOLOR(i) == 1 && // 3rd white + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + // very short upper shadow + inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes + inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body + inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && + inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body + inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && + TA_REALBODY(i-1) > TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && + // 2nd not far shorter than 1st + TA_REALBODY(i) > TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) && + // 3rd not far shorter than 2nd + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // not short real body + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 2; totIdx >= 0; --totIdx) + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + for (totIdx = 2; totIdx >= 1; --totIdx) { + FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) + - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); + NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) + - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); + } + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + ShadowVeryShortTrailingIdx++; + NearTrailingIdx++; + FarTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdl3WhiteSoldiers( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDL3WHITESOLDIERS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); +/* Generated */ ARRAY_LOCAL(NearPeriodTotal,3); +/* Generated */ ARRAY_LOCAL(FarPeriodTotal,3); +/* Generated */ double BodyShortPeriodTotal; +/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, FarTrailingIdx, BodyShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3WHITESOLDIERS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ NearPeriodTotal[2] = 0; +/* Generated */ NearPeriodTotal[1] = 0; +/* Generated */ NearPeriodTotal[0] = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ FarPeriodTotal[2] = 0; +/* Generated */ FarPeriodTotal[1] = 0; +/* Generated */ FarPeriodTotal[0] = 0; +/* Generated */ FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); +/* Generated */ NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = FarTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); +/* Generated */ FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st white +/* Generated */ TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && +/* Generated */ // very short upper shadow +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd white +/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ // very short upper shadow +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ // very short upper shadow +/* Generated */ inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes +/* Generated */ inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body +/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && +/* Generated */ inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body +/* Generated */ inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && +/* Generated */ TA_REALBODY(i-1) > TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && +/* Generated */ // 2nd not far shorter than 1st +/* Generated */ TA_REALBODY(i) > TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) && +/* Generated */ // 3rd not far shorter than 2nd +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // not short real body +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) { +/* Generated */ FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); +/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); +/* Generated */ } +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ NearTrailingIdx++; +/* Generated */ FarTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c b/src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c new file mode 100644 index 000000000..e480e0807 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c @@ -0,0 +1,473 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 102304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlAbandonedBabyLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlAbandonedBabyLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLABANDONEDBABY_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + + return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ), + TA_CANDLEAVGPERIOD(BodyShort) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLABANDONEDBABY - Abandoned Baby + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlAbandonedBaby( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLABANDONEDBABY( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLABANDONEDBABY)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyDojiPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyDojiTrailingIdx; + while( i < startIdx-1 ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white (black) real body + * - second candle: doji + * - third candle: black (white) real body that moves well within the first candle's real body + * - upside (downside) gap between the first candle and the doji (the shadows of the two candles don't touch) + * - downside (upside) gap between the doji and the third candle (the shadows of the two candles don't touch) + * The meaning of "doji" and "long" is specified with TA_SetCandleSettings + * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should + * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want + * it to be relatively long + * outInteger is positive (1 to 100) when it's an abandoned baby bottom or negative (-1 to -100) when it's + * an abandoned baby top; the user should consider that an abandoned baby is significant when it appears in + * an uptrend or downtrend, while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short + ( ( TA_CANDLECOLOR(i-2) == 1 && // 1st white + TA_CANDLECOLOR(i) == -1 && // 3rd black + inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb + TA_CANDLEGAPUP(i-1,i-2) && // upside gap between 1st and 2nd + TA_CANDLEGAPDOWN(i,i-1) // downside gap between 2nd and 3rd + ) + || + ( + TA_CANDLECOLOR(i-2) == -1 && // 1st black + TA_CANDLECOLOR(i) == 1 && // 3rd white + inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb + TA_CANDLEGAPDOWN(i-1,i-2) && // downside gap between 1st and 2nd + TA_CANDLEGAPUP(i,i-1) // upside gap between 2nd and 3rd + ) + ) + ) + { + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + } + else + { + outInteger[outIdx++] = 0; + } + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyDojiTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlAbandonedBaby( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLABANDONEDBABY( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLABANDONEDBABY)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short +/* Generated */ ( ( TA_CANDLECOLOR(i-2) == 1 && // 1st white +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black +/* Generated */ inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb +/* Generated */ TA_CANDLEGAPUP(i-1,i-2) && // upside gap between 1st and 2nd +/* Generated */ TA_CANDLEGAPDOWN(i,i-1) // downside gap between 2nd and 3rd +/* Generated */ ) +/* Generated */ || +/* Generated */ ( +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // 1st black +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white +/* Generated */ inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb +/* Generated */ TA_CANDLEGAPDOWN(i-1,i-2) && // downside gap between 1st and 2nd +/* Generated */ TA_CANDLEGAPUP(i,i-1) // upside gap between 2nd and 3rd +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ { +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ } +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c b/src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c new file mode 100644 index 000000000..f5cfa968e --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c @@ -0,0 +1,561 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120404 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlAdvanceBlockLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlAdvanceBlockLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLADVANCEBLOCK_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( max( TA_CANDLEAVGPERIOD(ShadowLong), TA_CANDLEAVGPERIOD(ShadowShort) ), + max( TA_CANDLEAVGPERIOD(Far), TA_CANDLEAVGPERIOD(Near) ) ), + TA_CANDLEAVGPERIOD(BodyLong) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLADVANCEBLOCK - Advance Block + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlAdvanceBlock( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLADVANCEBLOCK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowShortPeriodTotal,3); + ARRAY_LOCAL(ShadowLongPeriodTotal,2); + ARRAY_LOCAL(NearPeriodTotal,3); + ARRAY_LOCAL(FarPeriodTotal,3); + double BodyLongPeriodTotal; + int i, outIdx, totIdx, BodyLongTrailingIdx, ShadowShortTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, + FarTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLADVANCEBLOCK)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowShortPeriodTotal[2] = 0; + ShadowShortPeriodTotal[1] = 0; + ShadowShortPeriodTotal[0] = 0; + ShadowShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); + ShadowLongPeriodTotal[1] = 0; + ShadowLongPeriodTotal[0] = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + NearPeriodTotal[2] = 0; + NearPeriodTotal[1] = 0; + NearPeriodTotal[0] = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + FarPeriodTotal[2] = 0; + FarPeriodTotal[1] = 0; + FarPeriodTotal[0] = 0; + FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = ShadowShortTrailingIdx; + while( i < startIdx ) { + ShadowShortPeriodTotal[2] += TA_CANDLERANGE( ShadowShort, i-2 ); + ShadowShortPeriodTotal[1] += TA_CANDLERANGE( ShadowShort, i-1 ); + ShadowShortPeriodTotal[0] += TA_CANDLERANGE( ShadowShort, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal[1] += TA_CANDLERANGE( ShadowLong, i-1 ); + ShadowLongPeriodTotal[0] += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); + NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); + i++; + } + i = FarTrailingIdx; + while( i < startIdx ) { + FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); + FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three white candlesticks with consecutively higher closes + * - each candle opens within or near the previous white real body + * - first candle: long white with no or very short upper shadow (a short shadow is accepted too for more flexibility) + * - second and third candles, or only third candle, show signs of weakening: progressively smaller white real bodies + * and/or relatively long upper shadows; see below for specific conditions + * The meanings of "long body", "short shadow", "far" and "near" are specified with TA_SetCandleSettings; + * outInteger is negative (-1 to -100): advance block is always bearish; + * the user should consider that advance block is significant when it appears in uptrend, while this function + * does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == 1 && // 1st white + TA_CANDLECOLOR(i-1) == 1 && // 2nd white + TA_CANDLECOLOR(i) == 1 && // 3rd white + inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes + inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body + inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && + inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body + inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && + TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long real body + TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[2], i-2 ) && + // 1st: short upper shadow + ( + // ( 2 far smaller than 1 && 3 not longer than 2 ) + // advance blocked with the 2nd, 3rd must not carry on the advance + ( + TA_REALBODY(i-1) < TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && + TA_REALBODY(i) < TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) + ) || + // 3 far smaller than 2 + // advance blocked with the 3rd + ( + TA_REALBODY(i) < TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) + ) || + // ( 3 smaller than 2 && 2 smaller than 1 && (3 or 2 not short upper shadow) ) + // advance blocked with progressively smaller real bodies and some upper shadows + ( + TA_REALBODY(i) < TA_REALBODY(i-1) && + TA_REALBODY(i-1) < TA_REALBODY(i-2) && + ( + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[0], i ) || + TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[1], i-1 ) + ) + ) || + // ( 3 smaller than 2 && 3 long upper shadow ) + // advance blocked with 3rd candle's long upper shadow and smaller body + ( + TA_REALBODY(i) < TA_REALBODY(i-1) && + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal[0], i ) + ) + ) + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 2; totIdx >= 0; --totIdx) + ShadowShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowShort, i-totIdx ) + - TA_CANDLERANGE( ShadowShort, ShadowShortTrailingIdx-totIdx ); + for (totIdx = 1; totIdx >= 0; --totIdx) + ShadowLongPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowLong, i-totIdx ) + - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-totIdx ); + for (totIdx = 2; totIdx >= 1; --totIdx) { + FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) + - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); + NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) + - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); + } + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); + i++; + ShadowShortTrailingIdx++; + ShadowLongTrailingIdx++; + NearTrailingIdx++; + FarTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlAdvanceBlock( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLADVANCEBLOCK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowShortPeriodTotal,3); +/* Generated */ ARRAY_LOCAL(ShadowLongPeriodTotal,2); +/* Generated */ ARRAY_LOCAL(NearPeriodTotal,3); +/* Generated */ ARRAY_LOCAL(FarPeriodTotal,3); +/* Generated */ double BodyLongPeriodTotal; +/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, ShadowShortTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, +/* Generated */ FarTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLADVANCEBLOCK)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowShortPeriodTotal[2] = 0; +/* Generated */ ShadowShortPeriodTotal[1] = 0; +/* Generated */ ShadowShortPeriodTotal[0] = 0; +/* Generated */ ShadowShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); +/* Generated */ ShadowLongPeriodTotal[1] = 0; +/* Generated */ ShadowLongPeriodTotal[0] = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ NearPeriodTotal[2] = 0; +/* Generated */ NearPeriodTotal[1] = 0; +/* Generated */ NearPeriodTotal[0] = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ FarPeriodTotal[2] = 0; +/* Generated */ FarPeriodTotal[1] = 0; +/* Generated */ FarPeriodTotal[0] = 0; +/* Generated */ FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = ShadowShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowShortPeriodTotal[2] += TA_CANDLERANGE( ShadowShort, i-2 ); +/* Generated */ ShadowShortPeriodTotal[1] += TA_CANDLERANGE( ShadowShort, i-1 ); +/* Generated */ ShadowShortPeriodTotal[0] += TA_CANDLERANGE( ShadowShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal[1] += TA_CANDLERANGE( ShadowLong, i-1 ); +/* Generated */ ShadowLongPeriodTotal[0] += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); +/* Generated */ NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = FarTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); +/* Generated */ FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st white +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd white +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white +/* Generated */ inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes +/* Generated */ inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body +/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && +/* Generated */ inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body +/* Generated */ inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && +/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long real body +/* Generated */ TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[2], i-2 ) && +/* Generated */ // 1st: short upper shadow +/* Generated */ ( +/* Generated */ // ( 2 far smaller than 1 && 3 not longer than 2 ) +/* Generated */ // advance blocked with the 2nd, 3rd must not carry on the advance +/* Generated */ ( +/* Generated */ TA_REALBODY(i-1) < TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && +/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) +/* Generated */ ) || +/* Generated */ // 3 far smaller than 2 +/* Generated */ // advance blocked with the 3rd +/* Generated */ ( +/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) +/* Generated */ ) || +/* Generated */ // ( 3 smaller than 2 && 2 smaller than 1 && (3 or 2 not short upper shadow) ) +/* Generated */ // advance blocked with progressively smaller real bodies and some upper shadows +/* Generated */ ( +/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) && +/* Generated */ TA_REALBODY(i-1) < TA_REALBODY(i-2) && +/* Generated */ ( +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[0], i ) || +/* Generated */ TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[1], i-1 ) +/* Generated */ ) +/* Generated */ ) || +/* Generated */ // ( 3 smaller than 2 && 3 long upper shadow ) +/* Generated */ // advance blocked with 3rd candle's long upper shadow and smaller body +/* Generated */ ( +/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) && +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal[0], i ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) +/* Generated */ ShadowShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowShort, ShadowShortTrailingIdx-totIdx ); +/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) +/* Generated */ ShadowLongPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowLong, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-totIdx ); +/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) { +/* Generated */ FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); +/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); +/* Generated */ i++; +/* Generated */ ShadowShortTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ NearTrailingIdx++; +/* Generated */ FarTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c b/src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c new file mode 100644 index 000000000..0cab9d84e --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c @@ -0,0 +1,389 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlBeltHoldLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlBeltHoldLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLBELTHOLD_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLBELTHOLD - Belt-hold + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlBeltHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLBELTHOLD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLBELTHOLD)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - long white (black) real body + * - no or very short lower (upper) shadow + * The meaning of "long" and "very short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body + ( + ( // white body and very short lower shadow + TA_CANDLECOLOR(i) == 1 && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) || + ( // black body and very short upper shadow + TA_CANDLECOLOR(i) == -1 && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) + ) ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlBeltHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLBELTHOLD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLBELTHOLD)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body +/* Generated */ ( +/* Generated */ ( // white body and very short lower shadow +/* Generated */ TA_CANDLECOLOR(i) == 1 && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) || +/* Generated */ ( // black body and very short upper shadow +/* Generated */ TA_CANDLECOLOR(i) == -1 && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) +/* Generated */ ) ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c b/src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c new file mode 100644 index 000000000..ec0a783e1 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c @@ -0,0 +1,396 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlBreakawayLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlBreakawayLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLBREAKAWAY_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(BodyLong) + 4; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLBREAKAWAY - Breakaway + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlBreakaway( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLBREAKAWAY( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal; + int i, outIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLBREAKAWAY)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black (white) + * - second candle: black (white) day whose body gaps down (up) + * - third candle: black or white day with lower (higher) high and lower (higher) low than prior candle's + * - fourth candle: black (white) day with lower (higher) high and lower (higher) low than prior candle's + * - fifth candle: white (black) day that closes inside the gap, erasing the prior 3 days + * The meaning of "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that breakaway is significant in a trend opposite to the last candle, while this + * function does not consider it + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-4 ) && // 1st long + TA_CANDLECOLOR(i-4) == TA_CANDLECOLOR(i-3) && // 1st, 2nd, 4th same color, 5th opposite + TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-1) && + TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && + ( + ( TA_CANDLECOLOR(i-4) == -1 && // when 1st is black: + TA_REALBODYGAPDOWN(i-3,i-4) && // 2nd gaps down + inHigh[i-2] < inHigh[i-3] && inLow[i-2] < inLow[i-3] && // 3rd has lower high and low than 2nd + inHigh[i-1] < inHigh[i-2] && inLow[i-1] < inLow[i-2] && // 4th has lower high and low than 3rd + inClose[i] > inOpen[i-3] && inClose[i] < inClose[i-4] // 5th closes inside the gap + ) + || + ( TA_CANDLECOLOR(i-4) == 1 && // when 1st is white: + TA_REALBODYGAPUP(i-3,i-4) && // 2nd gaps up + inHigh[i-2] > inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 3rd has higher high and low than 2nd + inHigh[i-1] > inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 4th has higher high and low than 3rd + inClose[i] < inOpen[i-3] && inClose[i] > inClose[i-4] // 5th closes inside the gap + ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); + i++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlBreakaway( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLBREAKAWAY( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLBREAKAWAY)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-4 ) && // 1st long +/* Generated */ TA_CANDLECOLOR(i-4) == TA_CANDLECOLOR(i-3) && // 1st, 2nd, 4th same color, 5th opposite +/* Generated */ TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-1) && +/* Generated */ TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && +/* Generated */ ( +/* Generated */ ( TA_CANDLECOLOR(i-4) == -1 && // when 1st is black: +/* Generated */ TA_REALBODYGAPDOWN(i-3,i-4) && // 2nd gaps down +/* Generated */ inHigh[i-2] < inHigh[i-3] && inLow[i-2] < inLow[i-3] && // 3rd has lower high and low than 2nd +/* Generated */ inHigh[i-1] < inHigh[i-2] && inLow[i-1] < inLow[i-2] && // 4th has lower high and low than 3rd +/* Generated */ inClose[i] > inOpen[i-3] && inClose[i] < inClose[i-4] // 5th closes inside the gap +/* Generated */ ) +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i-4) == 1 && // when 1st is white: +/* Generated */ TA_REALBODYGAPUP(i-3,i-4) && // 2nd gaps up +/* Generated */ inHigh[i-2] > inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 3rd has higher high and low than 2nd +/* Generated */ inHigh[i-1] > inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 4th has higher high and low than 3rd +/* Generated */ inClose[i] < inOpen[i-3] && inClose[i] > inClose[i-4] // 5th closes inside the gap +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c b/src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c new file mode 100644 index 000000000..0d4c3aef0 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c @@ -0,0 +1,390 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 022005 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlClosingMarubozuLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlClosingMarubozuLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLCLOSINGMARUBOZU_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLCLOSINGMARUBOZU - Closing Marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlClosingMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLCLOSINGMARUBOZU( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLCLOSINGMARUBOZU)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - long white (black) real body + * - no or very short upper (lower) shadow + * The meaning of "long" and "very short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body + ( + ( // white body and very short lower shadow + TA_CANDLECOLOR(i) == 1 && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) || + ( // black body and very short upper shadow + TA_CANDLECOLOR(i) == -1 && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) + ) ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlClosingMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLCLOSINGMARUBOZU( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLCLOSINGMARUBOZU)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body +/* Generated */ ( +/* Generated */ ( // white body and very short lower shadow +/* Generated */ TA_CANDLECOLOR(i) == 1 && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) || +/* Generated */ ( // black body and very short upper shadow +/* Generated */ TA_CANDLECOLOR(i) == -1 && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) +/* Generated */ ) ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c b/src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c new file mode 100644 index 000000000..cebabf9ab --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c @@ -0,0 +1,399 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 022705 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlConcealBabysWallLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlConcealBabysWallLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLCONCEALBABYSWALL_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(ShadowVeryShort) + 3; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlConcealBabysWall( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLCONCEALBABYSWALL( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,4); + int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLCONCEALBABYSWALL)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal[3] = 0; + ShadowVeryShortPeriodTotal[2] = 0; + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[3] += TA_CANDLERANGE( ShadowVeryShort, i-3 ); + ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: black marubozu (very short shadows) + * - second candle: black marubozu (very short shadows) + * - third candle: black candle that opens gapping down but has an upper shadow that extends into the prior body + * - fourth candle: black candle that completely engulfs the third candle, including the shadows + * The meanings of "very short shadow" are specified with TA_SetCandleSettings; + * outInteger is positive (1 to 100): concealing baby swallow is always bullish; + * the user should consider that concealing baby swallow is significant when it appears in downtrend, while + * this function does not consider it + */ + outIdx = 0; + + do + { + if( TA_CANDLECOLOR(i-3) == -1 && // 1st black + TA_CANDLECOLOR(i-2) == -1 && // 2nd black + TA_CANDLECOLOR(i-1) == -1 && // 3rd black + TA_CANDLECOLOR(i) == -1 && // 4th black + // 1st: marubozu + TA_LOWERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && + TA_UPPERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && + // 2nd: marubozu + TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && + TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && + TA_REALBODYGAPDOWN(i-1,i-2) && // 3rd: opens gapping down + // and HAS an upper shadow + TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + inHigh[i-1] > inClose[i-2] && // that extends into the prior body + inHigh[i] > inHigh[i-1] && inLow[i] < inLow[i-1] // 4th: engulfs the 3rd including the shadows + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 3; totIdx >= 1; --totIdx) + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + i++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlConcealBabysWall( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLCONCEALBABYSWALL( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,4); +/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLCONCEALBABYSWALL)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal[3] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[3] += TA_CANDLERANGE( ShadowVeryShort, i-3 ); +/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-3) == -1 && // 1st black +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // 2nd black +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 3rd black +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 4th black +/* Generated */ // 1st: marubozu +/* Generated */ TA_LOWERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && +/* Generated */ TA_UPPERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && +/* Generated */ // 2nd: marubozu +/* Generated */ TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && +/* Generated */ TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && +/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // 3rd: opens gapping down +/* Generated */ // and HAS an upper shadow +/* Generated */ TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ inHigh[i-1] > inClose[i-2] && // that extends into the prior body +/* Generated */ inHigh[i] > inHigh[i-1] && inLow[i] < inLow[i-1] // 4th: engulfs the 3rd including the shadows +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 3; totIdx >= 1; --totIdx) +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c b/src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c new file mode 100644 index 000000000..39cdc6cec --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c @@ -0,0 +1,392 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlCounterAttackLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlCounterAttackLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLCOUNTERATTACK_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLCOUNTERATTACK - Counterattack + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlCounterAttack( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLCOUNTERATTACK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double EqualPeriodTotal; + ARRAY_LOCAL(BodyLongPeriodTotal,2); + int i, outIdx, totIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLCOUNTERATTACK)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + BodyLongPeriodTotal[1] = 0; + BodyLongPeriodTotal[0] = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); + BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black (white) + * - second candle: long white (black) with close equal to the prior close + * The meaning of "equal" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that counterattack is significant in a trend, while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 1st long + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // 2nd long + inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // equal closes + inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + for (totIdx = 1; totIdx >= 0; --totIdx) + BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); + i++; + EqualTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlCounterAttack( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLCOUNTERATTACK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double EqualPeriodTotal; +/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); +/* Generated */ int i, outIdx, totIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLCOUNTERATTACK)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ BodyLongPeriodTotal[1] = 0; +/* Generated */ BodyLongPeriodTotal[0] = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 1st long +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // 2nd long +/* Generated */ inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // equal closes +/* Generated */ inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) +/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c b/src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c new file mode 100644 index 000000000..1c07e9696 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c @@ -0,0 +1,398 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120904 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlDarkCloudCoverLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlDarkCloudCoverLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLDARKCLOUDCOVER_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 5.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + + return TA_CANDLEAVGPERIOD(BodyLong) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLDARKCLOUDCOVER - Dark Cloud Cover + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDarkCloudCover( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLDARKCLOUDCOVER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal; + int i, outIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 5.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLDARKCLOUDCOVER)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white candle + * - second candle: black candle that opens above previous day high and closes within previous day real body; + * Greg Morris wants the close to be below the midpoint of the previous real body + * The meaning of "long" is specified with TA_SetCandleSettings, the penetration of the first real body is specified + * with optInPenetration + * outInteger is negative (-1 to -100): dark cloud cover is always bearish + * the user should consider that a dark cloud cover is significant when it appears in an uptrend, while + * this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == 1 && // 1st: white + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long + TA_CANDLECOLOR(i) == -1 && // 2nd: black + inOpen[i] > inHigh[i-1] && // open above prior high + inClose[i] > inOpen[i-1] && // close within prior body + inClose[i] < inClose[i-1] - TA_REALBODY(i-1) * optInPenetration + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); + i++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDarkCloudCover( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLDARKCLOUDCOVER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 5.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDARKCLOUDCOVER)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == 1 && // 1st: white +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 2nd: black +/* Generated */ inOpen[i] > inHigh[i-1] && // open above prior high +/* Generated */ inClose[i] > inOpen[i-1] && // close within prior body +/* Generated */ inClose[i] < inClose[i-1] - TA_REALBODY(i-1) * optInPenetration +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLDOJI.c b/src/ta-lib/src/ta_func/ta_CDLDOJI.c new file mode 100644 index 000000000..0541dd913 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLDOJI.c @@ -0,0 +1,350 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlDojiLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlDojiLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLDOJI_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(BodyDoji); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLDOJI - Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLDOJI)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyDojiPeriodTotal = 0; + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * + * Must have: + * - open quite equal to close + * How much can be the maximum distance between open and close is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100) but this does not mean it is bullish: doji shows uncertainty and it is + * neither bullish nor bearish when considered alone + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + i++; + BodyDojiTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDOJI)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c b/src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c new file mode 100644 index 000000000..4942ac94e --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c @@ -0,0 +1,382 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 100204 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlDojiStarLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlDojiStarLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLDOJISTAR_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLDOJISTAR - Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLDOJISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLDOJISTAR)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyDojiPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + + i = BodyLongTrailingIdx; + while( i < startIdx-1 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long real body + * - second candle: star (open gapping up in an uptrend or down in a downtrend) with a doji + * The meaning of "doji" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * it's defined bullish when the long candle is white and the star gaps up, bearish when the long candle + * is black and the star gaps down; the user should consider that a doji star is bullish when it appears + * in an uptrend and it's bearish when it appears in a downtrend, so to determine the bullishness or + * bearishness of the pattern the trend must be analyzed + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long real body + TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // 2nd: doji + ( ( TA_CANDLECOLOR(i-1) == 1 && TA_REALBODYGAPUP(i,i-1) ) // that gaps up if 1st is white + || + ( TA_CANDLECOLOR(i-1) == -1 && TA_REALBODYGAPDOWN(i,i-1) ) // or down if 1st is black + ) ) + outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyDojiTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLDOJISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDOJISTAR)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long real body +/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // 2nd: doji +/* Generated */ ( ( TA_CANDLECOLOR(i-1) == 1 && TA_REALBODYGAPUP(i,i-1) ) // that gaps up if 1st is white +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_REALBODYGAPDOWN(i,i-1) ) // or down if 1st is black +/* Generated */ ) ) +/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c b/src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c new file mode 100644 index 000000000..97108d22a --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c @@ -0,0 +1,379 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlDragonflyDojiLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlDragonflyDojiLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLDRAGONFLYDOJI_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLDRAGONFLYDOJI - Dragonfly Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDragonflyDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLDRAGONFLYDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLDRAGONFLYDOJI)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyDojiPeriodTotal = 0; + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * + * Must have: + * - doji body + * - open and close at the high of the day = no or very short upper shadow + * - lower shadow (to distinguish from other dojis, here lower shadow should not be very short) + * The meaning of "doji" and "very short" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100) but this does not mean it is bullish: dragonfly doji must be considered + * relatively to the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && + TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyDojiTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlDragonflyDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLDRAGONFLYDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDRAGONFLYDOJI)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLENGULFING.c b/src/ta-lib/src/ta_func/ta_CDLENGULFING.c new file mode 100644 index 000000000..f5038ccc5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLENGULFING.c @@ -0,0 +1,361 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 102404 AC Creation + * 040309 AC Increased flexibility to allow real bodies matching + * on one end (Greg Morris - "Candlestick charting explained") + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlEngulfingLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlEngulfingLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLENGULFING_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLENGULFING - Engulfing Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlEngulfing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLENGULFING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int i, outIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLENGULFING)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first: black (white) real body + * - second: white (black) real body that engulfs the prior real body + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish: + * - 100 is returned when the second candle's real body begins before and ends after the first candle's real body + * - 80 is returned when the two real bodies match on one end (Greg Morris contemplate this case in his book + * "Candlestick charting explained") + * The user should consider that an engulfing must appear in a downtrend if bullish or in an uptrend if bearish, + * while this function does not consider it + */ + outIdx = 0; + do + { + if( ( TA_CANDLECOLOR(i) == 1 && TA_CANDLECOLOR(i-1) == -1 && // white engulfs black + ( ( inClose[i] >= inOpen[i-1] && inOpen[i] < inClose[i-1] ) || + ( inClose[i] > inOpen[i-1] && inOpen[i] <= inClose[i-1] ) + ) + ) + || + ( TA_CANDLECOLOR(i) == -1 && TA_CANDLECOLOR(i-1) == 1 && // black engulfs white + ( ( inOpen[i] >= inClose[i-1] && inClose[i] < inOpen[i-1] ) || + ( inOpen[i] > inClose[i-1] && inClose[i] <= inOpen[i-1] ) + ) + ) + ) + if( inOpen[i] != inClose[i-1] && inClose[i] != inOpen[i-1] ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 80; + else + outInteger[outIdx++] = 0; + i++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlEngulfing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLENGULFING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i, outIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLENGULFING)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( ( TA_CANDLECOLOR(i) == 1 && TA_CANDLECOLOR(i-1) == -1 && // white engulfs black +/* Generated */ ( ( inClose[i] >= inOpen[i-1] && inOpen[i] < inClose[i-1] ) || +/* Generated */ ( inClose[i] > inOpen[i-1] && inOpen[i] <= inClose[i-1] ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i) == -1 && TA_CANDLECOLOR(i-1) == 1 && // black engulfs white +/* Generated */ ( ( inOpen[i] >= inClose[i-1] && inClose[i] < inOpen[i-1] ) || +/* Generated */ ( inOpen[i] > inClose[i-1] && inClose[i] <= inOpen[i-1] ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ if( inOpen[i] != inClose[i-1] && inClose[i] != inOpen[i-1] ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 80; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ i++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c b/src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c new file mode 100644 index 000000000..1ae268993 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c @@ -0,0 +1,441 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 100304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlEveningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlEveningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLEVENINGDOJISTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + + return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ), + TA_CANDLEAVGPERIOD(BodyShort) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLEVENINGDOJISTAR - Evening Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlEveningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLEVENINGDOJISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLEVENINGDOJISTAR)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyDojiPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyDojiTrailingIdx; + while( i < startIdx-1 ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white real body + * - second candle: doji gapping up + * - third candle: black real body that moves well within the first candle's real body + * The meaning of "doji" and "long" is specified with TA_SetCandleSettings + * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should + * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want + * it to be relatively long + * outInteger is negative (-1 to -100): evening star is always bearish; + * the user should consider that an evening star is significant when it appears in an uptrend, + * while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_CANDLECOLOR(i-2) == 1 && // white + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji + TA_REALBODYGAPUP(i-1,i-2) && // gapping up + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short + TA_CANDLECOLOR(i) == -1 && // black real body + inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyDojiTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlEveningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLEVENINGDOJISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLEVENINGDOJISTAR)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_CANDLECOLOR(i-2) == 1 && // white +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji +/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short +/* Generated */ TA_CANDLECOLOR(i) == -1 && // black real body +/* Generated */ inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c b/src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c new file mode 100644 index 000000000..f5cb0c8b8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c @@ -0,0 +1,427 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 100304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlEveningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlEveningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLEVENINGSTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLEVENINGSTAR - Evening Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlEveningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLEVENINGSTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLEVENINGSTAR)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyShortPeriodTotal2 = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx-1 ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white real body + * - second candle: star (short real body gapping up) + * - third candle: black real body that moves well within the first candle's real body + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should + * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want + * it to be relatively long + * outInteger is negative (-1 to -100): evening star is always bearish; + * the user should consider that an evening star is significant when it appears in an uptrend, + * while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_CANDLECOLOR(i-2) == 1 && // white + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short + TA_REALBODYGAPUP(i-1,i-2) && // gapping up + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short + TA_CANDLECOLOR(i) == -1 && // black real body + inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlEveningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLEVENINGSTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLEVENINGSTAR)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal2 = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_CANDLECOLOR(i-2) == 1 && // white +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short +/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short +/* Generated */ TA_CANDLECOLOR(i) == -1 && // black real body +/* Generated */ inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c b/src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c new file mode 100644 index 000000000..1319ef27b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c @@ -0,0 +1,398 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 020605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlGapSideSideWhiteLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlGapSideSideWhiteLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLGAPSIDESIDEWHITE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(Near), TA_CANDLEAVGPERIOD(Equal) ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlGapSideSideWhite( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLGAPSIDESIDEWHITE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double NearPeriodTotal, EqualPeriodTotal; + int i, outIdx, NearTrailingIdx, EqualTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLGAPSIDESIDEWHITE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + NearPeriodTotal = 0; + EqualPeriodTotal = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); + i++; + } + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - upside or downside gap (between the bodies) + * - first candle after the window: white candlestick + * - second candle after the window: white candlestick with similar size (near the same) and about the same + * open (equal) of the previous candle + * - the second candle does not close the window + * The meaning of "near" and "equal" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) or negative (-1 to -100): the user should consider that upside + * or downside gap side-by-side white lines is significant when it appears in a trend, while this function + * does not consider the trend + */ + outIdx = 0; + do + { + if( + ( // upside or downside gap between the 1st candle and both the next 2 candles + ( TA_REALBODYGAPUP(i-1,i-2) && TA_REALBODYGAPUP(i,i-2) ) + || + ( TA_REALBODYGAPDOWN(i-1,i-2) && TA_REALBODYGAPDOWN(i,i-2) ) + ) && + TA_CANDLECOLOR(i-1) == 1 && // 2nd: white + TA_CANDLECOLOR(i) == 1 && // 3rd: white + TA_REALBODY(i) >= TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && // same size 2 and 3 + TA_REALBODY(i) <= TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && + inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open 2 and 3 + inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) + ) + outInteger[outIdx++] = ( TA_REALBODYGAPUP(i-1,i-2) ? 100 : -100 ); + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + i++; + NearTrailingIdx++; + EqualTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlGapSideSideWhite( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLGAPSIDESIDEWHITE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double NearPeriodTotal, EqualPeriodTotal; +/* Generated */ int i, outIdx, NearTrailingIdx, EqualTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLGAPSIDESIDEWHITE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ NearPeriodTotal = 0; +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( +/* Generated */ ( // upside or downside gap between the 1st candle and both the next 2 candles +/* Generated */ ( TA_REALBODYGAPUP(i-1,i-2) && TA_REALBODYGAPUP(i,i-2) ) +/* Generated */ || +/* Generated */ ( TA_REALBODYGAPDOWN(i-1,i-2) && TA_REALBODYGAPDOWN(i,i-2) ) +/* Generated */ ) && +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd: white +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd: white +/* Generated */ TA_REALBODY(i) >= TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && // same size 2 and 3 +/* Generated */ TA_REALBODY(i) <= TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && +/* Generated */ inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open 2 and 3 +/* Generated */ inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = ( TA_REALBODYGAPUP(i-1,i-2) ? 100 : -100 ); +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ NearTrailingIdx++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c b/src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c new file mode 100644 index 000000000..4d29a7c57 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c @@ -0,0 +1,378 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlGravestoneDojiLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlGravestoneDojiLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLGRAVESTONEDOJI_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLGRAVESTONEDOJI - Gravestone Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlGravestoneDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLGRAVESTONEDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLGRAVESTONEDOJI)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyDojiPeriodTotal = 0; + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * + * Must have: + * - doji body + * - open and close at the low of the day = no or very short lower shadow + * - upper shadow (to distinguish from other dojis, here upper shadow should not be very short) + * The meaning of "doji" and "very short" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100) but this does not mean it is bullish: gravestone doji must be considered + * relatively to the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyDojiTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlGravestoneDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLGRAVESTONEDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLGRAVESTONEDOJI)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHAMMER.c b/src/ta-lib/src/ta_func/ta_CDLHAMMER.c new file mode 100644 index 000000000..47e8a0ddc --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHAMMER.c @@ -0,0 +1,427 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 102304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHammerLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHammerLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHAMMER_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), + TA_CANDLEAVGPERIOD(ShadowVeryShort) ), + TA_CANDLEAVGPERIOD(Near) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHAMMER - Hammer + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHAMMER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHAMMER)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + NearPeriodTotal = 0; + NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = NearTrailingIdx; + while( i < startIdx-1 ) { + NearPeriodTotal += TA_CANDLERANGE( Near, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - small real body + * - long lower shadow + * - no, or very short, upper shadow + * - body below or near the lows of the previous candle + * The meaning of "short", "long" and "near the lows" is specified with TA_SetCandleSettings; + * outInteger is positive (1 to 100): hammer is always bullish; + * the user should consider that a hammer must appear in a downtrend, while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb + TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow + min( inClose[i], inOpen[i] ) <= inLow[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's lows + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) + - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) + - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) + - TA_CANDLERANGE( Near, NearTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + NearTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHAMMER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHAMMER)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ NearPeriodTotal = 0; +/* Generated */ NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb +/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow +/* Generated */ min( inClose[i], inOpen[i] ) <= inLow[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's lows +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) +/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) +/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ NearTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c b/src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c new file mode 100644 index 000000000..7575754f5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c @@ -0,0 +1,427 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 102304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHangingManLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHangingManLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHANGINGMAN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), + TA_CANDLEAVGPERIOD(ShadowVeryShort) ), + TA_CANDLEAVGPERIOD(Near) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHANGINGMAN - Hanging Man + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHangingMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHANGINGMAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHANGINGMAN)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + NearPeriodTotal = 0; + NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = NearTrailingIdx; + while( i < startIdx-1 ) { + NearPeriodTotal += TA_CANDLERANGE( Near, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - small real body + * - long lower shadow + * - no, or very short, upper shadow + * - body above or near the highs of the previous candle + * The meaning of "short", "long" and "near the highs" is specified with TA_SetCandleSettings; + * outInteger is negative (-1 to -100): hanging man is always bearish; + * the user should consider that a hanging man must appear in an uptrend, while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb + TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow + min( inClose[i], inOpen[i] ) >= inHigh[i-1] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's highs + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) + - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) + - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) + - TA_CANDLERANGE( Near, NearTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + NearTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHangingMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHANGINGMAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHANGINGMAN)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ NearPeriodTotal = 0; +/* Generated */ NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb +/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow +/* Generated */ min( inClose[i], inOpen[i] ) >= inHigh[i-1] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's highs +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) +/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) +/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ NearTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHARAMI.c b/src/ta-lib/src/ta_func/ta_CDLHARAMI.c new file mode 100644 index 000000000..e3127373d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHARAMI.c @@ -0,0 +1,401 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 102404 AC Creation + * 040309 AC Increased flexibility to allow real bodies matching + * on one end (Greg Morris - "Candlestick charting explained") + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHaramiLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHaramiLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHARAMI_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHARAMI - Harami Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHarami( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHARAMI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHARAMI)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-1 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white (black) real body + * - second candle: short real body totally engulfed by the first + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish: + * - 100 is returned when the first candle's real body begins before and ends after the second candle's real body + * - 80 is returned when the two real bodies match on one end (Greg Morris contemplate this case in his book + * "Candlestick charting explained") + * The user should consider that a harami is significant when it appears in a downtrend if bullish or + * in an uptrend when bearish, while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long + TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // 2nd: short + ) + if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st + min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) + ) + outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; + else + if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st + min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; + ) // engulfing guaranteed by "long" and "short") + outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; + else + outInteger[outIdx++] = 0; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHarami( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHARAMI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHARAMI)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long +/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // 2nd: short +/* Generated */ ) +/* Generated */ if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st +/* Generated */ min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; +/* Generated */ else +/* Generated */ if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st +/* Generated */ min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; +/* Generated */ ) // engulfing guaranteed by "long" and "short") +/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c b/src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c new file mode 100644 index 000000000..2418864a3 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c @@ -0,0 +1,396 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 102404 AC Creation + * 040309 AC Increased flexibility to allow real bodies matching + * on one end (Greg Morris - "Candlestick charting explained") + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHaramiCrossLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHaramiCrossLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHARAMICROSS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHARAMICROSS - Harami Cross Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHaramiCross( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHARAMICROSS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHARAMICROSS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyDojiPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + + i = BodyLongTrailingIdx; + while( i < startIdx-1 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white (black) real body + * - second candle: doji totally engulfed by the first + * The meaning of "doji" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that a harami cross is significant when it appears in a downtrend if bullish or + * in an uptrend when bearish, while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long + TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) // 2nd: doji + if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st + min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) + ) + outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; + else + if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st + min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; + ) // engulfing guaranteed by "long" and "doji") + outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; + else + outInteger[outIdx++] = 0; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyDojiTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHaramiCross( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHARAMICROSS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHARAMICROSS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long +/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) // 2nd: doji +/* Generated */ if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st +/* Generated */ min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; +/* Generated */ else +/* Generated */ if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st +/* Generated */ min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; +/* Generated */ ) // engulfing guaranteed by "long" and "doji") +/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c b/src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c new file mode 100644 index 000000000..aa9807bf0 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c @@ -0,0 +1,372 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 072404 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHignWaveLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHignWaveLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHIGHWAVE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowVeryLong) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHIGHWAVE - High-Wave Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHignWave( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHIGHWAVE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHIGHWAVE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowPeriodTotal = 0; + ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowTrailingIdx; + while( i < startIdx ) { + ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - short real body + * - very long upper and lower shadow + * The meaning of "short" and "very long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white or negative (-1 to -100) when black; + * it does not mean bullish or bearish + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) && + TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) - TA_CANDLERANGE( ShadowVeryLong, ShadowTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHignWave( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHIGHWAVE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHIGHWAVE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowPeriodTotal = 0; +/* Generated */ ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) - TA_CANDLERANGE( ShadowVeryLong, ShadowTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c b/src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c new file mode 100644 index 000000000..0f8a466b5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c @@ -0,0 +1,412 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120305 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHikkakeLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHikkakeLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHIKKAKE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return 5; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHIKKAKE - Hikkake Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHikkake( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHIKKAKE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int i, outIdx, lookbackTotal, patternIdx, patternResult; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHIKKAKE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + patternIdx = 0; + patternResult = 0; + + i = startIdx - 3; + while( i < startIdx ) { + /* copy here the pattern recognition code below */ + if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low + ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low + || + ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low + ) + ) { + patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); + patternIdx = i; + } else + /* search for confirmation if hikkake was no more than 3 bars ago */ + if( i <= patternIdx+3 && + ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd + || + ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd + ) + ) + patternIdx = 0; + i++; + } + + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first and second candle: inside bar (2nd has lower high and higher low than 1st) + * - third candle: lower high and lower low than 2nd (higher high and higher low than 2nd) + * outInteger[hikkakebar] is positive (1 to 100) or negative (-1 to -100) meaning bullish or bearish hikkake + * Confirmation could come in the next 3 days with: + * - a day that closes higher than the high (lower than the low) of the 2nd candle + * outInteger[confirmationbar] is equal to 100 + the bullish hikkake result or -100 - the bearish hikkake result + * Note: if confirmation and a new hikkake come at the same bar, only the new hikkake is reported (the new hikkake + * overwrites the confirmation of the old hikkake) + */ + outIdx = 0; + do + { + if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low + ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low + || + ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low + ) + ) { + patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); + patternIdx = i; + outInteger[outIdx++] = patternResult; + } else + /* search for confirmation if hikkake was no more than 3 bars ago */ + if( i <= patternIdx+3 && + ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd + || + ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd + ) + ) { + outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); + patternIdx = 0; + } else + outInteger[outIdx++] = 0; + i++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHikkake( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHIKKAKE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i, outIdx, lookbackTotal, patternIdx, patternResult; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHIKKAKE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ patternIdx = 0; +/* Generated */ patternResult = 0; +/* Generated */ i = startIdx - 3; +/* Generated */ while( i < startIdx ) { +/* Generated */ if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low +/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low +/* Generated */ || +/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low +/* Generated */ ) +/* Generated */ ) { +/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); +/* Generated */ patternIdx = i; +/* Generated */ } else +/* Generated */ if( i <= patternIdx+3 && +/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd +/* Generated */ || +/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd +/* Generated */ ) +/* Generated */ ) +/* Generated */ patternIdx = 0; +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low +/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low +/* Generated */ || +/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low +/* Generated */ ) +/* Generated */ ) { +/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); +/* Generated */ patternIdx = i; +/* Generated */ outInteger[outIdx++] = patternResult; +/* Generated */ } else +/* Generated */ if( i <= patternIdx+3 && +/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd +/* Generated */ || +/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd +/* Generated */ ) +/* Generated */ ) { +/* Generated */ outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); +/* Generated */ patternIdx = 0; +/* Generated */ } else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ i++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c b/src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c new file mode 100644 index 000000000..dbb552f5e --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c @@ -0,0 +1,470 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 122605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHikkakeModLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHikkakeModLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHIKKAKEMOD_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( 1, TA_CANDLEAVGPERIOD(Near) ) + 5; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHIKKAKEMOD - Modified Hikkake Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHikkakeMod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHIKKAKEMOD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double NearPeriodTotal; + int i, outIdx, NearTrailingIdx, lookbackTotal, patternIdx, patternResult; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHIKKAKEMOD)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + NearPeriodTotal = 0; + NearTrailingIdx = startIdx - 3 - TA_CANDLEAVGPERIOD(Near); + i = NearTrailingIdx; + while( i < startIdx - 3 ) { + NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ); + i++; + } + + patternIdx = 0; + patternResult = 0; + + i = startIdx - 3; + while( i < startIdx ) { + /* copy here the pattern recognition code below */ + if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st + inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd + ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low + inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) + // (bull) 2nd: close near the low + ) + || + ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low + inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) + // (bull) 2nd: close near the top + ) + ) + ) { + patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); + patternIdx = i; + } else + /* search for confirmation if modified hikkake was no more than 3 bars ago */ + if( i <= patternIdx+3 && + ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd + || + ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd + ) + ) + patternIdx = 0; + NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); + NearTrailingIdx++; + i++; + } + + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle + * - second candle: candle with range less than first candle and close near the bottom (near the top) + * - third candle: lower high and higher low than 2nd + * - fourth candle: lower high and lower low (higher high and higher low) than 3rd + * outInteger[hikkake bar] is positive (1 to 100) or negative (-1 to -100) meaning bullish or bearish hikkake + * Confirmation could come in the next 3 days with: + * - a day that closes higher than the high (lower than the low) of the 3rd candle + * outInteger[confirmationbar] is equal to 100 + the bullish hikkake result or -100 - the bearish hikkake result + * Note: if confirmation and a new hikkake come at the same bar, only the new hikkake is reported (the new hikkake + * overwrites the confirmation of the old hikkake); + * the user should consider that modified hikkake is a reversal pattern, while hikkake could be both a reversal + * or a continuation pattern, so bullish (bearish) modified hikkake is significant when appearing in a downtrend + * (uptrend) + */ + outIdx = 0; + do + { + if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st + inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd + ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low + inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) + // (bull) 2nd: close near the low + ) + || + ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low + inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) + // (bull) 2nd: close near the top + ) + ) + ) { + patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); + patternIdx = i; + outInteger[outIdx++] = patternResult; + } else + /* search for confirmation if modified hikkake was no more than 3 bars ago */ + if( i <= patternIdx+3 && + ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd + || + ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd + ) + ) { + outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); + patternIdx = 0; + } else + outInteger[outIdx++] = 0; + NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); + NearTrailingIdx++; + i++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHikkakeMod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHIKKAKEMOD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double NearPeriodTotal; +/* Generated */ int i, outIdx, NearTrailingIdx, lookbackTotal, patternIdx, patternResult; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHIKKAKEMOD)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ NearPeriodTotal = 0; +/* Generated */ NearTrailingIdx = startIdx - 3 - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx - 3 ) { +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ patternIdx = 0; +/* Generated */ patternResult = 0; +/* Generated */ i = startIdx - 3; +/* Generated */ while( i < startIdx ) { +/* Generated */ if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st +/* Generated */ inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd +/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low +/* Generated */ inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) +/* Generated */ // (bull) 2nd: close near the low +/* Generated */ ) +/* Generated */ || +/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low +/* Generated */ inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) +/* Generated */ // (bull) 2nd: close near the top +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) { +/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); +/* Generated */ patternIdx = i; +/* Generated */ } else +/* Generated */ if( i <= patternIdx+3 && +/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd +/* Generated */ || +/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd +/* Generated */ ) +/* Generated */ ) +/* Generated */ patternIdx = 0; +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); +/* Generated */ NearTrailingIdx++; +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st +/* Generated */ inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd +/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low +/* Generated */ inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) +/* Generated */ // (bull) 2nd: close near the low +/* Generated */ ) +/* Generated */ || +/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low +/* Generated */ inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) +/* Generated */ // (bull) 2nd: close near the top +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) { +/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); +/* Generated */ patternIdx = i; +/* Generated */ outInteger[outIdx++] = patternResult; +/* Generated */ } else +/* Generated */ if( i <= patternIdx+3 && +/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd +/* Generated */ || +/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd +/* Generated */ ) +/* Generated */ ) { +/* Generated */ outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); +/* Generated */ patternIdx = 0; +/* Generated */ } else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); +/* Generated */ NearTrailingIdx++; +/* Generated */ i++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c b/src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c new file mode 100644 index 000000000..5b6f316e8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c @@ -0,0 +1,384 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 032005 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlHomingPigeonLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlHomingPigeonLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLHOMINGPIGEON_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLHOMINGPIGEON - Homing Pigeon + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHomingPigeon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLHOMINGPIGEON( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLHOMINGPIGEON)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle + * - second candle: short black real body completely inside the previous day's body + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100): homing pigeon is always bullish; + * the user should consider that homing pigeon is significant when it appears in a downtrend, + * while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -1 && // 1st black + TA_CANDLECOLOR(i) == -1 && // 2nd black + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st long + TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 2nd short + inOpen[i] < inOpen[i-1] && // 2nd engulfed by 1st + inClose[i] > inClose[i-1] + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlHomingPigeon( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLHOMINGPIGEON( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHOMINGPIGEON)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st black +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 2nd black +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st long +/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 2nd short +/* Generated */ inOpen[i] < inOpen[i-1] && // 2nd engulfed by 1st +/* Generated */ inClose[i] > inClose[i-1] +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c b/src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c new file mode 100644 index 000000000..be741a891 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c @@ -0,0 +1,433 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 103104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlIdentical3CrowsLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlIdentical3CrowsLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLIDENTICAL3CROWS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(Equal) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLIDENTICAL3CROWS - Identical Three Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlIdentical3Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLIDENTICAL3CROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); + ARRAY_LOCAL(EqualPeriodTotal,3); + int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, EqualTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLIDENTICAL3CROWS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal[2] = 0; + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortPeriodTotal[0] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + EqualPeriodTotal[2] = 0; + EqualPeriodTotal[1] = 0; + EqualPeriodTotal[0] = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal[2] += TA_CANDLERANGE( Equal, i-2 ); + EqualPeriodTotal[1] += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three consecutive and declining black candlesticks + * - each candle must have no or very short lower shadow + * - each candle after the first must open at or very close to the prior candle's close + * The meaning of "very short" is specified with TA_SetCandleSettings; + * the meaning of "very close" is specified with TA_SetCandleSettings (Equal); + * outInteger is negative (-1 to -100): identical three crows is always bearish; + * the user should consider that identical 3 crows is significant when it appears after a mature advance or at high levels, + * while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == -1 && // 1st black + // very short lower shadow + TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && + TA_CANDLECOLOR(i-1) == -1 && // 2nd black + // very short lower shadow + TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + TA_CANDLECOLOR(i) == -1 && // 3rd black + // very short lower shadow + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + inClose[i-2] > inClose[i-1] && // three declining + inClose[i-1] > inClose[i] && + // 2nd black opens very close to 1st close + inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && + inOpen[i-1] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && + // 3rd black opens very close to 2nd close + inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) && + inOpen[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 2; totIdx >= 0; --totIdx) + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + for (totIdx = 2; totIdx >= 1; --totIdx) + EqualPeriodTotal[totIdx] += TA_CANDLERANGE( Equal, i-totIdx ) + - TA_CANDLERANGE( Equal, EqualTrailingIdx-totIdx ); + i++; + ShadowVeryShortTrailingIdx++; + EqualTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlIdentical3Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLIDENTICAL3CROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); +/* Generated */ ARRAY_LOCAL(EqualPeriodTotal,3); +/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, EqualTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLIDENTICAL3CROWS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ EqualPeriodTotal[2] = 0; +/* Generated */ EqualPeriodTotal[1] = 0; +/* Generated */ EqualPeriodTotal[0] = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal[2] += TA_CANDLERANGE( Equal, i-2 ); +/* Generated */ EqualPeriodTotal[1] += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == -1 && // 1st black +/* Generated */ // very short lower shadow +/* Generated */ TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd black +/* Generated */ // very short lower shadow +/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black +/* Generated */ // very short lower shadow +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ inClose[i-2] > inClose[i-1] && // three declining +/* Generated */ inClose[i-1] > inClose[i] && +/* Generated */ // 2nd black opens very close to 1st close +/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && +/* Generated */ inOpen[i-1] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && +/* Generated */ // 3rd black opens very close to 2nd close +/* Generated */ inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) && +/* Generated */ inOpen[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) +/* Generated */ EqualPeriodTotal[totIdx] += TA_CANDLERANGE( Equal, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Equal, EqualTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLINNECK.c b/src/ta-lib/src/ta_func/ta_CDLINNECK.c new file mode 100644 index 000000000..a4f706e99 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLINNECK.c @@ -0,0 +1,387 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlInNeckLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlInNeckLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLINNECK_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLINNECK - In-Neck Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlInNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLINNECK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double EqualPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLINNECK)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle + * - second candle: white candle with open below previous day low and close slightly into previous day body + * The meaning of "equal" is specified with TA_SetCandleSettings + * outInteger is negative (-1 to -100): in-neck is always bearish + * the user should consider that in-neck is significant when it appears in a downtrend, while this function + * does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long + TA_CANDLECOLOR(i) == 1 && // 2nd: white + inOpen[i] < inLow[i-1] && // open below prior low + inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close slightly into prior body + inClose[i] >= inClose[i-1] + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); + i++; + EqualTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlInNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLINNECK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double EqualPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLINNECK)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white +/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low +/* Generated */ inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close slightly into prior body +/* Generated */ inClose[i] >= inClose[i-1] +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c b/src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c new file mode 100644 index 000000000..176591460 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c @@ -0,0 +1,403 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 103004 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlInvertedHammerLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlInvertedHammerLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLINVERTEDHAMMER_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), + TA_CANDLEAVGPERIOD(ShadowVeryShort) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLINVERTEDHAMMER - Inverted Hammer + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlInvertedHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLINVERTEDHAMMER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLINVERTEDHAMMER)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - small real body + * - long upper shadow + * - no, or very short, lower shadow + * - gap down + * The meaning of "short", "very short" and "long" is specified with TA_SetCandleSettings; + * outInteger is positive (1 to 100): inverted hammer is always bullish; + * the user should consider that an inverted hammer must appear in a downtrend, while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow + TA_REALBODYGAPDOWN(i, i-1) ) // gap down + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) + - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) + - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlInvertedHammer( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLINVERTEDHAMMER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLINVERTEDHAMMER)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow +/* Generated */ TA_REALBODYGAPDOWN(i, i-1) ) // gap down +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) +/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLKICKING.c b/src/ta-lib/src/ta_func/ta_CDLKICKING.c new file mode 100644 index 000000000..08330ddf8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLKICKING.c @@ -0,0 +1,420 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010705 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlKickingLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlKickingLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLKICKING_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyLong) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLKICKING - Kicking + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlKicking( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLKICKING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); + ARRAY_LOCAL(BodyLongPeriodTotal,2); + int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLKICKING)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortPeriodTotal[0] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + BodyLongPeriodTotal[1] = 0; + BodyLongPeriodTotal[0] = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); + BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: marubozu + * - second candle: opposite color marubozu + * - gap between the two candles: upside gap if black then white, downside gap if white then black + * The meaning of "long body" and "very short shadow" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles + // 1st marubozu + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && + TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + // 2nd marubozu + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + // gap + ( + ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) + || + ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 1; totIdx >= 0; --totIdx) { + BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + } + i++; + ShadowVeryShortTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlKicking( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLKICKING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); +/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); +/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLKICKING)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ BodyLongPeriodTotal[1] = 0; +/* Generated */ BodyLongPeriodTotal[0] = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles +/* Generated */ // 1st marubozu +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && +/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ // 2nd marubozu +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ // gap +/* Generated */ ( +/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) { +/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ } +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c b/src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c new file mode 100644 index 000000000..b2aa9bc96 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c @@ -0,0 +1,421 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlKickingByLengthLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlKickingByLengthLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLKICKINGBYLENGTH_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyLong) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlKickingByLength( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLKICKINGBYLENGTH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); + ARRAY_LOCAL(BodyLongPeriodTotal,2); + int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLKICKINGBYLENGTH)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal[1] = 0; + ShadowVeryShortPeriodTotal[0] = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + BodyLongPeriodTotal[1] = 0; + BodyLongPeriodTotal[0] = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); + BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: marubozu + * - second candle: opposite color marubozu + * - gap between the two candles: upside gap if black then white, downside gap if white then black + * The meaning of "long body" and "very short shadow" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; the longer of the two + * marubozu determines the bullishness or bearishness of this pattern + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles + // 1st marubozu + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && + TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && + // 2nd marubozu + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && + // gap + ( + ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) + || + ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR( ( TA_REALBODY(i) > TA_REALBODY(i-1) ? i : i-1 ) ) * 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 1; totIdx >= 0; --totIdx) { + BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); + ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); + } + i++; + ShadowVeryShortTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlKickingByLength( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLKICKINGBYLENGTH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); +/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); +/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLKICKINGBYLENGTH)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; +/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ BodyLongPeriodTotal[1] = 0; +/* Generated */ BodyLongPeriodTotal[0] = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles +/* Generated */ // 1st marubozu +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && +/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && +/* Generated */ // 2nd marubozu +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && +/* Generated */ // gap +/* Generated */ ( +/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR( ( TA_REALBODY(i) > TA_REALBODY(i-1) ? i : i-1 ) ) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) { +/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); +/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); +/* Generated */ } +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c b/src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c new file mode 100644 index 000000000..e623114f5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c @@ -0,0 +1,375 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 032005 AC Creation + * 041305 MF Minor modification for a compiler warning + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlLadderBottomLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlLadderBottomLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLLADDERBOTTOM_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(ShadowVeryShort) + 4; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLLADDERBOTTOM - Ladder Bottom + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlLadderBottom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLLADDERBOTTOM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double ShadowVeryShortPeriodTotal; + int i, outIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLLADDERBOTTOM)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three black candlesticks with consecutively lower opens and closes + * - fourth candle: black candle with an upper shadow (it's supposed to be not very short) + * - fifth candle: white candle that opens above prior candle's body and closes above prior candle's high + * The meaning of "very short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100): ladder bottom is always bullish; + * the user should consider that ladder bottom is significant when it appears in a downtrend, + * while this function does not consider it + */ + outIdx = 0; + do + { + if( + TA_CANDLECOLOR(i-4) == -1 && TA_CANDLECOLOR(i-3) == -1 && TA_CANDLECOLOR(i-2) == -1 && // 3 black candlesticks + inOpen[i-4] > inOpen[i-3] && inOpen[i-3] > inOpen[i-2] && // with consecutively lower opens + inClose[i-4] > inClose[i-3] && inClose[i-3] > inClose[i-2] && // and closes + TA_CANDLECOLOR(i-1) == -1 && // 4th: black with an upper shadow + TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && + TA_CANDLECOLOR(i) == 1 && // 5th: white + inOpen[i] > inOpen[i-1] && // that opens above prior candle's body + inClose[i] > inHigh[i-1] // and closes above prior candle's high + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); + i++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlLadderBottom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLLADDERBOTTOM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLLADDERBOTTOM)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( +/* Generated */ TA_CANDLECOLOR(i-4) == -1 && TA_CANDLECOLOR(i-3) == -1 && TA_CANDLECOLOR(i-2) == -1 && // 3 black candlesticks +/* Generated */ inOpen[i-4] > inOpen[i-3] && inOpen[i-3] > inOpen[i-2] && // with consecutively lower opens +/* Generated */ inClose[i-4] > inClose[i-3] && inClose[i-3] > inClose[i-2] && // and closes +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 4th: black with an upper shadow +/* Generated */ TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 5th: white +/* Generated */ inOpen[i] > inOpen[i-1] && // that opens above prior candle's body +/* Generated */ inClose[i] > inHigh[i-1] // and closes above prior candle's high +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c b/src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c new file mode 100644 index 000000000..11f856e2c --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c @@ -0,0 +1,378 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlLongLeggedDojiLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlLongLeggedDojiLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLLONGLEGGEDDOJI_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowLong) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLLONGLEGGEDDOJI - Long Legged Doji + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlLongLeggedDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLLONGLEGGEDDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, ShadowLongPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLLONGLEGGEDDOJI)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyDojiPeriodTotal = 0; + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * + * Must have: + * - doji body + * - one or two long shadows + * The meaning of "doji" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100) but this does not mean it is bullish: long legged doji shows uncertainty + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && + ( TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) + || + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) + ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); + i++; + BodyDojiTrailingIdx++; + ShadowLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlLongLeggedDoji( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLLONGLEGGEDDOJI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, ShadowLongPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLLONGLEGGEDDOJI)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && +/* Generated */ ( TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) +/* Generated */ || +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLLONGLINE.c b/src/ta-lib/src/ta_func/ta_CDLLONGLINE.c new file mode 100644 index 000000000..ea1a0c552 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLLONGLINE.c @@ -0,0 +1,372 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 071704 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlLongLineLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlLongLineLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLLONGLINE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLLONGLINE - Long Line Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlLongLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLLONGLINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLLONGLINE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + ShadowPeriodTotal = 0; + ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = ShadowTrailingIdx; + while( i < startIdx ) { + ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - long real body + * - short upper and lower shadow + * The meaning of "long" and "short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) + */ + outIdx = 0; + + do + { + if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal, i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyTrailingIdx ); + ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlLongLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLLONGLINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLLONGLINE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ ShadowPeriodTotal = 0; +/* Generated */ ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyTrailingIdx ); +/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c b/src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c new file mode 100644 index 000000000..d733f90d3 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c @@ -0,0 +1,373 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlMarubozuLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlMarubozuLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLMARUBOZU_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLMARUBOZU - Marubozu + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLMARUBOZU( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLMARUBOZU)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - long real body + * - no or very short upper and lower shadow + * The meaning of "long" and "very short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMarubozu( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLMARUBOZU( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMARUBOZU)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c b/src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c new file mode 100644 index 000000000..39a6a1a93 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c @@ -0,0 +1,359 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 032605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlMatchingLowLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlMatchingLowLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLMATCHINGLOW_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(Equal) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLMATCHINGLOW - Matching Low + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMatchingLow( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLMATCHINGLOW( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double EqualPeriodTotal; + int i, outIdx, EqualTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLMATCHINGLOW)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: black candle + * - second candle: black candle with the close equal to the previous close + * The meaning of "equal" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100): matching low is always bullish; + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -1 && // first black + TA_CANDLECOLOR(i) == -1 && // second black + inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // 1st and 2nd same close + inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + i++; + EqualTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMatchingLow( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLMATCHINGLOW( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double EqualPeriodTotal; +/* Generated */ int i, outIdx, EqualTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMATCHINGLOW)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // first black +/* Generated */ TA_CANDLECOLOR(i) == -1 && // second black +/* Generated */ inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // 1st and 2nd same close +/* Generated */ inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLMATHOLD.c b/src/ta-lib/src/ta_func/ta_CDLMATHOLD.c new file mode 100644 index 000000000..a979fc28b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLMATHOLD.c @@ -0,0 +1,470 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 022005 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlMatHoldLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlMatHoldLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLMATHOLD_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 5.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 4; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLMATHOLD - Mat Hold + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMatHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLMATHOLD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(BodyPeriodTotal,5); + int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 5.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLMATHOLD)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal[4] = 0; + BodyPeriodTotal[3] = 0; + BodyPeriodTotal[2] = 0; + BodyPeriodTotal[1] = 0; + BodyPeriodTotal[0] = 0; + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); + BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); + BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white candle + * - upside gap between the first and the second bodies + * - second candle: small black candle + * - third and fourth candles: falling small real body candlesticks (commonly black) that hold within the long + * white candle's body and are higher than the reaction days of the rising three methods + * - fifth candle: white candle that opens above the previous small candle's close and closes higher than the + * high of the highest reaction day + * The meaning of "short" and "long" is specified with TA_SetCandleSettings; + * "hold within" means "a part of the real body must be within"; + * optInPenetration is the maximum percentage of the first white body the reaction days can penetrate (it is + * to specify how much the reaction days should be "higher than the reaction days of the rising three methods") + * outInteger is positive (1 to 100): mat hold is always bullish + */ + outIdx = 0; + do + { + if( // 1st long, then 3 small + TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && + TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && + TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && + TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && + // white, black, 2 black or white, white + TA_CANDLECOLOR(i-4) == 1 && + TA_CANDLECOLOR(i-3) == -1 && + TA_CANDLECOLOR(i) == 1 && + // upside gap 1st to 2nd + TA_REALBODYGAPUP(i-3,i-4) && + // 3rd to 4th hold within 1st: a part of the real body must be within 1st real body + min(inOpen[i-2], inClose[i-2]) < inClose[i-4] && + min(inOpen[i-1], inClose[i-1]) < inClose[i-4] && + // reaction days penetrate first body less than optInPenetration percent + min(inOpen[i-2], inClose[i-2]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && + min(inOpen[i-1], inClose[i-1]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && + // 2nd to 4th are falling + max(inClose[i-2], inOpen[i-2]) < inOpen[i-3] && + max(inClose[i-1], inOpen[i-1]) < max(inClose[i-2], inOpen[i-2]) && + // 5th opens above the prior close + inOpen[i] > inClose[i-1] && + // 5th closes above the highest high of the reaction days + inClose[i] > max(max(inHigh[i-3], inHigh[i-2]), inHigh[i-1]) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); + for (totIdx = 3; totIdx >= 1; --totIdx) + BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) + - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); + i++; + BodyShortTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMatHold( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLMATHOLD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(BodyPeriodTotal,5); +/* Generated */ int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 5.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMATHOLD)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal[4] = 0; +/* Generated */ BodyPeriodTotal[3] = 0; +/* Generated */ BodyPeriodTotal[2] = 0; +/* Generated */ BodyPeriodTotal[1] = 0; +/* Generated */ BodyPeriodTotal[0] = 0; +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); +/* Generated */ BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); +/* Generated */ BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( // 1st long, then 3 small +/* Generated */ TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && +/* Generated */ TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && +/* Generated */ TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && +/* Generated */ TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && +/* Generated */ // white, black, 2 black or white, white +/* Generated */ TA_CANDLECOLOR(i-4) == 1 && +/* Generated */ TA_CANDLECOLOR(i-3) == -1 && +/* Generated */ TA_CANDLECOLOR(i) == 1 && +/* Generated */ // upside gap 1st to 2nd +/* Generated */ TA_REALBODYGAPUP(i-3,i-4) && +/* Generated */ // 3rd to 4th hold within 1st: a part of the real body must be within 1st real body +/* Generated */ min(inOpen[i-2], inClose[i-2]) < inClose[i-4] && +/* Generated */ min(inOpen[i-1], inClose[i-1]) < inClose[i-4] && +/* Generated */ // reaction days penetrate first body less than optInPenetration percent +/* Generated */ min(inOpen[i-2], inClose[i-2]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && +/* Generated */ min(inOpen[i-1], inClose[i-1]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && +/* Generated */ // 2nd to 4th are falling +/* Generated */ max(inClose[i-2], inOpen[i-2]) < inOpen[i-3] && +/* Generated */ max(inClose[i-1], inOpen[i-1]) < max(inClose[i-2], inOpen[i-2]) && +/* Generated */ // 5th opens above the prior close +/* Generated */ inOpen[i] > inClose[i-1] && +/* Generated */ // 5th closes above the highest high of the reaction days +/* Generated */ inClose[i] > max(max(inHigh[i-3], inHigh[i-2]), inHigh[i-1]) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); +/* Generated */ for (totIdx = 3; totIdx >= 1; --totIdx) +/* Generated */ BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c b/src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c new file mode 100644 index 000000000..f08d7021d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c @@ -0,0 +1,439 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 100304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlMorningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlMorningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLMORNINGDOJISTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ), + TA_CANDLEAVGPERIOD(BodyShort) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLMORNINGDOJISTAR - Morning Doji Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMorningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLMORNINGDOJISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLMORNINGDOJISTAR)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyDojiPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyDojiTrailingIdx; + while( i < startIdx-1 ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black real body + * - second candle: doji gapping down + * - third candle: white real body that moves well within the first candle's real body + * The meaning of "doji" and "long" is specified with TA_SetCandleSettings + * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should + * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want + * it to be relatively long + * outInteger is positive (1 to 100): morning doji star is always bullish; + * the user should consider that a morning star is significant when it appears in a downtrend, + * while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_CANDLECOLOR(i-2) == -1 && // black + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji + TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short + TA_CANDLECOLOR(i) == 1 && // white real body + inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyDojiTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMorningDojiStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLMORNINGDOJISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMORNINGDOJISTAR)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // black +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji +/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short +/* Generated */ TA_CANDLECOLOR(i) == 1 && // white real body +/* Generated */ inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c b/src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c new file mode 100644 index 000000000..1af6db709 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c @@ -0,0 +1,425 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 100304 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlMorningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlMorningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLMORNINGSTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInPenetration); + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLMORNINGSTAR - Morning Star + * + * Input = Open, High, Low, Close + * Output = int + * + * Optional Parameters + * ------------------- + * optInPenetration:(From 0 to TA_REAL_MAX) + * Percentage of penetration of a candle within another candle + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMorningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLMORNINGSTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLMORNINGSTAR)(optInPenetration); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyShortPeriodTotal2 = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx-1 ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black real body + * - second candle: star (Short real body gapping down) + * - third candle: white real body that moves well within the first candle's real body + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should + * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want + * it to be relatively long + * outInteger is positive (1 to 100): morning star is always bullish; + * the user should consider that a morning star is significant when it appears in a downtrend, + * while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_CANDLECOLOR(i-2) == -1 && // black + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short + TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short + TA_CANDLECOLOR(i) == 1 && // black real body + inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlMorningStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLMORNINGSTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) +/* Generated */ optInPenetration = 3.000000e-1; +/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMORNINGSTAR)(optInPenetration); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal2 = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // black +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short +/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short +/* Generated */ TA_CANDLECOLOR(i) == 1 && // black real body +/* Generated */ inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLONNECK.c b/src/ta-lib/src/ta_func/ta_CDLONNECK.c new file mode 100644 index 000000000..13c350d53 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLONNECK.c @@ -0,0 +1,386 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlOnNeckLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlOnNeckLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLONNECK_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLONNECK - On-Neck Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlOnNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLONNECK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double EqualPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLONNECK)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle + * - second candle: white candle with open below previous day low and close equal to previous day low + * The meaning of "equal" is specified with TA_SetCandleSettings + * outInteger is negative (-1 to -100): on-neck is always bearish + * the user should consider that on-neck is significant when it appears in a downtrend, while this function + * does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long + TA_CANDLECOLOR(i) == 1 && // 2nd: white + inOpen[i] < inLow[i-1] && // open below prior low + inClose[i] <= inLow[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close equal to prior low + inClose[i] >= inLow[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); + i++; + EqualTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlOnNeck( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLONNECK( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double EqualPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLONNECK)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white +/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low +/* Generated */ inClose[i] <= inLow[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close equal to prior low +/* Generated */ inClose[i] >= inLow[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLPIERCING.c b/src/ta-lib/src/ta_func/ta_CDLPIERCING.c new file mode 100644 index 000000000..03aeb486e --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLPIERCING.c @@ -0,0 +1,377 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120904 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlPiercingLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlPiercingLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLPIERCING_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(BodyLong) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLPIERCING - Piercing Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlPiercing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLPIERCING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(BodyLongPeriodTotal,2); + int i, outIdx, totIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLPIERCING)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal[1] = 0; + BodyLongPeriodTotal[0] = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); + BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle + * - second candle: long white candle with open below previous day low and close at least at 50% of previous day + * real body + * The meaning of "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100): piercing pattern is always bullish + * the user should consider that a piercing pattern is significant when it appears in a downtrend, while + * this function does not consider it + */ + outIdx = 0; + + do + { + if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // long + TA_CANDLECOLOR(i) == 1 && // 2nd: white + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // long + inOpen[i] < inLow[i-1] && // open below prior low + inClose[i] < inOpen[i-1] && // close within prior body + inClose[i] > inClose[i-1] + TA_REALBODY(i-1) * 0.5 // above midpoint + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 1; totIdx >= 0; --totIdx) + BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); + i++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlPiercing( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLPIERCING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); +/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLPIERCING)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal[1] = 0; +/* Generated */ BodyLongPeriodTotal[0] = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // long +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // long +/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low +/* Generated */ inClose[i] < inOpen[i-1] && // close within prior body +/* Generated */ inClose[i] > inClose[i-1] + TA_REALBODY(i-1) * 0.5 // above midpoint +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) +/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c b/src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c new file mode 100644 index 000000000..5d6a0a004 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c @@ -0,0 +1,411 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlRickshawManLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlRickshawManLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLRICKSHAWMAN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowLong) ), + TA_CANDLEAVGPERIOD(Near) + ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLRICKSHAWMAN - Rickshaw Man + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlRickshawMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLRICKSHAWMAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, ShadowLongPeriodTotal, NearPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLRICKSHAWMAN)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyDojiPeriodTotal = 0; + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + NearPeriodTotal = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal += TA_CANDLERANGE( Near, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * + * Must have: + * - doji body + * - two long shadows + * - body near the midpoint of the high-low range + * The meaning of "doji" and "near" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100) but this does not mean it is bullish: rickshaw man shows uncertainty + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // doji + TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow + ( // body near midpoint + min( inOpen[i], inClose[i] ) + <= inLow[i] + TA_HIGHLOWRANGE(i) / 2 + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) + && + max( inOpen[i], inClose[i] ) + >= inLow[i] + TA_HIGHLOWRANGE(i) / 2 - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) + ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); + NearPeriodTotal += TA_CANDLERANGE( Near, i ) - TA_CANDLERANGE( Near, NearTrailingIdx ); + + i++; + BodyDojiTrailingIdx++; + ShadowLongTrailingIdx++; + NearTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlRickshawMan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLRICKSHAWMAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, ShadowLongPeriodTotal, NearPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLRICKSHAWMAN)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ NearPeriodTotal = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // doji +/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow +/* Generated */ ( // body near midpoint +/* Generated */ min( inOpen[i], inClose[i] ) +/* Generated */ <= inLow[i] + TA_HIGHLOWRANGE(i) / 2 + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) +/* Generated */ && +/* Generated */ max( inOpen[i], inClose[i] ) +/* Generated */ >= inLow[i] + TA_HIGHLOWRANGE(i) / 2 - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ) - TA_CANDLERANGE( Near, NearTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ NearTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c b/src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c new file mode 100644 index 000000000..da82e4b40 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c @@ -0,0 +1,437 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 020605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlRiseFall3MethodsLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlRiseFall3MethodsLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLRISEFALL3METHODS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 4; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlRiseFall3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLRISEFALL3METHODS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(BodyPeriodTotal,5); + int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLRISEFALL3METHODS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal[4] = 0; + BodyPeriodTotal[3] = 0; + BodyPeriodTotal[2] = 0; + BodyPeriodTotal[1] = 0; + BodyPeriodTotal[0] = 0; + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); + BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); + BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); + BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long white (black) candlestick + * - then: group of falling (rising) small real body candlesticks (commonly black (white)) that hold within + * the prior long candle's range: ideally they should be three but two or more than three are ok too + * - final candle: long white (black) candle that opens above (below) the previous small candle's close + * and closes above (below) the first long candle's close + * The meaning of "short" and "long" is specified with TA_SetCandleSettings; here only patterns with 3 small candles + * are considered; + * outInteger is positive (1 to 100) or negative (-1 to -100) + */ + outIdx = 0; + + do + { + if( // 1st long, then 3 small, 5th long + TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && + TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && + TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && + TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[0], i ) && + // white, 3 black, white || black, 3 white, black + TA_CANDLECOLOR(i-4) == -TA_CANDLECOLOR(i-3) && + TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && + TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && + TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && + // 2nd to 4th hold within 1st: a part of the real body must be within 1st range + min(inOpen[i-3], inClose[i-3]) < inHigh[i-4] && max(inOpen[i-3], inClose[i-3]) > inLow[i-4] && + min(inOpen[i-2], inClose[i-2]) < inHigh[i-4] && max(inOpen[i-2], inClose[i-2]) > inLow[i-4] && + min(inOpen[i-1], inClose[i-1]) < inHigh[i-4] && max(inOpen[i-1], inClose[i-1]) > inLow[i-4] && + // 2nd to 4th are falling (rising) + inClose[i-2] * TA_CANDLECOLOR(i-4) < inClose[i-3] * TA_CANDLECOLOR(i-4) && + inClose[i-1] * TA_CANDLECOLOR(i-4) < inClose[i-2] * TA_CANDLECOLOR(i-4) && + // 5th opens above (below) the prior close + inOpen[i] * TA_CANDLECOLOR(i-4) > inClose[i-1] * TA_CANDLECOLOR(i-4) && + // 5th closes above (below) the 1st close + inClose[i] * TA_CANDLECOLOR(i-4) > inClose[i-4] * TA_CANDLECOLOR(i-4) + ) + outInteger[outIdx++] = 100 * TA_CANDLECOLOR(i-4); + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); + for (totIdx = 3; totIdx >= 1; --totIdx) + BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) + - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); + BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + + i++; + BodyShortTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlRiseFall3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLRISEFALL3METHODS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(BodyPeriodTotal,5); +/* Generated */ int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLRISEFALL3METHODS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal[4] = 0; +/* Generated */ BodyPeriodTotal[3] = 0; +/* Generated */ BodyPeriodTotal[2] = 0; +/* Generated */ BodyPeriodTotal[1] = 0; +/* Generated */ BodyPeriodTotal[0] = 0; +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); +/* Generated */ BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); +/* Generated */ BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); +/* Generated */ BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( // 1st long, then 3 small, 5th long +/* Generated */ TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && +/* Generated */ TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && +/* Generated */ TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && +/* Generated */ TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[0], i ) && +/* Generated */ // white, 3 black, white || black, 3 white, black +/* Generated */ TA_CANDLECOLOR(i-4) == -TA_CANDLECOLOR(i-3) && +/* Generated */ TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && +/* Generated */ TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && +/* Generated */ TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && +/* Generated */ // 2nd to 4th hold within 1st: a part of the real body must be within 1st range +/* Generated */ min(inOpen[i-3], inClose[i-3]) < inHigh[i-4] && max(inOpen[i-3], inClose[i-3]) > inLow[i-4] && +/* Generated */ min(inOpen[i-2], inClose[i-2]) < inHigh[i-4] && max(inOpen[i-2], inClose[i-2]) > inLow[i-4] && +/* Generated */ min(inOpen[i-1], inClose[i-1]) < inHigh[i-4] && max(inOpen[i-1], inClose[i-1]) > inLow[i-4] && +/* Generated */ // 2nd to 4th are falling (rising) +/* Generated */ inClose[i-2] * TA_CANDLECOLOR(i-4) < inClose[i-3] * TA_CANDLECOLOR(i-4) && +/* Generated */ inClose[i-1] * TA_CANDLECOLOR(i-4) < inClose[i-2] * TA_CANDLECOLOR(i-4) && +/* Generated */ // 5th opens above (below) the prior close +/* Generated */ inOpen[i] * TA_CANDLECOLOR(i-4) > inClose[i-1] * TA_CANDLECOLOR(i-4) && +/* Generated */ // 5th closes above (below) the 1st close +/* Generated */ inClose[i] * TA_CANDLECOLOR(i-4) > inClose[i-4] * TA_CANDLECOLOR(i-4) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100 * TA_CANDLECOLOR(i-4); +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); +/* Generated */ for (totIdx = 3; totIdx >= 1; --totIdx) +/* Generated */ BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); +/* Generated */ BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c b/src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c new file mode 100644 index 000000000..46bb3274e --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c @@ -0,0 +1,419 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlSeperatingLinesLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlSeperatingLinesLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLSEPARATINGLINES_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyLong) ), + TA_CANDLEAVGPERIOD(Equal) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLSEPARATINGLINES - Separating Lines + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlSeperatingLines( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLSEPARATINGLINES( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double ShadowVeryShortPeriodTotal, BodyLongPeriodTotal, EqualPeriodTotal; + int i, outIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, EqualTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLSEPARATINGLINES)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: black (white) candle + * - second candle: bullish (bearish) belt hold with the same open as the prior candle + * The meaning of "long body" and "very short shadow" of the belt hold is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that separating lines is significant when coming in a trend and the belt hold has + * the same direction of the trend, while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles + inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open + inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && + TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // belt hold: long body + ( + ( TA_CANDLECOLOR(i) == 1 && // with no lower shadow if bullish + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) + || + ( TA_CANDLECOLOR(i) == -1 && // with no upper shadow if bearish + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) + ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + i++; + ShadowVeryShortTrailingIdx++; + BodyLongTrailingIdx++; + EqualTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlSeperatingLines( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLSEPARATINGLINES( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double ShadowVeryShortPeriodTotal, BodyLongPeriodTotal, EqualPeriodTotal; +/* Generated */ int i, outIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, EqualTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSEPARATINGLINES)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles +/* Generated */ inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open +/* Generated */ inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && +/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // belt hold: long body +/* Generated */ ( +/* Generated */ ( TA_CANDLECOLOR(i) == 1 && // with no lower shadow if bullish +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) +/* Generated */ || +/* Generated */ ( TA_CANDLECOLOR(i) == -1 && // with no upper shadow if bearish +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c b/src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c new file mode 100644 index 000000000..ec4aad160 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c @@ -0,0 +1,403 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 103004 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlShootingStarLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlShootingStarLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLSHOOTINGSTAR_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), + TA_CANDLEAVGPERIOD(ShadowVeryShort) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLSHOOTINGSTAR - Shooting Star + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlShootingStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLSHOOTINGSTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLSHOOTINGSTAR)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowLongPeriodTotal = 0; + ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowLongTrailingIdx; + while( i < startIdx ) { + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - small real body + * - long upper shadow + * - no, or very short, lower shadow + * - gap up from prior real body + * The meaning of "short", "very short" and "long" is specified with TA_SetCandleSettings; + * outInteger is negative (-1 to -100): shooting star is always bearish; + * the user should consider that a shooting star must appear in an uptrend, while this function does not consider it + */ + outIdx = 0; + + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb + TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow + TA_REALBODYGAPUP(i, i-1) ) // gap up + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) + - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) + - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowLongTrailingIdx++; + ShadowVeryShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlShootingStar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLSHOOTINGSTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSHOOTINGSTAR)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowLongPeriodTotal = 0; +/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb +/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow +/* Generated */ TA_REALBODYGAPUP(i, i-1) ) // gap up +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) +/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) +/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowLongTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c b/src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c new file mode 100644 index 000000000..99b8e66a5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c @@ -0,0 +1,372 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 072404 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlShortLineLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlShortLineLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLSHORTLINE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowShort) ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLSHORTLINE - Short Line Candle + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlShortLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLSHORTLINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal, ShadowPeriodTotal; + int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLSHORTLINE)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowPeriodTotal = 0; + ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowTrailingIdx; + while( i < startIdx ) { + ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - short real body + * - short upper and lower shadow + * The meaning of "short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white, negative (-1 to -100) when black; + * it does not mean bullish or bearish + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && + TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); + i++; + BodyTrailingIdx++; + ShadowTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlShortLine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLSHORTLINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal, ShadowPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSHORTLINE)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowPeriodTotal = 0; +/* Generated */ ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ ShadowTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c b/src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c new file mode 100644 index 000000000..7c134b57d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c @@ -0,0 +1,356 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 071804 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlSpinningTopLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlSpinningTopLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLSPINNINGTOP_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(BodyShort); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLSPINNINGTOP - Spinning Top + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlSpinningTop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLSPINNINGTOP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal; + int i, outIdx, BodyTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLSPINNINGTOP)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyTrailingIdx; + while( i < startIdx ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - small real body + * - shadows longer than the real body + * The meaning of "short" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when white or negative (-1 to -100) when black; + * it does not mean bullish or bearish + */ + outIdx = 0; + do + { + if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && + TA_UPPERSHADOW(i) > TA_REALBODY(i) && + TA_LOWERSHADOW(i) > TA_REALBODY(i) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); + i++; + BodyTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlSpinningTop( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLSPINNINGTOP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSPINNINGTOP)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) > TA_REALBODY(i) && +/* Generated */ TA_LOWERSHADOW(i) > TA_REALBODY(i) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c b/src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c new file mode 100644 index 000000000..dd560402a --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c @@ -0,0 +1,469 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120804 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlStalledPatternLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlStalledPatternLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLSTALLEDPATTERN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(BodyShort) ), + max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(Near) ) + ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLSTALLEDPATTERN - Stalled Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlStalledPattern( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLSTALLEDPATTERN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_LOCAL(BodyLongPeriodTotal,3); + ARRAY_LOCAL(NearPeriodTotal,3); + double BodyShortPeriodTotal, ShadowVeryShortPeriodTotal; + int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, + lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLSTALLEDPATTERN)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal[2] = 0; + BodyLongPeriodTotal[1] = 0; + BodyLongPeriodTotal[0] = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortPeriodTotal = 0; + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + NearPeriodTotal[2] = 0; + NearPeriodTotal[1] = 0; + NearPeriodTotal[0] = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal[2] += TA_CANDLERANGE( BodyLong, i-2 ); + BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); + i++; + } + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); + NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - three white candlesticks with consecutively higher closes + * - first candle: long white + * - second candle: long white with no or very short upper shadow opening within or near the previous white real body + * and closing higher than the prior candle + * - third candle: small white that gaps away or "rides on the shoulder" of the prior long real body (= it's at + * the upper end of the prior real body) + * The meanings of "long", "very short", "short", "near" are specified with TA_SetCandleSettings; + * outInteger is negative (-1 to -100): stalled pattern is always bearish; + * the user should consider that stalled pattern is significant when it appears in uptrend, while this function + * does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == 1 && // 1st white + TA_CANDLECOLOR(i-1) == 1 && // 2nd white + TA_CANDLECOLOR(i) == 1 && // 3rd white + inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes + TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[2], i-2 ) && // 1st: long real body + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 2nd: long real body + // very short upper shadow + TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && + // opens within/near 1st real body + inOpen[i-1] > inOpen[i-2] && + inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && + TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: small real body + // rides on the shoulder of 2nd real body + inOpen[i] >= inClose[i-1] - TA_REALBODY(i) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + for (totIdx = 2; totIdx >= 1; --totIdx) { + BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); + NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) + - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); + } + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + ShadowVeryShortTrailingIdx++; + NearTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlStalledPattern( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLSTALLEDPATTERN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,3); +/* Generated */ ARRAY_LOCAL(NearPeriodTotal,3); +/* Generated */ double BodyShortPeriodTotal, ShadowVeryShortPeriodTotal; +/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, +/* Generated */ lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSTALLEDPATTERN)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal[2] = 0; +/* Generated */ BodyLongPeriodTotal[1] = 0; +/* Generated */ BodyLongPeriodTotal[0] = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ NearPeriodTotal[2] = 0; +/* Generated */ NearPeriodTotal[1] = 0; +/* Generated */ NearPeriodTotal[0] = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal[2] += TA_CANDLERANGE( BodyLong, i-2 ); +/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); +/* Generated */ NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st white +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd white +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white +/* Generated */ inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes +/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[2], i-2 ) && // 1st: long real body +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 2nd: long real body +/* Generated */ // very short upper shadow +/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && +/* Generated */ // opens within/near 1st real body +/* Generated */ inOpen[i-1] > inOpen[i-2] && +/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && +/* Generated */ TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: small real body +/* Generated */ // rides on the shoulder of 2nd real body +/* Generated */ inOpen[i] >= inClose[i-1] - TA_REALBODY(i) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) { +/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); +/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) +/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); +/* Generated */ } +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ NearTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c b/src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c new file mode 100644 index 000000000..d397dfd7f --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c @@ -0,0 +1,365 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 032005 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlStickSandwichLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlStickSandwichLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLSTICKSANDWICH_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(Equal) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLSTICKSANDWICH - Stick Sandwich + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlStickSandwich( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLSTICKSANDWICH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double EqualPeriodTotal; + int i, outIdx, EqualTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLSTICKSANDWICH)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: black candle + * - second candle: white candle that trades only above the prior close (low > prior close) + * - third candle: black candle with the close equal to the first candle's close + * The meaning of "equal" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100): stick sandwich is always bullish; + * the user should consider that stick sandwich is significant when coming in a downtrend, + * while this function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == -1 && // first black + TA_CANDLECOLOR(i-1) == 1 && // second white + TA_CANDLECOLOR(i) == -1 && // third black + inLow[i-1] > inClose[i-2] && // 2nd low > prior close + inClose[i] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) && // 1st and 3rd same close + inClose[i] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-2 ); + i++; + EqualTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlStickSandwich( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLSTICKSANDWICH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double EqualPeriodTotal; +/* Generated */ int i, outIdx, EqualTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSTICKSANDWICH)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == -1 && // first black +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // second white +/* Generated */ TA_CANDLECOLOR(i) == -1 && // third black +/* Generated */ inLow[i-1] > inClose[i-2] && // 2nd low > prior close +/* Generated */ inClose[i] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) && // 1st and 3rd same close +/* Generated */ inClose[i] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-2 ); +/* Generated */ i++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ diff --git a/src/ta-lib/src/ta_func/ta_CDLTAKURI.c b/src/ta-lib/src/ta_func/ta_CDLTAKURI.c new file mode 100644 index 000000000..c6cd6ba2d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLTAKURI.c @@ -0,0 +1,401 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011505 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlTakuriLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlTakuriLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLTAKURI_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowVeryShort) ), + TA_CANDLEAVGPERIOD(ShadowVeryLong) + ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlTakuri( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLTAKURI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal, ShadowVeryLongPeriodTotal; + int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, ShadowVeryLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLTAKURI)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyDojiPeriodTotal = 0; + BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); + ShadowVeryShortPeriodTotal = 0; + ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); + ShadowVeryLongPeriodTotal = 0; + ShadowVeryLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); + + i = BodyDojiTrailingIdx; + while( i < startIdx ) { + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + i = ShadowVeryShortTrailingIdx; + while( i < startIdx ) { + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); + i++; + } + i = ShadowVeryLongTrailingIdx; + while( i < startIdx ) { + ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * + * Must have: + * - doji body + * - open and close at the high of the day = no or very short upper shadow + * - very long lower shadow + * The meaning of "doji", "very short" and "very long" is specified with TA_SetCandleSettings + * outInteger is always positive (1 to 100) but this does not mean it is bullish: takuri must be considered + * relatively to the trend + */ + outIdx = 0; + + do + { + if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && + TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && + TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowVeryLongPeriodTotal, i ) + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); + ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) + - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); + ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) + - TA_CANDLERANGE( ShadowVeryLong, ShadowVeryLongTrailingIdx ); + i++; + BodyDojiTrailingIdx++; + ShadowVeryShortTrailingIdx++; + ShadowVeryLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlTakuri( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLTAKURI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal, ShadowVeryLongPeriodTotal; +/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, ShadowVeryLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTAKURI)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyDojiPeriodTotal = 0; +/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ ShadowVeryShortPeriodTotal = 0; +/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); +/* Generated */ ShadowVeryLongPeriodTotal = 0; +/* Generated */ ShadowVeryLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); +/* Generated */ i = BodyDojiTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = ShadowVeryLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && +/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && +/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowVeryLongPeriodTotal, i ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); +/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); +/* Generated */ ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) +/* Generated */ - TA_CANDLERANGE( ShadowVeryLong, ShadowVeryLongTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyDojiTrailingIdx++; +/* Generated */ ShadowVeryShortTrailingIdx++; +/* Generated */ ShadowVeryLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c b/src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c new file mode 100644 index 000000000..9b9a9f1c2 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c @@ -0,0 +1,398 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlTasukiGapLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlTasukiGapLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLTASUKIGAP_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(Near) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLTASUKIGAP - Tasuki Gap + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlTasukiGap( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLTASUKIGAP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double NearPeriodTotal; + int i, outIdx, NearTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLTASUKIGAP)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + NearPeriodTotal = 0; + NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); + + i = NearTrailingIdx; + while( i < startIdx ) { + NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - upside (downside) gap + * - first candle after the window: white (black) candlestick + * - second candle: black (white) candlestick that opens within the previous real body and closes under (above) + * the previous real body inside the gap + * - the size of two real bodies should be near the same + * The meaning of "near" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that tasuki gap is significant when it appears in a trend, while this function does + * not consider it + */ + outIdx = 0; + do + { + if( + ( + TA_REALBODYGAPUP(i-1,i-2) && // upside gap + TA_CANDLECOLOR(i-1) == 1 && // 1st: white + TA_CANDLECOLOR(i) == -1 && // 2nd: black + inOpen[i] < inClose[i-1] && inOpen[i] > inOpen[i-1] && // that opens within the white rb + inClose[i] < inOpen[i-1] && // and closes under the white rb + inClose[i] > max(inClose[i-2], inOpen[i-2]) && // inside the gap + // size of 2 rb near the same + std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) + ) || + ( + TA_REALBODYGAPDOWN(i-1,i-2) && // downside gap + TA_CANDLECOLOR(i-1) == -1 && // 1st: black + TA_CANDLECOLOR(i) == 1 && // 2nd: white + inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // that opens within the black rb + inClose[i] > inOpen[i-1] && // and closes above the black rb + inClose[i] < min(inClose[i-2], inOpen[i-2]) && // inside the gap + // size of 2 rb near the same + std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); + i++; + NearTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlTasukiGap( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLTASUKIGAP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double NearPeriodTotal; +/* Generated */ int i, outIdx, NearTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTASUKIGAP)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ NearPeriodTotal = 0; +/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); +/* Generated */ i = NearTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( +/* Generated */ ( +/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // upside gap +/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 1st: white +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 2nd: black +/* Generated */ inOpen[i] < inClose[i-1] && inOpen[i] > inOpen[i-1] && // that opens within the white rb +/* Generated */ inClose[i] < inOpen[i-1] && // and closes under the white rb +/* Generated */ inClose[i] > max(inClose[i-2], inOpen[i-2]) && // inside the gap +/* Generated */ // size of 2 rb near the same +/* Generated */ std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) +/* Generated */ ) || +/* Generated */ ( +/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // downside gap +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 1st: black +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white +/* Generated */ inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // that opens within the black rb +/* Generated */ inClose[i] > inOpen[i-1] && // and closes above the black rb +/* Generated */ inClose[i] < min(inClose[i-2], inOpen[i-2]) && // inside the gap +/* Generated */ // size of 2 rb near the same +/* Generated */ std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ NearTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c b/src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c new file mode 100644 index 000000000..89dccae5f --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c @@ -0,0 +1,388 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 121204 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlThrustingLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlThrustingLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLTHRUSTING_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) + ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLTHRUSTING - Thrusting Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlThrusting( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLTHRUSTING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double EqualPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLTHRUSTING)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + EqualPeriodTotal = 0; + EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); + BodyLongPeriodTotal = 0; + BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); + + i = EqualTrailingIdx; + while( i < startIdx ) { + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); + i++; + } + i = BodyLongTrailingIdx; + while( i < startIdx ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle + * - second candle: white candle with open below previous day low and close into previous day body under the midpoint; + * to differentiate it from in-neck the close should not be equal to the black candle's close + * The meaning of "equal" is specified with TA_SetCandleSettings + * outInteger is negative (-1 to -100): thrusting pattern is always bearish + * the user should consider that the thrusting pattern is significant when it appears in a downtrend and it could be + * even bullish "when coming in an uptrend or occurring twice within several days" (Steve Nison says), while this + * function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black + TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long + TA_CANDLECOLOR(i) == 1 && // 2nd: white + inOpen[i] < inLow[i-1] && // open below prior low + inClose[i] > inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close into prior body + inClose[i] <= inClose[i-1] + TA_REALBODY(i-1) * 0.5 // under the midpoint + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) + - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); + i++; + EqualTrailingIdx++; + BodyLongTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlThrusting( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLTHRUSTING( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double EqualPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTHRUSTING)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ EqualPeriodTotal = 0; +/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ i = EqualTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black +/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long +/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white +/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low +/* Generated */ inClose[i] > inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close into prior body +/* Generated */ inClose[i] <= inClose[i-1] + TA_REALBODY(i-1) * 0.5 // under the midpoint +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) +/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); +/* Generated */ i++; +/* Generated */ EqualTrailingIdx++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLTRISTAR.c b/src/ta-lib/src/ta_func/ta_CDLTRISTAR.c new file mode 100644 index 000000000..d09037a1b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLTRISTAR.c @@ -0,0 +1,379 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * CSB Christopher Barnhouse + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 100204 AC Creation + * 051005 CSB,AC Fix #1199526 for out-of-bound write in output. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlTristarLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlTristarLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLTRISTAR_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return TA_CANDLEAVGPERIOD(BodyDoji) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLTRISTAR - Tristar Pattern + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlTristar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLTRISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyPeriodTotal; + int i, outIdx, BodyTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLTRISTAR)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyPeriodTotal = 0; + BodyTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyDoji); + + i = BodyTrailingIdx; + while( i < startIdx-2 ) { + BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); + i++; + } + + /* Proceed with the calculation for the requested range. + * Must have: + * - 3 consecutive doji days + * - the second doji is a star + * The meaning of "doji" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish + */ + i = startIdx; + outIdx = 0; + do + { + if( TA_REALBODY(i-2) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 1st: doji + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 2nd: doji + TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) ) { // 3rd: doji + outInteger[outIdx] = 0; + if ( TA_REALBODYGAPUP(i-1,i-2) // 2nd gaps up + && + max(inOpen[i],inClose[i]) < max(inOpen[i-1],inClose[i-1]) // 3rd is not higher than 2nd + ) + outInteger[outIdx] = -100; + if ( TA_REALBODYGAPDOWN(i-1,i-2) // 2nd gaps down + && + min(inOpen[i],inClose[i]) > min(inOpen[i-1],inClose[i-1]) // 3rd is not lower than 2nd + ) + outInteger[outIdx] = +100; + outIdx++; + } + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i-2 ) - TA_CANDLERANGE( BodyDoji, BodyTrailingIdx ); + i++; + BodyTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlTristar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLTRISTAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyPeriodTotal; +/* Generated */ int i, outIdx, BodyTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTRISTAR)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyPeriodTotal = 0; +/* Generated */ BodyTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyDoji); +/* Generated */ i = BodyTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 1st: doji +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 2nd: doji +/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) ) { // 3rd: doji +/* Generated */ outInteger[outIdx] = 0; +/* Generated */ if ( TA_REALBODYGAPUP(i-1,i-2) // 2nd gaps up +/* Generated */ && +/* Generated */ max(inOpen[i],inClose[i]) < max(inOpen[i-1],inClose[i-1]) // 3rd is not higher than 2nd +/* Generated */ ) +/* Generated */ outInteger[outIdx] = -100; +/* Generated */ if ( TA_REALBODYGAPDOWN(i-1,i-2) // 2nd gaps down +/* Generated */ && +/* Generated */ min(inOpen[i],inClose[i]) > min(inOpen[i-1],inClose[i-1]) // 3rd is not lower than 2nd +/* Generated */ ) +/* Generated */ outInteger[outIdx] = +100; +/* Generated */ outIdx++; +/* Generated */ } +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i-2 ) - TA_CANDLERANGE( BodyDoji, BodyTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c b/src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c new file mode 100644 index 000000000..21c0e46ee --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c @@ -0,0 +1,388 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 022005 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlUnique3RiverLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlUnique3RiverLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLUNIQUE3RIVER_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLUNIQUE3RIVER - Unique 3 River + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlUnique3River( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLUNIQUE3RIVER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLUNIQUE3RIVER)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: long black candle + * - second candle: black harami candle with a lower low than the first candle's low + * - third candle: small white candle with open not lower than the second candle's low, better if its open and + * close are under the second candle's close + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * outInteger is positive (1 to 100): unique 3 river is always bullish and should appear in a downtrend + * to be significant, while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long + TA_CANDLECOLOR(i-2) == -1 && // black + TA_CANDLECOLOR(i-1) == -1 && // 2nd: black + inClose[i-1] > inClose[i-2] && inOpen[i-1] <= inOpen[i-2] && // harami + inLow[i-1] < inLow[i-2] && // lower low + TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: short + TA_CANDLECOLOR(i) == 1 && // white + inOpen[i] > inLow[i-1] // open not lower + ) + outInteger[outIdx++] = 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlUnique3River( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLUNIQUE3RIVER( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLUNIQUE3RIVER)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // black +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd: black +/* Generated */ inClose[i-1] > inClose[i-2] && inOpen[i-1] <= inOpen[i-2] && // harami +/* Generated */ inLow[i-1] < inLow[i-2] && // lower low +/* Generated */ TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: short +/* Generated */ TA_CANDLECOLOR(i) == 1 && // white +/* Generated */ inOpen[i] > inLow[i-1] // open not lower +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c b/src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c new file mode 100644 index 000000000..cee2ada15 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c @@ -0,0 +1,390 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 110104 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlUpsideGap2CrowsLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlUpsideGap2CrowsLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLUPSIDEGAP2CROWS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlUpsideGap2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLUPSIDEGAP2CROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double BodyShortPeriodTotal, BodyLongPeriodTotal; + int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLUPSIDEGAP2CROWS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + BodyLongPeriodTotal = 0; + BodyShortPeriodTotal = 0; + BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); + BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); + + i = BodyLongTrailingIdx; + while( i < startIdx-2 ) { + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); + i++; + } + i = BodyShortTrailingIdx; + while( i < startIdx-1 ) { + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); + i++; + } + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: white candle, usually long + * - second candle: small black real body + * - gap between the first and the second candle's real bodies + * - third candle: black candle with a real body that engulfs the preceding candle + * and closes above the white candle's close + * The meaning of "short" and "long" is specified with TA_SetCandleSettings + * outInteger is negative (-1 to -100): upside gap two crows is always bearish; + * the user should consider that an upside gap two crows is significant when it appears in an uptrend, + * while this function does not consider the trend + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white + TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long + TA_CANDLECOLOR(i-1) == -1 && // 2nd: black + TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // short + TA_REALBODYGAPUP(i-1,i-2) && // gapping up + TA_CANDLECOLOR(i) == -1 && // 3rd: black + inOpen[i] > inOpen[i-1] && inClose[i] < inClose[i-1] && // 3rd: engulfing prior rb + inClose[i] > inClose[i-2] // closing above 1st + ) + outInteger[outIdx++] = -100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); + BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); + i++; + BodyLongTrailingIdx++; + BodyShortTrailingIdx++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlUpsideGap2Crows( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLUPSIDEGAP2CROWS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; +/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLUPSIDEGAP2CROWS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ BodyLongPeriodTotal = 0; +/* Generated */ BodyShortPeriodTotal = 0; +/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); +/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); +/* Generated */ i = BodyLongTrailingIdx; +/* Generated */ while( i < startIdx-2 ) { +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = BodyShortTrailingIdx; +/* Generated */ while( i < startIdx-1 ) { +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); +/* Generated */ i++; +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white +/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long +/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd: black +/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // short +/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up +/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd: black +/* Generated */ inOpen[i] > inOpen[i-1] && inClose[i] < inClose[i-1] && // 3rd: engulfing prior rb +/* Generated */ inClose[i] > inClose[i-2] // closing above 1st +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = -100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); +/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); +/* Generated */ i++; +/* Generated */ BodyLongTrailingIdx++; +/* Generated */ BodyShortTrailingIdx++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c b/src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c new file mode 100644 index 000000000..c8ad84fc2 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c @@ -0,0 +1,363 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011605 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CdlXSideGap3MethodsLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cdlXSideGap3MethodsLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CDLXSIDEGAP3METHODS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods + * + * Input = Open, High, Low, Close + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlXSideGap3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CDLXSIDEGAP3METHODS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int i, outIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + + lookbackTotal = LOOKBACK_CALL(CDLXSIDEGAP3METHODS)(); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + i = startIdx; + + /* Proceed with the calculation for the requested range. + * Must have: + * - first candle: white (black) candle + * - second candle: white (black) candle + * - upside (downside) gap between the first and the second real bodies + * - third candle: black (white) candle that opens within the second real body and closes within the first real body + * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; + * the user should consider that up/downside gap 3 methods is significant when it appears in a trend, while this + * function does not consider it + */ + outIdx = 0; + do + { + if( TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && // 1st and 2nd of same color + TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // 3rd opposite color + inOpen[i] < max(inClose[i-1], inOpen[i-1]) && // 3rd opens within 2nd rb + inOpen[i] > min(inClose[i-1], inOpen[i-1]) && + inClose[i] < max(inClose[i-2], inOpen[i-2]) && // 3rd closes within 1st rb + inClose[i] > min(inClose[i-2], inOpen[i-2]) && + ( ( + TA_CANDLECOLOR(i-2) == 1 && // when 1st is white + TA_REALBODYGAPUP(i-1,i-2) // upside gap + ) || + ( + TA_CANDLECOLOR(i-2) == -1 && // when 1st is black + TA_REALBODYGAPDOWN(i-1,i-2) // downside gap + ) + ) + ) + outInteger[outIdx++] = TA_CANDLECOLOR(i-2) * 100; + else + outInteger[outIdx++] = 0; + /* add the current range and subtract the first range: this is done after the pattern recognition + * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) + */ + i++; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cdlXSideGap3Methods( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CDLXSIDEGAP3METHODS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i, outIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLXSIDEGAP3METHODS)(); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ i = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ if( TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && // 1st and 2nd of same color +/* Generated */ TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // 3rd opposite color +/* Generated */ inOpen[i] < max(inClose[i-1], inOpen[i-1]) && // 3rd opens within 2nd rb +/* Generated */ inOpen[i] > min(inClose[i-1], inOpen[i-1]) && +/* Generated */ inClose[i] < max(inClose[i-2], inOpen[i-2]) && // 3rd closes within 1st rb +/* Generated */ inClose[i] > min(inClose[i-2], inOpen[i-2]) && +/* Generated */ ( ( +/* Generated */ TA_CANDLECOLOR(i-2) == 1 && // when 1st is white +/* Generated */ TA_REALBODYGAPUP(i-1,i-2) // upside gap +/* Generated */ ) || +/* Generated */ ( +/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // when 1st is black +/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) // downside gap +/* Generated */ ) +/* Generated */ ) +/* Generated */ ) +/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-2) * 100; +/* Generated */ else +/* Generated */ outInteger[outIdx++] = 0; +/* Generated */ i++; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CEIL.c b/src/ta-lib/src/ta_func/ta_CEIL.c new file mode 100644 index 000000000..7d02fa5be --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CEIL.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CeilLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int ceilLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CEIL_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CEIL - Vector Ceil + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ceil( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CEIL( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_ceil(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ceil( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CEIL( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_ceil(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CMO.c b/src/ta-lib/src/ta_func/ta_CMO.c new file mode 100644 index 000000000..1bccab6a3 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CMO.c @@ -0,0 +1,613 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * BT Barry Tsung + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112605 MF Initial version. + * 021806 MF,BT Fix #1434450 reported by BT. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CmoLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cmoLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CMO_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + retValue = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_CMO,Cmo); + if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock) ) + retValue--; + + return retValue; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CMO - Chande Momentum Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cmo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CMO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + + int today, lookbackTotal, unstablePeriod, i; + double prevGain, prevLoss, prevValue, savePrevValue; + double tempValue1, tempValue2, tempValue3, tempValue4; + + #if defined( USE_SINGLE_PRECISION_INPUT ) + ARRAY_MEMMOVEMIX_VAR; + #endif + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* CMO calculation is mostly identical to RSI. + * + * The only difference is in the last step of calculation: + * + * RSI = gain / (gain+loss) + * CMO = (gain-loss) / (gain+loss) + * + * See the RSI function for potentially some more info + * on this algo. + */ + + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(CMO)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + outIdx = 0; /* Index into the output. */ + + /* Trap special case where the period is '1'. + * In that case, just copy the input into the + * output for the requested range (as-is !) + */ + if( optInTimePeriod == 1 ) + { + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + i = (endIdx-startIdx)+1; + VALUE_HANDLE_DEREF(outNBElement) = i; + #if defined( USE_SINGLE_PRECISION_INPUT ) + ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); + #else + ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); + #endif + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Accumulate Wilder's "Average Gain" and "Average Loss" + * among the initial period. + */ + today = startIdx-lookbackTotal; + prevValue = inReal[today]; + + unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_CMO,Cmo); + + /* If there is no unstable period, + * calculate the 'additional' initial + * price bar who is particuliar to + * metastock. + * If there is an unstable period, + * no need to calculate since this + * first value will be surely skip. + */ + if( (unstablePeriod == 0) && + (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) + { + /* Preserve prevValue because it may get + * overwritten by the output. + *(because output ptr could be the same as input ptr). + */ + savePrevValue = prevValue; + + /* No unstable period, so must calculate first output + * particular to Metastock. + * (Metastock re-use the first price bar, so there + * is no loss/gain at first. Beats me why they + * are doing all this). + */ + prevGain = 0.0; + prevLoss = 0.0; + for( i=optInTimePeriod; i > 0; i-- ) + { + tempValue1 = inReal[today++]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + } + + + tempValue1 = prevLoss/optInTimePeriod; + tempValue2 = prevGain/optInTimePeriod; + tempValue3 = tempValue2-tempValue1; + tempValue4 = tempValue1+tempValue2; + + /* Write the output. */ + if( !TA_IS_ZERO(tempValue4) ) + outReal[outIdx++] = 100*(tempValue3/tempValue4); + else + outReal[outIdx++] = 0.0; + + /* Are we done? */ + if( today > endIdx ) + { + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Start over for the next price bar. */ + today -= optInTimePeriod; + prevValue = savePrevValue; + } + + + /* Remaining of the processing is identical + * for both Classic calculation and Metastock. + */ + prevGain = 0.0; + prevLoss = 0.0; + today++; + for( i=optInTimePeriod; i > 0; i-- ) + { + tempValue1 = inReal[today++]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + } + + + /* Subsequent prevLoss and prevGain are smoothed + * using the previous values (Wilder's approach). + * 1) Multiply the previous by 'period-1'. + * 2) Add today value. + * 3) Divide by 'period'. + */ + prevLoss /= optInTimePeriod; + prevGain /= optInTimePeriod; + + /* Often documentation present the RSI calculation as follow: + * RSI = 100 - (100 / 1 + (prevGain/prevLoss)) + * + * The following is equivalent: + * RSI = 100 * (prevGain/(prevGain+prevLoss)) + * + * The second equation is used here for speed optimization. + */ + if( today > startIdx ) + { + tempValue1 = prevGain+prevLoss; + if( !TA_IS_ZERO(tempValue1) ) + outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); + else + outReal[outIdx++] = 0.0; + } + else + { + /* Skip the unstable period. Do the processing + * but do not write it in the output. + */ + while( today < startIdx ) + { + tempValue1 = inReal[today]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + + prevLoss *= (optInTimePeriod-1); + prevGain *= (optInTimePeriod-1); + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + + prevLoss /= optInTimePeriod; + prevGain /= optInTimePeriod; + + today++; + } + } + + /* Unstable period skipped... now continue + * processing if needed. + */ + while( today <= endIdx ) + { + tempValue1 = inReal[today++]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + + prevLoss *= (optInTimePeriod-1); + prevGain *= (optInTimePeriod-1); + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + + prevLoss /= optInTimePeriod; + prevGain /= optInTimePeriod; + tempValue1 = prevGain+prevLoss; + if( !TA_IS_ZERO(tempValue1) ) + outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); + else + outReal[outIdx++] = 0.0; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cmo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CMO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal, unstablePeriod, i; +/* Generated */ double prevGain, prevLoss, prevValue, savePrevValue; +/* Generated */ double tempValue1, tempValue2, tempValue3, tempValue4; +/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ ARRAY_MEMMOVEMIX_VAR; +/* Generated */ #endif +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackTotal = LOOKBACK_CALL(CMO)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ outIdx = 0; +/* Generated */ if( optInTimePeriod == 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ i = (endIdx-startIdx)+1; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = i; +/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); +/* Generated */ #else +/* Generated */ ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); +/* Generated */ #endif +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ today = startIdx-lookbackTotal; +/* Generated */ prevValue = inReal[today]; +/* Generated */ unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_CMO,Cmo); +/* Generated */ if( (unstablePeriod == 0) && +/* Generated */ (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) +/* Generated */ { +/* Generated */ savePrevValue = prevValue; +/* Generated */ prevGain = 0.0; +/* Generated */ prevLoss = 0.0; +/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today++]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ } +/* Generated */ tempValue1 = prevLoss/optInTimePeriod; +/* Generated */ tempValue2 = prevGain/optInTimePeriod; +/* Generated */ tempValue3 = tempValue2-tempValue1; +/* Generated */ tempValue4 = tempValue1+tempValue2; +/* Generated */ if( !TA_IS_ZERO(tempValue4) ) +/* Generated */ outReal[outIdx++] = 100*(tempValue3/tempValue4); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ if( today > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ today -= optInTimePeriod; +/* Generated */ prevValue = savePrevValue; +/* Generated */ } +/* Generated */ prevGain = 0.0; +/* Generated */ prevLoss = 0.0; +/* Generated */ today++; +/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today++]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ } +/* Generated */ prevLoss /= optInTimePeriod; +/* Generated */ prevGain /= optInTimePeriod; +/* Generated */ if( today > startIdx ) +/* Generated */ { +/* Generated */ tempValue1 = prevGain+prevLoss; +/* Generated */ if( !TA_IS_ZERO(tempValue1) ) +/* Generated */ outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ while( today < startIdx ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ prevLoss *= (optInTimePeriod-1); +/* Generated */ prevGain *= (optInTimePeriod-1); +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ prevLoss /= optInTimePeriod; +/* Generated */ prevGain /= optInTimePeriod; +/* Generated */ today++; +/* Generated */ } +/* Generated */ } +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today++]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ prevLoss *= (optInTimePeriod-1); +/* Generated */ prevGain *= (optInTimePeriod-1); +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ prevLoss /= optInTimePeriod; +/* Generated */ prevGain /= optInTimePeriod; +/* Generated */ tempValue1 = prevGain+prevLoss; +/* Generated */ if( !TA_IS_ZERO(tempValue1) ) +/* Generated */ outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_CORREL.c b/src/ta-lib/src/ta_func/ta_CORREL.c new file mode 100644 index 000000000..c5a42139f --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_CORREL.c @@ -0,0 +1,416 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 101003 MF Initial Coding + * 062804 MF Resolve div by zero bug on limit case. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CorrelLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int correlLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_CORREL_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_CORREL - Pearson's Correlation Coefficient (r) + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode correl( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal0[], +/* Generated */ double inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_CORREL( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal0[], +/* Generated */ const double inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double sumXY, sumX, sumY, sumX2, sumY2, x, y, trailingX, trailingY; + double tempReal; + int lookbackTotal, today, trailingIdx, outIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Move up the start index if there is not + * enough initial data. + */ + lookbackTotal = optInTimePeriod-1; + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + trailingIdx = startIdx - lookbackTotal; + + /* Calculate the initial values. */ + sumXY = sumX = sumY = sumX2 = sumY2 = 0.0; + for( today=trailingIdx; today <= startIdx; today++ ) + { + x = inReal0[today]; + sumX += x; + sumX2 += x*x; + + y = inReal1[today]; + sumXY += x*y; + sumY += y; + sumY2 += y*y; + } + + /* Write the first output. + * Save first the trailing values since the input + * and output might be the same array, + */ + trailingX = inReal0[trailingIdx]; + trailingY = inReal1[trailingIdx++]; + tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); + if( !TA_IS_ZERO_OR_NEG(tempReal) ) + outReal[0] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); + else + outReal[0] = 0.0; + + /* Tight loop to do subsequent values. */ + outIdx = 1; + while( today <= endIdx ) + { + /* Remove trailing values */ + sumX -= trailingX; + sumX2 -= trailingX*trailingX; + + sumXY -= trailingX*trailingY; + sumY -= trailingY; + sumY2 -= trailingY*trailingY; + + /* Add new values */ + x = inReal0[today]; + sumX += x; + sumX2 += x*x; + + y = inReal1[today++]; + sumXY += x*y; + sumY += y; + sumY2 += y*y; + + /* Output new coefficient. + * Save first the trailing values since the input + * and output might be the same array, + */ + trailingX = inReal0[trailingIdx]; + trailingY = inReal1[trailingIdx++]; + tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); + if( !TA_IS_ZERO_OR_NEG(tempReal) ) + outReal[outIdx++] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); + else + outReal[outIdx++] = 0.0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode correl( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal0[], +/* Generated */ float inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_CORREL( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal0[], +/* Generated */ const float inReal1[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double sumXY, sumX, sumY, sumX2, sumY2, x, y, trailingX, trailingY; +/* Generated */ double tempReal; +/* Generated */ int lookbackTotal, today, trailingIdx, outIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = optInTimePeriod-1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingIdx = startIdx - lookbackTotal; +/* Generated */ sumXY = sumX = sumY = sumX2 = sumY2 = 0.0; +/* Generated */ for( today=trailingIdx; today <= startIdx; today++ ) +/* Generated */ { +/* Generated */ x = inReal0[today]; +/* Generated */ sumX += x; +/* Generated */ sumX2 += x*x; +/* Generated */ y = inReal1[today]; +/* Generated */ sumXY += x*y; +/* Generated */ sumY += y; +/* Generated */ sumY2 += y*y; +/* Generated */ } +/* Generated */ trailingX = inReal0[trailingIdx]; +/* Generated */ trailingY = inReal1[trailingIdx++]; +/* Generated */ tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); +/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) +/* Generated */ outReal[0] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ outIdx = 1; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ sumX -= trailingX; +/* Generated */ sumX2 -= trailingX*trailingX; +/* Generated */ sumXY -= trailingX*trailingY; +/* Generated */ sumY -= trailingY; +/* Generated */ sumY2 -= trailingY*trailingY; +/* Generated */ x = inReal0[today]; +/* Generated */ sumX += x; +/* Generated */ sumX2 += x*x; +/* Generated */ y = inReal1[today++]; +/* Generated */ sumXY += x*y; +/* Generated */ sumY += y; +/* Generated */ sumY2 += y*y; +/* Generated */ trailingX = inReal0[trailingIdx]; +/* Generated */ trailingY = inReal1[trailingIdx++]; +/* Generated */ tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); +/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) +/* Generated */ outReal[outIdx++] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_COS.c b/src/ta-lib/src/ta_func/ta_COS.c new file mode 100644 index 000000000..bf2cb44d5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_COS.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CosLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int cosLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_COS_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_COS - Vector Trigonometric Cos + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_COS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_cos(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cos( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_COS( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_cos(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_COSH.c b/src/ta-lib/src/ta_func/ta_COSH.c new file mode 100644 index 000000000..a158fa2d2 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_COSH.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::CoshLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int coshLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_COSH_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_COSH - Vector Trigonometric Cosh + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cosh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_COSH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_cosh(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode cosh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_COSH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_cosh(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_DEMA.c b/src/ta-lib/src/ta_func/ta_DEMA.c new file mode 100644 index 000000000..631a84593 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_DEMA.c @@ -0,0 +1,498 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010102 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::DemaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int demaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_DEMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Get lookback for one EMA. + * Multiply by two (because double smoothing). + */ + return LOOKBACK_CALL(EMA)( optInTimePeriod ) * 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_DEMA - Double Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode dema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_DEMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_REF(firstEMA); + ARRAY_REF(secondEMA); + double k; + VALUE_HANDLE_INT(firstEMABegIdx); + VALUE_HANDLE_INT(firstEMANbElement); + VALUE_HANDLE_INT(secondEMABegIdx); + VALUE_HANDLE_INT(secondEMANbElement); + int tempInt, outIdx, firstEMAIdx, lookbackTotal, lookbackEMA; + ENUM_DECLARATION(RetCode) retCode; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* For an explanation of this function, please read + * + * Stocks & Commodities V. 12:1 (11-19): + * Smoothing Data With Faster Moving Averages + * Stocks & Commodities V. 12:2 (72-80): + * Smoothing Data With Less Lag + * + * Both magazine articles written by Patrick G. Mulloy + * + * Essentially, a DEMA of time serie 't' is: + * EMA2 = EMA(EMA(t,period),period) + * DEMA = 2*EMA(t,period)- EMA2 + * + * DEMA offers a moving average with less lags then the + * traditional EMA. + * + * Do not confuse a DEMA with the EMA2. Both are called + * "Double EMA" in the litterature, but EMA2 is a simple + * EMA of an EMA, while DEMA is a compostie of a single + * EMA with EMA2. + * + * TEMA is very similar (and from the same author). + */ + + /* Will change only on success. */ + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + + /* Adjust startIdx to account for the lookback period. */ + lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); + lookbackTotal = lookbackEMA * 2; + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + /* Allocate a temporary buffer for the firstEMA. + * + * When possible, re-use the outputBuffer for temp + * calculation. + */ + #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) + tempInt = lookbackTotal+(endIdx-startIdx)+1; + ARRAY_ALLOC(firstEMA, tempInt ); + #if !defined( _JAVA ) + if( !firstEMA ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + #else + if( inReal == outReal ) + firstEMA = outReal; + else + { + tempInt = lookbackTotal+(endIdx-startIdx)+1; + ARRAY_ALLOC(firstEMA, tempInt ); + #if !defined( _JAVA ) + if( !firstEMA ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + } + #endif + + /* Calculate the first EMA */ + k = PER_TO_K(optInTimePeriod); + retCode = FUNCTION_CALL(INT_EMA)( startIdx-lookbackEMA, endIdx, inReal, + optInTimePeriod, k, + VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), + firstEMA ); + + /* Verify for failure or if not enough data after + * calculating the first EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) + { + ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); + return retCode; + } + + /* Allocate a temporary buffer for storing the EMA of the EMA. */ + ARRAY_ALLOC(secondEMA, VALUE_HANDLE_GET(firstEMANbElement)); + + #if !defined( _JAVA ) + if( !secondEMA ) + { + ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, + optInTimePeriod, k, + VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), + secondEMA ); + + /* Return empty output on failure or if not enough data after + * calculating the second EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) + { + #if defined(USE_SINGLE_PRECISION_INPUT) + ARRAY_FREE( firstEMA ); + #else + ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); + #endif + ARRAY_FREE( secondEMA ); + return retCode; + } + + /* Iterate through the second EMA and write the DEMA into + * the output. + */ + firstEMAIdx = VALUE_HANDLE_GET(secondEMABegIdx); + outIdx = 0; + while( outIdx < VALUE_HANDLE_GET(secondEMANbElement) ) + { + outReal[outIdx] = (2.0*firstEMA[firstEMAIdx++]) - secondEMA[outIdx]; + outIdx++; + } + + #if defined(USE_SINGLE_PRECISION_INPUT) + ARRAY_FREE( firstEMA ); + #else + ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); + #endif + ARRAY_FREE( secondEMA ); + + /* Succeed. Indicate where the output starts relative to + * the caller input. + */ + VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(firstEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode dema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_DEMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(firstEMA); +/* Generated */ ARRAY_REF(secondEMA); +/* Generated */ double k; +/* Generated */ VALUE_HANDLE_INT(firstEMABegIdx); +/* Generated */ VALUE_HANDLE_INT(firstEMANbElement); +/* Generated */ VALUE_HANDLE_INT(secondEMABegIdx); +/* Generated */ VALUE_HANDLE_INT(secondEMANbElement); +/* Generated */ int tempInt, outIdx, firstEMAIdx, lookbackTotal, lookbackEMA; +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); +/* Generated */ lookbackTotal = lookbackEMA * 2; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) +/* Generated */ tempInt = lookbackTotal+(endIdx-startIdx)+1; +/* Generated */ ARRAY_ALLOC(firstEMA, tempInt ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !firstEMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ #else +/* Generated */ if( inReal == outReal ) +/* Generated */ firstEMA = outReal; +/* Generated */ else +/* Generated */ { +/* Generated */ tempInt = lookbackTotal+(endIdx-startIdx)+1; +/* Generated */ ARRAY_ALLOC(firstEMA, tempInt ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !firstEMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ } +/* Generated */ #endif +/* Generated */ k = PER_TO_K(optInTimePeriod); +/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( startIdx-lookbackEMA, endIdx, inReal, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), +/* Generated */ firstEMA ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) +/* Generated */ { +/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ ARRAY_ALLOC(secondEMA, VALUE_HANDLE_GET(firstEMANbElement)); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !secondEMA ) +/* Generated */ { +/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), +/* Generated */ secondEMA ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) +/* Generated */ { +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ #else +/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); +/* Generated */ #endif +/* Generated */ ARRAY_FREE( secondEMA ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ firstEMAIdx = VALUE_HANDLE_GET(secondEMABegIdx); +/* Generated */ outIdx = 0; +/* Generated */ while( outIdx < VALUE_HANDLE_GET(secondEMANbElement) ) +/* Generated */ { +/* Generated */ outReal[outIdx] = (2.0*firstEMA[firstEMAIdx++]) - secondEMA[outIdx]; +/* Generated */ outIdx++; +/* Generated */ } +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ #else +/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); +/* Generated */ #endif +/* Generated */ ARRAY_FREE( secondEMA ); +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(firstEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_DIV.c b/src/ta-lib/src/ta_func/ta_DIV.c new file mode 100644 index 000000000..3cb94df36 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_DIV.c @@ -0,0 +1,260 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::DivLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int divLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_DIV_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_DIV - Vector Arithmetic Div + * + * Input = double, double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Div( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Div( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode div( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal0[], +/* Generated */ double inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_DIV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal0[], +/* Generated */ const double inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = inReal0[i]/inReal1[i]; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Div( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Div( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode div( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal0[], +/* Generated */ float inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_DIV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal0[], +/* Generated */ const float inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = inReal0[i]/inReal1[i]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_DX.c b/src/ta-lib/src/ta_func/ta_DX.c new file mode 100644 index 000000000..21cc14a00 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_DX.c @@ -0,0 +1,705 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * MIF Mirek Fontan (mira@fontan.cz) + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. + * 062704 MF Fix #965557. Div by zero bug reported by MIF. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::DxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int dxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_DX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + if( optInTimePeriod > 1 ) + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx); + else + return 2; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_DX - Directional Movement Index + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode dx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_DX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int today, lookbackTotal, outIdx; + double prevHigh, prevLow, prevClose; + double prevMinusDM, prevPlusDM, prevTR; + double tempReal, tempReal2, diffP, diffM; + double minusDI, plusDI; + + int i; + + #define TRUE_RANGE(TH,TL,YC,OUT) {\ + OUT = TH-TL; \ + tempReal2 = std_fabs(TH-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + tempReal2 = std_fabs(TL-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + } + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* + * The DM1 (one period) is base on the largest part of + * today's range that is outside of yesterdays range. + * + * The following 7 cases explain how the +DM and -DM are + * calculated on one period: + * + * Case 1: Case 2: + * C| A| + * | | C| + * | +DM1 = (C-A) B| | +DM1 = 0 + * | -DM1 = 0 | -DM1 = (B-D) + * A| | D| + * | D| + * B| + * + * Case 3: Case 4: + * C| C| + * | A| | + * | +DM1 = (C-A) | | +DM1 = 0 + * | -DM1 = 0 B| | -DM1 = (B-D) + * A| | | + * | | D| + * B| | + * D| + * + * Case 5: Case 6: + * A| A| C| + * | C| +DM1 = 0 | | +DM1 = 0 + * | | -DM1 = 0 | | -DM1 = 0 + * | D| | | + * B| B| D| + * + * + * Case 7: + * + * C| + * A| | + * | | +DM=0 + * B| | -DM=0 + * D| + * + * In case 3 and 4, the rule is that the smallest delta between + * (C-A) and (B-D) determine which of +DM or -DM is zero. + * + * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are + * zero. + * + * The rules remain the same when A=B and C=D (when the highs + * equal the lows). + * + * When calculating the DM over a period > 1, the one-period DM + * for the desired period are initialy sum. In other word, + * for a -DM14, sum the -DM1 for the first 14 days (that's + * 13 values because there is no DM for the first day!) + * Subsequent DM are calculated using the Wilder's + * smoothing approach: + * + * Previous -DM14 + * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 + * 14 + * + * Calculation of a -DI14 is as follow: + * + * -DM14 + * -DI14 = -------- + * TR14 + * + * Calculation of the TR14 is: + * + * Previous TR14 + * Today's TR14 = Previous TR14 - -------------- + Today's TR1 + * 14 + * + * The first TR14 is the summation of the first 14 TR1. See the + * TA_TRANGE function on how to calculate the true range. + * + * Calculation of the DX14 is: + * + * diffDI = ABS( (-DI14) - (+DI14) ) + * sumDI = (-DI14) + (+DI14) + * + * DX14 = 100 * (diffDI / sumDI) + * + * Reference: + * New Concepts In Technical Trading Systems, J. Welles Wilder Jr + */ + + /* Original implementation from Wilder's book was doing some integer + * rounding in its calculations. + * + * This was understandable in the context that at the time the book + * was written, most user were doing the calculation by hand. + * + * For a computer, rounding is unnecessary (and even problematic when inputs + * are close to 1). + * + * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, + * you can comment out the following #undef/#define and rebuild the library. + */ + #undef round_pos + #define round_pos(x) (x) + + if( optInTimePeriod > 1 ) + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx); + else + lookbackTotal = 2; + + /* Adjust startIdx to account for the lookback period. */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Indicate where the next output should be put + * in the outReal. + */ + outIdx = 0; + + /* Process the initial DM and TR */ + VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; + + prevMinusDM = 0.0; + prevPlusDM = 0.0; + prevTR = 0.0; + today = startIdx - lookbackTotal; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + prevClose = inClose[today]; + i = optInTimePeriod-1; + while( i-- > 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR += tempReal; + prevClose = inClose[today]; + } + + /* Skip the unstable period. Note that this loop must be executed + * at least ONCE to calculate the first DI. + */ + i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx) + 1; + while( i-- != 0 ) + { + /* Calculate the prevMinusDM and prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + prevMinusDM -= prevMinusDM/optInTimePeriod; + prevPlusDM -= prevPlusDM/optInTimePeriod; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + } + + /* Write the first DX output */ + if( !TA_IS_ZERO(prevTR) ) + { + minusDI = round_pos(100.0*(prevMinusDM/prevTR)); + plusDI = round_pos(100.0*(prevPlusDM/prevTR)); + tempReal = minusDI+plusDI; + if( !TA_IS_ZERO(tempReal) ) + outReal[0] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); + else + outReal[0] = 0.0; + } + else + outReal[0] = 0.0; + outIdx = 1; + + while( today < endIdx ) + { + /* Calculate the prevMinusDM and prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + prevMinusDM -= prevMinusDM/optInTimePeriod; + prevPlusDM -= prevPlusDM/optInTimePeriod; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + else if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + + /* Calculate the DX. The value is rounded (see Wilder book). */ + if( !TA_IS_ZERO(prevTR)) + { + minusDI = round_pos(100.0*(prevMinusDM/prevTR)); + plusDI = round_pos(100.0*(prevPlusDM/prevTR)); + /* This loop is just to accumulate the initial DX */ + tempReal = minusDI+plusDI; + if( !TA_IS_ZERO(tempReal)) + outReal[outIdx] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); + else + outReal[outIdx] = outReal[outIdx-1]; + } + else + outReal[outIdx] = outReal[outIdx-1]; + outIdx++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode dx( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_DX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, lookbackTotal, outIdx; +/* Generated */ double prevHigh, prevLow, prevClose; +/* Generated */ double prevMinusDM, prevPlusDM, prevTR; +/* Generated */ double tempReal, tempReal2, diffP, diffM; +/* Generated */ double minusDI, plusDI; +/* Generated */ int i; +/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ +/* Generated */ OUT = TH-TL; \ +/* Generated */ tempReal2 = std_fabs(TH-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ tempReal2 = std_fabs(TL-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ } +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ #undef round_pos +/* Generated */ #define round_pos(x) (x) +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx); +/* Generated */ else +/* Generated */ lookbackTotal = 2; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; +/* Generated */ prevMinusDM = 0.0; +/* Generated */ prevPlusDM = 0.0; +/* Generated */ prevTR = 0.0; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ prevClose = inClose[today]; +/* Generated */ i = optInTimePeriod-1; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR += tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx) + 1; +/* Generated */ while( i-- != 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; +/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ { +/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ tempReal = minusDI+plusDI; +/* Generated */ if( !TA_IS_ZERO(tempReal) ) +/* Generated */ outReal[0] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ outIdx = 1; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; +/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(prevTR)) +/* Generated */ { +/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ tempReal = minusDI+plusDI; +/* Generated */ if( !TA_IS_ZERO(tempReal)) +/* Generated */ outReal[outIdx] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); +/* Generated */ else +/* Generated */ outReal[outIdx] = outReal[outIdx-1]; +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[outIdx] = outReal[outIdx-1]; +/* Generated */ outIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_EMA.c b/src/ta-lib/src/ta_func/ta_EMA.c new file mode 100644 index 000000000..0f6ff7b79 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_EMA.c @@ -0,0 +1,512 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::EmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int emaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_EMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod - 1 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_EMA,Ema); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_EMA - Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_EMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Simply call the internal implementation of the EMA. */ + return FUNCTION_CALL(INT_EMA)( startIdx, endIdx, inReal, + optInTimePeriod, + PER_TO_K( optInTimePeriod ), + outBegIdx, outNBElement, outReal ); +} + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + // No INT function +#else +/* Internal implementation can be called from any other TA function. + * + * Faster because there is no parameter check, but it is a double + * edge sword. + * + * The optInK_1 and optInTimePeriod are usually tightly coupled: + * + * optInK_1 = 2 / (optInTimePeriod + 1). + * + * These values are going to be related by this equation 99.9% of the + * time... but there is some exception, this is why both must be provided. + * + * The macro PER_TO_K is equivalent to the above formula. + */ +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) + enum class Core::RetCode Core::TA_INT_EMA( int startIdx, + int endIdx, + SubArray^ inReal, + int optInTimePeriod, + double optInK_1, + [Out]int% outBegIdx, + [Out]int% outNBElement, + SubArray^ outReal ) +#elif defined( _MANAGED ) + enum class Core::RetCode Core::TA_INT_EMA( int startIdx, + int endIdx, + cli::array^ inReal, + int optInTimePeriod, + double optInK_1, + [Out]int% outBegIdx, + [Out]int% outNBElement, + cli::array^ outReal ) +#elif defined( _JAVA ) +public RetCode TA_INT_EMA( int startIdx, + int endIdx, + INPUT_TYPE []inReal, + int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + double optInK_1, /* Ratio for calculation of EMA. */ + MInteger outBegIdx, + MInteger outNBElement, + double []outReal ) + +#else +TA_RetCode TA_PREFIX(INT_EMA)( int startIdx, + int endIdx, + const INPUT_TYPE *inReal, + int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + double optInK_1, /* Ratio for calculation of EMA. */ + int *outBegIdx, + int *outNBElement, + double *outReal ) +#endif +{ + double tempReal, prevMA; + int i, today, outIdx, lookbackTotal; + + /* Ususally, optInK_1 = 2 / (optInTimePeriod + 1), + * but sometime there is exception. This + * is why both value are parameters. + */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = LOOKBACK_CALL(EMA)( optInTimePeriod ); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Do the EMA calculation using tight loops. */ + + /* The first EMA is calculated differently. It + * then become the seed for subsequent EMA. + * + * The algorithm for this seed vary widely. + * Only 3 are implemented here: + * + * TA_MA_CLASSIC: + * Use a simple MA of the first 'period'. + * This is the approach most widely documented. + * + * TA_MA_METASTOCK: + * Use first price bar value as a seed + * from the begining of all the available + * data. + * + * TA_MA_TRADESTATION: + * Use 4th price bar as a seed, except when + * period is 1 who use 2th price bar or something + * like that... (not an obvious one...). + */ + if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_DEFAULT,Default) ) + { + today = startIdx-lookbackTotal; + i = optInTimePeriod; + tempReal = 0.0; + while( i-- > 0 ) + tempReal += inReal[today++]; + + prevMA = tempReal / optInTimePeriod; + } + else + { + prevMA = inReal[0]; + today = 1; + + /* !!! Tradestation not supported yet. + case TA_MA_TRADESTATION: + prevMA = inReal[startIdx-1]; + if( optInTimePeriod == 1 ) + VALUE_HANDLE_DEREF(outBegIdx)_0 = 1; + else + VALUE_HANDLE_DEREF(outBegIdx)_0 = 3; + */ + } + + /* At this point, prevMA is the first EMA (the seed for + * the rest). + * 'today' keep track of where the processing is within the + * input. + */ + + /* Skip the unstable period. Do the processing + * but do not write it in the output. + */ + while( today <= startIdx ) + prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; + + /* Write the first value. */ + outReal[0] = prevMA; + outIdx = 1; + + /* Calculate the remaining range. */ + while( today <= endIdx ) + { + prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; + outReal[outIdx++] = prevMA; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} +#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_EMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ return FUNCTION_CALL(INT_EMA)( startIdx, endIdx, inReal, +/* Generated */ optInTimePeriod, +/* Generated */ PER_TO_K( optInTimePeriod ), +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ } +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ // No INT function +/* Generated */ #else +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TA_INT_EMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ double optInK_1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TA_INT_EMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ double optInK_1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode TA_INT_EMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ INPUT_TYPE []inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ double optInK_1, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double []outReal ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_PREFIX(INT_EMA)( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const INPUT_TYPE *inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ double optInK_1, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double *outReal ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double tempReal, prevMA; +/* Generated */ int i, today, outIdx, lookbackTotal; +/* Generated */ lookbackTotal = LOOKBACK_CALL(EMA)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_DEFAULT,Default) ) +/* Generated */ { +/* Generated */ today = startIdx-lookbackTotal; +/* Generated */ i = optInTimePeriod; +/* Generated */ tempReal = 0.0; +/* Generated */ while( i-- > 0 ) +/* Generated */ tempReal += inReal[today++]; +/* Generated */ prevMA = tempReal / optInTimePeriod; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevMA = inReal[0]; +/* Generated */ today = 1; +/* Generated */ } +/* Generated */ while( today <= startIdx ) +/* Generated */ prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; +/* Generated */ outReal[0] = prevMA; +/* Generated */ outIdx = 1; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; +/* Generated */ outReal[outIdx++] = prevMA; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_EXP.c b/src/ta-lib/src/ta_func/ta_EXP.c new file mode 100644 index 000000000..ab4572153 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_EXP.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::ExpLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int expLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_EXP_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_EXP - Vector Arithmetic Exp + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode exp( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_EXP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_exp(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode exp( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_EXP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_exp(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_FLOOR.c b/src/ta-lib/src/ta_func/ta_FLOOR.c new file mode 100644 index 000000000..d85b4fc92 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_FLOOR.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::FloorLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int floorLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_FLOOR_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_FLOOR - Vector Floor + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode floor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_FLOOR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_floor(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode floor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_FLOOR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_floor(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c b/src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c new file mode 100644 index 000000000..9b97d9d78 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c @@ -0,0 +1,571 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::HtDcPeriodLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int htDcPeriodLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_HT_DCPERIOD_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* See TA_MAMA_Lookback for an explanation of these */ + return 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPERIOD,HtDcPeriod); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htDcPeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_HT_DCPERIOD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg; + + double todayValue, smoothPeriod; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Constant */ + rad2Deg = 180.0 / (4.0 * std_atan(1)); + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPERIOD,HtDcPeriod); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 9; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + smoothPeriod = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "even" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + smoothPeriod = (0.33*period)+(0.67*smoothPeriod); + + if( today >= startIdx ) + { + outReal[outIdx++] = smoothPeriod; + } + + /* Ooof... let's do the next price bar now! */ + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htDcPeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_HT_DCPERIOD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg; +/* Generated */ double todayValue, smoothPeriod; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ rad2Deg = 180.0 / (4.0 * std_atan(1)); +/* Generated */ lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPERIOD,HtDcPeriod); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 9; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ smoothPeriod = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = smoothPeriod; +/* Generated */ } +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_HT_DCPHASE.c b/src/ta-lib/src/ta_func/ta_HT_DCPHASE.c new file mode 100644 index 000000000..f4657ac18 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_HT_DCPHASE.c @@ -0,0 +1,689 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::HtDcPhaseLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int htDcPhaseLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_HT_DCPHASE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* 31 input are skip + * +32 output are skip to account for misc lookback + * --- + * 63 Total Lookback + * + * 31 is for being compatible with Tradestation. + * See TA_MAMA_Lookback for an explanation of the "32". + */ + return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPHASE,HtDcPhase); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htDcPhase( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_HT_DCPHASE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg, constDeg2RadBy360; + + double todayValue, smoothPeriod; + + /* Varaible used to keep track of the previous + * smooth price. In the case of this algorithm, + * we will never need more than 50 values. + */ + #define SMOOTH_PRICE_SIZE 50 + CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); + int idx; + + /* Variable used to calculate the dominant cycle phase */ + int DCPeriodInt; + double DCPhase, DCPeriod, imagPart, realPart; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); + + /* Constant */ + tempReal = std_atan(1); + rad2Deg = 45.0/tempReal; + constDeg2RadBy360 = tempReal*8.0; + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPHASE,HtDcPhase); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 34; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + smoothPeriod = 0.0; + + for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) + smoothPrice[i] = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + DCPhase = 0.0; + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + /* Remember the smoothedValue into the smoothPrice + * circular buffer. + */ + smoothPrice[smoothPrice_Idx] = smoothedValue; + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "even" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + smoothPeriod = (0.33*period)+(0.67*smoothPeriod); + + /* Compute Dominant Cycle Phase */ + DCPeriod = smoothPeriod+0.5; + DCPeriodInt = (int)DCPeriod; + realPart = 0.0; + imagPart = 0.0; + + /* idx is used to iterate for up to 50 of the last + * value of smoothPrice. + */ + idx = smoothPrice_Idx; + for( i=0; i < DCPeriodInt; i++ ) + { + tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; + tempReal2 = smoothPrice[idx]; + realPart += std_sin(tempReal)*tempReal2; + imagPart += std_cos(tempReal)*tempReal2; + if( idx == 0 ) + idx = SMOOTH_PRICE_SIZE-1; + else + idx--; + } + + tempReal = std_fabs(imagPart); + if( tempReal > 0.0 ) + DCPhase = std_atan(realPart/imagPart)*rad2Deg; + else if( tempReal <= 0.01 ) + { + if( realPart < 0.0 ) + DCPhase -= 90.0; + else if( realPart > 0.0 ) + DCPhase += 90.0; + } + DCPhase += 90.0; + + /* Compensate for one bar lag of the weighted moving average */ + DCPhase += 360.0 / smoothPeriod; + if( imagPart < 0.0 ) + DCPhase += 180.0; + if( DCPhase > 315.0 ) + DCPhase -= 360.0; + + if( today >= startIdx ) + { + outReal[outIdx++] = DCPhase; + } + + /* Ooof... let's do the next price bar now! */ + CIRCBUF_NEXT(smoothPrice); + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htDcPhase( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_HT_DCPHASE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg, constDeg2RadBy360; +/* Generated */ double todayValue, smoothPeriod; +/* Generated */ #define SMOOTH_PRICE_SIZE 50 +/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); +/* Generated */ int idx; +/* Generated */ int DCPeriodInt; +/* Generated */ double DCPhase, DCPeriod, imagPart, realPart; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); +/* Generated */ tempReal = std_atan(1); +/* Generated */ rad2Deg = 45.0/tempReal; +/* Generated */ constDeg2RadBy360 = tempReal*8.0; +/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPHASE,HtDcPhase); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 34; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ smoothPeriod = 0.0; +/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) +/* Generated */ smoothPrice[i] = 0.0; +/* Generated */ DCPhase = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); +/* Generated */ DCPeriod = smoothPeriod+0.5; +/* Generated */ DCPeriodInt = (int)DCPeriod; +/* Generated */ realPart = 0.0; +/* Generated */ imagPart = 0.0; +/* Generated */ idx = smoothPrice_Idx; +/* Generated */ for( i=0; i < DCPeriodInt; i++ ) +/* Generated */ { +/* Generated */ tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; +/* Generated */ tempReal2 = smoothPrice[idx]; +/* Generated */ realPart += std_sin(tempReal)*tempReal2; +/* Generated */ imagPart += std_cos(tempReal)*tempReal2; +/* Generated */ if( idx == 0 ) +/* Generated */ idx = SMOOTH_PRICE_SIZE-1; +/* Generated */ else +/* Generated */ idx--; +/* Generated */ } +/* Generated */ tempReal = std_fabs(imagPart); +/* Generated */ if( tempReal > 0.0 ) +/* Generated */ DCPhase = std_atan(realPart/imagPart)*rad2Deg; +/* Generated */ else if( tempReal <= 0.01 ) +/* Generated */ { +/* Generated */ if( realPart < 0.0 ) +/* Generated */ DCPhase -= 90.0; +/* Generated */ else if( realPart > 0.0 ) +/* Generated */ DCPhase += 90.0; +/* Generated */ } +/* Generated */ DCPhase += 90.0; +/* Generated */ DCPhase += 360.0 / smoothPeriod; +/* Generated */ if( imagPart < 0.0 ) +/* Generated */ DCPhase += 180.0; +/* Generated */ if( DCPhase > 315.0 ) +/* Generated */ DCPhase -= 360.0; +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = DCPhase; +/* Generated */ } +/* Generated */ CIRCBUF_NEXT(smoothPrice); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_HT_PHASOR.c b/src/ta-lib/src/ta_func/ta_HT_PHASOR.c new file mode 100644 index 000000000..637b73eb5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_HT_PHASOR.c @@ -0,0 +1,592 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::HtPhasorLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int htPhasorLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_HT_PHASOR_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* See TA_MAMA_Lookback for an explanation of these */ + return 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_PHASOR,HtPhasor); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_HT_PHASOR - Hilbert Transform - Phasor Components + * + * Input = double + * Output = double, double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInPhase, +/* Generated */ SubArray^ outQuadrature ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInPhase, +/* Generated */ cli::array^ outQuadrature ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htPhasor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outInPhase[], +/* Generated */ double outQuadrature[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_HT_PHASOR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outInPhase[], +/* Generated */ double outQuadrature[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg; + + double todayValue; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInPhase ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outQuadrature ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Constant */ + rad2Deg = 180.0 / (4.0 * std_atan(1)); + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_PHASOR,HtPhasor); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 9; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + if( today >= startIdx ) + { + outQuadrature[outIdx] = Q1; + outInPhase[outIdx++] = I1ForEvenPrev3; + } + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + if( today >= startIdx ) + { + outQuadrature[outIdx] = Q1; + outInPhase[outIdx++] = I1ForOddPrev3; + } + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "even" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + /* Ooof... let's do the next price bar now! */ + today++; + } + + /* Default return values */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInPhase, +/* Generated */ SubArray^ outQuadrature ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInPhase, +/* Generated */ cli::array^ outQuadrature ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htPhasor( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outInPhase[], +/* Generated */ double outQuadrature[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_HT_PHASOR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outInPhase[], +/* Generated */ double outQuadrature[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg; +/* Generated */ double todayValue; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInPhase ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outQuadrature ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ rad2Deg = 180.0 / (4.0 * std_atan(1)); +/* Generated */ lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_PHASOR,HtPhasor); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 9; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outQuadrature[outIdx] = Q1; +/* Generated */ outInPhase[outIdx++] = I1ForEvenPrev3; +/* Generated */ } +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outQuadrature[outIdx] = Q1; +/* Generated */ outInPhase[outIdx++] = I1ForOddPrev3; +/* Generated */ } +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_HT_SINE.c b/src/ta-lib/src/ta_func/ta_HT_SINE.c new file mode 100644 index 000000000..4b25daec8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_HT_SINE.c @@ -0,0 +1,706 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::HtSineLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int htSineLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_HT_SINE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* 31 input are skip + * +32 output are skip to account for misc lookback + * --- + * 63 Total Lookback + * + * 31 is for being compatible with Tradestation. + * See TA_MAMA_Lookback for an explanation of the "32". + */ + return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_SINE,HtSine); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_HT_SINE - Hilbert Transform - SineWave + * + * Input = double + * Output = double, double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outSine, +/* Generated */ SubArray^ outLeadSine ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outSine, +/* Generated */ cli::array^ outLeadSine ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htSine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outSine[], +/* Generated */ double outLeadSine[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_HT_SINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outSine[], +/* Generated */ double outLeadSine[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg, deg2Rad, constDeg2RadBy360; + + double todayValue, smoothPeriod; + + /* Varaible used to keep track of the previous + * smooth price. In the case of this algorithm, + * we will never need more than 50 values. + */ + #define SMOOTH_PRICE_SIZE 50 + CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); + int idx; + + /* Variable used to calculate the dominant cycle phase */ + int DCPeriodInt; + double DCPhase, DCPeriod, imagPart, realPart; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outSine ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outLeadSine ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); + + /* The following could be replaced by constant eventually. */ + tempReal = std_atan(1); + rad2Deg = 45.0/tempReal; + deg2Rad = 1.0/rad2Deg; + constDeg2RadBy360 = tempReal*8.0; + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_SINE,HtSine); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 34; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + smoothPeriod = 0.0; + + for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) + smoothPrice[i] = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + DCPhase = 0.0; + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + /* Remember the smoothedValue into the smoothPrice + * circular buffer. + */ + smoothPrice[smoothPrice_Idx] = smoothedValue; + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "even" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + smoothPeriod = (0.33*period)+(0.67*smoothPeriod); + + /* Compute Dominant Cycle Phase */ + DCPeriod = smoothPeriod+0.5; + DCPeriodInt = (int)DCPeriod; + realPart = 0.0; + imagPart = 0.0; + + /* idx is used to iterate for up to 50 of the last + * value of smoothPrice. + */ + idx = smoothPrice_Idx; + for( i=0; i < DCPeriodInt; i++ ) + { + tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; + tempReal2 = smoothPrice[idx]; + realPart += std_sin(tempReal)*tempReal2; + imagPart += std_cos(tempReal)*tempReal2; + if( idx == 0 ) + idx = SMOOTH_PRICE_SIZE-1; + else + idx--; + } + + tempReal = std_fabs(imagPart); + if( tempReal > 0.0 ) + DCPhase = std_atan(realPart/imagPart)*rad2Deg; + else if( tempReal <= 0.01 ) + { + if( realPart < 0.0 ) + DCPhase -= 90.0; + else if( realPart > 0.0 ) + DCPhase += 90.0; + } + DCPhase += 90.0; + + /* Compensate for one bar lag of the weighted moving average */ + DCPhase += 360.0 / smoothPeriod; + if( imagPart < 0.0 ) + DCPhase += 180.0; + if( DCPhase > 315.0 ) + DCPhase -= 360.0; + + if( today >= startIdx ) + { + outSine[outIdx] = std_sin(DCPhase*deg2Rad); + outLeadSine[outIdx++] = std_sin((DCPhase+45)*deg2Rad); + } + + /* Ooof... let's do the next price bar now! */ + CIRCBUF_NEXT(smoothPrice); + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outSine, +/* Generated */ SubArray^ outLeadSine ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outSine, +/* Generated */ cli::array^ outLeadSine ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htSine( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outSine[], +/* Generated */ double outLeadSine[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_HT_SINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outSine[], +/* Generated */ double outLeadSine[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg, deg2Rad, constDeg2RadBy360; +/* Generated */ double todayValue, smoothPeriod; +/* Generated */ #define SMOOTH_PRICE_SIZE 50 +/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); +/* Generated */ int idx; +/* Generated */ int DCPeriodInt; +/* Generated */ double DCPhase, DCPeriod, imagPart, realPart; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outSine ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outLeadSine ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); +/* Generated */ tempReal = std_atan(1); +/* Generated */ rad2Deg = 45.0/tempReal; +/* Generated */ deg2Rad = 1.0/rad2Deg; +/* Generated */ constDeg2RadBy360 = tempReal*8.0; +/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_SINE,HtSine); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 34; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ smoothPeriod = 0.0; +/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) +/* Generated */ smoothPrice[i] = 0.0; +/* Generated */ DCPhase = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); +/* Generated */ DCPeriod = smoothPeriod+0.5; +/* Generated */ DCPeriodInt = (int)DCPeriod; +/* Generated */ realPart = 0.0; +/* Generated */ imagPart = 0.0; +/* Generated */ idx = smoothPrice_Idx; +/* Generated */ for( i=0; i < DCPeriodInt; i++ ) +/* Generated */ { +/* Generated */ tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; +/* Generated */ tempReal2 = smoothPrice[idx]; +/* Generated */ realPart += std_sin(tempReal)*tempReal2; +/* Generated */ imagPart += std_cos(tempReal)*tempReal2; +/* Generated */ if( idx == 0 ) +/* Generated */ idx = SMOOTH_PRICE_SIZE-1; +/* Generated */ else +/* Generated */ idx--; +/* Generated */ } +/* Generated */ tempReal = std_fabs(imagPart); +/* Generated */ if( tempReal > 0.0 ) +/* Generated */ DCPhase = std_atan(realPart/imagPart)*rad2Deg; +/* Generated */ else if( tempReal <= 0.01 ) +/* Generated */ { +/* Generated */ if( realPart < 0.0 ) +/* Generated */ DCPhase -= 90.0; +/* Generated */ else if( realPart > 0.0 ) +/* Generated */ DCPhase += 90.0; +/* Generated */ } +/* Generated */ DCPhase += 90.0; +/* Generated */ DCPhase += 360.0 / smoothPeriod; +/* Generated */ if( imagPart < 0.0 ) +/* Generated */ DCPhase += 180.0; +/* Generated */ if( DCPhase > 315.0 ) +/* Generated */ DCPhase -= 360.0; +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outSine[outIdx] = std_sin(DCPhase*deg2Rad); +/* Generated */ outLeadSine[outIdx++] = std_sin((DCPhase+45)*deg2Rad); +/* Generated */ } +/* Generated */ CIRCBUF_NEXT(smoothPrice); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c b/src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c new file mode 100644 index 000000000..7119eb580 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c @@ -0,0 +1,651 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::HtTrendlineLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int htTrendlineLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_HT_TRENDLINE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* 31 input are skip + * +32 output are skip to account for misc lookback + * --- + * 63 Total Lookback + * + * 31 is for being compatible with Tradestation. + * See TA_MAMA_Lookback for an explanation of the "32". + */ + return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDLINE,HtTrendline); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htTrendline( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_HT_TRENDLINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variable to keep track of the last 3 ITrend */ + double iTrend1, iTrend2, iTrend3; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg; + + double todayValue, smoothPeriod; + + /* Variable used to keep track of the previous + * smooth price. In the case of this algorithm, + * we will never need more than 50 values. + */ + #define SMOOTH_PRICE_SIZE 50 + CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); + int idx; + + /* Variable used to calculate the dominant cycle phase */ + int DCPeriodInt; + double DCPeriod; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); + + iTrend1 = iTrend2 = iTrend3 = 0.0; + + /* Constant */ + tempReal = std_atan(1); + rad2Deg = 45.0/tempReal; + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDLINE,HtTrendline); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 34; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + smoothPeriod = 0.0; + + for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) + smoothPrice[i] = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + /* Remember the smoothedValue into the smoothPrice + * circular buffer. + */ + smoothPrice[smoothPrice_Idx] = smoothedValue; + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "even" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + smoothPeriod = (0.33*period)+(0.67*smoothPeriod); + + /* Compute Trendline */ + DCPeriod = smoothPeriod+0.5; + DCPeriodInt = (int)DCPeriod; + + /* idx is used to iterate for up to 50 of the last + * value of smoothPrice. + */ + idx = today; + tempReal = 0.0; + for( i=0; i < DCPeriodInt; i++ ) + tempReal += inReal[idx--]; + + if( DCPeriodInt > 0 ) + tempReal = tempReal/(double)DCPeriodInt; + + tempReal2 = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; + iTrend3 = iTrend2; + iTrend2 = iTrend1; + iTrend1 = tempReal; + + if( today >= startIdx ) + { + outReal[outIdx++] = tempReal2; + } + + /* Ooof... let's do the next price bar now! */ + CIRCBUF_NEXT(smoothPrice); + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htTrendline( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_HT_TRENDLINE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ double iTrend1, iTrend2, iTrend3; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg; +/* Generated */ double todayValue, smoothPeriod; +/* Generated */ #define SMOOTH_PRICE_SIZE 50 +/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); +/* Generated */ int idx; +/* Generated */ int DCPeriodInt; +/* Generated */ double DCPeriod; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); +/* Generated */ iTrend1 = iTrend2 = iTrend3 = 0.0; +/* Generated */ tempReal = std_atan(1); +/* Generated */ rad2Deg = 45.0/tempReal; +/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDLINE,HtTrendline); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 34; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ smoothPeriod = 0.0; +/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) +/* Generated */ smoothPrice[i] = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); +/* Generated */ DCPeriod = smoothPeriod+0.5; +/* Generated */ DCPeriodInt = (int)DCPeriod; +/* Generated */ idx = today; +/* Generated */ tempReal = 0.0; +/* Generated */ for( i=0; i < DCPeriodInt; i++ ) +/* Generated */ tempReal += inReal[idx--]; +/* Generated */ if( DCPeriodInt > 0 ) +/* Generated */ tempReal = tempReal/(double)DCPeriodInt; +/* Generated */ tempReal2 = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; +/* Generated */ iTrend3 = iTrend2; +/* Generated */ iTrend2 = iTrend1; +/* Generated */ iTrend1 = tempReal; +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = tempReal2; +/* Generated */ } +/* Generated */ CIRCBUF_NEXT(smoothPrice); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c b/src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c new file mode 100644 index 000000000..8073e7448 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c @@ -0,0 +1,804 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::HtTrendModeLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int htTrendModeLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_HT_TRENDMODE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* 31 input are skip + * +32 output are skip to account for misc lookback + * --- + * 63 Total Lookback + * + * 31 is for being compatible with Tradestation. + * See TA_MAMA_Lookback for an explanation of the "32". + */ + return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDMODE,HtTrendMode); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode + * + * Input = double + * Output = int + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htTrendMode( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_HT_TRENDMODE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variable to keep track of the last 3 ITrend */ + double iTrend1, iTrend2, iTrend3; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg, deg2Rad, constDeg2RadBy360; + + double todayValue, smoothPeriod; + + /* Variable used to keep track of the previous + * smooth price. In the case of this algorithm, + * we will never need more than 50 values. + */ + #define SMOOTH_PRICE_SIZE 50 + CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); + int idx; + + /* Variable used to calculate the dominant cycle phase */ + int DCPeriodInt; + double DCPhase, DCPeriod, imagPart, realPart; + + /* Variable used to calculate the trend mode */ + int daysInTrend, trend; + double prevDCPhase, trendline; + double prevSine, prevLeadSine, sine, leadSine; + + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); + + iTrend1 = iTrend2 = iTrend3 = 0.0; + daysInTrend = 0; + prevDCPhase = DCPhase = 0.0; + prevSine = sine = 0.0; + prevLeadSine = leadSine = 0.0; + + /* The following could be replaced by constant eventually. */ + tempReal = std_atan(1); + rad2Deg = 45.0/tempReal; + deg2Rad = 1.0/rad2Deg; + constDeg2RadBy360 = tempReal*8.0; + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDMODE,HtTrendMode); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 34; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + smoothPeriod = 0.0; + + for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) + smoothPrice[i] = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + DCPhase = 0.0; + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + /* Remember the smoothedValue into the smoothPrice + * circular buffer. + */ + smoothPrice[smoothPrice_Idx] = smoothedValue; + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "even" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + smoothPeriod = (0.33*period)+(0.67*smoothPeriod); + + /* Compute Dominant Cycle Phase */ + prevDCPhase = DCPhase; + DCPeriod = smoothPeriod+0.5; + DCPeriodInt = (int)DCPeriod; + realPart = 0.0; + imagPart = 0.0; + + /* idx is used to iterate for up to 50 of the last + * value of smoothPrice. + */ + idx = smoothPrice_Idx; + for( i=0; i < DCPeriodInt; i++ ) + { + tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; + tempReal2 = smoothPrice[idx]; + realPart += std_sin(tempReal)*tempReal2; + imagPart += std_cos(tempReal)*tempReal2; + if( idx == 0 ) + idx = SMOOTH_PRICE_SIZE-1; + else + idx--; + } + + tempReal = std_fabs(imagPart); + if( tempReal > 0.0 ) + DCPhase = std_atan(realPart/imagPart)*rad2Deg; + else if( tempReal <= 0.01 ) + { + if( realPart < 0.0 ) + DCPhase -= 90.0; + else if( realPart > 0.0 ) + DCPhase += 90.0; + } + DCPhase += 90.0; + + /* Compensate for one bar lag of the weighted moving average */ + DCPhase += 360.0 / smoothPeriod; + if( imagPart < 0.0 ) + DCPhase += 180.0; + if( DCPhase > 315.0 ) + DCPhase -= 360.0; + + prevSine = sine; + prevLeadSine = leadSine; + sine = std_sin(DCPhase*deg2Rad); + leadSine = std_sin((DCPhase+45)*deg2Rad); + + /* Compute Trendline */ + DCPeriod = smoothPeriod+0.5; + DCPeriodInt = (int)DCPeriod; + + /* idx is used to iterate for up to 50 of the last + * value of smoothPrice. + */ + idx = today; + tempReal = 0.0; + for( i=0; i < DCPeriodInt; i++ ) + tempReal += inReal[idx--]; + + if( DCPeriodInt > 0 ) + tempReal = tempReal/(double)DCPeriodInt; + + trendline = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; + iTrend3 = iTrend2; + iTrend2 = iTrend1; + iTrend1 = tempReal; + + /* Compute the trend Mode , and assume trend by default */ + trend = 1; + + /* Measure days in trend from last crossing of the SineWave Indicator lines */ + if( ((sine > leadSine) && (prevSine <= prevLeadSine)) || + ((sine < leadSine) && (prevSine >= prevLeadSine)) ) + { + daysInTrend = 0; + trend = 0; + } + + daysInTrend++; + + if( daysInTrend < (0.5*smoothPeriod) ) + trend = 0; + + tempReal = DCPhase - prevDCPhase; + if( (smoothPeriod != 0.0) && + ((tempReal > (0.67*360.0/smoothPeriod)) && (tempReal < (1.5*360.0/smoothPeriod))) ) + { + trend = 0; + } + + tempReal = smoothPrice[smoothPrice_Idx]; + if( (trendline != 0.0) && (std_fabs( (tempReal - trendline)/trendline ) >= 0.015) ) + trend = 1; + + if( today >= startIdx ) + { + outInteger[outIdx++] = trend; + } + + /* Ooof... let's do the next price bar now! */ + CIRCBUF_NEXT(smoothPrice); + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode htTrendMode( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_HT_TRENDMODE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ double iTrend1, iTrend2, iTrend3; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg, deg2Rad, constDeg2RadBy360; +/* Generated */ double todayValue, smoothPeriod; +/* Generated */ #define SMOOTH_PRICE_SIZE 50 +/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); +/* Generated */ int idx; +/* Generated */ int DCPeriodInt; +/* Generated */ double DCPhase, DCPeriod, imagPart, realPart; +/* Generated */ int daysInTrend, trend; +/* Generated */ double prevDCPhase, trendline; +/* Generated */ double prevSine, prevLeadSine, sine, leadSine; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); +/* Generated */ iTrend1 = iTrend2 = iTrend3 = 0.0; +/* Generated */ daysInTrend = 0; +/* Generated */ prevDCPhase = DCPhase = 0.0; +/* Generated */ prevSine = sine = 0.0; +/* Generated */ prevLeadSine = leadSine = 0.0; +/* Generated */ tempReal = std_atan(1); +/* Generated */ rad2Deg = 45.0/tempReal; +/* Generated */ deg2Rad = 1.0/rad2Deg; +/* Generated */ constDeg2RadBy360 = tempReal*8.0; +/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDMODE,HtTrendMode); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 34; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ smoothPeriod = 0.0; +/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) +/* Generated */ smoothPrice[i] = 0.0; +/* Generated */ DCPhase = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); +/* Generated */ prevDCPhase = DCPhase; +/* Generated */ DCPeriod = smoothPeriod+0.5; +/* Generated */ DCPeriodInt = (int)DCPeriod; +/* Generated */ realPart = 0.0; +/* Generated */ imagPart = 0.0; +/* Generated */ idx = smoothPrice_Idx; +/* Generated */ for( i=0; i < DCPeriodInt; i++ ) +/* Generated */ { +/* Generated */ tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; +/* Generated */ tempReal2 = smoothPrice[idx]; +/* Generated */ realPart += std_sin(tempReal)*tempReal2; +/* Generated */ imagPart += std_cos(tempReal)*tempReal2; +/* Generated */ if( idx == 0 ) +/* Generated */ idx = SMOOTH_PRICE_SIZE-1; +/* Generated */ else +/* Generated */ idx--; +/* Generated */ } +/* Generated */ tempReal = std_fabs(imagPart); +/* Generated */ if( tempReal > 0.0 ) +/* Generated */ DCPhase = std_atan(realPart/imagPart)*rad2Deg; +/* Generated */ else if( tempReal <= 0.01 ) +/* Generated */ { +/* Generated */ if( realPart < 0.0 ) +/* Generated */ DCPhase -= 90.0; +/* Generated */ else if( realPart > 0.0 ) +/* Generated */ DCPhase += 90.0; +/* Generated */ } +/* Generated */ DCPhase += 90.0; +/* Generated */ DCPhase += 360.0 / smoothPeriod; +/* Generated */ if( imagPart < 0.0 ) +/* Generated */ DCPhase += 180.0; +/* Generated */ if( DCPhase > 315.0 ) +/* Generated */ DCPhase -= 360.0; +/* Generated */ prevSine = sine; +/* Generated */ prevLeadSine = leadSine; +/* Generated */ sine = std_sin(DCPhase*deg2Rad); +/* Generated */ leadSine = std_sin((DCPhase+45)*deg2Rad); +/* Generated */ DCPeriod = smoothPeriod+0.5; +/* Generated */ DCPeriodInt = (int)DCPeriod; +/* Generated */ idx = today; +/* Generated */ tempReal = 0.0; +/* Generated */ for( i=0; i < DCPeriodInt; i++ ) +/* Generated */ tempReal += inReal[idx--]; +/* Generated */ if( DCPeriodInt > 0 ) +/* Generated */ tempReal = tempReal/(double)DCPeriodInt; +/* Generated */ trendline = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; +/* Generated */ iTrend3 = iTrend2; +/* Generated */ iTrend2 = iTrend1; +/* Generated */ iTrend1 = tempReal; +/* Generated */ trend = 1; +/* Generated */ if( ((sine > leadSine) && (prevSine <= prevLeadSine)) || +/* Generated */ ((sine < leadSine) && (prevSine >= prevLeadSine)) ) +/* Generated */ { +/* Generated */ daysInTrend = 0; +/* Generated */ trend = 0; +/* Generated */ } +/* Generated */ daysInTrend++; +/* Generated */ if( daysInTrend < (0.5*smoothPeriod) ) +/* Generated */ trend = 0; +/* Generated */ tempReal = DCPhase - prevDCPhase; +/* Generated */ if( (smoothPeriod != 0.0) && +/* Generated */ ((tempReal > (0.67*360.0/smoothPeriod)) && (tempReal < (1.5*360.0/smoothPeriod))) ) +/* Generated */ { +/* Generated */ trend = 0; +/* Generated */ } +/* Generated */ tempReal = smoothPrice[smoothPrice_Idx]; +/* Generated */ if( (trendline != 0.0) && (std_fabs( (tempReal - trendline)/trendline ) >= 0.015) ) +/* Generated */ trend = 1; +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outInteger[outIdx++] = trend; +/* Generated */ } +/* Generated */ CIRCBUF_NEXT(smoothPrice); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_IMI.c b/src/ta-lib/src/ta_func/ta_IMI.c new file mode 100644 index 000000000..ac46af99d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_IMI.c @@ -0,0 +1,340 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AB Anatoliy Belsky + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 181012 AB Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::ImiLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int imiLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_IMI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_IMI, Imi) - 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_IMI - Intraday Momentum Index + * + * Input = Open, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode imi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inOpen[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_IMI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inOpen[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int lookback, outIdx = 0; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inOpen||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + lookback = LOOKBACK_CALL(IMI)( optInTimePeriod ); + + if(startIdx < lookback) + startIdx = lookback; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + while (startIdx <= endIdx) { + double upsum = .0, downsum = .0; + int i; + + for (i = startIdx - lookback; i <= startIdx; i++) { + double close = inClose[i]; + double open = inOpen[i]; + + if (close > open) { + upsum += (close - open); + } else { + downsum += (open - close); + } + + outReal[outIdx] = 100.0*(upsum/(upsum + downsum)); + } + + startIdx++; + outIdx++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inOpen, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inOpen, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode imi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inOpen[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_IMI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inOpen[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int lookback, outIdx = 0; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inOpen||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookback = LOOKBACK_CALL(IMI)( optInTimePeriod ); +/* Generated */ if(startIdx < lookback) +/* Generated */ startIdx = lookback; +/* Generated */ if( startIdx > endIdx ) { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ while (startIdx <= endIdx) { +/* Generated */ double upsum = .0, downsum = .0; +/* Generated */ int i; +/* Generated */ for (i = startIdx - lookback; i <= startIdx; i++) { +/* Generated */ double close = inClose[i]; +/* Generated */ double open = inOpen[i]; +/* Generated */ if (close > open) { +/* Generated */ upsum += (close - open); +/* Generated */ } else { +/* Generated */ downsum += (open - close); +/* Generated */ } +/* Generated */ outReal[outIdx] = 100.0*(upsum/(upsum + downsum)); +/* Generated */ } +/* Generated */ startIdx++; +/* Generated */ outIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_KAMA.c b/src/ta-lib/src/ta_func/ta_KAMA.c new file mode 100644 index 000000000..d5e119696 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_KAMA.c @@ -0,0 +1,508 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 062704 MF Fix limit case to avoid divid by zero (or by + * a value close to zero induce by the imprecision + * of floating points). + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::KamaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int kamaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_KAMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_KAMA,Kama); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_KAMA - Kaufman Adaptive Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode kama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_KAMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + CONSTANT_DOUBLE(constMax) = 2.0/(30.0+1.0); + CONSTANT_DOUBLE(constDiff) = 2.0/(2.0+1.0) - constMax; + + double tempReal, tempReal2; + double sumROC1, periodROC, prevKAMA; + int i, today, outIdx, lookbackTotal; + int trailingIdx; + double trailingValue; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Default return values */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_KAMA,Kama); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Initialize the variables by going through + * the lookback period. + */ + sumROC1 = 0.0; + today = startIdx-lookbackTotal; + trailingIdx = today; + i = optInTimePeriod; + while( i-- > 0 ) + { + tempReal = inReal[today++]; + tempReal -= inReal[today]; + sumROC1 += std_fabs(tempReal); + } + + /* At this point sumROC1 represent the + * summation of the 1-day price difference + * over the (optInTimePeriod-1) + */ + + /* Calculate the first KAMA */ + + /* The yesterday price is used here as the previous KAMA. */ + prevKAMA = inReal[today-1]; + + tempReal = inReal[today]; + tempReal2 = inReal[trailingIdx++]; + periodROC = tempReal-tempReal2; + + /* Save the trailing value. Do this because inReal + * and outReal can be pointers to the same buffer. + */ + trailingValue = tempReal2; + + /* Calculate the efficiency ratio */ + if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1)) + tempReal = 1.0; + else + tempReal = std_fabs(periodROC/sumROC1); + + /* Calculate the smoothing constant */ + tempReal = (tempReal*constDiff)+constMax; + tempReal *= tempReal; + + /* Calculate the KAMA like an EMA, using the + * smoothing constant as the adaptive factor. + */ + prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; + + /* 'today' keep track of where the processing is within the + * input. + */ + + /* Skip the unstable period. Do the whole processing + * needed for KAMA, but do not write it in the output. + */ + while( today <= startIdx ) + { + tempReal = inReal[today]; + tempReal2 = inReal[trailingIdx++]; + periodROC = tempReal-tempReal2; + + /* Adjust sumROC1: + * - Remove trailing ROC1 + * - Add new ROC1 + */ + sumROC1 -= std_fabs(trailingValue-tempReal2); + sumROC1 += std_fabs(tempReal-inReal[today-1]); + + /* Save the trailing value. Do this because inReal + * and outReal can be pointers to the same buffer. + */ + trailingValue = tempReal2; + + /* Calculate the efficiency ratio */ + if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) + tempReal = 1.0; + else + tempReal = std_fabs(periodROC/sumROC1); + + /* Calculate the smoothing constant */ + tempReal = (tempReal*constDiff)+constMax; + tempReal *= tempReal; + + /* Calculate the KAMA like an EMA, using the + * smoothing constant as the adaptive factor. + */ + prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; + } + + /* Write the first value. */ + outReal[0] = prevKAMA; + outIdx = 1; + VALUE_HANDLE_DEREF(outBegIdx) = today-1; + + /* Do the KAMA calculation for the requested range. */ + while( today <= endIdx ) + { + tempReal = inReal[today]; + tempReal2 = inReal[trailingIdx++]; + periodROC = tempReal-tempReal2; + + /* Adjust sumROC1: + * - Remove trailing ROC1 + * - Add new ROC1 + */ + sumROC1 -= std_fabs(trailingValue-tempReal2); + sumROC1 += std_fabs(tempReal-inReal[today-1]); + + /* Save the trailing value. Do this because inReal + * and outReal can be pointers to the same buffer. + */ + trailingValue = tempReal2; + + /* Calculate the efficiency ratio */ + if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) + tempReal = 1.0; + else + tempReal = std_fabs(periodROC / sumROC1); + + /* Calculate the smoothing constant */ + tempReal = (tempReal*constDiff)+constMax; + tempReal *= tempReal; + + /* Calculate the KAMA like an EMA, using the + * smoothing constant as the adaptive factor. + */ + prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; + outReal[outIdx++] = prevKAMA; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode kama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_KAMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ CONSTANT_DOUBLE(constMax) = 2.0/(30.0+1.0); +/* Generated */ CONSTANT_DOUBLE(constDiff) = 2.0/(2.0+1.0) - constMax; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double sumROC1, periodROC, prevKAMA; +/* Generated */ int i, today, outIdx, lookbackTotal; +/* Generated */ int trailingIdx; +/* Generated */ double trailingValue; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_KAMA,Kama); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ sumROC1 = 0.0; +/* Generated */ today = startIdx-lookbackTotal; +/* Generated */ trailingIdx = today; +/* Generated */ i = optInTimePeriod; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ tempReal -= inReal[today]; +/* Generated */ sumROC1 += std_fabs(tempReal); +/* Generated */ } +/* Generated */ prevKAMA = inReal[today-1]; +/* Generated */ tempReal = inReal[today]; +/* Generated */ tempReal2 = inReal[trailingIdx++]; +/* Generated */ periodROC = tempReal-tempReal2; +/* Generated */ trailingValue = tempReal2; +/* Generated */ if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1)) +/* Generated */ tempReal = 1.0; +/* Generated */ else +/* Generated */ tempReal = std_fabs(periodROC/sumROC1); +/* Generated */ tempReal = (tempReal*constDiff)+constMax; +/* Generated */ tempReal *= tempReal; +/* Generated */ prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; +/* Generated */ while( today <= startIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[today]; +/* Generated */ tempReal2 = inReal[trailingIdx++]; +/* Generated */ periodROC = tempReal-tempReal2; +/* Generated */ sumROC1 -= std_fabs(trailingValue-tempReal2); +/* Generated */ sumROC1 += std_fabs(tempReal-inReal[today-1]); +/* Generated */ trailingValue = tempReal2; +/* Generated */ if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) +/* Generated */ tempReal = 1.0; +/* Generated */ else +/* Generated */ tempReal = std_fabs(periodROC/sumROC1); +/* Generated */ tempReal = (tempReal*constDiff)+constMax; +/* Generated */ tempReal *= tempReal; +/* Generated */ prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; +/* Generated */ } +/* Generated */ outReal[0] = prevKAMA; +/* Generated */ outIdx = 1; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today-1; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[today]; +/* Generated */ tempReal2 = inReal[trailingIdx++]; +/* Generated */ periodROC = tempReal-tempReal2; +/* Generated */ sumROC1 -= std_fabs(trailingValue-tempReal2); +/* Generated */ sumROC1 += std_fabs(tempReal-inReal[today-1]); +/* Generated */ trailingValue = tempReal2; +/* Generated */ if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) +/* Generated */ tempReal = 1.0; +/* Generated */ else +/* Generated */ tempReal = std_fabs(periodROC / sumROC1); +/* Generated */ tempReal = (tempReal*constDiff)+constMax; +/* Generated */ tempReal *= tempReal; +/* Generated */ prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; +/* Generated */ outReal[outIdx++] = prevKAMA; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG.c b/src/ta-lib/src/ta_func/ta_LINEARREG.c new file mode 100644 index 000000000..fad36c666 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_LINEARREG.c @@ -0,0 +1,365 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * JP John Price + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 070203 JP Initial. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::LinearRegLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int linearRegLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_LINEARREG_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_LINEARREG - Linear Regression + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearReg( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + + int today, lookbackTotal; + double SumX, SumXY, SumY, SumXSqr, Divisor; + + double m, b; + int i; + + double tempValue1; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Linear Regression is a concept also known as the + * "least squares method" or "best fit." Linear + * Regression attempts to fit a straight line between + * several data points in such a way that distance + * between each data point and the line is minimized. + * + * For each point, a straight line over the specified + * previous bar period is determined in terms + * of y = b + m*x: + * + * TA_LINEARREG : Returns b+m*(period-1) + * TA_LINEARREG_SLOPE : Returns 'm' + * TA_LINEARREG_ANGLE : Returns 'm' in degree. + * TA_LINEARREG_INTERCEPT: Returns 'b' + * TA_TSF : Returns b+m*(period) + */ + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(LINEARREG)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; /* Index into the output. */ + today = startIdx; + + SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; + SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; + Divisor = SumX * SumX - optInTimePeriod * SumXSqr; + + while( today <= endIdx ) + { + SumXY = 0; + SumY = 0; + for( i = optInTimePeriod; i-- != 0; ) + { + SumY += tempValue1 = inReal[today - i]; + SumXY += (double)i * tempValue1; + } + m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; + b = ( SumY - m * SumX ) / (double)optInTimePeriod; + outReal[outIdx++] = b + m * (double)(optInTimePeriod-1); + today++; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearReg( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_LINEARREG( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal; +/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; +/* Generated */ double m, b; +/* Generated */ int i; +/* Generated */ double tempValue1; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; +/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; +/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ SumXY = 0; +/* Generated */ SumY = 0; +/* Generated */ for( i = optInTimePeriod; i-- != 0; ) +/* Generated */ { +/* Generated */ SumY += tempValue1 = inReal[today - i]; +/* Generated */ SumXY += (double)i * tempValue1; +/* Generated */ } +/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; +/* Generated */ b = ( SumY - m * SumX ) / (double)optInTimePeriod; +/* Generated */ outReal[outIdx++] = b + m * (double)(optInTimePeriod-1); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c b/src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c new file mode 100644 index 000000000..3a67a5e7f --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c @@ -0,0 +1,365 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * JP John Price + * MF Mario Fortier + * AM Adrian Michel + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 070203 JP Initial. + * 072106 MF,AM Fix #1526632. Add missing atan(). + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::LinearRegAngleLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int linearRegAngleLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_LINEARREG_ANGLE_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_LINEARREG_ANGLE - Linear Regression Angle + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearRegAngle( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG_ANGLE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + + int today, lookbackTotal; + double SumX, SumXY, SumY, SumXSqr, Divisor; + + double m; + + int i; + + double tempValue1; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Linear Regression is a concept also known as the + * "least squares method" or "best fit." Linear + * Regression attempts to fit a straight line between + * several data points in such a way that distance + * between each data point and the line is minimized. + * + * For each point, a straight line over the specified + * previous bar period is determined in terms + * of y = b + m*x: + * + * TA_LINEARREG : Returns b+m*(period-1) + * TA_LINEARREG_SLOPE : Returns 'm' + * TA_LINEARREG_ANGLE : Returns 'm' in degree. + * TA_LINEARREG_INTERCEPT: Returns 'b' + * TA_TSF : Returns b+m*(period) + */ + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(LINEARREG_ANGLE)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; /* Index into the output. */ + today = startIdx; + + SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; + SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; + Divisor = SumX * SumX - optInTimePeriod * SumXSqr; + + while( today <= endIdx ) + { + SumXY = 0; + SumY = 0; + for( i = optInTimePeriod; i-- != 0; ) + { + SumY += tempValue1 = inReal[today - i]; + SumXY += (double)i * tempValue1; + } + m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; + outReal[outIdx++] = std_atan(m) * ( 180.0 / PI ); + today++; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearRegAngle( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_LINEARREG_ANGLE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal; +/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; +/* Generated */ double m; +/* Generated */ int i; +/* Generated */ double tempValue1; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG_ANGLE)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; +/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; +/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ SumXY = 0; +/* Generated */ SumY = 0; +/* Generated */ for( i = optInTimePeriod; i-- != 0; ) +/* Generated */ { +/* Generated */ SumY += tempValue1 = inReal[today - i]; +/* Generated */ SumXY += (double)i * tempValue1; +/* Generated */ } +/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; +/* Generated */ outReal[outIdx++] = std_atan(m) * ( 180.0 / PI ); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c b/src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c new file mode 100644 index 000000000..6ab89ab86 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c @@ -0,0 +1,363 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * JP John Price + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 070203 JP Initial. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::LinearRegInterceptLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int linearRegInterceptLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_LINEARREG_INTERCEPT_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_LINEARREG_INTERCEPT - Linear Regression Intercept + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearRegIntercept( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG_INTERCEPT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + + int today, lookbackTotal; + double SumX, SumXY, SumY, SumXSqr, Divisor; + + double m; + int i; + + double tempValue1; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Linear Regression is a concept also known as the + * "least squares method" or "best fit." Linear + * Regression attempts to fit a straight line between + * several data points in such a way that distance + * between each data point and the line is minimized. + * + * For each point, a straight line over the specified + * previous bar period is determined in terms + * of y = b + m*x: + * + * TA_LINEARREG : Returns b+m*(period-1) + * TA_LINEARREG_SLOPE : Returns 'm' + * TA_LINEARREG_ANGLE : Returns 'm' in degree. + * TA_LINEARREG_INTERCEPT: Returns 'b' + * TA_TSF : Returns b+m*(period) + */ + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(LINEARREG_INTERCEPT)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; /* Index into the output. */ + today = startIdx; + + SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; + SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; + Divisor = SumX * SumX - optInTimePeriod * SumXSqr; + + while( today <= endIdx ) + { + SumXY = 0; + SumY = 0; + for( i = optInTimePeriod; i-- != 0; ) + { + SumY += tempValue1 = inReal[today - i]; + SumXY += (double)i * tempValue1; + } + m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; + outReal[outIdx++] = ( SumY - m * SumX ) / (double)optInTimePeriod; + today++; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearRegIntercept( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_LINEARREG_INTERCEPT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal; +/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; +/* Generated */ double m; +/* Generated */ int i; +/* Generated */ double tempValue1; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG_INTERCEPT)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; +/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; +/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ SumXY = 0; +/* Generated */ SumY = 0; +/* Generated */ for( i = optInTimePeriod; i-- != 0; ) +/* Generated */ { +/* Generated */ SumY += tempValue1 = inReal[today - i]; +/* Generated */ SumXY += (double)i * tempValue1; +/* Generated */ } +/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; +/* Generated */ outReal[outIdx++] = ( SumY - m * SumX ) / (double)optInTimePeriod; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c b/src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c new file mode 100644 index 000000000..6f8da6ff1 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c @@ -0,0 +1,359 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * JP John Price + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 070203 JP Initial. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::LinearRegSlopeLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int linearRegSlopeLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_LINEARREG_SLOPE_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_LINEARREG_SLOPE - Linear Regression Slope + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearRegSlope( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG_SLOPE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + + int today, lookbackTotal; + double SumX, SumXY, SumY, SumXSqr, Divisor; + + int i; + + double tempValue1; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Linear Regression is a concept also known as the + * "least squares method" or "best fit." Linear + * Regression attempts to fit a straight line between + * several data points in such a way that distance + * between each data point and the line is minimized. + * + * For each point, a straight line over the specified + * previous bar period is determined in terms + * of y = b + m*x: + * + * TA_LINEARREG : Returns b+m*(period-1) + * TA_LINEARREG_SLOPE : Returns 'm' + * TA_LINEARREG_ANGLE : Returns 'm' in degree. + * TA_LINEARREG_INTERCEPT: Returns 'b' + * TA_TSF : Returns b+m*(period) + */ + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(LINEARREG_SLOPE)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; /* Index into the output. */ + today = startIdx; + + SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; + SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; + Divisor = SumX * SumX - optInTimePeriod * SumXSqr; + + while( today <= endIdx ) + { + SumXY = 0; + SumY = 0; + for( i = optInTimePeriod; i-- != 0; ) + { + SumY += tempValue1 = inReal[today - i]; + SumXY += (double)i * tempValue1; + } + outReal[outIdx++] = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; + today++; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode linearRegSlope( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_LINEARREG_SLOPE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal; +/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; +/* Generated */ int i; +/* Generated */ double tempValue1; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG_SLOPE)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; +/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; +/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ SumXY = 0; +/* Generated */ SumY = 0; +/* Generated */ for( i = optInTimePeriod; i-- != 0; ) +/* Generated */ { +/* Generated */ SumY += tempValue1 = inReal[today - i]; +/* Generated */ SumXY += (double)i * tempValue1; +/* Generated */ } +/* Generated */ outReal[outIdx++] = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_LN.c b/src/ta-lib/src/ta_func/ta_LN.c new file mode 100644 index 000000000..854c03e77 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_LN.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::LnLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int lnLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_LN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_LN - Vector Log Natural + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ln( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_LN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_log(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ln( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_LN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_log(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_LOG10.c b/src/ta-lib/src/ta_func/ta_LOG10.c new file mode 100644 index 000000000..877abaa14 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_LOG10.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::Log10Lookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int log10Lookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_LOG10_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_LOG10 - Vector Log10 + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode log10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_LOG10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_log10(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode log10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_LOG10( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_log10(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MA.c b/src/ta-lib/src/ta_func/ta_MA.c new file mode 100644 index 000000000..f55bfb5b4 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MA.c @@ -0,0 +1,488 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 022203 MF Add MAMA + * 040503 MF Add T3 + * 052603 MF Adapt code to compile with .NET Managed C++ + * 111603 MF Allow period of 1. Just copy input into output. + * 060907 MF Use TA_SMA/TA_EMA instead of internal implementation. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MovingAverageLookback( int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int movingAverageLookback( int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MA_Lookback( int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInMAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + if( optInTimePeriod <= 1 ) + return 0; + + switch( optInMAType ) + { + case ENUM_CASE(MAType, TA_MAType_SMA, Sma ): + retValue = LOOKBACK_CALL(SMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_EMA, Ema): + retValue = LOOKBACK_CALL(EMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_WMA, Wma): + retValue = LOOKBACK_CALL(WMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_DEMA, Dema): + retValue = LOOKBACK_CALL(DEMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_TEMA, Tema ): + retValue = LOOKBACK_CALL(TEMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_TRIMA, Trima ): + retValue = LOOKBACK_CALL(TRIMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_KAMA, Kama ): + retValue = LOOKBACK_CALL(KAMA)( optInTimePeriod ); + break; + + case ENUM_CASE(MAType, TA_MAType_MAMA, Mama ): + retValue = LOOKBACK_CALL(MAMA)( 0.5, 0.05 ); + break; + + case ENUM_CASE(MAType, TA_MAType_T3, T3): + retValue = LOOKBACK_CALL(T3)( optInTimePeriod, 0.7 ); + break; + + default: + retValue = 0; + } + + return retValue; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MA - Moving average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * optInMAType: + * Type of Moving Average + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode movingAverage( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_REF(dummyBuffer); + ENUM_DECLARATION(RetCode) retCode; + + int nbElement; + int outIdx, todayIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + if( optInTimePeriod == 1 ) + { + nbElement = endIdx-startIdx+1; + VALUE_HANDLE_DEREF(outNBElement) = nbElement; + for( todayIdx=startIdx, outIdx=0; outIdx < nbElement; outIdx++, todayIdx++ ) + outReal[outIdx] = inReal[todayIdx]; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + /* Simply forward the job to the corresponding TA function. */ + switch( optInMAType ) + { + case ENUM_CASE(MAType, TA_MAType_SMA, Sma): + retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_EMA, Ema): + retCode = FUNCTION_CALL(EMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_WMA, Wma): + retCode = FUNCTION_CALL(WMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_DEMA, Dema): + retCode = FUNCTION_CALL(DEMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_TEMA, Tema): + retCode = FUNCTION_CALL(TEMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_TRIMA, Trima): + retCode = FUNCTION_CALL(TRIMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_KAMA, Kama): + retCode = FUNCTION_CALL(KAMA)( startIdx, endIdx, inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + break; + + case ENUM_CASE(MAType, TA_MAType_MAMA, Mama): + /* The optInTimePeriod is ignored and the FAMA output of the MAMA + * is ignored. + */ + ARRAY_ALLOC(dummyBuffer, (endIdx-startIdx+1) ); + + #if !defined( _JAVA ) + if( !dummyBuffer ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + + retCode = FUNCTION_CALL(MAMA)( startIdx, endIdx, inReal, 0.5, 0.05, + outBegIdx, outNBElement, + outReal, dummyBuffer ); + + ARRAY_FREE( dummyBuffer ); + break; + + case ENUM_CASE(MAType, TA_MAType_T3, T3 ): + retCode = FUNCTION_CALL(T3)( startIdx, endIdx, inReal, + optInTimePeriod, 0.7, + outBegIdx, outNBElement, outReal ); + break; + + default: + retCode = ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); + break; + } + + return retCode; +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode movingAverage( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(dummyBuffer); +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int nbElement; +/* Generated */ int outIdx, todayIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( optInTimePeriod == 1 ) +/* Generated */ { +/* Generated */ nbElement = endIdx-startIdx+1; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = nbElement; +/* Generated */ for( todayIdx=startIdx, outIdx=0; outIdx < nbElement; outIdx++, todayIdx++ ) +/* Generated */ outReal[outIdx] = inReal[todayIdx]; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ switch( optInMAType ) +/* Generated */ { +/* Generated */ case ENUM_CASE(MAType, TA_MAType_SMA, Sma): +/* Generated */ retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_EMA, Ema): +/* Generated */ retCode = FUNCTION_CALL(EMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_WMA, Wma): +/* Generated */ retCode = FUNCTION_CALL(WMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_DEMA, Dema): +/* Generated */ retCode = FUNCTION_CALL(DEMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_TEMA, Tema): +/* Generated */ retCode = FUNCTION_CALL(TEMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_TRIMA, Trima): +/* Generated */ retCode = FUNCTION_CALL(TRIMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_KAMA, Kama): +/* Generated */ retCode = FUNCTION_CALL(KAMA)( startIdx, endIdx, inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_MAMA, Mama): +/* Generated */ ARRAY_ALLOC(dummyBuffer, (endIdx-startIdx+1) ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !dummyBuffer ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL(MAMA)( startIdx, endIdx, inReal, 0.5, 0.05, +/* Generated */ outBegIdx, outNBElement, +/* Generated */ outReal, dummyBuffer ); +/* Generated */ ARRAY_FREE( dummyBuffer ); +/* Generated */ break; +/* Generated */ case ENUM_CASE(MAType, TA_MAType_T3, T3 ): +/* Generated */ retCode = FUNCTION_CALL(T3)( startIdx, endIdx, inReal, +/* Generated */ optInTimePeriod, 0.7, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ break; +/* Generated */ default: +/* Generated */ retCode = ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ break; +/* Generated */ } +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MACD.c b/src/ta-lib/src/ta_func/ta_MACD.c new file mode 100644 index 000000000..3a4145b71 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MACD.c @@ -0,0 +1,806 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JPP JP Pienaar (j.pienaar@mci.co.za) + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 080403 JPP Fix #767653 for logic when swapping periods. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MacdLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int macdLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MACD_Lookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int tempInteger; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInSignalPeriod. */ +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* The lookback is driven by the signal line output. + * + * (must also account for the initial data consume + * by the slow period). + */ + + /* Make sure slow is really slower than + * the fast period! if not, swap... + */ + if( optInSlowPeriod < optInFastPeriod ) + { + /* swap */ + tempInteger = optInSlowPeriod; + optInSlowPeriod = optInFastPeriod; + optInFastPeriod = tempInteger; + } + + return LOOKBACK_CALL(EMA)( optInSlowPeriod ) + + LOOKBACK_CALL(EMA)( optInSignalPeriod ); +} + + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MACD - Moving Average Convergence/Divergence + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode macd( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MACD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInSignalPeriod. */ +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMACD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMACDSignal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMACDHist ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, + optInFastPeriod, + optInSlowPeriod, + optInSignalPeriod, + outBegIdx, + outNBElement, + outMACD, + outMACDSignal, + outMACDHist ); +} + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + // No INT function +#else + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) + enum class Core::RetCode Core::TA_INT_MACD( int startIdx, + int endIdx, + SubArray^ inReal, + int optInFastPeriod, /* 0 is fix 12 */ + int optInSlowPeriod, /* 0 is fix 26 */ + int optInSignalPeriod_2, + [Out]int% outBegIdx, + [Out]int% outNBElement, + SubArray^ outMACD, + SubArray^ outMACDSignal, + SubArray^ outMACDHist ) +#elif defined( _MANAGED ) + enum class Core::RetCode Core::TA_INT_MACD( int startIdx, + int endIdx, + cli::array^ inReal, + int optInFastPeriod, /* 0 is fix 12 */ + int optInSlowPeriod, /* 0 is fix 26 */ + int optInSignalPeriod_2, + [Out]int% outBegIdx, + [Out]int% outNBElement, + cli::array^ outMACD, + cli::array^ outMACDSignal, + cli::array^ outMACDHist ) +#elif defined( _JAVA ) +RetCode TA_INT_MACD( int startIdx, + int endIdx, + INPUT_TYPE inReal[], + int optInFastPeriod, /* 0 is fix 12 */ + int optInSlowPeriod, /* 0 is fix 26 */ + int optInSignalPeriod_2, + MInteger outBegIdx, + MInteger outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ) + +#else +TA_RetCode TA_PREFIX(INT_MACD)( int startIdx, + int endIdx, + const INPUT_TYPE inReal[], + int optInFastPeriod, /* 0 is fix 12 */ + int optInSlowPeriod, /* 0 is fix 26 */ + int optInSignalPeriod_2, + int *outBegIdx, + int *outNBElement, + double outMACD[], + double outMACDSignal[], + double outMACDHist[] ) +#endif +{ + ARRAY_REF(slowEMABuffer); + ARRAY_REF(fastEMABuffer); + double k1, k2; + ENUM_DECLARATION(RetCode) retCode; + int tempInteger; + VALUE_HANDLE_INT(outBegIdx1); + VALUE_HANDLE_INT(outNbElement1); + VALUE_HANDLE_INT(outBegIdx2); + VALUE_HANDLE_INT(outNbElement2); + int lookbackTotal, lookbackSignal; + int i; + + /* !!! A lot of speed optimization could be done + * !!! with this function. + * !!! + * !!! A better approach would be to use TA_INT_EMA + * !!! just to get the seeding values for the + * !!! fast and slow EMA. Then process the difference + * !!! in an allocated buffer until enough data is + * !!! available for the first signal value. + * !!! From that point all the processing can + * !!! be done in a tight loop. + * !!! + * !!! That approach will have the following + * !!! advantage: + * !!! 1) One mem allocation needed instead of two. + * !!! 2) The mem allocation size will be only the + * !!! signal lookback period instead of the + * !!! whole range of data. + * !!! 3) Processing will be done in a tight loop. + * !!! allowing to avoid a lot of memory store-load + * !!! operation. + * !!! 4) The memcpy at the end will be eliminated! + * !!! + * !!! If only I had time.... + */ + + /* Make sure slow is really slower than + * the fast period! if not, swap... + */ + if( optInSlowPeriod < optInFastPeriod ) + { + /* swap */ + tempInteger = optInSlowPeriod; + optInSlowPeriod = optInFastPeriod; + optInFastPeriod = tempInteger; + } + + /* Catch special case for fix 26/12 MACD. */ + if( optInSlowPeriod != 0 ) + k1 = PER_TO_K(optInSlowPeriod); + else + { + optInSlowPeriod = 26; + k1 = (double)0.075; /* Fix 26 */ + } + + if( optInFastPeriod != 0 ) + k2 = PER_TO_K(optInFastPeriod); + else + { + optInFastPeriod = 12; + k2 = (double)0.15; /* Fix 12 */ + } + + lookbackSignal = LOOKBACK_CALL(EMA)( optInSignalPeriod_2 ); + + /* Move up the start index if there is not + * enough initial data. + */ + lookbackTotal = lookbackSignal; + lookbackTotal += LOOKBACK_CALL(EMA)( optInSlowPeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Allocate intermediate buffer for fast/slow EMA. */ + tempInteger = (endIdx-startIdx)+1+lookbackSignal; + ARRAY_ALLOC( fastEMABuffer, tempInteger ); + #if !defined( _JAVA ) + if( !fastEMABuffer ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + ARRAY_ALLOC( slowEMABuffer, tempInteger ); + #if !defined( _JAVA ) + if( !slowEMABuffer ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastEMABuffer ); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + /* Calculate the slow EMA. + * + * Move back the startIdx to get enough data + * for the signal period. That way, once the + * signal calculation is done, all the output + * will start at the requested 'startIdx'. + */ + tempInteger = startIdx-lookbackSignal; + retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, + inReal, optInSlowPeriod, k1, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), slowEMABuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastEMABuffer ); + ARRAY_FREE( slowEMABuffer ); + return retCode; + } + + /* Calculate the fast EMA. */ + retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, + inReal, optInFastPeriod, k2, + VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), fastEMABuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastEMABuffer ); + ARRAY_FREE( slowEMABuffer ); + return retCode; + } + + /* Parano tests. Will be removed eventually. */ + if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || + (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || + (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || + (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastEMABuffer ); + ARRAY_FREE( slowEMABuffer ); + return TA_INTERNAL_ERROR(119); + } + + /* Calculate (fast EMA) - (slow EMA). */ + for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) + fastEMABuffer[i] = fastEMABuffer[i] - slowEMABuffer[i]; + + + /* Copy the result into the output for the caller. */ + ARRAY_MEMMOVE( outMACD, 0, fastEMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); + + /* Calculate the signal/trigger line. */ + retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, + fastEMABuffer, optInSignalPeriod_2, PER_TO_K(optInSignalPeriod_2), + VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); + + + ARRAY_FREE( fastEMABuffer ); + ARRAY_FREE( slowEMABuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Calculate the histogram. */ + for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) + outMACDHist[i] = outMACD[i]-outMACDSignal[i]; + + + /* All done! Indicate the output limits and return success. */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} +#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode macd( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MACD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMACD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMACDSignal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMACDHist ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, +/* Generated */ optInFastPeriod, +/* Generated */ optInSlowPeriod, +/* Generated */ optInSignalPeriod, +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ outMACD, +/* Generated */ outMACDSignal, +/* Generated */ outMACDHist ); +/* Generated */ } +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ // No INT function +/* Generated */ #else +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TA_INT_MACD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ int optInSignalPeriod_2, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TA_INT_MACD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ int optInSignalPeriod_2, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ RetCode TA_INT_MACD( int startIdx, +/* Generated */ int endIdx, +/* Generated */ INPUT_TYPE inReal[], +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ int optInSignalPeriod_2, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_PREFIX(INT_MACD)( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const INPUT_TYPE inReal[], +/* Generated */ int optInFastPeriod, +/* Generated */ int optInSlowPeriod, +/* Generated */ int optInSignalPeriod_2, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(slowEMABuffer); +/* Generated */ ARRAY_REF(fastEMABuffer); +/* Generated */ double k1, k2; +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int tempInteger; +/* Generated */ VALUE_HANDLE_INT(outBegIdx1); +/* Generated */ VALUE_HANDLE_INT(outNbElement1); +/* Generated */ VALUE_HANDLE_INT(outBegIdx2); +/* Generated */ VALUE_HANDLE_INT(outNbElement2); +/* Generated */ int lookbackTotal, lookbackSignal; +/* Generated */ int i; +/* Generated */ if( optInSlowPeriod < optInFastPeriod ) +/* Generated */ { +/* Generated */ tempInteger = optInSlowPeriod; +/* Generated */ optInSlowPeriod = optInFastPeriod; +/* Generated */ optInFastPeriod = tempInteger; +/* Generated */ } +/* Generated */ if( optInSlowPeriod != 0 ) +/* Generated */ k1 = PER_TO_K(optInSlowPeriod); +/* Generated */ else +/* Generated */ { +/* Generated */ optInSlowPeriod = 26; +/* Generated */ k1 = (double)0.075; +/* Generated */ } +/* Generated */ if( optInFastPeriod != 0 ) +/* Generated */ k2 = PER_TO_K(optInFastPeriod); +/* Generated */ else +/* Generated */ { +/* Generated */ optInFastPeriod = 12; +/* Generated */ k2 = (double)0.15; +/* Generated */ } +/* Generated */ lookbackSignal = LOOKBACK_CALL(EMA)( optInSignalPeriod_2 ); +/* Generated */ lookbackTotal = lookbackSignal; +/* Generated */ lookbackTotal += LOOKBACK_CALL(EMA)( optInSlowPeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ tempInteger = (endIdx-startIdx)+1+lookbackSignal; +/* Generated */ ARRAY_ALLOC( fastEMABuffer, tempInteger ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !fastEMABuffer ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC( slowEMABuffer, tempInteger ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !slowEMABuffer ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastEMABuffer ); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ tempInteger = startIdx-lookbackSignal; +/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, +/* Generated */ inReal, optInSlowPeriod, k1, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), slowEMABuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastEMABuffer ); +/* Generated */ ARRAY_FREE( slowEMABuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, +/* Generated */ inReal, optInFastPeriod, k2, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), fastEMABuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastEMABuffer ); +/* Generated */ ARRAY_FREE( slowEMABuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || +/* Generated */ (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || +/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || +/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastEMABuffer ); +/* Generated */ ARRAY_FREE( slowEMABuffer ); +/* Generated */ return TA_INTERNAL_ERROR(119); +/* Generated */ } +/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) +/* Generated */ fastEMABuffer[i] = fastEMABuffer[i] - slowEMABuffer[i]; +/* Generated */ ARRAY_MEMMOVE( outMACD, 0, fastEMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, +/* Generated */ fastEMABuffer, optInSignalPeriod_2, PER_TO_K(optInSignalPeriod_2), +/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); +/* Generated */ ARRAY_FREE( fastEMABuffer ); +/* Generated */ ARRAY_FREE( slowEMABuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) +/* Generated */ outMACDHist[i] = outMACD[i]-outMACDSignal[i]; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MACDEXT.c b/src/ta-lib/src/ta_func/ta_MACDEXT.c new file mode 100644 index 000000000..d4415ef9d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MACDEXT.c @@ -0,0 +1,721 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MacdExtLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int macdExtLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MACDEXT_Lookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSignalMAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int tempInteger, lookbackLargest; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastMAType < 0) || ((int)optInFastMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowMAType < 0) || ((int)optInSlowMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSignalPeriod. */ +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSignalMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSignalMAType < 0) || ((int)optInSignalMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Find the MA with the largest lookback */ + lookbackLargest = LOOKBACK_CALL(MA)( optInFastPeriod, optInFastMAType ); + tempInteger = LOOKBACK_CALL(MA)( optInSlowPeriod, optInSlowMAType ); + if( tempInteger > lookbackLargest ) + lookbackLargest = tempInteger; + + /* Add to the largest MA lookback the signal line lookback */ + return lookbackLargest + LOOKBACK_CALL(MA)( optInSignalPeriod, optInSignalMAType ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MACDEXT - MACD with controllable MA type + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInFastMAType: + * Type of Moving Average for fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInSlowMAType: + * Type of Moving Average for slow MA + * + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * optInSignalMAType: + * Type of Moving Average for signal line + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode macdExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MACDEXT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSignalMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ARRAY_REF( slowMABuffer ); + ARRAY_REF( fastMABuffer ); + ENUM_DECLARATION(RetCode) retCode; + int tempInteger; + VALUE_HANDLE_INT(outBegIdx1); + VALUE_HANDLE_INT(outNbElement1); + VALUE_HANDLE_INT(outBegIdx2); + VALUE_HANDLE_INT(outNbElement2); + int lookbackTotal, lookbackSignal, lookbackLargest; + int i; + ENUM_DECLARATION(MAType) tempMAType; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastMAType < 0) || ((int)optInFastMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowMAType < 0) || ((int)optInSlowMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSignalPeriod. */ +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSignalMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSignalMAType < 0) || ((int)optInSignalMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMACD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMACDSignal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMACDHist ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Make sure slow is really slower than + * the fast period! if not, swap... + */ + if( optInSlowPeriod < optInFastPeriod ) + { + /* swap period */ + tempInteger = optInSlowPeriod; + optInSlowPeriod = optInFastPeriod; + optInFastPeriod = tempInteger; + /* swap type */ + tempMAType = optInSlowMAType; + optInSlowMAType = optInFastMAType; + optInFastMAType = tempMAType; + } + + /* Find the MA with the largest lookback */ + lookbackLargest = LOOKBACK_CALL(MA)( optInFastPeriod, optInFastMAType ); + tempInteger = LOOKBACK_CALL(MA)( optInSlowPeriod, optInSlowMAType ); + if( tempInteger > lookbackLargest ) + lookbackLargest = tempInteger; + + /* Add the lookback needed for the signal line */ + lookbackSignal = LOOKBACK_CALL(MA)( optInSignalPeriod, optInSignalMAType ); + lookbackTotal = lookbackSignal+lookbackLargest; + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Allocate intermediate buffer for fast/slow MA. */ + tempInteger = (endIdx-startIdx)+1+lookbackSignal; + ARRAY_ALLOC( fastMABuffer, tempInteger ); + #if !defined( _JAVA ) + if( !fastMABuffer ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + ARRAY_ALLOC( slowMABuffer, tempInteger ); + #if !defined( _JAVA ) + if( !slowMABuffer ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastMABuffer ); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + /* Calculate the slow MA. + * + * Move back the startIdx to get enough data + * for the signal period. That way, once the + * signal calculation is done, all the output + * will start at the requested 'startIdx'. + */ + tempInteger = startIdx-lookbackSignal; + retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, + inReal, optInSlowPeriod, optInSlowMAType, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), + slowMABuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastMABuffer ); + ARRAY_FREE( slowMABuffer ); + return retCode; + } + + /* Calculate the fast MA. */ + retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, + inReal, optInFastPeriod, optInFastMAType, + VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), + fastMABuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastMABuffer ); + ARRAY_FREE( slowMABuffer ); + return retCode; + } + + /* Parano tests. Will be removed eventually. */ + if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || + (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || + (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || + (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + ARRAY_FREE( fastMABuffer ); + ARRAY_FREE( slowMABuffer ); + return TA_INTERNAL_ERROR(119); + } + + /* Calculate (fast MA) - (slow MA). */ + for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) + fastMABuffer[i] = fastMABuffer[i] - slowMABuffer[i]; + + /* Copy the result into the output for the caller. */ + ARRAY_MEMMOVE( outMACD, 0, fastMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); + + /* Calculate the signal/trigger line. */ + retCode = FUNCTION_CALL_DOUBLE(MA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, + fastMABuffer, optInSignalPeriod, optInSignalMAType, + VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); + + ARRAY_FREE( fastMABuffer ); + ARRAY_FREE( slowMABuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Calculate the histogram. */ + for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) + outMACDHist[i] = outMACD[i]-outMACDSignal[i]; + + /* All done! Indicate the output limits and return success. */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode macdExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MAType optInSignalMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MACDEXT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInFastMAType, +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInSlowMAType, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSignalMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF( slowMABuffer ); +/* Generated */ ARRAY_REF( fastMABuffer ); +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int tempInteger; +/* Generated */ VALUE_HANDLE_INT(outBegIdx1); +/* Generated */ VALUE_HANDLE_INT(outNbElement1); +/* Generated */ VALUE_HANDLE_INT(outBegIdx2); +/* Generated */ VALUE_HANDLE_INT(outNbElement2); +/* Generated */ int lookbackTotal, lookbackSignal, lookbackLargest; +/* Generated */ int i; +/* Generated */ ENUM_DECLARATION(MAType) tempMAType; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastMAType < 0) || ((int)optInFastMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowMAType < 0) || ((int)optInSlowMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSignalMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSignalMAType < 0) || ((int)optInSignalMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMACD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMACDSignal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMACDHist ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( optInSlowPeriod < optInFastPeriod ) +/* Generated */ { +/* Generated */ tempInteger = optInSlowPeriod; +/* Generated */ optInSlowPeriod = optInFastPeriod; +/* Generated */ optInFastPeriod = tempInteger; +/* Generated */ tempMAType = optInSlowMAType; +/* Generated */ optInSlowMAType = optInFastMAType; +/* Generated */ optInFastMAType = tempMAType; +/* Generated */ } +/* Generated */ lookbackLargest = LOOKBACK_CALL(MA)( optInFastPeriod, optInFastMAType ); +/* Generated */ tempInteger = LOOKBACK_CALL(MA)( optInSlowPeriod, optInSlowMAType ); +/* Generated */ if( tempInteger > lookbackLargest ) +/* Generated */ lookbackLargest = tempInteger; +/* Generated */ lookbackSignal = LOOKBACK_CALL(MA)( optInSignalPeriod, optInSignalMAType ); +/* Generated */ lookbackTotal = lookbackSignal+lookbackLargest; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ tempInteger = (endIdx-startIdx)+1+lookbackSignal; +/* Generated */ ARRAY_ALLOC( fastMABuffer, tempInteger ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !fastMABuffer ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC( slowMABuffer, tempInteger ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !slowMABuffer ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastMABuffer ); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ tempInteger = startIdx-lookbackSignal; +/* Generated */ retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, +/* Generated */ inReal, optInSlowPeriod, optInSlowMAType, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ slowMABuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastMABuffer ); +/* Generated */ ARRAY_FREE( slowMABuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, +/* Generated */ inReal, optInFastPeriod, optInFastMAType, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), +/* Generated */ fastMABuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastMABuffer ); +/* Generated */ ARRAY_FREE( slowMABuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || +/* Generated */ (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || +/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || +/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ ARRAY_FREE( fastMABuffer ); +/* Generated */ ARRAY_FREE( slowMABuffer ); +/* Generated */ return TA_INTERNAL_ERROR(119); +/* Generated */ } +/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) +/* Generated */ fastMABuffer[i] = fastMABuffer[i] - slowMABuffer[i]; +/* Generated */ ARRAY_MEMMOVE( outMACD, 0, fastMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, +/* Generated */ fastMABuffer, optInSignalPeriod, optInSignalMAType, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); +/* Generated */ ARRAY_FREE( fastMABuffer ); +/* Generated */ ARRAY_FREE( slowMABuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) +/* Generated */ outMACDHist[i] = outMACD[i]-outMACDSignal[i]; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MACDFIX.c b/src/ta-lib/src/ta_func/ta_MACDFIX.c new file mode 100644 index 000000000..eb3d518ba --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MACDFIX.c @@ -0,0 +1,314 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MacdFixLookback( int optInSignalPeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int macdFixLookback( int optInSignalPeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MACDFIX_Lookback( int optInSignalPeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInSignalPeriod. */ +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* The lookback is driven by the signal line output. + * + * (must also account for the initial data consume + * by the fix 26 period EMA). + */ + return LOOKBACK_CALL(EMA)( 26 ) + + LOOKBACK_CALL(EMA)( optInSignalPeriod ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MACDFIX - Moving Average Convergence/Divergence Fix 12/26 + * + * Input = double + * Output = double, double, double + * + * Optional Parameters + * ------------------- + * optInSignalPeriod:(From 1 to 100000) + * Smoothing for the signal line (nb of period) + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode macdFix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MACDFIX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSignalPeriod. */ +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMACD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMACDSignal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMACDHist ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, + 0, /* 0 indicate fix 12 == 0.15 for optInFastPeriod */ + 0, /* 0 indicate fix 26 == 0.075 for optInSlowPeriod */ + optInSignalPeriod, + outBegIdx, + outNBElement, + outMACD, + outMACDSignal, + outMACDHist ); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMACD, +/* Generated */ SubArray^ outMACDSignal, +/* Generated */ SubArray^ outMACDHist ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMACD, +/* Generated */ cli::array^ outMACDSignal, +/* Generated */ cli::array^ outMACDHist ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode macdFix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MACDFIX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMACD[], +/* Generated */ double outMACDSignal[], +/* Generated */ double outMACDHist[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSignalPeriod = 9; +/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMACD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMACDSignal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMACDHist ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, +/* Generated */ 0, +/* Generated */ 0, +/* Generated */ optInSignalPeriod, +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ outMACD, +/* Generated */ outMACDSignal, +/* Generated */ outMACDHist ); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MAMA.c b/src/ta-lib/src/ta_func/ta_MAMA.c new file mode 100644 index 000000000..921593518 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MAMA.c @@ -0,0 +1,727 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 023003 MF Initial Coding of MAMA. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MamaLookback( double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit ) /* From 0.01 to 0.99 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int mamaLookback( double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit ) /* From 0.01 to 0.99 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MAMA_Lookback( double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit ) /* From 0.01 to 0.99 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInFastLimit == TA_REAL_DEFAULT ) +/* Generated */ optInFastLimit = 5.000000e-1; +/* Generated */ else if( (optInFastLimit < 1.000000e-2) ||/* Generated */ (optInFastLimit > 9.900000e-1) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInSlowLimit == TA_REAL_DEFAULT ) +/* Generated */ optInSlowLimit = 5.000000e-2; +/* Generated */ else if( (optInSlowLimit < 1.000000e-2) ||/* Generated */ (optInSlowLimit > 9.900000e-1) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* The two parameters are not a factor to determine + * the lookback, but are still requested for + * consistency with all other Lookback functions. + */ + UNUSED_VARIABLE(optInFastLimit); + UNUSED_VARIABLE(optInSlowLimit); + + /* Lookback is a fix amount + the unstable period. + * + * + * The fix lookback is 32 and is establish as follow: + * + * 12 price bar to be compatible with the implementation + * of TradeStation found in John Ehlers book. + * 6 price bars for the Detrender + * 6 price bars for Q1 + * 3 price bars for jI + * 3 price bars for jQ + * 1 price bar for Re/Im + * 1 price bar for the Delta Phase + * ------- + * 32 Total + */ + + return 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MAMA,Mama); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MAMA - MESA Adaptive Moving Average + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastLimit:(From 0.01 to 0.99) + * Upper limit use in the adaptive algorithm + * + * optInSlowLimit:(From 0.01 to 0.99) + * Lower limit use in the adaptive algorithm + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMAMA, +/* Generated */ SubArray^ outFAMA ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMAMA, +/* Generated */ cli::array^ outFAMA ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMAMA[], +/* Generated */ double outFAMA[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MAMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMAMA[], +/* Generated */ double outFAMA[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int outIdx, i; + int lookbackTotal, today; + double tempReal, tempReal2; + + double adjustedPrevPeriod, period; + + /* Variable used for the price smoother (a weighted moving average). */ + int trailingWMAIdx; + double periodWMASum, periodWMASub, trailingWMAValue; + double smoothedValue; + + /* Variables used for the Hilbert Transormation */ + CONSTANT_DOUBLE(a) = 0.0962; + CONSTANT_DOUBLE(b) = 0.5769; + double hilbertTempReal; + int hilbertIdx; + + HILBERT_VARIABLES( detrender ); + HILBERT_VARIABLES( Q1 ); + HILBERT_VARIABLES( jI ); + HILBERT_VARIABLES( jQ ); + + double Q2, I2, prevQ2, prevI2, Re, Im; + + double I1ForOddPrev2, I1ForOddPrev3; + double I1ForEvenPrev2, I1ForEvenPrev3; + + double rad2Deg; + + double mama,fama,todayValue,prevPhase; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInFastLimit == TA_REAL_DEFAULT ) +/* Generated */ optInFastLimit = 5.000000e-1; +/* Generated */ else if( (optInFastLimit < 1.000000e-2) ||/* Generated */ (optInFastLimit > 9.900000e-1) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInSlowLimit == TA_REAL_DEFAULT ) +/* Generated */ optInSlowLimit = 5.000000e-2; +/* Generated */ else if( (optInSlowLimit < 1.000000e-2) ||/* Generated */ (optInSlowLimit > 9.900000e-1) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMAMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outFAMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Constant */ + rad2Deg = 180.0 / (4.0 * std_atan(1)); + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MAMA,Mama); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + /* Initialize the price smoother, which is simply a weighted + * moving average of the price. + * To understand this algorithm, I strongly suggest to understand + * first how TA_WMA is done. + */ + trailingWMAIdx = startIdx - lookbackTotal; + today = trailingWMAIdx; + + /* Initialization is same as WMA, except loop is unrolled + * for speed optimization. + */ + tempReal = inReal[today++]; + periodWMASub = tempReal; + periodWMASum = tempReal; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*2.0; + tempReal = inReal[today++]; + periodWMASub += tempReal; + periodWMASum += tempReal*3.0; + + trailingWMAValue = 0.0; + + /* Subsequent WMA value are evaluated by using + * the DO_PRICE_WMA macro. + */ + #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ + periodWMASub += varNewPrice; \ + periodWMASub -= trailingWMAValue; \ + periodWMASum += varNewPrice*4.0; \ + trailingWMAValue = inReal[trailingWMAIdx++]; \ + varToStoreSmoothedValue = periodWMASum*0.1; \ + periodWMASum -= periodWMASub; \ + } + + i = 9; + do + { + tempReal = inReal[today++]; + DO_PRICE_WMA(tempReal,smoothedValue); + } while( --i != 0); + + /* Initialize the circular buffers used by the hilbert + * transform logic. + * A buffer is used for odd day and another for even days. + * This minimize the number of memory access and floating point + * operations needed (note also that by using static circular buffer, + * no large dynamic memory allocation is needed for storing + * intermediate calculation!). + */ + hilbertIdx = 0; + + INIT_HILBERT_VARIABLES(detrender); + INIT_HILBERT_VARIABLES(Q1); + INIT_HILBERT_VARIABLES(jI); + INIT_HILBERT_VARIABLES(jQ); + + period = 0.0; + outIdx = 0; + + prevI2 = prevQ2 = 0.0; + Re = Im = 0.0; + mama = fama = 0.0; + I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; + I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; + + prevPhase = 0.0; + + /* The code is speed optimized and is most likely very + * hard to follow if you do not already know well the + * original algorithm. + * To understadn better, it is strongly suggested to look + * first at the Excel implementation in "test_MAMA.xls" included + * in this package. + */ + while( today <= endIdx ) + { + adjustedPrevPeriod = (0.075*period)+0.54; + + todayValue = inReal[today]; + DO_PRICE_WMA(todayValue,smoothedValue); + + if( (today%2) == 0 ) + { + /* Do the Hilbert Transforms for even price bar */ + DO_HILBERT_EVEN(detrender,smoothedValue); + DO_HILBERT_EVEN(Q1,detrender); + DO_HILBERT_EVEN(jI,I1ForEvenPrev3); + DO_HILBERT_EVEN(jQ,Q1); + if( ++hilbertIdx == 3 ) + hilbertIdx = 0; + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); + + /* The variable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForOddPrev3 = I1ForOddPrev2; + I1ForOddPrev2 = detrender; + + /* Put Alpha in tempReal2 */ + if( I1ForEvenPrev3 != 0.0 ) + tempReal2 = (std_atan(Q1/I1ForEvenPrev3)*rad2Deg); + else + tempReal2 = 0.0; + } + else + { + /* Do the Hilbert Transforms for odd price bar */ + DO_HILBERT_ODD(detrender,smoothedValue); + DO_HILBERT_ODD(Q1,detrender); + DO_HILBERT_ODD(jI,I1ForOddPrev3); + DO_HILBERT_ODD(jQ,Q1); + + Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); + I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); + + /* The varaiable I1 is the detrender delayed for + * 3 price bars. + * + * Save the current detrender value for being + * used by the "odd" logic later. + */ + I1ForEvenPrev3 = I1ForEvenPrev2; + I1ForEvenPrev2 = detrender; + + /* Put Alpha in tempReal2 */ + if( I1ForOddPrev3 != 0.0 ) + tempReal2 = (std_atan(Q1/I1ForOddPrev3)*rad2Deg); + else + tempReal2 = 0.0; + } + + /* Put Delta Phase into tempReal */ + tempReal = prevPhase - tempReal2; + prevPhase = tempReal2; + if( tempReal < 1.0 ) + tempReal = 1.0; + + /* Put Alpha into tempReal */ + if( tempReal > 1.0 ) + { + tempReal = optInFastLimit/tempReal; + if( tempReal < optInSlowLimit ) + tempReal = optInSlowLimit; + } + else + { + tempReal = optInFastLimit; + } + + /* Calculate MAMA, FAMA */ + mama = (tempReal*todayValue)+((1-tempReal)*mama); + tempReal *= 0.5; + fama = (tempReal*mama)+((1-tempReal)*fama); + if( today >= startIdx ) + { + outMAMA[outIdx] = mama; + outFAMA[outIdx++] = fama; + } + + /* Adjust the period for next price bar */ + Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); + Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); + prevQ2 = Q2; + prevI2 = I2; + tempReal = period; + if( (Im != 0.0) && (Re != 0.0) ) + period = 360.0 / (std_atan(Im/Re)*rad2Deg); + tempReal2 = 1.5*tempReal; + if( period > tempReal2) + period = tempReal2; + tempReal2 = 0.67*tempReal; + if( period < tempReal2 ) + period = tempReal2; + if( period < 6 ) + period = 6; + else if( period > 50 ) + period = 50; + period = (0.2*period) + (0.8 * tempReal); + + /* Ooof... let's do the next price bar now! */ + today++; + } + + /* Default return values */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMAMA, +/* Generated */ SubArray^ outFAMA ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMAMA, +/* Generated */ cli::array^ outFAMA ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mama( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMAMA[], +/* Generated */ double outFAMA[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MAMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ +/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMAMA[], +/* Generated */ double outFAMA[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ int lookbackTotal, today; +/* Generated */ double tempReal, tempReal2; +/* Generated */ double adjustedPrevPeriod, period; +/* Generated */ int trailingWMAIdx; +/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; +/* Generated */ double smoothedValue; +/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; +/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; +/* Generated */ double hilbertTempReal; +/* Generated */ int hilbertIdx; +/* Generated */ HILBERT_VARIABLES( detrender ); +/* Generated */ HILBERT_VARIABLES( Q1 ); +/* Generated */ HILBERT_VARIABLES( jI ); +/* Generated */ HILBERT_VARIABLES( jQ ); +/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; +/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; +/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; +/* Generated */ double rad2Deg; +/* Generated */ double mama,fama,todayValue,prevPhase; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInFastLimit == TA_REAL_DEFAULT ) +/* Generated */ optInFastLimit = 5.000000e-1; +/* Generated */ else if( (optInFastLimit < 1.000000e-2) || (optInFastLimit > 9.900000e-1) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInSlowLimit == TA_REAL_DEFAULT ) +/* Generated */ optInSlowLimit = 5.000000e-2; +/* Generated */ else if( (optInSlowLimit < 1.000000e-2) || (optInSlowLimit > 9.900000e-1) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMAMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outFAMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ rad2Deg = 180.0 / (4.0 * std_atan(1)); +/* Generated */ lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MAMA,Mama); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; +/* Generated */ today = trailingWMAIdx; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub = tempReal; +/* Generated */ periodWMASum = tempReal; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*2.0; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ periodWMASub += tempReal; +/* Generated */ periodWMASum += tempReal*3.0; +/* Generated */ trailingWMAValue = 0.0; +/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ +/* Generated */ periodWMASub += varNewPrice; \ +/* Generated */ periodWMASub -= trailingWMAValue; \ +/* Generated */ periodWMASum += varNewPrice*4.0; \ +/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ +/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ +/* Generated */ periodWMASum -= periodWMASub; \ +/* Generated */ } +/* Generated */ i = 9; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[today++]; +/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); +/* Generated */ } while( --i != 0); +/* Generated */ hilbertIdx = 0; +/* Generated */ INIT_HILBERT_VARIABLES(detrender); +/* Generated */ INIT_HILBERT_VARIABLES(Q1); +/* Generated */ INIT_HILBERT_VARIABLES(jI); +/* Generated */ INIT_HILBERT_VARIABLES(jQ); +/* Generated */ period = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ prevI2 = prevQ2 = 0.0; +/* Generated */ Re = Im = 0.0; +/* Generated */ mama = fama = 0.0; +/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; +/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; +/* Generated */ prevPhase = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; +/* Generated */ todayValue = inReal[today]; +/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); +/* Generated */ if( (today%2) == 0 ) +/* Generated */ { +/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); +/* Generated */ DO_HILBERT_EVEN(Q1,detrender); +/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); +/* Generated */ DO_HILBERT_EVEN(jQ,Q1); +/* Generated */ if( ++hilbertIdx == 3 ) +/* Generated */ hilbertIdx = 0; +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; +/* Generated */ I1ForOddPrev2 = detrender; +/* Generated */ if( I1ForEvenPrev3 != 0.0 ) +/* Generated */ tempReal2 = (std_atan(Q1/I1ForEvenPrev3)*rad2Deg); +/* Generated */ else +/* Generated */ tempReal2 = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); +/* Generated */ DO_HILBERT_ODD(Q1,detrender); +/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); +/* Generated */ DO_HILBERT_ODD(jQ,Q1); +/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); +/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); +/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; +/* Generated */ I1ForEvenPrev2 = detrender; +/* Generated */ if( I1ForOddPrev3 != 0.0 ) +/* Generated */ tempReal2 = (std_atan(Q1/I1ForOddPrev3)*rad2Deg); +/* Generated */ else +/* Generated */ tempReal2 = 0.0; +/* Generated */ } +/* Generated */ tempReal = prevPhase - tempReal2; +/* Generated */ prevPhase = tempReal2; +/* Generated */ if( tempReal < 1.0 ) +/* Generated */ tempReal = 1.0; +/* Generated */ if( tempReal > 1.0 ) +/* Generated */ { +/* Generated */ tempReal = optInFastLimit/tempReal; +/* Generated */ if( tempReal < optInSlowLimit ) +/* Generated */ tempReal = optInSlowLimit; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ tempReal = optInFastLimit; +/* Generated */ } +/* Generated */ mama = (tempReal*todayValue)+((1-tempReal)*mama); +/* Generated */ tempReal *= 0.5; +/* Generated */ fama = (tempReal*mama)+((1-tempReal)*fama); +/* Generated */ if( today >= startIdx ) +/* Generated */ { +/* Generated */ outMAMA[outIdx] = mama; +/* Generated */ outFAMA[outIdx++] = fama; +/* Generated */ } +/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); +/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); +/* Generated */ prevQ2 = Q2; +/* Generated */ prevI2 = I2; +/* Generated */ tempReal = period; +/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) +/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); +/* Generated */ tempReal2 = 1.5*tempReal; +/* Generated */ if( period > tempReal2) +/* Generated */ period = tempReal2; +/* Generated */ tempReal2 = 0.67*tempReal; +/* Generated */ if( period < tempReal2 ) +/* Generated */ period = tempReal2; +/* Generated */ if( period < 6 ) +/* Generated */ period = 6; +/* Generated */ else if( period > 50 ) +/* Generated */ period = 50; +/* Generated */ period = (0.2*period) + (0.8 * tempReal); +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MAVP.c b/src/ta-lib/src/ta_func/ta_MAVP.c new file mode 100644 index 000000000..0674d551f --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MAVP.c @@ -0,0 +1,506 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 021807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MovingAverageVariablePeriodLookback( int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int movingAverageVariablePeriodLookback( int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MAVP_Lookback( int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInMinPeriod. */ +/* Generated */ if( (int)optInMinPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInMinPeriod = 2; +/* Generated */ else if( ((int)optInMinPeriod < 2) || ((int)optInMinPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInMaxPeriod. */ +/* Generated */ if( (int)optInMaxPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInMaxPeriod = 30; +/* Generated */ else if( ((int)optInMaxPeriod < 2) || ((int)optInMaxPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + return LOOKBACK_CALL(MA)(optInMaxPeriod, optInMAType); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MAVP - Moving average with variable period + * + * Input = double, double + * Output = double + * + * Optional Parameters + * ------------------- + * optInMinPeriod:(From 2 to 100000) + * Value less than minimum will be changed to Minimum period + * + * optInMaxPeriod:(From 2 to 100000) + * Value higher than maximum will be changed to Maximum period + * + * optInMAType: + * Type of Moving Average + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ SubArray^ inPeriods, +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ cli::array^ inPeriods, +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode movingAverageVariablePeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ double inPeriods[], +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MAVP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ const double inPeriods[], +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int i, j, lookbackTotal, outputSize, tempInt, curPeriod; + ARRAY_INT_REF(localPeriodArray); + ARRAY_REF(localOutputArray); + VALUE_HANDLE_INT(localBegIdx); + VALUE_HANDLE_INT(localNbElement); + ENUM_DECLARATION(RetCode) retCode; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inPeriods ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInMinPeriod. */ +/* Generated */ if( (int)optInMinPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInMinPeriod = 2; +/* Generated */ else if( ((int)optInMinPeriod < 2) || ((int)optInMinPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInMaxPeriod. */ +/* Generated */ if( (int)optInMaxPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInMaxPeriod = 30; +/* Generated */ else if( ((int)optInMaxPeriod < 2) || ((int)optInMaxPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = LOOKBACK_CALL(MA)(optInMaxPeriod,optInMAType); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate exact output size */ + if( lookbackTotal > startIdx ) + tempInt = lookbackTotal; + else + tempInt = startIdx; + if( tempInt > endIdx ) + { + /* No output */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + outputSize = endIdx - tempInt + 1; + + /* Allocate intermediate local buffer. */ + ARRAY_ALLOC(localOutputArray,outputSize); + ARRAY_INT_ALLOC(localPeriodArray,outputSize); + + /* Copy caller array of period into local buffer. + * At the same time, truncate to min/max. + */ + for( i=0; i < outputSize; i++ ) + { + tempInt = (int)(inPeriods[startIdx+i]); + if( tempInt < optInMinPeriod ) + tempInt = optInMinPeriod; + else if( tempInt > optInMaxPeriod ) + tempInt = optInMaxPeriod; + localPeriodArray[i] = tempInt; + } + + /* Process each element of the input. + * For each possible period value, the MA is calculated + * only once. + * The outReal is then fill up for all element with + * the same period. + * A local flag (value 0) is set in localPeriodArray + * to avoid doing a second time the same calculation. + */ + for( i=0; i < outputSize; i++ ) + { + curPeriod = localPeriodArray[i]; + if( curPeriod != 0 ) + { + /* TODO: This portion of the function can be slightly speed + * optimized by making the function without unstable period + * start their calculation at 'startIdx+i' instead of startIdx. + */ + + /* Calculation of the MA required. */ + retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, + curPeriod, optInMAType, + VALUE_HANDLE_OUT(localBegIdx),VALUE_HANDLE_OUT(localNbElement),localOutputArray ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + ARRAY_FREE(localOutputArray); + ARRAY_INT_FREE(localPeriodArray); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + outReal[i] = localOutputArray[i]; + for( j=i+1; j < outputSize; j++ ) + { + if( localPeriodArray[j] == curPeriod ) + { + localPeriodArray[j] = 0; /* Flag to avoid recalculation */ + outReal[j] = localOutputArray[j]; + } + } + } + } + + ARRAY_FREE(localOutputArray); + ARRAY_INT_FREE(localPeriodArray); + + /* Done. Inform the caller of the success. */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outputSize; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ SubArray^ inPeriods, +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ cli::array^ inPeriods, +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode movingAverageVariablePeriod( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ float inPeriods[], +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MAVP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ const float inPeriods[], +/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ +/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i, j, lookbackTotal, outputSize, tempInt, curPeriod; +/* Generated */ ARRAY_INT_REF(localPeriodArray); +/* Generated */ ARRAY_REF(localOutputArray); +/* Generated */ VALUE_HANDLE_INT(localBegIdx); +/* Generated */ VALUE_HANDLE_INT(localNbElement); +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inPeriods ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInMinPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInMinPeriod = 2; +/* Generated */ else if( ((int)optInMinPeriod < 2) || ((int)optInMinPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInMaxPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInMaxPeriod = 30; +/* Generated */ else if( ((int)optInMaxPeriod < 2) || ((int)optInMaxPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(MA)(optInMaxPeriod,optInMAType); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ if( lookbackTotal > startIdx ) +/* Generated */ tempInt = lookbackTotal; +/* Generated */ else +/* Generated */ tempInt = startIdx; +/* Generated */ if( tempInt > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outputSize = endIdx - tempInt + 1; +/* Generated */ ARRAY_ALLOC(localOutputArray,outputSize); +/* Generated */ ARRAY_INT_ALLOC(localPeriodArray,outputSize); +/* Generated */ for( i=0; i < outputSize; i++ ) +/* Generated */ { +/* Generated */ tempInt = (int)(inPeriods[startIdx+i]); +/* Generated */ if( tempInt < optInMinPeriod ) +/* Generated */ tempInt = optInMinPeriod; +/* Generated */ else if( tempInt > optInMaxPeriod ) +/* Generated */ tempInt = optInMaxPeriod; +/* Generated */ localPeriodArray[i] = tempInt; +/* Generated */ } +/* Generated */ for( i=0; i < outputSize; i++ ) +/* Generated */ { +/* Generated */ curPeriod = localPeriodArray[i]; +/* Generated */ if( curPeriod != 0 ) +/* Generated */ { +/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, +/* Generated */ curPeriod, optInMAType, +/* Generated */ VALUE_HANDLE_OUT(localBegIdx),VALUE_HANDLE_OUT(localNbElement),localOutputArray ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ ARRAY_FREE(localOutputArray); +/* Generated */ ARRAY_INT_FREE(localPeriodArray); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ outReal[i] = localOutputArray[i]; +/* Generated */ for( j=i+1; j < outputSize; j++ ) +/* Generated */ { +/* Generated */ if( localPeriodArray[j] == curPeriod ) +/* Generated */ { +/* Generated */ localPeriodArray[j] = 0; +/* Generated */ outReal[j] = localOutputArray[j]; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ ARRAY_FREE(localOutputArray); +/* Generated */ ARRAY_INT_FREE(localPeriodArray); +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outputSize; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MAX.c b/src/ta-lib/src/ta_func/ta_MAX.c new file mode 100644 index 000000000..21c8811ed --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MAX.c @@ -0,0 +1,384 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JV Jesus Viver <324122@cienz.unizar.es> + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 101902 JV Speed optimization of the algorithm + * 102202 MF Speed optimize a bit further + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MaxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int maxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MAX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MAX - Highest value over a specified period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Max( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Max( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #undef max +/* Generated */ public RetCode max( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MAX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double highest, tmp; + int outIdx, nbInitialElementNeeded; + int trailingIdx, today, i, highestIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + highestIdx = -1; + highest = 0.0; + + while( today <= endIdx ) + { + tmp = inReal[today]; + + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inReal[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inReal[i]; + if( tmp > highest ) + { + highestIdx = i; + highest = tmp; + } + } + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + } + + outReal[outIdx++] = highest; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Max( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Max( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode max( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MAX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double highest, tmp; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, today, i, highestIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ highestIdx = -1; +/* Generated */ highest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inReal[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inReal[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inReal[i]; +/* Generated */ if( tmp > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ outReal[outIdx++] = highest; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MAXINDEX.c b/src/ta-lib/src/ta_func/ta_MAXINDEX.c new file mode 100644 index 000000000..9c264b290 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MAXINDEX.c @@ -0,0 +1,379 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120806 AC Creation (equal to MAX but outputs index) + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MaxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int maxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MAXINDEX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MAXINDEX - Index of highest value over a specified period + * + * Input = double + * Output = int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode maxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MAXINDEX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double highest, tmp; + int outIdx, nbInitialElementNeeded; + int trailingIdx, today, i, highestIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + highestIdx = -1; + highest = 0.0; + + while( today <= endIdx ) + { + tmp = inReal[today]; + + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inReal[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inReal[i]; + if( tmp > highest ) + { + highestIdx = i; + highest = tmp; + } + } + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + } + + outInteger[outIdx++] = highestIdx; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode maxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MAXINDEX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double highest, tmp; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, today, i, highestIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ highestIdx = -1; +/* Generated */ highest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inReal[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inReal[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inReal[i]; +/* Generated */ if( tmp > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ outInteger[outIdx++] = highestIdx; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MEDPRICE.c b/src/ta-lib/src/ta_func/ta_MEDPRICE.c new file mode 100644 index 000000000..94786204b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MEDPRICE.c @@ -0,0 +1,275 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 112605 MF Fix outBegIdx when startIdx != 0 + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MedPriceLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int medPriceLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MEDPRICE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* This function have no lookback needed. */ + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MEDPRICE - Median Price + * + * Input = High, Low + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode medPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MEDPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int outIdx, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* MEDPRICE = (High + Low ) / 2 + * This is the high and low of the same price bar. + * + * See MIDPRICE to use instead the highest high and lowest + * low over multiple price bar. + */ + + outIdx = 0; + + for( i=startIdx; i <= endIdx; i++ ) + { + outReal[outIdx++] = (inHigh[i]+inLow[i])/2.0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode medPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MEDPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ outIdx = 0; +/* Generated */ for( i=startIdx; i <= endIdx; i++ ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = (inHigh[i]+inLow[i])/2.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MFI.c b/src/ta-lib/src/ta_func/ta_MFI.c new file mode 100644 index 000000000..045dfa858 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MFI.c @@ -0,0 +1,586 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * BT BobTrader (TADoc.org forum user). + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 062704 MF Prevent divide by zero. + * 121705 MF Java port related changes. + * 060907 MF,BT Fix #1727704. MFI logic bug when no price movement + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MfiLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int mfiLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MFI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MFI,Mfi); +} + +#if defined( _MANAGED ) + ref class MoneyFlow + { + public: + double positive; + double negative; + }; +#elif defined( _JAVA ) + // See MoneyFlow.java for the definition. +#else + typedef struct + { + double positive; + double negative; + } MoneyFlow; +#endif + + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MFI - Money Flow Index + * + * Input = High, Low, Close, Volume + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ SubArray^ inVolume, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ cli::array^ inVolume, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mfi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ double inVolume[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MFI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ const double inVolume[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double posSumMF, negSumMF, prevValue; + double tempValue1, tempValue2; + int lookbackTotal, outIdx, i, today; + + CIRCBUF_PROLOG_CLASS( mflow, MoneyFlow, 50 ); /* Id, Type, Static Size */ + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + CIRCBUF_INIT_CLASS( mflow, MoneyFlow, optInTimePeriod ); + + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MFI,Mfi); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + CIRCBUF_DESTROY(mflow); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; /* Index into the output. */ + + /* Accumulate the positive and negative money flow + * among the initial period. + */ + today = startIdx-lookbackTotal; + prevValue = (inHigh[today]+inLow[today]+inClose[today])/3.0; + + posSumMF = 0.0; + negSumMF = 0.0; + today++; + for( i=optInTimePeriod; i > 0; i-- ) + { + tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + tempValue1 *= inVolume[today++]; + if( tempValue2 < 0 ) + { + CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; + negSumMF += tempValue1; + CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; + } + else if( tempValue2 > 0 ) + { + CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; + posSumMF += tempValue1; + CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; + } + else + { + CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; + CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; + } + + CIRCBUF_NEXT(mflow); + } + + /* The following two equations are equivalent: + * MFI = 100 - (100 / 1 + (posSumMF/negSumMF)) + * MFI = 100 * (posSumMF/(posSumMF+negSumMF)) + * The second equation is used here for speed optimization. + */ + if( today > startIdx ) + { + tempValue1 = posSumMF+negSumMF; + if( tempValue1 < 1.0 ) + outReal[outIdx++] = 0.0; + else + outReal[outIdx++] = 100.0*(posSumMF/tempValue1); + } + else + { + /* Skip the unstable period. Do the processing + * but do not write it in the output. + */ + while( today < startIdx ) + { + posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; + negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; + + tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + tempValue1 *= inVolume[today++]; + if( tempValue2 < 0 ) + { + CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; + negSumMF += tempValue1; + CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; + } + else if( tempValue2 > 0 ) + { + CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; + posSumMF += tempValue1; + CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; + } + else + { + CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; + CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; + } + + CIRCBUF_NEXT(mflow); + } + } + + /* Unstable period skipped... now continue + * processing if needed. + */ + while( today <= endIdx ) + { + posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; + negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; + + tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + tempValue1 *= inVolume[today++]; + if( tempValue2 < 0 ) + { + CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; + negSumMF += tempValue1; + CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; + } + else if( tempValue2 > 0 ) + { + CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; + posSumMF += tempValue1; + CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; + } + else + { + CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; + CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; + } + + tempValue1 = posSumMF+negSumMF; + if( tempValue1 < 1.0 ) + outReal[outIdx++] = 0.0; + else + outReal[outIdx++] = 100.0*(posSumMF/tempValue1); + + CIRCBUF_NEXT(mflow); + } + + CIRCBUF_DESTROY(mflow); + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ SubArray^ inVolume, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ cli::array^ inVolume, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mfi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ float inVolume[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MFI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ const float inVolume[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double posSumMF, negSumMF, prevValue; +/* Generated */ double tempValue1, tempValue2; +/* Generated */ int lookbackTotal, outIdx, i, today; +/* Generated */ CIRCBUF_PROLOG_CLASS( mflow, MoneyFlow, 50 ); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ CIRCBUF_INIT_CLASS( mflow, MoneyFlow, optInTimePeriod ); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MFI,Mfi); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ CIRCBUF_DESTROY(mflow); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx-lookbackTotal; +/* Generated */ prevValue = (inHigh[today]+inLow[today]+inClose[today])/3.0; +/* Generated */ posSumMF = 0.0; +/* Generated */ negSumMF = 0.0; +/* Generated */ today++; +/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) +/* Generated */ { +/* Generated */ tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ tempValue1 *= inVolume[today++]; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; +/* Generated */ negSumMF += tempValue1; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; +/* Generated */ } +/* Generated */ else if( tempValue2 > 0 ) +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; +/* Generated */ posSumMF += tempValue1; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; +/* Generated */ } +/* Generated */ CIRCBUF_NEXT(mflow); +/* Generated */ } +/* Generated */ if( today > startIdx ) +/* Generated */ { +/* Generated */ tempValue1 = posSumMF+negSumMF; +/* Generated */ if( tempValue1 < 1.0 ) +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 100.0*(posSumMF/tempValue1); +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ while( today < startIdx ) +/* Generated */ { +/* Generated */ posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; +/* Generated */ negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; +/* Generated */ tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ tempValue1 *= inVolume[today++]; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; +/* Generated */ negSumMF += tempValue1; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; +/* Generated */ } +/* Generated */ else if( tempValue2 > 0 ) +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; +/* Generated */ posSumMF += tempValue1; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; +/* Generated */ } +/* Generated */ CIRCBUF_NEXT(mflow); +/* Generated */ } +/* Generated */ } +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; +/* Generated */ negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; +/* Generated */ tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ tempValue1 *= inVolume[today++]; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; +/* Generated */ negSumMF += tempValue1; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; +/* Generated */ } +/* Generated */ else if( tempValue2 > 0 ) +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; +/* Generated */ posSumMF += tempValue1; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; +/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; +/* Generated */ } +/* Generated */ tempValue1 = posSumMF+negSumMF; +/* Generated */ if( tempValue1 < 1.0 ) +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 100.0*(posSumMF/tempValue1); +/* Generated */ CIRCBUF_NEXT(mflow); +/* Generated */ } +/* Generated */ CIRCBUF_DESTROY(mflow); +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MIDPOINT.c b/src/ta-lib/src/ta_func/ta_MIDPOINT.c new file mode 100644 index 000000000..8f7ef7e81 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MIDPOINT.c @@ -0,0 +1,356 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MidPointLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int midPointLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MIDPOINT_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MIDPOINT - MidPoint over period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode midPoint( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MIDPOINT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + double lowest, highest, tmp; + int outIdx, nbInitialElementNeeded; + int trailingIdx, today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Find the highest and lowest value of a timeserie + * over the period. + * MIDPOINT = (Highest Value + Lowest Value)/2 + * + * See MIDPRICE if the input is a price bar with a + * high and low timeserie. + */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + + while( today <= endIdx ) + { + lowest = inReal[trailingIdx++]; + highest = lowest; + for( i=trailingIdx; i <= today; i++ ) + { + tmp = inReal[i]; + if( tmp < lowest ) lowest= tmp; + else if( tmp > highest) highest = tmp; + } + + outReal[outIdx++] = (highest+lowest)/2.0; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode midPoint( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MIDPOINT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, highest, tmp; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ lowest = inReal[trailingIdx++]; +/* Generated */ highest = lowest; +/* Generated */ for( i=trailingIdx; i <= today; i++ ) +/* Generated */ { +/* Generated */ tmp = inReal[i]; +/* Generated */ if( tmp < lowest ) lowest= tmp; +/* Generated */ else if( tmp > highest) highest = tmp; +/* Generated */ } +/* Generated */ outReal[outIdx++] = (highest+lowest)/2.0; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MIDPRICE.c b/src/ta-lib/src/ta_func/ta_MIDPRICE.c new file mode 100644 index 000000000..0c25fba3b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MIDPRICE.c @@ -0,0 +1,369 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MidPriceLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int midPriceLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MIDPRICE_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MIDPRICE - Midpoint Price over period + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode midPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MIDPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double lowest, highest, tmp; + int outIdx, nbInitialElementNeeded; + int trailingIdx, today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* MIDPRICE = (Highest High + Lowest Low)/2 + * + * This function is equivalent to MEDPRICE when the + * period is 1. + */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + + while( today <= endIdx ) + { + lowest = inLow[trailingIdx]; + highest = inHigh[trailingIdx]; + trailingIdx++; + for( i=trailingIdx; i <= today; i++ ) + { + tmp = inLow[i]; + if( tmp < lowest ) lowest= tmp; + tmp = inHigh[i]; + if( tmp > highest) highest = tmp; + } + + outReal[outIdx++] = (highest+lowest)/2.0; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode midPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MIDPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, highest, tmp; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ lowest = inLow[trailingIdx]; +/* Generated */ highest = inHigh[trailingIdx]; +/* Generated */ trailingIdx++; +/* Generated */ for( i=trailingIdx; i <= today; i++ ) +/* Generated */ { +/* Generated */ tmp = inLow[i]; +/* Generated */ if( tmp < lowest ) lowest= tmp; +/* Generated */ tmp = inHigh[i]; +/* Generated */ if( tmp > highest) highest = tmp; +/* Generated */ } +/* Generated */ outReal[outIdx++] = (highest+lowest)/2.0; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MIN.c b/src/ta-lib/src/ta_func/ta_MIN.c new file mode 100644 index 000000000..cdf5c4404 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MIN.c @@ -0,0 +1,384 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JV Jesus Viver <324122@cienz.unizar.es> + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 101902 JV Speed optimization of the algorithm + * 102202 MF Speed optimize a bit further + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MinLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int minLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MIN_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MIN - Lowest value over a specified period + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Min( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Min( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #undef min +/* Generated */ public RetCode min( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MIN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double lowest, tmp; + int outIdx, nbInitialElementNeeded; + int trailingIdx, lowestIdx, today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + lowestIdx = -1; + lowest = 0.0; + + while( today <= endIdx ) + { + tmp = inReal[today]; + + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inReal[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inReal[i]; + if( tmp < lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + } + + outReal[outIdx++] = lowest; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Min( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Min( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode min( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MIN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, tmp; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, lowestIdx, today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ lowestIdx = -1; +/* Generated */ lowest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inReal[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inReal[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inReal[i]; +/* Generated */ if( tmp < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ outReal[outIdx++] = lowest; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MININDEX.c b/src/ta-lib/src/ta_func/ta_MININDEX.c new file mode 100644 index 000000000..5b5858bc2 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MININDEX.c @@ -0,0 +1,379 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120806 AC Creation (equal to MIN but outputs index) + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MinIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int minIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MININDEX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MININDEX - Index of lowest value over a specified period + * + * Input = double + * Output = int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MININDEX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double lowest, tmp; + int outIdx, nbInitialElementNeeded; + int trailingIdx, lowestIdx, today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + lowestIdx = -1; + lowest = 0.0; + + while( today <= endIdx ) + { + tmp = inReal[today]; + + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inReal[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inReal[i]; + if( tmp < lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + } + + outInteger[outIdx++] = lowestIdx; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outInteger ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outInteger ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MININDEX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outInteger[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, tmp; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, lowestIdx, today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outInteger ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ lowestIdx = -1; +/* Generated */ lowest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inReal[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inReal[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inReal[i]; +/* Generated */ if( tmp < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ outInteger[outIdx++] = lowestIdx; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MINMAX.c b/src/ta-lib/src/ta_func/ta_MINMAX.c new file mode 100644 index 000000000..15a5642ac --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MINMAX.c @@ -0,0 +1,441 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120906 AC Creation + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MinMaxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int minMaxLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MINMAX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MINMAX - Lowest and highest values over a specified period + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMin, +/* Generated */ SubArray^ outMax ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMin, +/* Generated */ cli::array^ outMax ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minMax( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMin[], +/* Generated */ double outMax[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MINMAX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMin[], +/* Generated */ double outMax[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double highest, lowest, tmpHigh, tmpLow; + int outIdx, nbInitialElementNeeded; + int trailingIdx, today, i, highestIdx, lowestIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMin ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMax ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + highestIdx = -1; + highest = 0.0; + lowestIdx = -1; + lowest = 0.0; + + while( today <= endIdx ) + { + tmpLow = tmpHigh = inReal[today]; + + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inReal[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmpHigh = inReal[i]; + if( tmpHigh > highest ) + { + highestIdx = i; + highest = tmpHigh; + } + } + } + else if( tmpHigh >= highest ) + { + highestIdx = today; + highest = tmpHigh; + } + + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inReal[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmpLow = inReal[i]; + if( tmpLow < lowest ) + { + lowestIdx = i; + lowest = tmpLow; + } + } + } + else if( tmpLow <= lowest ) + { + lowestIdx = today; + lowest = tmpLow; + } + + outMax[outIdx] = highest; + outMin[outIdx] = lowest; + outIdx++; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMin, +/* Generated */ SubArray^ outMax ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMin, +/* Generated */ cli::array^ outMax ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minMax( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outMin[], +/* Generated */ double outMax[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MINMAX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outMin[], +/* Generated */ double outMax[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double highest, lowest, tmpHigh, tmpLow; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, today, i, highestIdx, lowestIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMin ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMax ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ highestIdx = -1; +/* Generated */ highest = 0.0; +/* Generated */ lowestIdx = -1; +/* Generated */ lowest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmpLow = tmpHigh = inReal[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inReal[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmpHigh = inReal[i]; +/* Generated */ if( tmpHigh > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmpHigh; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmpHigh >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmpHigh; +/* Generated */ } +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inReal[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmpLow = inReal[i]; +/* Generated */ if( tmpLow < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmpLow; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmpLow <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmpLow; +/* Generated */ } +/* Generated */ outMax[outIdx] = highest; +/* Generated */ outMin[outIdx] = lowest; +/* Generated */ outIdx++; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MINMAXINDEX.c b/src/ta-lib/src/ta_func/ta_MINMAXINDEX.c new file mode 100644 index 000000000..878ab1a66 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MINMAXINDEX.c @@ -0,0 +1,441 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AC Angelo Ciceri + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120906 AC Creation (equal to MINMAX but outputs index) + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MinMaxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int minMaxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MINMAXINDEX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MINMAXINDEX - Indexes of lowest and highest values over a specified period + * + * Input = double + * Output = int, int + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMinIdx, +/* Generated */ SubArray^ outMaxIdx ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMinIdx, +/* Generated */ cli::array^ outMaxIdx ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minMaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outMinIdx[], +/* Generated */ int outMaxIdx[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MINMAXINDEX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outMinIdx[], +/* Generated */ int outMaxIdx[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double highest, lowest, tmpHigh, tmpLow; + int outIdx, nbInitialElementNeeded; + int trailingIdx, today, i, highestIdx, lowestIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMinIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outMaxIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + highestIdx = -1; + highest = 0.0; + lowestIdx = -1; + lowest = 0.0; + + while( today <= endIdx ) + { + tmpLow = tmpHigh = inReal[today]; + + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inReal[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmpHigh = inReal[i]; + if( tmpHigh > highest ) + { + highestIdx = i; + highest = tmpHigh; + } + } + } + else if( tmpHigh >= highest ) + { + highestIdx = today; + highest = tmpHigh; + } + + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inReal[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmpLow = inReal[i]; + if( tmpLow < lowest ) + { + lowestIdx = i; + lowest = tmpLow; + } + } + } + else if( tmpLow <= lowest ) + { + lowestIdx = today; + lowest = tmpLow; + } + + outMaxIdx[outIdx] = highestIdx; + outMinIdx[outIdx] = lowestIdx; + outIdx++; + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outMinIdx, +/* Generated */ SubArray^ outMaxIdx ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outMinIdx, +/* Generated */ cli::array^ outMaxIdx ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minMaxIndex( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ int outMinIdx[], +/* Generated */ int outMaxIdx[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MINMAXINDEX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ int outMinIdx[], +/* Generated */ int outMaxIdx[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double highest, lowest, tmpHigh, tmpLow; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, today, i, highestIdx, lowestIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outMinIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outMaxIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ highestIdx = -1; +/* Generated */ highest = 0.0; +/* Generated */ lowestIdx = -1; +/* Generated */ lowest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmpLow = tmpHigh = inReal[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inReal[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmpHigh = inReal[i]; +/* Generated */ if( tmpHigh > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmpHigh; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmpHigh >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmpHigh; +/* Generated */ } +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inReal[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmpLow = inReal[i]; +/* Generated */ if( tmpLow < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmpLow; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ else if( tmpLow <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmpLow; +/* Generated */ } +/* Generated */ outMaxIdx[outIdx] = highestIdx; +/* Generated */ outMinIdx[outIdx] = lowestIdx; +/* Generated */ outIdx++; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MINUS_DI.c b/src/ta-lib/src/ta_func/ta_MINUS_DI.c new file mode 100644 index 000000000..7ad9471a7 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MINUS_DI.c @@ -0,0 +1,716 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * MIF Mirek Fontan (mira@fontan.cz) + * CF Christo Fogelberg + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. + * 062704 MF Fix #965557. Div by zero bug reported by MIF. + * 122204 MF,CF Fix #1090231. Issues when period is 1. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MinusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int minusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MINUS_DI_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + if( optInTimePeriod > 1 ) + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI); + else + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MINUS_DI - Minus Directional Indicator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MINUS_DI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int today, lookbackTotal, outIdx; + double prevHigh, prevLow, prevClose; + double prevMinusDM, prevTR; + double tempReal, tempReal2, diffP, diffM; + + int i; + + #define TRUE_RANGE(TH,TL,YC,OUT) {\ + OUT = TH-TL; \ + tempReal2 = std_fabs(TH-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + tempReal2 = std_fabs(TL-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + } + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* + * The DM1 (one period) is base on the largest part of + * today's range that is outside of yesterdays range. + * + * The following 7 cases explain how the +DM and -DM are + * calculated on one period: + * + * Case 1: Case 2: + * C| A| + * | | C| + * | +DM1 = (C-A) B| | +DM1 = 0 + * | -DM1 = 0 | -DM1 = (B-D) + * A| | D| + * | D| + * B| + * + * Case 3: Case 4: + * C| C| + * | A| | + * | +DM1 = (C-A) | | +DM1 = 0 + * | -DM1 = 0 B| | -DM1 = (B-D) + * A| | | + * | | D| + * B| | + * D| + * + * Case 5: Case 6: + * A| A| C| + * | C| +DM1 = 0 | | +DM1 = 0 + * | | -DM1 = 0 | | -DM1 = 0 + * | D| | | + * B| B| D| + * + * + * Case 7: + * + * C| + * A| | + * | | +DM1=0 + * B| | -DM1=0 + * D| + * + * In case 3 and 4, the rule is that the smallest delta between + * (C-A) and (B-D) determine which of +DM or -DM is zero. + * + * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are + * zero. + * + * The rules remain the same when A=B and C=D (when the highs + * equal the lows). + * + * When calculating the DM over a period > 1, the one-period DM + * for the desired period are initialy sum. In other word, + * for a -DM14, sum the -DM1 for the first 14 days (that's + * 13 values because there is no DM for the first day!) + * Subsequent DM are calculated using the Wilder's + * smoothing approach: + * + * Previous -DM14 + * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 + * 14 + * + * Calculation of a -DI14 is as follow: + * + * -DM14 + * -DI14 = -------- + * TR14 + * + * Calculation of the TR14 is: + * + * Previous TR14 + * Today's TR14 = Previous TR14 - -------------- + Today's TR1 + * 14 + * + * The first TR14 is the summation of the first 14 TR1. See the + * TA_TRANGE function on how to calculate the true range. + * + * Reference: + * New Concepts In Technical Trading Systems, J. Welles Wilder Jr + */ + + /* Original implementation from Wilder's book was doing some integer + * rounding in its calculations. + * + * This was understandable in the context that at the time the book + * was written, most user were doing the calculation by hand. + * + * For a computer, rounding is unnecessary (and even problematic when inputs + * are close to 1). + * + * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, + * you can comment out the following #undef/#define and rebuild the library. + */ + #undef round_pos + #define round_pos(x) (x) + + if( optInTimePeriod > 1 ) + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI); + else + lookbackTotal = 1; + + /* Adjust startIdx to account for the lookback period. */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Indicate where the next output should be put + * in the outReal. + */ + outIdx = 0; + + /* Trap the case where no smoothing is needed. */ + if( optInTimePeriod <= 1 ) + { + /* No smoothing needed. Just do the following: + * for each price bar. + * -DM1 + * -DI1 = ---- + * TR1 + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + today = startIdx-1; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + prevClose = inClose[today]; + while( today < endIdx ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + if( TA_IS_ZERO(tempReal) ) + outReal[outIdx++] = (double)0.0; + else + outReal[outIdx++] = diffM/tempReal; + } + else + outReal[outIdx++] = (double)0.0; + prevClose = inClose[today]; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Process the initial DM and TR */ + VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; + + prevMinusDM = 0.0; + prevTR = 0.0; + today = startIdx - lookbackTotal; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + prevClose = inClose[today]; + i = optInTimePeriod-1; + while( i-- > 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR += tempReal; + prevClose = inClose[today]; + } + + /* Process subsequent DI */ + + /* Skip the unstable period. Note that this loop must be executed + * at least ONCE to calculate the first DI. + */ + i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI) + 1; + while( i-- != 0 ) + { + /* Calculate the prevMinusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; + } + else + { + /* Case 1,3,5 and 7 */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + } + + + /* Now start to write the output in + * the caller provided outReal. + */ + if( !TA_IS_ZERO(prevTR) ) + outReal[0] = round_pos(100.0*(prevMinusDM/prevTR)); + else + outReal[0] = 0.0; + outIdx = 1; + + while( today < endIdx ) + { + /* Calculate the prevMinusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; + } + else + { + /* Case 1,3,5 and 7 */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + + /* Calculate the DI. The value is rounded (see Wilder book). */ + if( !TA_IS_ZERO(prevTR) ) + outReal[outIdx++] = round_pos(100.0*(prevMinusDM/prevTR)); + else + outReal[outIdx++] = 0.0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MINUS_DI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, lookbackTotal, outIdx; +/* Generated */ double prevHigh, prevLow, prevClose; +/* Generated */ double prevMinusDM, prevTR; +/* Generated */ double tempReal, tempReal2, diffP, diffM; +/* Generated */ int i; +/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ +/* Generated */ OUT = TH-TL; \ +/* Generated */ tempReal2 = std_fabs(TH-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ tempReal2 = std_fabs(TL-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ } +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ #undef round_pos +/* Generated */ #define round_pos(x) (x) +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI); +/* Generated */ else +/* Generated */ lookbackTotal = 1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ if( optInTimePeriod <= 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ today = startIdx-1; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ prevClose = inClose[today]; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ if( TA_IS_ZERO(tempReal) ) +/* Generated */ outReal[outIdx++] = (double)0.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = diffM/tempReal; +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[outIdx++] = (double)0.0; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; +/* Generated */ prevMinusDM = 0.0; +/* Generated */ prevTR = 0.0; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ prevClose = inClose[today]; +/* Generated */ i = optInTimePeriod-1; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR += tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI) + 1; +/* Generated */ while( i-- != 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ outReal[0] = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ outIdx = 1; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ outReal[outIdx++] = round_pos(100.0*(prevMinusDM/prevTR)); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MINUS_DM.c b/src/ta-lib/src/ta_func/ta_MINUS_DM.c new file mode 100644 index 000000000..9f1246647 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MINUS_DM.c @@ -0,0 +1,591 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MinusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int minusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MINUS_DM_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + if( optInTimePeriod > 1 ) + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM) - 1; + else + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MINUS_DM - Minus Directional Movement + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MINUS_DM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int today, lookbackTotal, outIdx; + double prevHigh, prevLow, tempReal; + double prevMinusDM; + double diffP, diffM; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* + * The DM1 (one period) is base on the largest part of + * today's range that is outside of yesterdays range. + * + * The following 7 cases explain how the +DM and -DM are + * calculated on one period: + * + * Case 1: Case 2: + * C| A| + * | | C| + * | +DM1 = (C-A) B| | +DM1 = 0 + * | -DM1 = 0 | -DM1 = (B-D) + * A| | D| + * | D| + * B| + * + * Case 3: Case 4: + * C| C| + * | A| | + * | +DM1 = (C-A) | | +DM1 = 0 + * | -DM1 = 0 B| | -DM1 = (B-D) + * A| | | + * | | D| + * B| | + * D| + * + * Case 5: Case 6: + * A| A| C| + * | C| +DM1 = 0 | | +DM1 = 0 + * | | -DM1 = 0 | | -DM1 = 0 + * | D| | | + * B| B| D| + * + * + * Case 7: + * + * C| + * A| | + * | | +DM=0 + * B| | -DM=0 + * D| + * + * In case 3 and 4, the rule is that the smallest delta between + * (C-A) and (B-D) determine which of +DM or -DM is zero. + * + * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are + * zero. + * + * The rules remain the same when A=B and C=D (when the highs + * equal the lows). + * + * When calculating the DM over a period > 1, the one-period DM + * for the desired period are initialy sum. In other word, + * for a -DM14, sum the -DM1 for the first 14 days (that's + * 13 values because there is no DM for the first day!) + * Subsequent DM are calculated using the Wilder's + * smoothing approach: + * + * Previous -DM14 + * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 + * 14 + * + * Reference: + * New Concepts In Technical Trading Systems, J. Welles Wilder Jr + */ + + if( optInTimePeriod > 1 ) + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM) - 1; + else + lookbackTotal = 1; + + /* Adjust startIdx to account for the lookback period. */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Indicate where the next output should be put + * in the outReal. + */ + outIdx = 0; + + /* Trap the case where no smoothing is needed. */ + if( optInTimePeriod <= 1 ) + { + /* No smoothing needed. Just do a simple DM1 + * for each price bar. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + today = startIdx-1; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + while( today < endIdx ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + outReal[outIdx++] = diffM; + } + else + outReal[outIdx++] = 0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Process the initial DM */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + prevMinusDM = 0.0; + today = startIdx - lookbackTotal; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + i = optInTimePeriod-1; + while( i-- > 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM += diffM; + } + } + + /* Process subsequent DM */ + + /* Skip the unstable period. */ + i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM); + while( i-- != 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; + } + else + { + /* Case 1,3,5 and 7 */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); + } + } + + /* Now start to write the output in + * the caller provided outReal. + */ + outReal[0] = prevMinusDM; + outIdx = 1; + + while( today < endIdx ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + if( (diffM > 0) && (diffP < diffM) ) + { + /* Case 2 and 4: +DM=0,-DM=diffM */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; + } + else + { + /* Case 1,3,5 and 7 */ + prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); + } + + outReal[outIdx++] = prevMinusDM; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode minusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MINUS_DM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, lookbackTotal, outIdx; +/* Generated */ double prevHigh, prevLow, tempReal; +/* Generated */ double prevMinusDM; +/* Generated */ double diffP, diffM; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM) - 1; +/* Generated */ else +/* Generated */ lookbackTotal = 1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ if( optInTimePeriod <= 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ today = startIdx-1; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = diffM; +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ prevMinusDM = 0.0; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ i = optInTimePeriod-1; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM += diffM; +/* Generated */ } +/* Generated */ } +/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM); +/* Generated */ while( i-- != 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ } +/* Generated */ outReal[0] = prevMinusDM; +/* Generated */ outIdx = 1; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffM > 0) && (diffP < diffM) ) +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ outReal[outIdx++] = prevMinusDM; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MOM.c b/src/ta-lib/src/ta_func/ta_MOM.c new file mode 100644 index 000000000..be18da98c --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MOM.c @@ -0,0 +1,346 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MomLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int momLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MOM_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return optInTimePeriod; + +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MOM - Momentum + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MOM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + + int inIdx, outIdx, trailingIdx; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* The interpretation of the rate of change varies widely depending + * which software and/or books you are refering to. + * + * The following is the table of Rate-Of-Change implemented in TA-LIB: + * MOM = (price - prevPrice) [Momentum] + * ROC = ((price/prevPrice)-1)*100 [Rate of change] + * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] + * ROCR = (price/prevPrice) [Rate of change ratio] + * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] + * + * Here are the equivalent function in other software: + * TA-Lib | Tradestation | Metastock + * ================================================= + * MOM | Momentum | ROC (Point) + * ROC | ROC | ROC (Percent) + * ROCP | PercentChange | - + * ROCR | - | - + * ROCR100 | - | MO + * + * The MOM function is the only one who is not normalized, and thus + * should be avoided for comparing different time serie of prices. + * + * ROC and ROCP are centered at zero and can have positive and negative + * value. Here are some equivalence: + * ROC = ROCP/100 + * = ((price-prevPrice)/prevPrice)/100 + * = ((price/prevPrice)-1)*100 + * + * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are + * always positive values. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate Momentum: + * Just substract the value from 'period' ago from + * current value. + */ + outIdx = 0; + inIdx = startIdx; + trailingIdx = startIdx - optInTimePeriod; + + while( inIdx <= endIdx ) + outReal[outIdx++] = inReal[inIdx++] - inReal[trailingIdx++]; + + /* Set output limits. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mom( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MOM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int inIdx, outIdx, trailingIdx; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ inIdx = startIdx; +/* Generated */ trailingIdx = startIdx - optInTimePeriod; +/* Generated */ while( inIdx <= endIdx ) +/* Generated */ outReal[outIdx++] = inReal[inIdx++] - inReal[trailingIdx++]; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_MULT.c b/src/ta-lib/src/ta_func/ta_MULT.c new file mode 100644 index 000000000..2faf298a9 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_MULT.c @@ -0,0 +1,260 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::MultLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int multLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_MULT_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_MULT - Vector Arithmetic Mult + * + * Input = double, double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mult( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal0[], +/* Generated */ double inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_MULT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal0[], +/* Generated */ const double inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = inReal0[i]*inReal1[i]; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode mult( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal0[], +/* Generated */ float inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_MULT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal0[], +/* Generated */ const float inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = inReal0[i]*inReal1[i]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_NATR.c b/src/ta-lib/src/ta_func/ta_NATR.c new file mode 100644 index 000000000..603fcce08 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_NATR.c @@ -0,0 +1,499 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 060306 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::NatrLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int natrLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_NATR_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* The ATR lookback is the sum of: + * 1 + (optInTimePeriod - 1) + * + * Where 1 is for the True Range, and + * (optInTimePeriod-1) is for the simple + * moving average. + */ + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_NATR,Natr); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_NATR - Normalized Average True Range + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode natr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_NATR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ENUM_DECLARATION(RetCode) retCode; + int outIdx, today, lookbackTotal; + int nbATR; + VALUE_HANDLE_INT(outBegIdx1); + VALUE_HANDLE_INT(outNbElement1); + + double prevATR, tempValue; + ARRAY_REF( tempBuffer ); + ARRAY_LOCAL(prevATRTemp,1); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* This function is very similar as ATR, except + * it is being normalized as follow: + * + * NATR = (ATR(period) / Close) * 100 + * + * + * Normalization make the ATR function more relevant + * in the folllowing scenario: + * - Long term analysis where the price changes drastically. + * - Cross-market or cross-security ATR comparison. + * + * More Info: + * Technical Analysis of Stock & Commodities (TASC) + * May 2006 by John Forman + */ + + /* Average True Range is the greatest of the following: + * + * val1 = distance from today's high to today's low. + * val2 = distance from yesterday's close to today's high. + * val3 = distance from yesterday's close to today's low. + * + * These value are averaged for the specified period using + * Wilder method. This method have an unstable period comparable + * to an Exponential Moving Average (EMA). + */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(NATR)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + /* Trap the case where no smoothing is needed. */ + if( optInTimePeriod <= 1 ) + { + /* No smoothing needed. Just do a TRANGE. */ + return FUNCTION_CALL(TRANGE)( startIdx, endIdx, + inHigh, inLow, inClose, + outBegIdx, outNBElement, outReal ); + } + + /* Allocate an intermediate buffer for TRANGE. */ + ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); + + /* Do TRANGE in the intermediate buffer. */ + retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, + inHigh, inLow, inClose, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), + tempBuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + ARRAY_FREE( tempBuffer ); + return retCode; + } + + /* First value of the ATR is a simple Average of + * the TRANGE output for the specified period. + */ + retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, + optInTimePeriod-1, + tempBuffer, optInTimePeriod, + VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), + prevATRTemp ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + ARRAY_FREE( tempBuffer ); + return retCode; + } + prevATR = prevATRTemp[0]; + + /* Subsequent value are smoothed using the + * previous ATR value (Wilder's approach). + * 1) Multiply the previous ATR by 'period-1'. + * 2) Add today TR value. + * 3) Divide by 'period'. + */ + today = optInTimePeriod; + outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_NATR,Natr); + /* Skip the unstable period. */ + while( outIdx != 0 ) + { + prevATR *= optInTimePeriod - 1; + prevATR += tempBuffer[today++]; + prevATR /= optInTimePeriod; + outIdx--; + } + + /* Now start to write the final ATR in the caller + * provided outReal. + */ + outIdx = 1; + tempValue = inClose[today]; + if( !TA_IS_ZERO(tempValue) ) + outReal[0] = (prevATR/tempValue)*100.0; + else + outReal[0] = 0.0; + + /* Now do the number of requested ATR. */ + nbATR = (endIdx - startIdx)+1; + + while( --nbATR != 0 ) + { + prevATR *= optInTimePeriod - 1; + prevATR += tempBuffer[today++]; + prevATR /= optInTimePeriod; + tempValue = inClose[today]; + if( !TA_IS_ZERO(tempValue) ) + outReal[outIdx] = (prevATR/tempValue)*100.0; + else + outReal[0] = 0.0; + outIdx++; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + ARRAY_FREE( tempBuffer ); + + return retCode; +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode natr( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_NATR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int outIdx, today, lookbackTotal; +/* Generated */ int nbATR; +/* Generated */ VALUE_HANDLE_INT(outBegIdx1); +/* Generated */ VALUE_HANDLE_INT(outNbElement1); +/* Generated */ double prevATR, tempValue; +/* Generated */ ARRAY_REF( tempBuffer ); +/* Generated */ ARRAY_LOCAL(prevATRTemp,1); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackTotal = LOOKBACK_CALL(NATR)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ if( optInTimePeriod <= 1 ) +/* Generated */ { +/* Generated */ return FUNCTION_CALL(TRANGE)( startIdx, endIdx, +/* Generated */ inHigh, inLow, inClose, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ } +/* Generated */ ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); +/* Generated */ retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, +/* Generated */ inHigh, inLow, inClose, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ tempBuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, +/* Generated */ optInTimePeriod-1, +/* Generated */ tempBuffer, optInTimePeriod, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ prevATRTemp ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ prevATR = prevATRTemp[0]; +/* Generated */ today = optInTimePeriod; +/* Generated */ outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_NATR,Natr); +/* Generated */ while( outIdx != 0 ) +/* Generated */ { +/* Generated */ prevATR *= optInTimePeriod - 1; +/* Generated */ prevATR += tempBuffer[today++]; +/* Generated */ prevATR /= optInTimePeriod; +/* Generated */ outIdx--; +/* Generated */ } +/* Generated */ outIdx = 1; +/* Generated */ tempValue = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(tempValue) ) +/* Generated */ outReal[0] = (prevATR/tempValue)*100.0; +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ nbATR = (endIdx - startIdx)+1; +/* Generated */ while( --nbATR != 0 ) +/* Generated */ { +/* Generated */ prevATR *= optInTimePeriod - 1; +/* Generated */ prevATR += tempBuffer[today++]; +/* Generated */ prevATR /= optInTimePeriod; +/* Generated */ tempValue = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(tempValue) ) +/* Generated */ outReal[outIdx] = (prevATR/tempValue)*100.0; +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ outIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_OBV.c b/src/ta-lib/src/ta_func/ta_OBV.c new file mode 100644 index 000000000..e62c56a3a --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_OBV.c @@ -0,0 +1,291 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 110206 AC Change volume and open interest to double + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::ObvLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int obvLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_OBV_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* This function have no lookback needed. */ + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_OBV - On Balance Volume + * + * Input = double, Volume + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ SubArray^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ cli::array^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode obv( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ double inVolume[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_OBV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ const double inVolume[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int i; + int outIdx; + double prevReal, tempReal, prevOBV; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + prevOBV = inVolume[startIdx]; + prevReal = inReal[startIdx]; + outIdx = 0; + + for(i=startIdx; i <= endIdx; i++ ) + { + tempReal = inReal[i]; + if( tempReal > prevReal ) + prevOBV += inVolume[i]; + else if( tempReal < prevReal ) + prevOBV -= inVolume[i]; + + outReal[outIdx++] = prevOBV; + prevReal = tempReal; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ SubArray^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ cli::array^ inVolume, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode obv( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ float inVolume[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_OBV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ const float inVolume[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i; +/* Generated */ int outIdx; +/* Generated */ double prevReal, tempReal, prevOBV; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if(!inVolume) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ prevOBV = inVolume[startIdx]; +/* Generated */ prevReal = inReal[startIdx]; +/* Generated */ outIdx = 0; +/* Generated */ for(i=startIdx; i <= endIdx; i++ ) +/* Generated */ { +/* Generated */ tempReal = inReal[i]; +/* Generated */ if( tempReal > prevReal ) +/* Generated */ prevOBV += inVolume[i]; +/* Generated */ else if( tempReal < prevReal ) +/* Generated */ prevOBV -= inVolume[i]; +/* Generated */ outReal[outIdx++] = prevOBV; +/* Generated */ prevReal = tempReal; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_PLUS_DI.c b/src/ta-lib/src/ta_func/ta_PLUS_DI.c new file mode 100644 index 000000000..bd5a21025 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_PLUS_DI.c @@ -0,0 +1,716 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AM Adrian Michel + * MIF Mirek Fontan (mira@fontan.cz) + * CF Christo Fogelberg + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. + * 062704 MF Fix #965557. Div by zero bug reported by MIF. + * 122204 MF,CF Fix #1090231. Issues when period is 1. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::PlusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int plusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_PLUS_DI_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + if( optInTimePeriod > 1 ) + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI); + else + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_PLUS_DI - Plus Directional Indicator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode plusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_PLUS_DI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int today, lookbackTotal, outIdx; + double prevHigh, prevLow, prevClose; + double prevPlusDM, prevTR; + double tempReal, tempReal2, diffP, diffM; + + int i; + + #define TRUE_RANGE(TH,TL,YC,OUT) {\ + OUT = TH-TL; \ + tempReal2 = std_fabs(TH-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + tempReal2 = std_fabs(TL-YC); \ + if( tempReal2 > OUT ) \ + OUT = tempReal2; \ + } + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + /* + * The DM1 (one period) is base on the largest part of + * today's range that is outside of yesterdays range. + * + * The following 7 cases explain how the +DM and -DM are + * calculated on one period: + * + * Case 1: Case 2: + * C| A| + * | | C| + * | +DM1 = (C-A) B| | +DM1 = 0 + * | -DM1 = 0 | -DM1 = (B-D) + * A| | D| + * | D| + * B| + * + * Case 3: Case 4: + * C| C| + * | A| | + * | +DM1 = (C-A) | | +DM1 = 0 + * | -DM1 = 0 B| | -DM1 = (B-D) + * A| | | + * | | D| + * B| | + * D| + * + * Case 5: Case 6: + * A| A| C| + * | C| +DM1 = 0 | | +DM1 = 0 + * | | -DM1 = 0 | | -DM1 = 0 + * | D| | | + * B| B| D| + * + * + * Case 7: + * + * C| + * A| | + * | | +DM1=0 + * B| | -DM1=0 + * D| + * + * In case 3 and 4, the rule is that the smallest delta between + * (C-A) and (B-D) determine which of +DM or -DM is zero. + * + * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are + * zero. + * + * The rules remain the same when A=B and C=D (when the highs + * equal the lows). + * + * When calculating the DM over a period > 1, the one-period DM + * for the desired period are initialy sum. In other word, + * for a -DM14, sum the -DM1 for the first 14 days (that's + * 13 values because there is no DM for the first day!) + * Subsequent DM are calculated using the Wilder's + * smoothing approach: + * + * Previous +DM14 + * Today's +DM14 = Previous +DM14 - -------------- + Today's +DM1 + * 14 + * + * Calculation of a +DI14 is as follow: + * + * +DM14 + * +DI14 = -------- + * TR14 + * + * Calculation of the TR14 is: + * + * Previous TR14 + * Today's TR14 = Previous TR14 - -------------- + Today's TR1 + * 14 + * + * The first TR14 is the summation of the first 14 TR1. See the + * TA_TRANGE function on how to calculate the true range. + * + * Reference: + * New Concepts In Technical Trading Systems, J. Welles Wilder Jr + */ + + /* Original implementation from Wilder's book was doing some integer + * rounding in its calculations. + * + * This was understandable in the context that at the time the book + * was written, most user were doing the calculation by hand. + * + * For a computer, rounding is unnecessary (and even problematic when inputs + * are close to 1). + * + * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, + * you can comment out the following #undef/#define and rebuild the library. + */ + #undef round_pos + #define round_pos(x) (x) + + if( optInTimePeriod > 1 ) + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI); + else + lookbackTotal = 1; + + /* Adjust startIdx to account for the lookback period. */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Indicate where the next output should be put + * in the outReal. + */ + outIdx = 0; + + /* Trap the case where no smoothing is needed. */ + if( optInTimePeriod <= 1 ) + { + /* No smoothing needed. Just do the following: + * for each price bar. + * +DM1 + * +DI1 = ---- + * TR1 + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + today = startIdx-1; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + prevClose = inClose[today]; + while( today < endIdx ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + if( TA_IS_ZERO(tempReal) ) + outReal[outIdx++] = (double)0.0; + else + outReal[outIdx++] = diffP/tempReal; + } + else + outReal[outIdx++] = (double)0.0; + prevClose = inClose[today]; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Process the initial DM and TR */ + VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; + + prevPlusDM = 0.0; + prevTR = 0.0; + today = startIdx - lookbackTotal; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + prevClose = inClose[today]; + i = optInTimePeriod-1; + while( i-- > 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR += tempReal; + prevClose = inClose[today]; + } + + /* Process subsequent DI */ + + /* Skip the unstable period. Note that this loop must be executed + * at least ONCE to calculate the first DI. + */ + i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI) + 1; + while( i-- != 0 ) + { + /* Calculate the prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; + } + else + { + /* Case 2,4,5 and 7 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + } + + /* Now start to write the output in + * the caller provided outReal. + */ + + if( !TA_IS_ZERO(prevTR) ) + outReal[0] = round_pos(100.0*(prevPlusDM/prevTR)); + else + outReal[0] = 0.0; + outIdx = 1; + + while( today < endIdx ) + { + /* Calculate the prevPlusDM */ + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; + } + else + { + /* Case 2,4,5 and 7 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); + } + + /* Calculate the prevTR */ + TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); + prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; + prevClose = inClose[today]; + + /* Calculate the DI. The value is rounded (see Wilder book). */ + if( !TA_IS_ZERO(prevTR) ) + outReal[outIdx++] = round_pos(100.0*(prevPlusDM/prevTR)); + else + outReal[outIdx++] = 0.0; + + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode plusDI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_PLUS_DI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, lookbackTotal, outIdx; +/* Generated */ double prevHigh, prevLow, prevClose; +/* Generated */ double prevPlusDM, prevTR; +/* Generated */ double tempReal, tempReal2, diffP, diffM; +/* Generated */ int i; +/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ +/* Generated */ OUT = TH-TL; \ +/* Generated */ tempReal2 = std_fabs(TH-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ tempReal2 = std_fabs(TL-YC); \ +/* Generated */ if( tempReal2 > OUT ) \ +/* Generated */ OUT = tempReal2; \ +/* Generated */ } +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ #undef round_pos +/* Generated */ #define round_pos(x) (x) +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI); +/* Generated */ else +/* Generated */ lookbackTotal = 1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ if( optInTimePeriod <= 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ today = startIdx-1; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ prevClose = inClose[today]; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ if( TA_IS_ZERO(tempReal) ) +/* Generated */ outReal[outIdx++] = (double)0.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = diffP/tempReal; +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[outIdx++] = (double)0.0; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; +/* Generated */ prevPlusDM = 0.0; +/* Generated */ prevTR = 0.0; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ prevClose = inClose[today]; +/* Generated */ i = optInTimePeriod-1; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR += tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI) + 1; +/* Generated */ while( i-- != 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ } +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ outReal[0] = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ else +/* Generated */ outReal[0] = 0.0; +/* Generated */ outIdx = 1; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); +/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; +/* Generated */ prevClose = inClose[today]; +/* Generated */ if( !TA_IS_ZERO(prevTR) ) +/* Generated */ outReal[outIdx++] = round_pos(100.0*(prevPlusDM/prevTR)); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_PLUS_DM.c b/src/ta-lib/src/ta_func/ta_PLUS_DM.c new file mode 100644 index 000000000..829e3aa70 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_PLUS_DM.c @@ -0,0 +1,592 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * CF Christo Fogelberg + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 122104 MF,CF Fix#1089506 for when optInTimePeriod is 1. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::PlusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int plusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_PLUS_DM_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + if( optInTimePeriod > 1 ) + return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM) - 1; + else + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_PLUS_DM - Plus Directional Movement + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode plusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_PLUS_DM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int today, lookbackTotal, outIdx; + double prevHigh, prevLow, tempReal; + double prevPlusDM; + double diffP, diffM; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* + * The DM1 (one period) is base on the largest part of + * today's range that is outside of yesterdays range. + * + * The following 7 cases explain how the +DM and -DM are + * calculated on one period: + * + * Case 1: Case 2: + * C| A| + * | | C| + * | +DM1 = (C-A) B| | +DM1 = 0 + * | -DM1 = 0 | -DM1 = (B-D) + * A| | D| + * | D| + * B| + * + * Case 3: Case 4: + * C| C| + * | A| | + * | +DM1 = (C-A) | | +DM1 = 0 + * | -DM1 = 0 B| | -DM1 = (B-D) + * A| | | + * | | D| + * B| | + * D| + * + * Case 5: Case 6: + * A| A| C| + * | C| +DM1 = 0 | | +DM1 = 0 + * | | -DM1 = 0 | | -DM1 = 0 + * | D| | | + * B| B| D| + * + * + * Case 7: + * + * C| + * A| | + * | | +DM=0 + * B| | -DM=0 + * D| + * + * In case 3 and 4, the rule is that the smallest delta between + * (C-A) and (B-D) determine which of +DM or -DM is zero. + * + * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are + * zero. + * + * The rules remain the same when A=B and C=D (when the highs + * equal the lows). + * + * When calculating the DM over a period > 1, the one-period DM + * for the desired period are initialy sum. In other word, + * for a +DM14, sum the +DM1 for the first 14 days (that's + * 13 values because there is no DM for the first day!) + * Subsequent DM are calculated using the Wilder's + * smoothing approach: + * + * Previous +DM14 + * Today's +DM14 = Previous +DM14 - -------------- + Today's +DM1 + * 14 + * + * Reference: + * New Concepts In Technical Trading Systems, J. Welles Wilder Jr + */ + + if( optInTimePeriod > 1 ) + lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM) - 1; + else + lookbackTotal = 1; + + /* Adjust startIdx to account for the lookback period. */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Indicate where the next output should be put + * in the outReal. + */ + outIdx = 0; + + /* Trap the case where no smoothing is needed. */ + if( optInTimePeriod <= 1 ) + { + /* No smoothing needed. Just do a simple DM1 + * for each price bar. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + today = startIdx-1; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + while( today < endIdx ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + outReal[outIdx++] = diffP; + } + else + outReal[outIdx++] = 0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Process the initial DM */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + prevPlusDM = 0.0; + today = startIdx - lookbackTotal; + prevHigh = inHigh[today]; + prevLow = inLow[today]; + i = optInTimePeriod-1; + while( i-- > 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM += diffP; + } + } + + /* Process subsequent DM */ + + /* Skip the unstable period. */ + i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM); + while( i-- != 0 ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; + } + else + { + /* Case 2,4,5 and 7 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); + } + } + + /* Now start to write the output in + * the caller provided outReal. + */ + outReal[0] = prevPlusDM; + outIdx = 1; + + while( today < endIdx ) + { + today++; + tempReal = inHigh[today]; + diffP = tempReal-prevHigh; /* Plus Delta */ + prevHigh = tempReal; + tempReal = inLow[today]; + diffM = prevLow-tempReal; /* Minus Delta */ + prevLow = tempReal; + + if( (diffP > 0) && (diffP > diffM) ) + { + /* Case 1 and 3: +DM=diffP,-DM=0 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; + } + else + { + /* Case 2,4,5 and 7 */ + prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); + } + + outReal[outIdx++] = prevPlusDM; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode plusDM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_PLUS_DM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, lookbackTotal, outIdx; +/* Generated */ double prevHigh, prevLow, tempReal; +/* Generated */ double prevPlusDM; +/* Generated */ double diffP, diffM; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM) - 1; +/* Generated */ else +/* Generated */ lookbackTotal = 1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ if( optInTimePeriod <= 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ today = startIdx-1; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = diffP; +/* Generated */ } +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ prevPlusDM = 0.0; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ prevHigh = inHigh[today]; +/* Generated */ prevLow = inLow[today]; +/* Generated */ i = optInTimePeriod-1; +/* Generated */ while( i-- > 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM += diffP; +/* Generated */ } +/* Generated */ } +/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM); +/* Generated */ while( i-- != 0 ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ } +/* Generated */ outReal[0] = prevPlusDM; +/* Generated */ outIdx = 1; +/* Generated */ while( today < endIdx ) +/* Generated */ { +/* Generated */ today++; +/* Generated */ tempReal = inHigh[today]; +/* Generated */ diffP = tempReal-prevHigh; +/* Generated */ prevHigh = tempReal; +/* Generated */ tempReal = inLow[today]; +/* Generated */ diffM = prevLow-tempReal; +/* Generated */ prevLow = tempReal; +/* Generated */ if( (diffP > 0) && (diffP > diffM) ) +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); +/* Generated */ } +/* Generated */ outReal[outIdx++] = prevPlusDM; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_PPO.c b/src/ta-lib/src/ta_func/ta_PPO.c new file mode 100644 index 000000000..55059d66b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_PPO.c @@ -0,0 +1,367 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AA Andrew Atkinson + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 020605 AA Fix #1117666 Lookback bug. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::PpoLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int ppoLookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_PPO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Lookback is driven by the slowest MA. */ + return LOOKBACK_CALL(MA)( max(optInSlowPeriod,optInFastPeriod), optInMAType ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_PPO - Percentage Price Oscillator + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInFastPeriod:(From 2 to 100000) + * Number of period for the fast MA + * + * optInSlowPeriod:(From 2 to 100000) + * Number of period for the slow MA + * + * optInMAType: + * Type of Moving Average + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ppo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_PPO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_REF(tempBuffer); + ENUM_DECLARATION(RetCode) retCode; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastPeriod. */ +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowPeriod. */ +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Allocate an intermediate buffer. */ + ARRAY_ALLOC( tempBuffer, endIdx-startIdx+1 ); + #if !defined( _JAVA ) + if( !tempBuffer ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + + retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, inReal, + optInFastPeriod, + optInSlowPeriod, + optInMAType, + outBegIdx, + outNBElement, + outReal, + tempBuffer, + 1 /* Do percentage processing. */ ); + + ARRAY_FREE( tempBuffer ); + + return retCode; +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ppo( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ MAType optInMAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_PPO( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ +/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ +/* Generated */ TA_MAType optInMAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(tempBuffer); +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastPeriod = 12; +/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowPeriod = 26; +/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInMAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-startIdx+1 ); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !tempBuffer ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, inReal, +/* Generated */ optInFastPeriod, +/* Generated */ optInSlowPeriod, +/* Generated */ optInMAType, +/* Generated */ outBegIdx, +/* Generated */ outNBElement, +/* Generated */ outReal, +/* Generated */ tempBuffer, +/* Generated */ 1 ); +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ROC.c b/src/ta-lib/src/ta_func/ta_ROC.c new file mode 100644 index 000000000..ae9d0b836 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ROC.c @@ -0,0 +1,357 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::RocLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int rocLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ROC_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ROC - Rate of change : ((price/prevPrice)-1)*100 + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode roc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ROC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int inIdx, outIdx, trailingIdx; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* The interpretation of the rate of change varies widely depending + * which software and/or books you are refering to. + * + * The following is the table of Rate-Of-Change implemented in TA-LIB: + * MOM = (price - prevPrice) [Momentum] + * ROC = ((price/prevPrice)-1)*100 [Rate of change] + * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] + * ROCR = (price/prevPrice) [Rate of change ratio] + * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] + * + * Here are the equivalent function in other software: + * TA-Lib | Tradestation | Metastock + * ================================================= + * MOM | Momentum | ROC (Point) + * ROC | ROC | ROC (Percent) + * ROCP | PercentChange | - + * ROCR | - | - + * ROCR100 | - | MO + * + * The MOM function is the only one who is not normalized, and thus + * should be avoided for comparing different time serie of prices. + * + * ROC and ROCP are centered at zero and can have positive and negative + * value. Here are some equivalence: + * ROC = ROCP/100 + * = ((price-prevPrice)/prevPrice)/100 + * = ((price/prevPrice)-1)*100 + * + * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are + * always positive values. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate Rate of change: ((price / prevPrice)-1)*100 */ + outIdx = 0; + inIdx = startIdx; + trailingIdx = startIdx - optInTimePeriod; + + while( inIdx <= endIdx ) + { + tempReal = inReal[trailingIdx++]; + if( tempReal != 0.0 ) + outReal[outIdx++] = ((inReal[inIdx] / tempReal)-1.0)*100.0; + else + outReal[outIdx++] = 0.0; + inIdx++; + } + + /* Set output limits. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode roc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ROC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int inIdx, outIdx, trailingIdx; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ inIdx = startIdx; +/* Generated */ trailingIdx = startIdx - optInTimePeriod; +/* Generated */ while( inIdx <= endIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ if( tempReal != 0.0 ) +/* Generated */ outReal[outIdx++] = ((inReal[inIdx] / tempReal)-1.0)*100.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ inIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ROCP.c b/src/ta-lib/src/ta_func/ta_ROCP.c new file mode 100644 index 000000000..8440974e8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ROCP.c @@ -0,0 +1,358 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::RocPLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int rocPLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ROCP_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rocP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ROCP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int inIdx, outIdx, trailingIdx; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* The interpretation of the rate of change varies widely depending + * which software and/or books you are refering to. + * + * The following is the table of Rate-Of-Change implemented in TA-LIB: + * MOM = (price - prevPrice) [Momentum] + * ROC = ((price/prevPrice)-1)*100 [Rate of change] + * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] + * ROCR = (price/prevPrice) [Rate of change ratio] + * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] + * + * Here are the equivalent function in other software: + * TA-Lib | Tradestation | Metastock + * ================================================= + * MOM | Momentum | ROC (Point) + * ROC | ROC | ROC (Percent) + * ROCP | PercentChange | - + * ROCR | - | - + * ROCR100 | - | MO + * + * The MOM function is the only one who is not normalized, and thus + * should be avoided for comparing different time serie of prices. + * + * ROC and ROCP are centered at zero and can have positive and negative + * value. Here are some equivalence: + * ROC = ROCP/100 + * = ((price-prevPrice)/prevPrice)/100 + * = ((price/prevPrice)-1)*100 + * + * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are + * always positive values. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate Rate of change Ratio: (price / prevPrice) */ + outIdx = 0; + inIdx = startIdx; + trailingIdx = startIdx - optInTimePeriod; + + while( inIdx <= endIdx ) + { + tempReal = inReal[trailingIdx++]; + if( tempReal != 0.0 ) + outReal[outIdx++] = (inReal[inIdx]-tempReal)/tempReal; + else + outReal[outIdx++] = 0.0; + + inIdx++; + } + + /* Set output limits. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rocP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ROCP( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int inIdx, outIdx, trailingIdx; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ inIdx = startIdx; +/* Generated */ trailingIdx = startIdx - optInTimePeriod; +/* Generated */ while( inIdx <= endIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ if( tempReal != 0.0 ) +/* Generated */ outReal[outIdx++] = (inReal[inIdx]-tempReal)/tempReal; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ inIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ROCR.c b/src/ta-lib/src/ta_func/ta_ROCR.c new file mode 100644 index 000000000..46793bb04 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ROCR.c @@ -0,0 +1,359 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::RocRLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int rocRLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ROCR_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ROCR - Rate of change ratio: (price/prevPrice) + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rocR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ROCR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + + int inIdx, outIdx, trailingIdx; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* The interpretation of the rate of change varies widely depending + * which software and/or books you are refering to. + * + * The following is the table of Rate-Of-Change implemented in TA-LIB: + * MOM = (price - prevPrice) [Momentum] + * ROC = ((price/prevPrice)-1)*100 [Rate of change] + * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] + * ROCR = (price/prevPrice) [Rate of change ratio] + * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] + * + * Here are the equivalent function in other software: + * TA-Lib | Tradestation | Metastock + * ================================================= + * MOM | Momentum | ROC (Point) + * ROC | ROC | ROC (Percent) + * ROCP | PercentChange | - + * ROCR | - | - + * ROCR100 | - | MO + * + * The MOM function is the only one who is not normalized, and thus + * should be avoided for comparing different time serie of prices. + * + * ROC and ROCP are centered at zero and can have positive and negative + * value. Here are some equivalence: + * ROC = ROCP/100 + * = ((price-prevPrice)/prevPrice)/100 + * = ((price/prevPrice)-1)*100 + * + * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are + * always positive values. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate Rate of change Ratio: (price / prevPrice) */ + outIdx = 0; + inIdx = startIdx; + trailingIdx = startIdx - optInTimePeriod; + + while( inIdx <= endIdx ) + { + tempReal = inReal[trailingIdx++]; + if( tempReal != 0.0 ) + outReal[outIdx++] = (inReal[inIdx] / tempReal); + else + outReal[outIdx++] = 0.0; + + inIdx++; + } + + /* Set output limits. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rocR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ROCR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int inIdx, outIdx, trailingIdx; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ inIdx = startIdx; +/* Generated */ trailingIdx = startIdx - optInTimePeriod; +/* Generated */ while( inIdx <= endIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ if( tempReal != 0.0 ) +/* Generated */ outReal[outIdx++] = (inReal[inIdx] / tempReal); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ inIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ROCR100.c b/src/ta-lib/src/ta_func/ta_ROCR100.c new file mode 100644 index 000000000..7895322c0 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ROCR100.c @@ -0,0 +1,358 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::RocR100Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int rocR100Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ROCR100_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100 + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rocR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ROCR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int inIdx, outIdx, trailingIdx; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* The interpretation of the rate of change varies widely depending + * which software and/or books you are refering to. + * + * The following is the table of Rate-Of-Change implemented in TA-LIB: + * MOM = (price - prevPrice) [Momentum] + * ROC = ((price/prevPrice)-1)*100 [Rate of change] + * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] + * ROCR = (price/prevPrice) [Rate of change ratio] + * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] + * + * Here are the equivalent function in other software: + * TA-Lib | Tradestation | Metastock + * ================================================= + * MOM | Momentum | ROC (Point) + * ROC | ROC | ROC (Percent) + * ROCP | PercentChange | - + * ROCR | - | - + * ROCR100 | - | MO + * + * The MOM function is the only one who is not normalized, and thus + * should be avoided for comparing different time serie of prices. + * + * ROC and ROCP are centered at zero and can have positive and negative + * value. Here are some equivalence: + * ROC = ROCP/100 + * = ((price-prevPrice)/prevPrice)/100 + * = ((price/prevPrice)-1)*100 + * + * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are + * always positive values. + */ + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < optInTimePeriod ) + startIdx = optInTimePeriod; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate Rate of change Ratio: (price / prevPrice) */ + outIdx = 0; + inIdx = startIdx; + trailingIdx = startIdx - optInTimePeriod; + + while( inIdx <= endIdx ) + { + tempReal = inReal[trailingIdx++]; + if( tempReal != 0.0 ) + outReal[outIdx++] = (inReal[inIdx] / tempReal)*100.0; + else + outReal[outIdx++] = 0.0; + + inIdx++; + } + + /* Set output limits. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rocR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ROCR100( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int inIdx, outIdx, trailingIdx; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 10; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < optInTimePeriod ) +/* Generated */ startIdx = optInTimePeriod; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ inIdx = startIdx; +/* Generated */ trailingIdx = startIdx - optInTimePeriod; +/* Generated */ while( inIdx <= endIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ if( tempReal != 0.0 ) +/* Generated */ outReal[outIdx++] = (inReal[inIdx] / tempReal)*100.0; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ inIdx++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_RSI.c b/src/ta-lib/src/ta_func/ta_RSI.c new file mode 100644 index 000000000..641b476b5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_RSI.c @@ -0,0 +1,617 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 062804 MF Resolve div by zero bug on limit case. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::RsiLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int rsiLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_RSI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + retValue = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_RSI,Rsi); + if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock) ) + retValue--; + + return retValue; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_RSI - Relative Strength Index + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_RSI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int outIdx; + + int today, lookbackTotal, unstablePeriod, i; + double prevGain, prevLoss, prevValue, savePrevValue; + double tempValue1, tempValue2; + + #if defined( USE_SINGLE_PRECISION_INPUT ) + ARRAY_MEMMOVEMIX_VAR; + #endif + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* The following algorithm is base on the original + * work from Wilder's and shall represent the + * original idea behind the classic RSI. + * + * Metastock is starting the calculation one price + * bar earlier. To make this possible, they assume + * that the very first bar will be identical to the + * previous one (no gain or loss). + */ + + /* If changing this function, please check also CMO + * which is mostly identical (just different in one step + * of calculation). + */ + + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + outIdx = 0; /* Index into the output. */ + + /* Trap special case where the period is '1'. + * In that case, just copy the input into the + * output for the requested range (as-is !) + */ + if( optInTimePeriod == 1 ) + { + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + i = (endIdx-startIdx)+1; + VALUE_HANDLE_DEREF(outNBElement) = i; + #if defined( USE_SINGLE_PRECISION_INPUT ) + ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); + #else + ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); + #endif + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Accumulate Wilder's "Average Gain" and "Average Loss" + * among the initial period. + */ + today = startIdx-lookbackTotal; + prevValue = inReal[today]; + + unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_RSI,Rsi); + + /* If there is no unstable period, + * calculate the 'additional' initial + * price bar who is particuliar to + * metastock. + * If there is an unstable period, + * no need to calculate since this + * first value will be surely skip. + */ + if( (unstablePeriod == 0) && + (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) + { + /* Preserve prevValue because it may get + * overwritten by the output. + *(because output ptr could be the same as input ptr). + */ + savePrevValue = prevValue; + + /* No unstable period, so must calculate first output + * particular to Metastock. + * (Metastock re-use the first price bar, so there + * is no loss/gain at first. Beats me why they + * are doing all this). + */ + prevGain = 0.0; + prevLoss = 0.0; + for( i=optInTimePeriod; i > 0; i-- ) + { + tempValue1 = inReal[today++]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + } + + + tempValue1 = prevLoss/optInTimePeriod; + tempValue2 = prevGain/optInTimePeriod; + + /* Write the output. */ + tempValue1 = tempValue2+tempValue1; + if( !TA_IS_ZERO(tempValue1) ) + outReal[outIdx++] = 100*(tempValue2/tempValue1); + else + outReal[outIdx++] = 0.0; + + /* Are we done? */ + if( today > endIdx ) + { + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Start over for the next price bar. */ + today -= optInTimePeriod; + prevValue = savePrevValue; + } + + + /* Remaining of the processing is identical + * for both Classic calculation and Metastock. + */ + prevGain = 0.0; + prevLoss = 0.0; + today++; + for( i=optInTimePeriod; i > 0; i-- ) + { + tempValue1 = inReal[today++]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + } + + + /* Subsequent prevLoss and prevGain are smoothed + * using the previous values (Wilder's approach). + * 1) Multiply the previous by 'period-1'. + * 2) Add today value. + * 3) Divide by 'period'. + */ + prevLoss /= optInTimePeriod; + prevGain /= optInTimePeriod; + + /* Often documentation present the RSI calculation as follow: + * RSI = 100 - (100 / 1 + (prevGain/prevLoss)) + * + * The following is equivalent: + * RSI = 100 * (prevGain/(prevGain+prevLoss)) + * + * The second equation is used here for speed optimization. + */ + if( today > startIdx ) + { + tempValue1 = prevGain+prevLoss; + if( !TA_IS_ZERO(tempValue1) ) + outReal[outIdx++] = 100.0*(prevGain/tempValue1); + else + outReal[outIdx++] = 0.0; + } + else + { + /* Skip the unstable period. Do the processing + * but do not write it in the output. + */ + while( today < startIdx ) + { + tempValue1 = inReal[today]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + + prevLoss *= (optInTimePeriod-1); + prevGain *= (optInTimePeriod-1); + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + + prevLoss /= optInTimePeriod; + prevGain /= optInTimePeriod; + + today++; + } + } + + /* Unstable period skipped... now continue + * processing if needed. + */ + while( today <= endIdx ) + { + tempValue1 = inReal[today++]; + tempValue2 = tempValue1 - prevValue; + prevValue = tempValue1; + + prevLoss *= (optInTimePeriod-1); + prevGain *= (optInTimePeriod-1); + if( tempValue2 < 0 ) + prevLoss -= tempValue2; + else + prevGain += tempValue2; + + prevLoss /= optInTimePeriod; + prevGain /= optInTimePeriod; + tempValue1 = prevGain+prevLoss; + if( !TA_IS_ZERO(tempValue1) ) + outReal[outIdx++] = 100.0*(prevGain/tempValue1); + else + outReal[outIdx++] = 0.0; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode rsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_RSI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal, unstablePeriod, i; +/* Generated */ double prevGain, prevLoss, prevValue, savePrevValue; +/* Generated */ double tempValue1, tempValue2; +/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ ARRAY_MEMMOVEMIX_VAR; +/* Generated */ #endif +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ outIdx = 0; +/* Generated */ if( optInTimePeriod == 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ i = (endIdx-startIdx)+1; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = i; +/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); +/* Generated */ #else +/* Generated */ ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); +/* Generated */ #endif +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ today = startIdx-lookbackTotal; +/* Generated */ prevValue = inReal[today]; +/* Generated */ unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_RSI,Rsi); +/* Generated */ if( (unstablePeriod == 0) && +/* Generated */ (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) +/* Generated */ { +/* Generated */ savePrevValue = prevValue; +/* Generated */ prevGain = 0.0; +/* Generated */ prevLoss = 0.0; +/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today++]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ } +/* Generated */ tempValue1 = prevLoss/optInTimePeriod; +/* Generated */ tempValue2 = prevGain/optInTimePeriod; +/* Generated */ tempValue1 = tempValue2+tempValue1; +/* Generated */ if( !TA_IS_ZERO(tempValue1) ) +/* Generated */ outReal[outIdx++] = 100*(tempValue2/tempValue1); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ if( today > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ today -= optInTimePeriod; +/* Generated */ prevValue = savePrevValue; +/* Generated */ } +/* Generated */ prevGain = 0.0; +/* Generated */ prevLoss = 0.0; +/* Generated */ today++; +/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today++]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ } +/* Generated */ prevLoss /= optInTimePeriod; +/* Generated */ prevGain /= optInTimePeriod; +/* Generated */ if( today > startIdx ) +/* Generated */ { +/* Generated */ tempValue1 = prevGain+prevLoss; +/* Generated */ if( !TA_IS_ZERO(tempValue1) ) +/* Generated */ outReal[outIdx++] = 100.0*(prevGain/tempValue1); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ while( today < startIdx ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ prevLoss *= (optInTimePeriod-1); +/* Generated */ prevGain *= (optInTimePeriod-1); +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ prevLoss /= optInTimePeriod; +/* Generated */ prevGain /= optInTimePeriod; +/* Generated */ today++; +/* Generated */ } +/* Generated */ } +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tempValue1 = inReal[today++]; +/* Generated */ tempValue2 = tempValue1 - prevValue; +/* Generated */ prevValue = tempValue1; +/* Generated */ prevLoss *= (optInTimePeriod-1); +/* Generated */ prevGain *= (optInTimePeriod-1); +/* Generated */ if( tempValue2 < 0 ) +/* Generated */ prevLoss -= tempValue2; +/* Generated */ else +/* Generated */ prevGain += tempValue2; +/* Generated */ prevLoss /= optInTimePeriod; +/* Generated */ prevGain /= optInTimePeriod; +/* Generated */ tempValue1 = prevGain+prevLoss; +/* Generated */ if( !TA_IS_ZERO(tempValue1) ) +/* Generated */ outReal[outIdx++] = 100.0*(prevGain/tempValue1); +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SAR.c b/src/ta-lib/src/ta_func/ta_SAR.c new file mode 100644 index 000000000..2b48d81d9 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SAR.c @@ -0,0 +1,724 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * CF Christo Fogelberg + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 122104 MF,CF Fix#1089506 for out-of-bound access to ep_temp. + */ + +/* SAR_ROUNDING is just for test purpose when cross-referencing that + * function with example from Wilder's book. Wilder is using two + * decimal rounding for simplification. TA-Lib does not round. + */ +/* #define SAR_ROUNDING(x) x=round_pos_2(x) */ +#define SAR_ROUNDING(x) + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SarLookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int sarLookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SAR_Lookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInAcceleration == TA_REAL_DEFAULT ) +/* Generated */ optInAcceleration = 2.000000e-2; +/* Generated */ else if( (optInAcceleration < 0.000000e+0) ||/* Generated */ (optInAcceleration > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInMaximum == TA_REAL_DEFAULT ) +/* Generated */ optInMaximum = 2.000000e-1; +/* Generated */ else if( (optInMaximum < 0.000000e+0) ||/* Generated */ (optInMaximum > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInAcceleration); + UNUSED_VARIABLE(optInMaximum); + + /* SAR always sacrify one price bar to establish the + * initial extreme price. + */ + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SAR - Parabolic SAR + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInAcceleration:(From 0 to TA_REAL_MAX) + * Acceleration Factor used up to the Maximum value + * + * optInMaximum:(From 0 to TA_REAL_MAX) + * Acceleration Factor Maximum value + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ENUM_DECLARATION(RetCode) retCode; + + int isLong; /* > 0 indicates long. == 0 indicates short */ + int todayIdx, outIdx; + + VALUE_HANDLE_INT(tempInt); + + double newHigh, newLow, prevHigh, prevLow; + double af, ep, sar; + ARRAY_LOCAL(ep_temp,1); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInAcceleration == TA_REAL_DEFAULT ) +/* Generated */ optInAcceleration = 2.000000e-2; +/* Generated */ else if( (optInAcceleration < 0.000000e+0) ||/* Generated */ (optInAcceleration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInMaximum == TA_REAL_DEFAULT ) +/* Generated */ optInMaximum = 2.000000e-1; +/* Generated */ else if( (optInMaximum < 0.000000e+0) ||/* Generated */ (optInMaximum > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Implementation of the SAR has been a little bit open to interpretation + * since Wilder (the original author) did not define a precise algorithm + * on how to bootstrap the algorithm. Take any existing software application + * and you will see slight variation on how the algorithm was adapted. + * + * What is the initial trade direction? Long or short? + * =================================================== + * The interpretation of what should be the initial SAR values is + * open to interpretation, particularly since the caller to the function + * does not specify the initial direction of the trade. + * + * In TA-Lib, the following logic is used: + * - Calculate +DM and -DM between the first and + * second bar. The highest directional indication will + * indicate the assumed direction of the trade for the second + * price bar. + * - In the case of a tie between +DM and -DM, + * the direction is LONG by default. + * + * What is the initial "extreme point" and thus SAR? + * ================================================= + * The following shows how different people took different approach: + * - Metastock use the first price bar high/low depending of + * the direction. No SAR is calculated for the first price + * bar. + * - Tradestation use the closing price of the second bar. No + * SAR are calculated for the first price bar. + * - Wilder (the original author) use the SIP from the + * previous trade (cannot be implement here since the + * direction and length of the previous trade is unknonw). + * - The Magazine TASC seems to follow Wilder approach which + * is not practical here. + * + * TA-Lib "consume" the first price bar and use its high/low as the + * initial SAR of the second price bar. I found that approach to be + * the closest to Wilders idea of having the first entry day use + * the previous extreme point, except that here the extreme point is + * derived solely from the first price bar. I found the same approach + * to be used by Metastock. + */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + * + * Move up the start index if there is not + * enough initial data. + */ + if( startIdx < 1 ) + startIdx = 1; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Make sure the acceleration and maximum are coherent. + * If not, correct the acceleration. + */ + af = optInAcceleration; + if( af > optInMaximum ) + af = optInAcceleration = optInMaximum; + + /* Identify if the initial direction is long or short. + * (ep is just used as a temp buffer here, the name + * of the parameter is not significant). + */ + retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, + VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), + ep_temp ); + if( ep_temp[0] > 0 ) + isLong = 0; + else + isLong = 1; + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + outIdx = 0; + + /* Write the first SAR. */ + todayIdx = startIdx; + + newHigh = inHigh[todayIdx-1]; + newLow = inLow[todayIdx-1]; + + SAR_ROUNDING(newHigh); + SAR_ROUNDING(newLow); + + if( isLong == 1 ) + { + ep = inHigh[todayIdx]; + sar = newLow; + } + else + { + ep = inLow[todayIdx]; + sar = newHigh; + } + + SAR_ROUNDING(sar); + + /* Cheat on the newLow and newHigh for the + * first iteration. + */ + newLow = inLow[todayIdx]; + newHigh = inHigh[todayIdx]; + + while( todayIdx <= endIdx ) + { + prevLow = newLow; + prevHigh = newHigh; + newLow = inLow[todayIdx]; + newHigh = inHigh[todayIdx]; + todayIdx++; + + SAR_ROUNDING(newLow); + SAR_ROUNDING(newHigh); + + if( isLong == 1 ) + { + /* Switch to short if the low penetrates the SAR value. */ + if( newLow <= sar ) + { + /* Switch and Overide the SAR with the ep */ + isLong = 0; + sar = ep; + + /* Make sure the overide SAR is within + * yesterday's and today's range. + */ + if( sar < prevHigh ) + sar = prevHigh; + if( sar < newHigh ) + sar = newHigh; + + /* Output the overide SAR */ + outReal[outIdx++] = sar; + + /* Adjust af and ep */ + af = optInAcceleration; + ep = newLow; + + /* Calculate the new SAR */ + sar = sar + af * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar < prevHigh ) + sar = prevHigh; + if( sar < newHigh ) + sar = newHigh; + } + else + { + /* No switch */ + + /* Output the SAR (was calculated in the previous iteration) */ + outReal[outIdx++] = sar; + + /* Adjust af and ep. */ + if( newHigh > ep ) + { + ep = newHigh; + af += optInAcceleration; + if( af > optInMaximum ) + af = optInMaximum; + } + + /* Calculate the new SAR */ + sar = sar + af * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar > prevLow ) + sar = prevLow; + if( sar > newLow ) + sar = newLow; + } + } + else + { + /* Switch to long if the high penetrates the SAR value. */ + if( newHigh >= sar ) + { + /* Switch and Overide the SAR with the ep */ + isLong = 1; + sar = ep; + + /* Make sure the overide SAR is within + * yesterday's and today's range. + */ + if( sar > prevLow ) + sar = prevLow; + if( sar > newLow ) + sar = newLow; + + /* Output the overide SAR */ + outReal[outIdx++] = sar; + + /* Adjust af and ep */ + af = optInAcceleration; + ep = newHigh; + + /* Calculate the new SAR */ + sar = sar + af * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar > prevLow ) + sar = prevLow; + if( sar > newLow ) + sar = newLow; + } + else + { + /* No switch */ + + /* Output the SAR (was calculated in the previous iteration) */ + outReal[outIdx++] = sar; + + /* Adjust af and ep. */ + if( newLow < ep ) + { + ep = newLow; + af += optInAcceleration; + if( af > optInMaximum ) + af = optInMaximum; + } + + /* Calculate the new SAR */ + sar = sar + af * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar < prevHigh ) + sar = prevHigh; + if( sar < newHigh ) + sar = newHigh; + } + } + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sar( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int isLong; +/* Generated */ int todayIdx, outIdx; +/* Generated */ VALUE_HANDLE_INT(tempInt); +/* Generated */ double newHigh, newLow, prevHigh, prevLow; +/* Generated */ double af, ep, sar; +/* Generated */ ARRAY_LOCAL(ep_temp,1); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInAcceleration == TA_REAL_DEFAULT ) +/* Generated */ optInAcceleration = 2.000000e-2; +/* Generated */ else if( (optInAcceleration < 0.000000e+0) || (optInAcceleration > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInMaximum == TA_REAL_DEFAULT ) +/* Generated */ optInMaximum = 2.000000e-1; +/* Generated */ else if( (optInMaximum < 0.000000e+0) || (optInMaximum > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < 1 ) +/* Generated */ startIdx = 1; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ af = optInAcceleration; +/* Generated */ if( af > optInMaximum ) +/* Generated */ af = optInAcceleration = optInMaximum; +/* Generated */ retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, +/* Generated */ VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), +/* Generated */ ep_temp ); +/* Generated */ if( ep_temp[0] > 0 ) +/* Generated */ isLong = 0; +/* Generated */ else +/* Generated */ isLong = 1; +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ todayIdx = startIdx; +/* Generated */ newHigh = inHigh[todayIdx-1]; +/* Generated */ newLow = inLow[todayIdx-1]; +/* Generated */ SAR_ROUNDING(newHigh); +/* Generated */ SAR_ROUNDING(newLow); +/* Generated */ if( isLong == 1 ) +/* Generated */ { +/* Generated */ ep = inHigh[todayIdx]; +/* Generated */ sar = newLow; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ ep = inLow[todayIdx]; +/* Generated */ sar = newHigh; +/* Generated */ } +/* Generated */ SAR_ROUNDING(sar); +/* Generated */ newLow = inLow[todayIdx]; +/* Generated */ newHigh = inHigh[todayIdx]; +/* Generated */ while( todayIdx <= endIdx ) +/* Generated */ { +/* Generated */ prevLow = newLow; +/* Generated */ prevHigh = newHigh; +/* Generated */ newLow = inLow[todayIdx]; +/* Generated */ newHigh = inHigh[todayIdx]; +/* Generated */ todayIdx++; +/* Generated */ SAR_ROUNDING(newLow); +/* Generated */ SAR_ROUNDING(newHigh); +/* Generated */ if( isLong == 1 ) +/* Generated */ { +/* Generated */ if( newLow <= sar ) +/* Generated */ { +/* Generated */ isLong = 0; +/* Generated */ sar = ep; +/* Generated */ if( sar < prevHigh ) +/* Generated */ sar = prevHigh; +/* Generated */ if( sar < newHigh ) +/* Generated */ sar = newHigh; +/* Generated */ outReal[outIdx++] = sar; +/* Generated */ af = optInAcceleration; +/* Generated */ ep = newLow; +/* Generated */ sar = sar + af * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar < prevHigh ) +/* Generated */ sar = prevHigh; +/* Generated */ if( sar < newHigh ) +/* Generated */ sar = newHigh; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ outReal[outIdx++] = sar; +/* Generated */ if( newHigh > ep ) +/* Generated */ { +/* Generated */ ep = newHigh; +/* Generated */ af += optInAcceleration; +/* Generated */ if( af > optInMaximum ) +/* Generated */ af = optInMaximum; +/* Generated */ } +/* Generated */ sar = sar + af * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar > prevLow ) +/* Generated */ sar = prevLow; +/* Generated */ if( sar > newLow ) +/* Generated */ sar = newLow; +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ if( newHigh >= sar ) +/* Generated */ { +/* Generated */ isLong = 1; +/* Generated */ sar = ep; +/* Generated */ if( sar > prevLow ) +/* Generated */ sar = prevLow; +/* Generated */ if( sar > newLow ) +/* Generated */ sar = newLow; +/* Generated */ outReal[outIdx++] = sar; +/* Generated */ af = optInAcceleration; +/* Generated */ ep = newHigh; +/* Generated */ sar = sar + af * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar > prevLow ) +/* Generated */ sar = prevLow; +/* Generated */ if( sar > newLow ) +/* Generated */ sar = newLow; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ outReal[outIdx++] = sar; +/* Generated */ if( newLow < ep ) +/* Generated */ { +/* Generated */ ep = newLow; +/* Generated */ af += optInAcceleration; +/* Generated */ if( af > optInMaximum ) +/* Generated */ af = optInMaximum; +/* Generated */ } +/* Generated */ sar = sar + af * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar < prevHigh ) +/* Generated */ sar = prevHigh; +/* Generated */ if( sar < newHigh ) +/* Generated */ sar = newHigh; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SAREXT.c b/src/ta-lib/src/ta_func/ta_SAREXT.c new file mode 100644 index 000000000..3392de9ee --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SAREXT.c @@ -0,0 +1,1004 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * PP Peter Pudaite + * CF Christo Fogelberg + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 091503 PP Reworked TA_SAR to allow customisation of more SAR params. + * 092103 MF Some changes related on first round of tests + * 092303 PP Minor bug fixes. + * 122104 MF,CF Fix#1089506 for out-of-bound access to ep_temp. + * + */ + +/* SAR_ROUNDING is just for test purpose when cross-referencing that + * function with example from Wilder's book. Wilder is using two + * decimal rounding for simplification. TA-Lib does not round. + */ +/* #define SAR_ROUNDING(x) x=round_pos_2(x) */ +#define SAR_ROUNDING(x) + + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SarExtLookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int sarExtLookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SAREXT_Lookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort ) /* From 0 to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( optInStartValue == TA_REAL_DEFAULT ) +/* Generated */ optInStartValue = 0.000000e+0; +/* Generated */ else if( (optInStartValue < -3.000000e+37) ||/* Generated */ (optInStartValue > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInOffsetOnReverse == TA_REAL_DEFAULT ) +/* Generated */ optInOffsetOnReverse = 0.000000e+0; +/* Generated */ else if( (optInOffsetOnReverse < 0.000000e+0) ||/* Generated */ (optInOffsetOnReverse > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInAccelerationInitLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationInitLong = 2.000000e-2; +/* Generated */ else if( (optInAccelerationInitLong < 0.000000e+0) ||/* Generated */ (optInAccelerationInitLong > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInAccelerationLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationLong = 2.000000e-2; +/* Generated */ else if( (optInAccelerationLong < 0.000000e+0) ||/* Generated */ (optInAccelerationLong > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInAccelerationMaxLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationMaxLong = 2.000000e-1; +/* Generated */ else if( (optInAccelerationMaxLong < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxLong > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInAccelerationInitShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationInitShort = 2.000000e-2; +/* Generated */ else if( (optInAccelerationInitShort < 0.000000e+0) ||/* Generated */ (optInAccelerationInitShort > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInAccelerationShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationShort = 2.000000e-2; +/* Generated */ else if( (optInAccelerationShort < 0.000000e+0) ||/* Generated */ (optInAccelerationShort > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInAccelerationMaxShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationMaxShort = 2.000000e-1; +/* Generated */ else if( (optInAccelerationMaxShort < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxShort > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInStartValue); + UNUSED_VARIABLE(optInOffsetOnReverse); + UNUSED_VARIABLE(optInAccelerationInitLong); + UNUSED_VARIABLE(optInAccelerationLong); + UNUSED_VARIABLE(optInAccelerationMaxLong); + UNUSED_VARIABLE(optInAccelerationInitShort); + UNUSED_VARIABLE(optInAccelerationShort); + UNUSED_VARIABLE(optInAccelerationMaxShort); + + /* SAR always sacrifices one price bar to establish the + * initial extreme price. + */ + + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SAREXT - Parabolic SAR - Extended + * + * Input = High, Low + * Output = double + * + * Optional Parameters + * ------------------- + * optInStartValue:(From TA_REAL_MIN to TA_REAL_MAX) + * Start value and direction. 0 for Auto, >0 for Long, <0 for Short + * + * optInOffsetOnReverse:(From 0 to TA_REAL_MAX) + * Percent offset added/removed to initial stop on short/long reversal + * + * optInAccelerationInitLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor initial value for the Long direction + * + * optInAccelerationLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor for the Long direction + * + * optInAccelerationMaxLong:(From 0 to TA_REAL_MAX) + * Acceleration Factor maximum value for the Long direction + * + * optInAccelerationInitShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor initial value for the Short direction + * + * optInAccelerationShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor for the Short direction + * + * optInAccelerationMaxShort:(From 0 to TA_REAL_MAX) + * Acceleration Factor maximum value for the Short direction + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sarExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SAREXT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ENUM_DECLARATION(RetCode) retCode; + + int isLong; /* > 0 indicates long. == 0 indicates short */ + int todayIdx, outIdx; + + VALUE_HANDLE_INT(tempInt); + + double newHigh, newLow, prevHigh, prevLow; + double afLong, afShort, ep, sar; + ARRAY_LOCAL(ep_temp,1); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ if( optInStartValue == TA_REAL_DEFAULT ) +/* Generated */ optInStartValue = 0.000000e+0; +/* Generated */ else if( (optInStartValue < -3.000000e+37) ||/* Generated */ (optInStartValue > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInOffsetOnReverse == TA_REAL_DEFAULT ) +/* Generated */ optInOffsetOnReverse = 0.000000e+0; +/* Generated */ else if( (optInOffsetOnReverse < 0.000000e+0) ||/* Generated */ (optInOffsetOnReverse > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInAccelerationInitLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationInitLong = 2.000000e-2; +/* Generated */ else if( (optInAccelerationInitLong < 0.000000e+0) ||/* Generated */ (optInAccelerationInitLong > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInAccelerationLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationLong = 2.000000e-2; +/* Generated */ else if( (optInAccelerationLong < 0.000000e+0) ||/* Generated */ (optInAccelerationLong > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInAccelerationMaxLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationMaxLong = 2.000000e-1; +/* Generated */ else if( (optInAccelerationMaxLong < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxLong > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInAccelerationInitShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationInitShort = 2.000000e-2; +/* Generated */ else if( (optInAccelerationInitShort < 0.000000e+0) ||/* Generated */ (optInAccelerationInitShort > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInAccelerationShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationShort = 2.000000e-2; +/* Generated */ else if( (optInAccelerationShort < 0.000000e+0) ||/* Generated */ (optInAccelerationShort > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInAccelerationMaxShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationMaxShort = 2.000000e-1; +/* Generated */ else if( (optInAccelerationMaxShort < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxShort > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* This function is the same as TA_SAR, except that the caller has + * greater control on the SAR dynamic and initial state. + * + * In additon, the TA_SAREXT returns negative values when the position + * is short. This allow to distinguish when the SAR do actually reverse. + */ + + /* Implementation of the SAR has been a little bit open to interpretation + * since Wilder (the original author) did not define a precise algorithm + * on how to bootstrap the algorithm. Take any existing software application + * and you will see slight variation on how the algorithm was adapted. + * + * What is the initial trade direction? Long or short? + * =================================================== + * The interpretation of what should be the initial SAR values is + * open to interpretation, particularly since the caller to the function + * does not specify the initial direction of the trade. + * + * In TA-Lib, the following default logic is used: + * - Calculate +DM and -DM between the first and + * second bar. The highest directional indication will + * indicate the assumed direction of the trade for the second + * price bar. + * - In the case of a tie between +DM and -DM, + * the direction is LONG by default. + * + * What is the initial "extreme point" and thus SAR? + * ================================================= + * The following shows how different people took different approach: + * - Metastock use the first price bar high/low depending of + * the direction. No SAR is calculated for the first price + * bar. + * - Tradestation use the closing price of the second bar. No + * SAR are calculated for the first price bar. + * - Wilder (the original author) use the SIP from the + * previous trade (cannot be implement here since the + * direction and length of the previous trade is unknonw). + * - The Magazine TASC seems to follow Wilder approach which + * is not practical here. + * + * TA-Lib "consume" the first price bar and use its high/low as the + * initial SAR of the second price bar. I found that approach to be + * the closest to Wilders idea of having the first entry day use + * the previous extreme point, except that here the extreme point is + * derived solely from the first price bar. I found the same approach + * to be used by Metastock. + * + * + * Can I force the initial SAR? + * ============================ + * Yes. Using the optInStartValue_0 parameter: + * optInStartValue_0 > 0 : SAR is long at optInStartValue_0. + * optInStartValue_0 < 0 : SAR is short at fabs(optInStartValue_0). + * + * And when optInStartValue_0 == 0, the logic is the same as for TA_SAR + * (See previous two sections). + */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + * + * Move up the start index if there is not + * enough initial data. + */ + if( startIdx < 1 ) + startIdx = 1; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + + /* Check if the acceleration factors are being defined by the user. + * Make sure the acceleration and maximum are coherent. + * If not, correct the acceleration. + * Default afLong = 0.02 + * Default afShort = 0.02 + */ + + afLong = optInAccelerationInitLong; + afShort = optInAccelerationInitShort; + + if( afLong > optInAccelerationMaxLong ) + afLong = optInAccelerationInitLong = optInAccelerationMaxLong; + + if( optInAccelerationLong > optInAccelerationMaxLong ) + optInAccelerationLong = optInAccelerationMaxLong; + + if( afShort > optInAccelerationMaxShort) + afShort = optInAccelerationInitShort = optInAccelerationMaxShort; + + if( optInAccelerationShort > optInAccelerationMaxShort ) + optInAccelerationShort = optInAccelerationMaxShort; + + /* Initialise SAR calculations */ + + if(optInStartValue == 0) /* Default action */ + { + /* Identify if the initial direction is long or short. + * (ep is just used as a temp buffer here, the name + * of the parameter is not significant). + */ + retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, + VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), + ep_temp ); + if( ep_temp[0] > 0 ) + isLong = 0; + else + isLong = 1; + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + } + else if( optInStartValue > 0 ) /* Start Long */ + { + isLong = 1; + } + else /* optInStartValue_0 < 0 => Start Short */ + { + isLong = 0; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + outIdx = 0; + + + /* Write the first SAR. */ + todayIdx = startIdx; + + newHigh = inHigh[todayIdx-1]; + newLow = inLow[todayIdx-1]; + + SAR_ROUNDING(newHigh); + SAR_ROUNDING(newLow); + + if(optInStartValue == 0) /* Default action */ + { + if( isLong == 1 ) + { + ep = inHigh[todayIdx]; + sar = newLow; + } + else + { + ep = inLow[todayIdx]; + sar = newHigh; + } + } + else if ( optInStartValue > 0 ) /* Start Long at specified value. */ + { + ep = inHigh[todayIdx]; + sar = optInStartValue; + } + else /* if optInStartValue < 0 => Start Short at specified value. */ + { + ep = inLow[todayIdx]; + sar = std_fabs(optInStartValue); + } + + SAR_ROUNDING(sar); + + /* Cheat on the newLow and newHigh for the + * first iteration. + */ + newLow = inLow[todayIdx]; + newHigh = inHigh[todayIdx]; + + while( todayIdx <= endIdx ) + { + prevLow = newLow; + prevHigh = newHigh; + newLow = inLow[todayIdx]; + newHigh = inHigh[todayIdx]; + todayIdx++; + + SAR_ROUNDING(newLow); + SAR_ROUNDING(newHigh); + + if( isLong == 1 ) + { + /* Switch to short if the low penetrates the SAR value. */ + if( newLow <= sar ) + { + /* Switch and Overide the SAR with the ep */ + isLong = 0; + sar = ep; + + /* Make sure the overide SAR is within + * yesterday's and today's range. + */ + if( sar < prevHigh ) + sar = prevHigh; + if( sar < newHigh ) + sar = newHigh; + + /* Output the overide SAR */ + if( optInOffsetOnReverse != 0.0 ) + sar += sar * optInOffsetOnReverse; + outReal[outIdx++] = -sar; + + /* Adjust afShort and ep */ + afShort = optInAccelerationInitShort; + ep = newLow; + + /* Calculate the new SAR */ + sar = sar + afShort * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar < prevHigh ) + sar = prevHigh; + if( sar < newHigh ) + sar = newHigh; + } + else + { + /* No switch */ + + /* Output the SAR (was calculated in the previous iteration) */ + outReal[outIdx++] = sar; + + /* Adjust afLong and ep. */ + if( newHigh > ep ) + { + ep = newHigh; + afLong += optInAccelerationLong; + if( afLong > optInAccelerationMaxLong ) + afLong = optInAccelerationMaxLong; + } + + /* Calculate the new SAR */ + sar = sar + afLong * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar > prevLow ) + sar = prevLow; + if( sar > newLow ) + sar = newLow; + } + } + else + { + /* Switch to long if the high penetrates the SAR value. */ + if( newHigh >= sar ) + { + /* Switch and Overide the SAR with the ep */ + isLong = 1; + sar = ep; + + /* Make sure the overide SAR is within + * yesterday's and today's range. + */ + if( sar > prevLow ) + sar = prevLow; + if( sar > newLow ) + sar = newLow; + + /* Output the overide SAR */ + if( optInOffsetOnReverse != 0.0 ) + sar -= sar * optInOffsetOnReverse; + outReal[outIdx++] = sar; + + /* Adjust afLong and ep */ + afLong = optInAccelerationInitLong; + ep = newHigh; + + /* Calculate the new SAR */ + sar = sar + afLong * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar > prevLow ) + sar = prevLow; + if( sar > newLow ) + sar = newLow; + } + else + { + /* No switch */ + + /* Output the SAR (was calculated in the previous iteration) */ + outReal[outIdx++] = -sar; + + /* Adjust afShort and ep. */ + if( newLow < ep ) + { + ep = newLow; + afShort += optInAccelerationShort; + if( afShort > optInAccelerationMaxShort ) + afShort = optInAccelerationMaxShort; + } + + /* Calculate the new SAR */ + sar = sar + afShort * (ep - sar); + SAR_ROUNDING( sar ); + + /* Make sure the new SAR is within + * yesterday's and today's range. + */ + if( sar < prevHigh ) + sar = prevHigh; + if( sar < newHigh ) + sar = newHigh; + } + } + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sarExt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SAREXT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int isLong; +/* Generated */ int todayIdx, outIdx; +/* Generated */ VALUE_HANDLE_INT(tempInt); +/* Generated */ double newHigh, newLow, prevHigh, prevLow; +/* Generated */ double afLong, afShort, ep, sar; +/* Generated */ ARRAY_LOCAL(ep_temp,1); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( optInStartValue == TA_REAL_DEFAULT ) +/* Generated */ optInStartValue = 0.000000e+0; +/* Generated */ else if( (optInStartValue < -3.000000e+37) || (optInStartValue > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInOffsetOnReverse == TA_REAL_DEFAULT ) +/* Generated */ optInOffsetOnReverse = 0.000000e+0; +/* Generated */ else if( (optInOffsetOnReverse < 0.000000e+0) || (optInOffsetOnReverse > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInAccelerationInitLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationInitLong = 2.000000e-2; +/* Generated */ else if( (optInAccelerationInitLong < 0.000000e+0) || (optInAccelerationInitLong > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInAccelerationLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationLong = 2.000000e-2; +/* Generated */ else if( (optInAccelerationLong < 0.000000e+0) || (optInAccelerationLong > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInAccelerationMaxLong == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationMaxLong = 2.000000e-1; +/* Generated */ else if( (optInAccelerationMaxLong < 0.000000e+0) || (optInAccelerationMaxLong > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInAccelerationInitShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationInitShort = 2.000000e-2; +/* Generated */ else if( (optInAccelerationInitShort < 0.000000e+0) || (optInAccelerationInitShort > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInAccelerationShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationShort = 2.000000e-2; +/* Generated */ else if( (optInAccelerationShort < 0.000000e+0) || (optInAccelerationShort > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInAccelerationMaxShort == TA_REAL_DEFAULT ) +/* Generated */ optInAccelerationMaxShort = 2.000000e-1; +/* Generated */ else if( (optInAccelerationMaxShort < 0.000000e+0) || (optInAccelerationMaxShort > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < 1 ) +/* Generated */ startIdx = 1; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ afLong = optInAccelerationInitLong; +/* Generated */ afShort = optInAccelerationInitShort; +/* Generated */ if( afLong > optInAccelerationMaxLong ) +/* Generated */ afLong = optInAccelerationInitLong = optInAccelerationMaxLong; +/* Generated */ if( optInAccelerationLong > optInAccelerationMaxLong ) +/* Generated */ optInAccelerationLong = optInAccelerationMaxLong; +/* Generated */ if( afShort > optInAccelerationMaxShort) +/* Generated */ afShort = optInAccelerationInitShort = optInAccelerationMaxShort; +/* Generated */ if( optInAccelerationShort > optInAccelerationMaxShort ) +/* Generated */ optInAccelerationShort = optInAccelerationMaxShort; +/* Generated */ if(optInStartValue == 0) +/* Generated */ { +/* Generated */ retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, +/* Generated */ VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), +/* Generated */ ep_temp ); +/* Generated */ if( ep_temp[0] > 0 ) +/* Generated */ isLong = 0; +/* Generated */ else +/* Generated */ isLong = 1; +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ } +/* Generated */ else if( optInStartValue > 0 ) +/* Generated */ { +/* Generated */ isLong = 1; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ isLong = 0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ todayIdx = startIdx; +/* Generated */ newHigh = inHigh[todayIdx-1]; +/* Generated */ newLow = inLow[todayIdx-1]; +/* Generated */ SAR_ROUNDING(newHigh); +/* Generated */ SAR_ROUNDING(newLow); +/* Generated */ if(optInStartValue == 0) +/* Generated */ { +/* Generated */ if( isLong == 1 ) +/* Generated */ { +/* Generated */ ep = inHigh[todayIdx]; +/* Generated */ sar = newLow; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ ep = inLow[todayIdx]; +/* Generated */ sar = newHigh; +/* Generated */ } +/* Generated */ } +/* Generated */ else if ( optInStartValue > 0 ) +/* Generated */ { +/* Generated */ ep = inHigh[todayIdx]; +/* Generated */ sar = optInStartValue; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ ep = inLow[todayIdx]; +/* Generated */ sar = std_fabs(optInStartValue); +/* Generated */ } +/* Generated */ SAR_ROUNDING(sar); +/* Generated */ newLow = inLow[todayIdx]; +/* Generated */ newHigh = inHigh[todayIdx]; +/* Generated */ while( todayIdx <= endIdx ) +/* Generated */ { +/* Generated */ prevLow = newLow; +/* Generated */ prevHigh = newHigh; +/* Generated */ newLow = inLow[todayIdx]; +/* Generated */ newHigh = inHigh[todayIdx]; +/* Generated */ todayIdx++; +/* Generated */ SAR_ROUNDING(newLow); +/* Generated */ SAR_ROUNDING(newHigh); +/* Generated */ if( isLong == 1 ) +/* Generated */ { +/* Generated */ if( newLow <= sar ) +/* Generated */ { +/* Generated */ isLong = 0; +/* Generated */ sar = ep; +/* Generated */ if( sar < prevHigh ) +/* Generated */ sar = prevHigh; +/* Generated */ if( sar < newHigh ) +/* Generated */ sar = newHigh; +/* Generated */ if( optInOffsetOnReverse != 0.0 ) +/* Generated */ sar += sar * optInOffsetOnReverse; +/* Generated */ outReal[outIdx++] = -sar; +/* Generated */ afShort = optInAccelerationInitShort; +/* Generated */ ep = newLow; +/* Generated */ sar = sar + afShort * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar < prevHigh ) +/* Generated */ sar = prevHigh; +/* Generated */ if( sar < newHigh ) +/* Generated */ sar = newHigh; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ outReal[outIdx++] = sar; +/* Generated */ if( newHigh > ep ) +/* Generated */ { +/* Generated */ ep = newHigh; +/* Generated */ afLong += optInAccelerationLong; +/* Generated */ if( afLong > optInAccelerationMaxLong ) +/* Generated */ afLong = optInAccelerationMaxLong; +/* Generated */ } +/* Generated */ sar = sar + afLong * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar > prevLow ) +/* Generated */ sar = prevLow; +/* Generated */ if( sar > newLow ) +/* Generated */ sar = newLow; +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ if( newHigh >= sar ) +/* Generated */ { +/* Generated */ isLong = 1; +/* Generated */ sar = ep; +/* Generated */ if( sar > prevLow ) +/* Generated */ sar = prevLow; +/* Generated */ if( sar > newLow ) +/* Generated */ sar = newLow; +/* Generated */ if( optInOffsetOnReverse != 0.0 ) +/* Generated */ sar -= sar * optInOffsetOnReverse; +/* Generated */ outReal[outIdx++] = sar; +/* Generated */ afLong = optInAccelerationInitLong; +/* Generated */ ep = newHigh; +/* Generated */ sar = sar + afLong * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar > prevLow ) +/* Generated */ sar = prevLow; +/* Generated */ if( sar > newLow ) +/* Generated */ sar = newLow; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ outReal[outIdx++] = -sar; +/* Generated */ if( newLow < ep ) +/* Generated */ { +/* Generated */ ep = newLow; +/* Generated */ afShort += optInAccelerationShort; +/* Generated */ if( afShort > optInAccelerationMaxShort ) +/* Generated */ afShort = optInAccelerationMaxShort; +/* Generated */ } +/* Generated */ sar = sar + afShort * (ep - sar); +/* Generated */ SAR_ROUNDING( sar ); +/* Generated */ if( sar < prevHigh ) +/* Generated */ sar = prevHigh; +/* Generated */ if( sar < newHigh ) +/* Generated */ sar = newHigh; +/* Generated */ } +/* Generated */ } +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + + diff --git a/src/ta-lib/src/ta_func/ta_SIN.c b/src/ta-lib/src/ta_func/ta_SIN.c new file mode 100644 index 000000000..c63687101 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SIN.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 082507 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SinLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int sinLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SIN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SIN - Vector Trigonometric Sin + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SIN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_sin(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sin( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SIN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_sin(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SINH.c b/src/ta-lib/src/ta_func/ta_SINH.c new file mode 100644 index 000000000..311da7375 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SINH.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SinhLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int sinhLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SINH_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SINH - Vector Trigonometric Sinh + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sinh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SINH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_sinh(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sinh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SINH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_sinh(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SMA.c b/src/ta-lib/src/ta_func/ta_SMA.c new file mode 100644 index 000000000..1982c7469 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SMA.c @@ -0,0 +1,431 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int smaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return optInTimePeriod - 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SMA - Simple Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + return FUNCTION_CALL(INT_SMA)( startIdx, endIdx, + inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); +} + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + // No INT function +#else + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) + enum class Core::RetCode Core::TA_INT_SMA( int startIdx, + int endIdx, + SubArray^ inReal, + int optInTimePeriod, + [Out]int% outBegIdx, + [Out]int% outNBElement, + SubArray^ outReal) +#elif defined( _MANAGED ) + enum class Core::RetCode Core::TA_INT_SMA( int startIdx, + int endIdx, + cli::array^ inReal, + int optInTimePeriod, + [Out]int% outBegIdx, + [Out]int% outNBElement, + cli::array^ outReal) +#elif defined( _JAVA ) +RetCode TA_INT_SMA( int startIdx, + int endIdx, + INPUT_TYPE inReal[], + int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + MInteger outBegIdx, + MInteger outNBElement, + double outReal[] ) +#else +TA_RetCode TA_PREFIX(INT_SMA)( int startIdx, + int endIdx, + const INPUT_TYPE *inReal, + int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + int *outBegIdx, + int *outNBElement, + double *outReal ) +#endif +{ + double periodTotal, tempReal; + int i, outIdx, trailingIdx, lookbackTotal; + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the MA calculation using tight loops. */ + /* Add-up the initial period, except for the last value. */ + periodTotal = 0; + trailingIdx = startIdx-lookbackTotal; + + i=trailingIdx; + if( optInTimePeriod > 1 ) + { + while( i < startIdx ) + periodTotal += inReal[i++]; + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the inReal and + * outReal to be the same buffer. + */ + outIdx = 0; + do + { + periodTotal += inReal[i++]; + tempReal = periodTotal; + periodTotal -= inReal[trailingIdx++]; + outReal[outIdx++] = tempReal / optInTimePeriod; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ return FUNCTION_CALL(INT_SMA)( startIdx, endIdx, +/* Generated */ inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ } +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ // No INT function +/* Generated */ #else +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TA_INT_SMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TA_INT_SMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ RetCode TA_INT_SMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ INPUT_TYPE inReal[], +/* Generated */ int optInTimePeriod, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_PREFIX(INT_SMA)( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const INPUT_TYPE *inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double *outReal ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double periodTotal, tempReal; +/* Generated */ int i, outIdx, trailingIdx, lookbackTotal; +/* Generated */ lookbackTotal = (optInTimePeriod-1); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ periodTotal = 0; +/* Generated */ trailingIdx = startIdx-lookbackTotal; +/* Generated */ i=trailingIdx; +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ { +/* Generated */ while( i < startIdx ) +/* Generated */ periodTotal += inReal[i++]; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ periodTotal += inReal[i++]; +/* Generated */ tempReal = periodTotal; +/* Generated */ periodTotal -= inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = tempReal / optInTimePeriod; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SQRT.c b/src/ta-lib/src/ta_func/ta_SQRT.c new file mode 100644 index 000000000..d6348786c --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SQRT.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SqrtLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int sqrtLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SQRT_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SQRT - Vector Square Root + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sqrt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SQRT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_sqrt(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sqrt( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SQRT( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_sqrt(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_STDDEV.c b/src/ta-lib/src/ta_func/ta_STDDEV.c new file mode 100644 index 000000000..a799500cb --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_STDDEV.c @@ -0,0 +1,519 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JV Jesus Viver <324122@cienz.unizar.es> + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 100502 JV Speed optimization of the algorithm + * 052603 MF Adapt code to compile with .NET Managed C++ + * 090404 MF Fix #978056. Trap sqrt with negative zero values. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::StdDevLookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int stdDevLookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_STDDEV_Lookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) +/* Generated */ optInNbDev = 1.000000e+0; +/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Lookback is driven by the variance. */ + return LOOKBACK_CALL(VAR)( optInTimePeriod, optInNbDev ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_STDDEV - Standard Deviation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) + * Nb of deviations + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stdDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_STDDEV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int i; + ENUM_DECLARATION(RetCode) retCode; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) +/* Generated */ optInNbDev = 1.000000e+0; +/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Calculate the variance. */ + retCode = FUNCTION_CALL(INT_VAR)( startIdx, endIdx, + inReal, optInTimePeriod, + outBegIdx, outNBElement, outReal ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + return retCode; + + /* Calculate the square root of each variance, this + * is the standard deviation. + * + * Multiply also by the ratio specified. + */ + if( optInNbDev != 1.0 ) + { + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = outReal[i]; + if( !TA_IS_ZERO_OR_NEG(tempReal) ) + outReal[i] = std_sqrt(tempReal) * optInNbDev; + else + outReal[i] = (double)0.0; + } + } + else + { + for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) + { + tempReal = outReal[i]; + if( !TA_IS_ZERO_OR_NEG(tempReal) ) + outReal[i] = std_sqrt(tempReal); + else + outReal[i] = (double)0.0; + } + } + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) + // No INT function +#else + +/* The inMovAvg is the moving average of the inReal. + * + * inMovAvgBegIdx is relative to inReal, in other word + * this is the 'outBegIdx' who was returned when doing the + * MA on the inReal. + * + * inMovAvgNbElement is the number of element who was returned + * when doing the MA on the inReal. + * + * Note: This function is not used by TA_STDDEV, since TA_STDDEV + * is optimized considering it uses always a simple moving + * average. Still the function is put here because it is + * closely related. + */ +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) +void Core::TA_INT_stddev_using_precalc_ma( SubArray^ inReal, + SubArray^ inMovAvg, + int inMovAvgBegIdx, + int inMovAvgNbElement, + int timePeriod, + SubArray^ output) +#elif defined( _MANAGED ) +void Core::TA_INT_stddev_using_precalc_ma( cli::array^ inReal, + cli::array^ inMovAvg, + int inMovAvgBegIdx, + int inMovAvgNbElement, + int timePeriod, + cli::array^ output) +#elif defined( _JAVA ) +void TA_INT_stddev_using_precalc_ma( INPUT_TYPE inReal[], + double inMovAvg[], + int inMovAvgBegIdx, + int inMovAvgNbElement, + int timePeriod, + double output[] ) +#else +void TA_PREFIX(INT_stddev_using_precalc_ma)( const INPUT_TYPE *inReal, + const double *inMovAvg, + int inMovAvgBegIdx, + int inMovAvgNbElement, + int timePeriod, + double *output ) +#endif +{ + double tempReal, periodTotal2, meanValue2; + int outIdx; + + /* Start/end index for sumation. */ + int startSum, endSum; + + startSum = 1+inMovAvgBegIdx-timePeriod; + endSum = inMovAvgBegIdx; + + periodTotal2 = 0; + + for( outIdx = startSum; outIdx < endSum; outIdx++) + { + tempReal = inReal[outIdx]; + tempReal *= tempReal; + periodTotal2 += tempReal; + } + + for( outIdx=0; outIdx < inMovAvgNbElement; outIdx++, startSum++, endSum++ ) + { + tempReal = inReal[endSum]; + tempReal *= tempReal; + periodTotal2 += tempReal; + meanValue2 = periodTotal2/timePeriod; + + tempReal = inReal[startSum]; + tempReal *= tempReal; + periodTotal2 -= tempReal; + + tempReal = inMovAvg[outIdx]; + tempReal *= tempReal; + meanValue2 -= tempReal; + + if( !TA_IS_ZERO_OR_NEG(meanValue2) ) + output[outIdx] = std_sqrt(meanValue2); + else + output[outIdx] = (double)0.0; + } +} +#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stdDev( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_STDDEV( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int i; +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) +/* Generated */ optInNbDev = 1.000000e+0; +/* Generated */ else if( (optInNbDev < -3.000000e+37) || (optInNbDev > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL(INT_VAR)( startIdx, endIdx, +/* Generated */ inReal, optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ return retCode; +/* Generated */ if( optInNbDev != 1.0 ) +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = outReal[i]; +/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) +/* Generated */ outReal[i] = std_sqrt(tempReal) * optInNbDev; +/* Generated */ else +/* Generated */ outReal[i] = (double)0.0; +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) +/* Generated */ { +/* Generated */ tempReal = outReal[i]; +/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) +/* Generated */ outReal[i] = std_sqrt(tempReal); +/* Generated */ else +/* Generated */ outReal[i] = (double)0.0; +/* Generated */ } +/* Generated */ } +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ // No INT function +/* Generated */ #else +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ void Core::TA_INT_stddev_using_precalc_ma( SubArray^ inReal, +/* Generated */ SubArray^ inMovAvg, +/* Generated */ int inMovAvgBegIdx, +/* Generated */ int inMovAvgNbElement, +/* Generated */ int timePeriod, +/* Generated */ SubArray^ output) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ void Core::TA_INT_stddev_using_precalc_ma( cli::array^ inReal, +/* Generated */ cli::array^ inMovAvg, +/* Generated */ int inMovAvgBegIdx, +/* Generated */ int inMovAvgNbElement, +/* Generated */ int timePeriod, +/* Generated */ cli::array^ output) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ void TA_INT_stddev_using_precalc_ma( INPUT_TYPE inReal[], +/* Generated */ double inMovAvg[], +/* Generated */ int inMovAvgBegIdx, +/* Generated */ int inMovAvgNbElement, +/* Generated */ int timePeriod, +/* Generated */ double output[] ) +/* Generated */ #else +/* Generated */ void TA_PREFIX(INT_stddev_using_precalc_ma)( const INPUT_TYPE *inReal, +/* Generated */ const double *inMovAvg, +/* Generated */ int inMovAvgBegIdx, +/* Generated */ int inMovAvgNbElement, +/* Generated */ int timePeriod, +/* Generated */ double *output ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double tempReal, periodTotal2, meanValue2; +/* Generated */ int outIdx; +/* Generated */ int startSum, endSum; +/* Generated */ startSum = 1+inMovAvgBegIdx-timePeriod; +/* Generated */ endSum = inMovAvgBegIdx; +/* Generated */ periodTotal2 = 0; +/* Generated */ for( outIdx = startSum; outIdx < endSum; outIdx++) +/* Generated */ { +/* Generated */ tempReal = inReal[outIdx]; +/* Generated */ tempReal *= tempReal; +/* Generated */ periodTotal2 += tempReal; +/* Generated */ } +/* Generated */ for( outIdx=0; outIdx < inMovAvgNbElement; outIdx++, startSum++, endSum++ ) +/* Generated */ { +/* Generated */ tempReal = inReal[endSum]; +/* Generated */ tempReal *= tempReal; +/* Generated */ periodTotal2 += tempReal; +/* Generated */ meanValue2 = periodTotal2/timePeriod; +/* Generated */ tempReal = inReal[startSum]; +/* Generated */ tempReal *= tempReal; +/* Generated */ periodTotal2 -= tempReal; +/* Generated */ tempReal = inMovAvg[outIdx]; +/* Generated */ tempReal *= tempReal; +/* Generated */ meanValue2 -= tempReal; +/* Generated */ if( !TA_IS_ZERO_OR_NEG(meanValue2) ) +/* Generated */ output[outIdx] = std_sqrt(meanValue2); +/* Generated */ else +/* Generated */ output[outIdx] = (double)0.0; +/* Generated */ } +/* Generated */ } +/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_STOCH.c b/src/ta-lib/src/ta_func/ta_STOCH.c new file mode 100644 index 000000000..3b7b25646 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_STOCH.c @@ -0,0 +1,820 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::StochLookback( int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int stochLookback( int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_STOCH_Lookback( int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSlowD_MAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastK_Period. */ +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowK_Period. */ +/* Generated */ if( (int)optInSlowK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowK_Period = 3; +/* Generated */ else if( ((int)optInSlowK_Period < 1) || ((int)optInSlowK_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowK_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowK_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowK_MAType < 0) || ((int)optInSlowK_MAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSlowD_Period. */ +/* Generated */ if( (int)optInSlowD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowD_Period = 3; +/* Generated */ else if( ((int)optInSlowD_Period < 1) || ((int)optInSlowD_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowD_MAType < 0) || ((int)optInSlowD_MAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Account for the initial data needed for Fast-K. */ + retValue = (optInFastK_Period - 1); + + /* Add the smoothing being done for %K slow */ + retValue += LOOKBACK_CALL(MA)( optInSlowK_Period, optInSlowK_MAType ); + + /* Add the smoothing being done for %D slow. */ + retValue += LOOKBACK_CALL(MA)( optInSlowD_Period, optInSlowD_MAType ); + + return retValue; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_STOCH - Stochastic + * + * Input = High, Low, Close + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInSlowK_Period:(From 1 to 100000) + * Smoothing for making the Slow-K line. Usually set to 3 + * + * optInSlowK_MAType: + * Type of Moving Average for Slow-K + * + * optInSlowD_Period:(From 1 to 100000) + * Smoothing for making the Slow-D line + * + * optInSlowD_MAType: + * Type of Moving Average for Slow-D + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outSlowK, +/* Generated */ SubArray^ outSlowD ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outSlowK, +/* Generated */ cli::array^ outSlowD ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stoch( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outSlowK[], +/* Generated */ double outSlowD[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_STOCH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSlowD_MAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outSlowK[], +/* Generated */ double outSlowD[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ENUM_DECLARATION(RetCode) retCode; + double lowest, highest, tmp, diff; + ARRAY_REF( tempBuffer ); + int outIdx, lowestIdx, highestIdx; + int lookbackTotal, lookbackK, lookbackKSlow, lookbackDSlow; + int trailingIdx, today, i; + #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) &&!defined(_JAVA) + int bufferIsAllocated; + #endif + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastK_Period. */ +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInSlowK_Period. */ +/* Generated */ if( (int)optInSlowK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowK_Period = 3; +/* Generated */ else if( ((int)optInSlowK_Period < 1) || ((int)optInSlowK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowK_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowK_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowK_MAType < 0) || ((int)optInSlowK_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInSlowD_Period. */ +/* Generated */ if( (int)optInSlowD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowD_Period = 3; +/* Generated */ else if( ((int)optInSlowD_Period < 1) || ((int)optInSlowD_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowD_MAType < 0) || ((int)optInSlowD_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outSlowK ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outSlowD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* With stochastic, there is a total of 4 different lines that + * are defined: FASTK, FASTD, SLOWK and SLOWD. + * + * The D is the signal line usually drawn over its + * corresponding K function. + * + * (Today's Close - LowestLow) + * FASTK(Kperiod) = --------------------------- * 100 + * (HighestHigh - LowestLow) + * + * FASTD(FastDperiod, MA type) = MA Smoothed FASTK over FastDperiod + * + * SLOWK(SlowKperiod, MA type) = MA Smoothed FASTK over SlowKperiod + * + * SLOWD(SlowDperiod, MA Type) = MA Smoothed SLOWK over SlowDperiod + * + * The HighestHigh and LowestLow are the extreme values among the + * last 'Kperiod'. + * + * SLOWK and FASTD are equivalent when using the same period. + * + * The following shows how these four lines are made available in TA-LIB: + * + * TA_STOCH : Returns the SLOWK and SLOWD + * TA_STOCHF : Returns the FASTK and FASTD + * + * The TA_STOCH function correspond to the more widely implemented version + * found in many software/charting package. The TA_STOCHF is more rarely + * used because its higher volatility cause often whipsaws. + */ + + /* Identify the lookback needed. */ + lookbackK = optInFastK_Period-1; + lookbackKSlow = LOOKBACK_CALL(MA)( optInSlowK_Period, optInSlowK_MAType ); + lookbackDSlow = LOOKBACK_CALL(MA)( optInSlowD_Period, optInSlowD_MAType ); + lookbackTotal = lookbackK + lookbackDSlow + lookbackKSlow; + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + /* Succeed... but no data in the output. */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the K calculation: + * + * Kt = 100 x ((Ct-Lt)/(Ht-Lt)) + * + * Kt is today stochastic + * Ct is today closing price. + * Lt is the lowest price of the last K Period (including today) + * Ht is the highest price of the last K Period (including today) + */ + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + + /* Calculate just enough K for ending up with the caller + * requested range. (The range of k must consider all + * the lookback involve with the smoothing). + */ + trailingIdx = startIdx-lookbackTotal; + today = trailingIdx+lookbackK; + lowestIdx = highestIdx = -1; + diff = highest = lowest = 0.0; + + /* Allocate a temporary buffer large enough to + * store the K. + * + * If the output is the same as the input, great + * we just save ourself one memory allocation. + */ + #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) + bufferIsAllocated = 0; + #endif + + #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) + /* Always alloc, since output is of different type and + * its allocated size is not guarantee to be as large as + * the input. + */ + ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); + #else + if( (outSlowK == inHigh) || + (outSlowK == inLow) || + (outSlowK == inClose) ) + { + tempBuffer = outSlowK; + } + else if( (outSlowD == inHigh) || + (outSlowD == inLow) || + (outSlowD == inClose) ) + { + tempBuffer = outSlowD; + } + else + { + #if !defined( _MANAGED ) && !defined(_JAVA) + bufferIsAllocated = 1; + #endif + ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); + } + #endif + + /* Do the K calculation */ + while( today <= endIdx ) + { + /* Set the lowest low */ + tmp = inLow[today]; + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inLow[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inLow[i]; + if( tmp < lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + diff = (highest - lowest)/100.0; + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + diff = (highest - lowest)/100.0; + } + + /* Set the highest high */ + tmp = inHigh[today]; + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inHigh[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inHigh[i]; + if( tmp > highest ) + { + highestIdx = i; + highest = tmp; + } + } + diff = (highest - lowest)/100.0; + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + diff = (highest - lowest)/100.0; + } + + /* Calculate stochastic. */ + if( diff != 0.0 ) + tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; + else + tempBuffer[outIdx++] = 0.0; + + trailingIdx++; + today++; + } + + /* Un-smoothed K calculation completed. This K calculation is not returned + * to the caller. It is always smoothed and then return. + * Some documentation will refer to the smoothed version as being + * "K-Slow", but often this end up to be shorten to "K". + */ + retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, + tempBuffer, optInSlowK_Period, + optInSlowK_MAType, + outBegIdx, outNBElement, tempBuffer ); + + + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) + { + #if defined(USE_SINGLE_PRECISION_INPUT) + ARRAY_FREE( tempBuffer ); + #else + ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); + #endif + /* Something wrong happen? No further data? */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Calculate the %D which is simply a moving average of + * the already smoothed %K. + */ + retCode = FUNCTION_CALL_DOUBLE(MA)( 0, (int)VALUE_HANDLE_DEREF(outNBElement)-1, + tempBuffer, optInSlowD_Period, + optInSlowD_MAType, + outBegIdx, outNBElement, outSlowD ); + + /* Copy tempBuffer into the caller buffer. + * (Calculation could not be done directly in the + * caller buffer because more input data then the + * requested range was needed for doing %D). + */ + ARRAY_MEMMOVE( outSlowK, 0, tempBuffer,lookbackDSlow,(int)VALUE_HANDLE_DEREF(outNBElement)); + + /* Don't need K anymore, free it if it was allocated here. */ + #if defined(USE_SINGLE_PRECISION_INPUT) + ARRAY_FREE( tempBuffer ); + #else + ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); + #endif + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + /* Something wrong happen while processing %D? */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Note: Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outSlowK, +/* Generated */ SubArray^ outSlowD ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outSlowK, +/* Generated */ cli::array^ outSlowD ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stoch( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInSlowD_MAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outSlowK[], +/* Generated */ double outSlowD[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_STOCH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSlowK_MAType, +/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInSlowD_MAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outSlowK[], +/* Generated */ double outSlowD[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ double lowest, highest, tmp, diff; +/* Generated */ ARRAY_REF( tempBuffer ); +/* Generated */ int outIdx, lowestIdx, highestIdx; +/* Generated */ int lookbackTotal, lookbackK, lookbackKSlow, lookbackDSlow; +/* Generated */ int trailingIdx, today, i; +/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) &&!defined(_JAVA) +/* Generated */ int bufferIsAllocated; +/* Generated */ #endif +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInSlowK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowK_Period = 3; +/* Generated */ else if( ((int)optInSlowK_Period < 1) || ((int)optInSlowK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowK_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowK_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowK_MAType < 0) || ((int)optInSlowK_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInSlowD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowD_Period = 3; +/* Generated */ else if( ((int)optInSlowD_Period < 1) || ((int)optInSlowD_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInSlowD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInSlowD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInSlowD_MAType < 0) || ((int)optInSlowD_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outSlowK ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outSlowD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackK = optInFastK_Period-1; +/* Generated */ lookbackKSlow = LOOKBACK_CALL(MA)( optInSlowK_Period, optInSlowK_MAType ); +/* Generated */ lookbackDSlow = LOOKBACK_CALL(MA)( optInSlowD_Period, optInSlowD_MAType ); +/* Generated */ lookbackTotal = lookbackK + lookbackDSlow + lookbackKSlow; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ trailingIdx = startIdx-lookbackTotal; +/* Generated */ today = trailingIdx+lookbackK; +/* Generated */ lowestIdx = highestIdx = -1; +/* Generated */ diff = highest = lowest = 0.0; +/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) +/* Generated */ bufferIsAllocated = 0; +/* Generated */ #endif +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) +/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); +/* Generated */ #else +/* Generated */ if( (outSlowK == inHigh) || +/* Generated */ (outSlowK == inLow) || +/* Generated */ (outSlowK == inClose) ) +/* Generated */ { +/* Generated */ tempBuffer = outSlowK; +/* Generated */ } +/* Generated */ else if( (outSlowD == inHigh) || +/* Generated */ (outSlowD == inLow) || +/* Generated */ (outSlowD == inClose) ) +/* Generated */ { +/* Generated */ tempBuffer = outSlowD; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ #if !defined( _MANAGED ) && !defined(_JAVA) +/* Generated */ bufferIsAllocated = 1; +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); +/* Generated */ } +/* Generated */ #endif +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inLow[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inLow[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inLow[i]; +/* Generated */ if( tmp < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ tmp = inHigh[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inHigh[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inHigh[i]; +/* Generated */ if( tmp > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ if( diff != 0.0 ) +/* Generated */ tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; +/* Generated */ else +/* Generated */ tempBuffer[outIdx++] = 0.0; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, +/* Generated */ tempBuffer, optInSlowK_Period, +/* Generated */ optInSlowK_MAType, +/* Generated */ outBegIdx, outNBElement, tempBuffer ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) +/* Generated */ { +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ #else +/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, (int)VALUE_HANDLE_DEREF(outNBElement)-1, +/* Generated */ tempBuffer, optInSlowD_Period, +/* Generated */ optInSlowD_MAType, +/* Generated */ outBegIdx, outNBElement, outSlowD ); +/* Generated */ ARRAY_MEMMOVE( outSlowK, 0, tempBuffer,lookbackDSlow,(int)VALUE_HANDLE_DEREF(outNBElement)); +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ #else +/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); +/* Generated */ #endif +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_STOCHF.c b/src/ta-lib/src/ta_func/ta_STOCHF.c new file mode 100644 index 000000000..bde0ff79a --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_STOCHF.c @@ -0,0 +1,738 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * EKO echo999@ifrance.com + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 051103 EKO Found bug and fix related to outFastD. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::StochFLookback( int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int stochFLookback( int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_STOCHF_Lookback( int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInFastD_MAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInFastK_Period. */ +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInFastD_Period. */ +/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_Period = 3; +/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Account for the initial data needed for Fast-K. */ + retValue = (optInFastK_Period - 1); + + /* Add the smoothing being done for Fast-D */ + retValue += LOOKBACK_CALL(MA)( optInFastD_Period, optInFastD_MAType ); + + return retValue; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_STOCHF - Stochastic Fast + * + * Input = High, Low, Close + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInFastD_Period:(From 1 to 100000) + * Smoothing for making the Fast-D line. Usually set to 3 + * + * optInFastD_MAType: + * Type of Moving Average for Fast-D + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outFastK, +/* Generated */ SubArray^ outFastD ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outFastK, +/* Generated */ cli::array^ outFastD ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stochF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_STOCHF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInFastD_MAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ENUM_DECLARATION(RetCode) retCode; + double lowest, highest, tmp, diff; + ARRAY_REF( tempBuffer ); + int outIdx, lowestIdx, highestIdx; + int lookbackTotal, lookbackK, lookbackFastD; + int trailingIdx, today, i; + + #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) + int bufferIsAllocated; + #endif + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInFastK_Period. */ +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInFastD_Period. */ +/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_Period = 3; +/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outFastK ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outFastD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* With stochastic, there is a total of 4 different lines that + * are defined: FASTK, FASTD, SLOWK and SLOWD. + * + * The D is the signal line usually drawn over its + * corresponding K function. + * + * (Today's Close - LowestLow) + * FASTK(Kperiod) = --------------------------- * 100 + * (HighestHigh - LowestLow) + * + * FASTD(FastDperiod, MA type) = MA Smoothed FASTK over FastDperiod + * + * SLOWK(SlowKperiod, MA type) = MA Smoothed FASTK over SlowKperiod + * + * SLOWD(SlowDperiod, MA Type) = MA Smoothed SLOWK over SlowDperiod + * + * The HighestHigh and LowestLow are the extreme values among the + * last 'Kperiod'. + * + * SLOWK and FASTD are equivalent when using the same period. + * + * The following shows how these four lines are made available in TA-LIB: + * + * TA_STOCH : Returns the SLOWK and SLOWD + * TA_STOCHF : Returns the FASTK and FASTD + * + * The TA_STOCH function correspond to the more widely implemented version + * found in many software/charting package. The TA_STOCHF is more rarely + * used because its higher volatility cause often whipsaws. + */ + + /* Identify the lookback needed. */ + lookbackK = optInFastK_Period-1; + lookbackFastD = LOOKBACK_CALL(MA)( optInFastD_Period, optInFastD_MAType ); + lookbackTotal = lookbackK + lookbackFastD; + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + /* Succeed... but no data in the output. */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the K calculation: + * + * Kt = 100 x ((Ct-Lt)/(Ht-Lt)) + * + * Kt is today stochastic + * Ct is today closing price. + * Lt is the lowest price of the last K Period (including today) + * Ht is the highest price of the last K Period (including today) + */ + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + + /* Calculate just enough K for ending up with the caller + * requested range. (The range of k must consider all + * the lookback involve with the smoothing). + */ + trailingIdx = startIdx-lookbackTotal; + today = trailingIdx+lookbackK; + lowestIdx = highestIdx = -1; + diff = highest = lowest = 0.0; + + /* Allocate a temporary buffer large enough to + * store the K. + * + * If the output is the same as the input, great + * we just save ourself one memory allocation. + */ + #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) + bufferIsAllocated = 0; + #endif + + #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) + /* Always alloc, since output is of different type and + * its allocated size is not guarantee to be as large as + * the input. + */ + ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); + #else + if( (outFastK == inHigh) || + (outFastK == inLow) || + (outFastK == inClose) ) + { + tempBuffer = outFastK; + } + else if( (outFastD == inHigh) || + (outFastD == inLow) || + (outFastD == inClose) ) + { + tempBuffer = outFastD; + } + else + { + #if !defined( _MANAGED ) && !defined( _JAVA ) + bufferIsAllocated = 1; + #endif + ARRAY_ALLOC(tempBuffer, endIdx-today+1 ); + } + #endif + + /* Do the K calculation */ + while( today <= endIdx ) + { + /* Set the lowest low */ + tmp = inLow[today]; + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inLow[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inLow[i]; + if( tmp < lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + diff = (highest - lowest)/100.0; + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + diff = (highest - lowest)/100.0; + } + + /* Set the highest high */ + tmp = inHigh[today]; + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inHigh[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inHigh[i]; + if( tmp > highest ) + { + highestIdx = i; + highest = tmp; + } + } + diff = (highest - lowest)/100.0; + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + diff = (highest - lowest)/100.0; + } + + /* Calculate stochastic. */ + if( diff != 0.0 ) + tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; + else + tempBuffer[outIdx++] = 0.0; + + trailingIdx++; + today++; + } + + /* Fast-K calculation completed. This K calculation is returned + * to the caller. It is smoothed to become Fast-D. + */ + retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, + tempBuffer, optInFastD_Period, + optInFastD_MAType, + outBegIdx, outNBElement, outFastD ); + + + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) + { + #if defined(USE_SINGLE_PRECISION_INPUT) + ARRAY_FREE( tempBuffer ); + #else + ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); + #endif + /* Something wrong happen? No further data? */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Copy tempBuffer into the caller buffer. + * (Calculation could not be done directly in the + * caller buffer because more input data then the + * requested range was needed for doing %D). + */ + ARRAY_MEMMOVE( outFastK, 0, tempBuffer, lookbackFastD, (int)VALUE_HANDLE_DEREF(outNBElement) ); + + /* Don't need K anymore, free it if it was allocated here. */ + #if defined(USE_SINGLE_PRECISION_INPUT) + ARRAY_FREE( tempBuffer ); + #else + ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); + #endif + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) + { + /* Something wrong happen while processing %D? */ + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + /* Note: Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outFastK, +/* Generated */ SubArray^ outFastD ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outFastK, +/* Generated */ cli::array^ outFastD ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stochF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_STOCHF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInFastD_MAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ double lowest, highest, tmp, diff; +/* Generated */ ARRAY_REF( tempBuffer ); +/* Generated */ int outIdx, lowestIdx, highestIdx; +/* Generated */ int lookbackTotal, lookbackK, lookbackFastD; +/* Generated */ int trailingIdx, today, i; +/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) +/* Generated */ int bufferIsAllocated; +/* Generated */ #endif +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_Period = 3; +/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outFastK ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outFastD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackK = optInFastK_Period-1; +/* Generated */ lookbackFastD = LOOKBACK_CALL(MA)( optInFastD_Period, optInFastD_MAType ); +/* Generated */ lookbackTotal = lookbackK + lookbackFastD; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ trailingIdx = startIdx-lookbackTotal; +/* Generated */ today = trailingIdx+lookbackK; +/* Generated */ lowestIdx = highestIdx = -1; +/* Generated */ diff = highest = lowest = 0.0; +/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) +/* Generated */ bufferIsAllocated = 0; +/* Generated */ #endif +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) +/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); +/* Generated */ #else +/* Generated */ if( (outFastK == inHigh) || +/* Generated */ (outFastK == inLow) || +/* Generated */ (outFastK == inClose) ) +/* Generated */ { +/* Generated */ tempBuffer = outFastK; +/* Generated */ } +/* Generated */ else if( (outFastD == inHigh) || +/* Generated */ (outFastD == inLow) || +/* Generated */ (outFastD == inClose) ) +/* Generated */ { +/* Generated */ tempBuffer = outFastD; +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ bufferIsAllocated = 1; +/* Generated */ #endif +/* Generated */ ARRAY_ALLOC(tempBuffer, endIdx-today+1 ); +/* Generated */ } +/* Generated */ #endif +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inLow[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inLow[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inLow[i]; +/* Generated */ if( tmp < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ tmp = inHigh[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inHigh[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inHigh[i]; +/* Generated */ if( tmp > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ diff = (highest - lowest)/100.0; +/* Generated */ } +/* Generated */ if( diff != 0.0 ) +/* Generated */ tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; +/* Generated */ else +/* Generated */ tempBuffer[outIdx++] = 0.0; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, +/* Generated */ tempBuffer, optInFastD_Period, +/* Generated */ optInFastD_MAType, +/* Generated */ outBegIdx, outNBElement, outFastD ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) +/* Generated */ { +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ #else +/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ ARRAY_MEMMOVE( outFastK, 0, tempBuffer, lookbackFastD, (int)VALUE_HANDLE_DEREF(outNBElement) ); +/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ #else +/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); +/* Generated */ #endif +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_STOCHRSI.c b/src/ta-lib/src/ta_func/ta_STOCHRSI.c new file mode 100644 index 000000000..68c1d22d8 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_STOCHRSI.c @@ -0,0 +1,522 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * PP Peter Pudaite + * AA Andrew Atkinson + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 101103 PP Initial creation of code. + * 112603 MF Add independent control to the RSI period. + * 020605 AA Fix #1117656. NULL pointer assignement. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::StochRsiLookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType ) /* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int stochRsiLookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType ) /* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_STOCHRSI_Lookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInFastD_MAType ) /* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInFastK_Period. */ +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInFastD_Period. */ +/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_Period = 3; +/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + retValue = LOOKBACK_CALL(RSI)( optInTimePeriod ) + LOOKBACK_CALL(STOCHF)( optInFastK_Period, optInFastD_Period, optInFastD_MAType ); + + return retValue; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_STOCHRSI - Stochastic Relative Strength Index + * + * Input = double + * Output = double, double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInFastK_Period:(From 1 to 100000) + * Time period for building the Fast-K line + * + * optInFastD_Period:(From 1 to 100000) + * Smoothing for making the Fast-D line. Usually set to 3 + * + * optInFastD_MAType: + * Type of Moving Average for Fast-D + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outFastK, +/* Generated */ SubArray^ outFastD ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outFastK, +/* Generated */ cli::array^ outFastD ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stochRsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_STOCHRSI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInFastD_MAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + ARRAY_REF(tempRSIBuffer); + + ENUM_DECLARATION(RetCode) retCode; + int lookbackTotal, lookbackSTOCHF, tempArraySize; + VALUE_HANDLE_INT(outBegIdx1); + VALUE_HANDLE_INT(outBegIdx2); + VALUE_HANDLE_INT(outNbElement1); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInFastK_Period. */ +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInFastD_Period. */ +/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_Period = 3; +/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outFastK ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( !outFastD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Stochastic RSI + * + * Reference: "Stochastic RSI and Dynamic Momentum Index" + * by Tushar Chande and Stanley Kroll + * Stock&Commodities V.11:5 (189-199) + * + * The TA-Lib version offer flexibility beyond what is explain + * in the Stock&Commodities article. + * + * To calculate the "Unsmoothed stochastic RSI" with symetry like + * explain in the article, keep the optInTimePeriod and optInFastK_Period + * equal. Example: + * + * unsmoothed stoch RSI 14 : optInTimePeriod = 14 + * optInFastK_Period = 14 + * optInFastD_Period = 'x' + * + * The outFastK is the unsmoothed RSI discuss in the article. + * + * You can set the optInFastD_Period to smooth the RSI. The smooth + * version will be found in outFastD. The outFastK will still contain + * the unsmoothed stoch RSI. If you do not care about the smoothing of + * the StochRSI, just leave optInFastD_Period to 1 and ignore outFastD. + */ + + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Adjust startIdx to account for the lookback period. */ + lookbackSTOCHF = LOOKBACK_CALL(STOCHF)( optInFastK_Period, optInFastD_Period, optInFastD_MAType ); + lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ) + lookbackSTOCHF; + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + tempArraySize = (endIdx - startIdx) + 1 + lookbackSTOCHF; + + ARRAY_ALLOC( tempRSIBuffer, tempArraySize ); + + retCode = FUNCTION_CALL(RSI)(startIdx-lookbackSTOCHF, + endIdx, + inReal, + optInTimePeriod, + VALUE_HANDLE_OUT(outBegIdx1), + VALUE_HANDLE_OUT(outNbElement1), + tempRSIBuffer); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || VALUE_HANDLE_GET(outNbElement1) == 0 ) + { + ARRAY_FREE( tempRSIBuffer ); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + retCode = FUNCTION_CALL_DOUBLE(STOCHF)(0, + tempArraySize-1, + tempRSIBuffer, + tempRSIBuffer, + tempRSIBuffer, + optInFastK_Period, + optInFastD_Period, + optInFastD_MAType, + VALUE_HANDLE_OUT(outBegIdx2), + outNBElement, + outFastK, + outFastD); + + ARRAY_FREE( tempRSIBuffer ); + + if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return retCode; + } + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outFastK, +/* Generated */ SubArray^ outFastD ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outFastK, +/* Generated */ cli::array^ outFastD ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode stochRsi( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ MAType optInFastD_MAType, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_STOCHRSI( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ +/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ +/* Generated */ TA_MAType optInFastD_MAType, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outFastK[], +/* Generated */ double outFastD[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(tempRSIBuffer); +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int lookbackTotal, lookbackSTOCHF, tempArraySize; +/* Generated */ VALUE_HANDLE_INT(outBegIdx1); +/* Generated */ VALUE_HANDLE_INT(outBegIdx2); +/* Generated */ VALUE_HANDLE_INT(outNbElement1); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastK_Period = 5; +/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_Period = 3; +/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) +/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) +/* Generated */ optInFastD_MAType = (TA_MAType)0; +/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outFastK ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !outFastD ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ lookbackSTOCHF = LOOKBACK_CALL(STOCHF)( optInFastK_Period, optInFastD_Period, optInFastD_MAType ); +/* Generated */ lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ) + lookbackSTOCHF; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ tempArraySize = (endIdx - startIdx) + 1 + lookbackSTOCHF; +/* Generated */ ARRAY_ALLOC( tempRSIBuffer, tempArraySize ); +/* Generated */ retCode = FUNCTION_CALL(RSI)(startIdx-lookbackSTOCHF, +/* Generated */ endIdx, +/* Generated */ inReal, +/* Generated */ optInTimePeriod, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), +/* Generated */ VALUE_HANDLE_OUT(outNbElement1), +/* Generated */ tempRSIBuffer); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || VALUE_HANDLE_GET(outNbElement1) == 0 ) +/* Generated */ { +/* Generated */ ARRAY_FREE( tempRSIBuffer ); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(STOCHF)(0, +/* Generated */ tempArraySize-1, +/* Generated */ tempRSIBuffer, +/* Generated */ tempRSIBuffer, +/* Generated */ tempRSIBuffer, +/* Generated */ optInFastK_Period, +/* Generated */ optInFastD_Period, +/* Generated */ optInFastD_MAType, +/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), +/* Generated */ outNBElement, +/* Generated */ outFastK, +/* Generated */ outFastD); +/* Generated */ ARRAY_FREE( tempRSIBuffer ); +/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SUB.c b/src/ta-lib/src/ta_func/ta_SUB.c new file mode 100644 index 000000000..d7d3b6a2d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SUB.c @@ -0,0 +1,261 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SubLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int subLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SUB_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SUB - Vector Arithmetic Subtraction + * + * Input = double, double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sub( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal0[], +/* Generated */ double inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SUB( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal0[], +/* Generated */ const double inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Default return values */ + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = inReal0[i]-inReal1[i]; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal0, +/* Generated */ SubArray^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal0, +/* Generated */ cli::array^ inReal1, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sub( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal0[], +/* Generated */ float inReal1[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SUB( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal0[], +/* Generated */ const float inReal1[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = inReal0[i]-inReal1[i]; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_SUM.c b/src/ta-lib/src/ta_func/ta_SUM.c new file mode 100644 index 000000000..4bbdc3cd4 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_SUM.c @@ -0,0 +1,344 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::SumLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int sumLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_SUM_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_SUM - Summation + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sum( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_SUM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double periodTotal, tempReal; + int i, outIdx, trailingIdx, lookbackTotal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the MA calculation using tight loops. */ + + /* Add-up the initial period, except for the last value. */ + periodTotal = 0; + trailingIdx = startIdx-lookbackTotal; + + i=trailingIdx; + if( optInTimePeriod > 1 ) + { + while( i < startIdx ) + periodTotal += inReal[i++]; + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the inReal and + * outReal to be the same buffer. + */ + outIdx = 0; + do + { + periodTotal += inReal[i++]; + tempReal = periodTotal; + periodTotal -= inReal[trailingIdx++]; + outReal[outIdx++] = tempReal; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode sum( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_SUM( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double periodTotal, tempReal; +/* Generated */ int i, outIdx, trailingIdx, lookbackTotal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = (optInTimePeriod-1); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ periodTotal = 0; +/* Generated */ trailingIdx = startIdx-lookbackTotal; +/* Generated */ i=trailingIdx; +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ { +/* Generated */ while( i < startIdx ) +/* Generated */ periodTotal += inReal[i++]; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ periodTotal += inReal[i++]; +/* Generated */ tempReal = periodTotal; +/* Generated */ periodTotal -= inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = tempReal; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_T3.c b/src/ta-lib/src/ta_func/ta_T3.c new file mode 100644 index 000000000..6088b5077 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_T3.c @@ -0,0 +1,536 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MHL Matthew Lindblom + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 120802 MF Template creation. + * 032003 MHL Implementation of T3 + * 040503 MF Adapt for compatibility with published code + * for TradeStation and Metastock. + * See "Smoothing Techniques For More Accurate Signals" + * from Tim Tillson in Stock&Commodities V16:1 Page 33-37 + * 052603 MF Adapt code to compile with .NET Managed C++ + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::T3Lookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor ) /* From 0 to 1 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int t3Lookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor ) /* From 0 to 1 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_T3_Lookback( int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor ) /* From 0 to 1 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInVFactor == TA_REAL_DEFAULT ) +/* Generated */ optInVFactor = 7.000000e-1; +/* Generated */ else if( (optInVFactor < 0.000000e+0) ||/* Generated */ (optInVFactor > 1.000000e+0) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInVFactor); + return 6 * (optInTimePeriod-1) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_T3,T3); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_T3 - Triple Exponential Moving Average (T3) + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * optInVFactor:(From 0 to 1) + * Volume Factor + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::T3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::T3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode t3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_T3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + + int outIdx, lookbackTotal; + int today, i; + double k, one_minus_k; + double e1, e2, e3, e4, e5, e6; + double c1, c2, c3, c4; + double tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInVFactor == TA_REAL_DEFAULT ) +/* Generated */ optInVFactor = 7.000000e-1; +/* Generated */ else if( (optInVFactor < 0.000000e+0) ||/* Generated */ (optInVFactor > 1.000000e+0) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* For an explanation of this function, please read: + * + * Magazine articles written by Tim Tillson + * + * Essentially, a T3 of time serie 't' is: + * EMA1(x,Period) = EMA(x,Period) + * EMA2(x,Period) = EMA(EMA1(x,Period),Period) + * GD(x,Period,vFactor) = (EMA1(x,Period)*(1+vFactor)) - (EMA2(x,Period)*vFactor) + * T3 = GD (GD ( GD(t, Period, vFactor), Period, vFactor), Period, vFactor); + * + * T3 offers a moving average with less lags then the + * traditional EMA. + * + * Do not confuse a T3 with EMA3. Both are called "Triple EMA" + * in the litterature. + * + */ + lookbackTotal = 6 * (optInTimePeriod - 1) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_T3,T3); + if( startIdx <= lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + today = startIdx - lookbackTotal; + + k = 2.0/(optInTimePeriod+1.0); + one_minus_k = 1.0-k; + + /* Initialize e1 */ + tempReal = inReal[today++]; + for( i=optInTimePeriod-1; i > 0 ; i-- ) + tempReal += inReal[today++]; + e1 = tempReal / optInTimePeriod; + + /* Initialize e2 */ + tempReal = e1; + for( i=optInTimePeriod-1; i > 0 ; i-- ) + { + e1 = (k*inReal[today++])+(one_minus_k*e1); + tempReal += e1; + } + e2 = tempReal / optInTimePeriod; + + /* Initialize e3 */ + tempReal = e2; + for( i=optInTimePeriod-1; i > 0 ; i-- ) + { + e1 = (k*inReal[today++])+(one_minus_k*e1); + e2 = (k*e1)+(one_minus_k*e2); + tempReal += e2; + } + e3 = tempReal / optInTimePeriod; + + /* Initialize e4 */ + tempReal = e3; + for( i=optInTimePeriod-1; i > 0 ; i-- ) + { + e1 = (k*inReal[today++])+(one_minus_k*e1); + e2 = (k*e1)+(one_minus_k*e2); + e3 = (k*e2)+(one_minus_k*e3); + tempReal += e3; + } + e4 = tempReal / optInTimePeriod; + + /* Initialize e5 */ + tempReal = e4; + for( i=optInTimePeriod-1; i > 0 ; i-- ) + { + e1 = (k*inReal[today++])+(one_minus_k*e1); + e2 = (k*e1)+(one_minus_k*e2); + e3 = (k*e2)+(one_minus_k*e3); + e4 = (k*e3)+(one_minus_k*e4); + tempReal += e4; + } + e5 = tempReal / optInTimePeriod; + + /* Initialize e6 */ + tempReal = e5; + for( i=optInTimePeriod-1; i > 0 ; i-- ) + { + e1 = (k*inReal[today++])+(one_minus_k*e1); + e2 = (k*e1)+(one_minus_k*e2); + e3 = (k*e2)+(one_minus_k*e3); + e4 = (k*e3)+(one_minus_k*e4); + e5 = (k*e4)+(one_minus_k*e5); + tempReal += e5; + } + e6 = tempReal / optInTimePeriod; + + /* Skip the unstable period */ + while( today <= startIdx ) + { + /* Do the calculation but do not write the output */ + e1 = (k*inReal[today++])+(one_minus_k*e1); + e2 = (k*e1)+(one_minus_k*e2); + e3 = (k*e2)+(one_minus_k*e3); + e4 = (k*e3)+(one_minus_k*e4); + e5 = (k*e4)+(one_minus_k*e5); + e6 = (k*e5)+(one_minus_k*e6); + } + + /* Calculate the constants */ + tempReal = optInVFactor * optInVFactor; + c1 = -(tempReal * optInVFactor); + c2 = 3.0 * (tempReal - c1); + c3 = -6.0 * tempReal - 3.0 * (optInVFactor-c1); + c4 = 1.0 + 3.0 * optInVFactor - c1 + 3.0 * tempReal; + + /* Write the first output */ + outIdx = 0; + outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; + + /* Calculate and output the remaining of the range. */ + while( today <= endIdx ) + { + e1 = (k*inReal[today++])+(one_minus_k*e1); + e2 = (k*e1)+(one_minus_k*e2); + e3 = (k*e2)+(one_minus_k*e3); + e4 = (k*e3)+(one_minus_k*e4); + e5 = (k*e4)+(one_minus_k*e5); + e6 = (k*e5)+(one_minus_k*e6); + outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; + } + + /* Indicates to the caller the number of output + * successfully calculated. + */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::T3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::T3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode t3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_T3( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ double optInVFactor, /* From 0 to 1 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, lookbackTotal; +/* Generated */ int today, i; +/* Generated */ double k, one_minus_k; +/* Generated */ double e1, e2, e3, e4, e5, e6; +/* Generated */ double c1, c2, c3, c4; +/* Generated */ double tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInVFactor == TA_REAL_DEFAULT ) +/* Generated */ optInVFactor = 7.000000e-1; +/* Generated */ else if( (optInVFactor < 0.000000e+0) || (optInVFactor > 1.000000e+0) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = 6 * (optInTimePeriod - 1) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_T3,T3); +/* Generated */ if( startIdx <= lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ today = startIdx - lookbackTotal; +/* Generated */ k = 2.0/(optInTimePeriod+1.0); +/* Generated */ one_minus_k = 1.0-k; +/* Generated */ tempReal = inReal[today++]; +/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) +/* Generated */ tempReal += inReal[today++]; +/* Generated */ e1 = tempReal / optInTimePeriod; +/* Generated */ tempReal = e1; +/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ tempReal += e1; +/* Generated */ } +/* Generated */ e2 = tempReal / optInTimePeriod; +/* Generated */ tempReal = e2; +/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ e2 = (k*e1)+(one_minus_k*e2); +/* Generated */ tempReal += e2; +/* Generated */ } +/* Generated */ e3 = tempReal / optInTimePeriod; +/* Generated */ tempReal = e3; +/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ e2 = (k*e1)+(one_minus_k*e2); +/* Generated */ e3 = (k*e2)+(one_minus_k*e3); +/* Generated */ tempReal += e3; +/* Generated */ } +/* Generated */ e4 = tempReal / optInTimePeriod; +/* Generated */ tempReal = e4; +/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ e2 = (k*e1)+(one_minus_k*e2); +/* Generated */ e3 = (k*e2)+(one_minus_k*e3); +/* Generated */ e4 = (k*e3)+(one_minus_k*e4); +/* Generated */ tempReal += e4; +/* Generated */ } +/* Generated */ e5 = tempReal / optInTimePeriod; +/* Generated */ tempReal = e5; +/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ e2 = (k*e1)+(one_minus_k*e2); +/* Generated */ e3 = (k*e2)+(one_minus_k*e3); +/* Generated */ e4 = (k*e3)+(one_minus_k*e4); +/* Generated */ e5 = (k*e4)+(one_minus_k*e5); +/* Generated */ tempReal += e5; +/* Generated */ } +/* Generated */ e6 = tempReal / optInTimePeriod; +/* Generated */ while( today <= startIdx ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ e2 = (k*e1)+(one_minus_k*e2); +/* Generated */ e3 = (k*e2)+(one_minus_k*e3); +/* Generated */ e4 = (k*e3)+(one_minus_k*e4); +/* Generated */ e5 = (k*e4)+(one_minus_k*e5); +/* Generated */ e6 = (k*e5)+(one_minus_k*e6); +/* Generated */ } +/* Generated */ tempReal = optInVFactor * optInVFactor; +/* Generated */ c1 = -(tempReal * optInVFactor); +/* Generated */ c2 = 3.0 * (tempReal - c1); +/* Generated */ c3 = -6.0 * tempReal - 3.0 * (optInVFactor-c1); +/* Generated */ c4 = 1.0 + 3.0 * optInVFactor - c1 + 3.0 * tempReal; +/* Generated */ outIdx = 0; +/* Generated */ outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); +/* Generated */ e2 = (k*e1)+(one_minus_k*e2); +/* Generated */ e3 = (k*e2)+(one_minus_k*e3); +/* Generated */ e4 = (k*e3)+(one_minus_k*e4); +/* Generated */ e5 = (k*e4)+(one_minus_k*e5); +/* Generated */ e6 = (k*e5)+(one_minus_k*e6); +/* Generated */ outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TAN.c b/src/ta-lib/src/ta_func/ta_TAN.c new file mode 100644 index 000000000..78e3664bb --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TAN.c @@ -0,0 +1,249 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TanLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int tanLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TAN_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TAN - Vector Trigonometric Tan + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_tan(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tan( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TAN( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_tan(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TANH.c b/src/ta-lib/src/ta_func/ta_TANH.c new file mode 100644 index 000000000..90c9444c0 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TANH.c @@ -0,0 +1,250 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090807 MF Initial Version + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TanhLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int tanhLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TANH_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TANH - Vector Trigonometric Tanh + * + * Input = double + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tanh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TANH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + int i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) + { + outReal[outIdx] = std_tanh(inReal[i]); + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tanh( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TANH( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) +/* Generated */ { +/* Generated */ outReal[outIdx] = std_tanh(inReal[i]); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TEMA.c b/src/ta-lib/src/ta_func/ta_TEMA.c new file mode 100644 index 000000000..9d0a2b386 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TEMA.c @@ -0,0 +1,492 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TemaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int temaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TEMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int retValue; + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* Get lookack for one EMA. */ + retValue = LOOKBACK_CALL(EMA)( optInTimePeriod ); + + return retValue * 3; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TEMA - Triple Exponential Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TEMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + ARRAY_REF(firstEMA); + ARRAY_REF(secondEMA); + double k; + + VALUE_HANDLE_INT(firstEMABegIdx); + VALUE_HANDLE_INT(firstEMANbElement); + VALUE_HANDLE_INT(secondEMABegIdx); + VALUE_HANDLE_INT(secondEMANbElement); + VALUE_HANDLE_INT(thirdEMABegIdx); + VALUE_HANDLE_INT(thirdEMANbElement); + + int tempInt, outIdx, lookbackTotal, lookbackEMA; + int firstEMAIdx, secondEMAIdx; + + ENUM_DECLARATION(RetCode) retCode; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* For an explanation of this function, please read: + * + * Stocks & Commodities V. 12:1 (11-19): + * Smoothing Data With Faster Moving Averages + * Stocks & Commodities V. 12:2 (72-80): + * Smoothing Data With Less Lag + * + * Both magazine articles written by Patrick G. Mulloy + * + * Essentially, a TEMA of time serie 't' is: + * EMA1 = EMA(t,period) + * EMA2 = EMA(EMA(t,period),period) + * EMA3 = EMA(EMA(EMA(t,period),period)) + * TEMA = 3*EMA1 - 3*EMA2 + EMA3 + * + * TEMA offers a moving average with less lags then the + * traditional EMA. + * + * Do not confuse a TEMA with EMA3. Both are called "Triple EMA" + * in the litterature. + * + * DEMA is very similar (and from the same author). + */ + + /* Will change only on success. */ + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + + /* Adjust startIdx to account for the lookback period. */ + lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); + lookbackTotal = lookbackEMA * 3; + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + /* Allocate a temporary buffer for the firstEMA. */ + tempInt = lookbackTotal+(endIdx-startIdx)+1; + ARRAY_ALLOC(firstEMA,tempInt); + #if !defined( _JAVA ) + if( !firstEMA ) + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + #endif + + /* Calculate the first EMA */ + k = PER_TO_K(optInTimePeriod); + retCode = FUNCTION_CALL(INT_EMA)( startIdx-(lookbackEMA*2), endIdx, inReal, + optInTimePeriod, k, + VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), + firstEMA ); + + /* Verify for failure or if not enough data after + * calculating the first EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) + { + ARRAY_FREE( firstEMA ); + return retCode; + } + + /* Allocate a temporary buffer for storing the EMA2 */ + ARRAY_ALLOC(secondEMA,VALUE_HANDLE_GET(firstEMANbElement)); + #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) + if( !secondEMA ) + { + ARRAY_FREE( firstEMA ); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, + optInTimePeriod, k, + VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), + secondEMA ); + + /* Return empty output on failure or if not enough data after + * calculating the second EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) + { + ARRAY_FREE( firstEMA ); + ARRAY_FREE( secondEMA ); + return retCode; + } + + /* Calculate the EMA3 into the caller provided output. */ + retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(secondEMANbElement)-1, secondEMA, + optInTimePeriod, k, + VALUE_HANDLE_OUT(thirdEMABegIdx), VALUE_HANDLE_OUT(thirdEMANbElement), + outReal ); + + /* Return empty output on failure or if not enough data after + * calculating the third EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(thirdEMANbElement) == 0) ) + { + ARRAY_FREE( firstEMA ); + ARRAY_FREE( secondEMA ); + return retCode; + } + + /* Indicate where the output starts relative to + * the caller input. + */ + firstEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); + secondEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx); + VALUE_HANDLE_DEREF(outBegIdx) = firstEMAIdx + VALUE_HANDLE_GET(firstEMABegIdx); + + /* Do the TEMA: + * Iterate through the EMA3 (output buffer) and adjust + * the value by using the EMA2 and EMA1. + */ + outIdx = 0; + while( outIdx < VALUE_HANDLE_GET(thirdEMANbElement) ) + { + outReal[outIdx] += (3.0*firstEMA[firstEMAIdx++]) - (3.0*secondEMA[secondEMAIdx++]); + outIdx++; + } + + ARRAY_FREE( firstEMA ); + ARRAY_FREE( secondEMA ); + + /* Indicates to the caller the number of output + * successfully calculated. + */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tema( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TEMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ ARRAY_REF(firstEMA); +/* Generated */ ARRAY_REF(secondEMA); +/* Generated */ double k; +/* Generated */ VALUE_HANDLE_INT(firstEMABegIdx); +/* Generated */ VALUE_HANDLE_INT(firstEMANbElement); +/* Generated */ VALUE_HANDLE_INT(secondEMABegIdx); +/* Generated */ VALUE_HANDLE_INT(secondEMANbElement); +/* Generated */ VALUE_HANDLE_INT(thirdEMABegIdx); +/* Generated */ VALUE_HANDLE_INT(thirdEMANbElement); +/* Generated */ int tempInt, outIdx, lookbackTotal, lookbackEMA; +/* Generated */ int firstEMAIdx, secondEMAIdx; +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); +/* Generated */ lookbackTotal = lookbackEMA * 3; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ tempInt = lookbackTotal+(endIdx-startIdx)+1; +/* Generated */ ARRAY_ALLOC(firstEMA,tempInt); +/* Generated */ #if !defined( _JAVA ) +/* Generated */ if( !firstEMA ) +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ #endif +/* Generated */ k = PER_TO_K(optInTimePeriod); +/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( startIdx-(lookbackEMA*2), endIdx, inReal, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), +/* Generated */ firstEMA ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ ARRAY_ALLOC(secondEMA,VALUE_HANDLE_GET(firstEMANbElement)); +/* Generated */ #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) +/* Generated */ if( !secondEMA ) +/* Generated */ { +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), +/* Generated */ secondEMA ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ ARRAY_FREE( secondEMA ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(secondEMANbElement)-1, secondEMA, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(thirdEMABegIdx), VALUE_HANDLE_OUT(thirdEMANbElement), +/* Generated */ outReal ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(thirdEMANbElement) == 0) ) +/* Generated */ { +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ ARRAY_FREE( secondEMA ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ firstEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); +/* Generated */ secondEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx); +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = firstEMAIdx + VALUE_HANDLE_GET(firstEMABegIdx); +/* Generated */ outIdx = 0; +/* Generated */ while( outIdx < VALUE_HANDLE_GET(thirdEMANbElement) ) +/* Generated */ { +/* Generated */ outReal[outIdx] += (3.0*firstEMA[firstEMAIdx++]) - (3.0*secondEMA[secondEMAIdx++]); +/* Generated */ outIdx++; +/* Generated */ } +/* Generated */ ARRAY_FREE( firstEMA ); +/* Generated */ ARRAY_FREE( secondEMA ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TRANGE.c b/src/ta-lib/src/ta_func/ta_TRANGE.c new file mode 100644 index 000000000..d454dbdf1 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TRANGE.c @@ -0,0 +1,340 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TrueRangeLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int trueRangeLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TRANGE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TRANGE - True Range + * + * Input = High, Low, Close + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode trueRange( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TRANGE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int today, outIdx; + double val2, val3, greatest; + double tempCY, tempLT, tempHT; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* True Range is the greatest of the following: + * + * val1 = distance from today's high to today's low. + * val2 = distance from yesterday's close to today's high. + * val3 = distance from yesterday's close to today's low. + * + * Some books and software makes the first TR value to be + * the (high - low) of the first bar. This function instead + * ignore the first price bar, and only output starting at the + * second price bar are valid. This is done for avoiding + * inconsistency. + */ + + /* Move up the start index if there is not + * enough initial data. + * Always one price bar gets consumed. + */ + if( startIdx < 1 ) + startIdx = 1; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; + today = startIdx; + while( today <= endIdx ) + { + + /* Find the greatest of the 3 values. */ + tempLT = inLow[today]; + tempHT = inHigh[today]; + tempCY = inClose[today-1]; + greatest = tempHT - tempLT; /* val1 */ + + val2 = std_fabs( tempCY - tempHT ); + if( val2 > greatest ) + greatest = val2; + + val3 = std_fabs( tempCY - tempLT ); + if( val3 > greatest ) + greatest = val3; + + outReal[outIdx++] = greatest; + today++; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode trueRange( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TRANGE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int today, outIdx; +/* Generated */ double val2, val3, greatest; +/* Generated */ double tempCY, tempLT, tempHT; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ if( startIdx < 1 ) +/* Generated */ startIdx = 1; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tempLT = inLow[today]; +/* Generated */ tempHT = inHigh[today]; +/* Generated */ tempCY = inClose[today-1]; +/* Generated */ greatest = tempHT - tempLT; +/* Generated */ val2 = std_fabs( tempCY - tempHT ); +/* Generated */ if( val2 > greatest ) +/* Generated */ greatest = val2; +/* Generated */ val3 = std_fabs( tempCY - tempLT ); +/* Generated */ if( val3 > greatest ) +/* Generated */ greatest = val3; +/* Generated */ outReal[outIdx++] = greatest; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TRIMA.c b/src/ta-lib/src/ta_func/ta_TRIMA.c new file mode 100644 index 000000000..43617a633 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TRIMA.c @@ -0,0 +1,659 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * CR Chris (crokusek@hotmail.com) + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010503 MF Initial Coding + * 031703 MF Fix #701060. Correct logic when using a range with + * startIdx/endIdx. Thanks to Chris for reporting this. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TrimaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int trimaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TRIMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TRIMA - Triangular Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode trima( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TRIMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int lookbackTotal; + + double numerator; + double numeratorSub; + double numeratorAdd; + + int i, outIdx, todayIdx, trailingIdx, middleIdx; + double factor, tempReal; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to calculate at least one output. + */ + lookbackTotal = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* TRIMA Description + * ================= + * The triangular MA is a weighted moving average. Instead of the + * TA_WMA who put more weigth on the latest price bar, the triangular + * put more weigth on the data in the middle of the specified period. + * + * Examples: + * For TimeSerie={a,b,c,d,e,f...} ('a' is the older price) + * + * 1st value for TRIMA 4-Period is: ((1*a)+(2*b)+(2*c)+(1*d)) / 6 + * 2nd value for TRIMA 4-Period is: ((1*b)+(2*c)+(2*d)+(1*e)) / 6 + * + * 1st value for TRIMA 5-Period is: ((1*a)+(2*b)+(3*c)+(2*d)+(1*e)) / 9 + * 2nd value for TRIMA 5-Period is: ((1*b)+(2*c)+(3*d)+(2*e)+(1*f)) / 9 + * + * Generally Accepted Implementation + * ================================== + * Using algebra, it can be demonstrated that the TRIMA is equivalent to + * doing a SMA of a SMA. The following explain the rules: + * + * (1) When the period is even, TRIMA(x,period)=SMA(SMA(x,period/2),(period/2)+1) + * (2) When the period is odd, TRIMA(x,period)=SMA(SMA(x,(period+1)/2),(period+1)/2) + * + * In other word: + * (1) A period of 4 becomes TRIMA(x,4) = SMA( SMA( x, 2), 3 ) + * (2) A period of 5 becomes TRIMA(x,5) = SMA( SMA( x, 3), 3 ) + * + * The SMA of a SMA is the algorithm generaly found in books. + * + * Tradestation Implementation + * =========================== + * Tradestation deviate from the generally accepted implementation by + * making the TRIMA to be as follow: + * TRIMA(x,period) = SMA( SMA( x, (int)(period/2)+1), (int)(period/2)+1 ); + * This formula is done regardless if the period is even or odd. + * + * In other word: + * (1) A period of 4 becomes TRIMA(x,4) = SMA( SMA( x, 3), 3 ) + * (2) A period of 5 becomes TRIMA(x,5) = SMA( SMA( x, 3), 3 ) + * (3) A period of 6 becomes TRIMA(x,5) = SMA( SMA( x, 4), 4 ) + * (4) A period of 7 becomes TRIMA(x,5) = SMA( SMA( x, 4), 4 ) + * + * It is not clear to me if the Tradestation approach is a bug or a deliberate + * decision to do things differently. + * + * Metastock Implementation + * ======================== + * Output is the same as the generally accepted implementation. + * + * TA-Lib Implementation + * ===================== + * Output is also the same as the generally accepted implementation. + * + * For speed optimization and avoid memory allocation, TA-Lib use + * a better algorithm than the usual SMA of a SMA. + * + * The calculation from one TRIMA value to the next is done by doing 4 + * little adjustment (the following show a TRIMA 4-period): + * + * TRIMA at time 'd': ((1*a)+(2*b)+(2*c)+(1*d)) / 6 + * TRIMA at time 'e': ((1*b)+(2*c)+(2*d)+(1*e)) / 6 + * + * To go from TRIMA 'd' to 'e', the following is done: + * 1) 'a' and 'b' are substract from the numerator. + * 2) 'd' is added to the numerator. + * 3) 'e' is added to the numerator. + * 4) Calculate TRIMA by doing numerator / 6 + * 5) Repeat sequence for next output + * + * These operations are the same steps done by TA-LIB: + * 1) is done by numeratorSub + * 2) is done by numeratorAdd. + * 3) is obtain from the latest input + * 4) Calculate and write TRIMA in the output + * 5) Repeat for next output. + * + * Of course, numerotrAdd and numeratorSub needs to be + * adjusted for each iteration. + * + * The update of numeratorSub needs values from the input at + * the trailingIdx and middleIdx position. + * + * The update of numeratorAdd needs values from the input at + * the middleIdx and todayIdx. + */ + + outIdx = 0; + + if( (optInTimePeriod % 2) == 1 ) + { + /* Logic for Odd period */ + + /* Calculate the factor which is 1 divided by the + * sumation of the weight. + * + * The sum of the weight is calculated as follow: + * + * The simple sumation serie 1+2+3... n can be + * express as n(n+1)/2 + * + * From this logic, a "triangular" sumation formula + * can be found depending if the period is odd or even. + * + * Odd Period Formula: + * period = 5 and with n=(int)(period/2) + * the formula for a "triangular" serie is: + * 1+2+3+2+1 = (n*(n+1))+n+1 + * = (n+1)*(n+1) + * = 3 * 3 = 9 + * + * Even period Formula: + * period = 6 and with n=(int)(period/2) + * the formula for a "triangular" serie is: + * 1+2+3+3+2+1 = n*(n+1) + * = 3 * 4 = 12 + */ + + /* Note: entirely done with int and becomes double only + * on assignement to the factor variable. + */ + i = (optInTimePeriod>>1); + factor = (i+1)*(i+1); + factor = 1.0/factor; + + /* Initialize all the variable before + * starting to iterate for each output. + */ + trailingIdx = startIdx-lookbackTotal; + middleIdx = trailingIdx + i; + todayIdx = middleIdx + i; + numerator = 0.0; + numeratorSub = 0.0; + for( i=middleIdx; i >= trailingIdx; i-- ) + { + tempReal = inReal[i]; + numeratorSub += tempReal; + numerator += numeratorSub; + } + numeratorAdd = 0.0; + middleIdx++; + for( i=middleIdx; i <= todayIdx; i++ ) + { + tempReal = inReal[i]; + numeratorAdd += tempReal; + numerator += numeratorAdd; + } + + /* Write the first output */ + outIdx = 0; + tempReal = inReal[trailingIdx++]; + outReal[outIdx++] = numerator * factor; + todayIdx++; + + /* Note: The value at the trailingIdx was saved + * in tempReal to account for the case where + * outReal and inReal are ptr on the same + * buffer. + */ + + /* Iterate for remaining output */ + while( todayIdx <= endIdx ) + { + /* Step (1) */ + numerator -= numeratorSub; + numeratorSub -= tempReal; + tempReal = inReal[middleIdx++]; + numeratorSub += tempReal; + + /* Step (2) */ + numerator += numeratorAdd; + numeratorAdd -= tempReal; + tempReal = inReal[todayIdx++]; + numeratorAdd += tempReal; + + /* Step (3) */ + numerator += tempReal; + + /* Step (4) */ + tempReal = inReal[trailingIdx++]; + outReal[outIdx++] = numerator * factor; + } + } + else + { + /* Even logic. + * + * Very similar to the odd logic, except: + * - calculation of the factor is different. + * - the coverage of the numeratorSub and numeratorAdd is + * slightly different. + * - Adjustment of numeratorAdd is different. See Step (2). + */ + i = (optInTimePeriod>>1); + factor = i*(i+1); + factor = 1.0/factor; + + /* Initialize all the variable before + * starting to iterate for each output. + */ + trailingIdx = startIdx-lookbackTotal; + middleIdx = trailingIdx + i - 1; + todayIdx = middleIdx + i; + numerator = 0.0; + + numeratorSub = 0.0; + + for( i=middleIdx; i >= trailingIdx; i-- ) + { + tempReal = inReal[i]; + numeratorSub += tempReal; + numerator += numeratorSub; + } + numeratorAdd = 0.0; + middleIdx++; + for( i=middleIdx; i <= todayIdx; i++ ) + { + tempReal = inReal[i]; + numeratorAdd += tempReal; + numerator += numeratorAdd; + } + + /* Write the first output */ + outIdx = 0; + tempReal = inReal[trailingIdx++]; + outReal[outIdx++] = numerator * factor; + todayIdx++; + + /* Note: The value at the trailingIdx was saved + * in tempReal to account for the case where + * outReal and inReal are ptr on the same + * buffer. + */ + + /* Iterate for remaining output */ + while( todayIdx <= endIdx ) + { + /* Step (1) */ + numerator -= numeratorSub; + numeratorSub -= tempReal; + tempReal = inReal[middleIdx++]; + numeratorSub += tempReal; + + /* Step (2) */ + numeratorAdd -= tempReal; + numerator += numeratorAdd; + tempReal = inReal[todayIdx++]; + numeratorAdd += tempReal; + + /* Step (3) */ + numerator += tempReal; + + /* Step (4) */ + tempReal = inReal[trailingIdx++]; + outReal[outIdx++] = numerator * factor; + } + + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode trima( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TRIMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int lookbackTotal; +/* Generated */ double numerator; +/* Generated */ double numeratorSub; +/* Generated */ double numeratorAdd; +/* Generated */ int i, outIdx, todayIdx, trailingIdx, middleIdx; +/* Generated */ double factor, tempReal; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = (optInTimePeriod-1); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ if( (optInTimePeriod % 2) == 1 ) +/* Generated */ { +/* Generated */ i = (optInTimePeriod>>1); +/* Generated */ factor = (i+1)*(i+1); +/* Generated */ factor = 1.0/factor; +/* Generated */ trailingIdx = startIdx-lookbackTotal; +/* Generated */ middleIdx = trailingIdx + i; +/* Generated */ todayIdx = middleIdx + i; +/* Generated */ numerator = 0.0; +/* Generated */ numeratorSub = 0.0; +/* Generated */ for( i=middleIdx; i >= trailingIdx; i-- ) +/* Generated */ { +/* Generated */ tempReal = inReal[i]; +/* Generated */ numeratorSub += tempReal; +/* Generated */ numerator += numeratorSub; +/* Generated */ } +/* Generated */ numeratorAdd = 0.0; +/* Generated */ middleIdx++; +/* Generated */ for( i=middleIdx; i <= todayIdx; i++ ) +/* Generated */ { +/* Generated */ tempReal = inReal[i]; +/* Generated */ numeratorAdd += tempReal; +/* Generated */ numerator += numeratorAdd; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = numerator * factor; +/* Generated */ todayIdx++; +/* Generated */ while( todayIdx <= endIdx ) +/* Generated */ { +/* Generated */ numerator -= numeratorSub; +/* Generated */ numeratorSub -= tempReal; +/* Generated */ tempReal = inReal[middleIdx++]; +/* Generated */ numeratorSub += tempReal; +/* Generated */ numerator += numeratorAdd; +/* Generated */ numeratorAdd -= tempReal; +/* Generated */ tempReal = inReal[todayIdx++]; +/* Generated */ numeratorAdd += tempReal; +/* Generated */ numerator += tempReal; +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = numerator * factor; +/* Generated */ } +/* Generated */ } +/* Generated */ else +/* Generated */ { +/* Generated */ i = (optInTimePeriod>>1); +/* Generated */ factor = i*(i+1); +/* Generated */ factor = 1.0/factor; +/* Generated */ trailingIdx = startIdx-lookbackTotal; +/* Generated */ middleIdx = trailingIdx + i - 1; +/* Generated */ todayIdx = middleIdx + i; +/* Generated */ numerator = 0.0; +/* Generated */ numeratorSub = 0.0; +/* Generated */ for( i=middleIdx; i >= trailingIdx; i-- ) +/* Generated */ { +/* Generated */ tempReal = inReal[i]; +/* Generated */ numeratorSub += tempReal; +/* Generated */ numerator += numeratorSub; +/* Generated */ } +/* Generated */ numeratorAdd = 0.0; +/* Generated */ middleIdx++; +/* Generated */ for( i=middleIdx; i <= todayIdx; i++ ) +/* Generated */ { +/* Generated */ tempReal = inReal[i]; +/* Generated */ numeratorAdd += tempReal; +/* Generated */ numerator += numeratorAdd; +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = numerator * factor; +/* Generated */ todayIdx++; +/* Generated */ while( todayIdx <= endIdx ) +/* Generated */ { +/* Generated */ numerator -= numeratorSub; +/* Generated */ numeratorSub -= tempReal; +/* Generated */ tempReal = inReal[middleIdx++]; +/* Generated */ numeratorSub += tempReal; +/* Generated */ numeratorAdd -= tempReal; +/* Generated */ numerator += numeratorAdd; +/* Generated */ tempReal = inReal[todayIdx++]; +/* Generated */ numeratorAdd += tempReal; +/* Generated */ numerator += tempReal; +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = numerator * factor; +/* Generated */ } +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TRIX.c b/src/ta-lib/src/ta_func/ta_TRIX.c new file mode 100644 index 000000000..123e61188 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TRIX.c @@ -0,0 +1,461 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AA Andrew Atkinson + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 020605 AA Fix #1117656. NULL pointer assignement. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TrixLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int trixLookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TRIX_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int emaLookback; +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + emaLookback = LOOKBACK_CALL(EMA)( optInTimePeriod ); + return (emaLookback*3) + LOOKBACK_CALL(ROCR)( 1 ); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode trix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TRIX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + double k; + ARRAY_REF(tempBuffer); + VALUE_HANDLE_INT(nbElement); + VALUE_HANDLE_INT(begIdx); + int totalLookback; + int emaLookback, rocLookback; + ENUM_DECLARATION(RetCode) retCode; + int nbElementToOutput; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Adjust the startIdx to account for the lookback. */ + emaLookback = LOOKBACK_CALL(EMA)( optInTimePeriod ); + rocLookback = LOOKBACK_CALL(ROCR)( 1 ); + totalLookback = (emaLookback*3) + rocLookback; + + if( startIdx < totalLookback ) + startIdx = totalLookback; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + nbElementToOutput = (endIdx-startIdx)+1+totalLookback; + + /* Allocate a temporary buffer for performing + * the calculation. + */ + ARRAY_ALLOC(tempBuffer, nbElementToOutput ); + + #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) + if( !tempBuffer ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); + } + #endif + + /* Calculate the first EMA */ + k = PER_TO_K(optInTimePeriod); + retCode = FUNCTION_CALL(INT_EMA)( (startIdx-totalLookback), endIdx, inReal, + optInTimePeriod, k, + VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), + tempBuffer ); + + /* Verify for failure or if not enough data after + * calculating the EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + ARRAY_FREE( tempBuffer ); + return retCode; + } + + nbElementToOutput--; /* Make this variable zero base from now on. */ + + /* Calculate the second EMA */ + nbElementToOutput -= emaLookback; + retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, + optInTimePeriod, k, + VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), + tempBuffer ); + + /* Verify for failure or if not enough data after + * calculating the EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + ARRAY_FREE( tempBuffer ); + return retCode; + } + + /* Calculate the third EMA */ + nbElementToOutput -= emaLookback; + retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, + optInTimePeriod, k, + VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), + tempBuffer ); + + /* Verify for failure or if not enough data after + * calculating the EMA. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + ARRAY_FREE( tempBuffer ); + return retCode; + } + + /* Calculate the 1-day Rate-Of-Change */ + nbElementToOutput -= emaLookback; + retCode = FUNCTION_CALL_DOUBLE(ROC)( 0, nbElementToOutput, + tempBuffer, + 1, VALUE_HANDLE_OUT(begIdx), outNBElement, + outReal ); + + ARRAY_FREE( tempBuffer ); + /* Verify for failure or if not enough data after + * calculating the rate-of-change. + */ + if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + return retCode; + } + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode trix( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TRIX( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double k; +/* Generated */ ARRAY_REF(tempBuffer); +/* Generated */ VALUE_HANDLE_INT(nbElement); +/* Generated */ VALUE_HANDLE_INT(begIdx); +/* Generated */ int totalLookback; +/* Generated */ int emaLookback, rocLookback; +/* Generated */ ENUM_DECLARATION(RetCode) retCode; +/* Generated */ int nbElementToOutput; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ emaLookback = LOOKBACK_CALL(EMA)( optInTimePeriod ); +/* Generated */ rocLookback = LOOKBACK_CALL(ROCR)( 1 ); +/* Generated */ totalLookback = (emaLookback*3) + rocLookback; +/* Generated */ if( startIdx < totalLookback ) +/* Generated */ startIdx = totalLookback; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ nbElementToOutput = (endIdx-startIdx)+1+totalLookback; +/* Generated */ ARRAY_ALLOC(tempBuffer, nbElementToOutput ); +/* Generated */ #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) +/* Generated */ if( !tempBuffer ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); +/* Generated */ } +/* Generated */ #endif +/* Generated */ k = PER_TO_K(optInTimePeriod); +/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( (startIdx-totalLookback), endIdx, inReal, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), +/* Generated */ tempBuffer ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ nbElementToOutput--; +/* Generated */ nbElementToOutput -= emaLookback; +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), +/* Generated */ tempBuffer ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ nbElementToOutput -= emaLookback; +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, +/* Generated */ optInTimePeriod, k, +/* Generated */ VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), +/* Generated */ tempBuffer ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ nbElementToOutput -= emaLookback; +/* Generated */ retCode = FUNCTION_CALL_DOUBLE(ROC)( 0, nbElementToOutput, +/* Generated */ tempBuffer, +/* Generated */ 1, VALUE_HANDLE_OUT(begIdx), outNBElement, +/* Generated */ outReal ); +/* Generated */ ARRAY_FREE( tempBuffer ); +/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ return retCode; +/* Generated */ } +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TSF.c b/src/ta-lib/src/ta_func/ta_TSF.c new file mode 100644 index 000000000..351ad95a5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TSF.c @@ -0,0 +1,365 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 090103 MF Initial coding re-using the existing TA_LinearReg + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TsfLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int tsfLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TSF_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TSF - Time Series Forecast + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tsf( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TSF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int outIdx; + + int today, lookbackTotal; + double SumX, SumXY, SumY, SumXSqr, Divisor; + + double m, b; + int i; + + double tempValue1; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Linear Regression is a concept also known as the + * "least squares method" or "best fit." Linear + * Regression attempts to fit a straight line between + * several data points in such a way that distance + * between each data point and the line is minimized. + * + * For each point, a straight line over the specified + * previous bar period is determined in terms + * of y = b + m*x: + * + * TA_LINEARREG : Returns b+m*(period-1) + * TA_LINEARREG_SLOPE : Returns 'm' + * TA_LINEARREG_ANGLE : Returns 'm' in degree. + * TA_LINEARREG_INTERCEPT: Returns 'b' + * TA_TSF : Returns b+m*(period) + */ + + /* Adjust startIdx to account for the lookback period. */ + lookbackTotal = LOOKBACK_CALL(TSF)( optInTimePeriod ); + + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + outIdx = 0; /* Index into the output. */ + today = startIdx; + + SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; + SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; + Divisor = SumX * SumX - optInTimePeriod * SumXSqr; + + while( today <= endIdx ) + { + SumXY = 0; + SumY = 0; + for( i = optInTimePeriod; i-- != 0; ) + { + SumY += tempValue1 = inReal[today - i]; + SumXY += (double)i * tempValue1; + } + m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; + b = ( SumY - m * SumX ) / (double)optInTimePeriod; + outReal[outIdx++] = b + m * (double)optInTimePeriod; + today++; + } + + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode tsf( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TSF( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx; +/* Generated */ int today, lookbackTotal; +/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; +/* Generated */ double m, b; +/* Generated */ int i; +/* Generated */ double tempValue1; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = LOOKBACK_CALL(TSF)( optInTimePeriod ); +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; +/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; +/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ SumXY = 0; +/* Generated */ SumY = 0; +/* Generated */ for( i = optInTimePeriod; i-- != 0; ) +/* Generated */ { +/* Generated */ SumY += tempValue1 = inReal[today - i]; +/* Generated */ SumXY += (double)i * tempValue1; +/* Generated */ } +/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; +/* Generated */ b = ( SumY - m * SumX ) / (double)optInTimePeriod; +/* Generated */ outReal[outIdx++] = b + m * (double)optInTimePeriod; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_TYPPRICE.c b/src/ta-lib/src/ta_func/ta_TYPPRICE.c new file mode 100644 index 000000000..8c84d24d6 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_TYPPRICE.c @@ -0,0 +1,283 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 112605 MF Fix outBegIdx when startIdx != 0 + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::TypPriceLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int typPriceLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_TYPPRICE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* This function have no lookback needed. */ + + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_TYPPRICE - Typical Price + * + * Input = High, Low, Close + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode typPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_TYPPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int outIdx, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Typical price = (High + Low + Close ) / 3 */ + outIdx = 0; + + for( i= startIdx; i <= endIdx; i++ ) + { + outReal[outIdx++] = ( inHigh [i] + + inLow [i] + + inClose[i] ) / 3.0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode typPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_TYPPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ outIdx = 0; +/* Generated */ for( i= startIdx; i <= endIdx; i++ ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = ( inHigh [i] + +/* Generated */ inLow [i] + +/* Generated */ inClose[i] ) / 3.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_ULTOSC.c b/src/ta-lib/src/ta_func/ta_ULTOSC.c new file mode 100644 index 000000000..259464d4d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_ULTOSC.c @@ -0,0 +1,594 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * DM Drew McCormack (http://www.trade-strategist.com) + * MF Mario Fortier + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 281206 DM Initial Implementation + * 010606 MF Abstract local arrays. Detect divide by zero. + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::UltOscLookback( int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3 ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int ultOscLookback( int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3 ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_ULTOSC_Lookback( int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3 ) /* From 1 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + int maxPeriod; +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod1. */ +/* Generated */ if( (int)optInTimePeriod1 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod1 = 7; +/* Generated */ else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInTimePeriod2. */ +/* Generated */ if( (int)optInTimePeriod2 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod2 = 14; +/* Generated */ else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ /* min/max are checked for optInTimePeriod3. */ +/* Generated */ if( (int)optInTimePeriod3 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod3 = 28; +/* Generated */ else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* Lookback for the Ultimate Oscillator is the lookback of the SMA with the longest + * time period, plus 1 for the True Range. + */ + maxPeriod = max( max(optInTimePeriod1, optInTimePeriod2), optInTimePeriod3); + return LOOKBACK_CALL(SMA)( maxPeriod ) + 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_ULTOSC - Ultimate Oscillator + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod1:(From 1 to 100000) + * Number of bars for 1st period. + * + * optInTimePeriod2:(From 1 to 100000) + * Number of bars fro 2nd period + * + * optInTimePeriod3:(From 1 to 100000) + * Number of bars for 3rd period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ultOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_ULTOSC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double a1Total, a2Total, a3Total; + double b1Total, b2Total, b3Total; + double trueLow, trueRange, closeMinusTrueLow; + double tempDouble, output, tempHT, tempLT, tempCY; + int lookbackTotal; + int longestPeriod, longestIndex; + int i,j,today,outIdx; + int trailingIdx1, trailingIdx2, trailingIdx3; + + ARRAY_INT_LOCAL(usedFlag,3); + ARRAY_INT_LOCAL(periods,3); + ARRAY_INT_LOCAL(sortedPeriods,3); + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod1. */ +/* Generated */ if( (int)optInTimePeriod1 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod1 = 7; +/* Generated */ else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInTimePeriod2. */ +/* Generated */ if( (int)optInTimePeriod2 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod2 = 14; +/* Generated */ else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ /* min/max are checked for optInTimePeriod3. */ +/* Generated */ if( (int)optInTimePeriod3 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod3 = 28; +/* Generated */ else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + + /* Ensure that the time periods are ordered from shortest to longest. + * Sort. */ + periods[0] = optInTimePeriod1; + periods[1] = optInTimePeriod2; + periods[2] = optInTimePeriod3; + usedFlag[0] = 0; + usedFlag[1] = 0; + usedFlag[2] = 0; + for ( i = 0; i < 3; ++i ) + { + longestPeriod = 0; + longestIndex = 0; + for ( j = 0; j < 3; ++j ) + { + if ( (usedFlag[j] == 0) && (periods[j] > longestPeriod) ) + { + longestPeriod = periods[j]; + longestIndex = j; + } + } + usedFlag[longestIndex] = 1; + sortedPeriods[i] = longestPeriod; + } + optInTimePeriod1 = sortedPeriods[2]; + optInTimePeriod2 = sortedPeriods[1]; + optInTimePeriod3 = sortedPeriods[0]; + + /* Adjust startIdx for lookback period. */ + lookbackTotal = LOOKBACK_CALL(ULTOSC)( optInTimePeriod1, optInTimePeriod2, optInTimePeriod3 ); + if( startIdx < lookbackTotal ) startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + + /* Prime running totals used in moving averages */ + #define CALC_TERMS(day) \ + { \ + tempLT = inLow[day]; \ + tempHT = inHigh[day]; \ + tempCY = inClose[day-1]; \ + trueLow = min( tempLT, tempCY ); \ + closeMinusTrueLow = inClose[day] - trueLow; \ + trueRange = tempHT - tempLT; \ + tempDouble = std_fabs( tempCY - tempHT ); \ + if( tempDouble > trueRange ) \ + trueRange = tempDouble; \ + tempDouble = std_fabs( tempCY - tempLT ); \ + if( tempDouble > trueRange ) \ + trueRange = tempDouble; \ + } + + #define PRIME_TOTALS(aTotal, bTotal, period) \ + { \ + aTotal = 0; \ + bTotal = 0; \ + for ( i = startIdx-period+1; i < startIdx; ++i ) \ + { \ + CALC_TERMS(i); \ + aTotal += closeMinusTrueLow; \ + bTotal += trueRange; \ + } \ + } + + PRIME_TOTALS(a1Total, b1Total, optInTimePeriod1); + PRIME_TOTALS(a2Total, b2Total, optInTimePeriod2); + PRIME_TOTALS(a3Total, b3Total, optInTimePeriod3); + + #undef PRIME_TOTALS + + /* Calculate oscillator */ + today = startIdx; + outIdx = 0; + trailingIdx1 = today - optInTimePeriod1 + 1; + trailingIdx2 = today - optInTimePeriod2 + 1; + trailingIdx3 = today - optInTimePeriod3 + 1; + while( today <= endIdx ) + { + /* Add on today's terms */ + CALC_TERMS(today); + a1Total += closeMinusTrueLow; + a2Total += closeMinusTrueLow; + a3Total += closeMinusTrueLow; + b1Total += trueRange; + b2Total += trueRange; + b3Total += trueRange; + + /* Calculate the oscillator value for today */ + output = 0.0; + + if( !TA_IS_ZERO(b1Total) ) output += 4.0*(a1Total/b1Total); + if( !TA_IS_ZERO(b2Total) ) output += 2.0*(a2Total/b2Total); + if( !TA_IS_ZERO(b3Total) ) output += a3Total/b3Total; + + /* Remove the trailing terms to prepare for next day */ + CALC_TERMS(trailingIdx1); + a1Total -= closeMinusTrueLow; + b1Total -= trueRange; + + CALC_TERMS(trailingIdx2); + a2Total -= closeMinusTrueLow; + b2Total -= trueRange; + + CALC_TERMS(trailingIdx3); + a3Total -= closeMinusTrueLow; + b3Total -= trueRange; + + /* Last operation is to write the output. Must + * be done after the trailing index have all been + * taken care of because the caller is allowed + * to have the input array to be also the output + * array. + */ + outReal[outIdx] = 100.0 * (output / 7.0); + + /* Increment indexes */ + outIdx++; + today++; + trailingIdx1++; + trailingIdx2++; + trailingIdx3++; + } + #undef CALC_TERMS + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode ultOsc( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_ULTOSC( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ +/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double a1Total, a2Total, a3Total; +/* Generated */ double b1Total, b2Total, b3Total; +/* Generated */ double trueLow, trueRange, closeMinusTrueLow; +/* Generated */ double tempDouble, output, tempHT, tempLT, tempCY; +/* Generated */ int lookbackTotal; +/* Generated */ int longestPeriod, longestIndex; +/* Generated */ int i,j,today,outIdx; +/* Generated */ int trailingIdx1, trailingIdx2, trailingIdx3; +/* Generated */ ARRAY_INT_LOCAL(usedFlag,3); +/* Generated */ ARRAY_INT_LOCAL(periods,3); +/* Generated */ ARRAY_INT_LOCAL(sortedPeriods,3); +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod1 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod1 = 7; +/* Generated */ else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInTimePeriod2 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod2 = 14; +/* Generated */ else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( (int)optInTimePeriod3 == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod3 = 28; +/* Generated */ else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ periods[0] = optInTimePeriod1; +/* Generated */ periods[1] = optInTimePeriod2; +/* Generated */ periods[2] = optInTimePeriod3; +/* Generated */ usedFlag[0] = 0; +/* Generated */ usedFlag[1] = 0; +/* Generated */ usedFlag[2] = 0; +/* Generated */ for ( i = 0; i < 3; ++i ) +/* Generated */ { +/* Generated */ longestPeriod = 0; +/* Generated */ longestIndex = 0; +/* Generated */ for ( j = 0; j < 3; ++j ) +/* Generated */ { +/* Generated */ if ( (usedFlag[j] == 0) && (periods[j] > longestPeriod) ) +/* Generated */ { +/* Generated */ longestPeriod = periods[j]; +/* Generated */ longestIndex = j; +/* Generated */ } +/* Generated */ } +/* Generated */ usedFlag[longestIndex] = 1; +/* Generated */ sortedPeriods[i] = longestPeriod; +/* Generated */ } +/* Generated */ optInTimePeriod1 = sortedPeriods[2]; +/* Generated */ optInTimePeriod2 = sortedPeriods[1]; +/* Generated */ optInTimePeriod3 = sortedPeriods[0]; +/* Generated */ lookbackTotal = LOOKBACK_CALL(ULTOSC)( optInTimePeriod1, optInTimePeriod2, optInTimePeriod3 ); +/* Generated */ if( startIdx < lookbackTotal ) startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ #define CALC_TERMS(day) \ +/* Generated */ { \ +/* Generated */ tempLT = inLow[day]; \ +/* Generated */ tempHT = inHigh[day]; \ +/* Generated */ tempCY = inClose[day-1]; \ +/* Generated */ trueLow = min( tempLT, tempCY ); \ +/* Generated */ closeMinusTrueLow = inClose[day] - trueLow; \ +/* Generated */ trueRange = tempHT - tempLT; \ +/* Generated */ tempDouble = std_fabs( tempCY - tempHT ); \ +/* Generated */ if( tempDouble > trueRange ) \ +/* Generated */ trueRange = tempDouble; \ +/* Generated */ tempDouble = std_fabs( tempCY - tempLT ); \ +/* Generated */ if( tempDouble > trueRange ) \ +/* Generated */ trueRange = tempDouble; \ +/* Generated */ } +/* Generated */ #define PRIME_TOTALS(aTotal, bTotal, period) \ +/* Generated */ { \ +/* Generated */ aTotal = 0; \ +/* Generated */ bTotal = 0; \ +/* Generated */ for ( i = startIdx-period+1; i < startIdx; ++i ) \ +/* Generated */ { \ +/* Generated */ CALC_TERMS(i); \ +/* Generated */ aTotal += closeMinusTrueLow; \ +/* Generated */ bTotal += trueRange; \ +/* Generated */ } \ +/* Generated */ } +/* Generated */ PRIME_TOTALS(a1Total, b1Total, optInTimePeriod1); +/* Generated */ PRIME_TOTALS(a2Total, b2Total, optInTimePeriod2); +/* Generated */ PRIME_TOTALS(a3Total, b3Total, optInTimePeriod3); +/* Generated */ #undef PRIME_TOTALS +/* Generated */ today = startIdx; +/* Generated */ outIdx = 0; +/* Generated */ trailingIdx1 = today - optInTimePeriod1 + 1; +/* Generated */ trailingIdx2 = today - optInTimePeriod2 + 1; +/* Generated */ trailingIdx3 = today - optInTimePeriod3 + 1; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ CALC_TERMS(today); +/* Generated */ a1Total += closeMinusTrueLow; +/* Generated */ a2Total += closeMinusTrueLow; +/* Generated */ a3Total += closeMinusTrueLow; +/* Generated */ b1Total += trueRange; +/* Generated */ b2Total += trueRange; +/* Generated */ b3Total += trueRange; +/* Generated */ output = 0.0; +/* Generated */ if( !TA_IS_ZERO(b1Total) ) output += 4.0*(a1Total/b1Total); +/* Generated */ if( !TA_IS_ZERO(b2Total) ) output += 2.0*(a2Total/b2Total); +/* Generated */ if( !TA_IS_ZERO(b3Total) ) output += a3Total/b3Total; +/* Generated */ CALC_TERMS(trailingIdx1); +/* Generated */ a1Total -= closeMinusTrueLow; +/* Generated */ b1Total -= trueRange; +/* Generated */ CALC_TERMS(trailingIdx2); +/* Generated */ a2Total -= closeMinusTrueLow; +/* Generated */ b2Total -= trueRange; +/* Generated */ CALC_TERMS(trailingIdx3); +/* Generated */ a3Total -= closeMinusTrueLow; +/* Generated */ b3Total -= trueRange; +/* Generated */ outReal[outIdx] = 100.0 * (output / 7.0); +/* Generated */ outIdx++; +/* Generated */ today++; +/* Generated */ trailingIdx1++; +/* Generated */ trailingIdx2++; +/* Generated */ trailingIdx3++; +/* Generated */ } +/* Generated */ #undef CALC_TERMS +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_VAR.c b/src/ta-lib/src/ta_func/ta_VAR.c new file mode 100644 index 000000000..d67e919fb --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_VAR.c @@ -0,0 +1,498 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * JV Jesus Viver <324122@cienz.unizar.es> + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 100502 JV Speed optimization of the algorithm + * 052603 MF Adapt code to compile with .NET Managed C++ + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::VarianceLookback( int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int varianceLookback( int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_VAR_Lookback( int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) +/* Generated */ optInNbDev = 1.000000e+0; +/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + UNUSED_VARIABLE(optInNbDev); + + return optInTimePeriod-1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_VAR - Variance + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 1 to 100000) + * Number of period + * + * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) + * Nb of deviations + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode variance( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_VAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) +/* Generated */ optInNbDev = 1.000000e+0; +/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + return FUNCTION_CALL(INT_VAR)( startIdx, endIdx, inReal, + optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + outBegIdx, outNBElement, outReal ); +} + + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) + // No INT function +#else + +#if defined( _MANAGED ) && defined( USE_SUBARRAY ) +enum class Core::RetCode Core::TA_INT_VAR( int startIdx, + int endIdx, + SubArray^ inReal, + int optInTimePeriod, + [Out]int% outBegIdx, + [Out]int% outNBElement, + SubArray^ outReal ) +#elif defined( _MANAGED ) +enum class Core::RetCode Core::TA_INT_VAR( int startIdx, + int endIdx, + cli::array^ inReal, + int optInTimePeriod, + [Out]int% outBegIdx, + [Out]int% outNBElement, + cli::array^ outReal ) +#elif defined( _JAVA ) +public RetCode TA_INT_VAR( int startIdx, + int endIdx, + INPUT_TYPE inReal[], + int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + MInteger outBegIdx, + MInteger outNBElement, + double outReal[] ) +#else +TA_RetCode TA_PREFIX(INT_VAR)( int startIdx, + int endIdx, + const INPUT_TYPE *inReal, + int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ + int *outBegIdx, + int *outNBElement, + double *outReal ) +#endif +{ + double tempReal, periodTotal1, periodTotal2, meanValue1, meanValue2; + int i, outIdx, trailingIdx, nbInitialElementNeeded; + + /* Validate the calculation method type and + * identify the minimum number of price bar needed + * to calculate at least one output. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Do the MA calculation using tight loops. */ + /* Add-up the initial periods, except for the last value. */ + periodTotal1 = 0; + periodTotal2 = 0; + trailingIdx = startIdx-nbInitialElementNeeded; + + i=trailingIdx; + if( optInTimePeriod > 1 ) + { + while( i < startIdx ) { + tempReal = inReal[i++]; + periodTotal1 += tempReal; + tempReal *= tempReal; + periodTotal2 += tempReal; + } + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the inReal and + * outReal to be the same buffer. + */ + outIdx = 0; + do + { + tempReal = inReal[i++]; + + /* Square and add all the deviation over + * the same periods. + */ + + periodTotal1 += tempReal; + tempReal *= tempReal; + periodTotal2 += tempReal; + + /* Square and add all the deviation over + * the same period. + */ + + meanValue1 = periodTotal1 / optInTimePeriod; + meanValue2 = periodTotal2 / optInTimePeriod; + + tempReal = inReal[trailingIdx++]; + periodTotal1 -= tempReal; + tempReal *= tempReal; + periodTotal2 -= tempReal; + + outReal[outIdx++] = meanValue2-meanValue1*meanValue1; + } while( i <= endIdx ); + + /* All done. Indicate the output limits and return. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} +#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode variance( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_VAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ +/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 5; +/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) +/* Generated */ optInNbDev = 1.000000e+0; +/* Generated */ else if( (optInNbDev < -3.000000e+37) || (optInNbDev > 3.000000e+37) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ return FUNCTION_CALL(INT_VAR)( startIdx, endIdx, inReal, +/* Generated */ optInTimePeriod, +/* Generated */ outBegIdx, outNBElement, outReal ); +/* Generated */ } +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) +/* Generated */ // No INT function +/* Generated */ #else +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::TA_INT_VAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::TA_INT_VAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode TA_INT_VAR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ INPUT_TYPE inReal[], +/* Generated */ int optInTimePeriod, +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_PREFIX(INT_VAR)( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const INPUT_TYPE *inReal, +/* Generated */ int optInTimePeriod, +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double *outReal ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double tempReal, periodTotal1, periodTotal2, meanValue1, meanValue2; +/* Generated */ int i, outIdx, trailingIdx, nbInitialElementNeeded; +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ periodTotal1 = 0; +/* Generated */ periodTotal2 = 0; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ i=trailingIdx; +/* Generated */ if( optInTimePeriod > 1 ) +/* Generated */ { +/* Generated */ while( i < startIdx ) { +/* Generated */ tempReal = inReal[i++]; +/* Generated */ periodTotal1 += tempReal; +/* Generated */ tempReal *= tempReal; +/* Generated */ periodTotal2 += tempReal; +/* Generated */ } +/* Generated */ } +/* Generated */ outIdx = 0; +/* Generated */ do +/* Generated */ { +/* Generated */ tempReal = inReal[i++]; +/* Generated */ periodTotal1 += tempReal; +/* Generated */ tempReal *= tempReal; +/* Generated */ periodTotal2 += tempReal; +/* Generated */ meanValue1 = periodTotal1 / optInTimePeriod; +/* Generated */ meanValue2 = periodTotal2 / optInTimePeriod; +/* Generated */ tempReal = inReal[trailingIdx++]; +/* Generated */ periodTotal1 -= tempReal; +/* Generated */ tempReal *= tempReal; +/* Generated */ periodTotal2 -= tempReal; +/* Generated */ outReal[outIdx++] = meanValue2-meanValue1*meanValue1; +/* Generated */ } while( i <= endIdx ); +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_WCLPRICE.c b/src/ta-lib/src/ta_func/ta_WCLPRICE.c new file mode 100644 index 000000000..be6dec70b --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_WCLPRICE.c @@ -0,0 +1,282 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * 112605 MF Fix outBegIdx when startIdx != 0 + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::WclPriceLookback( void ) +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int wclPriceLookback( ) +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_WCLPRICE_Lookback( void ) +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ /* No parameters to validate. */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + /* This function have no lookback needed. */ + return 0; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_WCLPRICE - Weighted Close Price + * + * Input = High, Low, Close + * Output = double + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode wclPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_WCLPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int outIdx, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Weighted Close Price = (High + Low + (Close*2) ) / 4 */ + + outIdx = 0; + + for( i= startIdx; i <= endIdx; i++ ) + { + outReal[outIdx++] = ( inHigh [i] + + inLow [i] + + (inClose[i]*2.0) ) / 4.0; + } + + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode wclPrice( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_WCLPRICE( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int outIdx, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ outIdx = 0; +/* Generated */ for( i= startIdx; i <= endIdx; i++ ) +/* Generated */ { +/* Generated */ outReal[outIdx++] = ( inHigh [i] + +/* Generated */ inLow [i] + +/* Generated */ (inClose[i]*2.0) ) / 4.0; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_WILLR.c b/src/ta-lib/src/ta_func/ta_WILLR.c new file mode 100644 index 000000000..27368f8a5 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_WILLR.c @@ -0,0 +1,466 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 010802 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::WillRLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int willRLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_WILLR_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + + return (optInTimePeriod-1); +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_WILLR - Williams' %R + * + * Input = High, Low, Close + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode willR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inHigh[], +/* Generated */ double inLow[], +/* Generated */ double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_WILLR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inHigh[], +/* Generated */ const double inLow[], +/* Generated */ const double inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + double lowest, highest, tmp, diff; + int outIdx, nbInitialElementNeeded; + int trailingIdx, lowestIdx, highestIdx; + int today, i; + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ /* Verify required price component. */ +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Initialize 'diff', just to avoid warning. */ + diff = 0.0; + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + lowestIdx = highestIdx = -1; + diff = highest = lowest = 0.0; + + while( today <= endIdx ) + { + /* Set the lowest low */ + tmp = inLow[today]; + if( lowestIdx < trailingIdx ) + { + lowestIdx = trailingIdx; + lowest = inLow[lowestIdx]; + i = lowestIdx; + while( ++i<=today ) + { + tmp = inLow[i]; + if( tmp < lowest ) + { + lowestIdx = i; + lowest = tmp; + } + } + diff = (highest - lowest)/(-100.0); + } + else if( tmp <= lowest ) + { + lowestIdx = today; + lowest = tmp; + diff = (highest - lowest)/(-100.0); + } + + /* Set the highest high */ + tmp = inHigh[today]; + if( highestIdx < trailingIdx ) + { + highestIdx = trailingIdx; + highest = inHigh[highestIdx]; + i = highestIdx; + while( ++i<=today ) + { + tmp = inHigh[i]; + if( tmp > highest ) + { + highestIdx = i; + highest = tmp; + } + } + diff = (highest - lowest)/(-100.0); + } + else if( tmp >= highest ) + { + highestIdx = today; + highest = tmp; + diff = (highest - lowest)/(-100.0); + } + + if( diff != 0.0 ) + outReal[outIdx++] = (highest-inClose[today])/diff; + else + outReal[outIdx++] = 0.0; + + trailingIdx++; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inHigh, +/* Generated */ SubArray^ inLow, +/* Generated */ SubArray^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inHigh, +/* Generated */ cli::array^ inLow, +/* Generated */ cli::array^ inClose, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode willR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inHigh[], +/* Generated */ float inLow[], +/* Generated */ float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_WILLR( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inHigh[], +/* Generated */ const float inLow[], +/* Generated */ const float inClose[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ double lowest, highest, tmp, diff; +/* Generated */ int outIdx, nbInitialElementNeeded; +/* Generated */ int trailingIdx, lowestIdx, highestIdx; +/* Generated */ int today, i; +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if(!inHigh||!inLow||!inClose) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 14; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); +/* Generated */ if( startIdx < nbInitialElementNeeded ) +/* Generated */ startIdx = nbInitialElementNeeded; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ diff = 0.0; +/* Generated */ outIdx = 0; +/* Generated */ today = startIdx; +/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; +/* Generated */ lowestIdx = highestIdx = -1; +/* Generated */ diff = highest = lowest = 0.0; +/* Generated */ while( today <= endIdx ) +/* Generated */ { +/* Generated */ tmp = inLow[today]; +/* Generated */ if( lowestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ lowestIdx = trailingIdx; +/* Generated */ lowest = inLow[lowestIdx]; +/* Generated */ i = lowestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inLow[i]; +/* Generated */ if( tmp < lowest ) +/* Generated */ { +/* Generated */ lowestIdx = i; +/* Generated */ lowest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ diff = (highest - lowest)/(-100.0); +/* Generated */ } +/* Generated */ else if( tmp <= lowest ) +/* Generated */ { +/* Generated */ lowestIdx = today; +/* Generated */ lowest = tmp; +/* Generated */ diff = (highest - lowest)/(-100.0); +/* Generated */ } +/* Generated */ tmp = inHigh[today]; +/* Generated */ if( highestIdx < trailingIdx ) +/* Generated */ { +/* Generated */ highestIdx = trailingIdx; +/* Generated */ highest = inHigh[highestIdx]; +/* Generated */ i = highestIdx; +/* Generated */ while( ++i<=today ) +/* Generated */ { +/* Generated */ tmp = inHigh[i]; +/* Generated */ if( tmp > highest ) +/* Generated */ { +/* Generated */ highestIdx = i; +/* Generated */ highest = tmp; +/* Generated */ } +/* Generated */ } +/* Generated */ diff = (highest - lowest)/(-100.0); +/* Generated */ } +/* Generated */ else if( tmp >= highest ) +/* Generated */ { +/* Generated */ highestIdx = today; +/* Generated */ highest = tmp; +/* Generated */ diff = (highest - lowest)/(-100.0); +/* Generated */ } +/* Generated */ if( diff != 0.0 ) +/* Generated */ outReal[outIdx++] = (highest-inClose[today])/diff; +/* Generated */ else +/* Generated */ outReal[outIdx++] = 0.0; +/* Generated */ trailingIdx++; +/* Generated */ today++; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_WMA.c b/src/ta-lib/src/ta_func/ta_WMA.c new file mode 100644 index 000000000..c1f6ff808 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_WMA.c @@ -0,0 +1,436 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF Template creation. + * 052603 MF Adapt code to compile with .NET Managed C++ + * + */ + +/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +/* All code within this section is automatically + * generated by gen_code. Any modification will be lost + * next time gen_code is run. + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ #include "TA-Lib-Core.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) +/* Generated */ namespace TicTacTec { namespace TA { namespace Library { +/* Generated */ #elif defined( _JAVA ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #include "ta_java_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #elif defined( _RUST ) +/* Generated */ #include "ta_defs.h" +/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) +/* Generated */ #else +/* Generated */ #include +/* Generated */ #include +/* Generated */ #include "ta_func.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_UTILITY_H +/* Generated */ #include "ta_utility.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #ifndef TA_MEMORY_H +/* Generated */ #include "ta_memory.h" +/* Generated */ #endif +/* Generated */ +/* Generated */ #define TA_PREFIX(x) TA_##x +/* Generated */ #define INPUT_TYPE double +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ int Core::WmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public int wmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #else +/* Generated */ TA_LIB_API int TA_WMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ +/* Generated */ +/* Generated */ #endif +/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ +{ + /* insert local variable here */ + +/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return -1; +/* Generated */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ + + /* insert lookback code here. */ + return optInTimePeriod - 1; +} + +/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +/* + * TA_WMA - Weighted Moving Average + * + * Input = double + * Output = double + * + * Optional Parameters + * ------------------- + * optInTimePeriod:(From 2 to 100000) + * Number of period + * + * + */ +/* Generated */ +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode wma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_LIB_API TA_RetCode TA_WMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const double inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ +{ + /* Insert local variables here. */ + int inIdx, outIdx, i, trailingIdx, divider; + double periodSum, periodSub, tempReal, trailingValue; + int lookbackTotal; + + #if defined( USE_SINGLE_PRECISION_INPUT ) + ARRAY_MEMMOVEMIX_VAR; + #endif + +/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ +/* Generated */ /* Validate the requested output range. */ +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif /* !defined(_JAVA)*/ +/* Generated */ /* min/max are checked for optInTimePeriod. */ +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ +/* Generated */ #endif /* !defined(_JAVA) */ +/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ +/* Generated */ +/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ + + /* Insert TA function code here. */ + lookbackTotal = optInTimePeriod-1; + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); + VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* To make the rest more efficient, handle exception + * case where the user is asking for a period of '1'. + * In that case outputs equals inputs for the requested + * range. + */ + if( optInTimePeriod == 1 ) + { + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + VALUE_HANDLE_DEREF(outNBElement) = endIdx-startIdx+1; + + #if defined( USE_SINGLE_PRECISION_INPUT ) + ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); + #else + ARRAY_MEMMOVE ( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); + #endif + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); + } + + /* Calculate the divider (always an integer value). + * By induction: 1+2+3+4+'n' = n(n+1)/2 + * '>>1' is usually faster than '/2' for unsigned. + */ + divider = (optInTimePeriod*(optInTimePeriod+1))>>1; + + /* The algo used here use a very basic property of + * multiplication/addition: (x*2) = x+x + * + * As an example, a 3 period weighted can be + * interpreted in two way: + * (x1*1)+(x2*2)+(x3*3) + * OR + * x1+x2+x2+x3+x3+x3 (this is the periodSum) + * + * When you move forward in the time serie + * you can quickly adjust the periodSum for the + * period by substracting: + * x1+x2+x3 (This is the periodSub) + * Making the new periodSum equals to: + * x2+x3+x3 + * + * You can then add the new price bar + * which is x4+x4+x4 giving: + * x2+x3+x3+x4+x4+x4 + * + * At this point one iteration is completed and you can + * see that we are back to the step 1 of this example. + * + * Why making it so un-intuitive? The number of memory + * access and floating point operations are kept to a + * minimum with this algo. + */ + outIdx = 0; + trailingIdx = startIdx - lookbackTotal; + + /* Evaluate the initial periodSum/periodSub and trailingValue. */ + periodSum = periodSub = (double)0.0; + inIdx=trailingIdx; + i = 1; + while( inIdx < startIdx ) + { + tempReal = inReal[inIdx++]; + periodSub += tempReal; + periodSum += tempReal*i; + i++; + } + trailingValue = 0.0; + + /* Tight loop for the requested range. */ + while( inIdx <= endIdx ) + { + /* Add the current price bar to the sum + * who are carried through the iterations. + */ + tempReal = inReal[inIdx++]; + periodSub += tempReal; + periodSub -= trailingValue; + periodSum += tempReal*optInTimePeriod; + + /* Save the trailing value for being substract at + * the next iteration. + * (must be saved here just in case outReal and + * inReal are the same buffer). + */ + trailingValue = inReal[trailingIdx++]; + + /* Calculate the WMA for this price bar. */ + outReal[outIdx++] = periodSum / divider; + + /* Prepare the periodSum for the next iteration. */ + periodSum -= periodSub; + } + + /* Set output limits. */ + VALUE_HANDLE_DEREF(outNBElement) = outIdx; + VALUE_HANDLE_DEREF(outBegIdx) = startIdx; + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ +/* Generated */ +/* Generated */ #define USE_SINGLE_PRECISION_INPUT +/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) +/* Generated */ #undef TA_PREFIX +/* Generated */ #define TA_PREFIX(x) TA_S_##x +/* Generated */ #endif +/* Generated */ #undef INPUT_TYPE +/* Generated */ #define INPUT_TYPE float +/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) +/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ SubArray^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ SubArray^ outReal ) +/* Generated */ #elif defined( _MANAGED ) +/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ cli::array^ inReal, +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ [Out]int% outBegIdx, +/* Generated */ [Out]int% outNBElement, +/* Generated */ cli::array^ outReal ) +/* Generated */ #elif defined( _JAVA ) +/* Generated */ public RetCode wma( int startIdx, +/* Generated */ int endIdx, +/* Generated */ float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ MInteger outBegIdx, +/* Generated */ MInteger outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #else +/* Generated */ TA_RetCode TA_S_WMA( int startIdx, +/* Generated */ int endIdx, +/* Generated */ const float inReal[], +/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ +/* Generated */ int *outBegIdx, +/* Generated */ int *outNBElement, +/* Generated */ double outReal[] ) +/* Generated */ #endif +/* Generated */ { +/* Generated */ int inIdx, outIdx, i, trailingIdx, divider; +/* Generated */ double periodSum, periodSub, tempReal, trailingValue; +/* Generated */ int lookbackTotal; +/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ ARRAY_MEMMOVEMIX_VAR; +/* Generated */ #endif +/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK +/* Generated */ if( startIdx < 0 ) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); +/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) +/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) +/* Generated */ optInTimePeriod = 30; +/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #if !defined(_JAVA) +/* Generated */ if( !outReal ) +/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); +/* Generated */ #endif +/* Generated */ #endif +/* Generated */ lookbackTotal = optInTimePeriod-1; +/* Generated */ if( startIdx < lookbackTotal ) +/* Generated */ startIdx = lookbackTotal; +/* Generated */ if( startIdx > endIdx ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); +/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ if( optInTimePeriod == 1 ) +/* Generated */ { +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = endIdx-startIdx+1; +/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) +/* Generated */ ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); +/* Generated */ #else +/* Generated */ ARRAY_MEMMOVE ( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); +/* Generated */ #endif +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ divider = (optInTimePeriod*(optInTimePeriod+1))>>1; +/* Generated */ outIdx = 0; +/* Generated */ trailingIdx = startIdx - lookbackTotal; +/* Generated */ periodSum = periodSub = (double)0.0; +/* Generated */ inIdx=trailingIdx; +/* Generated */ i = 1; +/* Generated */ while( inIdx < startIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[inIdx++]; +/* Generated */ periodSub += tempReal; +/* Generated */ periodSum += tempReal*i; +/* Generated */ i++; +/* Generated */ } +/* Generated */ trailingValue = 0.0; +/* Generated */ while( inIdx <= endIdx ) +/* Generated */ { +/* Generated */ tempReal = inReal[inIdx++]; +/* Generated */ periodSub += tempReal; +/* Generated */ periodSub -= trailingValue; +/* Generated */ periodSum += tempReal*optInTimePeriod; +/* Generated */ trailingValue = inReal[trailingIdx++]; +/* Generated */ outReal[outIdx++] = periodSum / divider; +/* Generated */ periodSum -= periodSub; +/* Generated */ } +/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; +/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; +/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +/* Generated */ } +/* Generated */ +/* Generated */ #if defined( _MANAGED ) +/* Generated */ }}} // Close namespace TicTacTec.TA.Lib +/* Generated */ #endif +/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ + diff --git a/src/ta-lib/src/ta_func/ta_utility.c b/src/ta-lib/src/ta_func/ta_utility.c new file mode 100644 index 000000000..7b929ef66 --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_utility.c @@ -0,0 +1,134 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * RM Robert Meier (talib@meierlim.com http://www.meierlim.com) + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 052603 MF Adapt code to compile with .NET Managed C++ + * 123004 RM,MF Adapt code to work with Visual Studio 2005 + * + */ + +#if defined( _MANAGED ) + #using + #include "TA-Lib-Core.h" + #include "ta_memory.h" +namespace TicTacTec { namespace TA { namespace Library { +#else + #include "ta_utility.h" + #include "ta_func.h" + #include "ta_memory.h" +#endif + +#if defined( _MANAGED ) + enum class Core::RetCode Core::SetUnstablePeriod( enum class FuncUnstId id, + unsigned int unstablePeriod ) +#else +TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id, + unsigned int unstablePeriod ) +#endif +{ + int i; + + if( id > ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll) ) + return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); + + if( id == ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll) ) + { + for( i=0; i < (int)ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll); i++ ) + { + #if defined( _MANAGED ) + Globals->unstablePeriod[(int)i] = unstablePeriod; + #else + TA_Globals->unstablePeriod[i] = unstablePeriod; + #endif + } + } + else + { + #if defined( _MANAGED ) + Globals->unstablePeriod[(int)id] = unstablePeriod; + #else + TA_Globals->unstablePeriod[id] = unstablePeriod; + #endif + } + + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +#if defined( _MANAGED ) +unsigned int Core::GetUnstablePeriod( enum class FuncUnstId id ) +#else +unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id ) +#endif +{ + if( id >= ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll) ) + return 0; + + #if defined( _MANAGED ) + return Globals->unstablePeriod[(int)id]; + #else + return TA_Globals->unstablePeriod[id]; + #endif +} + +#if defined( _MANAGED ) + enum class Core::RetCode Core::SetCompatibility( enum class Compatibility value ) +#else +TA_RetCode TA_SetCompatibility( TA_Compatibility value ) +#endif +{ + TA_GLOBALS_COMPATIBILITY = value; + return ENUM_VALUE(RetCode,TA_SUCCESS,Success); +} + +#if defined( _MANAGED ) + enum class Core::Compatibility Core::GetCompatibility( void ) +#else +TA_Compatibility TA_GetCompatibility( void ) +#endif +{ + return TA_GLOBALS_COMPATIBILITY; +} + +#if defined( _MANAGED ) +}}} // Close namespace TicTacTec::TA::Lib +#endif diff --git a/src/ta-lib/src/ta_func/ta_utility.h b/src/ta-lib/src/ta_func/ta_utility.h new file mode 100644 index 000000000..f1a5b1c1d --- /dev/null +++ b/src/ta-lib/src/ta_func/ta_utility.h @@ -0,0 +1,362 @@ +/* Provides common mathematical or analysis functions. + * + * These functions are all PRIVATE to ta-lib and should + * never be called directly by the library users. + */ + +#ifndef TA_UTILITY_H +#define TA_UTILITY_H + +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) + #ifndef TA_FUNC_H + #include "ta_func.h" + #endif + + #ifndef TA_GLOBAL_H + #include "ta_global.h" + #endif +#endif + +#if defined( _MANAGED ) + #ifndef NULL + #define NULL 0 + #endif +#endif + +/* Calculate a Simple Moving Average. + * This is an internal version, parameter are assumed validated. + * (startIdx and endIdx cannot be -1). + */ +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) +TA_RetCode TA_INT_SMA( int startIdx, + int endIdx, + const double *inReal, + int optInTimePeriod, + int *outBegIdx, + int *outNBElement, + double *outReal ); + +TA_RetCode TA_S_INT_SMA( int startIdx, + int endIdx, + const float *inReal, + int optInTimePeriod, + int *outBegIdx, + int *outNBElement, + double *outReal ); +#endif + +/* Calculate an Exponential Moving Average. + * This is an internal version, parameter are assumed validated. + * (startIdx and endIdx cannot be -1). + */ +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) +TA_RetCode TA_INT_EMA( int startIdx, + int endIdx, + const double *inReal, + int optInTimePeriod, + double optInK_1, + int *outBegIdx, + int *outNBElement, + double *outReal ); + +TA_RetCode TA_S_INT_EMA( int startIdx, + int endIdx, + const float *inReal, + int optInTimePeriod, + double optInK_1, + int *outBegIdx, + int *outNBElement, + double *outReal ); +#endif + +/* Calculate a MACD + * This is an internal version, parameter are assumed validated. + * (startIdx and endIdx cannot be -1). + */ +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) +TA_RetCode TA_INT_MACD( int startIdx, + int endIdx, + const double inReal[], + int optInFastPeriod, /* 0 is fix 12 */ + int optInSlowPeriod, /* 0 is fix 26 */ + int optInSignalPeriod_2, + int *outBegIdx, + int *outNBElement, + double outRealMACD_0[], + double outRealMACDSignal_1[], + double outRealMACDHist_2[] ); + +TA_RetCode TA_S_INT_MACD( int startIdx, + int endIdx, + const float inReal[], + int optInFastPeriod, /* 0 is fix 12 */ + int optInSlowPeriod, /* 0 is fix 26 */ + int optInSignalPeriod_2, + int *outBegIdx, + int *outNBElement, + double outRealMACD_0[], + double outRealMACDSignal_1[], + double outRealMACDHist_2[] ); +#endif + +/* Internal Price Oscillator function. + * + * A buffer must be provided for intermediate processing + * 'tempBuffer' must be of at least (endIdx-startIdx+1) + */ +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) +TA_RetCode TA_INT_PO( int startIdx, + int endIdx, + const double *inReal, + int optInFastPeriod, + int optInSlowPeriod, + TA_MAType optInMethod_2, + int *outBegIdx, + int *outNBElement, + double *outReal, + double *tempBuffer, + int doPercentageOutput ); + +TA_RetCode TA_S_INT_PO( int startIdx, + int endIdx, + const float *inReal, + int optInFastPeriod, + int optInSlowPeriod, + TA_MAType optInMethod_2, + int *outBegIdx, + int *outNBElement, + double *outReal, + double *tempBuffer, + int doPercentageOutput ); +#endif + +/* Internal variance function. */ +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) +TA_RetCode TA_INT_VAR( int startIdx, + int endIdx, + const double *inReal, + int optInTimePeriod, + int *outBegIdx, + int *outNBElement, + double *outReal ); + +TA_RetCode TA_S_INT_VAR( int startIdx, + int endIdx, + const float *inReal, + int optInTimePeriod, + int *outBegIdx, + int *outNBElement, + double *outReal ); +#endif + +/* A function to calculate a standard deviation. + * + * This function allows speed optimization when the + * moving average series is already calculated. + */ +#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) +void TA_INT_stddev_using_precalc_ma( const double *inReal, + const double *inMovAvg, + int inMovAvgBegIdx, + int inMovAvgNbElement, + int timePeriod, + double *output ); + +void TA_S_INT_stddev_using_precalc_ma( const float *inReal, + const double *inMovAvg, + int inMovAvgBegIdx, + int inMovAvgNbElement, + int timePeriod, + double *output ); +#endif + + /* Provides an equivalent to standard "math.h" functions. */ +#if defined( _MANAGED ) + #define std_floor Math::Floor + #define std_ceil Math::Ceiling + #define std_fabs Math::Abs + #define std_atan Math::Atan + #define std_cos Math::Cos + #define std_sin Math::Sin + #define std_sqrt Math::Sqrt + #define std_tanh Math::Tanh + #define std_tan Math::Tan + #define std_sinh Math::Sinh + #define std_log10 Math::Log10 + #define std_log Math::Log + #define std_exp Math::Exp + #define std_cosh Math::Cosh + #define std_asin Math::Asin + #define std_acos Math::Acos +#elif defined( _JAVA ) || defined( _RUST ) + #define std_floor Math.floor + #define std_ceil Math.ceil + #define std_fabs Math.abs + #define std_atan Math.atan + #define std_cos Math.cos + #define std_sin Math.sin + #define std_sqrt Math.sqrt + #define std_tanh Math.tanh + #define std_tan Math.tan + #define std_sinh Math.sinh + #define std_log10 Math.log10 + #define std_log Math.log + #define std_exp Math.exp + #define std_cosh Math.cosh + #define std_asin Math.asin + #define std_acos Math.acos +#else + #define std_floor floor + #define std_ceil ceil + #define std_fabs fabs + #define std_atan atan + #define std_cos cos + #define std_sin sin + #define std_sqrt sqrt + #define std_tanh tanh + #define std_tan tan + #define std_sinh sinh + #define std_log10 log10 + #define std_log log + #define std_exp exp + #define std_cosh cosh + #define std_asin asin + #define std_acos acos +#endif + +/* Rounding macro for doubles. Works only with positive numbers. */ +#define round_pos(x) (std_floor((x)+0.5)) + +/* Rounding macro for doubles. Works only with negative numbers. */ +#define round_neg(x) (std_ceil((x)-0.5)) + +/* Rounding with a precision of 2 digit after the dot */ +#define round_pos_2(x) ((std_floor((x*100.0)+0.5))/100.0) +#define round_neg_2(x) ((std_ceil((x*100.0)-0.5))/100.0) + +/* In the context of TA-Lib, floating point are often + * compared within an acceptable error range. + * + * As an example,a TA oscillator ranging from 0 to 100 can + * fairly be considered equal if their difference is less + * than 0.000001. + * + * Ranging around zero also allows to work around limit + * cases where floating point minimal step (EPSILON) causes + * unexpected cummulative effect (ending with "negative zero" + * being one example). + * + * FLT_EPSILON == 1.192092896e-07 for float type on intel with msvc. + * DBL_EPSILON == 2.2204460492503131e-016 for the double type. + * + * Warning: These macro are not intended as "general purpose" floating + * point comparison. TA_REAL_EQ is not even transitive. The "ep" parameter + * must be carefully choosen to work in the domain of the tested values. + * Do a search on Google for a more generalize algo. + */ +#define TA_EPSILON (0.00000000000001) +#define TA_REAL_EQ(x,v,ep) (((v-ep) (b)) ? (a) : (b)) +#endif + +/* Candlestick macros (used by candlestick functions, where the parameters are always called inClose, inOpen, etc. + * Don't use i++ or func(i) with these macros ! + */ + +#define TA_REALBODY(IDX) ( std_fabs( inClose[IDX] - inOpen[IDX] ) ) +#define TA_UPPERSHADOW(IDX) ( inHigh[IDX] - ( inClose[IDX] >= inOpen[IDX] ? inClose[IDX] : inOpen[IDX] ) ) +#define TA_LOWERSHADOW(IDX) ( ( inClose[IDX] >= inOpen[IDX] ? inOpen[IDX] : inClose[IDX] ) - inLow[IDX] ) +#define TA_HIGHLOWRANGE(IDX) ( inHigh[IDX] - inLow[IDX] ) +#define TA_CANDLECOLOR(IDX) ( inClose[IDX] >= inOpen[IDX] ? 1 : -1 ) + +#if defined( _MANAGED ) + #define TA_CANDLERANGETYPE(SET) (Globals->candleSettings[(int)CandleSettingType::SET]->rangeType) + #define TA_CANDLEAVGPERIOD(SET) (Globals->candleSettings[(int)CandleSettingType::SET]->avgPeriod) + #define TA_CANDLEFACTOR(SET) (Globals->candleSettings[(int)CandleSettingType::SET]->factor) +#elif defined( _JAVA ) || defined( _RUST ) + #define TA_CANDLERANGETYPE(SET) (this.candleSettings[CandleSettingType.SET.ordinal()].rangeType) + #define TA_CANDLEAVGPERIOD(SET) (this.candleSettings[CandleSettingType.SET.ordinal()].avgPeriod) + #define TA_CANDLEFACTOR(SET) (this.candleSettings[CandleSettingType.SET.ordinal()].factor) +#else + #define TA_CANDLERANGETYPE(SET) (TA_Globals->candleSettings[TA_##SET].rangeType) + #define TA_CANDLEAVGPERIOD(SET) (TA_Globals->candleSettings[TA_##SET].avgPeriod) + #define TA_CANDLEFACTOR(SET) (TA_Globals->candleSettings[TA_##SET].factor) +#endif + +#define TA_CANDLERANGE(SET,IDX) \ + ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_RealBody,RealBody) ? TA_REALBODY(IDX) : \ + ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_HighLow,HighLow) ? TA_HIGHLOWRANGE(IDX) : \ + ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_Shadows,Shadows) ? TA_UPPERSHADOW(IDX) + TA_LOWERSHADOW(IDX) : \ + 0 ) ) ) +#define TA_CANDLEAVERAGE(SET,SUM,IDX) \ + ( TA_CANDLEFACTOR(SET) \ + * ( TA_CANDLEAVGPERIOD(SET) != 0.0? SUM / TA_CANDLEAVGPERIOD(SET) : TA_CANDLERANGE(SET,IDX) ) \ + / ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_Shadows,Shadows) ? 2.0 : 1.0 ) \ + ) +#define TA_REALBODYGAPUP(IDX2,IDX1) ( min(inOpen[IDX2],inClose[IDX2]) > max(inOpen[IDX1],inClose[IDX1]) ) +#define TA_REALBODYGAPDOWN(IDX2,IDX1) ( max(inOpen[IDX2],inClose[IDX2]) < min(inOpen[IDX1],inClose[IDX1]) ) +#define TA_CANDLEGAPUP(IDX2,IDX1) ( inLow[IDX2] > inHigh[IDX1] ) +#define TA_CANDLEGAPDOWN(IDX2,IDX1) ( inHigh[IDX2] < inLow[IDX1] ) + +#endif diff --git a/src/ta-lib/src/tools/Makefile.am b/src/ta-lib/src/tools/Makefile.am new file mode 100644 index 000000000..e3bfc9182 --- /dev/null +++ b/src/ta-lib/src/tools/Makefile.am @@ -0,0 +1,2 @@ +AUTOMAKE_OPTIONS = foreign 1.4 +SUBDIRS = gen_code ta_regtest diff --git a/src/ta-lib/src/tools/gen_code/Makefile.am b/src/ta-lib/src/tools/gen_code/Makefile.am new file mode 100644 index 000000000..88be49e78 --- /dev/null +++ b/src/ta-lib/src/tools/gen_code/Makefile.am @@ -0,0 +1,16 @@ + +# gen_code should not be installed. +noinst_PROGRAMS = gen_code + +gen_code_SOURCES = gen_code.c + +gen_code_CPPFLAGS = -I../../ta_common +gen_code_LDFLAGS = -no-undefined +gen_code_LDADD = \ + ../../ta_common/libta_common.la \ + ../../ta_abstract/libta_abstract_gc.la \ + ../../ta_func/libta_func.la \ + $(LIBM) + +all-local: gen_code + $(LIBTOOL) --mode=execute ../post-build-bin.sh gen_code diff --git a/src/ta-lib/src/tools/gen_code/gen_code.c b/src/ta-lib/src/tools/gen_code/gen_code.c new file mode 100644 index 000000000..445278fd3 --- /dev/null +++ b/src/ta-lib/src/tools/gen_code/gen_code.c @@ -0,0 +1,5005 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier (mfortier@ta-lib.org) + * ST Steve Thames (steve@softlife.com) + * AC Angelo Ciceri + * RM Robert Meier (talib@meierlim.com) + * CM Craig Miller (c-miller@users.sourceforge.net) + * RG Richard Gomes + * AB Anatol Belski (ab@php.net) + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 052403 MF Many modifications related to generate code that works + * with the windows .NET Managed C++ compiler. + * 092103 MF Now touch files only when there is really a change. + * 101303 MF Remove underscore from names. + * 020804 MF,ST Fixes to make it work on Linux (Bug#873879). + * 022904 MF Add TA_GetLookback + * 030604 MF Add generation of "ta_func.swg" + * 082004 AC Add generation of candlestick functions declaration + * 010405 RM Change createProjTemplate to work with VS03 and VS05 + * 031805 MF Add generation of MSVC project file. + * 061805 MF Changes related to .NET verifiable code. + * 062505 MF Fix 'out' attribute for .NET verifiable code. + * 121705 MF Complete Java port. + * 012806 MF Add call to Java post-processing. + * 093006 MF Add code generation for TA_FunctionDescription + * 110206 AC Change volume and open interest to double + * 120106 MF Add generation of java_defs.h + * 122406 MF Add generation of Makefile.am + * 011707 CM Add ta_pragma.h handles VC8 warnings, type conversion of strlen handles VC warning + * 021807 MF Add generation of VS2005 project file + * 040107 MF,RG Add generation of CoreAnnotated.java + * 091307 MF Add generation of Intel C++ compiler project file (TA-Lib Pro only) + * 052508 MF Add generation of VS2008 project file + * 061608 MF Add code to preserve proprietary code marker for TA-Lib pro. + * 071808 MF Add generation for Add-Ins express product (TA-Lib Pro only). + * 082712 AB Implemented java code generation on linux. + * 110724 MF Removed all TA-Lib Pro specific code. + * 110824 MF Removed VS2005 and VS2008 project file generation. + */ + +/* Description: + * Generates/maintains a lot of files. Run "gen_code ?" to + * get the complete list. + * + * The generator use as input the interface defined + * from static data in the TA-Abstract module. + * (Look for the 'table_x.c' files) + * + * This utility is intended only for TA-Lib maintainers, not + * the library users. + * + * Note: All directory in this code is relative to the 'bin' + * directory. You must run "gen_code" from ta-lib/bin. + * + */ +#include "ta_pragma.h" /* this must be the first inclusion */ +#include +#include +#include +#include +#include +#include + +// Comment-out these to reduce processing time (useful for devs) +#define ENABLE_JAVA +#define ENABLE_C +#define ENABLE_DOTNET +#define ENABLE_RUST + +// Comment to genereate all functions. +#define RUST_SINGLE_FUNC "MULT" + +#if !defined(__WIN32__) && !defined(__MSDOS__) && !defined(WIN32) + #include +#endif + +#if defined (WIN32) + #include + #include // _getcwd +#endif + +#include "ta_common.h" +#include "ta_abstract.h" +#include "ta_memory.h" + +#if defined(__WIN32__) || defined(WIN32) + #define PATH_SEPARATOR "\\" +const char *gmcpp_exec = "..\\src\\tools\\gen_code\\mcpp.exe"; +#else +#include +#define PATH_SEPARATOR "/" +const char *gmcpp_exec = "/usr/bin/mcpp"; +#endif + +int gmcpp_installed = 0; // 0 = mcpp not installed, 1 = verified installed + +void run_command(const char *command, char *output, size_t output_size) +{ + FILE *fp; +#if defined(_WIN32) || defined(_WIN64) + fp = _popen(command, "r"); +#else + fp = popen(command, "r"); +#endif + if (fp == NULL) { + fprintf(stderr, "Failed to run command: %s\n", command); + exit(1); + } + if (fgets(output, output_size, fp) == NULL) { + fprintf(stderr, "Failed to read command output: %s\n", command); +#if defined(_WIN32) || defined(_WIN64) + _pclose(fp); +#else + pclose(fp); +#endif + exit(1); + } +#if defined(_WIN32) || defined(_WIN64) + _pclose(fp); +#else + pclose(fp); +#endif + // Remove trailing newline character + output[strcspn(output, "\n")] = '\0'; +} + +const char* verify_git_repo() { + static char root_dir[1024]; + char output[1024]; + + // Check if Git is installed + run_command("git --version", output, sizeof(output)); + + // Check if the current directory is inside a Git work tree + run_command("git rev-parse --is-inside-work-tree", output, sizeof(output)); + if (strcmp(output, "true") != 0) { + fprintf(stderr, "Must run this script while the current directory is in a TA-Lib Git repository.\n"); + exit(1); + } + + // Get the root directory of the Git repository + run_command("git rev-parse --show-toplevel", root_dir, sizeof(root_dir)); + + // Change to the root directory of the Git repository for validation. +#if defined(_WIN32) || defined(_WIN64) + if (_chdir(root_dir) != 0) { +#else + if (chdir(root_dir) != 0) { +#endif + perror("_chdir"); + exit(1); + } + + // Sanity check that src/ta_func exists +#if defined(_WIN32) || defined(_WIN64) + if (_access("./src/ta_func", 0) != 0) { +#else + if (access("./src/ta_func", F_OK) != 0) { +#endif + fprintf(stderr, "Current directory is not a TA-Lib Git repository (src/ta_func missing).\n"); + exit(1); + } + + return root_dir; +} + +static char *ta_fs_path(int count, ...) { + char *path = (char *)malloc(16000); /* XXX quick and dirty */ + char *p; + va_list argp; + int j; + + va_start(argp, count); + + p = path; + for (j = 0; j < count; j++) { + int i; + char *part; + + part = va_arg(argp, char *); + i = strlen(part); + + memmove(p, part, i); + p += i; + + memmove(p, PATH_SEPARATOR, 1); + p++; + } + *--p = '\0'; + + va_end(argp); + + return path; +} + + +#define BUFFER_SIZE 16000 + +#define FILE_WRITE 0 +#define WRITE_ON_CHANGE_ONLY 0 + +#define FILE_READ 0x00000001 +#define WRITE_ALWAYS 0x00000002 + +#ifndef min + #define min(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef max + #define max(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +typedef struct +{ + FILE *file; + FILE *fileTarget; + FILE *templateFile; + char f1_name[BUFFER_SIZE]; + char f2_name[BUFFER_SIZE]; + + int flags; +} FileHandle; + +FileHandle *gOutFunc_H = NULL; /* For "ta_func.h" */ +FileHandle *gOutFrame_H = NULL; /* For "ta_frame.h" */ +FileHandle *gOutFrame_C = NULL; /* For "ta_frame.c" */ +FileHandle *gOutGroupIdx_C = NULL; /* For "ta_group_idx.c" */ +FileHandle *gOutFunc_C = NULL; /* For "ta_x.c" where 'x' is TA function name. */ +FileHandle *gOutRetCode_C = NULL; /* For "ta_retcode.c" */ +FileHandle *gOutRetCode_CSV = NULL; /* For "ta_retcode.csv" */ +FileHandle *gOutFuncList_TXT = NULL; /* For "ta_func_list.txt" */ +FileHandle *gOutDefs_H = NULL; /* For "ta_defs.h" */ +FileHandle *gOutFunc_SWG = NULL; /* For SWIG */ +FileHandle *gOutFunc_XML = NULL; /* For "ta_func_api.xml" */ +FileHandle *gOutFuncAPI_C = NULL; /* For "ta_func_api.c" */ +FileHandle *gOutMakefile_AM = NULL; /* For "Makefile.am" */ + +FileHandle *gOutCore_Java = NULL; /* For Core.Java */ +FileHandle *gOutJavaDefs_H = NULL; /* For "java_defs.h" */ +FileHandle *gOutFunc_Annotation = NULL; /* For "CoreAnnotated.java" */ + +#ifdef _MSC_VER +/* The following files are generated only on Windows platform. */ +FileHandle *gOutDotNet_H = NULL; /* For .NET interface file */ +FileHandle *gOutProjFile = NULL; /* For .NET project file */ +FileHandle *gOutMSVCProjFile = NULL; /* For MSVC project file */ +#endif + +static void create_dirs( void ); +static void create_dir_recursively( const char *dir ); + +static void writeRustMod( void ); +static void genRustCodePhase2( const TA_FuncInfo *funcInfo ); + +static void genJavaCodePhase1( const TA_FuncInfo *funcInfo ); +static void genJavaCodePhase2( const TA_FuncInfo *funcInfo ); + +/* To generate CoreAnnotated.java */ +static void printJavaFunctionAnnotation(const TA_FuncInfo *funcInfo); + + +typedef void (*TA_ForEachGroup)( const char *groupName, + unsigned int index, + unsigned int isFirst, /* Boolean */ + unsigned int isLast /* Boolean */ + ); + +static unsigned int forEachGroup( TA_ForEachGroup forEachGroupfunc, + void *opaqueData ); + +static void doForEachFunctionPhase1( const TA_FuncInfo *funcInfo, + void *opaqueData ); + +static void doForEachFunctionPhase2( const TA_FuncInfo *funcInfo, + void *opaqueData ); + +static void doForEachFunctionXml( const TA_FuncInfo *funcInfo, + void *opaqueData ); + +static void doForEachUnstableFunction( const TA_FuncInfo *funcInfo, + void *opaqueData ); + +static void doDefsFile( void ); + +static int gen_retcode( void ); + +static void printIndent( FILE *out, unsigned int indent ); + +typedef struct { + FILE *out; + const char *prefix; + const TA_FuncInfo *funcInfo; + unsigned int lookbackSignature; + unsigned int validationCode; + unsigned int lookbackValidationCode; +} PrintFuncParamStruct; + +static void printRustFunc(const PrintFuncParamStruct *printFuncParamStruct); +static void printRustLookbackFunction(const PrintFuncParamStruct *printFuncParamStruct); +static void printRustDoublePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct); +static void printRustSinglePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct); + +static void printFunc(FILE *out, + const char *prefix, /* Can be NULL */ + const TA_FuncInfo *funcInfo, + unsigned int prototype, /* Boolean */ + unsigned int frame, /* Boolean */ + unsigned int semiColonNeeded, /* Boolean */ + unsigned int validationCode, /* Boolean */ + unsigned int lookbackSignature, /* Boolean */ + unsigned int managedCPPCode, /* Boolean */ + unsigned int managedCPPDeclaration, /* Boolean */ + unsigned int inputIsSinglePrecision, /* Boolean */ + unsigned int outputForSWIG, /* Boolean */ + unsigned int outputForJava, /* Boolean */ + unsigned int lookbackValidationCode, /* Boolean */ + unsigned int useSubArrayObject, /* Boolean */ + unsigned int arrayToSubArrayCnvt, /* Boolean */ + unsigned int outputForRust /* Boolean */ +); + +static void printCallFrame ( FILE *out, const TA_FuncInfo *funcInfo ); +static void printFrameHeader( FILE *out, const TA_FuncInfo *funcInfo, unsigned int lookbackSignature ); + +static void printExternReferenceForEachFunction( const TA_FuncInfo *info, + void *opaqueData ); + +static void printFunctionAddress( const TA_FuncInfo *info, + void *opaqueData ); + +static void printPerGroupList( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ); + +static void printGroupListAddress( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ); +static void printGroupSize( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ); +static void printGroupSizeAddition( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ); + +static int addUnstablePeriodEnum( FILE *out ); + +static int createTemplate( FileHandle *in, FileHandle *out ); + +static int generateFuncAPI_C( void ); + +#ifdef _MSC_VER +static int createProjTemplate( FileHandle *in, FileHandle *out ); +static int createMSVCProjTemplate( FileHandle *in, FileHandle *out ); +#endif + +static void writeFuncFile( const TA_FuncInfo *funcInfo ); +static void doFuncFile( const TA_FuncInfo *funcInfo ); +static void printOptInputValidation( FILE *out, + const char *name, + const TA_OptInputParameterInfo *optInputParamInfo, + int lookbackValidationCode /* Boolean */ ); +static int skipToGenCode( const char *dstName, FILE *out, FILE *templateFile ); +static void printDefines( FILE *out, const TA_FuncInfo *funcInfo ); + +static void printFuncHeaderDoc( FILE *out, + const TA_FuncInfo *funcInfo, + const char *prefix ); + + +static void extractTALogic( FILE *inFile, FILE *outFile ); + +static void cnvtToUpperCase( char *str ); +static void cnvtChar( char *str, char from, char to ); +static char *trimWhitespace( char *str ); + +/* Return 1 on success */ +static int copyFile( const char *src, const char *dest ); + +/* Return 1 when identical */ +static int areFileSame( const char *file1, const char *file2 ); + +static void fileDelete( const char *fileToDelete ); + +static void appendToFunc( FILE *out ); + +static void convertFileToCArray( FILE *in, FILE *out ); + +static void ReplaceReservedXmlCharacters(const char *input, char *output ); + +char gToOpen[BUFFER_SIZE]; +char gTempBuf[BUFFER_SIZE]; +char gTempBuf2[BUFFER_SIZE]; +char gTempBuf3[BUFFER_SIZE]; +char gTempBufForPrint[BUFFER_SIZE]; +char gTempDoubleToStr[200]; + +/* Because Microsoft and Borland does not display + * the value of a double in the same way (%e), this + * function attempts to eliminate difference. This + * is done to avoid annoying difference with CVS. + */ +const char *doubleToStr( double value ); + +const char *gCurrentGroupName; + +static int genCode(int argc, char* argv[]); + +extern const TA_OptInputParameterInfo TA_DEF_UI_MA_Method; + +/* Set this variable to 1 whenever you wish to output a + * prefix to all generated line. + */ +int genPrefix = 0; + +void print( FILE *out, const char *text, ... ) +{ + va_list arglist; + memset(gTempBufForPrint,0,sizeof(gTempBufForPrint)); + + va_start(arglist,text); + vsprintf(gTempBufForPrint,text,arglist); + va_end(arglist); + + if( strlen(gTempBufForPrint) >= BUFFER_SIZE-strlen("/* Generated */ ") ) + { + printf( "Lines length exceed internal buffers (%lu,%lu)\n", + (unsigned long)strlen(gTempBufForPrint), + (unsigned long)(BUFFER_SIZE-strlen("/* Generated */ ")) ); + exit(-1); + } + if( genPrefix ) + fprintf( out, "/* Generated */ %s", gTempBufForPrint ); + else + fprintf( out, "%s", gTempBufForPrint ); +} + +static void printIndent( FILE *out, unsigned int indent ) +{ + unsigned int i; + + if( genPrefix ) + fprintf( out, "/* Generated */ " ); + + for( i=0; i < indent; i++ ) + { + fprintf( out, " " ); + } +} + + +int main(int argc, char* argv[]) +{ + int retValue; + TA_RetCode retCode; + + if( argc > 1 ) + { + /* There is no parameter needed for this tool. */ + printf( "\n" ); + printf( "gen_code V%s - Updates TA-Lib source and docs files\n", TA_GetVersionString() ); + printf( "\n" ); + printf( "Usage: gen_code\n"); + printf( "\n" ); + printf( " No parameter needed.\n" ); + printf( "\n** Must be run from a directory within a ta-lib repos\n" ); + printf( "\n" ); + printf( " This utility is only for developers maintaining TA-Lib itself.\n" ); + printf( "\n" ); + printf( " The interface definitions in src/ta_abstract/tables are used\n" ); + printf( " as an input that specify which function to generate.\n" ); + printf( "\n" ); + printf( " The following files are created or updated:\n" ); + printf( " - ta-lib/include/ta_func.h\n" ); + printf( " - ta-lib/include/ta_defs.h\n" ); + printf( " - ta-lib/ta_func_list.txt\n" ); + printf( " - ta-lib/src/ta_common/ta_retcode.*\n" ); + printf( " - ta-lib/src/ta_abstract/ta_group_idx.c\n"); + printf( " - ta-lib/src/ta_abstract/frames/*.*\n"); + printf( " - ta-lib/swig/src/interface/ta_func.swg\n" ); + printf( " - ta-lib/dotnet/src/Core/TA-Lib-Core.vcproj (Win32 only)\n" ); + printf( " - ta-lib/dotnet/src/Core/TA-Lib-Core.h (Win32 only)\n" ); + printf( " - ta-lib/src/ta_abstract/java_defs.h (Win32 only)\n" ); + printf( " - ta-lib/ide/msvc/lib_proj/ta_func/ta_func.dsp (Win32 only)\n" ); + printf( " - ta-lib/java/src/com/tictactec/ta/lib/Core.java\n" ); + printf( " - ta-lib/java/src/com/tictactec/ta/lib/CoreAnnotated.java\n" ); + printf( " - ta-lib/ta_func_api.xml\n" ); + printf( " - ta-lib/src/ta_abstract/ta_func_api.c\n" ); + printf( " ... and more ..."); + printf( "\n" ); + printf( " The functions signature, params and validation code\n" ); + printf( " for all functions under src/ta_func are also updated.\n" ); + printf( "\n" ); + exit(-1); + } + + const char *root_dir = verify_git_repo(); + + // gen_code expect execution from root_dir/bin. + char bin_dir[1024]; + snprintf(bin_dir, sizeof(bin_dir), "%s%sbin", root_dir, PATH_SEPARATOR); +#if defined(_WIN32) || defined(_WIN64) + if (_chdir(bin_dir) != 0) { +#else + if (chdir(bin_dir) != 0) { +#endif + perror("chdir to bin"); + exit(1); +} + + printf( "gen_code V%s\n", TA_GetVersionString() ); + + // Show the path being used (to help debugging) + char temp_buffer[1024]; + char* cwd; + +#if defined(_WIN32) || defined(_WIN64) + cwd = _getcwd(temp_buffer, sizeof(temp_buffer)); +#else + cwd = getcwd(temp_buffer, sizeof(temp_buffer)); +#endif + if (cwd) { + printf("Executing from [%s]\n", cwd); + } else { + perror("getcwd() error"); + return 1; + } + + create_dirs(); + + // Detect if mcpp is installed. + gmcpp_installed = 0; + #if defined(ENABLE_RUST) + #if defined(_WIN32) + // TODO + gmcpp_installed = 1; + #else + gmcpp_installed = (system("which mcpp >/dev/null 2>&1") == 0); + run_command("which mcpp", temp_buffer, sizeof(temp_buffer)); + if (temp_buffer[0] != '\0') { + gmcpp_exec = temp_buffer; + printf("mcpp found at %s\n", gmcpp_exec); + } + #endif + #endif + + retCode = TA_Initialize(); + if( retCode != TA_SUCCESS ) + { + printf( "\nCannot initialize the library\n"); + return -1; + } + + printf( "Now updating source code...\n" ); + + retValue = genCode( argc, argv ); + + retCode = TA_Shutdown(); + if( retCode != TA_SUCCESS ) + { + printf( "Shutdown failed (%d)\n", retCode ); + } + + #if defined(ENABLE_RUST) + if( gmcpp_installed == 0 ) + { + printf( "\nWarning: mcpp is not installed. Rust code generation skipped.\n" ); + printf("To install do 'sudo apt install mcpp' or 'brew install mcpp'.\n"); + } + #endif + + return retValue; +} + + +/* The following I/O function facilitate file modifications. + * + * When opening the file, specifiy a path relative to ta-lib/bin. + * + * 'templateFile' is the source to create a new file. + * This template must contain one '%%%GENCODE%%%' token. + * + * All characters before the token are written to the output + * on fileOpen, and all characters after the token are + * appended on fileClose. + * + * 'templateFile' is ignored when FILE_READ is specified. + * + * Another advantage to use fileOpen/fileClose is the writing + * is first done in a temporary file and the target file + * is touch only if there was actually a modification. + * + * On failure, simply exit. + */ +static void init_gToOpen( const char *filePath, const char *suffix ) +{ + strcpy( gToOpen, filePath ); + if( suffix ) + strcat( gToOpen, suffix ); +} + + +static FileHandle *fileOpen( const char *fileToOpen, + const char *templateFile, + int flags ) +{ + FileHandle *retValue; + + if( (fileToOpen == NULL) || + ((flags&FILE_READ) && (templateFile != NULL)) ) + { + printf( "Internal error line %d", __LINE__ ); + return (FileHandle *)NULL; + } + + retValue = TA_Malloc( sizeof(FileHandle) ); + if( !retValue ) + { + printf( "Memory alloc error line %d", __LINE__ ); + return (FileHandle *)NULL; + } + + memset( retValue, 0, sizeof(FileHandle) ); + + retValue->flags = flags; + + init_gToOpen( fileToOpen, NULL ); + strcpy( retValue->f1_name, gToOpen ); + + /* First let's try to open the file. Might fail when + * for writing but that is ok. (the file might not exist). + */ + if( flags&FILE_READ ) + { + retValue->file = fopen( gToOpen, "r" ); + if( retValue->file == NULL ) + { + memset( retValue, 0, sizeof(FileHandle) ); + TA_Free( retValue ); + return (FileHandle *)NULL; + } + } + else if( flags&WRITE_ALWAYS ) + { + retValue->file = fopen( gToOpen, "w" ); + if( retValue->file == NULL ) + { + memset( retValue, 0, sizeof(FileHandle) ); + TA_Free( retValue ); + return (FileHandle *)NULL; + } + } + else + { + retValue->file = fopen( gToOpen, "r" ); + + if( retValue->file ) + { + /* Move pointer to fileTarget. The file + * ptr will become the temporary file who + * is going to be truly write enabled. + */ + retValue->fileTarget = retValue->file; + init_gToOpen( fileToOpen, ".tmp" ); + strcpy( retValue->f2_name, gToOpen ); + retValue->file = fopen( gToOpen, "w" ); + if( !retValue->file ) + { + fclose( retValue->fileTarget ); + memset( retValue, 0, sizeof(FileHandle) ); + TA_Free( retValue ); + return (FileHandle *)NULL; + } + } + else + { + /* File does not exist, directly open for write + * no temporary will be used. + */ + retValue->fileTarget = NULL; + retValue->file = fopen( gToOpen, "w" ); + + if( retValue->file == NULL ) + { + memset( retValue, 0, sizeof(FileHandle) ); + TA_Free( retValue ); + return (FileHandle *)NULL; + } + } + } + + if( !(flags&FILE_READ) ) + { + /* Handle the template. */ + if( templateFile ) + { + init_gToOpen( templateFile, NULL ); + retValue->templateFile = fopen( gToOpen, "r" ); + if( retValue->templateFile == NULL ) + { + if(retValue->fileTarget) fclose( retValue->fileTarget ); + if(retValue->file) fclose( retValue->file ); + if(retValue->templateFile) fclose( retValue->templateFile ); + memset( retValue, 0, sizeof(FileHandle) ); + TA_Free( retValue ); + printf( "\nCannot open template [%s]\n", gToOpen ); + return (FileHandle *)NULL; + } + + /* Copy the header part of the template. */ + if( skipToGenCode( fileToOpen, retValue->file, retValue->templateFile ) != 0 ) + { + if(retValue->fileTarget) fclose( retValue->fileTarget ); + if(retValue->file) fclose( retValue->file ); + if(retValue->templateFile) fclose( retValue->templateFile ); + memset( retValue, 0, sizeof(FileHandle) ); + TA_Free( retValue ); + return (FileHandle *)NULL; + } + } + } + + return retValue; +} + +static void fileClose( FileHandle *handle ) +{ + if( !handle ) return; + + /* Write remaining template info. */ + if( handle->templateFile && handle->file ) + { + while( fgets( gTempBuf, BUFFER_SIZE, handle->templateFile ) != NULL ) + { + if( fputs( gTempBuf, handle->file ) == EOF ) + { + printf( "Cannot write to output file! Disk Full? " ); + break; + } + } + + #if 0 + /* Make sure the last line of the output + * finish with a carriage return. This may + * avoid warning from some compilers. + */ + if( gTempBuf[0] != '\n' ) + { + fprintf( handle->file, "\n" ); + } + #endif + } + + if(handle->fileTarget) fclose( handle->fileTarget ); + if(handle->templateFile) fclose( handle->templateFile ); + if(handle->file) fclose( handle->file ); + + if( !(handle->flags&FILE_READ) && !(handle->flags&WRITE_ALWAYS) && (handle->fileTarget != NULL)) + { + if( !areFileSame( handle->f1_name, handle->f2_name ) ) + copyFile( handle->f2_name, handle->f1_name ); + + fileDelete( handle->f2_name ); + } + + memset( handle, 0, sizeof(FileHandle) ); + TA_Free( handle ); +} + +static void fileDelete( const char *fileToDelete ) +{ + if (!fileToDelete) return; + + init_gToOpen( fileToDelete, NULL ); + + #if defined (WIN32) + DeleteFile (fileToDelete); + #else + unlink (fileToDelete); + #endif +} + +static int genCode(int argc, char* argv[]) +{ + TA_RetCode retCode; + unsigned int nbGroup; + FileHandle *tempFile; + + FileHandle *tempFileOut; + + (void)argc; /* Get ride of compiler warning */ + (void)argv; + int ret; + + #ifdef _MSC_VER + /* Create .NET project files template */ + #define FILE_NET_PROJ ta_fs_path(5, "..", "dotnet", "src", "Core", "TA-Lib-Core.vcproj") + #define FILE_NET_PROJ_TMP ta_fs_path(3, "..", "temp", "dotnetproj.tmp") + gOutProjFile = fileOpen( FILE_NET_PROJ, NULL, FILE_READ ); + if( gOutProjFile == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + tempFile = fileOpen( FILE_NET_PROJ_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); + if( tempFile == NULL ) + { + printf( "Cannot create temporary .NET project file!\n" ); + return -1; + } + if( createProjTemplate( gOutProjFile, tempFile ) != 0 ) + { + printf( "Failed to parse and write the temporary .NET project file!\n" ); + return -1; + } + fileClose(gOutProjFile); + fileClose(tempFile); + + /* Create MSVC project files template */ + #define FILE_MSVC_PROJ ta_fs_path(6, "..", "ide", "msvc", "lib_proj", "ta_func", "ta_func.dsp") + #define FILE_MSVC_PROJ_TMP ta_fs_path(3, "..", "temp", "ta_func_dsp.tmp") + gOutMSVCProjFile = fileOpen( FILE_MSVC_PROJ, NULL, FILE_READ ); + if( gOutMSVCProjFile == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + tempFile = fileOpen( FILE_MSVC_PROJ_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); + if( tempFile == NULL ) + { + printf( "Cannot create temporary MSVC project file!\n" ); + return -1; + } + if( createMSVCProjTemplate( gOutMSVCProjFile, tempFile ) != 0 ) + { + printf( "Failed to parse and write the temporary MSVC project file!\n" ); + return -1; + } + fileClose(gOutMSVCProjFile); + fileClose(tempFile); + #endif + + + // Verify if javac executeable is installed, if not, just skip the java code generation. + #define FILE_CORE_JAVA ta_fs_path(8, "..", "java", "src", "com", "tictactec", "ta", "lib", "Core.java") + #define FILE_CORE_JAVA_TMP ta_fs_path(3, "..", "temp", "CoreJava.tmp") + #define FILE_CORE_JAVA_UNF ta_fs_path(3, "..", "temp", "CoreJavaUnformated.tmp") + + int javac_installed = 0; + #if defined(ENABLE_JAVA) + #if defined(_WIN32) + javac_installed = (system("javac -version >nul 2>&1") == 0); + #else + javac_installed = (system("javac -version >/dev/null 2>&1") == 0); + #endif + + if( !javac_installed) { + printf("warning: 'javac' not installed. Skipping Java code update\n"); + gOutCore_Java = NULL; + } else { + /* Create Java template for Core.java */ + gOutCore_Java = fileOpen( FILE_CORE_JAVA, NULL, FILE_READ ); + if( gOutCore_Java == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + tempFile = fileOpen( FILE_CORE_JAVA_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); + if( tempFile == NULL ) + { + printf( "Cannot create temporary Core.java project file!\n" ); + return -1; + } + if( createTemplate( gOutCore_Java, tempFile ) != 0 ) + { + printf( "Failed to parse and write the temporary Core.java project file!\n" ); + return -1; + } + fileClose(gOutCore_Java); + fileClose(tempFile); + } + #endif + + #if defined(ENABLE_DOTNET) + /* Create the .NET interface file template */ + #ifdef _MSC_VER + #define FILE_NET_HEADER ta_fs_path(5, "..", "dotnet", "src", "Core", "TA-Lib-Core.h") + #define FILE_NET_HEADER_TMP ta_fs_path(3, "..", "temp", "dotneth.tmp") + gOutDotNet_H = fileOpen( FILE_NET_HEADER, NULL, FILE_READ ); + if( gOutDotNet_H == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + tempFile = fileOpen( FILE_NET_HEADER_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); + if( tempFile == NULL ) + { + printf( "Cannot create temporary .NET header file!\n" ); + return -1; + } + if( createTemplate( gOutDotNet_H, tempFile ) != 0 ) + { + printf( "Failed to parse and write the temporary .NET header file!\n" ); + return -1; + } + fileClose(gOutDotNet_H); + fileClose(tempFile); + #endif + #endif + + #if defined(ENABLE_C) + /* Create ta_retcode.c */ + if( gen_retcode() != 0 ) + { + printf( "\nCannot generate src/ta_common/ta_retcode.c\n" ); + return -1; + } + + /* Create "ta_func.h" */ + gOutFunc_H = fileOpen( ta_fs_path(3, "..", "include", "ta_func.h"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_func.h.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutFunc_H == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + gOutFunc_XML = fileOpen( ta_fs_path(2, "..", "ta_func_api.xml"), NULL, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if(gOutFunc_XML == NULL) + { + printf( "\nCannot access ta_func_api.xml" ); + } + + /* Create "ta_func.swg" */ + gOutFunc_SWG = fileOpen( ta_fs_path(5, "..", "swig", "src", "interface", "ta_func.swg"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_func.swg.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutFunc_SWG == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + #endif + + #if defined(ENABLE_C) + /* Create the "ta_func_list.txt" */ + gOutFuncList_TXT = fileOpen( ta_fs_path(2, "..", "ta_func_list.txt"), + NULL, + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutFuncList_TXT == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + #endif + + + #if defined(ENABLE_C) + /* Create the "ta_frame.h" */ + gOutFrame_H = fileOpen( ta_fs_path(5, "..", "src", "ta_abstract", "frames", "ta_frame.h"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_frame.h.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutFrame_H == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + /* Create the "ta_frame.c" */ + gOutFrame_C = fileOpen( ta_fs_path(5, "..", "src", "ta_abstract", "frames", "ta_frame.c"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_frame.c.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutFrame_C == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + /* Create the "Makefile.am" */ + gOutMakefile_AM = fileOpen( ta_fs_path(4, "..", "src", "ta_func", "Makefile.am"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "Makefile.am.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutMakefile_AM == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + #endif + + #if defined(ENABLE_JAVA) + if (!gOutCore_Java) { + gOutJavaDefs_H = NULL; + } else { + /* Create "java_defs.h" */ + gOutJavaDefs_H = fileOpen( ta_fs_path(4, "..", "src", "ta_abstract", "ta_java_defs.h"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_java_defs.h.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + + if( gOutJavaDefs_H == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + } + #endif + + + #if defined(ENABLE_C) + #ifdef _MSC_VER + /* Re-open the .NET project template. */ + gOutProjFile = fileOpen( FILE_NET_PROJ, FILE_NET_PROJ_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if( gOutProjFile == NULL ) + { + printf( "Cannot update [%s]\n", FILE_NET_PROJ ); + return -1; + } + + /* Re-open the MSVC project template. */ + gOutMSVCProjFile = fileOpen( FILE_MSVC_PROJ, FILE_MSVC_PROJ_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if( gOutMSVCProjFile == NULL ) + { + printf( "Cannot update [%s]\n", FILE_MSVC_PROJ ); + return -1; + } + #endif + #endif + + #if defined(ENABLE_JAVA) + if (gOutCore_Java == NULL) { + gOutFunc_Annotation = NULL; + } else { + /* Create "CoreAnnotated.java" */ + gOutFunc_Annotation = fileOpen( ta_fs_path(8, "..", "java", "src", "com", "tictactec", "ta", "lib", "CoreAnnotated.java"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "CoreAnnotated.java.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if(gOutFunc_Annotation == NULL) + { + printf( "\nCannot access CoreAnnotated.java" ); + } + + /* Re-open the Core.java template. */ + gOutCore_Java = fileOpen( FILE_CORE_JAVA_UNF, FILE_CORE_JAVA_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if( gOutCore_Java == NULL ) + { + printf( "Cannot update [%s]\n", FILE_CORE_JAVA_UNF ); + return -1; + } + } + #endif + + #if defined(ENABLE_DOTNET) + /* Re-open the .NET interface template. */ + #ifdef _MSC_VER + gOutDotNet_H = fileOpen( FILE_NET_HEADER, FILE_NET_HEADER_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if( gOutDotNet_H == NULL ) + { + printf( "Cannot update [%s]\n", FILE_NET_HEADER ); + return -1; + } + #endif + #endif + + /* Process each functions. Two phase. */ + TA_ForEachFunc( doForEachFunctionPhase1, NULL ); + TA_ForEachFunc( doForEachFunctionPhase2, NULL ); + + #if defined(ENABLE_C) + /* Leave empty line for Makefile.am */ + fprintf( gOutMakefile_AM->file, "\n" ); + + /* Append some "hard coded" prototype for ta_func */ + appendToFunc( gOutFunc_H->file ); + if (gOutFunc_SWG) appendToFunc( gOutFunc_SWG->file ); + + /* Seperate generation of xml description file */ + fprintf(gOutFunc_XML->file, "\n"); + fprintf(gOutFunc_XML->file, "\n"); + retCode = TA_ForEachFunc( doForEachFunctionXml, NULL ); + fprintf(gOutFunc_XML->file, "\n"); + #endif + + #if defined(ENABLE_RUST) + writeRustMod(); + #endif + + /* Close all files who were updated with the list of TA functions. */ + fileClose( gOutFuncList_TXT ); + fileClose( gOutFunc_H ); + fileClose( gOutFunc_SWG ); + fileClose( gOutFrame_H ); + fileClose( gOutFrame_C ); + fileClose( gOutFunc_XML ); + fileClose( gOutMakefile_AM ); + fileClose( gOutCore_Java ); + fileClose( gOutJavaDefs_H ); + fileClose( gOutFunc_Annotation ); + fileDelete( FILE_CORE_JAVA_TMP ); + + #ifdef _MSC_VER + fileClose( gOutDotNet_H ); + fileClose( gOutProjFile ); + fileClose( gOutMSVCProjFile ); + #endif + + if( retCode != TA_SUCCESS ) + { + printf( "Failed [%d]\n", retCode ); + return -1; + } + + #if defined(ENABLE_C) + /* Create the "ta_group_idx.c" file. */ + genPrefix = 1; + gOutGroupIdx_C = fileOpen( ta_fs_path(4, "..", "src", "ta_abstract", "ta_group_idx.c"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_group_idx.c.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutGroupIdx_C == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + retCode = TA_ForEachFunc( printExternReferenceForEachFunction, NULL ); + if( retCode != TA_SUCCESS ) + { + fileClose( gOutGroupIdx_C ); + return -1; + } + + nbGroup = forEachGroup( printPerGroupList, NULL ); + + print( gOutGroupIdx_C->file, "const TA_FuncDef **TA_PerGroupFuncDef[%d] = {\n", nbGroup ); + forEachGroup( printGroupListAddress, NULL ); + print( gOutGroupIdx_C->file, "};\n\n" ); + + print( gOutGroupIdx_C->file, "const unsigned int TA_PerGroupSize[%d] = {\n", nbGroup ); + forEachGroup( printGroupSize, NULL ); + print( gOutGroupIdx_C->file, "};\n\n" ); + + print( gOutGroupIdx_C->file, "const unsigned int TA_TotalNbFunction =\n" ); + forEachGroup( printGroupSizeAddition, NULL ); + + fileClose( gOutGroupIdx_C ); + genPrefix = 0; + + /* Update "ta_defs.h" */ + doDefsFile(); + + /* Convert the xml description file into a format embedded in the library. */ + if( generateFuncAPI_C() != 1 ) + { + return -1; /* Failed. */ + } + #endif + + #if defined(ENABLE_JAVA) + /* Run Java Post-Processing. + * On Success, the Java program create a file named "java_success". + */ + if (gOutCore_Java) { + printf( "\nPost-Processing Java Code\n" ); + # define JAVA_SUCCESS_FILE ta_fs_path(3, "..", "temp", "java_success") + #define JAVA_PRETTY_TEMP_FILE ta_fs_path(3, "..", "temp", "CoreJavaPretty.tmp") + fileDelete( JAVA_SUCCESS_FILE ); + + #ifdef _MSC_VER + ret = system( "javac -cp . -d . \".." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "PrettyCode.java" ); + ret = system( "javac -cp . -d . \".." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "Main.java" ); + #else + ret = system( "javac -cp . -d . .." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "PrettyCode.java" ); + ret = system( "javac -cp . -d . .." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "Main.java" ); + #endif + ret = system( "java -cp . Main" ); + tempFile = fileOpen(JAVA_SUCCESS_FILE,NULL,FILE_READ ); + fileDelete( FILE_CORE_JAVA_UNF ); + + if( tempFile == NULL ) + { + printf( "\nWarning: Java code NOT updated.\n" ); + } + else + { + + fileClose( tempFile ); + + /* Java processing done. Overwrite the original Core.java ONLY if there + * is changes (re-use fileOpen/fileClose even if not efficient). + */ + tempFile = fileOpen( JAVA_PRETTY_TEMP_FILE, NULL, FILE_READ ); + tempFileOut = fileOpen( FILE_CORE_JAVA, NULL, + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( (tempFile == NULL) || (tempFileOut == NULL) ) + { + printf( "\nError: Java code update failed.\n" ); + return -1; + } + else + { + + while( fgets( gTempBuf, BUFFER_SIZE, tempFile->file ) ) + fputs(gTempBuf,tempFileOut->file); + + fileClose(tempFile); + fileClose(tempFileOut); + } + } + fileDelete( JAVA_SUCCESS_FILE ); + fileDelete( JAVA_PRETTY_TEMP_FILE ); + } + #endif + + /* Remove temporary files. */ + #ifdef _MSC_VER + fileDelete( FILE_NET_PROJ_TMP ); + fileDelete( FILE_MSVC_PROJ_TMP ); + fileDelete( FILE_NET_HEADER_TMP ); + #endif + + printf( "\n** Update completed with success **\n"); + + return 0; +} + +static unsigned int forEachGroup( TA_ForEachGroup forEachGroupFunc, + void *opaqueData ) +{ + TA_RetCode retCode; + TA_StringTable *table; + unsigned int i; + + (void)opaqueData; /* Get ride of compiler warning */ + + retCode = TA_GroupTableAlloc( &table ); + if( retCode != TA_SUCCESS ) + return 0; + + for( i=0; i < table->size; i++ ) + { + forEachGroupFunc( table->string[i], + i, + i==0? 1:0, + i==(table->size-1)? 1:0 ); + } + + retCode = TA_GroupTableFree( table ); + if( retCode != TA_SUCCESS ) + return 0; + + return i; +} + +/* Replaces reserved xml characters with the appropriate escape sequence. */ +static void ReplaceReservedXmlCharacters(const char *input, char *output ) +{ + char *currentPosition; + char tempString[8*1024]; + + if((input == NULL) || (output == NULL)) + { + return; + } + + strcpy(output, input); + + /*Replace '&' with "&" + *Note1: '&' has to be processed first as otherwise we replace the + * '&' in the escaped characters. + *Note2: We assume that the input string does not have any escaped + * characters already. + */ + currentPosition = output; + while((currentPosition = strchr(currentPosition, '&')) != NULL) + { + tempString[0] = '\0'; + if(strlen(currentPosition) > 1) + { + strcpy(tempString, currentPosition+1); + } + sprintf(currentPosition, "&%s", tempString); + } + + /* Replace '<' with "<" */ + currentPosition = output; + while((currentPosition = strchr(currentPosition, '<')) != NULL) + { + tempString[0] = '\0'; + if(strlen(currentPosition) > 1) + { + strcpy(tempString, currentPosition+1); + } + sprintf(currentPosition, "<%s", tempString); + } + + /* Replace '>' with ">" */ + currentPosition = output; + while((currentPosition = strchr(currentPosition, '>')) != NULL) + { + tempString[0] = '\0'; + if(strlen(currentPosition) > 1) + { + strcpy(tempString, currentPosition+1); + } + sprintf(currentPosition, ">%s", tempString); + } + + /* Replace ''' with "'" */ + currentPosition = output; + while((currentPosition = strchr(currentPosition, '\'')) != NULL) + { + tempString[0] = '\0'; + if(strlen(currentPosition) > 1) + { + strcpy(tempString, currentPosition+1); + } + sprintf(currentPosition, "'%s", tempString); + } + + /* Replace '"' with """ */ + currentPosition = output; + while((currentPosition = strchr(currentPosition, '"')) != NULL) + { + tempString[0] = '\0'; + if(strlen(currentPosition) > 1) + { + strcpy(tempString, currentPosition+1); + } + sprintf(currentPosition, ""%s", tempString); + } +} + +static void doForEachFunctionXml(const TA_FuncInfo *funcInfo, + void *opaqueData) +{ + TA_RetCode retCode; + const TA_InputParameterInfo *inputInfo; + const TA_OptInputParameterInfo *optInputInfo; + const TA_OutputParameterInfo *outputInfo; + char tempString[8*1024]; + unsigned int i; + + (void)opaqueData; + + /* General stuff about function */ + fprintf(gOutFunc_XML->file, " \n", funcInfo->name); + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " %s\n", (funcInfo->name == NULL)? "" : funcInfo->name); + fprintf(gOutFunc_XML->file, " %s\n", (funcInfo->camelCaseName == NULL)? "" : funcInfo->camelCaseName); + ReplaceReservedXmlCharacters(funcInfo->hint, tempString); + fprintf(gOutFunc_XML->file, " %s\n", (funcInfo->hint == NULL)? "" : tempString); + fprintf(gOutFunc_XML->file, " %s\n", funcInfo->group); + + /* Optional function flags */ + if(funcInfo->flags & (TA_FUNC_FLG_OVERLAP | TA_FUNC_FLG_VOLUME | TA_FUNC_FLG_CANDLESTICK | TA_FUNC_FLG_UNST_PER)) + { + fprintf(gOutFunc_XML->file, " \n"); + if(funcInfo->flags & TA_FUNC_FLG_OVERLAP) + { + fprintf(gOutFunc_XML->file, " Overlap\n"); + } + if(funcInfo->flags & TA_FUNC_FLG_VOLUME) + { + fprintf(gOutFunc_XML->file, " Volume\n"); + } + if(funcInfo->flags & TA_FUNC_FLG_CANDLESTICK) + { + fprintf(gOutFunc_XML->file, " Candlestick\n"); + } + if(funcInfo->flags & TA_FUNC_FLG_UNST_PER) + { + fprintf(gOutFunc_XML->file, " Unstable Period\n"); + } + + fprintf(gOutFunc_XML->file, " \n"); + } + + + /* Required input arguments */ + fprintf(gOutFunc_XML->file, " \n"); + for(i=0; inbInput; i++) + { + retCode = TA_GetInputParameterInfo( funcInfo->handle, i, &inputInfo); + if(inputInfo->type == TA_Input_Price) + { + if(inputInfo->flags & TA_IN_PRICE_OPEN) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " Open\n"); + fprintf(gOutFunc_XML->file, " Open\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + if(inputInfo->flags & TA_IN_PRICE_HIGH) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " High\n"); + fprintf(gOutFunc_XML->file, " High\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + if(inputInfo->flags & TA_IN_PRICE_LOW) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " Low\n"); + fprintf(gOutFunc_XML->file, " Low\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + if(inputInfo->flags & TA_IN_PRICE_CLOSE) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " Close\n"); + fprintf(gOutFunc_XML->file, " Close\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + if(inputInfo->flags & TA_IN_PRICE_VOLUME) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " Volume\n"); + fprintf(gOutFunc_XML->file, " Volume\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + if(inputInfo->flags & TA_IN_PRICE_OPENINTEREST) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " Open Interest\n"); + fprintf(gOutFunc_XML->file, " Open Interest\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + if(inputInfo->flags & TA_IN_PRICE_TIMESTAMP) + { + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " Timestamp\n"); + fprintf(gOutFunc_XML->file, " Timestamp\n"); + fprintf(gOutFunc_XML->file, " \n"); + } + } + else + { + fprintf(gOutFunc_XML->file, " \n"); + if(inputInfo->type == TA_Input_Real) + { + fprintf(gOutFunc_XML->file, " Double Array\n"); + } + else if(inputInfo->type == TA_Input_Integer) + { + fprintf(gOutFunc_XML->file, " Integer Array\n"); + } + else + { + printf("Unknown input type detected.\n"); + } + fprintf(gOutFunc_XML->file, " %s\n", inputInfo->paramName); + fprintf(gOutFunc_XML->file, " \n"); + } + } + fprintf(gOutFunc_XML->file, " \n"); + + /* Optional input arguments */ + if(funcInfo->nbOptInput > 0) + { + + fprintf(gOutFunc_XML->file, " \n"); + for(i=0; inbOptInput; i++) + { + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, &optInputInfo ); + + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " %s\n", optInputInfo->displayName); + ReplaceReservedXmlCharacters(optInputInfo->hint, tempString); + fprintf(gOutFunc_XML->file, " %s\n", (optInputInfo->hint == NULL)? "" : tempString); + if(optInputInfo->flags != 0) + { + fprintf(gOutFunc_XML->file, " \n"); + + if(optInputInfo->flags & TA_OPTIN_IS_PERCENT) + { + fprintf(gOutFunc_XML->file, " Percent\n"); + } + if(optInputInfo->flags & TA_OPTIN_IS_DEGREE) + { + fprintf(gOutFunc_XML->file, " Degree\n"); + } + if(optInputInfo->flags & TA_OPTIN_IS_CURRENCY) + { + fprintf(gOutFunc_XML->file, " Currency\n"); + } + if(optInputInfo->flags & TA_OPTIN_ADVANCED) + { + fprintf(gOutFunc_XML->file, " Advanced\n"); + } + + fprintf(gOutFunc_XML->file, " \n"); + } + + if(optInputInfo->type == TA_OptInput_RealRange) + { + TA_RealRange *doubleRange; + + doubleRange= (TA_RealRange*)optInputInfo->dataSet; + fprintf(gOutFunc_XML->file, " Double\n"); + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->min)); + fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->max)); + fprintf(gOutFunc_XML->file, " %d\n", doubleRange->precision); + fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->suggested_start)); + fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->suggested_end)); + fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->suggested_increment)); + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(optInputInfo->defaultValue)); + } + else if(optInputInfo->type == TA_OptInput_IntegerRange) + { + TA_IntegerRange *integerRange; + + integerRange = (TA_IntegerRange*)optInputInfo->dataSet; + fprintf(gOutFunc_XML->file, " Integer\n"); + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " %d\n", integerRange->min); + fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); + fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); + fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); + fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " %d\n", (int)optInputInfo->defaultValue); + } + else if(optInputInfo->type == TA_OptInput_IntegerList) + { + TA_IntegerList *intList; + + intList = (TA_IntegerList*) optInputInfo->dataSet; + fprintf(gOutFunc_XML->file, " MA Type\n"); + fprintf(gOutFunc_XML->file, " %d\n", (int)optInputInfo->defaultValue); + if( intList != (TA_IntegerList*) TA_DEF_UI_MA_Method.dataSet ) + { + printf("Integer lists are not supported.\n"); + } + } + else + { + printf("Unknown optional input type detected.\n"); + } + + fprintf(gOutFunc_XML->file, " \n"); + } + fprintf(gOutFunc_XML->file, " \n"); + } + + /* Output arguments */ + fprintf(gOutFunc_XML->file, " \n"); + for(i=0; inbOutput; i++) + { + retCode = TA_GetOutputParameterInfo( funcInfo->handle, i, &outputInfo ); + fprintf(gOutFunc_XML->file, " \n"); + if(outputInfo->type == TA_Output_Integer) + { + fprintf(gOutFunc_XML->file, " Integer Array\n"); + } + else if(outputInfo->type == TA_Output_Real) + { + fprintf(gOutFunc_XML->file, " Double Array\n"); + } + else + { + printf("Unknown output type detected.\n"); + } + fprintf(gOutFunc_XML->file, " %s\n", outputInfo->paramName); + if(outputInfo->flags != 0) + { + fprintf(gOutFunc_XML->file, " \n"); + + if(outputInfo->flags & TA_OUT_LINE) + { + fprintf(gOutFunc_XML->file, " Line\n"); + } + if(outputInfo->flags & TA_OUT_DOT_LINE) + { + fprintf(gOutFunc_XML->file, " Dotted Line\n"); + } + if(outputInfo->flags & TA_OUT_DASH_LINE) + { + fprintf(gOutFunc_XML->file, " Dashed Line\n"); + } + if(outputInfo->flags & TA_OUT_DOT) + { + fprintf(gOutFunc_XML->file, " Dots\n"); + } + if(outputInfo->flags & TA_OUT_HISTO) + { + fprintf(gOutFunc_XML->file, " Histogram\n"); + } + if(outputInfo->flags & TA_OUT_PATTERN_BOOL) + { + fprintf(gOutFunc_XML->file, " Pattern Bool\n"); + } + if(outputInfo->flags & TA_OUT_PATTERN_BULL_BEAR) + { + fprintf(gOutFunc_XML->file, " Pattern Bull Bear\n"); + } + if(outputInfo->flags & TA_OUT_PATTERN_STRENGTH) + { + fprintf(gOutFunc_XML->file, " Pattern Strength\n"); + } + if(outputInfo->flags & TA_OUT_POSITIVE) + { + fprintf(gOutFunc_XML->file, " Positive\n"); + } + if(outputInfo->flags & TA_OUT_NEGATIVE) + { + fprintf(gOutFunc_XML->file, " Negative\n"); + } + if(outputInfo->flags & TA_OUT_ZERO) + { + fprintf(gOutFunc_XML->file, " Zero\n"); + } + if(outputInfo->flags & TA_OUT_UPPER_LIMIT) + { + fprintf(gOutFunc_XML->file, " Upper Limit\n"); + } + if(outputInfo->flags & TA_OUT_LOWER_LIMIT) + { + fprintf(gOutFunc_XML->file, " Lower Limit\n"); + } + + fprintf(gOutFunc_XML->file, " \n"); + } + fprintf(gOutFunc_XML->file, " \n"); + } + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, " \n"); + fprintf(gOutFunc_XML->file, "\n"); + fprintf(gOutFunc_XML->file, "\n"); +} + +static void doForEachFunctionPhase1( const TA_FuncInfo *funcInfo, + void *opaqueData ) +{ + (void)opaqueData; + + #if defined(ENABLE_JAVA) + if (gOutCore_Java) { + genJavaCodePhase1( funcInfo ); + } + #endif +} + +static void doForEachFunctionPhase2( const TA_FuncInfo *funcInfo, + void *opaqueData ) +{ + static int firstTime = 1; + + (void)opaqueData; /* Get ride of compiler warning */ + + printf( "Processing [TA_%s]\n", funcInfo->name ); + + #if defined(ENABLE_C) + /* Add this function to the "ta_func_list.txt" */ + genPrefix = 0; + fprintf( gOutFuncList_TXT->file, "%-20s%s\n", funcInfo->name, funcInfo->hint ); + #endif + + #if defined(ENABLE_C) + fprintf( gOutFunc_H->file, "\n" ); + if( gOutFunc_SWG ) fprintf( gOutFunc_SWG->file, "\n" ); + + fprintf( gOutFunc_H->file, "/*\n" ); + printFuncHeaderDoc( gOutFunc_H->file, funcInfo, " * " ); + fprintf( gOutFunc_H->file, " */\n" ); + + if( gOutFunc_SWG ) { + fprintf( gOutFunc_SWG->file, "/*\n" ); + printFuncHeaderDoc( gOutFunc_SWG->file, funcInfo, " * " ); + fprintf( gOutFunc_SWG->file, " */\n" ); + } + + /* Generate the defines corresponding to this function. */ + printDefines( gOutFunc_H->file, funcInfo ); + if (gOutFunc_SWG) printDefines( gOutFunc_SWG->file, funcInfo ); + + /* Generate the function prototype. */ + printFunc( gOutFunc_H->file, "TA_LIB_API ", funcInfo, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + fprintf( gOutFunc_H->file, "\n" ); + + printFunc( gOutFunc_H->file, "TA_LIB_API ", funcInfo, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0); + fprintf( gOutFunc_H->file, "\n" ); + + /* Generate the SWIG interface. */ + if (gOutFunc_SWG) { + printFunc( gOutFunc_SWG->file, NULL, funcInfo, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0); + fprintf( gOutFunc_SWG->file, "\n" ); + } + + /* Generate the corresponding lookback function prototype. */ + printFunc( gOutFunc_H->file, "TA_LIB_API ", funcInfo, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); + if (gOutFunc_SWG) { + printFunc( gOutFunc_SWG->file, NULL, funcInfo, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); + } + + /* Create the frame definition (ta_frame.c) and declaration (ta_frame.h) */ + genPrefix = 1; + printFrameHeader( gOutFrame_H->file, funcInfo, 0 ); + fprintf( gOutFrame_H->file, ";\n" ); + printFrameHeader( gOutFrame_H->file, funcInfo, 1 ); + fprintf( gOutFrame_H->file, ";\n\n" ); + printCallFrame( gOutFrame_C->file, funcInfo ); + + /* Add this function to the Makefile.am */ + if( firstTime ) + fprintf( gOutMakefile_AM->file, "\tta_%s.c", funcInfo->name ); + else + fprintf( gOutMakefile_AM->file, " \\\n\tta_%s.c", funcInfo->name ); + #endif + + #if defined(ENABLE_DOTNET) && defined(_MSC_VER) + /* Add the entry in the .NET project file. */ + fprintf( gOutProjFile->file, " file, " RelativePath=\".." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR "c" PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c\">\n", funcInfo->name ); + fprintf( gOutProjFile->file, " file, " Name=\"Debug|Win32\">\n" ); + fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); + fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); + fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); + fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); + fprintf( gOutProjFile->file, " \n" ); + fprintf( gOutProjFile->file, " file, " Name=\"Release|Win32\">\n" ); + fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); + fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); + fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); + fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); + fprintf( gOutProjFile->file, " \n" ); + fprintf( gOutProjFile->file, " file, " Name=\"Debug SubArray|Win32\">\n" ); + fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); + fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); + fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); + fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); + fprintf( gOutProjFile->file, " \n" ); + fprintf( gOutProjFile->file, " file, " Name=\"Release SubArray|Win32\">\n" ); + fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); + fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); + fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); + fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); + fprintf( gOutProjFile->file, " \n" ); + fprintf( gOutProjFile->file, " \n" ); + + /* Add the entry in the MSVC project file. */ + fprintf( gOutMSVCProjFile->file, "# Begin Source File\n" ); + fprintf( gOutMSVCProjFile->file, "\n" ); + fprintf( gOutMSVCProjFile->file, "SOURCE=.." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c\n", funcInfo->name ); + fprintf( gOutMSVCProjFile->file, "# End Source File\n" ); + + /* Generate the functions declaration for the .NET interface. */ + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); + + fprintf( gOutDotNet_H->file, " #if defined( _MANAGED ) && defined( USE_SUBARRAY )\n" ); + + // SubArray declaration + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0 ); + fprintf( gOutDotNet_H->file, "\n" ); + + // SubArray declaration + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0 ); + fprintf( gOutDotNet_H->file, "\n" ); + + // cli_array to SubArray conversion + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); + fprintf( gOutDotNet_H->file, " { return " ); + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0 ); + fprintf( gOutDotNet_H->file, " }\n" ); + + // cli_array to SubArray conversion + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); + fprintf( gOutDotNet_H->file, " { return " ); + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0 ); + fprintf( gOutDotNet_H->file, " }\n" ); + + fprintf( gOutDotNet_H->file, " #elif defined( _MANAGED )\n" ); + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); + printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); + fprintf( gOutDotNet_H->file, " #endif\n" ); + + fprintf( gOutDotNet_H->file, "\n" ); + fprintf( gOutDotNet_H->file, " #define TA_%s Core::%s\n", funcInfo->name, funcInfo->camelCaseName ); + fprintf( gOutDotNet_H->file, " #define TA_%s_Lookback Core::%sLookback\n\n", funcInfo->name, funcInfo->camelCaseName ); + #endif + + #if defined(ENABLE_JAVA) + /* Generate CoreAnnotated */ + printJavaFunctionAnnotation( funcInfo ); + #endif + + doFuncFile( funcInfo ); + + #if defined(ENABLE_JAVA) + /* Run the func file through the pre-processor to generate the Java code. */ + genJavaCodePhase2( funcInfo ); + #endif + + #if defined(ENABLE_RUST) + genRustCodePhase2( funcInfo ); + #endif + + + firstTime = 0; +} + +static void doForEachUnstableFunction( const TA_FuncInfo *funcInfo, + void *opaqueData ) +{ + unsigned int *i; + + i = (unsigned int *)opaqueData; + + #if defined(ENABLE_C) + if( funcInfo->flags & TA_FUNC_FLG_UNST_PER ) + { + print( gOutDefs_H->file, " /* %03d */ ENUM_DEFINE( TA_FUNC_UNST_%s, %s),\n", *i, funcInfo->name, funcInfo->camelCaseName ); + (*i)++; + } + #endif +} + +static void printDefines( FILE *out, const TA_FuncInfo *funcInfo ) +{ + TA_RetCode retCode; + const TA_OptInputParameterInfo *optInputParamInfo; + unsigned int i, j; + unsigned int paramNb; + const char *paramName; + const char *defaultParamName; + TA_IntegerList *intList; + TA_RealList *realList; + + if (!out) return; + + /* Go through the optional parameter and print + * the corresponding define for the TA_OptInput_IntegerList + * and TA_OptInput_RealList having a string. + */ + paramNb = 0; + for( i=0; i < funcInfo->nbOptInput; i++ ) + { + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, + i, &optInputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'optional input' information\n", funcInfo->name ); + return; + } + + paramName = optInputParamInfo->paramName; + + /* TA_MA: Value for parameter */ + + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealList: + defaultParamName = "optInReal"; + break; + case TA_OptInput_IntegerList: + defaultParamName = "optInInteger"; + break; + default: + paramNb++; + continue; /* Skip other type of parameter */ + } + + if( !paramName ) + paramName = defaultParamName; + + /* Output a comment to guide the user. */ + switch( optInputParamInfo->type ) + { + case TA_OptInput_IntegerList: + intList = (TA_IntegerList *)optInputParamInfo->dataSet; + if( intList != (TA_IntegerList *)TA_DEF_UI_MA_Method.dataSet ) + { + fprintf( out, "\n/* TA_%s: Optional Parameter %s */\n", + funcInfo->name, paramName ); + for( j=0; j < intList->nbElement; j++ ) + { + strcpy( gTempBuf, intList->data[j].string ); + cnvtChar( gTempBuf, ' ', '_' ); + trimWhitespace( gTempBuf ); + cnvtToUpperCase( gTempBuf ); + fprintf( out, "#define TA_%s_%s %d\n", + funcInfo->name, + gTempBuf, + intList->data[j].value ); + + } + fprintf( out, "\n" ); + } + break; + case TA_OptInput_RealList: + fprintf( out, "\n/* TA_%s: Optional Parameter %s */\n", + funcInfo->name, paramName ); + + realList = (TA_RealList *)optInputParamInfo->dataSet; + for( j=0; j < realList->nbElement; j++ ) + { + strcpy( gTempBuf, realList->data[j].string ); + cnvtChar( gTempBuf, ' ', '_' ); + trimWhitespace( gTempBuf ); + cnvtToUpperCase( gTempBuf ); + fprintf( out, "#define TA_%s_%s %s\n", + funcInfo->name, + gTempBuf, + doubleToStr(realList->data[j].value) ); + + } + fprintf( out, "\n" ); + break; + default: + /* Do nothing */ + break; + } + + paramNb++; + } +} + +static void printFunc(FILE *out, + const char *prefix, /* Can be NULL */ + const TA_FuncInfo *funcInfo, + unsigned int prototype, /* Boolean */ + unsigned int frame, /* Boolean */ + unsigned int semiColonNeeded, /* Boolean */ + unsigned int validationCode, /* Boolean */ + unsigned int lookbackSignature, /* Boolean */ + unsigned int managedCPPCode, /* Boolean */ + unsigned int managedCPPDeclaration, /* Boolean */ + unsigned int inputIsSinglePrecision, /* Boolean */ + unsigned int outputForSWIG, /* Boolean */ + unsigned int outputForJava, /* Boolean */ + unsigned int lookbackValidationCode, /* Boolean */ + unsigned int useSubArrayObject, /* Boolean */ + unsigned int arrayToSubArrayCnvt, /* Boolean */ + unsigned int outputForRust /* Boolean */ +) +{ + TA_RetCode retCode; + unsigned int i, j, k, lastParam; + int indent; + unsigned int paramNb; + const char *paramName; + const char *defaultParamName; + const TA_InputParameterInfo *inputParamInfo; + const TA_OptInputParameterInfo *optInputParamInfo; + const TA_OutputParameterInfo *outputParamInfo; + const char *typeString; + const char *inputDoubleArrayType; + const char *inputIntArrayType; + const char *outputDoubleArrayType; + const char *outputIntArrayType; + const char *outputIntParam; + const char *arrayBracket; + const char *funcName; + int excludeFromManaged; + int isMAType; + + const char *startIdxString; + const char *endIdxString; + const char *outNbElementString; + const char *outBegIdxString; + + char funcNameBuffer[1024]; /* Not safe, but 1024 is realistic, */ + + if (!out) return; + + if (outputForRust) { + PrintFuncParamStruct printFuncParamStruct = { + out, + prefix, + funcInfo, + lookbackSignature, + validationCode, + lookbackValidationCode + }; + printRustFunc(&printFuncParamStruct); + } + + if( arrayToSubArrayCnvt ) + { + inputIntArrayType = "int"; + if( inputIsSinglePrecision ) + { + inputDoubleArrayType = "float"; + } + else + { + inputDoubleArrayType = "double"; + } + outputDoubleArrayType = "double"; + outputIntArrayType = "int"; + outputIntParam = " "; + arrayBracket = " "; + startIdxString = "startIdx"; + endIdxString = "endIdx"; + outNbElementString = "outNBElement"; + outBegIdxString = "outBegIdx"; + funcName = funcInfo->camelCaseName; + } + else if( managedCPPCode ) + { + if( inputIsSinglePrecision ) + { + inputDoubleArrayType = useSubArrayObject? "SubArray^":"cli::array^"; + } + else + { + inputDoubleArrayType = useSubArrayObject? "SubArray^":"cli::array^"; + } + + inputIntArrayType = useSubArrayObject? "SubArray^" : "cli::array^"; + outputDoubleArrayType = useSubArrayObject? "SubArray^": "cli::array^"; + outputIntArrayType = useSubArrayObject? "SubArray^" : "cli::array^"; + outputIntParam = "[Out]int%"; + arrayBracket = ""; + startIdxString = "startIdx"; + endIdxString = "endIdx"; + outNbElementString = "outNBElement"; + outBegIdxString = "outBegIdx"; + funcName = funcInfo->camelCaseName; + } + else if( outputForSWIG ) + { + if( inputIsSinglePrecision ) + inputDoubleArrayType = "const float *"; + else + inputDoubleArrayType = "const double *"; + inputIntArrayType = "const int *"; + outputIntArrayType = "int"; + outputDoubleArrayType = "double"; + outputIntParam = "int"; + arrayBracket = ""; + startIdxString = " START_IDX"; + endIdxString = " END_IDX"; + outNbElementString = "OUT_SIZE"; + outBegIdxString = "BEG_IDX"; + funcName = funcInfo->name; + } + else if( outputForJava ) + { + if( inputIsSinglePrecision ) + inputDoubleArrayType = "float"; + else + inputDoubleArrayType = "double"; + inputIntArrayType = "int"; + outputDoubleArrayType = "double"; + outputIntArrayType = "int"; + outputIntParam = "MInteger"; + arrayBracket = "[]"; + startIdxString = "startIdx"; + endIdxString = "endIdx"; + outNbElementString = "outNBElement"; + outBegIdxString = "outBegIdx"; + funcName = funcNameBuffer; + + /* For Java, first letter is always lowercase. */ + strcpy( funcNameBuffer, funcInfo->camelCaseName ); + funcNameBuffer[0] = tolower(funcNameBuffer[0]); + } + else + { + if( inputIsSinglePrecision ) + inputDoubleArrayType = "const float"; + else + inputDoubleArrayType = "const double"; + inputIntArrayType = "const int"; + outputDoubleArrayType = "double"; + outputIntArrayType = "int"; + outputIntParam = "int"; + arrayBracket = "[]"; + startIdxString = "startIdx"; + endIdxString = "endIdx"; + outNbElementString = "outNBElement"; + outBegIdxString = "outBegIdx"; + funcName = funcInfo->name; + } + + typeString = ""; + defaultParamName = ""; + + if( prototype ) + { + if( lookbackSignature ) + { + if( managedCPPCode ) + { + sprintf( gTempBuf, "%s%sint %s%sLookback( ", + prefix? prefix:"", + managedCPPDeclaration? " static ":"", + managedCPPDeclaration? "":"Core::", + funcName ); + } + else if( outputForJava ) + { + sprintf( gTempBuf, "%spublic int %sLookback( ", + prefix? prefix:"", + funcName ); + } + else + { + sprintf( gTempBuf, "%sint TA_%s_Lookback( ", + prefix? prefix:"", + funcName ); + } + print( out, gTempBuf ); + indent = (unsigned int)strlen(gTempBuf) - 2; + } + else + { + if( arrayToSubArrayCnvt ) + { + sprintf( gTempBuf, "%s%s( %s, ", prefix? prefix:"", funcName, startIdxString ); + } + else if( managedCPPCode ) + { + sprintf( gTempBuf, "%s%senum class %sRetCode %s%s( int %s,\n", + prefix? prefix:"", + managedCPPDeclaration? " static ":"", + managedCPPDeclaration? "":"Core::", + managedCPPDeclaration? "":"Core::", + funcName, + startIdxString ); + } + else if( outputForJava ) + { + sprintf( gTempBuf, "%spublic RetCode %s( int %s,\n", + prefix? prefix:"", + funcName, + startIdxString ); + } + else + { + if( inputIsSinglePrecision ) + sprintf( gTempBuf, "%sTA_RetCode TA_S_%s( int %s,\n", + prefix? prefix:"", + funcName, + startIdxString ); + else + sprintf( gTempBuf, "%sTA_RetCode TA_%s( int %s,\n", + prefix? prefix:"", + funcName, + startIdxString ); + } + print( out, gTempBuf ); + indent = (unsigned int)strlen(gTempBuf); + + if( outputForSWIG ) + indent -= 25; + else + indent -= 17; + + if( indent < 0 ) indent = 0; + + printIndent( out, indent ); + if( arrayToSubArrayCnvt ) + fprintf( out, "%s,\n", endIdxString ); + else + fprintf( out, "int %s,\n", endIdxString ); + } + } + else if( frame ) + { + indent = (unsigned int)strlen(funcName); + if( lookbackSignature ) + { + print( out, "%sTA_%s_Lookback(", prefix == NULL? "" : prefix, funcName ); + indent += 12; + + } + else + { + print( out, "%sTA_%s(\n", prefix == NULL? "" : prefix, funcName ); + indent += 4; + } + } + else if( validationCode ) + { + indent = 3; + } + else + { + printf( "printFunc has nothing to do?\n" ); + return; + } + + if( prefix ) + indent += (unsigned int)strlen(prefix); + if( frame ) + indent -= 5; + + if( frame && !lookbackSignature ) + { + printIndent( out, indent ); + fprintf( out, "%s,\n", startIdxString ); + printIndent( out, indent ); + fprintf( out, "%s,\n", endIdxString ); + } + + /* Go through all the input. */ + if( !lookbackSignature && !lookbackValidationCode ) + { + if( validationCode ) + { + printIndent( out, indent ); + fprintf( out, "#if !defined(_JAVA)\n" ); + } + + paramNb = 0; + for( i=0; i < funcInfo->nbInput; i++ ) + { + retCode = TA_GetInputParameterInfo( funcInfo->handle, + i, &inputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'input' information (%d,%d)\n", funcName, i, paramNb ); + return; + } + + paramName = inputParamInfo->paramName; + + switch( inputParamInfo->type ) + { + case TA_Input_Price: + /* Find how many component are requested. */ + j = 0; + if( inputParamInfo->flags & TA_IN_PRICE_TIMESTAMP ) + j++; + if( inputParamInfo->flags & TA_IN_PRICE_OPEN ) + j++; + if( inputParamInfo->flags & TA_IN_PRICE_HIGH ) + j++; + if( inputParamInfo->flags & TA_IN_PRICE_LOW ) + j++; + if( inputParamInfo->flags & TA_IN_PRICE_CLOSE ) + j++; + if( inputParamInfo->flags & TA_IN_PRICE_VOLUME ) + j++; + if( inputParamInfo->flags & TA_IN_PRICE_OPENINTEREST ) + j++; + + if( j == 0 ) + { + printf( "[%s] invalid 'price input' information (%d,%d)\n", funcName, i, paramNb ); + return; + } + + if( validationCode ) + { + printIndent( out, indent ); + fprintf( out, "/* Verify required price component. */\n" ); + printIndent( out, indent ); + fprintf( out, "if(" ); + k = 0; + if( inputParamInfo->flags & TA_IN_PRICE_TIMESTAMP ) + { + k++; + fprintf( out, "!inTimestamp%s", k != j? "||":")"); + } + + if( inputParamInfo->flags & TA_IN_PRICE_OPEN ) + { + k++; + fprintf( out, "!inOpen%s", k != j? "||":")"); + } + + if( inputParamInfo->flags & TA_IN_PRICE_HIGH ) + { + k++; + fprintf( out, "!inHigh%s", k != j? "||":")"); + } + + if( inputParamInfo->flags & TA_IN_PRICE_LOW ) + { + k++; + fprintf( out, "!inLow%s", k != j? "||":")"); + } + + if( inputParamInfo->flags & TA_IN_PRICE_CLOSE ) + { + k++; + fprintf( out, "!inClose%s", k != j? "||":")"); + } + + if( inputParamInfo->flags & TA_IN_PRICE_VOLUME ) + { + k++; + fprintf( out, "!inVolume%s", k != j? "||":")"); + } + + if( inputParamInfo->flags & TA_IN_PRICE_OPENINTEREST ) + { + k++; + fprintf( out, "!inOpenInterest%s", k != j? "||":")"); + } + + fprintf( out, "\n" ); + printIndent( out, indent ); + fprintf( out, " return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n" ); + print( out, "\n" ); + } + else + { + if( inputParamInfo->flags & TA_IN_PRICE_OPEN ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->in[%d].data.inPrice.open, /*", paramNb ); + if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(inOpen,0)", inputDoubleArrayType ); + } + else + { + fprintf( out, "%-*s%s%s%s", + prototype? 12 : 0, + prototype? inputDoubleArrayType : "", + outputForSWIG?"":" ", + outputForSWIG? "IN_ARRAY /* inOpen */": "inOpen", + prototype? arrayBracket : "" ); + } + fprintf( out, "%s\n", frame? " */":"," ); + } + + if( inputParamInfo->flags & TA_IN_PRICE_HIGH ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->in[%d].data.inPrice.high, /*", paramNb ); + if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(inHigh,0)", inputDoubleArrayType ); + } + else + { + fprintf( out, "%-*s%s%s%s", + prototype? 12 : 0, + prototype? inputDoubleArrayType : "", + outputForSWIG?"":" ", + outputForSWIG? "IN_ARRAY /* inHigh */":"inHigh", + prototype? arrayBracket : "" ); + } + fprintf( out, "%s\n", frame? " */":"," ); + } + + if( inputParamInfo->flags & TA_IN_PRICE_LOW ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->in[%d].data.inPrice.low, /*", paramNb ); + if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(inLow,0)", inputDoubleArrayType ); + } + else + { + fprintf( out, "%-*s%s%s%s", + prototype? 12 : 0, + prototype? inputDoubleArrayType : "", + outputForSWIG?"":" ", + outputForSWIG? "IN_ARRAY /* inLow */": "inLow", + prototype? arrayBracket : "" ); + } + + fprintf( out, "%s\n", frame? " */":"," ); + } + + if( inputParamInfo->flags & TA_IN_PRICE_CLOSE ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->in[%d].data.inPrice.close, /*", paramNb ); + if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(inClose,0)", inputDoubleArrayType ); + } + else + { + fprintf( out, "%-*s%s%s%s", + prototype? 12 : 0, + prototype? inputDoubleArrayType : "", + outputForSWIG?"":" ", + outputForSWIG? "IN_ARRAY /* inClose */": "inClose", + prototype? arrayBracket : "" ); + } + + fprintf( out, "%s\n", frame? " */":"," ); + } + + if( inputParamInfo->flags & TA_IN_PRICE_VOLUME ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->in[%d].data.inPrice.volume, /*", paramNb ); + if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(inVolume,0)", inputDoubleArrayType ); + } + else + { + fprintf( out, "%-*s%s%s%s", + prototype? 12 : 0, + prototype? inputDoubleArrayType : "", + outputForSWIG?"":" ", + outputForSWIG? "IN_ARRAY /* inVolume */": "inVolume", + prototype? arrayBracket : "" ); + } + + fprintf( out, "%s\n", frame? " */":"," ); + } + + if( inputParamInfo->flags & TA_IN_PRICE_OPENINTEREST ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->in[%d].data.inPrice.openInterest, /*", paramNb ); + if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(inOpenInterest,0)", inputDoubleArrayType ); + } + else + { + fprintf( out, "%-*s%s%s%s", + prototype? 12 : 0, + prototype? inputDoubleArrayType : "", + outputForSWIG?"":" ", + outputForSWIG? "IN_ARRAY /* inOpenInterest */": "inOpenInterest", + prototype? arrayBracket : "" ); + } + + fprintf( out, "%s\n", frame? " */":"," ); + } + } + break; + case TA_Input_Real: + typeString = inputDoubleArrayType; + defaultParamName = outputForSWIG? "IN_ARRAY":"inReal"; + break; + case TA_Input_Integer: + typeString = inputIntArrayType; + defaultParamName = outputForSWIG? "IN_ARRAY":"inInteger"; + break; + default: + if( !paramName ) + paramName = "inParam"; + printf( "[%s,%s,%d] invalid 'input' type(%d)\n", + funcName, paramName, paramNb, + inputParamInfo->type ); + return; + } + + if( inputParamInfo->type != TA_Input_Price ) + { + printIndent( out, indent ); + if( validationCode ) + fprintf( out, "if( !%s ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n", inputParamInfo->paramName ); + else + { + + if( frame ) + fprintf( out, "params->in[%d].data.%s, /*", paramNb, defaultParamName ); + if( outputForSWIG ) + fprintf( out, "%-*s%s%s /* %s */", + prototype? 12 : 0, + prototype? typeString : "", + defaultParamName, + prototype? arrayBracket : "", + inputParamInfo->paramName ); + else + { + if( arrayToSubArrayCnvt ) + { + fprintf( out, " %-*sgcnew SubArrayFrom1D<%s>(%s,0)", + prototype? 12 : 0, "", + typeString, + inputParamInfo->paramName ); + } + else + { + fprintf( out, "%-*s %s%s", + prototype? 12 : 0, + prototype? typeString : "", + inputParamInfo->paramName, + prototype? arrayBracket : "" ); + } + } + fprintf( out, "%s\n", frame? " */":"," ); + } + } + paramNb++; + } + + if( validationCode ) + { + printIndent( out, indent ); + fprintf( out, "#endif /* !defined(_JAVA)*/\n" ); + } + } + + /* Go through all the optional input */ + paramNb = 0; + lastParam = 0; + for( i=0; i < funcInfo->nbOptInput; i++ ) + { + excludeFromManaged = 0; + + if( (i == (funcInfo->nbOptInput-1)) && lookbackSignature ) + lastParam = 1; + + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, + i, &optInputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'optional input' information\n", funcName ); + return; + } + + paramName = optInputParamInfo->paramName; + + /* Boolean to detect special TA_MAType enumeration. */ + if( optInputParamInfo->dataSet == TA_DEF_UI_MA_Method.dataSet ) + isMAType = 1; + else + isMAType = 0; + + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealRange: + case TA_OptInput_RealList: + typeString = "double"; + defaultParamName = outputForSWIG? "OPT_REAL":"optInReal"; + break; + case TA_OptInput_IntegerRange: + typeString = "int"; + defaultParamName = outputForSWIG? "OPT_INT":"optInInteger"; + break; + case TA_OptInput_IntegerList: + if( isMAType && !frame ) + { + + typeString = managedCPPCode||outputForJava? "MAType":"TA_MAType"; + defaultParamName = outputForSWIG? "OPT_MATYPE":"optInMAType"; + excludeFromManaged = 1; + } + else + { + typeString = "int"; + defaultParamName = outputForSWIG? "OPT_INT":"optInInteger"; + } + break; + default: + if( !paramName ) + paramName = "optInParam"; + printf( "[%s,%s,%d] invalid 'optional input' type(%d)\n", + funcName, paramName, paramNb, + optInputParamInfo->type ); + return; + } + + if( arrayToSubArrayCnvt ) + typeString = ""; + + if( !paramName ) + paramName = defaultParamName; + + if( validationCode ) + { + if( excludeFromManaged ) + { + printIndent( out, indent ); + fprintf( out, "#if !defined(_MANAGED) && !defined(_JAVA)\n" ); + } + + printOptInputValidation( out, paramName, optInputParamInfo, lookbackValidationCode ); + + if( excludeFromManaged ) + { + printIndent( out, indent ); + fprintf( out, "#endif /* !defined(_MANAGED) && !defined(_JAVA)*/\n" ); + } + } + else + { + if( !(lookbackSignature && (i == 0 )) ) + printIndent( out, indent ); + + if( frame ) + { + fprintf( out, "%sparams->optIn[%d].data.%s%s /*", + isMAType?"(TA_MAType)":"", + paramNb, defaultParamName, + lookbackSignature&&lastParam?"":"," ); + } + if( outputForSWIG ) + fprintf( out, "%-*s %s /* %s */", + prototype? 13 : 0, + prototype? typeString : "", + defaultParamName, paramName ); + else + fprintf( out, "%-*s %s", + prototype? 13 : 0, + prototype? typeString : "", + paramName ); + + if( frame ) + { + if( lookbackSignature && lastParam ) + fprintf( out, "*/ )%s\n", semiColonNeeded? ";":"" ); + else + fprintf( out, "*/\n" ); + } + else + { + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealRange: + if( lookbackSignature && lastParam ) + fprintf( out, " )%s ", semiColonNeeded? ";":"" ); + else + fprintf( out, "," ); + + if( ((TA_RealRange *)(optInputParamInfo->dataSet))->min == TA_REAL_MIN ) + fprintf( out, " /* From TA_REAL_MIN" ); + else + fprintf( out, " /* From %.*g", + ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, + ((TA_RealRange *)(optInputParamInfo->dataSet))->min ); + + if( ((TA_RealRange *)(optInputParamInfo->dataSet))->max == TA_REAL_MAX ) + fprintf( out, " to TA_REAL_MAX */\n" ); + else + { + fprintf( out, " to %.*g%s */\n", + ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, + ((TA_RealRange *)(optInputParamInfo->dataSet))->max, + optInputParamInfo->flags & TA_OPTIN_IS_PERCENT? " %":"" ); + } + break; + case TA_OptInput_IntegerRange: + if( lookbackSignature && lastParam ) + fprintf( out, " )%s ", semiColonNeeded? ";":"" ); + else + fprintf( out, "," ); + + if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min == TA_INTEGER_MIN ) + fprintf( out, " /* From TA_INTEGER_MIN" ); + else + { + fprintf( out, " /* From %d", + ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min ); + } + + if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max == TA_INTEGER_MAX ) + fprintf( out, " to TA_INTEGER_MAX */\n" ); + else + { + fprintf( out, " to %d */\n", + ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max ); + } + break; + default: + if( lookbackSignature && lastParam ) + fprintf( out, " )%s ", semiColonNeeded? ";":"" ); + else + fprintf( out, ",\n" ); + } + } + } + + paramNb++; + } + + if( lookbackSignature && (funcInfo->nbOptInput == 0) ) + { + if( frame || outputForJava ) + fprintf( out, " )%s\n", semiColonNeeded? ";":"" ); + else + fprintf( out, "void )%s\n", semiColonNeeded? ";":"" ); + } + + /* Go through all the output */ + if( lookbackSignature ) + { + if( !frame ) + print( out, "\n" ); + } + else if( !lookbackValidationCode ) + { + paramNb = 0; + lastParam = 0; + + if( !validationCode ) + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "%s, ", outBegIdxString ); + else + fprintf( out, "%-*s %s%s", + prototype? 12 : 0, + prototype? outputIntParam : "", + prototype&&!managedCPPCode&&!outputForJava? "*" : "", + outBegIdxString ); + + fprintf( out, "%s\n", frame? "":"," ); + + printIndent( out, indent ); + if( frame ) + fprintf( out, "%s, ", outNbElementString ); + else + fprintf( out, "%-*s %s%s", + prototype? 12 : 0, + prototype? outputIntParam : "", + prototype&&!managedCPPCode&&!outputForJava? "*" : "", + outNbElementString ); + fprintf( out, "%s\n", frame? "":"," ); + } + + if( validationCode ) + { + printIndent( out, indent ); + fprintf( out, "#if !defined(_JAVA)\n" ); + } + + for( i=0; i < funcInfo->nbOutput; i++ ) + { + if( i == (funcInfo->nbOutput-1) ) + lastParam = 1; + + retCode = TA_GetOutputParameterInfo( funcInfo->handle, + i, &outputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'output' information\n", funcName ); + return; + } + + paramName = outputParamInfo->paramName; + + switch( outputParamInfo->type ) + { + case TA_Output_Real: + typeString = outputDoubleArrayType; + defaultParamName = outputForSWIG? "OUT_ARRAY":"outReal"; + break; + case TA_Output_Integer: + typeString = outputIntArrayType;; + defaultParamName = outputForSWIG? "OUT_ARRAY":"outInteger"; + break; + default: + if( !paramName ) + paramName = "outParam"; + printf( "[%s,%s,%d] invalid 'output' type(%d)\n", + funcName, paramName, paramNb, + outputParamInfo->type ); + return; + } + + if( !paramName ) + paramName = defaultParamName; + + if( validationCode ) + { + print( out, " if( !%s )\n", paramName ); + print( out, " return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n" ); + print( out, "\n" ); + } + else + { + printIndent( out, indent ); + if( frame ) + fprintf( out, "params->out[%d].data.%s%s /*", + paramNb, defaultParamName, + lastParam? "":"," ); + + if( outputForSWIG ) + fprintf( out, "%-*s *%s%s /* %s */", + prototype? 12 : 0, + prototype? typeString : "", + defaultParamName, + prototype? arrayBracket : "", + paramName ); + else if( arrayToSubArrayCnvt ) + { + fprintf( out, " gcnew SubArrayFrom1D<%s>(%s,0)", typeString, paramName ); + } + else + { + fprintf( out, "%-*s %s%s", + prototype? 12 : 0, + prototype? typeString : "", + paramName, + prototype? arrayBracket : "" ); + } + + if( !lastParam ) + fprintf( out, "%s\n", frame? " */":"," ); + else + { + fprintf( out, "%s )%s\n", + frame? " */":"", + semiColonNeeded? ";":"" ); + } + } + + paramNb++; + } + + if( validationCode ) + { + printIndent( out, indent ); + fprintf( out, "#endif /* !defined(_JAVA) */\n" ); + } + + } + +} + +static void printCallFrame( FILE *out, const TA_FuncInfo *funcInfo ) +{ + if (!out) return; + + genPrefix = 1; + + printFrameHeader( out, funcInfo, 0 ); + print( out, "{\n" ); + printFunc( out, " return ", funcInfo, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + print( out, "}\n" ); + + printFrameHeader( out, funcInfo, 1 ); + print( out, "{\n" ); + if( funcInfo->nbOptInput == 0 ) + print( out, " (void)params;\n" ); + printFunc( out, " return ", funcInfo, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); + print( out, "}\n" ); + + genPrefix = 0; +} + + +static void printFrameHeader( FILE *out, const TA_FuncInfo *funcInfo, unsigned int lookbackSignature ) +{ + if (!out) return; + + if( lookbackSignature ) + { + print( out, "unsigned int TA_%s_FramePPLB( const TA_ParamHolderPriv *params )\n", funcInfo->name ); + } + else + { + print( out, "TA_RetCode TA_%s_FramePP( const TA_ParamHolderPriv *params,\n", funcInfo->name ); + print( out, " int startIdx,\n" ); + print( out, " int endIdx,\n" ); + print( out, " int *outBegIdx,\n" ); + print( out, " int *outNBElement )\n" ); + } +} + +static void printExternReferenceForEachFunction( const TA_FuncInfo *info, + void *opaqueData ) +{ + (void)opaqueData; /* Get ride of compiler warning */ + + #if defined(ENABLE_C) + fprintf( gOutGroupIdx_C->file, "extern const TA_FuncDef TA_DEF_%s;\n", info->name ); + #endif +} + +static void printPerGroupList( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ) +{ + (void)isLast; /* Get ride of compiler warning. */ + (void)isFirst; /* Get ride of compiler warning. */ + + #if defined(ENABLE_C) + fprintf( gOutGroupIdx_C->file, + "\nconst TA_FuncDef *TA_PerGroupFunc_%d[] = {\n", index ); + + gCurrentGroupName = groupName; + TA_ForEachFunc( printFunctionAddress, NULL ); + fprintf( gOutGroupIdx_C->file, "NULL };\n" ); + + fprintf( gOutGroupIdx_C->file, + "#define SIZE_GROUP_%d ((sizeof(TA_PerGroupFunc_%d)/sizeof(const TA_FuncDef *))-1)\n", + index, index ); + #endif +} + +static void printFunctionAddress( const TA_FuncInfo *info, + void *opaqueData ) +{ + (void)opaqueData; /* Get ride of compiler warning. */ + + #if defined(ENABLE_C) + if( strcmp( info->group, gCurrentGroupName ) == 0 ) + fprintf( gOutGroupIdx_C->file, "&TA_DEF_%s,\n", info->name ); + #endif +} + +static void printGroupListAddress( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ) +{ + (void)isFirst; /* Get ride of compiler warning. */ + + #if defined(ENABLE_C) + if( groupName == NULL ) + fprintf( gOutGroupIdx_C->file, "NULL%s", isLast? "" : "," ); + else fprintf( gOutGroupIdx_C->file, "&TA_PerGroupFunc_%d[0]%s\n", + index, isLast? "" : "," ); + #endif +} + +static void printGroupSize( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ) +{ + (void)isFirst; /* Get ride of compiler warning. */ + (void)groupName; /* Get ride of compiler warning. */ + + #if defined(ENABLE_C) + fprintf( gOutGroupIdx_C->file, "SIZE_GROUP_%d%s\n", + index, isLast? "" : "," ); + #endif +} + +static void printGroupSizeAddition( const char *groupName, + unsigned int index, + unsigned int isFirst, + unsigned int isLast + ) +{ + (void)isFirst; /* Get ride of compiler warning. */ + (void)groupName; /* Get ride of compiler warning. */ + + #if defined(ENABLE_C) + fprintf( gOutGroupIdx_C->file, "SIZE_GROUP_%d%s", + index, isLast? ";" : "+\n" ); + #endif +} + +static void doFuncFile( const TA_FuncInfo *funcInfo ) +{ + + FileHandle *tempFile1; + + unsigned int useTempFile; + FILE *logicIn; + FILE *logicTmp; + char localBuf1[500]; + + #define TEMPLATE_PASS1 ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "pass1.tmp" + #define TEMPLATE_PASS2 ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "pass2.tmp" + #define TEMPLATE_DEFAULT ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract" PATH_SEPARATOR "templates" PATH_SEPARATOR "ta_x.c.template" + #define LOGIC_TEMP ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "logic.tmp" + + /* Check if the file already exist. */ + sprintf( localBuf1, ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c", funcInfo->name ); + + gOutFunc_C = fileOpen( localBuf1, NULL, FILE_READ); + if( gOutFunc_C == NULL ) + useTempFile = 0; + else + { + useTempFile = 1; + /* Create a temporary template using it. */ + tempFile1 = fileOpen( TEMPLATE_PASS1, NULL, FILE_WRITE|WRITE_ALWAYS ); + if( tempFile1 == NULL ) + { + printf( "Cannot create temporary file!\n" ); + return; + } + + createTemplate( gOutFunc_C, tempFile1 ); + + fileClose( tempFile1 ); + fileClose( gOutFunc_C ); + } + + /* Open the file using the template. */ + if( useTempFile ) + gOutFunc_C = fileOpen( TEMPLATE_PASS2, TEMPLATE_PASS1, FILE_WRITE|WRITE_ALWAYS ); + else + gOutFunc_C = fileOpen( TEMPLATE_PASS2, TEMPLATE_DEFAULT, FILE_WRITE|WRITE_ALWAYS ); + + if( gOutFunc_C == NULL ) + { + printf( "Cannot create [%s]\n", localBuf1 ); + return; + } + + /* Generate. 1st Pass */ + writeFuncFile( funcInfo ); + + fileClose( gOutFunc_C ); + + if( !useTempFile ) + { + /* When the file is new, the first pass becomes the + * original. + */ + if( !copyFile( TEMPLATE_PASS2, localBuf1 ) ) + { + printf( "Cannot copy %s to %s\n", TEMPLATE_PASS2, localBuf1 ); + return; + } + } + + /* Extract the TA function code in a temporary file */ + init_gToOpen( localBuf1, NULL ); + logicIn = fopen( gToOpen, "r" ); + if( !logicIn ) + { + printf( "Cannot open [%s] for extracting TA logic\n", localBuf1 ); + return; + } + init_gToOpen( LOGIC_TEMP, NULL ); + logicTmp = fopen( gToOpen, "w" ); + if( !logicTmp ) + { + fclose(logicIn); + printf( "Cannot open logic.tmp\n" ); + return; + } + extractTALogic( logicIn, logicTmp ); + fclose(logicIn); + fclose(logicTmp); + + /* Insert the TA function code in the single-precision frame + * using the template generated from the first pass. + */ + gOutFunc_C = fileOpen( localBuf1, TEMPLATE_PASS2, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if( gOutFunc_C == NULL ) + { + printf( "Cannot complete 2nd pass with [%s]\n", localBuf1 ); + return; + } + + /* Duplicate the function, but using float this time */ + print( gOutFunc_C->file, "\n" ); + print( gOutFunc_C->file, "#define USE_SINGLE_PRECISION_INPUT\n" ); + print( gOutFunc_C->file, "#if !defined( _MANAGED ) && !defined( _JAVA )\n" ); + print( gOutFunc_C->file, " #undef TA_PREFIX\n" ); + print( gOutFunc_C->file, " #define TA_PREFIX(x) TA_S_##x\n" ); + print( gOutFunc_C->file, "#endif\n" ); + print( gOutFunc_C->file, "#undef INPUT_TYPE\n" ); + print( gOutFunc_C->file, "#define INPUT_TYPE float\n" ); + + print( gOutFunc_C->file, "#if defined( _MANAGED ) && defined( USE_SUBARRAY )\n" ); + printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0); + print( gOutFunc_C->file, "#elif defined( _MANAGED )\n" ); + printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0); + print( gOutFunc_C->file, "#elif defined( _JAVA )\n" ); + printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0); + print( gOutFunc_C->file, "#else\n" ); + printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0); + print( gOutFunc_C->file, "#endif\n" ); + + /* Insert the internal logic of the function */ + init_gToOpen( LOGIC_TEMP, NULL ); + logicTmp = fopen( gToOpen, "r" ); + if( !logicTmp ) + { + fileClose( gOutFunc_C ); + printf( "Cannot read open logic.tmp\n" ); + return; + } + while( fgets(gTempBuf,BUFFER_SIZE,logicTmp) ) + fputs( gTempBuf, gOutFunc_C->file ); + fclose(logicTmp); + print( gOutFunc_C->file, "\n" ); + + /* Add the suffix at the end of the file. */ + print( gOutFunc_C->file, "#if defined( _MANAGED )\n" ); + print( gOutFunc_C->file, "}}} // Close namespace TicTacTec.TA.Lib\n" ); + print( gOutFunc_C->file, "#endif\n" ); + + fileClose( gOutFunc_C ); + fileDelete( LOGIC_TEMP ); + fileDelete( TEMPLATE_PASS1 ); + fileDelete( TEMPLATE_PASS2 ); +} + +static void doDefsFile( void ) +{ + + FileHandle *tempFile; + FILE *out; + + #define FILE_TA_DEFS_H ".." PATH_SEPARATOR "include" PATH_SEPARATOR "ta_defs.h" + #define FILE_TA_DEFS_TMP ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "ta_defs.tmp" + + /* Check if the file already exist. If not, this is an error. */ + gOutDefs_H = fileOpen( FILE_TA_DEFS_H, NULL, FILE_READ ); + if( gOutDefs_H == NULL ) + { + printf( "ta_defs.h must exist for being updated!\n" ); + exit(-1); + } + + /* Create the template. The template is just the original file content + * with the GENCODE SECTION emptied (so they can be re-generated) + */ + tempFile = fileOpen( FILE_TA_DEFS_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); + if( tempFile == NULL ) + { + printf( "Cannot create temporary file!\n" ); + exit(-1); + } + + createTemplate( gOutDefs_H, tempFile ); + + fileClose( tempFile ); + fileClose( gOutDefs_H ); + + /* Re-open the file using the template. */ + gOutDefs_H = fileOpen( FILE_TA_DEFS_H, FILE_TA_DEFS_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutDefs_H == NULL ) + { + printf( "Cannot create ta_defs.h\n" ); + exit(-1); + } + + /* Generate the GENCODE SECTION */ + out = gOutDefs_H->file; + + genPrefix = 1; + addUnstablePeriodEnum( out ); + print( out, "\n" ); + genPrefix = 0; + + fileClose( gOutDefs_H ); + fileDelete( FILE_TA_DEFS_TMP ); + #undef FILE_TA_DEFS_H + #undef FILE_TA_DEFS_TMP +} + +#ifdef _MSC_VER +static int createProjTemplate( FileHandle *in, FileHandle *out ) +{ + FILE *inFile; + FILE *outFile; + unsigned int skipSection; + unsigned int sectionDone; + unsigned int step; + + inFile = in->file; + outFile = out->file; + + skipSection = 0; + sectionDone = 0; + step = 0; + + while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + { + if( !skipSection ) + { + fputs( gTempBuf, outFile ); + if( !strstr( gTempBuf, "" ) ) + continue; + + skipSection = 1; + fputs( "%%%GENCODE%%%\n", outFile ); + } + else if( strstr( gTempBuf, "" ) ) + { + skipSection = 0; + fputs( gTempBuf, outFile ); + sectionDone++; + } + } + + return 0; +} + +static int createMSVCProjTemplate( FileHandle *in, FileHandle *out ) +{ + FILE *inFile; + FILE *outFile; + unsigned int skipSection; + + inFile = in->file; + outFile = out->file; + + skipSection = 0; + + while( !skipSection && fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + { + if( strstr( gTempBuf, "# Begin Source File") ) + skipSection = 1; + else + fputs( gTempBuf, outFile ); + } + + if( !skipSection ) + { + printf( "Unexpected end-of-file\n" ); + return -1; + } + + fputs( "%%%GENCODE%%%\n", outFile ); + + while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + { + if( strstr( gTempBuf, "# End Group" ) ) + { + /* Add the "non TA function" source files. */ + fprintf( outFile, "# Begin Source File\n"); + fprintf( outFile, "\n"); + fprintf( outFile, "SOURCE=.." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_utility.c\n"); + fprintf( outFile, "# End Source File\n"); + fprintf( outFile, "# End Group\n"); + break; + } + } + + while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + fputs( gTempBuf, outFile ); + + return 0; +} +#endif + +static int createTemplate( FileHandle *in, FileHandle *out ) +{ + FILE *inFile; + FILE *outFile; + char *inTheLinePtr; + unsigned int skipSection; + unsigned int sectionDone; + + inFile = in->file; + outFile = out->file; + + skipSection = 0; + sectionDone = 0; + while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + { + inTheLinePtr = gTempBuf; + /* Skip leading whitespace. */ + while( isspace(*inTheLinePtr) ) inTheLinePtr++; + + if( strncmp( inTheLinePtr, "/**** START GENCODE SECTION", 27 ) == 0 ) + { + skipSection = 1; + fputs( gTempBuf, outFile ); + fputs( "%%%GENCODE%%%\n", outFile ); + } + + else if( strncmp( inTheLinePtr, "/**** END GENCODE SECTION", 25 ) == 0 ) + { + if( skipSection ) + { + skipSection = 0; + sectionDone++; + } + } + + if( !skipSection ) + { + if( fputs( gTempBuf, outFile ) == EOF ) + { + printf( "Cannot write tmp file\n" ); + return -1; + } + } + } + + return 0; +} + +static void writeFuncFile( const TA_FuncInfo *funcInfo ) +{ + FILE *out; + + out = gOutFunc_C->file; + fprintf( out, "/* All code within this section is automatically\n" ); + fprintf( out, " * generated by gen_code. Any modification will be lost\n" ); + fprintf( out, " * next time gen_code is run.\n" ); + fprintf( out, " */\n" ); + + genPrefix = 1; + print( out, "\n" ); + print( out, "#if defined( _MANAGED )\n" ); + print( out, " #include \"TA-Lib-Core.h\"\n" ); + print( out, " #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError)\n" ); + print( out, " namespace TicTacTec { namespace TA { namespace Library {\n" ); + print( out, "#elif defined( _JAVA )\n" ); + print( out, " #include \"ta_defs.h\"\n" ); + print( out, " #include \"ta_java_defs.h\"\n" ); + print( out, " #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError)\n" ); + print( out, "#elif defined( _RUST )\n" ); + print( out, " #include \"ta_defs.h\"\n" ); + print( out, " #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError)\n" ); + print( out, "#else\n" ); + print( out, " #include \n" ); + print( out, " #include \n" ); + print( out, " #include \"ta_func.h\"\n" ); + print( out, "#endif\n" ); + print( out, "\n" ); + print( out, "#ifndef TA_UTILITY_H\n" ); + print( out, " #include \"ta_utility.h\"\n" ); + print( out, "#endif\n" ); + print( out, "\n" ); + print( out, "#ifndef TA_MEMORY_H\n" ); + print( out, " #include \"ta_memory.h\"\n" ); + print( out, "#endif\n" ); + print( out, "\n" ); + print( out, "#define TA_PREFIX(x) TA_##x\n" ); + print( out, "#define INPUT_TYPE double\n" ); + print( out, "\n" ); + print( out, "#if defined( _MANAGED )\n" ); + printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0); + print( out, "#elif defined( _JAVA )\n" ); + printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0); + print( out, "#else\n" ); + printFunc( out, "TA_LIB_API ", funcInfo, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); + print( out, "#endif\n" ); + + genPrefix = 0; + skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); + + genPrefix = 1; + if( funcInfo->nbOptInput != 0 ) + print( out, "#ifndef TA_FUNC_NO_RANGE_CHECK\n" ); + printFunc( out, NULL, funcInfo, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0); + if( funcInfo->nbOptInput != 0 ) + print( out, "#endif /* TA_FUNC_NO_RANGE_CHECK */\n" ); + else + print( out, "/* No parameters to validate. */\n" ); + + genPrefix = 0; + skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); + + genPrefix = 1; + fprintf( out, "/*\n" ); + printFuncHeaderDoc( out, funcInfo, " * " ); + fprintf( out, " */\n" ); + print( out, "\n" ); + print( out, "#if defined( _MANAGED ) && defined( USE_SUBARRAY )\n" ); + printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0); + print( out, "#elif defined( _MANAGED )\n" ); + printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0); + print( out, "#elif defined( _JAVA )\n" ); + + /* Handle special case to avoid duplicate definition of min,max */ + if( strcmp( funcInfo->camelCaseName, "Min" ) == 0 ) { + print( out, "#undef min\n" ); + } else if( strcmp( funcInfo->camelCaseName, "Max" ) == 0 ) { + print( out, "#undef max\n" ); + } + + printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0); + print( out, "#else\n" ); + printFunc( out, "TA_LIB_API ", funcInfo, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + print( out, "#endif\n" ); + + genPrefix = 0; + skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); + + genPrefix = 1; + print( out, "\n" ); + print( out, "#ifndef TA_FUNC_NO_RANGE_CHECK\n" ); + print( out, "\n" ); + print( out, " /* Validate the requested output range. */\n" ); + print( out, " if( startIdx < 0 )\n" ); + print( out, " return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex);\n" ); + print( out, " if( (endIdx < 0) || (endIdx < startIdx))\n" ); + print( out, " return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex);\n" ); + print( out, "\n" ); + /* Generate the code for checking the parameters. + * Also generates the code for setting up the + * default values. + */ + printFunc( out, NULL, funcInfo, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + + print( out, "#endif /* TA_FUNC_NO_RANGE_CHECK */\n" ); + print( out, "\n" ); + + skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); + + /* Put a marker who is going to be used in the second pass */ + fprintf( out, "%%%%%%GENCODE%%%%%%\n" ); +} + +static void printOptInputValidation( FILE *out, + const char *name, + const TA_OptInputParameterInfo *optInputParamInfo, + int lookbackValidationCode /* Boolean */ ) +{ + int minInt, maxInt; + double minReal, maxReal; + unsigned int i; + int isMAType; + + const TA_RealList *realList; + const TA_IntegerList *integerList; + const TA_RealRange *realRange; + const TA_IntegerRange *integerRange; + + minInt = maxInt = (int)0; + minReal = maxReal = (double)0.0; + + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealRange: + realRange = (const TA_RealRange *)optInputParamInfo->dataSet; + minReal = realRange->min; + maxReal = realRange->max; + break; + case TA_OptInput_IntegerRange: + integerRange = (const TA_IntegerRange *)optInputParamInfo->dataSet; + minInt = integerRange->min; + maxInt = integerRange->max; + break; + case TA_OptInput_RealList: + /* Go through the list to find the min/max. */ + realList = (const TA_RealList *)optInputParamInfo->dataSet; + minReal = realList->data[0].value; + maxReal = realList->data[0].value; + for( i=0; i < realList->nbElement; i++ ) + { + minReal = min( realList->data[i].value, minReal ); + maxReal = max( realList->data[i].value, maxReal ); + } + break; + case TA_OptInput_IntegerList: + /* Go through the list to find the min/max. */ + integerList = (const TA_IntegerList *)optInputParamInfo->dataSet; + minInt = integerList->data[0].value; + maxInt = integerList->data[0].value; + for( i=0; i < integerList->nbElement; i++ ) + { + minInt = min( integerList->data[i].value, minInt ); + maxInt = max( integerList->data[i].value, maxInt ); + } + break; + } + + /* Boolean to detect special TA_MAType enumeration. */ + if( optInputParamInfo->dataSet == TA_DEF_UI_MA_Method.dataSet ) + isMAType = 1; + else + isMAType = 0; + + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealList: + print( out, " /* min/max are checked for %s. */\n", name ); + case TA_OptInput_RealRange: + print( out, " if( %s == TA_REAL_DEFAULT )\n", name ); + print( out, " %s = %s;\n", name, doubleToStr(optInputParamInfo->defaultValue) ); + print( out, " else if( (%s < %s) ||", name, doubleToStr(minReal) ); + print( out, " (%s > %s) )\n", name, doubleToStr(maxReal) ); + break; + case TA_OptInput_IntegerRange: + print( out, " /* min/max are checked for %s. */\n", name ); + case TA_OptInput_IntegerList: + print( out, " if( (int)%s == TA_INTEGER_DEFAULT )\n", name ); + print( out, " %s = %s%d;\n", name, isMAType?"(TA_MAType)":"", (int)optInputParamInfo->defaultValue ); + print( out, " else if( ((int)%s < %d) || ((int)%s > %d) )\n", + name, minInt, + name, maxInt ); + break; + } + + if( lookbackValidationCode ) + print( out, " return -1;\n" ); + else + print( out, " return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n" ); + + print( out, "\n" ); +} + + +static int skipToGenCode( const char *dstName, FILE *out, FILE *templateFile ) +{ + unsigned int headerWritten = 0; + + while( fgets( gTempBuf, BUFFER_SIZE, templateFile ) ) + { + if( strncmp( gTempBuf, "%%%GENCODE%%%", 13 ) == 0 ) + { + headerWritten = 1; + break; + } + if( out && (fputs( gTempBuf, out ) == EOF) ) + { + printf( "Cannot write to [%s]\n", dstName ); + return -1; + } + } + + if( !headerWritten ) + { + printf( "Line with string %%%%%%GENCODE%%%%%% Missing in [%s]", dstName ); + return -1; + } + + return 0; +} + +static void printFuncHeaderDoc( FILE *out, + const TA_FuncInfo *funcInfo, + const char *prefix ) +{ + TA_RetCode retCode; + unsigned int paramNb; + const char *paramName; + const char *defaultParamName; + const TA_InputParameterInfo *inputParamInfo; + const TA_OptInputParameterInfo *optInputParamInfo; + const TA_OutputParameterInfo *outputParamInfo; + int first; + + fprintf( out, "%sTA_%s - %s\n", prefix, funcInfo->name, funcInfo->hint ); + fprintf( out, "%s\n", prefix ); + + + fprintf( out, "%sInput = ", prefix ); + for( paramNb=0; paramNb < funcInfo->nbInput; paramNb++ ) + { + retCode = TA_GetInputParameterInfo( funcInfo->handle, + paramNb, &inputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'input' information\n", funcInfo->name ); + return; + } + + switch( inputParamInfo->type ) + { + case TA_Input_Price: + first = 1; + #define PRICE_PARAM(upperParam,lowerParam) \ + { \ + if( inputParamInfo->flags & TA_IN_PRICE_##upperParam ) \ + { \ + if( !first ) fprintf( out, ", " ); \ + fprintf( out, lowerParam ); \ + first = 0; \ + } \ + } + + PRICE_PARAM( OPEN, "Open" ); + PRICE_PARAM( HIGH, "High" ); + PRICE_PARAM( LOW, "Low" ); + PRICE_PARAM( CLOSE, "Close" ); + PRICE_PARAM( VOLUME, "Volume" ); + PRICE_PARAM( OPENINTEREST, "OpenInterest" ); + PRICE_PARAM( TIMESTAMP, "Timestamp" ); + + #undef PRICE_PARAM + + break; + case TA_Input_Integer: + fprintf( out, "int" ); + break; + case TA_Input_Real: + fprintf( out, "double" ); + break; + } + if( paramNb+1 == funcInfo->nbInput ) + fprintf( out, "\n" ); + else + fprintf( out, ", " ); + } + + fprintf( out, "%sOutput = ", prefix ); + for( paramNb=0; paramNb < funcInfo->nbOutput; paramNb++ ) + { + retCode = TA_GetOutputParameterInfo( funcInfo->handle, + paramNb, &outputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'output' information\n", funcInfo->name ); + return; + } + + switch( outputParamInfo->type ) + { + case TA_Output_Real: + fprintf( out, "double" ); + break; + case TA_Output_Integer: + fprintf( out, "int" ); + break; + } + if( paramNb+1 == funcInfo->nbOutput ) + fprintf( out, "\n" ); + else + fprintf( out, ", " ); + } + + if( funcInfo->nbOptInput != 0 ) + { + fprintf( out, "%s\n", prefix ); + fprintf( out, "%sOptional Parameters\n", prefix ); + fprintf( out, "%s-------------------\n", prefix ); + + for( paramNb=0; paramNb < funcInfo->nbOptInput; paramNb++ ) + { + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, + paramNb, &optInputParamInfo ); + + if( retCode != TA_SUCCESS ) + { + printf( "[%s] invalid 'optional input' information\n", funcInfo->name ); + return; + } + + paramName = optInputParamInfo->paramName; + + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealRange: + case TA_OptInput_RealList: + defaultParamName = "optInReal"; + break; + case TA_OptInput_IntegerRange: + case TA_OptInput_IntegerList: + defaultParamName = "optInInteger"; + break; + default: + if( !paramName ) + paramName = "optInParam"; + printf( "[%s,%s,%d] invalid 'optional input' type(%d)\n", + funcInfo->name, paramName, paramNb, + optInputParamInfo->type ); + return; + } + + if( !paramName ) + paramName = defaultParamName; + + fprintf( out, "%s%s:", prefix, paramName ); + switch( optInputParamInfo->type ) + { + case TA_OptInput_RealRange: + if( ((TA_RealRange *)(optInputParamInfo->dataSet))->min == TA_REAL_MIN ) + fprintf( out, "(From TA_REAL_MIN" ); + else + { + fprintf( out, "(From %.*g", + ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, + ((TA_RealRange *)(optInputParamInfo->dataSet))->min ); + } + + if( ((TA_RealRange *)(optInputParamInfo->dataSet))->max == TA_REAL_MAX ) + fprintf( out, " to TA_REAL_MAX)\n" ); + else + { + fprintf( out, " to %.*g%s)\n", + ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, + ((TA_RealRange *)(optInputParamInfo->dataSet))->max, + optInputParamInfo->flags & TA_OPTIN_IS_PERCENT? " %":"" ); + } + break; + case TA_OptInput_IntegerRange: + if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min == TA_INTEGER_MIN ) + fprintf( out, "(From TA_INTEGER_MIN" ); + else + { + fprintf( out, "(From %d", + ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min ); + } + + if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max == TA_INTEGER_MAX ) + fprintf( out, " to TA_INTEGER_MAX)\n" ); + else + { + fprintf( out, " to %d)\n", + ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max ); + } + break; + default: + fprintf( out, "\n" ); + } + fprintf( out, "%s %s\n", prefix, optInputParamInfo->hint ); + fprintf( out, "%s\n", prefix ); + } + } + + fprintf( out, "%s\n", prefix ); +} + +static int addUnstablePeriodEnum( FILE *out ) +{ + TA_RetCode retCode; + unsigned int id; + + print( out, "\n" ); + print( out, "ENUM_BEGIN( FuncUnstId )\n"); + + /* Enumerate the function having an "unstable period". Give + * to each a unique identifier. + */ + id = 0; + retCode = TA_ForEachFunc( doForEachUnstableFunction, &id ); + + print( out, " ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll),\n"); + print( out, " ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1\n" ); + print( out, "ENUM_END( FuncUnstId )\n"); + + if( retCode != TA_SUCCESS ) + return -1; + + return 0; +} + +static int gen_retcode( void ) +{ + FileHandle *inHdr; + char *ptr1, *ptr2; + int step1Done; + int retValue; + TA_RetCode retCodeValue; + char *retCodeEnum, *retCodeInfo; + + retValue = -1; + + /* Create "ta_retcode.c" */ + gOutRetCode_C = fileOpen( ta_fs_path(4, "..", "src", "ta_common", "ta_retcode.c"), + ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_retcode.c.template"), + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutRetCode_C == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + /* Create "ta_retcode.csv" */ + gOutRetCode_CSV = fileOpen( ta_fs_path(4, "..", "src", "ta_common", "ta_retcode.csv"), + NULL, + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + if( gOutRetCode_CSV == NULL ) + { + fileClose( gOutRetCode_C ); + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + inHdr = fileOpen( ta_fs_path(3, "..", "include", "ta_defs.h"), + NULL, + FILE_READ ); + if( inHdr == NULL ) + { + fileClose( gOutRetCode_C ); + fileClose( gOutRetCode_CSV ); + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + + step1Done = 0; + while( fgets( gTempBuf, sizeof( gTempBuf ), inHdr->file ) ) + { + if( !step1Done ) + { + if( strstr( gTempBuf, "ENUM_BEGIN( RetCode )" ) != NULL ) + step1Done = 1; + } + else + { + if( strstr( gTempBuf, "TA_UNKNOWN_ERR" ) != NULL ) + { + retValue = 0; + goto gen_retcode_exit; + } + + ptr1 = strstr( gTempBuf, "/*" ); + ptr2 = strstr( gTempBuf, "/***" ); + if( ptr1 && !ptr2 ) + { + ptr1 += 2; + retCodeValue = (TA_RetCode)atoi(ptr1); + ptr1 = strstr( ptr1, "TA_" ); + if( !ptr1 ) + { + printf( "Can't find TA_" ); + goto gen_retcode_exit; + } + retCodeEnum = ptr1; + + retCodeInfo = NULL; + while( isdigit(*ptr1) || isalpha(*ptr1) || *ptr1 == '_' ) + ptr1++; + if( *ptr1 != '\0' ) + { + *ptr1 = '\0'; + ptr1++; + if( *ptr1 != '\0' ) + { + retCodeInfo = strstr( ptr1, "/* " ); + if( retCodeInfo ) + { + retCodeInfo += 3; + ptr1 = strstr( retCodeInfo, "*/" ); + if( ptr1 == NULL ) + retCodeInfo = NULL; + else + *ptr1 = '\0'; + } + } + } + + if( !retCodeInfo ) + retCodeInfo = "No Info"; + + strcpy( gTempBuf, retCodeEnum ); + ptr1 = trimWhitespace( gTempBuf ); + fprintf( gOutRetCode_C->file, " {(TA_RetCode)%d,\"%s\",", retCodeValue, ptr1 ); + fprintf( gOutRetCode_CSV->file, "%d,%s", retCodeValue, ptr1 ); + strcpy( gTempBuf, retCodeInfo ); + ptr1 = trimWhitespace( gTempBuf ); + fprintf( gOutRetCode_C->file, "\"%s\"},\n", ptr1 ); + fprintf( gOutRetCode_CSV->file, ",%s\n", ptr1 ); + } + } + } + +gen_retcode_exit: + fileClose( inHdr ); + fileClose( gOutRetCode_C ); + fileClose( gOutRetCode_CSV ); + + return retValue; /* Success. */ +} + +const char *doubleToStr( double value ) +{ + int length; + int i, outIdx; + sprintf( gTempDoubleToStr, "%e", value ); + + /* Remove extra "0" added by Microsoft in the + * exponential part. + */ + length = (int)strlen( gTempDoubleToStr ); + outIdx = 0; + for( i=0; i < length; i++ ) + { + /* Will skip two leading zero in the exponent */ + if( (i >= 2) && + (toupper(gTempDoubleToStr[i-2]) == 'E') && + ((gTempDoubleToStr[i-1] == '+')||(gTempDoubleToStr[i-1] == '-')) && + (gTempDoubleToStr[i] == '0') && + (gTempDoubleToStr[i+1] == '0') && + (isdigit(gTempDoubleToStr[i+2])) ) + { + i++; + continue; + } + + /* Will skip one leading zero in the exponent */ + if( (i >= 2) && + (toupper(gTempDoubleToStr[i-2]) == 'E') && + ((gTempDoubleToStr[i-1] == '+')||(gTempDoubleToStr[i-1] == '-')) && + (gTempDoubleToStr[i] == '0') && + (isdigit(gTempDoubleToStr[i+1]))) + { + continue; + } + + gTempDoubleToStr[outIdx++] = gTempDoubleToStr[i]; + } + gTempDoubleToStr[outIdx] = '\0'; + + return gTempDoubleToStr; +} + +static void printRustFunc(const PrintFuncParamStruct *printFuncParamStruct) { + // three functions: single-precision, double-precision, lookback + printRustSinglePrecisionFunction(printFuncParamStruct); + printRustDoublePrecisionFunction(printFuncParamStruct); + printRustLookbackFunction(printFuncParamStruct); +} + +static void printRustLookbackFunction(const PrintFuncParamStruct *printFuncParamStruct) { + // TODO: open function + // TODO: print input params + // TODO: print optional input params + // TODO: close function + // TODO: print return type + // TODO: handle validation logic + // TODO: handle abstract frame logic +} + +static void printRustDoublePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct) { + // TODO: open function + // TODO: print input params + // TODO: print optional input params + // TODO: close function + // TODO: print return type + // TODO: handle validation logic + // TODO: handle abstract frame logic +} + +static void printRustSinglePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct) { + // TODO: open function + // TODO: print input params + // TODO: print optional input params + // TODO: close function + // TODO: print return type + // TODO: handle validation logic + // TODO: handle abstract frame logic +} + + +static void cnvtToUpperCase( char *str ) +{ + char c; + + if( !str ) return; + + c = *str; + while( c != '\0' ) + { + *str = (char)toupper(c); + str++; + c = *str; + } +} + +static char *trimWhitespace( char *str ) +{ + int i; + + if( !str ) return str; + + while( isspace(*str) ) str++; + if( *str == '\0' ) return str; + + for( i=(int)strlen(str)-1; i >= 0; i-- ) + { + if( !isspace(str[i]) ) + return str; + str[i] = '\0'; + } + + return str; +} + +static void cnvtChar( char *str, char from, char to ) +{ + char c; + + if( !str ) return; + + c = *str; + while( c != '\0' ) + { + if( c == from ) *str = to; + str++; + c = *str; + } +} + +static void extractTALogic( FILE *inFile, FILE *outFile ) +{ + int i, length, nbCodeChar; + int commentBlock, commentFirstCharFound, outIdx; + + #define START_DELIMITATOR "/**** END GENCODE SECTION 3" + #define STOP_DELIMITATOR "/**** START GENCODE SECTION 5" + + /* Find the begining of the function */ + while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + { + length = (int)strlen(gTempBuf); + if( length > BUFFER_SIZE ) + return; + + if( strncmp( gTempBuf, START_DELIMITATOR, strlen(START_DELIMITATOR) ) == 0) + break; + } + + /* Copy until the end of the function. + * At the same time, eliminate all empty line and + * comments to avoid confusion with original code. + */ + commentBlock = 0; + commentFirstCharFound = 0; + while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) + { + length = (int)strlen(gTempBuf); + if( length > BUFFER_SIZE ) + return; + + if( strncmp( gTempBuf, STOP_DELIMITATOR, strlen(STOP_DELIMITATOR) ) == 0) + break; + + /* Process the whole line and put it in gTempBuf2 */ + outIdx = 0; + nbCodeChar = 0; + for( i=0; i < length; i++ ) + { + if( !commentBlock ) + { + if( !commentFirstCharFound ) + { + if( gTempBuf[i] == '/' ) + commentFirstCharFound = 1; + else + { + gTempBuf2[outIdx++] = gTempBuf[i]; + if( !isspace(gTempBuf[i]) ) + nbCodeChar++; + } + } + else + { + commentFirstCharFound = 0; + if( gTempBuf[i] == '*' ) + commentBlock = 1; + else + { + gTempBuf2[outIdx++] = '/'; + nbCodeChar++; + if( gTempBuf[i] == '/' ) + commentFirstCharFound = 1; + else + { + gTempBuf2[outIdx++] = gTempBuf[i]; + if( !isspace(gTempBuf[i]) ) + nbCodeChar++; + } + } + } + } + else + { + if( !commentFirstCharFound ) + { + if( gTempBuf[i] == '*' ) + commentFirstCharFound = 1; + } + else + { + commentFirstCharFound = 0; + if( gTempBuf[i] == '/' ) + commentBlock = 0; + else if( gTempBuf[i] == '*' ) + commentFirstCharFound = 1; + } + } + } + + /* Preserve markers for proprietary code. */ + #define BEG_PROP_MARKER "* Begin Proprietary *" + #define END_PROP_MARKER "* End Proprietary *" + if( strstr( gTempBuf, BEG_PROP_MARKER ) ) + { + fputs( "/* Generated */ /", outFile ); + fputs( BEG_PROP_MARKER, outFile ); + fputs( "/\n", outFile ); + } + else if( strstr( gTempBuf, END_PROP_MARKER ) ) + { + fputs( "/* Generated */ /", outFile ); + fputs( END_PROP_MARKER, outFile ); + fputs( "/\n", outFile ); + } + else if( nbCodeChar != 0 ) + { + gTempBuf2[outIdx] = '\0'; + /* Write the code */ + fputs( "/* Generated */ ", outFile ); + fputs( gTempBuf2, outFile ); + } + } +} + +static int copyFile( const char *src, const char *dest ) +{ + FILE *in; + FILE *out; + + init_gToOpen( src, NULL ); + in = fopen( gToOpen, "rb" ); + if( !in ) + return 0; + + init_gToOpen( dest, NULL ); + out = fopen( gToOpen, "wb" ); + if( !out ) + { + fclose( in ); + return 0; + } + + while( fgets( gTempBuf, BUFFER_SIZE, in ) ) + { + fputs(gTempBuf,out); + } + + fclose(in); + fclose(out); + return 1; +} + +static int areFileSame( const char *file1, const char *file2 ) +{ + /* Text comparison of both files */ + unsigned int i; + + FILE *f1; + FILE *f2; + + + init_gToOpen( file1, NULL ); + f1 = fopen( gToOpen, "r" ); + if( !f1 ) + return 0; + + init_gToOpen( file2, NULL ); + f2 = fopen( gToOpen, "r" ); + if( !f2 ) + { + fclose( f1 ); + return 0; + } + + memset( gTempBuf, 0, sizeof(gTempBuf ) ); + memset( gTempBuf2, 0, sizeof(gTempBuf2) ); + + while( fgets( gTempBuf, BUFFER_SIZE, f1 ) ) + { + if( !fgets( gTempBuf2, BUFFER_SIZE, f2 ) ) + { + fclose(f1); + fclose(f2); + return 0; + } + + for( i=0; i < sizeof(gTempBuf); i++ ) + { + if( gTempBuf[i] != gTempBuf2[i] ) + { + fclose(f1); + fclose(f2); + return 0; + } + if( gTempBuf[i] == '\0' ) + i = sizeof(gTempBuf); + } + + memset( gTempBuf, 0, sizeof(gTempBuf ) ); + memset( gTempBuf2, 0, sizeof(gTempBuf2) ); + } + + if( fgets( gTempBuf2, BUFFER_SIZE, f2 ) ) + { + fclose(f1); + fclose(f2); + return 0; + } + + fclose(f1); + fclose(f2); + return 1; +} + + +static void appendToFunc( FILE *out ) +{ + fprintf( out, "\n" ); + fprintf( out, "/* Some TA functions takes a certain amount of input data\n" ); + fprintf( out, " * before stabilizing and outputing meaningful data. This is\n" ); + fprintf( out, " * a behavior pertaining to the algo of some TA functions and\n" ); + fprintf( out, " * is not particular to the TA-Lib implementation.\n" ); + fprintf( out, " * TA-Lib allows you to automatically strip off these unstabl\n" ); + fprintf( out, " * data from your output and from any internal processing.\n" ); + fprintf( out, " * (See documentation for more info)\n" ); + fprintf( out, " *\n" ); + fprintf( out, " * Examples:\n" ); + fprintf( out, " * TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 30 );\n" ); + fprintf( out, " * Always strip off 30 price bar for the TA_EMA function.\n" ); + fprintf( out, " *\n" ); + fprintf( out, " * TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 30 );\n" ); + fprintf( out, " * Always strip off 30 price bar from ALL functions\n" ); + fprintf( out, " * having an unstable period.\n" ); + fprintf( out, " *\n" ); + fprintf( out, " * See ta_defs.h for the enumeration TA_FuncUnstId\n" ); + fprintf( out, " */\n" ); + fprintf( out, "\n" ); + fprintf( out, "TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id,\n" ); + fprintf( out, " unsigned int unstablePeriod );\n" ); + fprintf( out, "\n" ); + fprintf( out, "unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id );\n" ); + fprintf( out, "\n" ); + fprintf( out, "/* You can change slightly the behavior of the TA functions\n" ); + fprintf( out, " * by requesting compatibiliy with some existing software.\n" ); + fprintf( out, " *\n" ); + fprintf( out, " * By default, the behavior is as close as the original \n" ); + fprintf( out, " * author of the TA functions intend it to be.\n" ); + fprintf( out, " *\n" ); + fprintf( out, " * See ta_defs.h for the enumeration TA_Compatibility.\n" ); + fprintf( out, " */\n" ); + fprintf( out, "TA_RetCode TA_SetCompatibility( TA_Compatibility value );\n" ); + fprintf( out, "TA_Compatibility TA_GetCompatibility( void );\n" ); + fprintf( out, "\n" ); + fprintf( out, "/* Candlesticks struct and functions\n" ); + fprintf( out, " * Because candlestick patterns are subjective, it is necessary \n" ); + fprintf( out, " * to allow the user to specify what should be the meaning of \n" ); + fprintf( out, " * 'long body', 'short shadows', etc.\n" ); + fprintf( out, " */\n" ); + fprintf( out, "\n" ); + fprintf( out, "/* Call TA_SetCandleSettings to set that when comparing a candle \n" ); + fprintf( out, " * basing on settingType it must be compared with the average \n" ); + fprintf( out, " * of the last avgPeriod candles' rangeType multiplied by factor.\n" ); + fprintf( out, " * This setting is valid until TA_RestoreCandleDefaultSettings is called\n" ); + fprintf( out, " */\n" ); + fprintf( out, "TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, \n" ); + fprintf( out, " TA_RangeType rangeType, \n" ); + fprintf( out, " int avgPeriod, \n" ); + fprintf( out, " double factor );\n" ); + fprintf( out, "\n" ); + fprintf( out, "/* Call TA_RestoreCandleDefaultSettings after using custom settings \n" ); + fprintf( out, " * to restore the default settings for the specified settingType\n" ); + fprintf( out, " */\n" ); + fprintf( out, "TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType );\n" ); +} + +void genJavaCodePhase1( const TA_FuncInfo *funcInfo ) +{ + if (!gOutJavaDefs_H) + return; + + fprintf( gOutJavaDefs_H->file, "#define TA_%s_Lookback %c%sLookback\n", funcInfo->name, tolower(funcInfo->camelCaseName[0]), &funcInfo->camelCaseName[1] ); + fprintf( gOutJavaDefs_H->file, "#define TA_%s %c%s\n", funcInfo->name, tolower(funcInfo->camelCaseName[0]), &funcInfo->camelCaseName[1] ); +} + +void genJavaCodePhase2( const TA_FuncInfo *funcInfo ) +{ + FILE *logicTmp; + char buffer[500]; + int idx, again; + static int firstTime = 1; + int ret; + + if (!gOutCore_Java) + return; + + if( firstTime == 1 ) + { + /* Clean-up jus tin case. */ + fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode1.tmp") ); + fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode2.tmp") ); + firstTime = 0; + } + + init_gToOpen(ta_fs_path(3, "..", "temp", "CoreJavaCode1.tmp"), NULL ); + logicTmp = fopen( gToOpen, "w" ); + if( !logicTmp ) + { + printf( "Cannot open CoreJavaCode1.tmp\n" ); + return; + } + fprintf( logicTmp, "#include \"ta_java_defs.h\"\n" ); + fclose(logicTmp); + +#ifdef _MSC_VER + sprintf( buffer, "%s -c -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "TA_%s.c >>.." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp ", gmcpp_exec, funcInfo->name); + ret = system( buffer ); + + sprintf( buffer, "%s -c -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp >.." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode2.tmp ", gmcpp_exec); + ret = system( buffer ); +#else + /* The options are the quite same, but on linux it still outputs the #include lines, + didn't find anything better that to cut them with the sed ... a hack for now. */ + sprintf( buffer, "%s -@compat -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c | sed '/^#include/d' >> .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp ", gmcpp_exec, funcInfo->name); + ret = system( buffer ); + + sprintf( buffer, "%s -@compat -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp | sed '/^#include/d' > .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode2.tmp ", gmcpp_exec ); + ret = system( buffer ); +#endif + + /* Append the output of the C pre-processor to the Core.Java file. */ + init_gToOpen( ta_fs_path(3, "..", "temp", "CoreJavaCode2.tmp"), NULL ); + logicTmp = fopen( gToOpen, "r" ); + if( !logicTmp ) + { + printf( "Cannot open CoreJavaCode2.tmp\n" ); + return; + } + while( fgets(gTempBuf,BUFFER_SIZE,logicTmp) ) + { + /* Remove empty lines and lines with only a ';' */ + idx = 0; + again = 1; + while( again && gTempBuf[idx] != '\0' ) + { + if( !isspace(gTempBuf[idx]) && !(gTempBuf[idx] == ';') ) + again = 0; + idx++; + } + if( (again == 0) && (idx > 0) ) + fputs( gTempBuf, gOutCore_Java->file ); + } + + /* Clean-up */ + fclose(logicTmp); + print( gOutCore_Java->file, "\n" ); + fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode1.tmp") ); + fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode2.tmp") ); +} + + +static int generateFuncAPI_C() +{ + #if defined(ENABLE_C) + FileHandle *inFile; + FILE *out; + FILE *in; + + #define FILE_INPUT ta_fs_path(2, "..", "ta_func_api.xml") + #define FILE_OUTPUT ta_fs_path(4, "..", "src", "ta_abstract", "ta_func_api.c") + #define FILE_OUTPUT_TEMPLATE ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_func_api.c.template") + + inFile = fileOpen( FILE_INPUT, NULL, FILE_READ ); + if( inFile == NULL ) + { + printf( "\nCannot access [%s]\n", gToOpen ); + return -1; + } + gOutFuncAPI_C = fileOpen( FILE_OUTPUT, FILE_OUTPUT_TEMPLATE, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + if( gOutFuncAPI_C == NULL ) + { + printf( "\nCannot write to [%s]\n", gToOpen ); + return -1; + } + + out = gOutFuncAPI_C->file; + in = inFile->file; + + convertFileToCArray(in, out); + + fileClose(gOutFuncAPI_C); + fileClose(inFile); + #endif + + return 1; +} + +static void convertFileToCArray( FILE *in, FILE *out ) +{ + int c; + int position; + + if (!in || !out) + return; + + position = 0; + c = getc(in); + while( c != EOF ) + { + if( position == 0 ) + fprintf( out, "0x%02X", (char)c ); + else + { + fprintf( out, ",0x%02X", (char)c ); + if( (position % 20) == 0 ) + fprintf( out, "\n" ); + } + position++; + c = getc(in); + } + +} + +static void printJavaFunctionAnnotation(const TA_FuncInfo *funcInfo) +{ + #ifndef ENABLE_JAVA + (void)funcInfo; + return; + #else + TA_RetCode retCode; + TA_InputParameterInfo *inputInfo; + TA_OptInputParameterInfo *optInputInfo; + TA_OutputParameterInfo *outputInfo; + TA_RealRange *doubleRange; + TA_IntegerRange *integerRange; + TA_IntegerList *intList; + unsigned int i, j; + #define FUNCNAME_SIZE 100 + char funcName[FUNCNAME_SIZE]; + + if (!gOutFunc_Annotation) + return; + + memset(funcName, 0, FUNCNAME_SIZE); + if (strlen(funcInfo->name) > (FUNCNAME_SIZE - 1)) + { + printf("\n*** Error buffer size exceeded (printJavaFunctionAnnotation)\n"); + strcpy(funcName, "1A2"); /* Substitute name. Will cause Java compilation to fail */ + } + else + { + if (funcInfo->camelCaseName == NULL) + { + strcpy(funcName, funcInfo->name); + for (i=0; funcName[i]; i++) { + funcName[i] = tolower(funcName[i]); + } + } else { + strcpy(funcName, funcInfo->camelCaseName); + funcName[0] = tolower(funcName[0]); + } + } + + + /* + * Generate Lookback method + */ + fprintf(gOutFunc_Annotation->file, "public int %sLookback(\n", funcName); + for(i=0; inbOptInput; i++) + { + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, (void*)&optInputInfo ); + if(optInputInfo->type == TA_OptInput_RealRange) + { + fprintf(gOutFunc_Annotation->file, " double %s", optInputInfo->paramName); + } + else if(optInputInfo->type == TA_OptInput_IntegerRange) + { + fprintf(gOutFunc_Annotation->file, " int %s", optInputInfo->paramName); + } + else if(optInputInfo->type == TA_OptInput_IntegerList) + { + fprintf(gOutFunc_Annotation->file, " MAType %s", optInputInfo->paramName); + } + else + { + printf( "Unexpected error 1 (doForEachFunctionAnnotation)\n"); + } + if (inbOptInput-1) fprintf(gOutFunc_Annotation->file, ",\n"); + } + fprintf(gOutFunc_Annotation->file, ") {\n"); + fprintf(gOutFunc_Annotation->file, " return super.%sLookback(\n", funcName); + for(i=0; inbOptInput; i++) + { + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, (void*)&optInputInfo ); + fprintf(gOutFunc_Annotation->file, " %s", optInputInfo->paramName); + if (inbOptInput-1) fprintf(gOutFunc_Annotation->file, ",\n"); + } + fprintf(gOutFunc_Annotation->file, "); }\n\n"); + + /* + * Annotate Function + */ + fprintf(gOutFunc_Annotation->file, "@FuncInfo(\n"); + fprintf(gOutFunc_Annotation->file, " name = \"%s\",\n", funcInfo->name); + fprintf(gOutFunc_Annotation->file, " group = \"%s\",\n", funcInfo->group); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", funcInfo->flags); /* TODO: should be like: FuncFlags.TA_FUNC_FLG_OVERLAP | FuncFlags.TA_FUNC_FLG_UNST_PER */ + /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", funcInfo->hint);*/ + /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", funcInfo->helpFile);*/ + fprintf(gOutFunc_Annotation->file, " nbInput = %d,\n", funcInfo->nbInput); + fprintf(gOutFunc_Annotation->file, " nbOptInput = %d,\n", funcInfo->nbOptInput); + fprintf(gOutFunc_Annotation->file, " nbOutput = %d\n", funcInfo->nbOutput); + fprintf(gOutFunc_Annotation->file, ")\n"); + fprintf(gOutFunc_Annotation->file, "public RetCode %s(\n", funcName); + + fprintf(gOutFunc_Annotation->file, " int startIdx,\n"); + fprintf(gOutFunc_Annotation->file, " int endIdx,\n"); + + + /* + * Anotate Input parameters + */ + for(i=0; inbInput; i++) + { + char idx = ' '; + /*if (funcInfo->nbInput>1) idx='0'+i;*/ /* TODO: compile Java code and see if it is necessary to distinguish parameters*/ + + retCode = TA_GetInputParameterInfo( funcInfo->handle, i, (void*)&inputInfo); + if(inputInfo->type == TA_Input_Price) + { + fprintf(gOutFunc_Annotation->file, " @InputParameterInfo(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", inputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", inputInfo->flags); + /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", inputInfo->hint);*/ + /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", inputInfo->helpFile);*/ + fprintf(gOutFunc_Annotation->file, " type = InputParameterType.TA_Input_Price\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + + if(inputInfo->flags & TA_IN_PRICE_OPEN) + { + fprintf(gOutFunc_Annotation->file, " double inOpen%c[],\n",idx); + } + if(inputInfo->flags & TA_IN_PRICE_HIGH) + { + fprintf(gOutFunc_Annotation->file, " double inHigh%c[],\n",idx); + } + if(inputInfo->flags & TA_IN_PRICE_LOW) + { + fprintf(gOutFunc_Annotation->file, " double inLow%c[],\n",idx); + } + if(inputInfo->flags & TA_IN_PRICE_CLOSE) + { + fprintf(gOutFunc_Annotation->file, " double inClose%c[],\n",idx); + } + if(inputInfo->flags & TA_IN_PRICE_VOLUME) + { + fprintf(gOutFunc_Annotation->file, " double inVolume%c[],\n",idx); + } + if(inputInfo->flags & TA_IN_PRICE_OPENINTEREST) + { + fprintf(gOutFunc_Annotation->file, " double inOpenInterest%c[],\n",idx); /* FIXME: does it exist? */ + } + if(inputInfo->flags & TA_IN_PRICE_TIMESTAMP) + { + fprintf(gOutFunc_Annotation->file, " long inTimestamp%c[],\n",idx); /* FIXME: does it exist? */ + } + } + else + { + if(inputInfo->type == TA_Input_Real) + { + fprintf(gOutFunc_Annotation->file, " @InputParameterInfo(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", inputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", inputInfo->flags); + fprintf(gOutFunc_Annotation->file, " type = InputParameterType.TA_Input_Real\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " double %s[],\n", inputInfo->paramName); + } + else if(inputInfo->type == TA_Input_Integer) + { + fprintf(gOutFunc_Annotation->file, " @InputParameterInfo(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", inputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", inputInfo->flags); + fprintf(gOutFunc_Annotation->file, " type = InputParameterType.TA_Input_Integer\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " int %s[],\n", inputInfo->paramName); + } + else + { + printf( "Unexpected error 2(doForEachFunctionAnnotation)\n"); /* FIXME: fatal error! */ + } + } + } + + + + /* + * Annotate Optional input parameters + */ + for(i=0; inbOptInput; i++) + { + retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, (void*)&optInputInfo ); + fprintf(gOutFunc_Annotation->file, " @OptInputParameterInfo(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " displayName = \"%s\",\n", optInputInfo->displayName); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", optInputInfo->flags); + /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", optInputInfo->hint);*/ + /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", optInputInfo->helpFile);*/ + if(optInputInfo->type == TA_OptInput_RealRange) + { + fprintf(gOutFunc_Annotation->file, " type = OptInputParameterType.TA_OptInput_RealRange,\n"); + fprintf(gOutFunc_Annotation->file, " dataSet = com.tictactec.ta.lib.meta.annotation.RealRange.class\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + doubleRange= (TA_RealRange*)optInputInfo->dataSet; + fprintf(gOutFunc_Annotation->file, " @RealRange(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " defaultValue = %.5f,\n", (double)optInputInfo->defaultValue); + fprintf(gOutFunc_Annotation->file, " min = %.5f,\n", doubleRange->min); + fprintf(gOutFunc_Annotation->file, " max = %.5f,\n", doubleRange->max); + fprintf(gOutFunc_Annotation->file, " precision = %d,\n", doubleRange->precision); + fprintf(gOutFunc_Annotation->file, " suggested_start = %.5f,\n", doubleRange->suggested_start); + fprintf(gOutFunc_Annotation->file, " suggested_end = %.5f,\n", doubleRange->suggested_end); + fprintf(gOutFunc_Annotation->file, " suggested_increment = %.5f\n", doubleRange->suggested_increment); + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " double %s,\n", optInputInfo->paramName); + } + else if(optInputInfo->type == TA_OptInput_IntegerRange) + { + fprintf(gOutFunc_Annotation->file, " type = OptInputParameterType.TA_OptInput_IntegerRange,\n"); + fprintf(gOutFunc_Annotation->file, " dataSet = com.tictactec.ta.lib.meta.annotation.IntegerRange.class\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + integerRange= (TA_IntegerRange*)optInputInfo->dataSet; + fprintf(gOutFunc_Annotation->file, " @IntegerRange(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " defaultValue = %d,\n", (int)optInputInfo->defaultValue); + fprintf(gOutFunc_Annotation->file, " min = %d,\n", integerRange->min); + fprintf(gOutFunc_Annotation->file, " max = %d,\n", integerRange->max); + fprintf(gOutFunc_Annotation->file, " suggested_start = %d,\n", integerRange->suggested_start); + fprintf(gOutFunc_Annotation->file, " suggested_end = %d,\n", integerRange->suggested_end); + fprintf(gOutFunc_Annotation->file, " suggested_increment = %d\n", integerRange->suggested_increment); + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " int %s,\n", optInputInfo->paramName); + } + else if(optInputInfo->type == TA_OptInput_IntegerList) + { + fprintf(gOutFunc_Annotation->file, " type = OptInputParameterType.TA_OptInput_IntegerList,\n"); + fprintf(gOutFunc_Annotation->file, " dataSet = com.tictactec.ta.lib.meta.annotation.IntegerList.class\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + intList = (TA_IntegerList*) optInputInfo->dataSet; + /*if( intList != (TA_IntegerList*) TA_DEF_UI_MA_Method.dataSet ) + *{ + * + *} + */ + fprintf(gOutFunc_Annotation->file, " @IntegerList(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " defaultValue = %d,\n", (int)optInputInfo->defaultValue); + + if (intList->nbElement>0) { + fprintf(gOutFunc_Annotation->file, " value = { "); + for (j=0; jnbElement-1; j++) { + fprintf(gOutFunc_Annotation->file, "%d, ", intList->data[j].value); + } + fprintf(gOutFunc_Annotation->file, "%d },\n", intList->data[intList->nbElement-1].value); + fprintf(gOutFunc_Annotation->file, " string = { "); + for (j=0; jnbElement-1; j++) { + fprintf(gOutFunc_Annotation->file, "\"%s\", ", intList->data[j].string); + } + fprintf(gOutFunc_Annotation->file, "\"%s\" }\n", intList->data[intList->nbElement-1].string); + } + + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " MAType %s,\n", optInputInfo->paramName); + } + else + { + printf( "Unexpected error 2(doForEachFunctionAnnotation)\n"); /* FIXME: fatal error! */ + } + } + + fprintf(gOutFunc_Annotation->file, " MInteger outBegIdx,\n"); + fprintf(gOutFunc_Annotation->file, " MInteger outNBElement,\n"); + + + /* + * Annotate Output parameters + */ + for(i=0; inbOutput; i++) + { + retCode = TA_GetOutputParameterInfo( funcInfo->handle, i, (void*)&outputInfo ); + if(outputInfo->type == TA_Output_Integer) + { + fprintf(gOutFunc_Annotation->file, " @OutputParameterInfo(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", outputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", outputInfo->flags); + /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", outputInfo->hint);*/ + /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", outputInfo->helpFile);*/ + fprintf(gOutFunc_Annotation->file, " type = OutputParameterType.TA_Output_Integer\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " int %s[]\n", outputInfo->paramName); + } + else if(outputInfo->type == TA_Output_Real) + { + fprintf(gOutFunc_Annotation->file, " @OutputParameterInfo(\n"); + fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", outputInfo->paramName); + fprintf(gOutFunc_Annotation->file, " flags = %d,\n", outputInfo->flags); + fprintf(gOutFunc_Annotation->file, " type = OutputParameterType.TA_Output_Real\n"); + fprintf(gOutFunc_Annotation->file, " )\n"); + fprintf(gOutFunc_Annotation->file, " double %s[]", outputInfo->paramName); + } + else + { + printf( "Unexpected error 3(doForEachFunctionAnnotation)\n"); /* FIXME: fatal error!*/ + } + + if (inbOutput-1) { + fprintf(gOutFunc_Annotation->file, ","); + } + fprintf(gOutFunc_Annotation->file, "\n"); + + } + + fprintf(gOutFunc_Annotation->file, ") {\n"); + fprintf(gOutFunc_Annotation->file, " return super.%s (\n", funcName); + + fprintf(gOutFunc_Annotation->file, " startIdx,\n"); + fprintf(gOutFunc_Annotation->file, " endIdx,\n"); + + for(i=0; inbInput; i++) + { + retCode = TA_GetInputParameterInfo(funcInfo->handle, i, (void*)&inputInfo); + if(inputInfo->type == TA_Input_Price) + { + char idx = ' '; + /*if (funcInfo->nbInput>1) idx='0'+i;*/ /* TODO: compile Java code and see if it is necessary to distinguish parameters */ + + if(inputInfo->flags & TA_IN_PRICE_OPEN) + { + fprintf(gOutFunc_Annotation->file, " inOpen%c,\n", idx); + } + if(inputInfo->flags & TA_IN_PRICE_HIGH) + { + fprintf(gOutFunc_Annotation->file, " inHigh%c,\n", idx); + } + if(inputInfo->flags & TA_IN_PRICE_LOW) + { + fprintf(gOutFunc_Annotation->file, " inLow%c,\n", idx); + } + if(inputInfo->flags & TA_IN_PRICE_CLOSE) + { + fprintf(gOutFunc_Annotation->file, " inClose%c,\n", idx); + } + if(inputInfo->flags & TA_IN_PRICE_VOLUME) + { + fprintf(gOutFunc_Annotation->file, " inVolume%c,\n", idx); + } + if(inputInfo->flags & TA_IN_PRICE_OPENINTEREST) + { + fprintf(gOutFunc_Annotation->file, " inOpenInterest%c,\n", idx); /* FIXME: does it exist?*/ + } + if(inputInfo->flags & TA_IN_PRICE_TIMESTAMP) + { + fprintf(gOutFunc_Annotation->file, " inTimestamp%c,\n", idx); /* FIXME: does it exist? */ + } + } else { + fprintf(gOutFunc_Annotation->file, " %s,\n", inputInfo->paramName); + } + } + + for(i=0; inbOptInput; i++) + { + retCode = TA_GetOptInputParameterInfo(funcInfo->handle, i, (void*)&optInputInfo); + fprintf(gOutFunc_Annotation->file, " %s,\n", optInputInfo->paramName); + } + + fprintf(gOutFunc_Annotation->file, " outBegIdx,\n"); + fprintf(gOutFunc_Annotation->file, " outNBElement,\n"); + + for(i=0; inbOutput-1; i++) + { + retCode = TA_GetOutputParameterInfo(funcInfo->handle, i, (void*)&outputInfo); + fprintf(gOutFunc_Annotation->file, " %s,\n", outputInfo->paramName); + } + retCode = TA_GetOutputParameterInfo(funcInfo->handle, funcInfo->nbOutput-1, (void*)&outputInfo); + fprintf(gOutFunc_Annotation->file, " %s\n", outputInfo->paramName); + + fprintf(gOutFunc_Annotation->file, "); }\n\n\n"); +#endif +} + +void create_dir_recursively(const char *path) { + char buffer[1024]; + char *p = NULL; + size_t len; + + snprintf(buffer, sizeof(buffer), "%s", path); + len = strlen(buffer); + if (buffer[len - 1] == PATH_SEPARATOR[0]) { + buffer[len - 1] = '\0'; + } + + for (p = buffer + 1; *p; p++) { + if (*p == PATH_SEPARATOR[0]) { + *p = '\0'; + #if defined(_WIN32) || defined(_WIN64) + _mkdir(buffer); + #else + mkdir(buffer, S_IRWXU); + #endif + *p = PATH_SEPARATOR[0]; + } + } + #if defined(_WIN32) || defined(_WIN64) + _mkdir(buffer); + #else + mkdir(buffer, S_IRWXU); + #endif +} + +void create_dirs(void) { + // Make sure output/temp directories exists. + #define DIR_RUST ".." PATH_SEPARATOR "rust" PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" + #define DIR_TEMP ".." PATH_SEPARATOR "temp" + create_dir_recursively(DIR_RUST); + create_dir_recursively(DIR_TEMP); +} + +struct WriteRustModLinesParams { + FileHandle *out; + int writePubUse; // 0 to write "pub mod", 1 to write "pub use" +}; + +void writeRustModLines(const TA_FuncInfo *funcInfo, void *opaque) { + struct WriteRustModLinesParams *params = (struct WriteRustModLinesParams *)opaque; + FileHandle *out = params->out; + char buffer[500]; + + #if defined(RUST_SINGLE_FUNC) + if (strcmp(funcInfo->name,RUST_SINGLE_FUNC) != 0) + return; + #endif + + // Convert filename to lowercase into buffer. + int i = 0; + while (funcInfo->name[i]) { + buffer[i] = tolower(funcInfo->name[i]); + i++; + } + buffer[i] = '\0'; + + if (params->writePubUse == 1) + fprintf(out->file, "pub use self::%s::*\n", buffer); + else + fprintf(out->file, "pub mod %s;\n", buffer); +} + +void writeRustMod( void ) +{ + // Update the rust/src/ta_func/mod.rs file. + struct WriteRustModLinesParams params; + char buffer[500]; + FileHandle *out; + + if (!gmcpp_installed) + return; + + // Add rs file to ta_func/mod.rs + // A common header/footer is provided by the template file. + #define FILE_RUST_MOD ".." PATH_SEPARATOR "rust" PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "mod.rs" + #define FILE_RUST_MOD_TEMPLATE ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract" PATH_SEPARATOR "templates" PATH_SEPARATOR "ta_func_mod.rs.template" + + out = fileOpen( FILE_RUST_MOD, + FILE_RUST_MOD_TEMPLATE, + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + + params.out = out; + params.writePubUse = 1; + TA_ForEachFunc(writeRustModLines, ¶ms); + params.writePubUse = 0; + TA_ForEachFunc(writeRustModLines, ¶ms); + + fileClose(out); +} + +void genRustCodePhase2( const TA_FuncInfo *funcInfo ) +{ + // Each TA function get its own .rs file generated. + // A common header/footer is provided by the template file. + FILE *logicTmp; + char buffer[500]; + int idx, again; + static int firstTime = 1; + int ret; + + #if defined(RUST_SINGLE_FUNC) + if (strcmp(funcInfo->name,RUST_SINGLE_FUNC) != 0) + return; + #endif + + if (!gmcpp_installed) + return; + + // Convert filename to lowercase into buffer. + int i = 0; + while (funcInfo->name[i]) { + buffer[i] = tolower(funcInfo->name[i]); + i++; + } + buffer[i] = '\0'; + strcat(buffer, ".rs"); + #define FILE_RUST_FUNC_TEMPLATE ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract" PATH_SEPARATOR "templates" PATH_SEPARATOR "ta_x.rs.template" + + FileHandle *out = fileOpen( ta_fs_path(5, "..", "rust", "src", "ta_func", buffer), + FILE_RUST_FUNC_TEMPLATE, + FILE_WRITE|WRITE_ON_CHANGE_ONLY ); + + + /* Clean-up just in case. */ + fileDelete( ta_fs_path(3, "..", "temp", "rust_logic.tmp") ); + + #ifdef _MSC_VER + sprintf( buffer, "%s -c -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _RUST .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "TA_%s.c >>.." PATH_SEPARATOR "temp" PATH_SEPARATOR "rust_logic.tmp ", gmcpp_exec, funcInfo->name); + ret = system( buffer ); + #else + sprintf( buffer, "%s -@compat -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _RUST .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c | sed '/^#include/d' >> .." PATH_SEPARATOR "temp" PATH_SEPARATOR "rust_logic.tmp ", gmcpp_exec, funcInfo->name); + ret = system( buffer ); + #endif + + /* Write the output of the C pre-processor to the rust file. */ + init_gToOpen( ta_fs_path(3, "..", "temp", "rust_logic.tmp"), NULL ); + logicTmp = fopen( gToOpen, "r" ); + if( !logicTmp ) + { + printf( "Cannot open temp/rust_logic.tmp\n" ); + return; + } + while( fgets(gTempBuf,BUFFER_SIZE,logicTmp) ) + { + /* Remove empty lines and lines with only a ';' */ + idx = 0; + again = 1; + while( again && gTempBuf[idx] != '\0' ) + { + if( !isspace(gTempBuf[idx]) && !(gTempBuf[idx] == ';') ) + again = 0; + idx++; + } + if( (again == 0) && (idx > 0) ) + fputs( gTempBuf, out->file ); + } + + /* Clean-up */ + fclose(logicTmp); + print( out->file, "\n" ); + fileDelete( ta_fs_path(3, "..", "temp", "rust_logic.tmp") ); + + // Upon closing, will touch the target file only if there was a change... + fileClose(out); +} diff --git a/src/ta-lib/src/tools/post-build-bin.sh b/src/ta-lib/src/tools/post-build-bin.sh new file mode 100755 index 000000000..78c3433aa --- /dev/null +++ b/src/ta-lib/src/tools/post-build-bin.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# This is a work around for a slibtool bug with --mode=execute +# +# With slibtool the gen_code binary is created in the .libs directory while GNU +# libtool outputs in the same directory as the Makefile. This means that cp(1) +# needs to be invoked with $(LIBTOOL) --mode=execute. +# +# However slibtool currently has a bug where the destination argument is dropped +# which will result in the command failing. +# +# See https://bugs.gentoo.org/790770 + +set -eu + +mkdir -p ../../../bin +cp "${1}" ../../../bin diff --git a/src/ta-lib/src/tools/ta_regtest/Makefile.am b/src/ta-lib/src/tools/ta_regtest/Makefile.am new file mode 100644 index 000000000..929dacfda --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/Makefile.am @@ -0,0 +1,43 @@ + +# ta_regrest is used for testing and should +# not be installed. +noinst_PROGRAMS = ta_regtest + +ta_regtest_SOURCES = ta_regtest.c \ + test_data.c \ + test_util.c \ + test_abstract.c \ + ta_test_func/test_adx.c \ + ta_test_func/test_mom.c \ + ta_test_func/test_sar.c \ + ta_test_func/test_rsi.c \ + ta_test_func/test_candlestick.c \ + ta_test_func/test_per_ema.c \ + ta_test_func/test_per_hlc.c \ + ta_test_func/test_stoch.c \ + ta_test_func/test_macd.c \ + ta_test_func/test_minmax.c \ + ta_test_func/test_per_hlcv.c \ + ta_test_func/test_1in_1out.c \ + ta_test_func/test_1in_2out.c \ + ta_test_func/test_per_ohlc.c \ + ta_test_func/test_stddev.c \ + ta_test_func/test_bbands.c \ + ta_test_func/test_ma.c \ + ta_test_func/test_po.c \ + ta_test_func/test_per_hl.c \ + ta_test_func/test_trange.c \ + ta_test_func/test_imi.c \ + ta_test_func/test_avgdev.c \ + test_internals.c + +ta_regtest_CPPFLAGS = -I../../ta_func \ + -I../../ta_common/trio \ + -I../../ta_common/mt \ + -I../../ta_common \ + -I../../ta_abstract +ta_regtest_LDFLAGS = -no-undefined +ta_regtest_LDADD = ../../libta-lib.la $(LIBM) + +all-local: ta_regtest + $(LIBTOOL) --mode=execute ../post-build-bin.sh ta_regtest diff --git a/src/ta-lib/src/tools/ta_regtest/ta_error_number.h b/src/ta-lib/src/tools/ta_regtest/ta_error_number.h new file mode 100644 index 000000000..b761bd860 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_error_number.h @@ -0,0 +1,297 @@ +#ifndef TA_ERROR_NUMBER_H +#define TA_ERROR_NUMBER_H + +/* All possible failure should have a unique number different than zero. */ +typedef enum +{ + TA_TEST_PASS = 0, + + /* Error code for test in ta_regtest.c */ + TA_REGTEST_BAD_USER_PARAM = 1, + TA_REGTEST_ADDDATASOURCE_FAILED = 2, + TA_REGTEST_HISTORYALLOC_FAILED = 3, + TA_REGTEST_HISTORYFREE_FAILED = 4, + TA_REGTEST_HISTORYALLOC_0 = 5, + TA_REGTEST_HISTORYALLOC_1 = 6, + TA_REGTEST_HISTORYALLOC_2 = 7, + TA_REGTEST_HISTORYALLOC_3 = 8, + TA_REGTEST_HISTORYALLOC_4 = 9, + TA_REGTEST_HISTORYALLOC_5 = 10, + TA_REGTEST_HISTORYALLOC_6 = 11, + TA_REGTEST_HISTORYALLOC_7 = 12, + TA_REGTEST_HISTORYALLOC_8 = 13, + TA_REGTEST_HISTORYALLOC_9 = 14, + TA_REGTEST_HISTORYALLOC_10 = 15, + TA_REGTEST_HISTORYALLOC_11 = 16, + TA_REGTEST_HISTORYALLOC_12 = 17, + TA_REGTEST_HISTORYALLOC_13 = 18, + TA_REGTEST_HISTORYALLOC_14 = 19, + TA_REGTEST_HISTORYALLOC_15 = 20, + TA_REGTEST_HISTORYALLOC_16 = 21, + TA_REGTEST_HISTORYALLOC_17 = 22, + TA_REGTEST_HISTORYALLOC_18 = 23, + TA_REGTEST_HISTORYALLOC_19 = 24, + TA_REGTEST_ADDDSOURCE_FAILED = 25, + TA_REGTEST_OPTIMIZATION_REF_ERROR = 26, + + /* Error code for test in test_util.c */ + TA_TESTUTIL_INIT_FAILED = 101, + TA_TESTUTIL_SET_FATAL_ERROR_FAILED = 102, + TA_TESTUTIL_UDBASE_ALLOC_FAILED = 103, + TA_TESTUTIL_UDBASE_FREE_FAILED = 104, + TA_TESTUTIL_SHUTDOWN_FAILED = 105, + + TA_TESTUTIL_TFRR_BAD_PARAM = 120, + TA_TESTUTIL_TFRR_BAD_RETCODE = 121, + TA_TESTUTIL_TFRR_BAD_CALCULATION = 122, + TA_TESTUTIL_TFRR_BAD_BEGIDX = 123, + TA_TESTUTIL_TFRR_BAD_OUTNBELEMENT = 124, + + TA_TEST_TFRR_BAD_OVERLAP_OR_NAN = 125, + TA_TEST_TFRR_INPUT_HAS_BEEN_MODIFIED = 126, + TA_TEST_TFRR_CHECK_SAME_CONTENT = 127, + TA_TEST_TFRR_OVERLAP_OR_NAN_0 = 128, + TA_TEST_TFRR_OVERLAP_OR_NAN_1 = 129, + TA_TEST_TFRR_OVERLAP_OR_NAN_2 = 130, + TA_TEST_TFRR_OVERLAP_OR_NAN_3 = 131, + TA_TEST_TFRR_OVERLAP_OR_NAN_4 = 132, + TA_TEST_TFRR_OVERLAP_OR_NAN_5 = 133, + TA_TEST_TFRR_OVERLAP_OR_NAN_6 = 134, + TA_TEST_TFRR_OVERLAP_OR_NAN_7 = 135, + TA_TEST_TFRR_OVERLAP_OR_NAN_8 = 136, + TA_TEST_TFRR_OVERLAP_OR_NAN_9 = 137, + TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL = 138, + TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE = 139, + TA_TEST_TFRR_BAD_MA_TYPE = 140, + TA_TEST_TFFR_BAD_MA_LOOKBACK = 141, + + TA_TESTUTIL_DRT_REF_FAILED = 150, + TA_TESTUTIL_DRT_ALLOC_ERR = 151, + TA_TESTUTIL_DRT_RETCODE_ERR = 152, + TA_TESTUTIL_DRT_BAD_SUFFIX = 153, + TA_TESTUTIL_DRT_BAD_PREFIX = 154, + TA_TESTUTIL_DRT_MISSING_DATA = 155, + TA_TESTUTIL_DRT_BAD_OUTNBLEMENT = 156, + TA_TESTUTIL_DRT_BAD_OUTBEGIDX = 157, + TA_TESTUTIL_DRT_LOOKBACK_TOO_HIGH = 158, + TA_TESTUTIL_DRT_LOOKBACK_INCORRECT = 159, + TA_TESTUTIL_DRT_REF_OUTPUT_INCORRECT = 160, + TA_TESTUTIL_DRT_DATA_DIFF = 161, + TA_TESTUTIL_DRT_DATA_DIFF_INT = 162, + TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT = 163, + TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT_INT = 164, + + /* Error code for test in test_period.c */ + TA_PERIOD_HISTORYALLOC_FAILED = 200, + TA_PERIOD_NBBAR_INCORRECT = 201, + TA_PERIOD_PRICE_INCORRECT = 202, + TA_PERIOD_OPENINTEREST_INCORRECT = 203, + TA_PERIOD_TIMESTAMP_YEAR_INCORRECT = 204, + TA_PERIOD_TIMESTAMP_MONTH_INCORRECT = 205, + TA_PERIOD_TIMESTAMP_DAY_INCORRECT = 206, + TA_PERIOD_HISTORYFREE_FAILED = 207, + TA_PERIOD_DELTA_WEEKDAY_FAILED = 208, + TA_PERIOD_DELTA_WEEKDAY_FAILED_1 = 209, + TA_PERIOD_END_OF_PERIOD_ADD_FAILED = 210, + TA_PERIOD_END_OF_PERIOD_HISTORY_FAILED = 211, + TA_PERIOD_END_OF_PERIOD_CONSOLIDATED_FAILED = 212, + TA_PERIOD_END_OF_PERIOD_WRONG_HISTORY = 213, + TA_PERIOD_HISTORYCOMPARE_FAILED = 214, + + /* Error code for test in test_ascii.c */ + TA_TESTASCII_UNEXPECTED_RETCODE = 301, + TA_TESTASCII_FOREACHSYMBOL_FAILED = 302, + TA_TESTASCII_SEARCHININDEX_FAILED = 303, + TA_TESTASCII_CANTFIND_CATSYM_IN_INDEX = 304, + TA_TESTASCII_SAMPLING_FILE_NOT_FOUND = 305, + TA_TESTASCII_CATTABLE_ALLOC_ERROR = 306, + TA_TESTASCII_SYMTABLE_ALLOC_ERROR = 307, + TA_TESTASCII_CATTABLE_FREE_ERROR = 308, + TA_TESTASCII_SYMTABLE_FREE_ERROR = 309, + TA_TESTASCII_EQV_HISTORYALLOC = 310, + TA_TESTASCII_EQV_DIFF_HISTORY_PTR = 311, + TA_TESTASCII_HISTORYFREE_FAILED = 312, + TA_TESTASCII_EQV_DIFF_NBBARS = 313, + TA_TESTASCII_EQV_DIFF_PERIOD = 314, + TA_TESTASCII_EQV_DIFF_VALUE = 315, + TA_TESTASCII_UDBASEFREE_FAILED = 316, + TA_TESTASCII_EQV_BAD_FILENAME = 317, + TA_TESTASCII_EQV_ADDDATASOURCE = 318, + TA_TESTASCII_EQV_BAD_FIELD_ID = 319, + TA_TESTASCII_REFHISTORYFREE_FAILED = 320, + TA_TESTASCII_EQV_DIFF_DATA = 321, + TA_TESTASCII_CATSYM_NOT_FOUND = 322, + + /* Error code for test in test_yahoo.c */ + TA_YAHOO_ADDDATASOURCE_USA_FAILED = 330, + TA_YAHOO_HISTORYALLOC_1_FAILED = 331, + TA_YAHOO_HISTORYALLOC_2_FAILED = 332, + TA_YAHOO_HISTORYALLOC_3_FAILED = 333, + TA_YAHOO_HISTORYFREE_FAILED = 334, + TA_YAHOO_VALUE_1_FAILED = 335, + TA_YAHOO_VALUE_2_FAILED = 336, + TA_YAHOO_VALUE_3_FAILED = 337, + TA_YAHOO_FIELD_MISSING_1 = 338, + TA_YAHOO_FIELD_MISSING_2 = 339, + TA_YAHOO_FIELD_MISSING_3 = 340, + TA_YAHOO_CRS_HISTORYALLOC_FAILED = 341, + TA_YAHOO_CRS_NBBARSBAD = 342, + TA_YAHOO_CRS_PRICEBARBAD = 343, + TA_YAHOO_ADDDATASOURCE_CAN_FAILED = 344, + TA_YAHOO_ADDDATASOURCE_KPN_AS_FAILED = 345, + TA_YAHOO_HISTORYALLOC_KPN_AS_FAILED = 346, + + /* Error code for test in test_pm.c */ + TA_PM_EMPTY_TA_TRADE_LOG_TESTS_0 = 400, + TA_PM_EMPTY_TA_TRADE_LOG_TESTS_1 = 401, + TA_PM_EMPTY_TA_TRADE_LOG_TESTS_2 = 402, + TA_PM_EMPTY_TA_TRADE_LOG_TESTS_3 = 403, + TA_PM_EMPTY_TA_TRADE_LOG_TESTS_4 = 404, + TA_PM_EMPTY_TA_TRADELOGFREE_FAILED = 405, + TA_PM_ERR_INVALID_KEY_TYPE = 406, + TA_PM_TRADELOGADD_ONE_TRADE_FAILED = 407, + TA_PM_TRADELOGFREE_ONE_TRADE_FAILED = 408, + TA_PM_2TRADETST_BAD_TRADE_TYPE = 409, + TA_PM_2TRADETST_TRADELOGADD_1 = 410, + TA_PM_2TRADETST_TRADELOGADD_2 = 411, + TA_PM_2TRADETST_PMALLOC_FAILED = 412, + TA_PM_2TRADETST_PMADDTRADELOG_FAILED = 413, + TA_PM_2TRADETST_PMFREE_FAILED = 414, + TA_PM_CHECKVALUE_FAILED_0 = 415, + TA_PM_CHECKVALUE_FAILED_1 = 416, + TA_PM_CHECKVALUE_FAILED_2 = 417, + TA_PM_CHECKVALUE_FAILED_3 = 418, + TA_PM_CHECKVALUE_FAILED_4 = 419, + TA_PM_CHECKVALUE_FAILED_5 = 420, + TA_PM_CHECKVALUE_FAILED_6 = 421, + TA_PM_CHECKVALUE_FAILED_7 = 422, + TA_PM_CHECKVALUE_FAILED_8 = 423, + TA_PM_CHECKVALUE_FAILED_9 = 424, + TA_PM_CHECKVALUE_FAILED_10 = 425, + TA_PM_ERR_CHECK_NO_HANG_1 = 426, + TA_PM_ERR_CHECK_NO_HANG_2 = 427, + TA_PM_ERR_CHECK_NO_HANG_3 = 428, + TA_PM_ERR_CHECK_NO_HANG_4 = 429, + TA_PM_ERR_CHECK_NO_HANG_5 = 430, + TA_PM_ERR_CHECK_NO_HANG_6 = 431, + TA_PM_TRADELOGADD_ONE_TRADE_FAILED_1 = 432, + TA_PM_TRADELOGADD_ONE_TRADE_FAILED_2 = 433, + TA_PM_TRADELOGADD_ONE_TRADE_FAILED_3 = 434, + TA_PM_UNKNOWN_TRANSACTION_TYPE = 435, + TA_PM_REPORT_ALLOC_FAILED = 436, + TA_PM_TEST_VALUE_ID_FAILED_0 = 437, + TA_PM_TEST_VALUE_ID_FAILED_1 = 438, + TA_PM_TEST_VALUE_ID_FAILED_2 = 439, + TA_PM_TEST_VALUE_ID_FAILED_3 = 440, + TA_PM_TEST_VALUE_ID_FAILED_4 = 441, + TA_PM_TEST_VALUE_ID_FAILED_5 = 442, + TA_PM_TEST_VALUE_ID_FAILED_6 = 443, + TA_PM_TEST_VALUE_ID_FAILED_7 = 444, + TA_PM_TEST_VALUE_ID_FAILED_8 = 445, + TA_PM_TEST_VALUE_ID_FAILED_9 = 446, + TA_PM_VALUE_TO_FILE_FAILED = 447, + TA_PM_TEST_ARRAY_ID_FAILED_0 = 448, + TA_PM_TEST_ARRAY_ID_FAILED_1 = 449, + TA_PM_TEST_ARRAY_ID_FAILED_2 = 450, + TA_PM_TEST_ARRAY_ID_FAILED_3 = 451, + TA_PM_TEST_ARRAY_ID_FAILED_4 = 452, + TA_PM_TEST_ARRAY_ID_FAILED_5 = 453, + TA_PM_TEST_ARRAY_ID_FAILED_6 = 454, + TA_PM_TEST_ARRAY_ID_FAILED_7 = 455, + TA_PM_TEST_ARRAY_ID_FAILED_8 = 456, + TA_PM_TEST_ARRAY_ID_FAILED_9 = 457, + TA_PM_TEST_ARRAY_WITH_INVALID_DATE = 458, + + /* Error code related to call to ta_abstract */ + TA_ABS_TST_FAIL_GETFUNCHANDLE = 600, + TA_ABS_TST_FAIL_GETFUNCINFO = 601, + TA_ABS_TST_FAIL_PARAMHOLDERALLOC = 602, + TA_ABS_TST_FAIL_PARAMHOLDERFREE = 603, + TA_ABS_TST_FAIL_PARAMREALPTR = 604, + TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER = 605, + TA_ABS_TST_FAIL_SETOUTPUTPARAMREALPTR = 606, + TA_ABS_TST_FAIL_CALLFUNC = 607, + TA_ABS_TST_FAIL_GETLOOKBACK_CALL_1 = 608, + TA_ABS_TST_FAIL_GETLOOKBACK_CALL_2 = 609, + TA_ABS_TST_FAIL_GETLOOKBACK_1 = 610, + TA_ABS_TST_FAIL_GETLOOKBACK_2 = 611, + TA_ABS_TST_FAIL_CALLFUNC_1 = 612, + TA_ABS_TST_FAIL_CALLFUNC_2 = 613, + TA_ABS_TST_FAIL_CALLFUNC_3 = 614, + TA_ABS_TST_FAIL_CALLFUNC_4 = 615, + TA_ABS_TST_FAIL_INVALID_OUTPUT = 616, + TA_ABS_TST_FAIL_STARTEND_ZERO = 617, + TA_ABS_TST_FAIL_FUNCTION_DESC_SMALL = 618, + TA_ABS_TST_FAIL_FUNCTION_DESC_LARGE = 619, + + /* Error code related to internal tests. */ + TA_INTERNAL_CIRC_BUFF_FAIL_0 = 700, + TA_INTERNAL_CIRC_BUFF_FAIL_1 = 701, + TA_INTERNAL_CIRC_BUFF_FAIL_2 = 702, + TA_INTERNAL_CIRC_BUFF_FAIL_3 = 703, + TA_INTERNAL_CIRC_BUFF_FAIL_4 = 704, + TA_INTERNAL_CIRC_BUFF_FAIL_5 = 705, + TA_INTERNAL_CIRC_BUFF_FAIL_6 = 706, + TA_INTERNAL_FATAL_TST_FAIL = 707, + TA_INTERNAL_ASSERT_TST_FAIL = 708, + TA_INTERNAL_TIMESTAMP_TEST_FAILED = 709, + TA_INTERNAL_PSEUDORANDOM_UINT32 = 710, + TA_INTERNAL_PSEUDORANDOM_DOUBLE = 711, + + /* Error code related to CSI data source tests. */ + TA_CSI_ADDDATASOURCE_FAILED = 800, + TA_CSI_HISTORYALLOC_1_FAILED = 801, + TA_CSI_VALUE_1_FAILED = 802, + TA_CSI_FIELD_MISSING_1 = 803, + TA_CSI_HISTORYFREE_FAILED = 804, + TA_CSI_HISTORYALLOC_3_FAILED = 805, + TA_CSI_CRS_HISTORYALLOC_FAILED = 806, + TA_CSI_CRS_NBBARSBAD = 807, + TA_CSI_CRS_PRICEBARBAD = 808, + TA_CSI_HISTORYALLOC_4_FAILED = 809, + TA_CSI_HISTORYALLOC_5_FAILED = 810, + + /* Error code related to test_candlestick */ + TA_TSTCDL_GETFUNCHANDLE_FAIL = 900, + TA_TSTCDL_PARAMHOLDERALLOC_FAIL= 901, + TA_TSTCDL_NBINPUT_WRONG = 902, + TA_TSTCDL_INPUT_TYPE_WRONG = 903, + TA_TSTCDL_INPUT_FLAG_WRONG = 904, + TA_TSTCDL_NBOUTPUT_WRONG = 905, + TA_TSTCDL_OUTPUT_TYPE_WRONG = 906, + TA_TSTCDL_CALLFUNC_FAIL = 907, + TA_TSTCDL_GETLOOKBACK_FAIL = 908, + TA_TSTCDL_PARAMHOLDERFREE_FAIL = 909, + + /* Error code related to test_merge */ + TA_TSTMERGE_AC_ADDFAILED_1 = 1000, + TA_TSTMERGE_AC_ADDFAILED_2 = 1001, + TA_TSTMERGE_AC_HISTALLOC_1 = 1002, + TA_TSTMERGE_AC_HISTFREE_1 = 1003, + TA_TSTMERGE_ASCII_ADDFAILED_1 = 1004, + TA_TSTMERGE_ASCII_ADDFAILED_2 = 1005, + TA_TSTMERGE_ASCII_ADDFAILED_3 = 1006, + TA_TSTMERGE_ASCII_ADDFAILED_4 = 1007, + TA_TSTMERGE_ASCII_HISTALLOC = 1008, + TA_TSTMERGE_ASCII_HISTFREE = 1009, + TA_TSTMERGE_ASCII_BAD_PATTERN_1 = 1010, + TA_TSTMERGE_ASCII_BAD_PATTERN_2 = 1011, + TA_TSTMERGE_ASCII_BAD_PATTERN_3 = 1012, + TA_TSTMERGE_ASCII_BAD_PATTERN_VOL = 1013, + TA_TSTMERGE_ASCII_BAD_PATTERN_OI = 1014, + TA_TSTMERGE_ASCII_BAD_PATTERN_OPEN = 1015, + TA_TSTMERGE_ASCII_BAD_PATTERN_LOW = 1016, + TA_TSTMERGE_ASCII_BAD_PATTERN_HIGH = 1017, + TA_TSTMERGE_ASCII_BAD_PATTERN_CLOSE = 1018, + TA_TSTMERGE_ASCII_BAD_PATTERN_TS = 1019, + + /* Error code related to bug fix documentented on SourceForge. */ + TA_TEST_FAIL_BUG1359452_1 = 2000, + TA_TEST_FAIL_BUG1359452_2 = 2001, + TA_TEST_FAIL_BUG1359452_3 = 2003, + TA_TEST_FAIL_BUG1359452_4 = 2004, + TA_TEST_FAIL_BUG1359452_5 = 2005, + + TA_LAST_VALID_ERROR = 0xFFFF +} ErrorNumber; +#endif diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c new file mode 100644 index 000000000..4eccb811d --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c @@ -0,0 +1,723 @@ +double gDataClose[10000] = { +111.45,110,109.04,109.22,110.9,109.69,111.23,112.05,112.71,112.64,110.73,112.98,113.53,113.89, +111.89,113.23,112.04,110.65,114.52,115.62,116.53,118.1,116.17,116.38,114.81,115.86,111.08,110.77, +109.66,108.6,109.28,109.1,108.63,108.97,109.03,108.05,106.58,105.01,105.25,105.95,105.43,105.33, +105.1,104.44,106.6,106,106.5,105.33,105.09,103.85,103.12,102.34,103.22,103.07,101.8,102.41, +105.84,106.23,106.54,106.6,106.93,105.91,105.18,103.95,105.58,106.7,107.04,107.99,105.31,105.87, +104.83,105.57,105.98,104.68,104.38,103.29,103.16,102.96,102.8,102.22,103.17,102.21,101.17,100.9, +101.46,98.49,95.21,94.58,94.29,94.8,97.12,96.18,94.93,95.67,95.16,96.46,96.62,96.52, +96.21,96.1,95.21,94.26,94.57,94.26,94.73,95,95.03,95.19,95.36,94.5,93.99,93.25, +93.45,93.76,92.71,94.11,93.28,93,93.94,93.8,91.81,90.9,92.27,92.94,93.96,96.91, +97.73,98.5,99.09,99.35,98.99,98.92,99.2,98.29,98.58,98.55,99.62,99.54,99.85,100.38, +99.17,99,99.15,99.37,98.54,97.45,97.51,97.4,97.08,97.11,96.17,99.45,100.02,100.82, +99.34,98.65,98.89,100.07,98.9,97.42,98.31,97.27,97.15,96.97,97.2,95.66,95.25,95.91, +96,96,95.44,95.3,95.36,94.77,94.12,93.64,93.86,94.23,94.12,94.48,93.51,91.25, +91.92,91.52,91.35,91.45,93.35,93.52,93.08,93.25,93.81,93.47,93.11,93.29,92.07,91.76, +92.42,92.59,92.75,92.6,91.41,91.68,91.8,92.33,91.5,90.76,91.54,91.83,91.49,91.56, +90.48,89.86,89.82,86.95,86.71,86.08,84.7,84.19,84.19,84,83.14,82.92,83.1,81.65, +81.87,81.94,81.99,82.09,82.5,82,81.21,81.61,83.42,81.87,82.24,82.94,82.47,82.21, +82.28,80.93,80.66,79.4,80.28,80.85,81.41,80.97,81.22,81.4,80.32,79.88,79.38,78.67, +78.95,79.28,79.9,79.37,79.09,77.08,76.68,75.48,75.74,75.39,75.33,75.52,75.91,76.33, +76.32,76.14,77.41,76.96,76.15,75.83,75.89,75.99,74.86,75.48,76.07,74.26,73.7,73.57, +74.24,75.48,76.47,76.67,76.42,78.09,77.77,78.02,76.82,77.59,76.56,76.63,77.15,77.1, +77.19,78.3,77.99,77.67,77.95,78.56,77.71,76.93,77.02,77.63,77.03,79.15,79.76,79.06, +79.52,80.69,79.9,80.16,80.75,80.14,79.78,79.83,80.02,80.28,80.66,81.27,82.16,82.89, +82.39,82.46,82.9,83.23,82.89,83.28,82.43,82.7,82.42,82.23,82.34,83.88,83.35,82.67, +82.11,81.66,82.02,81.86,83.31,81.64,81.98,80.75,81.16,82.1,82.48,83.81,84.17,83.45, +83.06,82.47,83.2,83.13,82.43,83.08,83.36,83.2,84.45,83.81,83.58,83.3,82.87,83.38, +82.88,81.93,81.57,81.02,81.14,80.29,80,79.96,79.94,79.9,80.24,80.63,80.1,80.2, +81.35,80.5,80.71,80.91,80.85,81.09,80.44,81.33,80.4,80.8,79.85,79.51,79.97,81.23, +81.94,81.3,81.63,81.02,80.72,80.91,80.85,81.41,81.36,83.09,83.8,83,83.17,83.57, +84.17,84.07,83.73,84.95,82.5,81.95,82.06,82.2,82.4,83.04,82.99,83.48,83.22,83.12, +82.48,82.76,83.37,83.53,83.13,83.71,85.96,86.97,87.5,88.72,89.14,88.43,88.65,89.21, +88.9,89.1,89.11,88.8,88.8,87.99,87.29,87.77,86.89,86.54,85.53,84.36,84.55,83.99, +82.84,83.15,83.61,83,82.87,81.06,81.59,81.88,81.42,82.31,82.89,83.36,83.47,83.33, +83.17,84.17,83.48,82.59,82.35,82.2,82.19,83.19,81.25,80.5,79.7,79.82,80.11,80.45, +80.22,80.36,79.5,77.99,77.41,78,78.21,77.56,78.7,79.43,80.33,80.01,80.48,80.75, +81.48,81.44,80.8,80.98,81.02,79.46,79.54,80.62,80.54,81.34,80.38,81.1,81.32,82.03, +82.6,82.76,81.15,81.3,81.3,82.5,82.19,82.66,82.02,83.5,83.36,83.36,83.12,84.06, +83.31,83.43,83.46,83.8,83.87,84.12,84.2,84.44,84.4,84.6,83.7,81.81,82.38,82.42, +81.45,80.04,78.96,79.3,77.38,75.81,74.79,74.67,74.2,74.73,75.3,73.88,74.01,75.41, +77.23,76.41,76.55,76.39,77.05,76.3,74.89,75.05,74.77,74.93,74.8,75.04,75,75.79, +77.35,76.84,75.55,77.1,77.14,76,75.81,76.51,76.41,77.16,76.36,74.29,74.34,73.16, +72.62,73.28,73.3,74.98,75.26,75.5,77.08,76.47,76.51,76.38,75.91,77.05,75.43,74.61, +74.21,74.03,72.01,75.48,76.65,76.7,83.64,84.57,85.75,86.2,87.6,88.44,89,89.57, +90.32,90.44,91.38,90.68,90.6,91.04,90.7,90.52,89.5,89.51,89.28,89.86,90.65,91.38, +91.9,91.51,92.41,92.35,92.13,91.6,92.37,92.41,92.92,93.3,92.58,92.8,92.64,92.1, +92.32,93.27,93.75,94.62,94.33,93.57,93.3,92.76,92.7,94.13,94.53,94.51,93.54,94.3, +93.86,93.42,92.89,91.98,91.95,92.19,91.79,92.38,93,93.1,94.9,94.1,94.45,95.21, +95,95.68,95.78,96.2,96.5,96.7,97.75,98.58,98.3,98.18,98.3,97.5,97.72,97.61, +97.02,96.55,96.2,97.45,97.33,97.31,96.45,96.67,97.51,96.65,96.1,97.67,97.08,95.76, +95.88,94.24,95.5,94.72,95.46,95.28,95.11,94.45,95.1,95.46,94.89,95.92,95.32,94.79, +93.61,93.37,93.37,93.28,92.38,91.2,90.47,90.11,89.75,89.5,90,89,88.43,87.39, +88.1,88.82,89.37,85.92,84.85,84.78,84.98,86,86.63,86.71,87.42,88.04,87.32,87.16, +86.72,85.74,84.98,84.48,84.16,84.43,83.88,84.31,85.72,85.7,85.74,86.12,86.37,86.72, +86.49,86.76,86.44,85.86,84.97,84.39,84.57,84.22,84.69,84.4,84.94,84.69,85.07,84.71, +84.65,85.25,84.89,85.13,84.04,84.02,83.91,82.21,83.69,84.99,83.55,83.48,85.19,85.97, +85.71,86.69,87.07,86.77,85.85,85.88,85.09,84.85,86.06,85.3,86.36,85.3,84.28,84.02, +84.13,85.25,84.1,83.89,83.65,85.35,85.7,87.04,87.5,88.15,88.29,88.71,89.55,89.99, +90.79,90.02,89.49,90.06,90.44,90.38,90.54,90.07,90.46,90.09,90.04,88.64,87.56,87.35, +87.98,88.12,88.59,88.59,88.35,88.7,87.1,87.13,87.42,87.05,86.06,85.53,86.41,87.19, +86.81,87.13,86.88,88.19,88.36,88.96,89,88.02,88.17,89.08,90.41,91.11,90.43,91.28, +90.74,91.26,90.65,91.94,92.28,93.45,93.7,93.04,93.74,93.12,93.08,93.7,94.18,94.2, +92.37,91.84,92.32,92.68,92.77,92.39,91.77,91.32,91.02,91.62,92.85,93.39,92.45,91.82, +93.3,91.21,93.06,94.53,94.59,96.45,96.39,96.84,96.82,97.04,96.5,96.79,96.54,96.79, +95.96,97.31,97.8,98.42,99.37,99.71,99.3,99.96,99.61,98.95,98.94,98.86,100.19,100, +99.39,99.23,98.01,97.38,98.8,99.85,97.9,97.51,97.7,97.1,95.32,94.02,90.31,89.7, +91.55,91.21,93.04,92.78,93.06,93.05,91.55,92.68,92.63,93.52,92.9,92.27,92.79,93.39, +93.14,92.73,93.4,93.98,92.11,92.71,92.4,91.73,90.63,91.2,90.64,91.42,90.3,90.75, +91.01,90.54,89.91,89.43,89.66,88.63,88.39,89.4,88.95,89.8,90.25,91.09,90.69,89.36, +89.95,88.26,89.34,88.49,89.14,89.68,89.48,89.12,89.34,89.9,88.52,88.42,88.15,88.46, +88.93,89,89.23,89.28,92.74,92.72,93.2,92.67,92.45,92.66,91.7,91.18,90.64,90.08, +90.35,88.33,89.45,89.05,89.41,89.4,91.34,91.39,93.28,92,90.63,90.29,88.49,88.7, +87.92,87.84,89.42,89.1,86.95,87.91,86.33,85.76,82.01,81.9,82,82.5,81.96,82.97, +82.85,83.05,82.85,83.52,81.79,81.56,81.2,81.51,81.02,80.88,80.69,79.75,79.85,81.13, +81.27,81.25,80.96,81.8,82.54,83.55,81.51,82.3,81.85,82.5,83.72,83.33,86.74,86.44, +85.42,84.89,84.03,85.47,86.25,86.09,83.95,84.74,83.59,82.5,83.42,84.35,82.49,83.63, +83.18,84.92,84.55,84.7,84.3,84.5,82.75,83.95,83.97,81.71,82,80.05,81.9,84.25, +83.82,87.33,88.04,87.36,87.57,87.69,85.26,86.08,86.18,85.77,86.45,88.99,89.9,88.7, +89.98,89,87.55,86.05,86.68,87.51,86.52,87.57,85.89,84.9,85.66,85.12,83.88,85.2, +85.75,85.63,83.36,84.26,82.88,82.79,80.07,78.75,79.01,78.71,80.07,80.47,80.79,81.91, +81.46,78.73,78.43,80.85,81.45,81.55,83.45,82.25,84.9,82.2,82,82.47,82.46,79, +78.45,75.18,75.35,75.7,77.9,77.07,77.73,76.7,77.33,77.95,77.28,77.4,79.07,78.56, +79.95,79.15,79.51,79.33,77.45,75.86,76.5,77.39,77.91,77.1,77.51,77.26,77.09,78.18, +78.2,78.3,80.32,80.11,78.42,78.99,81.05,79.7,80.54,81.3,86.05,87.59,88.58,87.51, +87.68,87,84.19,86,83.59,81.65,80.57,77.5,76.25,77.36,78.5,79.76,80.26,79.79, +78.66,79.13,80.31,81.62,80,80.17,81.44,80.8,79.59,82.32,83.06,83.69,85.21,87.3, +86.92,87.7,85.06,86.2,84.43,84.9,81.61,78.37,79.18,80.01,80.72,79.35,79.15,77.29, +77.59,78.95,81.54,81.68,82.5,80.4,78.94,78.67,76.74,76.56,74.56,72.1,74.6,74.49, +75.55,74.25,72.2,64.9,68.48,63.42,63.92,57.58,55.07,57.05,56.86,56.6,60,59.63, +61.17,58.31,60.36,62.02,63.01,59.75,63.37,63.92,64.8,69.55,71.75,72.32,72.5,71.87, +74.2,75.6,74.5,73.2,72.18,73.73,72.35,75.38,76.62,76.06,77.96,79.42,80.4,81.99, +81,81.27,82.49,79.35,76.5,74.92,71.9,71.77,71.83,71.61,69.17,67.9,65.99,67.88, +68.25,70.4,71.79,71.18,66.4,69.35,69.54,67.05,68.5,72,72.05,70.69,69.01,71, +69.21,69.41,68.76,69.67,71.3,73.5,70.51,68.58,67.6,72,71.9,70.05,68.6,69.7, +68.75,71.58,73.35,75.94,77.14,76.17,75.6,74.65,75.49,76.8,78.3,79.66,80.55,79.31, +78.11,80.45,82.25,81.6,82.08,83.1,84.35,84,83.45,84.45,85.69,85.45,84.5,85.48, +82.19,79.68,79.93,82.45,76.5,76,81.78,83.86,84.3,83.76,83.89,84.71,86.71,86.5, +87.33,87.93,89,88.95,84.81,86.2,85.35,85.6,84.19,89.01,87.74,87.41,97.25,100.84, +99.96,100.95,102.86,104,103.39,102.9,103.56,105.6,106.78,105.5,107.49,106.35,106.79,106.6, +107.18,108.5,105.24,105.09,103.71,106.3,105.67,105.9,103.02,98.12,97.83,97.15,98.3,98.45, +96.38,99.31,101.3,102.89,107.89,108.07,106.57,107.38,104.99,103.91,106.63,106.3,106.8,108, +107.89,105.55,103,108.15,109.28,108.72,107.9,110.5,114.25,119.9,117.4,118.85,118.05,120.31, +122.14,124.49,124.7,124.05,125.6,123.66,121.5,120.96,122.9,123.5,122.4,121.45,122,122.7, +123.89,122.2,121.34,121.1,120.25,123.2,121.5,119.66,120.4,120.14,121.4,116.64,114.13,115.59, +114.43,112.15,114.2,116.33,115.35,114.34,115.44,115,114.5,114.75,114.35,116.7,114.86,114.08, +113.81,113.85,113.61,109.97,109.5,109.89,108.07,108.65,108.62,111.16,110.66,108.57,105.81,105.25, +102.65,101.26,102.9,101.85,102,100.84,99.4,97.25,97.14,98.5,98.02,97.31,96.95,93.77, +92.71,91.72,90,91.3,94.45,94.8,90.5,93.4,96,96.4,93.34,96.47,96.59,98, +100.35,101.49,99.95,100.36,104.13,104.95,106.86,106.99,103,103.96,101.89,104.1,104.59,105.75, +105.01,106.2,105.86,104.95,104.08,104.19,106.25,106.51,108.18,108.8,107.06,105.21,105.85,104.7, +106,104.89,104.51,105.85,105.7,104,104.28,108.53,107.82,108.53,107.25,103.85,101.96,104.72, +106.5,112.1,112.98,114.35,113.5,115.1,113.52,113.04,112.65,112.87,112.6,113.09,114.84,114.27, +113.6,115.75,116.54,117.25,117.36,116.1,117.25,117.5,116.97,113.64,112.89,111.8,112.65,115.27, +117.8,119.6,117.4,118.01,119.04,117.44,115.07,115.8,113.58,112.56,111.81,115.2,116.98,117.7, +115.9,115.86,113.7,115.4,118.51,115.14,116.2,113.74,114.85,112.67,112,114.83,114.47,106.5, +99.7,96.75,96.2,97.43,99.05,96,97.95,98.21,92,90.39,94.66,96.18,95.04,94.41, +99.5,95.4,93.51,89.1,89.08,88.3,92.6,90.1,95.56,94.96,98.39,95.49,99.29,106.47, +107.55,106,104.91,102.3,106.05,99.9,102.59,105.3,104,108.9,107.51,111.5,115,116.78, +115.1,113.75,114.9,112,114.1,116.91,114.19,112.22,110.27,114.05,112,116.61,114.98,114.19, +110.75,110.44,109.06,108.56,111.25,108.31,96.69,92.75,93.81,93.69,93.44,92.56,93.56,94, +93.19,94.62,84.81,85,85.25,84.69,84.81,89,81.56,86,90.12,90.5,87.81,92.44, +91.25,93.87,95,97,93.12,96.75,103.37,98.37,95.62,93.5,99.81,97.87,98.44,99.94, +98.5,98.5,103.25,101.94,98.25,99.37,99.5,97.44,93,99.44,100,102.31,100.31,100.12, +101.94,98.56,98.5,93.31,93.69,92.75,87.56,91.44,92.87,94.75,96.44,95.44,113,111.12, +109.06,103.12,112,114.87,117.94,116,113.19,114.37,110.56,117.81,112.62,115.25,118,119.12, +123,123.87,121.5,124.75,124.94,123.25,125,126.87,127.69,125,124.5,129.5,133.38,131.44, +131.19,133.63,132.02,130.31,132.88,131.5,129,124.81,123.25,121.37,121.44,120.44,122.5,122.37, +122,123.25,120.62,119.75,118.75,118.87,116.31,115.87,116,114.25,110.5,112.25,111.81,110.31, +109.87,112,112.5,114.75,117.25,108.75,103.31,105.5,103.94,104,104.62,102,103.31,105.06, +101.25,105,109.5,109.56,114,113.78,109.75,114.41,111.87,111.81,114.5,116.37,120.37,113.25, +116.81,116,119.31,118.84,119.69,119.75,121,112.37,112.81,108.81,106,107.31,110.94,106.94, +106.5,109.62,107.37,109.25,106.44,106.06,107.87,109,104.19,104.44,104.44,103,109,109.75, +107.87,107.62,108.12,111.37,112,111.5,110.62,110.5,112.5,106.5,104,105,111.5,111.87, +105,110.62,113.75,119.37,122.12,123.12,122.75,125,121.19,122,118.37,122.75,119,122.5, +126.87,120.62,115.25,114.25,113.5,112.75,110,109,107,108.62,107.69,105.25,108,106.25, +103,103.06,108,103.12,100.25,102.75,104.5,108,110.5,108.75,111,112.5,116.75,115.75, +117.12,116.06,115.37,119.12,117.37,118.81,114.12,115.62,117.12,113.5,110,112.25,111.56,113.5, +116.75,119.12,121.5,121.5,119,119.5,115.75,119.62,118.25,119.5,119,118,113.5,114, +116,112.06,116,107.87,108.75,109,109.81,109.75,108.62,108,110.12,109.2,110,109.19, +107,109.25,109.7,109,113.37,118.28,116.62,116,111.87,105.27,103.42,103.06,104.19,105, +104.5,106.06,107.87,103.94,98,93.75,94.62,94.06,95.87,95,97,93.62,93.94,90.25, +91.56,94.37,94.81,96.75,98.25,94.94,93,95.5,93.87,93.94,91,107,107.12,107, +107.87,107,105.06,110,114.25,113.5,116.37,119.19,122,119.87,117.75,121,120.06,123.5, +123,125,122,125.19,127.12,130.13,125.37,130,131.94,133.31,132.38,135,134.75,130.75, +132,128.86,125.87,127.25,124.56,123.19,124,122.94,122.37,122,124.44,121.75,122.94,123.87, +128.5,127.37,123.37,121.12,123.31,119.31,122.19,123.5,123.19,118.5,119.37,122.25,125.69,125.37, +128.38,126.25,123,124.81,123.87,129,128.25,134.63,136.25,136.31,137.25,137.88,137.81,137.38, +134,132.81,131,132.25,131,129.25,124.62,122.56,123.12,122.56,122.94,123.37,124.75,120.75, +120.19,120.69,115.87,115.5,114.31,115.25,117,116.62,120.5,116,112.94,113.75,112,116, +116,236.25,221.19,223.75,230.38,232.88,235.88,238.5,237.5,239.25,246,225.5,221,218.63, +217.25,209.25,212.13,212,212.25,209.19,204.81,205,212,209.88,199.75,194.5,171.88,169.75, +166.75,170.38,177.75,179.38,180,183.44,186.31,187,186.5,183,183.94,177,177.25,178.56, +177.88,172.38,171.31,169.5,165.38,167,168.56,177.63,178.06,181,182,178,182.88,181.5, +182.19,178.88,178.38,171,166.75,167.75,168.38,169.75,173.63,173.75,176.94,177.94,171.63,174.25, +170.5,172.5,172.75,178.5,168.88,162.75,167,166,169.56,175.25,176.75,179.75,183.25,178.69, +178.31,185.63,182,179.75,197,194.5,192.25,184.94,180.63,185.5,185.06,189.25,187.56,190.19, +188.75,189.63,183,184.38,186.75,187.13,189.25,187.94,185,182.25,176.38,171.56,166.06,164.38, +165,162.88,168,165,169.44,168.19,167.19,164.25,163.5,167.44,169.88,165.13,170,166.75, +165.25,166.56,160.13,158.56,159,158,159.38,157.44,157.88,157.13,156,151.38,149.94,149, +147.88,147.38,148.38,148.5,148.75,146.19,144.38,143.06,141.56,141.81,142.69,137.88,139.38,135.94, +136.5,130.5,128.19,130.88,127.31,123.5,120.75,119.25,120.25,124.81,125.37,128.5,131.44,133.63, +133.5,130.56,132.06,127.75,128.19,124.69,126.75,130.5,130,129.13,126.56,122.5,123.5,125.94, +119.37,121.75,120.5,117.94,112.62,122.56,125.25,130.88,128.44,128.56,127.87,128.06,129.94,128.88, +125.12,125.37,126.19,128,128.5,129.88,129.13,129.75,128.75,126.81,132.75,132.5,133.38,127.87, +125.44,125.5,124.25,123.87,127.44,128.13,122,120.19,118.37,117,119.62,119.37,118.5,117.06, +115,113.87,113.69,115.19,116.75,114.81,114.12,113,112.44,112,111.75,108.12,106.12,108.81, +111,110,112.25,116.25,116,117.25,119.25,118.81,118.87,116.06,113.87,115.56,117.19,117.5, +120.06,120.25,121,121.94,123.62,123.5,125,124.62,124.94,125.81,121.87,119.62,119.31,120, +117.12,117.25,117.81,116.62,116.87,115.87,115.56,115.69,115.31,117.37,117.5,114.75,118,111.19, +107.75,107.81,109.75,106.25,104.19,106.37,104.5,104.69,106,104.69,105.81,104.44,103.87,103.25, +104.37,105.06,106,103.5,101.37,102.06,102.87,101.56,100.87,101.25,99.62,100.25,99.12,97.5, +96.12,98.12,98.94,99,102.12,101.94,104.44,105.5,105.25,102.5,102.87,102.62,102.75,102.75, +102,102.37,102.87,102.69,100.87,98,98,99.56,98.31,99.37,100.56,98.75,98.19,97, +96.5,98.12,99.19,99.37,100.12,108.37,105,103.44,102.62,102.12,100.12,100.06,104.19,104.25, +105.25,106.44,105.62,104.62,103.12,102.75,101.69,99.12,98.62,102.56,102.12,100,102,103.75, +100.87,100.37,101.62,106.5,110.37,112.87,112.25,109.25,110.37,110.75,112.56,109.5,109.75,107.37, +103.12,105.56,104.75,103.06,102.12,103.5,101.5,99.12,96.62,99,97.69,99.5,101.06,102.75, +101.94,101.62,98.5,95.81,98.25,99.37,90,98,100.37,105.12,105.19,97.5,95.44,99.87, +101.69,103.31,104.5,104.94,104.62,105.25,106.81,104.81,104.31,104.56,103.5,106,105,102.62, +101.62,101.56,103.25,103.87,99.25,98.75,99.62,99.62,96.25,97.75,98,97,100,102.87, +103.62,103.75,103.56,104.06,101.37,101.12,103.87,103.31,105,106.37,105.75,108,107.94,104, +99.94,103.62,104.37,103.44,103,105.25,107.37,107.87,106.5,106.25,104.75,105.75,106,102.87, +105,107,107.81,105.12,103,103.75,104.5,99.62,97.62,96,95.25,95.75,95.75,96.19, +95.75,94.5,94.81,93.44,91.81,90.25,91.25,90.62,91.87,91.81,87.75,89.87,89.62,89, +89.87,89.25,89,88.12,87.12,86.25,86.87,85.62,82.87,83.37,84.37,87.12,86.5,87.75, +90.12,179.25,173.38,172.5,175.13,173.75,168.75,170,173.88,173.88,173.63,173.5,167.5,167.38, +162.13,165.5,166.13,162.13,161.38,160.5,158.38,150.38,150.75,153.63,142.38,140,137.38,139.75, +137.75,137.5,137.88,136.5,133.38,133,133.13,136.63,132.5,129.25,131.13,133.75,136.75,137.25, +137,140.25,135.88,136.75,132.5,136.88,137.88,139.38,139.5,143.63,142.88,144.88,146,146.13, +144.75,146.63,145.5,144.88,145.13,143.75,143,146.88,146.5,143.88,137.63,141.25,143.63,145.25, +145,146.38,145,145.25,142.75,148.75,146,148.75,153.63,154.88,156.88,157.25,156.38,150.75, +145.75,150.5,151.75,158,168,167,165.25,165.5,164.63,167.02,163.88,163,161.88,159.88, +163.38,161.25,159.13,153.25,151.5,153.63,155.13,155.75,155.75,154.25,154.63,158.13,158.63,151.88, +148.63,152.88,151.63,156.13,157.75,160,155.63,158.5,162,162.63,163,159.38,158.13,158, +157.63,158.5,154.13,152.63,154.13,146.75,145,136.88,134.75,133.25,134.5,134.38,133.75,133.38, +130.25,128.75,127.5,129,126.37,125.62,127.37,126.5,127.37,129.25,127,130.13,129.38,125.62, +127.62,129.5,130,129.88,127.75,126.25,128.38,127.87,126.62,125,125.87,123.75,124.5,124.75, +124.37,126.5,124.12,124.25,123,123.5,124.5,123.62,122.75,122.12,117.25,118,118.12,117.62, +115.5,113.12,114.62,115.25,114.37,115.12,115,111.75,112.5,113,112.62,112.25,110.5,110, +110,110.87,111.25,109.37,112.12,112.37,113.5,112.62,109.62,109.25,108.87,107.25,107.5,107.37, +104.75,103.87,103.62,91.75,90.25,92.5,93.75,94.25,94.12,95.75,90.87,95.31,96,98.87, +99,98.37,97.87,98.5,100,101.5,99,98.87,98.62,99.75,99.62,98.62,100.75,102.12, +101.25,102.5,101.62,103.25,103,103.12,102.62,101.75,101.25,104.87,105.87,105.37,106.75,107.25, +106.87,108.25,108.75,109.25,110.37,111,112.12,110.87,108.62,109,108.62,107.62,106.37,107, +105.87,105.87,107,108.12,107.87,107.87,107.75,108.62,107.75,108.25,106.75,107,107.25,105.37, +105.5,105.25,115.5,114.12,111.5,117.5,116,117.87,119.37,117.75,119.75,117.62,110.37,111.25, +109.75,111.25,110.75,108.75,114.25,114.87,117,121.75,124.62,119.87,116.87,115.87,114.25,117.25, +114.25,117.12,117,119,116.12,118.12,122.62,127.37,128.75,124.87,125.62,124.12,120.25,119.12, +118,117.62,114.25,113.62,115.25,113.5,113.5,112.62,114.75,112.25,109.62,109,108.5,108.62, +106.5,104.75,104.12,107,103,102.25,102,96.25,87.62,87,83.12,86.37,87.25,87.25, +86.75,89.12,88.62,86.87,89.25,90.87,91.37,90.12,92,91.75,91.25,90.87,89.37,91.87, +89,90.25,93.75,94.5,95.37,96.25,96.87,94.75,95.75,95.75,96.12,94.75,96.62,97.12, +97,95.87,95.87,95.25,94.5,93,95.12,95.62,95.5,95.37,97.37,97.37,98.37,97.75, +98.75,100.5,101.5,99.62,96.87,97.25,98.25,96.5,95.87,96.12,98,99,95.37,98.25, +96.37,96.87,94,92.5,93,92.5,90.75,92,94.12,94.5,93.75,94.87,93.5,94.5, +93.87,94.37,92.87,92.75,93.87,94.37,95.75,96.75,94.12,92.25,93.37,94.62,97.5,96.37, +98.87,99.37,100.75,101.12,102.75,103.37,101.62,102.37,101.62,103.87,104.87,106.62,107.62,106.75, +111.37,113.62,112.37,112,110.75,109.25,109.12,109.87,109.62,108.87,108.62,109,107.5,109.62, +108.87,110.62,110.75,109,108.37,107.5,103.62,104.12,101.25,107,107.25,103.87,103.75,101.62, +99.75,100.62,99.5,98.87,96.75,97.62,96,97,96.12,95.37,98.25,98.62,97.5,97.12, +97.75,93.75,92.62,93,93,91.75,90.25,89.12,89.37,89.87,91.37,91.25,93.87,94.25, +93,92.62,95,96.75,96.12,97.25,95.25,93.37,93.12,94.87,94.62,95,94.37,94.25, +93.87,93.62,93.75,93.12,93.75,94.25,92.87,92.12,94.62,96.87,95.25,93.62,93.5,91.62, +89,87.12,88.25,87.87,86.37,87.12,86.75,86,84,83.87,84,83,82.87,82.12, +82.37,83,84.5,85,83.62,83.37,81.62,82.25,83.5,82.62,83.5,81.75,81.5,82, +81.12,80.62,79.75,79.75,80.25,79.87,77.25,75.37,75.25,74,74.87,74.25,74.25,74.25, +75,75.5,75.62,75.62,74.87,75,75,74.25,74.25,74.37,74.62,74.37,73.62,72.12, +71.75,72.5,72.37,72.37,74,74.25,75.37,76.5,77.25,77.5,77.5,76.37,76,76, +76.62,75.5,75.12,74,74.37,73.75,73.5,74.37,73,74.25,73.5,73.5,73.62,70.75, +71.62,70.12,70.5,70.25,69.75,70.62,71.5,70.12,71.25,71.62,71.37,71.37,69.5,70.75, +70.62,70.62,70.75,70,69.75,72.87,73.25,73.12,72.75,73.12,72.87,72.37,72,74, +73,71.87,71.12,73.5,74.25,73.87,74.5,76.12,74.12,74.37,73.87,73,74.62,75, +75.37,74.5,73.25,73.12,72.25,73.12,71.62,71.5,71.12,68.75,69.12,68.37,68.87,69.62, +69.5,68.5,69,69,69.12,69.62,69.5,70.25,70.37,71,69.75,69.75,69.25,67.87, +67.25,67.87,67.5,67.5,67.25,67.87,68.5,69.37,69.37,70,69.37,67.37,67.62,67.75, +68.12,66.25,64.87,64.62,64.37,63.75,64.62,64.12,64.5,63.25,62.38,63.13,63,62.25, +62.88,61.88,62.25,62.5,62.38,62.25,61.38,62.38,55.88,55.63,56.88,56.88,58.25,56.75, +55.88,55.63,56.63,56.75,57,56.25,57,58.75,60.38,61.13,61.5,59.88,60.88,62, +61,61.63,62.38,62.88,63.75,65,63.75,62.63,62,61.63,62.63,62.63,61,62, +63.5,63,63.63,64,63.63,63.13,61.75,62.13,61.38,60.75,61.25,58.5,57.5,57.25, +57.25,58,57,56.5,57.13,57.75,58.38,58,57.5,57.13,58.5,59.25,58.75,58.38, +52.25,53.38,53.38,53,53.88,52.38,52.88,53,52.5,53.13,53.13,53.38,53,54.63, +53.5,52.63,53.63,54,56.38,57.25,58.25,58.63,57.13,57.88,58.25,57.38,57.5,55.88, +56,55.38,54.75,52.25,52.63,52.63,53,53.63,52.88,52.88,52.88,53.5,53.63,52.63, +52.75,54.63,54.5,54,53.25,52.88,53.13,53.63,54.25,52,55.75,56.38,56.5,56.5, +57.75,57.13,56.38,58.25,58.63,55.25,55.25,56,57.13,57.5,58.63,58.75,58.13,58.63, +59.25,58.88,58.5,59.5,59,57.63,56.5,57,58.13,58.38,59.13,58.63,59.25,58.63, +58.38,59.75,57.5,56.88,56.13,57.38,55.25,53.63,53.88,53.75,53.75,53.5,53.75,53.13, +53.88,54.38,55.75,55.13,53.13,52,51.88,52.75,51.88,52.75,51,51.63,52,49.88, +49.13,50.25,49.88,49.75,50.75,50.88,47.75,46,45.75,46,46.25,44.88,44.5,45, +43.63,43.38,44,44.5,42.63,43.13,43.75,44.13,44.25,44,44,43.75,44.25,43.88, +42,41.63,41.75,41.75,41.75,41.88,41.88,42.13,42.25,43.38,43.5,43.63,43.5,43.88, +43.75,44.38,44.38,45.5,45.75,46,45.88,45.75,44.63,44.13,44,44,43.88,44.38, +43.13,43,42.75,43,41,41.63,41.75,42.25,43.25,43.13,43.38,43.75,44.38,43.38, +43.88,44.5,43.88,44,45.63,42.38,42.25,43.38,43.63,42.88,43.63,45.63,47.5,47.38, +47.63,48.13,46.63,46.63,46.63,46.88,48.25,49.25,49.38,49.38,50.38,49.75,48.75,48.63, +49.25,49.25,49.38,49.63,50.38,49.88,52,52.5,52.5,52.88,52.25,52.25,54,53.88, +53.88,52,52.75,53.25,52.75,50.38,49.75,48.38,49.25,49.63,49,47.63,47.88,47.5, +48,48.88,48.88,48.63,48.25,49.38,49.25,49.25,48.63,48.88,49.88,48.38,48.38,47.75, +48.5,49.13,50.63,49.25,49,48.75,49,49.38,51,50.25,52.25,52,52.63,52.63, +51.88,50.88,50,51.75,51.38,50.5,51.13,54.25,53.63,53.75,54.63,54.5,55.13,55, +55.63,54.88,55.88,56.63,56.13,55.25,54.88,55.25,54.25,54.75,54.38,53.75,51.88,51.13, +51.25,50.5,50.5,50.5,50,50.75,51.13,52.25,53.38,52.88,52,51.38,51.13,52.13, +52.63,51.5,50.25,49.63,49,48.88,48.63,46.38,46.88,48.38,49.5,48.25,48.75,47.75, +48.75,47.75,46.5,47,48,48.88,50.13,50.38,50.13,49.75,51.75,52.75,51.25,51.75, +48.88,51.38,53,51.88,56.13,62.88,62.38,61.75,62.63,65.37,65.87,67,67.25,67.87, +67.75,68.25,66,65.37,64.87,63.25,62.25,61.25,63.13,64.25,64.87,64.87,64.12,65, +65.87,67.5,66.25,65.87,68.25,69.12,68.87,66.87,66,67.12,65.75,67.5,69.12,68.5, +68.5,68.37,68.5,70.75,72.87,78,78.75,78.5,78.5,79.37,78.37,79.75,78.87,78.5, +80.12,80.75,81,82.75,82.25,82.5,83.62,83.25,84.37,83.5,83.75,83.12,85.5,88.37, +88,87.5,86.87,86.12,86,86.62,87.5,87.62,86.62,87.25,87.37,86.37,87.12,85.12, +86,85.87,86.62,88,88.62,88.37,88.12,88.37,88,88.5,87.12,88.25,91.62,94.25, +94.87,94.75,95.37,94.37,93.75,92.37,92.75,92.75,92.5,93.75,92.87,95,100.25,99.25, +97.87,97.87,97.62,97.5,97.87,96.75,98.12,96.87,98.25,97.87,98.62,97.25,97.12,97.62, +95.87,95.25,95,94.5,92.62,93.12,94.12,93,92,90.12,90.62,91,90.37,89, +89.75,90.62,90.62,90.75,91.12,90.87,90.5,91.75,91.5,91.62,92.5,90.75,91.62,91.75, +92.37,93.5,93.87,93.12,93.75,93.37,93.87,92.5,90.62,90.75,88.12,88.5,88.12,88.12, +89.25,90.12,90,89.5,88.62,88.5,88.25,87.5,86,85.12,84.87,82.37,83.12,81.75, +82.25,82.87,83.5,83.37,83.25,84.12,85.12,85.25,85.62,86.12,85.87,87.5,87.62,88.75, +89.62,89.12,87.75,87.87,87.37,86.37,86.62,87.37,88.25,87.5,86.87,87.75,88.25,88.25, +89.37,89.87,89.75,89.62,89.62,89.75,90.75,92.12,90.25,89.75,89.25,89.87,91.25,92.25, +91.37,90,91.75,91.87,93.25,93.75,93.12,93.5,95.62,92.87,95.25,96.37,95.5,95.37, +92.37,90.25,90.87,91.25,92.37,94.62,92.25,90.37,90.25,89,90.37,89.37,88.25,88.25, +88.25,85.75,84.87,86.25,85.5,86.87,88,88.62,87.75,86.25,85.12,89,90.25,90, +91.25,92.25,92.5,94.25,97.87,95.12,94.75,95.37,95.5,96.5,97.25,96.25,100,98.87, +99.37,100.12,100.25,99.87,96.62,96.62,97,98.37,98.25,100.25,98.87,98.25,98,98.25, +98.5,98.5,100.25,100.37,99.87,101.62,104.25,101.25,99.87,99.75,97.25,98,98.87,98.25, +99,101.12,102.62,103.62,102.25,104.87,105,105.87,104.62,104.25,104.87,105.37,104.87,103.62, +102.87,104,101.37,99.62,101,99.37,98.25,98.62,98,96.87,95.5,94.5,95.25,95.12, +94.87,94.37,95.62,95.75,95,96.5,98.37,98.5,99,98.62,98.87,99.25,99,100.37, +101,100.37,101.25,101.25,101.62,101.37,100.5,100.5,100.75,100.62,102,100.5,98.25,96.25, +96.62,99.25,99.37,98.25,98.75,99.5,100.5,98.62,98.12,99.12,98.37,97.12,97.62,98.62, +99.37,98.37,99.62,99.12,101,100.87,99.5,100.37,100.62,101.5,102.25,102.37,102,103, +103.25,105,106.37,106.12,104.37,104.12,105.12,105,104.62,104.62,101.5,103.25,103.75,104.12, +102.75,106,105.87,103.37,105.87,103.75,101.87,103.37,103.62,105.87,104,103,104.87,107.37, +108,108.25,108.37,108.5,109.5,109.75,109.87,109.25,106.87,108.5,110.62,111.25,111.25,113, +112.62,113.5,113.12,113.25,112.25,113.87,112.87,113.87,113.5,111.62,111.87,114.12,115.12,127.87, +126.62,128.13,129.13,127,129.13,131.25,132.5,132.88,133.5,130.63,131,128.75,130.88,129.75, +133.63,133.25,135.5,137.88,139.5,137.38,135,134.63,132.75,132.38,129.5,128.5,129.88,128.5, +127.37,126.87,126.75,127,124.5,124.25,122.62,121,119.25,118,119.62,117.62,115.75,109.12, +107.5,106.75,108.12,108.37,106.87,109,110.25,112.12,112.5,112.12,113,113.37,113.62,113.5, +113.87,113.87,113.75,112.75,113.5,111.5,111.25,112.87,114.37,112.87,113.37,112.5,111.5,114.62, +114.75,113.37,113.62,112,112.37,113.5,113.87,112.62,114.12,113.37,114.75,113.62,112.62,113.5, +112,113,110.25,107.5,106.5,107.87,107.87,108.37,107.25,105.5,106.37,106,106.87,108.12, +108.62,106.75,107.75,107.62,105.37,100.75,99.37,99.25,100.25,101,103.5,105.37,109.5,108.25, +107.87,107.37,108.25,109,106.37,104.37,105.37,106.37,105,106.75,107.87,108.37,107.25,105.12, +104.37,105,107.87,107.5,105.87,105.5,102.37,102.5,102.5,101.87,101.75,103.87,103.62,104.37, +100.37,96.87,99,100.5,102.25,101.37,103.75,105,104.37,103.75,102,103.25,103.12,103, +103.87,108.12,109.75,111.62,111.5,112.12,111.37,113.12,114.75,114.75,115.87,117.62,120,119.87, +120.75,122.37,121,120,119.12,117.75,119,118,117.37,117.62,118.5,117.5,117.62,118, +116.75,116.62,116.25,119.12,118,118.75,118.62,120.37,120.87,121.37,120.25,119.87,118.75,120.62, +120.62,120.75,120.37,119.5,120,120.87,119.75,116.25,118.75,118.75,117.75,117,115.37,116.12, +115.37,115.62,114.25,114,112.37,111.25,110.75,110.5,110.5,109.25,109.12,108,109,107.37, +108.75,109.37,108.87,109.37,109.37,109.12,109.87,111.12,110.87,107.12,106.37,105.87,105.5,105.87, +106.12,106.5,106.62,105.87,106.12,106,105.87,104.5,104.12,105,106.5,107.25,108,109, +108.62,107,106.25,106.25,107.75,106.5,107,105.5,105.75,105,104.87,104,103.87,103.75, +104,102.62,103.25,104.87,102.87,103.5,103.75,103.75,103.25,101.12,102.5,102.75,103.12,101, +99.62,98.37,97.75,98.62,97.25,97.25,96.87,95.87,97.5,96.75,96.62,98.62,99.5,98.87, +100.12,98.12,97.87,99.87,99,99.37,100.37,99.75,100,98.87,98,94.12,94.12,94.75, +94.5,95.37,95.12,94.62,94.75,93.62,95,95.12,95.87,97,96.12,96.87,98,98.62, +99.62,99.25,97.12,97.62,97.75,98.87,99.37,100.37,100.12,99.5,98.75,99.12,97.12,97.87, +98,98.25,98.12,97.37,96.75,97.37,96.62,98.5,97.87,100,100.25,99.5,99.87,100.75, +101.87,103,103.5,104.25,104.12,101.75,102.25,103,102,107.62,107.75,108.25,109.25,107.5, +107.5,108.25,106,108.62,109.25,109,111.5,117.5,116.25,116.5,116.12,116,116,116.12, +115.5,115.75,115.37,116.87,116.25,116,116.25,116.75,117.75,117.37,117.12,116.87,116.37,118, +116.12,116,114,113.62,113,115.12,114.75,115.5,116.25,116.12,115.5,117.5,117.12,118.25, +117.37,115.5,113.75,114,114.62,115,113.37,113,112.5,112.75,113.5,114.12,112.75,114.37, +114.75,116,114.75,114.87,114.75,113.87,114.62,112.12,111.62,112,112.25,111.87,111.5,113.87, +114.37,112,110.87,109.12,109.75,109.5,110.37,109.5,109.37,110.37,111,108.87,108.37,109.25, +109.5,109.62,109,110.12,110,109.62,108.25,109.5,109.62,109.75,109.5,109.87,111.12,112, +111.5,111.37,112.75,110.75,109.12,109.62,109.75,109.5,109.37,110.62,111.5,112.37,113.37,114.12, +114.62,114.5,114.5,113.5,113.5,112.37,112.37,113,111.37,110.87,109.25,111.12,111.12,110, +109.75,108,107.75,107.12,108.5,109.12,108.75,109.62,110,110.12,109.62,109.25,110.12,109.5, +112.5,118.12,117,117.87,118.87,118.25,118.62,119.62,119.87,121.5,120.87,120.5,119.87,121.5, +121.62,121.12,123.37,123.37,125.5,125.25,125.87,127,124.75,126,125,126.37,127,127.62, +126.62,127.75,128.38,129.63,130.63,128.75,126.87,126,123.25,124.25,122.37,123.62,124.25,125, +123.87,124.25,123.37,123.12,122.25,121.12,122,121.87,122.25,122.5,121,121.87,123.25,122.5, +123.12,123.37,122.5,123,123.25,122.75,121.25,121,120.5,120.75,120.5,120.37,119.37,121, +122.12,120.87,119.25,118.25,118.5,119.37,118.87,116,118,117,115.62,115.75,115.5,115.5, +117.5,117.12,116.62,119.75,119.87,119.75,119.12,120.25,122.25,122.87,124,122.62,120.75,120.25, +121.62,122.87,123.12,124.37,124.87,122.37,124.37,121.12,119.75,118.62,117.5,118.75,116.12,116, +114,113.87,114.5,114.87,115.37,115.37,113.87,113.25,112.25,112.87,112,113.25,112.75,112.75, +114.25,113.75,114.62,115,113.62,114.37,112.12,111.75,112.87,114,110.25,111.5,112.87,113.37, +112.25,111.62,112.75,110.87,110.75,112.75,114.62,114.62,115.75,115.12,118,119,118.87,121.62, +123.12,123.87,124.25,125.75,125.75,126.25,125.75,123.75,121.12,122.62,122.37,120.12,121.75,124, +124,125.12,126.5,124.75,125.25,125.25,126.75,126.37,127.62,126.87,129.25,126.62,127.37,127, +127,125,125.12,125.75,123,120.25,117.12,117.5,117.12,118.87,118.75,117,116,115.37, +116.62,113.75,114.37,113.25,112.62,113.12,112.5,108,108.25,108.5,109.25,108.75,109.5,110.5, +108.87,110.12,111.62,110.37,108.75,108.75,110.87,110.5,110.5,111.25,113.25,114.62,114.12,113.37, +113.12,114,114.25,113.87,113.75,112.37,112.87,113.12,114,114.12,111.37,116.12,113.62,113.37, +111.62,109.25,109.62,107.5,107.5,107.62,105.12,105.87,108.12,107,110,111.62,113.12,113.75, +114.25,114.87,115.25,114,115.5,115.5,113.75,116.62,117.62,117.25,116.87,116.5,117.25,117, +117.5,115.75,114.5,116.12,115.37,115.25,113.37,112.5,112.75,113.75,112,111.25,111.62,109.12, +107.75,108,108.62,109,109.87,110,112.37,113.75,112.75,111.87,113.25,110.5,111,110.37, +111.75,117.75,119,115.87,116.12,115.25,117.75,114.87,123.37,122.87,121.87,120.75,115.5,117, +116,115.75,119.87,119.5,118.25,118.25,117.25,115.5,118.87,116,115.12,110.12,111,114, +111.5,109.5,107.75,106.5,110.5,111.25,110.75,114.87,117.62,118.5,117.5,117.75,115.62,118.37, +117.75,120,121.62,122.25,119.25,117.75,118.12,119.5,123.75,120.62,121.87,124.5,122.5,120.25, +118,118,112,120.75,120,122.75,115,103.25,135,140.13,145.25,148.75,149.5,147.38, +151.5,152.75,151,156.5,155.25,154.63,150.75,150.5,152.75,156,155.88,154.25,155.75,150.5, +155.38,157.88,156.63,157.5,162,161.13,157.75,157.25,157.75,160.75,161.63,162.5,162.88,168.38, +166.5,166.25,167.88,172,174.63,174.75,174.75,172.63,172.88,174.5,173.25,173.38,170.38,169, +166.75,164.38,163,160.25,159.38,159.25,161,162.38,161.5,161.25,162.13,161.25,160.13,161.38, +162.75,164.63,167,168.13,168,167.5,169.88,167,166.25,166.75,163.88,165.13,164.25,164, +162.5,165.38,166.5,167.88,166.13,164.88,163.25,161.38,160.88,161.38,162,159.63,156.63,157.63, +157.75,159.88,161.25,160,161.38,160.25,157.25,159.63,160,162.63,161,160.63,156.63,157.25, +156.63,156.75,161,160.63,165.13,166.25,165.38,163,163.75,164.88,166.75,166.88,163,160.63, +160.13,158.63,155.25,154.25,151.75,154.25,154.25,157,150,150,150.88,148.13,147.63,145, +144,147.25,146.5,149.38,149.5,148,151.13,150.13,152.38,150.75,154,155.63,152.88,149.75, +148.63,147,146.25,147.13,144.63,144.88,144.25,141.75,142.88,138.88,139.38,140.38,139.88,138.13, +138.5,139.5,139.38,141.75,143,143.38,139.63,139.13,138,138.38,134.5,132.63,134,133.38, +133.75,135.75,136.88,135.13,133,132.25,128.75,128.63,130,129.38,127.25,126.25,127.37,122.75, +122.75,125.25,120,120,118.62,116.5,120.37,122.25,122.87,123.5,123,123.62,122,120, +120.87,120.62,122,122,120.5,123.12,125.12,125.37,126.75,128.13,127.62,126.5,128,128, +126.87,127.75,126.62,127.75,128.63,129.88,127.37,127.12,126,127.12,124.62,123.25,123.5,123, +120.5,122,121.37,119.87,122.75,123.75,123.12,121.5,121.37,123.12,125.87,126.37,123.62,122, +120.87,120.75,122.12,121.37,121.5,120.37,121.37,120.25,121.87,121.12,123,120.87,122,123.62, +122,127.5,128.13,133.5,130.88,133,133,134.5,134.25,135.5,135.75,137.5,139.25,138.63, +136.88,138.38,137.63,138.25,137,137.38,139.25,144.13,143.88,143.75,140.38,139.38,136.13,136, +138.75,140,141.13,141.13,139,138,138,139.25,136.75,135.38,133.13,134.25,134,132.5, +131,130,131,131.13,130.88,131.63,131.38,132.5,132.25,131.25,132.38,134.13,133.13,133.13, +133.63,131.88,131.75,132,133.13,135.75,139.25,143.13,145.75,144.25,144.63,145.25,149,149.5, +148.63,146.5,147,146.75,147.5,146.5,145.13,147.5,145,146.38,146.88,148.5,149.63,148, +149.13,148.38,146.75,149.88,150.75,150,152.75,152.25,152.38,152.88,151.38,147,143.88,143.38, +144.5,146.25,144.13,144.88,145.38,148.13,148.88,150,149.75,149,151.25,154.25,155.63,154.13, +156.88,156.25,159.38,161.38,159.5,157.63,155.25,153,154.88,152.63,154.63,154.75,152.63,152.38, +149.75,150.25,149.25,152,149.5,148.25,149.63,151,149.13,151.5,149.13,147.63,148,148.88, +149,150.13,151.63,152.38,150.88,150.38,150.5,149,152,148.5,146,146.75,148.38,149.75, +151.25,150.88,155.88,158.25,157.5,158.88,159.75,159.13,157.5,158.88,156.25,155.63,155,156.75, +157.25,155.75,155,154.88,154,154.63,151.5,149.5,151,151.75,149.63,150,148,144.25, +149.5,149.38,150.88,156,152.63,149.25,149,148.5,150.38,148.88,155.63,154.38,154.38,152, +155.5,158.25,155.38,153.25,152.75,154,154.25,153.75,152.88,152.5,152.25,150.25,148.63,149, +146.63,144.63,141.75,140.75,141.88,138.63,137.88,139.75,140.25,139,139,139.5,140.25,139, +138.25,138.5,136.75,136.63,135,135.38,134.63,132.5,132.13,132.88,133.38,132.25,130.88,129.88, +131.13,130.5,129.38,128,128.63,130.5,129.13,127.5,127.62,128.5,129.38,128,128,125.62, +124.37,124.25,124.37,124.25,123.5,124.37,124.37,126.62,123.87,123.75,124,126.75,128.13,126.75, +128,127.5,126.75,128.38,127.5,127.12,127.25,127.87,129.38,129.13,128.38,127.25,127.12,126.62, +127.5,128,128.25,128.25,126.87,126.62,128.38,127.5,125.87,125.75,126.37,126.75,126.62,127.12, +127.37,128.38,129.25,129.38,131.25,131.63,132.5,131.38,130.5,129.63,132,130.25,129.13,129.38, +129.88,129.25,128.75,129.38,128.5,125.5,124.25,123.75,123,121.25,123.5,124.5,123.75,124.37, +124.87,123.75,124,123.12,122,120.87,119.37,118.75,119.37,119.87,120.12,121.12,118.62,120.75, +126,127.62,127.37,129.75,128.5,129.75,129.13,128.63,128,129.75,130.38,130.88,131.38,132.63, +133,133,130.75,129,128.5,128,130.25,130.13,127.87,127.12,125.75,124.75,125,125.37, +125.62,126.5,126.25,127.12,128.88,128.63,129,127.75,127.62,127.5,129.63,129.75,129.25,128, +127,125.87,124.62,123.87,127,126.5,127.75,128.13,127,126.62,126.37,125.37,124.5,127.75, +128.75,129.38,130.5,128.38,128.63,128.88,130,131.88,131.5,129.63,130.13,132.88,135,135, +135.88,134,133.13,134.5,133.88,132.88,133.75,133.75,131.88,131.38,132,133.75,131.75,133.5, +137.25,137.13,135.38,136.5,137.63,135.63,136.38,136.63,137,134.63,133.25,133.13,132.5,129.63, +128.25,124.12,123.62,123.87,124.62,124.75,122.75,123.75,120.37,119.75,120.37,119.75,120,121, +123.12,123.5,123.12,123.75,124.25,123.75,122.37,123,123.12,119,118.75,117.75,118.75,119.12, +117.87,117.12,118.5,117.87,120.25,120,121.75,122,123.12,124.75,122.62,122.62,121,121.25, +120,121.5,122.75,123.12,122.75,124,123.25,125.75,125.75,127.5,126.75,125.87,126,124.62, +126.75,124.87,124.12,125,126.75,126.62,125.75,125.12,126,121.87,121.25,122.5,121.87,120.25, +121.62,120.5,121,121.25,121.87,121.25,121.75,122.62,124.25,125.75,124.62,124,123.75,124.25, +126,125.87,126.62,127.62,126.75,126.12,122.5,122.25,122.75,121.62,123.37,122.5,122.5,123.75, +123.62,124.25,125.37,124.75,125.5,124.87,124,125.87,123.25,123,123.12,121.87,121.25,122.25, +121.12,122.75,118.5,121.25,121.75,120.25,114.87,112.87,110.62,108.37,109,108.25,107.12,105.37, +106.12,107,106.75,107.25,108.12,107.25,105.25,104.37,105.25,107.12,107.25,105.75,106.25,107.12, +105.75,105.75,105.12,103.12,104.12,105.5,105.25,105.87,102.12,102.62,101.75,99.12,100.75,104.37, +104.5,104.25,105.75,105.62,105.75,105.37,108.25,107.87,107.75,107.5,106.62,107.25,106.75,107.75, +107.87,108.62,109.37,110.5,111.87,113,112.25,111.25,112.37,112.87,114.25,113.25,112.75,115.62, +116.25,116.5,113.75,113.25,113.25,111.87,110.75,109.87,110.75,111.12,112.25,112.75,111.25,112.5, +108.87,110,109.62,109.75,108.75,111,112,112,113.87,113.75,115.37,113.87,112.25,112.25, +112.75,114,114.75,114,113.75,112,111,110.62,110.25,108,108.5,107.62,109.25,111, +112,111.5,110.25,110,112.87,111.25,109.25,109.12,109.37,109.75,109.62,109.62,110.87,109, +109.87,109,107.75,110.5,108.75,110.75,114.37,113.75,114.12,113.87,114.87,114.62,115.37,116.75, +116.12,117,118.87,120.5,121,120.5,119,121.25,122.25,122.25,123.25,123.5,124.25,123.87, +121.75,122,123.12,124.25,124.62,123.62,122.87,123.62,121.75,121.25,120.87,119.5,120.87,122.12, +124,122.25,119,119.25,117.62,118.62,117.87,118.87,117.37,121.62,119.25,121,120.87,123, +125.25,123.5,123.37,124.75,124.5,127.5,126.87,125.25,123.62,122.25,122.12,122.25,123.87,126.5, +126.75,126.75,128,129.38,128,128.5,128.25,127,129.75,130.5,128.75,131.75,131.75,133.63, +132.63,133,134.25,132.25,132.13,131.13,129.88,128.13,126.87,127.87,128.75,127.87,128.63,126.62, +124.62,123,123.87,123.75,123.12,121.75,122.87,122,121.5,122.25,122.25,122.37,121.87,119.75, +118.62,119.5,117.37,119,117.87,116.25,116.5,119.37,121.25,122.5,121.62,123,121.62,120.5, +118.5,117.75,118.12,118.12,119,119.75,119.5,121.25,120.5,120.75,120.37,122,123.37,125.75, +125.87,124.37,125.5,125.37,120.87,119.87,120.12,122,121.25,120.87,123.25,121.5,119.75,121.62, +119.25,121,120.25,120,118,120.87,123,123.25,123.5,123.12,122,121.12,121.75,121, +118,117.25,114.25,113.75,113.37,113.12,115.75,114,113.5,111.87,111.25,113,114.37,115.62, +114.62,112.5,110.75,111.25,114,114,115.25,116.5,115.5,115.5,116.87,117.5,117.62,115.75, +116.5,115.5,115,117,117.25,116,117.12,114.5,117.25,115,115.12,111.5,112.62,110.12, +109.5,108.75,107,106.62,103.87,103.25,102.62,102,102.37,101.75,104.25,102.87,102.37,102.12, +102.25,102.12,100.12,100.75,99.87,98.87,98.87,100.87,100.5,100.75,100.25,102.25,100.87,103, +102.25,101.87,102.12,101.75,99,100.37,100.87,98.75,97.12,98.62,98.37,98.37,98.87,99, +96.37,96.37,94.5,95.12,97.12,97.37,95.5,96,97,98.87,97.37,97.62,95.12,96, +93.87,94.62,97.87,98.5,99.62,99.25,99.12,98.62,98.12,98,98,96.62,97.62,96, +95.62,93,96.25,96.12,96.62,95.12,96.37,93.62,93.5,95.75,92.5,93.37,90.75,89.37, +91,93.87,92.75,93.62,94.5,95.12,92.75,88.25,88.25,86.5,86.5,82.5,83.37,82.75, +81.25,80.5,83.5,83.75,84,82.12,82.25,85.37,85.37,84.37,85.75,83.37,84.25,84, +85.25,81.87,81.5,79.87,79.62,81.62,82,80,82.75,84.75,84.5,82.12,83,79.5, +80.12,83.5,82.75,83.5,81.12,80.37,79,75.12,74.5,74.12,73.37,74.75,76.25,76.62, +76,76.37,75.5,76.75,74.75,74.12,74.12,73.37,72.5,72.87,71.37,71.87,72.5,72.5, +72.12,71.37,69.75,70.5,69.87,69,69.12,69.12,68.37,69.37,68.25,66,65.75,66, +62.88,62.88,62.25,62.38,63,63.25,63.13,63.88,65.62,66,66.75,65.62,65.5,64.87, +65.5,65.87,66.5,66.62,67.5,67.37,65.87,66.75,66.75,66.87,64.5,66.87,62.5,61.5, +61,60.38,60,60.63,60.63,61.13,61.13,60.25,60.5,61.13,59.88,58.63,58.38,58.5, +59.5,59.75,59.13,59.63,58.75,58.13,58.25,60,60.25,61.5,62,61.75,61.5,62, +62,61.88,62.25,62.63,63,62.5,62.75,62.88,63.63,63.63,63.88,64.37,63.88,64.75, +64.87,65.12,64.75,64.5,64.25,64.12,64.87,65.12,66,65.75,64.37,63.88,63.25,63.75, +64.5,64.62,63.63,62,62.13,62.25,61.75,61.75,61.5,61.5,61,59.75,60.38,59.88, +59,59.75,59.13,59.5,59.13,57.63,57.88,57.38,57.38,58.88,57.88,58.25,59,58.63, +57.5,58.5,59.13,59.88,61,62.13,61.88,61.63,62,60.88,60.38,62.38,62.75,62.25, +62.25,61,61.25,61.88,61.38,61.5,63.25,63.25,62.75,63,62.63,63.63,64.37,62.63, +61.75,62,61.63,62.5,61.5,61,61.88,59.75,58.88,57.38,57.5,56.75,56.75,56.75, +56.75,57,58.25,56.88,57.25,56,56.5,57,56.13,56.88,56.38,56.75,55.75,54.13, +53.63,53.38,54.38,54.63,53.88,53.25,53.5,54.63,54,53,54.13,54.5,54.5,52.63, +52.25,50.5,50.63,50.38,50.38,51,51,51.63,52.75,52.5,52.25,51.63,50.88,51.5, +52.38,53,53,51.5,49,49.5,50.75,50.63,51,51.13,51.38,51.63,51.25,51.25, +52.25,52.5,53.75,55.5,55.88,55.5,55,54.25,55.13,55,54,54.13,53.25,54.88, +53.63,54.63,54.5,54.38,54.88,54,54.13,54.88,55.5,55.88,55.75,54.75,54.13,54, +54,54.63,55.75,56,55.13,55.88,55.25,55.5,55.88,55.88,56.88,57.25,57,56.63, +56.75,58,58.25,57.88,58.75,57.88,57,56.88,58.38,58.25,56.5,56.13,56.38,55.38, +55.38,55.63,55,54.88,55.13,55.5,55.38,56.13,56.63,56.63,56.88,55.88,56.38,56.63, +56.63,57,57,56.88,56.88,57.88,57.88,58.75,59,59.5,59.38,58.13,57.5,57.63, +58.5,58.88,59.88,59.38,59,57.88,57.38,58.25,58.38,58,59.13,59.88,60.25,58.75, +58,57.88,56.13,55.5,55.63,56.38,56.63,56.75,56.38,56.63,56.75,56.75,56,57.88, +57.38,57.88,57.75,58.38,59.13,58.63,59.63,60.38,61.13,60.63,60.38,60.38,60.5,61.63, +60,59.63,59.13,60.13,60.75,61.75,60,60,60.38,61.13,62.13,63,62.38,61.5, +61.75,63.13,63.88,62.25,62.88,63.13,63.75,64.75,64.25,64.62,63.25,64,62.25,62.5, +63,61.88,62,61.88,62.5,63.63,64.25,64.75,64.25,62.13,62,60.5,61.25,62, +62,61.75,61.75,62.63,63,63.5,64.25,64,64.5,64.25,63.38,64.37,64.87,64.62, +65.5,65,65,65.25,65.12,65,66.62,66.87,65.75,66.75,66.5,66.75,67.37,67.62, +69.5,71.5,70.25,69.12,67.87,68.62,68,69,68.5,67.25,67.12,64.62,63.63,65.25, +66.25,64.5,65.75,64.5,63.75,66.12,66.37,67.5,68.37,68,67.87,66.5,68.12,68.75, +69.5,70.37,70.37,72,71.37,72,71.62,71.62,71.25,70.87,67.12,67.25,67.12,66.5, +68.5,67.5,66.62,65.12,65.5,66.62,66.12,66.62,65.87,67.75,68,68.5,68,68.62, +70.37,69.75,70.5,69.25,70.12,70,67.75,68,66.25,65.37,64.62,64.12,63.75,64.62, +66.12,67.5,66.87,68.12,67,66.5,67.25,65.62,66.12,65.87,66.37,65.75,66.12,64.25, +66.5,66.62,67.5,66.12,65.5,65,65.87,66.75,67.12,67.37,67.5,66.87,66,66.37, +68.75,68.87,66.75,66.75,66.75,65.25,65.75,65.62,64.25,64.75,65.12,65.25,65.5,65.12, +65,64.37,64.75,64.87,65.12,66,65.12,65.62,64.25,63.75,65,62.75,61.63,61.5, +61.75,62,61.13,60.63,59.5,58.75,59.75,59.25,59.75,59.38,58.88,57.88,57.88,59.63, +58.88,60.38,58.88,58,58,57.5,56.75,57.13,57,58.13,56.38,56,55.38,54.38, +56.38,55.25,54.75,53.75,52.88,52.75,53.38,53,52.5,53,53.25,52.25,52.13,53.88, +55.13,54.88,55.38,54,54.38,54.88,54.88,54.5,55.38,53.75,53.5,53.88,51.25,51.25, +51.25,51.13,52,53,53.5,54.25,54.63,53.5,53.38,54.88,55.5,54.88,55.75,55.88, +57.5,53,54.75,54.13,56.75,58.25,58.88,59.63,59.13,59.88,60.13,61.38,62.25,61.63, +61,61.13,62,63.25,62.75,63.5,63.38,62,65,65.12,66,66.25,67.25,67, +67.62,68.12,69.37,68.87,66.75,67.25,67.12,68.37,69.62,69.12,69.37,68.62,70.37,70.37, +71,70.12,70.62,71.25,69,69,69.62,69.25,70,70.12,66.87,67,67.5,65.37, +67.37,63.13,63.38,63.5,62.5,64.37,64.25,64.75,64.87,64.87,64,65.12,64.37,64, +65.37,66,65,65.25,65.62,66.37,66.62,67.25,65.75,65.37,65,65.25,65.75,65.75, +64.5,64.62,62,61.63,61.63,61.88,62,62.5,62.5,62.25,62.88,61.75,61.88,61.5, +62.75,63.13,63.25,63.5,62.38,64,62.5,62.25,62.13,62.5,62.75,62.5,61.88,62.88, +63.25,64.12,65.37,65.75,66.5,67.75,66,67.37,68.87,68.62,68.25,68.25,67.62,67.75, +68.25,68.12,68.62,67.87,70,71.25,67.75,67.87,68.5,67.87,66.75,66.25,66.5,67.5, +67.75,67.62,68.25,68.62,70,69.5,69.62,70,70,69.62,69.62,70.5,70.87,71.62, +71.25,71.62,72.25,70.25,70.25,70.37,68.87,69.37,70.75,69.25,68.87,69.62,70,69.75, +69.12,68.5,68.5,69.5,68.87,69.12,69.75,69.5,69.5,69.25,70.5,70,70.12,71.62, +72.25,73.5,73.62,72.12,72.37,72.37,73.37,73.87,73.5,72.75,73.87,74.12,73.5,73, +72.62,72.75,74.25,74.62,75.37,78,77.5,77.37,77.87,77.5,77.87,76,76.25,304, +303.63,307,306.75,306.75,306,309,308.25,307.5,309.5,306.75,305,308,308.38,307.25, +309.75,312,309,311.25,319.75,318,315.63,314.25,310.5,308.88,312,310.25,310,306.75, +308.88,312,312.5,311.63,311.75,312,320,319,318.5,320.75,317.5,319.5,314.13,315.5, +317.75,317.75,320.75,312.25,315,316,316,310.5,310.63,308.75,306.88,307.5,308.5,310, +307.75,309,304.75,303.88,306.13,300.75,301,300,299.13,304,302.25,303.63,306,308, +306.5,308.25,305.5,308.13,306.63,301.75,299.63,298.5,303.5,305.75,308.25,311,308.75,312, +311.25,313,312,308.5,311.25,311.5,306.5,311,310.25,309.63,315.5,312.75,311.5,305.38, +306,304.5,306,305,306.5,303.5,298.5,304,302.5,309.5,295,283.75,284.38,282.88, +270.13,275.38,274.25,274.25,276,278,274.25,276,278,277.88,273.75,273.38,269.5,265.5, +267.88,271.25,269.38,268,264,263.75,261,261,258.5,260,259.75,263.63,263.75,265.88, +262.25,264.13,268.5,269.38,276.13,264.25,273,269.5,272.63,273.75,275,278,277.13,276, +279.75,279,279,286,287,290.5,281.25,283,278.75,279,282,276.63,280.5,277, +277,275,281,280.5,284,284,284.5,286.5,289,289.75,293.5,295,300.88,299.5, +304.5,299.25,300,301,293.5,291.88,293,292.5,295,297.25,297,297.75,296.5,293.38, +293.75,295.25,296.75,291.5,288.63,289,287.5,288.75,289.75,286,288.5,285,293,279.13, +281,278.63,276.25,273.5,273,271,270.25,268.13,269.75,264.5,266,267.5,259.38,258.38, +258.75,260,260.5,258.38,258,256.75,257.25,259.63,261.75,260.88,258.25,262.5,266.38,268, +265.88,269.25,266.25,270,271.13,274.25,267.88,269,268,265.25,266,265.88,260.75,257.13, +258.25,261.13,260.75,261.25,262.5,263.13,266.75,262.13,264.5,266,267.25,266,262.63,265.25, +259.75,260.25,259.63,262.5,260.63,263.25,266,267,266,261.5,262.38,261.75,258,254, +253.5,253,251.25,251.13,243.5,239.5,236.25,239.88,241,240.88,240.63,241.38,238,236.25, +235.5,237.88,238.5,239.63,238.25,239.75,239.5,239.25,240.75,243.88,243.25,240.13,242.25,239, +242.75,244.25,246.13,244.75,240.88,245.25,249,251.5,251.25,253.75,256.63,256,254.75,255.25, +255.25,256,257.25,257.25,258.38,258,259.75,260.13,260.75,258.5,258.63,263.25,265.5,265.5, +266.88,265,264.25,265.88,266,265.38,266.25,267.5,269.25,269,267.5,266,266.63,266.13, +267,268.88,267,266.88,270.75,268.75,273.5,272.75,271,270.25,270.25,267.5,266,264.25, +263.13,263.75,264.75,266.25,264.25,263.25,264.5,262.38,261,260.5,263.13,264.5,263,264, +262.88,267,268.75,268.5,266.25,260.5,260.25,258,257.88,261,258.25,260.13,259.25,252.75, +251,252,253,250,249.63,255.75,257.25,258.88,260.25,260.5,257.25,258.75,258.75,257.75, +256,257.38,258.75,257.88,257.5,255.25,256.5,258,257.25,257.88,257.38,259,262.5,261, +260.38,259.5,258.25,259.5,257,257.63,256.25,259,255.75,259.25,262.75,263.13,262.75,262.75, +262.75,265.38,267.88,268.38,268.5,267.13,268.38,266.63,269.5,267.63,267.25,268,270.13,271.25, +269.13,268.5,268.75,267.75,269.38,266,266.13,268.25,265.63,264,266.5,269,269.75,269.25, +269.75,268.13,267,267.5,271.63,273.88,273.25,273,273,274.88,274,270.13,261.13,259.5, +259.88,259.13,261.5,259.88,261.5,261.63,264,265.25,264.13,267.13,266,262,260.38,259.75, +260,257.5,257.25,258.75,258.5,253.5,251.63,251.25,252.88,252.88,250.5,250.75,246.5,248, +245.5,245.25,249,247.13,247.5,245.38,249.88,252.25,254,255.38,253.25,253.25,252.38,252.75, +255.25,255.25,256.25,260.5,262.88,261.25,260,258.75,259.75,261.25,259.5,258.25,258,264, +270,271.13,272,272.5,272,273.75,278.75,276.63,276.75,275.5,274.5,275.75,278,276.5, +276.63,280.63,279.25,277.5,280.13,282.5,285.5,283.25,283.5,283.5,284,285.25,284,283.25, +284.5,279.63,280.13,280.5,278,278.25,276.5,277,276,275.5,275.5,276.25,275.75,270.13, +270.5,271.5,272.25,274.25,267,269,268,270,270.5,269,271.13,274.25,276.5,275.25, +272.5,268.5,268.25,269.75,271.75,274,273,277.5,275.25,273,270.5,270.5,269,269, +271.25,272,274,274,273,276.5,279.13,280.5,276.5,278.5,277.5,271.63,270.25,270.38, +265.75,265,267.25,268.75,269.88,270,271,271.5,272.75,270.75,273,272,269.5,269.5, +271,271.38,274.13,272.25,269.38,271.5,270,271,267.5,263.5,264.25,262,264.5,261, +260.25,259.5,262.25,267.38,268,271.25,271.75,266.5,266,263.5,259.5,256.5,257.25,263.5, +263.5,263.63,262.5,264.5,272.5,271.75,278,278.25,281.25,279.5,279,280,280.5,281.38, +281.5,283.88,286.75,283.75,284.25,285.5,287.75,284.25,284,284,278.25,278,277.63,279.5, +278,277,280,278.5,276.38,276.88,273.63,272.25,269.75,268.88,272,269.5,273.5,273, +275.25,279.5,280,279.38,278.25,277.5,277.38,278.5,274.5,275.25,274.63,276.75,275.88,271.75, +272.13,273,273,272.25,275.5,273,272.5,271,270.5,272,274.25,276.25,276.63,277.63, +279.75,278,276.5,278,275,276,274.5,276.75,275.5,273.63,274.5,275.25,272,268.75, +270.5,266,269,262.25,259,260.25,257.75,255.5,253.25,253,253.38,253,256,257.5, +254,256.63,253.25,250,251,249.75,253.5,257,253.75,253,252.25,252.25,255.5,257, +256.5,258,250.5,249.63,250,252.5,249,253.38,253.5,256,255.88,259.25,258.63,260, +260.5,261.25,259.13,256.5,255.5,263.5,261.63,267.88,268.25,269,269.75,272,267,261.75, +262,260.25,260.25,259.5,258.5,261.75,262,258.25,258.75,258,258.13,261.88,259.63,261.5, +265.75,261.75,258.75,260,257.5,256.25,259.38,259.25,259.25,255.63,256,260,262.5,260.25, +262,261.25,255.75,253.13,254,252.5,255.25,258,253.5,254,258,263.75,261,259.25, +257.75,256.5,251,249.88,254.25,254.25,250,247.5,252.88,250,242,239.63,241.25,234.25, +235.75,231.25,230.38,228.5,229.38,230,226.5,224.25,223.25,222.5,223.25,223.25,220,216, +217.75,219.5,219.75,219.88,216.75,215.63,214.75,217.5,215.88,215,214.63,220.13,219,220.75, +224.13,226.38,225,224.63,222.25,221.75,221,219.5,220.38,225,222.5,221.38,224.75,219.75, +216.63,216.25,217,215.75,213.5,211.25,212.25,211.13,211,215,211.13,209,215.38,213.25, +212.88,211.5,207.25,209.38,208.75,208.5,210.5,206,205.25,206,201.25,201,195.25,188.75, +183.38,188.25,190.75,196,192,191,188.5,186.5,189.25,186.25,179.75,178.13,179.88,180, +181.25,180,179,183.5,180,182,182.75,181.25,186.25,186.25,181,178.25,182,180.25, +177.5,176.5,178.25,182,182.25,179.75,177.5,182,183.5,180,183,186,184.38,187.75, +189.25,190.25,194.88,192,190.63,190.5,194.25,193,197.5,201,201.88,202.38,204.63,206.75, +208,205.5,204.75,209.5,206.13,204,206.5,206.88,208.5,209,209,209.25,210.5,211.5, +213,206.38,208.38,204.25,203.5,208.25,206.13,208.5,210.25,211.5,212,213.5,218,216.63, +218.5,218,215,212.5,213.38,216.13,218.88,214,212.75,216,219,216.63,217.5,223.5, +223.5,216,214.5,209.75,212.38,209.75,213.75,207.63,209.25,209.88,202.25,202.5,206,206.88, +208,211.88,213.75,209.38,212.5,212.75,209.5,209.5,205,208.13,209.5,201.5,197.88,198, +198,203.75,206.13,206.63,207.5,209.88,210,204.63,209.13,209.5,214.5,214.75,218.75,215.5, +217,213,215.5,219.5,217,219.25,215.38,214.5,220,215.5,212.25,212,207.5,212, +218.25,217.75,217.75,212,220.13,215.5,210.25,201.63,198.63,197.63,196,199.88,191.75,193, +188.25,182.88,187.25,179.75,162.88,162.88,163,163.5,159.63,160,158.13,160.75,163.5,168.25, +169.25,171.25,168.5,163.25,165.75,166.63,167.5,168.88,168,164.25,162.25,165,167.38,165.75, +169.5,169,170,171.63,165.25,167.25,169.5,171.75,172,168.5,164.5,166.25,169.75,168.13, +170.75,177.25,178.25,177,174,170.5,171.5,168.5,169.5,173.88,180.25,182.13,184.75,185, +190,190.5,187.25,184,195.88,189.5,191.5,189.13,193,191.75,180.75,177.25,181.25,182, +187.75,192.5,184.25,180,177.13,177.25,179,178,176.13,172,162,164.13,156.25,157.75, +159.5,160.25,159,160.88,164,165,166.75,169.25,171.5,170.5,166.5,161.88,159.63,152, +156.5,165.13,171.5,173,179,182.25,180,183.5,192,188.75,191.25,192,193.5,190, +192.75,192,199.75,196.75,198.5,200,200,202.25,203,208.5,208.5,214.75,208.75,204.25, +200.75,201.75,201.63,207.5,203,206.25,214.75,221,222.25,219.88,217.75,217,217.75,213.75, +219,215,198.75,197.75,201.75,199,205.75,210,211.5,212.75,212.75,212,216.25,221.5, +215.75,213,213.75,216.5,216,218.75,222.75,227.5,224.75,226.5,230.25,229.25,227.5,220.38, +220.5,219,212.5,214.5,210.63,217,218.75,216.25,216.13,217.5,218.25,218.25,220,222.38, +223,221.5,224,230.5,226,228.13,224.25,226.25,229.38,230,227.25,224.5,225.5,221.63, +223.63,227.25,230.5,231.63,235,234.25,234.25,230.5,229.5,230.25,233,230.75,233.5,240.13, +239.25,234,229.75,235.75,239.75,244,250,247.5,243.5,243,246.25,245.75,247.5,249.25, +248.75,250,249.5,246.5,240.5,239.75,244.25,241.75,236.75,236,237.88,237,237.75,235.75, +236.5,237.5,235.5,231.75,233.5,226.5,229.25,228.25,228,233.13,236.25,237.25,236.75,237, +241.25,245.25,246.25,243.25,244.38,247,246.5,248,249.75,245,246,250.75,243.75,239.13, +237,240,229,227.75,228,227.25,230.75,239.25,242.75,246.75,249.25,255,248.5,237.5, +240.5,243,250.75,249.5,240,246,252,250.63,251.5,263,265,260.75,253.25,255.25, +258.5,265,266,269.25,263.5,266,272.5,276.75,272,276,284.5,280,287,289.75, +284.25,278.38,282.25,276.75,276,276.75,280.25,281.25,280.25,278.5,285,285.5,289,287.5, +286,280,291.5,287.5,283.25,281.88,279.25,282,281,274,261.75,261.75,259.5,251.5, +248.5,255.5,257.75,258,260,260.5,259.5,251.5,260,268.75,270.75,259.5,272,298, +292.25,290.5,286,293.25,296.13,298.25,297.75,296.88,301,303.25,304.25,304,304.5,298.25, +299.25,297.75,297.75,299.75,300.5,300.5,302.5,299.75,301.5,301.25,303.5,304,308,311, +311.5,313,311.5,314.5,320.75,318,318.75,319,311.75,312.75,315,315,314.25,310, +319,310,313.75,320,314,305.5,300.25,300,298.5,305.25,317,319.75,313.25,312.75, +308.75,316.75,315.5,321.5,318,314,318.25,321,329.5,329.25,323,324.25,322,315, +317,309.75,310,314.75,319,323.5,408,400.5,389.75,390,386.75,389,397,400, +400,396.13,405.63,410.5,414,422,417,421.75,424,415.38,415.38,408,405.25,409.75, +407.5,415.25,425.5,429,432,425,425.25,429.75,432.25,430.25,434.25,429.5,423.5,422.88, +423,424.25,428,431.5,438.75,434.5,437.5,432.5,428,425.5,430.5,437.75,437.88,443.5, +444,448.75,444.75,442.5,439.5,440.5,441,437.25,438.75,442,427,431.5,423,431, +433.5,444,443.75,447,441.25,441.5,445.63,451,448.5,446,437.5,438.5,437.75,430, +429.75,429,435.5,439,441.5,437.75,436,444.25,436,439,428.88,424,422.5,423.25, +420,415.25,411.5,417.5,418.75,418.75,411.75,409.25,409,402,399,391.75,390.5,385.5, +389.5,390,394.5,398.13,395.5,396.25,399,404.25,403,396.75,397,398,400.5,398, +391,387,382.25,385.5,389,394,387.25,385,384,385,384.25,388,376.75,372.25, +371.5,376.5,381,387.88,391,389.5,385.5,379.75,378.75,377.5,383.5,389.25,390.5,387, +378.5,379,370.25,364.5,379,384.5,390.75,394,400.25,401.5,395,403.25,406.75,405.25, +406.5,404.25,407,398.13,398.25,398.25,399.5,400.5,397,396.25,397.75,399.5,398,395, +396.5,398.75,399.5,401.25,404.75,406.25,408.5,408,408.75,404.25,406,407.25,413,412.75, +410.5,411.5,413.25,416,420.25,424.75,425.5,423.5,423.5,418.25,417.75,416,415.25,409, +410,400.75,398,397,394.5,398,398.75,396.5,390.75,390,388.5,388,393.25,391.75, +395.75,397,399,404,403.75,400,395.13,392,391.5,390.63,392.25,392.25,395,395.75, +397.5,397,396.5,398.75,397.5,399.75,392.75,387.75,391,392.75,395.25,393,394.5,398.5, +399,397.75,395.5,404,404,403,402,401,396.25,394.5,389.5,383.75,386.5,382, +383.5,383.75,379.25,386.25,388.75,384.5,379,380,382.5,386,381,380,381.5,385, +385,387.75,391,395.75,395,395,394.25,397.5,390.5,390.5,389.25,391,392,389, +385.5,382.25,380,384.88,385,382.75,382.25,377.75,376.5,376.88,377,373,373,371.5, +373.25,378.25,383,382,383.75,380,377.5,376.25,372.5,368.5,367,372.5,364.75,369, +368.5,368.75,367.75,369.38,369.75,369,373.75,372,373.75,372.25,368.5,369.75,373.25,373.5, +369,368,368.25,368.25,368.75,366,360.5,368.25,363.5,353.25,349.5,349.5,350,341, +342.25,341,338,338.75,341,341,340,333,336.5,335,337,339.25,333.5,336, +341.25,346,341.5,339,339,327.13,320,324.25,324.5,317.5,313.5,317,313.25,321, +309.5,309.75,305.5,302.25,298.75,291.75,290.5,291.75,293.5,294.75,301,302,294.25,294.25, +292.25,297.25,299,299.25,300,300.25,303,295.5,292.38,300.5,298.25,297,299,302, +301.63,304,305,309,309,308.75,307.75,309.25,315.13,305.75,304.75,308.5,309,307.75, +306.5,306,303.75,302.75,304.25,303.88,304.75,305,307.75,305.5,304,300.75,301,303, +299.75,300,305.25,306.38,310.5,310,307.75,299.5,301.5,304,310.13,315.5,314,314.75, +318.25,314.75,309,307,310.25,315.75,314,295,296.75,291.25,286,284,285.5,287, +287,290,293.75,291.25,296.75,299.5,292.75,296.75,298,299.5,301.75,299,296.5,294.5, +298,300,302,315,316,311.25,311.5,316.5,319,317.75,317,314,311.75,311.25, +313,315.25,314.75,314,315.5,321,323.5,321.5,318.63,324.5,321.5,318.25,312.5,317.75, +324.25,321.25,326.5,328.75,327,334,337.25,337,341,344,348,342,338,334, +335.5,340.25,342.5,342.25,344.75,347,351.75,353,353.5,353.25,357.75,362,361.25,358, +356,355,352,353,356,354,352,356.25,358.75,358,357,356.75,361,361.13, +360.75,358,356,357.5,357,356.5,358,356,355,355.75,358.5,360.63,361,363.5, +362.5,363.5,354,347.75,348.75,349,348.5,345.5,340.75,337.25,338,339,336.5,334, +338.25,335.25,330.5,328.25,329.25,336.5,341.63,339.5,338.75,337.25,338.5,340.75,336.5,330.5, +328.63,327.75,327.25,325.5,317.5,322.5,326,321.75,316.5,315.5,314.75,312.75,311.75,310, +314.5,315.63,315.75,312.5,314.5,316.25,318,316.25,313,317.75,319.5,320.25,318.5,315, +312.5,316,317.25,315.5,313,313,311,310.75,317,317.5,317.25,316.25,316,311.75, +311.5,314,308,307.25,308.5,299,300,299,296.5,291,290.5,292.88,293.25,293.13, +297.13,297.25,299,297.5,294,292.63,296.25,296.13,299.75,294,298.5,296.5,291,289.75, +295,288,288.88,291.13,284.5,290.75,293,291.5,292,290.25,296.13,298.25,305.75,307.13, +306.75,299.25,297,291.75,291.75,290,288.5,288.5,281,273.25,275.5,280.25,276.5,271, +266.38,266,268.75,268.25,273,275,272,269.75,264,263.88,266.25,271.25,265.25,263.75, +264,262.75,249.25,244.75,239.75,239.75,235.25,229.88,223,230.63,238.25,240.5,245.5,248.5, +249.75,250.25,249.25,252.25,253.5,252.5,252.75,253.25,253.75,257,254,257.75,258,259.5, +254,252,251.25,247.75,250.25,254.25,252.5,242.5,244.5,250.75,254,250,257.5,257.5, +258,255,257.13,268.5,270.25,272,265.75,271,259,259,259.25,265.5,268.25,266.25, +270,271.25,283,283,287,278,267,259,242,241,248,245.5,250.5,258.5, +270,270.75,268.5,275,282.5,285.5,290.5,289.75,287.5,283,283,296.75,298,300.25, +290.25,301.5,309,309.63,313,321,324.5,322.5,320.75,323.25,324.75,327,331.5,325.75, +324,320,320.5,326.5,332,337.75,338.5,336.75,333.25,333,328,322,319.75,322.38, +322.25,322.5,320,324.25,328.75,328.5,326.5,316.75,325.25,329.25,329.75,333.25,335.5,340.25, +344.25,345,344.5,349.5,352,351.25,349.75,349.25,349,352,355,346,349.75,344.75, +338.75,343.25,343.25,343,335.19,338.5,341,345.25,348.5,356,356,355,356.5,350, +369.75,381.5,373.75,374.13,367.75,369,369.5,368.75,368.5,368.25,364.75,364.5,359.5,358.25, +361,355,351.5,360.5,366.5,360.25,351.5,353.25,358,359.5,355.5,355.5,356,355.5, +357,357,355.13,356,360,357,350,346.25,345.75,351,354.75,359,363.25,362.5, +363,364.5,367,367.75,366.75,365,360.5,360.5,359.5,359.5,360.5,359.5,356.25,361.5, +363.5,364,356.5,355.5,357,353,351,351.75,354,353,347.25,346.5,347,341.5, +346,348.5,344.75,344.5,343.5,345.25,346.25,346.5,347.75,357,357.25,358.5,351,348.5, +347,346.75,344,345.5,343.5,348.5,338.5,335.25,338,340.25,340.75,343.5,345,348, +342.75,340,341,350.25,349,346.88,342,341.25,339.5,338.75,335,330.5,329.25,333.5, +333.75,336,334.5,326.75,329.5,324.5,315.5,313,313.13,316.5,317,320.25,318.25,323, +327.5,328.5,323.5,321.5,331.5,327,333.5,336,348,351.25,348,337.5,337.75,331.5, +329.75,320.5,325.5,315.5,312.25,314,314.25,314.25,313.5,311.5,308,309.5,310.25,312.25, +315,318,319,318,319.5,319,321.75,322.25,327,327,322.75,322.5,319.5,324.25, +330.5,330,334,331.5,326.5,327,329.75,329,331.5,327.5,326.5,325.5,328,327.25, +324.25,317.75,315.5,311.25,312.5,308,308.25,306.75,308.75,310.5,309.25,312.25,313.75,312, +306.5,307.25,310.75,311,313,314,311.25,309.5,308,306.5,305.5,305.5,303.5,299.88, +301.75,295.75,294.75,299.63,303,303.5,299.75,301,301,297.75,296,293.38,296,298.5, +296.25,296.75,295.5,295.5,300,300,308.75,310.25,305.5,303,298,297.25,296.75,296.25, +294.88,296.25,296.5,296.25,299.75,299.75,299.75,300.5,303,303,300,307.5,312.75,308.75, +308.5,300,305.75,310,306,303.5,302.5,312,313.75,315,313.5,319,319.75,321, +317.75,322,326,319.5,315.75,316.5,321,328,327,326,328.5,330,329,333.75, +334.5,329.75,327,327.75,326,325,322.5,327,325,324,320,315.5,316.75,310, +315,309,307,309.5,313.5,316.75,318,324,327,327,319,315,319.75,325, +329.5,330.75,330.25,331,324.5,327,335,332.25,335.75,337,337,331,335.75,336.75, +336,337.5,337,337,338.5,340.5,339.75,339,336.5,335,338,338,340,338.25, +343.5,344.5,345,340.5,339,343.25,338.75,335,336,338,335.5,336,337.88,338.75, +331.5,332,335.5,343.75,342,345,358,355,357,354.75,358,363,365,358, +352,351.5,353.75,360.5,354.5,348.25,358.25,358.5,346.75,346.5,355.75,360,370,370.75, +370,368,365,369.75,375,357,345.75,335.5,332.5,329.5,326.5,329,330,324.88, +325,331.25,334.5,335.5,335,338.88,341.25,343.5,343.88,343,344,348,343,338.75, +334.25,329.5,328,326.5,327.5,636,636.5,640,643,645,648.25,649,641,642, +630,637.5,639,635,631,612.5,600.5,598,594,587.5,585.5,580,586.75,581.5, +590.75,589.13,573,590.5,595.5,593,579.5,585,587.5,569.75,562,577,580,590, +594,587.5,589.75,599,595,585.13,577,586,585,571,571,579,592.5,587, +592.5,596,599.5,594.5,609.5,614.5,618.5,617,614,623,607,621,621.5,616, +616,623,616,609,604,598.5,597.5,593,588.75,606,613.5,627,624.5,625, +616.5,613.5,622.25,625,617.5,618,637.25,648,643.5,641,645.5,644.5,640,632.75, +629,630,616,612 +}; + + + + + + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c new file mode 100644 index 000000000..67b7a40b8 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c @@ -0,0 +1,723 @@ +double gDataHigh[10000] = { +111.68,110.5,110.11,111.1,112.67,111.42,112.85,113.15,113.95,113.5,114.49,114.6,114.17,113.89, +114.18,114.05,112.73,114.72,115.75,117.95,118.82,118.38,117,116.43,115.86,116.48,111.88,111.47, +110.04,109.2,109.65,109.6,109.15,109.35,109.66,108.39,107.08,105.8,106.58,106.92,105.47,106.06, +105.77,106.44,107,107.02,106.66,105.65,105.19,104.24,103.26,103.18,104,103.21,103.17,105.51, +106.55,106.59,107.24,107.67,107.1,106.63,105.43,105.98,107,107.25,108,108.05,106.23,105.89, +105.8,106.25,105.99,105.11,104.75,103.39,103.17,103.03,103,103.14,103.17,103,101.17,101.5, +101.7,99.9,95.73,95.15,94.87,95.91,97.66,96.3,95.75,95.82,96.7,96.8,96.94,96.75, +96.45,96.23,95.5,94.75,95.11,95.02,95.03,95.25,95.22,95.44,95.81,94.53,94.32,94.45, +93.97,94.03,94.47,94.17,94,94.82,94.85,93.89,92.15,92.37,93.05,94.09,96.01,97.86, +98.44,99.5,99.37,99.46,99.25,99.52,99.43,98.74,99.2,99.7,99.74,100.36,100.4,100.44, +99.73,99.18,99.48,99.45,98.66,97.83,97.92,97.58,97.38,97.23,96.85,99.95,100.9,100.84, +99.69,99.9,99.05,100.33,99.5,97.95,98.79,98.4,97.88,97.4,97.23,95.81,95.98,96.5, +96.5,96.39,96.16,95.8,95.72,95.33,94.85,94.35,94.39,94.43,94.87,94.64,93.95,91.91, +92.48,91.66,91.57,93.24,93.75,93.74,93.43,93.8,94.05,93.6,93.28,93.29,92.43,92.35, +93.19,92.92,93.4,92.74,92.34,91.95,92.68,92.68,92,91.89,91.93,91.99,91.95,92, +90.7,90.98,92.04,87.94,87.6,86.21,84.9,84.69,84.63,84.08,83.78,83.21,83.25,82.26, +82.47,82.79,82.35,82.67,82.66,82.28,82.12,83.25,83.79,82.09,83.21,83.59,83,82.7, +82.5,81.2,80.86,80.38,80.69,81.54,81.57,81.5,81.68,81.48,80.47,80,79.5,79.47, +79.55,79.88,79.97,79.56,79.28,77.14,77.49,75.78,76.08,76.28,76.26,76.2,76.77,76.73, +76.93,77.38,77.5,77.3,77.29,76.3,76.41,76.15,75.5,75.88,77.06,74.42,73.94,74.3, +75.28,76.3,76.65,76.83,78.09,78.53,78.39,78.27,77.93,77.8,76.6,77.6,77.52,77.84, +78.37,78.56,78.3,78.3,78.53,78.78,77.85,77.93,78.09,78.1,79.58,80.74,79.9,80.04, +80.56,80.87,80.83,80.96,80.86,80.18,80.04,81.3,80.34,81,81.35,82.21,83.25,83.15, +83.69,83.09,83.33,83.29,83.22,83.34,83.09,83.29,82.74,83.31,83.62,84.4,83.48,82.9, +82.41,82.5,82.85,84,83.53,82.92,82.6,81.37,82.06,82.74,83.8,84.32,84.45,83.78, +83.59,83.6,83.7,83.55,83.39,83.26,83.72,84.27,84.68,84.99,83.75,83.41,83.72,83.76, +82.99,82.4,82.25,81.98,81.6,80.79,80.64,80.83,80.21,80.81,80.55,80.89,80.65,81.34, +81.65,80.75,81.03,80.91,81.5,81.45,81.91,81.46,80.8,80.9,80.19,79.95,80.77,81.59, +82.24,82,81.81,81.77,81.65,81.62,82.15,81.92,83.05,84.39,84.7,83.16,83.45,83.96, +84.81,84.12,84.25,85.03,82.9,82.5,82.55,82.49,83.06,83.57,84.5,84.2,83.23,84, +83.1,83.6,84,83.63,83.95,84.9,87.35,87.1,88.91,89.92,89.84,88.65,89.15,89.74, +89.64,89.94,89.43,89.32,89.39,88.08,87.87,88,86.98,86.58,85.9,85,84.84,84.3, +83.33,83.9,83.85,83.3,83.03,81.89,82.15,82.3,82.43,82.93,83.87,83.95,83.61,84, +84.19,84.2,84.6,82.99,82.71,83.2,82.93,83.52,82.1,81.12,80.27,80.68,81.47,80.6, +80.5,80.55,79.73,78.6,78.41,78.11,78.5,78.46,79.65,79.98,80.5,80.65,81.4,81.49, +82.11,81.49,81.52,81.13,81.19,80.01,80.32,80.79,81,81.75,81.02,81.45,82.4,83.14, +83.35,83.3,82,81.94,82.43,82.94,82.58,82.75,84.01,83.95,83.89,83.74,83.89,84.2, +83.86,83.85,83.95,83.97,84.13,84.35,84.52,84.63,84.95,84.96,85.11,83.94,82.75,82.67, +81.75,80.49,79.52,79.52,77.53,76.15,74.97,75.33,75.49,75.68,75.3,74.77,75.4,76.97, +77.49,77,76.98,77.73,77.25,76.5,75.43,75.93,75.05,75.47,75.4,76.09,75.9,77.1, +77.39,77.5,77.41,77.24,77.41,76.03,76.51,76.95,77.28,77.64,76.82,74.43,74.49,73.86, +73.8,73.69,74.76,75.46,75.92,78.11,77.2,76.96,77.29,77.08,77.11,77.18,76.98,75.72, +74.7,74.1,75.87,77.2,77.75,79.66,85.41,85.97,86.24,87.56,88.46,89.2,89.38,90.33, +90.62,91.76,91.41,90.88,91.07,91.63,91.55,91.17,90.34,90.28,89.9,90.68,91.4,92.27, +92.04,92.41,92.8,93,92.56,92.51,93.18,93.21,93.73,93.43,92.76,92.8,93.09,92.44, +93.5,94.25,94.76,94.97,94.67,94.02,93.97,93.1,94.83,94.64,94.9,94.74,93.94,94.35, +94,93.95,93.59,92.22,92.87,92.59,92.85,93.3,93.84,95.15,95.34,94.25,96.2,95.28, +95.79,96.09,96.8,96.98,97.83,98.42,99.1,98.91,99,98.47,98.55,97.97,98,97.98, +97.15,97.57,98,98.15,97.7,97.7,97.2,97.99,97.6,97.35,98.25,97.9,97.63,96.78, +96.07,95.65,96.38,95.38,95.79,95.37,95.4,95.16,95.7,96.63,95.5,96,95.5,95.22, +94.3,93.95,93.7,93.52,92.7,91.9,91.22,90.6,89.9,90.24,90.27,89.57,88.9,88.45, +88.76,89.19,89.73,86.15,85.25,84.98,86.48,86.2,87.2,87.91,88.1,88.1,88.03,88.1, +86.98,85.98,84.98,84.65,84.44,84.74,84.27,85.44,86.11,86.43,86.5,86.96,86.5,86.88, +87.28,87,86.79,86.51,85.44,84.69,84.78,85.09,84.69,84.99,84.95,85.04,85.27,85.15, +85.45,85.25,85.35,85.13,84.54,84.56,83.94,83.05,83.98,84.99,83.96,84.76,86.42,86.65, +86.8,87.39,87.4,87.22,86.28,86.3,85.58,86.06,86.4,87.11,86.49,85.85,86.48,84.63, +85.24,86.09,85.25,84.5,85.01,85.94,86.73,87.55,88.44,88.5,88.49,89.9,90.23,90.92, +90.84,90.24,90.43,90.8,90.56,90.93,91.21,90.58,90.75,90.55,90.5,88.99,88.49,88.1, +88.64,88.48,88.85,89.08,88.85,88.92,87.84,88.18,87.95,88.88,86.49,86.03,87.35,87.41, +87.25,88.15,88.1,89.4,89.1,89.75,89.74,88.52,89.2,90.26,90.98,91.99,91.56,91.61, +91.51,91.42,92.48,92.3,92.35,94.09,93.86,94.04,94.36,94.39,93.58,93.79,94.37,94.55, +92.68,92.24,92.67,93.61,93.25,92.63,92.49,92.16,91.48,92.97,93.18,93.79,92.7,92.69, +93.38,92.98,94.74,95.28,96.88,96.98,96.92,96.89,97.6,97.25,97.38,97.26,97.09,97.46, +97.51,98.6,99.23,99.77,100,100.09,100.3,100.31,99.97,99.44,99.24,100.09,100.43,100, +99.94,99.33,98.6,99.42,99.67,99.85,98.21,98.16,98.04,97.44,95.35,95.65,90.46,91.51, +92.14,92.35,93.21,93.38,93.19,93.09,93.05,92.85,93.5,93.73,93,92.8,93.44,93.5, +93.25,93.38,93.87,94.12,93.97,93.16,92.97,92.74,92.16,91.47,91.3,91.44,91.44,91.48, +91.36,90.68,90.09,89.85,89.74,88.85,89.79,89.83,90.18,90.05,91.42,91.48,91.16,90.03, +90.47,89.6,89.59,88.88,89.8,90.84,90.71,90.17,89.94,89.9,89.1,88.64,88.4,89.01, +89.34,89.4,89.68,89.7,94.54,92.95,93.54,93.18,93.6,92.87,91.7,91.76,91.95,90.45, +90.6,89.25,90.18,90.14,90.97,91.82,92.09,92.24,93.47,92.43,91.94,90.41,89.96,89.01, +88.42,89,89.97,89.66,88.26,88.29,87.3,85.96,82.11,82.34,82.53,82.54,83.03,84.72, +83.85,83.31,83.81,83.68,81.98,81.75,82.19,81.54,81.5,81.27,80.82,80.68,81.33,81.36, +81.27,82.54,82.45,82.88,83.7,83.74,82.99,82.77,83.26,83.43,84.02,83.94,87.03,87, +86.58,85.28,85.22,86.35,86.75,86.45,84.69,84.89,83.66,84.2,84.65,84.38,84.16,84.18, +84.79,85.24,85.29,84.99,84.95,84.55,84.29,84.98,84.15,82.92,82,83.23,84.25,84.96, +85.24,89.08,88.68,88.59,88.7,87.9,85.95,86.8,86.18,87.24,88.47,89.89,89.96,90.4, +90.1,89.26,87.7,86.78,87.81,88.34,88,87.57,86.23,85.67,86.49,85.5,85.28,85.7, +85.97,86.06,84.51,84.4,84.4,82.85,80.07,81.29,79.25,80.74,80.7,82.9,82.55,83.48, +81.97,79.56,79.61,81.99,82.33,83.25,84,83.35,84.9,82.49,82.5,83.5,82.67,79.48, +78.68,75.63,76.33,77.45,77.99,77.78,77.73,77.75,79,78.47,78.59,79.05,79.37,79.99, +80,80.05,79.7,79.5,77.45,76.35,78.09,78.97,78.02,78.15,78.2,78.9,78.18,78.87, +78.34,81.3,80.7,80.47,79.5,81.5,81.36,80.77,81.85,83.74,87.71,88.65,88.59,88.95, +88.04,87.02,85.69,86.18,84.8,81.65,80.57,78.46,77.43,79.18,80.7,81,81.5,80, +80.34,79.69,81.77,81.79,80,81.69,82.48,81,81.33,82.75,84.98,84.86,87.03,89.46, +88.05,88.11,86.15,86.25,85.17,84.92,81.71,79.45,80.99,80.4,80.99,80.33,79.9,78.36, +79.29,80,81.88,82.01,83.81,80.5,79.79,79.4,77.05,77.5,74.62,75.55,74.97,75.68, +75.9,74.25,73,67,68.48,63.8,63.92,58.48,56.7,58.09,58.5,59.51,61.16,62, +61.98,59.89,63.49,64.88,63.77,63.3,63.75,65.4,66.48,70.9,73.45,72.72,72.88,74.05, +77.5,75.6,74.98,73.99,72.85,73.99,75,76.35,77.35,77.01,80.44,80.89,81.48,82.45, +82.33,82,82.85,79.98,76.71,75.02,73.8,72.64,74.3,72.05,69.9,69.42,68.35,68.23, +70.7,71.6,72.7,71.4,69.47,70,70,70,72.19,72.7,74.2,71.6,71.39,71, +71.74,69.75,71.25,72.25,73.48,73.9,70.71,69.4,72.41,73.62,72.15,70.59,71.45,71.49, +70.99,74.09,75.2,76.9,77.75,76.77,77.4,75.95,78.25,78.8,78.85,80.95,80.71,79.65, +80.91,82.05,82.25,82,83.11,83.75,85.05,84.39,85,85.46,86.4,86,86.49,85.48, +82.29,80.5,83,82.8,77.5,81.87,83.5,84.8,84.65,85.23,85.1,86.96,86.92,88.25, +89.08,88.95,90.03,89.1,87.2,86.85,86.6,87.96,88.51,89.95,88.52,88.59,101.25,101.14, +101.5,102.01,104,105.14,103.79,105.7,106.66,106.7,106.78,106.9,108.05,108.64,107.45,107.95, +108.65,108.85,105.97,107.34,107.5,107.09,106.5,106.53,103.1,99.6,100.31,99.19,99.25,99.2, +99.7,100,101.8,104.8,109.15,108.48,107.89,107.69,105.72,107,107.82,108.5,108,109.3, +107.98,105.75,108.56,110.21,110.69,109.73,111.25,114.26,114.9,120.55,118.75,119.7,120.09,122.18, +124,126.39,125.2,126.19,125.6,124.22,121.5,123.24,123.88,123.93,123.7,122.48,123.5,124, +124.7,122.97,122.14,121.48,122.3,123.21,122.74,121,121,121.7,121.98,116.72,114.85,115.94, +114.55,114.38,116.3,116.4,115.37,115.25,116.8,115.8,115,116.33,116.85,117,114.9,114.9, +115.56,115.2,114.8,110.59,110.3,110.17,111.12,109.75,110.7,112.1,110.85,108.75,106.69,105.78, +102.74,103.75,106.7,103,102.76,101,99.4,97.3,98.5,99,98.45,98.88,97.62,93.9, +93.48,92.71,91.5,94.45,96,95.54,93.5,95.75,96.85,96.75,95.86,97.4,98.15,100.68, +102.83,103.13,101.36,103.4,105.9,107.17,108.2,107.8,104.7,104.04,104.97,105,105.49,106.02, +106.59,106.85,106.64,104.95,104.54,106.1,107.37,107.37,110.09,109.47,108.5,107,106.25,105.95, +106,105.7,106.15,106.95,105.7,106,107.6,108.58,109.38,109.3,107.8,104.13,105.4,106.95, +110.9,113.26,114.19,115.4,116.65,116.95,114.18,114.05,114.9,114.43,114.7,114.99,117.25,115.44, +115.45,116.08,118.47,117.8,118.14,117.5,118.25,119,117.6,114.75,113.6,113.86,114.1,117.59, +119.9,119.6,118.95,119.7,119.9,117.68,117.09,115.8,114.15,113.18,114.15,118.9,118.18,117.75, +117.25,115.86,115.1,118.95,118.65,118.05,116.9,116.7,114.85,114.75,114.05,116.4,115.9,110, +99.88,99.89,97.5,101.94,99.9,98.74,100,100,94.05,94.65,98.1,97.56,97.07,98.45, +100,95.66,94.99,91,91.6,92.03,92.8,93.9,97.87,98.9,98.44,98.4,105.01,107.34, +108.25,108.4,105.6,107.65,106.4,103.54,106.87,105.8,107.5,110.9,111.5,115.6,115.75,118.64, +116.17,117.38,115.72,114.99,118.2,117.6,115.69,112.6,113.99,114.34,116.75,116.75,115.5,115.25, +111.12,111.44,109.94,109.94,113.94,110,97.75,94,96.44,94.25,94.94,95.75,93.94,94.69, +99.75,95,87.5,86.94,88.19,88.12,89.56,89.37,87.94,88,94.44,90.5,90.69,93.69, +96.62,96.12,98.25,99,95.94,101.81,104.75,99.19,99.31,98,99.94,100.75,102,101.75, +100.81,104.37,103.25,102.5,99.69,100.06,99.87,99.44,98.37,100,103.75,103.5,102.37,102.62, +102.31,99.87,99.12,93.75,93.69,92.87,90.94,94.37,95,96.25,98.5,99.12,113.87,113.12, +110.44,114.37,112.94,117.12,119.37,116.12,114.56,114.87,119.37,119.62,116.94,118.87,120.31,121.87, +126.62,124.31,126.69,126.56,126.25,126,127.25,129.19,128.81,126.87,128.25,132.94,134.5,134.88, +133.31,134.94,134.19,131.5,134.25,133.19,129.88,125.44,123.75,122.19,122.19,123.37,122.81,122.94, +122.62,123.69,121.81,120.25,120.81,119.62,119,116.5,116.5,114.87,112.44,113.69,112.5,111.5, +112.37,113.37,115.62,117,117.81,109.5,104.81,107.87,104.87,105.94,105.87,104,104.94,105.06, +105.12,105.62,109.87,113.19,114.37,115.19,112.81,115.75,113.62,114.31,115.94,120.69,120.37,117.69, +119,120,119.94,120.44,120.75,122.31,121.75,114.62,114.19,109.75,108.94,110.75,111,107.19, +112.25,110,110,109.25,107.5,107.31,108.87,109.25,104.87,105.75,107.5,105.69,110.62,110.37, +109.62,109.19,111.12,113.62,113.19,112.69,113.12,113.94,113,107.19,105.25,109.75,115.12,112.25, +112.75,114.31,119.62,121.62,125.37,125.69,128,125.75,126.94,122.37,123.75,123,122.44,127, +128.25,122.25,115.87,115.37,114.69,113.37,111.69,109.81,108.25,110,109,109,108,106.87, +107,111,110,105.44,105.5,105.56,106.5,109.87,111,110.5,113.44,115.94,118.87,117.31, +117.44,116.37,119.44,119.12,119.75,119,116.87,118.44,117.5,115.81,113.44,112.81,114.19,118.44, +119.94,119.5,122.87,123,124.75,122,119.75,123.31,121,122,121.12,119.37,117.94,118.94, +119.75,114.5,116,109.5,110.5,110.5,110.75,110,110.44,110.31,110.12,110.44,111.06,109.69, +107.94,110.19,112.75,111.94,122.12,121,119.19,116.5,112.87,106.31,104.44,104.5,104.94,106, +105,109.87,108.44,105.12,98.25,94.87,95,96.37,96.25,97.5,97.06,95.5,93.94,92.94, +94.44,95.94,96.81,98.81,99,95.31,95.56,96,95.12,94.62,93,113.06,108.5,109, +108.87,107.25,110.87,114.87,116.69,115.06,119.19,122.75,123.25,120,121.06,122.25,122.81,124.75, +126.81,125,127.81,127.25,129.63,130.88,131.44,132.38,135,133.56,135.56,137.69,136.5,133.94, +132.69,129.75,126.75,128.5,126,125.62,125.19,125.87,124.06,123.62,124.87,124.37,124.87,129.63, +128.56,127.87,124.5,123.81,123.75,122.5,124.44,127,124,121.87,123.12,126,126.69,126.62, +128.69,126.5,125.12,125.44,128.5,129.75,132.13,138.88,137.5,138.13,138.5,139.19,138.69,137.44, +135.5,133.5,133.88,132.25,131.31,132,125.31,124.69,125.75,124.44,124.19,127.75,125.75,121.44, +122,121.5,118.31,116,116.5,116.75,120.87,119.87,121.69,116,115.31,114.62,113.87,116.75, +116.87,236.63,226,230.69,233.38,236.38,238.75,240.63,239.63,243.5,246,228.44,221.88,221.88, +217.5,214,212.5,215.88,212.25,211,209,210.5,215.25,210.75,206.56,198.75,171.88,169.75, +172.31,177.5,179.5,183.88,184,183.63,188.06,188.06,187.63,186.75,183.94,177.69,181.5,181.25, +178.75,175.88,173.25,170.5,167.63,170.5,178,177.75,180,183.5,182.31,183.44,185.94,182.88, +184.88,180,178.94,177,168.94,170.94,169.5,171.88,173.94,179.69,180,177.94,174.75,174.5, +174.31,178.25,176.25,178.81,168.88,169.5,168.88,171,176.5,177,180.69,184.5,183.94,181.31, +186.81,186.5,182.63,185.5,198.25,199.25,192.5,185.5,184.94,187.44,190,189.44,192,192.38, +192.75,189.88,186.5,187.19,188.63,188.94,189.94,187.94,185.38,183,178.94,172.19,169.63,166.88, +165.81,167,168.44,170,169.94,169.88,168.19,165.38,169.38,169.25,170,170.56,170.19,166.94, +167.19,167,160.13,159.88,159.63,161.38,159.69,157.5,159.88,158.88,156.75,152.19,150.94,149.56, +149.75,149.94,149.69,149.81,149.5,146.88,146.81,144.44,143.44,143.5,143.69,142.44,139.81,137.5, +138.75,132,130.5,132.88,127.94,123.5,122.87,124,123.75,125.25,126.44,131.5,134.13,136.19, +133.69,134.94,133,130.63,128.63,127.25,128.25,130.94,130.69,129.94,126.56,122.5,127.44,125.94, +122.87,122.69,123.75,118.94,123.37,125.81,128.75,131.75,130.88,128.69,128,130.06,131,129.5, +126,127.37,128.38,129.56,128.5,130.13,134.25,130.94,129.25,134.25,134.88,138.13,133.75,128.44, +126.94,125.75,125.94,129,128.44,131,123,120.37,118.94,120,120.62,120,119.25,118.5, +115.56,114.5,115.06,116.62,116.94,116.31,114.81,113.44,114.69,112.12,112.31,109.5,109.25,109.12, +112.19,111.87,115.44,116.81,118.06,119.62,119.56,120,119,116.19,116.62,117.69,118.31,120.94, +121.62,121.5,123,123.62,124.19,125.81,127,125.75,127.75,129.31,122.25,120,122.75,120, +117.75,118.94,118.25,118.87,117.37,117.44,116.87,118.5,116.62,117.94,117.62,120,118.5,111.25, +107.94,110,109.81,106.25,107.81,106.5,105.62,105.81,106.5,106.37,106.69,104.87,104.94,104.87, +105.5,106.62,106.69,103.69,103.37,103.25,103,102.31,101.81,101.37,101.12,100.62,99.87,98.19, +98.25,99.81,100.37,103.31,102.5,104.56,105.62,105.87,105.25,102.87,103.94,103.44,104.62,103.62, +103.69,103.62,103.25,103.25,102.44,99.62,99.62,99.56,99.81,100.25,101.25,99.56,99.31,98, +97.87,99.94,100,100.62,102,108.37,105.19,104.94,104,102.44,101.12,104.87,105.5,105, +107.19,106.81,105.75,105.19,105.5,103.69,101.75,100.81,104.12,104.75,102.94,102.94,105.5,105.25, +101.94,103.44,103.94,109.62,112.25,113.5,112.87,111.31,111.62,112.19,113.31,109.94,109.87,107.5, +105.75,106.37,105,103.94,104.37,104.87,102.06,99.37,99.5,100,100.81,100.44,103.19,103.94, +102.75,102.19,99.19,99.37,102.25,99.94,98.62,102.81,103.87,105.94,105.37,97.75,98.87,102.69, +102.87,104.12,105.5,105.37,105.81,106.87,107.12,105.25,107.25,104.56,106.44,107.44,105.12,103.19, +103,104.44,105,105.12,99.62,100.25,101.25,100.5,99.19,98,98.37,100.06,104,104.31, +105.25,104.56,105.12,104.31,102.87,103.87,104.81,104.37,107,106.62,107.94,108.44,108,104.12, +104.5,105.12,106,105.62,105.31,107.12,109.25,109.44,107.94,106.5,105.94,107,106,104.62, +106.87,108.44,108.44,107,103.5,106.31,105.25,101.75,98,96.25,96.44,97.37,96.19,96.69, +95.75,95.5,95.12,93.62,92.25,92.5,92,92.94,93.75,92.25,91.37,91.94,90.75,89.5, +90.75,90,89.75,88.37,87.37,87.87,87.62,86,84.87,85.62,86.62,87.87,88.25,90, +91.87,179.25,174.88,176,177.38,175.5,170.38,173.75,175.63,175,177.13,173.5,169.25,169.25, +166.88,167.38,166.25,162.88,161.63,161.13,159,151.75,152.88,157,143.75,140.13,141.25,140.13, +139.75,138.38,139,136.88,134.75,134.88,138,136.88,133.5,131.13,132.25,137.38,137.75,139.5, +141.63,141.13,138.38,136.88,137.13,139.75,138.75,140.75,143.13,144.38,146.25,147.25,149.75,147, +147.63,149,146.5,146.75,146.75,145.75,146.88,147.5,148,144,140.88,143.5,145.88,145.5, +147.75,148.13,146.63,145.25,148.75,150,149.75,153.63,154.75,157.38,157.88,158.25,156.75,154.25, +151.75,154,160.25,160,170.13,167.63,165.75,166.75,168.38,167.63,166.25,164,162,164.25, +163.75,163.38,159.13,154.38,155.38,155.5,155.63,158.38,156,155.38,158.38,159.75,159,153.63, +153.25,154.88,158.5,158.63,161.88,160.13,158,162.63,164,166,163.5,159.63,160.25,160.75, +158.5,158.88,154.88,159,154.88,150,145.5,137.63,135.88,135.75,134.88,134.5,135.13,133.88, +131.5,129.38,129.63,129.13,127.5,127.75,128.13,128,129.75,129.88,130.75,135.38,129.5,129.13, +129.5,131.25,130,130.13,128,129.38,129.5,128,127.12,126.25,125.87,125.25,127.12,125.5, +127.87,126.87,126.87,124.75,124.87,125.12,125.25,123.62,123.37,122.87,118.25,118.25,119.37,117.75, +115.87,114.5,115.62,115.37,115,115.5,115.75,112.75,113.12,113.62,113.87,112.75,110.75,110.37, +111.25,111.62,111.5,112.5,113.25,113.75,113.87,112.87,110.12,109.37,109.37,109,108.87,108, +105.5,104.12,103.75,92.62,93.25,93.37,95.25,95.62,97.87,95.75,94.87,96,97.62,99.5, +100.25,99.25,99.25,100.12,101.25,102.25,99.87,99.62,100.12,99.75,100.12,101.75,102.25,102.62, +102.5,102.75,104.25,104.12,103.87,104.37,103.25,102,104.87,106.37,106.62,106.5,108.25,107.62, +108.37,109.37,109.87,110.5,111,112.12,112.5,111.62,109.25,109.87,108.87,108.5,108.37,107.75, +106,107.25,108.5,109,109.37,108.5,110.25,108.75,108.87,108.5,107.62,107.75,107.62,107.12, +107.25,120.12,116.37,114.37,115.62,118.37,120.87,120.12,119.37,119.87,120.5,118.12,112.75,113.75, +112.37,113.75,112,115.12,115.75,117.87,120.87,125.5,125.12,120,118.75,116.62,116,117.87, +116.87,117.5,119.87,119.5,121.25,121.75,127.37,128.88,128.88,125.5,126.12,125.62,120.62,120.87, +118.87,118.5,115,114.87,115.87,114.37,114.5,114.62,115.12,112.37,109.87,110.37,109.87,109, +106.62,106.25,108,109,104.5,103.87,104.12,96.25,89.25,87.75,86.5,87.25,88.5,89.25, +89.12,89.25,88.75,89.12,91.25,92.12,91.75,91.37,92,92.12,91.87,91.12,92,91.87, +90.12,92,95.12,95.37,96.75,97.25,96.87,95.5,96.5,97.12,97.25,97,98.12,97.5, +97.5,97.37,96.62,96.37,94.87,95.37,95.87,96.75,96.25,97.37,98,98.25,99.75,100.12, +100.62,102.37,101.5,99.87,97.62,99.12,98.75,96.62,96.62,98.5,99.25,99,98.5,98.37, +98.25,97,94.12,94.25,93.5,92.87,91.12,94.12,95.37,95,94.62,95.25,95.62,95.25, +95.37,94.5,93.87,94.75,94.37,96.5,98.12,96.87,94.25,92.75,95.62,98.75,98.5,98.37, +100,101.25,102.62,103,104.5,103.75,103.5,102.62,103.87,105.37,106.62,108.5,108.25,111.37, +114,114.62,112.75,112.12,110.87,109.62,110.37,110.37,110,109.37,109.75,109.5,111.75,110.12, +111.25,111.25,110.87,109.62,110.25,107.87,104.87,104.37,105.5,108.62,107.5,104.12,104.25,102, +101,101.25,100.62,98.87,98.62,97.87,98.12,98.12,96.62,98.69,99.25,99.37,99.12,98.62, +98,94.62,93.62,94,93.37,92.25,90.75,90.25,90.75,91.37,92.75,93.5,95.37,95, +93.62,95.75,97.5,97.87,97.87,97.62,95.37,93.75,96.12,95.62,95.87,95.37,95.62,95.12, +95,94.37,95.25,94.62,96.12,94.62,93.37,94.25,96.25,96.87,95.75,93.87,93.87,92, +90.37,88.25,88.5,88.5,87.37,87.62,86.87,86,85.12,84.62,84.12,83.62,83.5,83.5, +83.37,84.75,84.87,85.12,84.37,83.37,82.62,84,84,83.62,83.62,82.25,82.75,83, +81.62,81.37,80,80.87,81.25,80,77.37,76.37,75.25,75.37,75.37,75.75,74.5,75.12, +75.75,76.25,75.87,75.62,75.37,75.75,75.25,74.87,74.37,74.87,75.25,74.37,73.87,72.87, +73,73.12,73.37,73.12,74.87,74.5,76.5,77.62,77.87,78,78,76.87,76.37,77.12, +77.25,75.87,75.75,75.25,74.62,73.87,74.5,74.37,74.37,74.5,74.25,74.62,73.62,71.62, +71.62,70.87,71,70.62,71,71.37,71.5,71.5,71.37,72,72.37,71.37,70.75,71.25, +71,71.62,70.87,70,72.87,74.12,73.37,73.75,73.12,73.87,73,73,73.62,74.37, +73.5,72.25,73.5,74.62,75.25,75.25,75.62,76.37,74.62,74.5,74.37,74.62,75.37,76.12, +75.75,74.5,73.75,73.12,74.12,73.5,72.37,71.87,71.75,69.5,69.12,69.5,69.5,70.12, +69.87,69.87,69.37,69.12,69.5,70.25,71.37,70.5,71.25,71.37,70.25,70.12,69.62,68.12, +68,68.12,68.25,67.62,68,68.25,69.5,69.75,70,70.12,69.75,67.37,68.25,68.37, +68.62,66.87,65.62,64.75,64.5,65.12,64.62,65,64.5,63.38,63.13,63.5,63.13,63.38, +63.13,62.75,63,62.5,63.13,62.38,62.5,62.63,56.25,56.88,57.63,57.88,58.5,56.75, +56.13,57.13,57.88,57.38,57,57.88,59.13,60.5,61.5,61.88,61.63,61,62.25,62.13, +62.13,62.25,63.13,63.5,64.75,65,64.12,62.88,62.13,63,63.25,63.5,61.88,63.5, +63.63,63.75,64.12,64.12,64.12,63.38,62.5,62.38,62.13,61.88,61.5,58.63,57.88,57.75, +58.25,58.25,57.88,57.13,57.5,58.25,58.63,58.38,57.88,58.25,59.25,59.25,59.5,58.63, +53.5,53.75,54.13,54.5,53.88,53.38,53.88,53.38,53.13,53.25,53.55,54.13,53.5,54.63, +55,54.38,54.63,56.5,57.13,57.88,58.63,58.88,58.25,58.25,58.25,58.38,57.88,56.25, +56.25,55.75,54.88,53,53.25,53.38,53.5,53.88,53.25,53.38,53.38,54.25,53.88,52.88, +55,55.25,54.63,54.63,53.38,53.63,54.25,54.75,54.63,55.63,56.88,56.5,57.38,57.88, +58.13,57.5,58.75,59.38,58.75,55.63,55.88,57,57.38,58.5,59.5,59,58.88,59.38, +59.5,59.38,60,59.88,59.13,57.75,57.38,58.38,58.75,59.38,59.25,59.38,59.25,59.13, +59.38,59.88,57.63,57.63,57.38,57.75,55.5,54.13,54.13,54.25,54.38,54,54.13,54.75, +55.13,56.13,56,55.25,53.25,52.5,52.63,53.13,54.25,53,51.63,52.5,52.38,50.13, +50.63,50.75,50.13,50.5,51.13,51.13,48,46.63,46.38,46.63,46.25,45,45.75,45.25, +43.63,44.63,45.13,44.88,43.25,43.88,44.38,44.38,44.38,44.13,44.38,44.5,44.75,43.88, +42.13,42.13,42.63,41.88,42,42.38,42.5,42.63,43.38,43.38,44,43.88,43.88,44.38, +44.63,44.63,45.38,46.25,46.38,46.38,46.38,45.88,44.75,44.13,44.75,44.13,44.63,44.75, +43.25,43.25,43.5,43,41.75,42,42.5,43.5,43.38,43.75,43.75,44.75,44.38,44.13, +44.75,44.5,44.5,46.38,45.88,43,43.63,44.75,43.88,43.75,46,47.5,47.88,47.88, +48.5,48.25,47,47.63,47,48.13,48.63,49.75,49.88,50.5,50.75,49.75,49.13,49.38, +49.63,50.13,49.63,50.25,50.38,51.88,52.5,53,52.75,53.38,52.5,54,54.38,54.38, +54,53.38,53.13,54,52.75,50.88,49.88,49.25,49.5,50.13,49,48.25,48.13,47.75, +48.63,48.88,49.13,48.63,48.63,49.5,49.88,49.38,49.38,50.13,50.75,48.75,49.25,48.38, +49,50.25,50.63,50.63,49.13,49.25,49.63,51.13,51.88,52.38,52.25,52.63,53,53.13, +52.13,51.5,52,52.75,51.63,50.88,53.75,54.25,53.75,54.5,54.75,55.63,55.38,56.25, +55.75,55.88,57.13,56.75,56.25,55.88,55.25,55.5,54.63,55.38,54.88,53.88,52,51.75, +51.38,50.75,51.25,50.75,50.88,51.63,51.88,53.88,54.5,53.13,52.63,51.88,52.75,53, +52.63,51.63,50.88,50,53.25,49.25,48.75,47,48.25,50.88,50.13,49,49.5,49, +49.88,48.38,46.88,48.63,49.13,50,51.88,51.25,50.88,51.13,53,53,52.63,52, +51.63,53.25,53.38,55,59.88,63.38,62.88,62.38,64.25,65.75,67.37,67.62,68,68.25, +68.87,68.62,66.25,66,65.5,63.88,62.63,63.88,64.37,65,65.5,65.12,65.37,65.75, +68,67.62,66.5,67.25,69.62,69.87,69,67.37,67.62,67.12,67.25,68.75,69.37,69, +69.12,69.62,70.25,72.87,74.12,78.87,80,79,79.87,79.5,80,80.37,78.87,80.5, +81.12,81.37,82.75,82.87,83.12,83.75,83.75,84.62,84.5,84,83.75,84.5,87,88.75, +88.25,87.5,86.87,86.37,86.62,87.75,87.62,87.62,87.5,87.37,87.37,87.12,87.12,86.25, +86.5,86.87,88.5,88.62,89.12,88.75,89.12,89,88.62,88.75,88.62,90.12,93,94.87, +95.25,95.12,95.5,94.87,94,93.25,93.62,93.25,94,94.25,93.37,97.37,100.37,99.37, +98.37,98.87,97.87,98.37,97.87,98.75,98.25,98.25,98.5,98.62,98.62,97.37,98.25,97.87, +96.37,95.37,95.5,95.87,93.87,94,94.12,93.87,92.12,91.12,91,91.25,90.75,89.75, +90.75,91,91.25,92,91.5,91,91.5,92.25,91.62,92.75,92.5,91.87,92.12,92.25, +93.62,93.87,94.37,94.25,94.12,94.12,94,93,92.12,90.75,88.87,88.5,88.75,89.25, +90.62,90.12,90.25,89.75,88.62,88.87,89.75,87.5,86.12,85.87,85,84.87,83.12,82.37, +83.5,83.5,84.87,83.87,84.37,85.37,86,86,86.75,86.62,87.12,88.5,88.87,89.62, +90.25,89.12,88.37,88.37,87.37,87.25,88.12,89.62,88.62,87.75,88.62,88.37,88.62,89.25, +90.25,90.37,90.62,90.75,91.12,91.12,93.25,92.37,90.87,89.87,90.37,90.87,92.12,92.25, +91.37,92,92.5,94.12,94,94,94.25,95.87,95.62,95.5,96.37,98.12,97.12,95.75, +92.5,90.87,92.5,94.25,95,94.75,93.12,91.12,90.62,91.12,90.75,89.62,88.87,90, +88.5,86.25,85.87,86.87,87,88,88.87,89.25,87.87,86.5,89.75,90.25,91.12,91.5, +92.12,92.37,93.87,97.12,98.12,95.62,96,96.75,97.37,96.75,97.75,100.12,100.12,99.12, +100.62,100.75,101.37,100,97.25,97.75,97.75,99.37,100.37,100.25,99.37,98.62,98.62,99.12, +98.75,100.5,101,100.37,101.25,103.75,104.75,101.62,100.5,99.87,98.25,99.37,99.37,99.62, +101,102.5,103.75,104.25,105.37,105.75,105.75,105.87,104.62,105.12,106.37,105.5,104.87,104.37, +103.75,104,101.37,101.25,101.12,99.62,99.12,99.25,98.87,97.12,95.87,95.25,95.62,95.62, +96.12,96.37,96.37,96.25,95.62,98.62,99,99.37,99.87,99.5,99.62,99.75,100.5,100.75, +101.25,101.62,101.75,102.12,102,101.37,101,101.62,101.37,103,102.12,100.87,98.37,96.87, +99.5,99.87,99.75,99,100.37,100.87,100.5,99.25,98.87,99.37,98.62,97.75,98.75,99.37, +99.62,99.62,100,99.25,101.25,101,100,101.62,101.37,102,103.5,102.75,103,103.62, +105.5,106,107.37,106.5,105.12,104.62,105.37,105.12,104.62,104.62,104.25,104.25,104.62,104.25, +105.12,106.25,106,106,105.87,104,103.5,103.62,106.5,106,104.5,105.5,107.87,108.25, +109.12,108.87,109.12,109.37,110.25,110.75,110.75,109.25,108.37,111,111.87,111.62,113.37,113.5, +114.5,114.75,114.25,113.5,114.25,114.37,114.62,114.62,113.62,112.62,115,115.37,119,128.13, +127.75,130.75,129.63,129.25,130.5,133.63,133.75,134.88,135,132.5,131.5,131.5,130.88,133, +135.13,137,138.25,138.75,139.75,137.88,136.25,135,133.88,132.5,129.88,131,130,128.5, +127.62,127.62,127.12,127,125.37,125,122.62,121.62,120.12,119.62,120.12,118.25,116.12,109.25, +107.75,107.12,108.25,108.37,110.75,110.37,111.87,113,113.87,113.75,113.5,113.87,113.87,114.25, +114.25,114.37,114.62,114,113.5,111.75,112.5,114.62,114.5,113.12,113.75,112.87,116,114.87, +115,114.5,114.5,112.87,113.87,114.12,114.25,114.25,114.12,115.12,114.87,114.12,113.62,114, +113.5,113.25,110.25,107.62,108.25,109,108.12,108.62,107.37,106.62,106.87,107.87,107.5,109.25, +109,108.25,108.75,109,105.37,101.62,100.37,100.87,102,103.87,106.62,108.62,109.5,109, +108.25,109,110.37,109.5,107.12,106.62,106.75,106.5,106.25,107.87,109,109.25,107.62,105.75, +105,107.75,108.37,107.75,107.62,105.5,103.5,103.87,102.62,101.87,104.12,104.37,104.12,104.37, +101,98.37,101,101.75,102.75,103.37,105.75,105.25,105.12,104,103.62,103.87,103.87,105, +104.37,109.5,110.75,112.37,112.87,112.37,112.75,114.62,115.5,116,117.75,120.25,120.12,121.62, +122.5,123.12,122.12,120.37,119.25,119.75,119.25,118.5,117.62,118.75,118.75,118.12,118.37,118.12, +118,117.25,119.5,119.12,119.12,119.12,120.75,121.25,121.87,122.12,120.87,120.25,120.87,121.5, +122.25,121.87,120.87,120.75,120.87,122.12,119.87,118,118.87,118.75,117.75,117.37,116.25,116.25, +115.75,115.62,115.5,114.5,112.87,111.25,111,111.37,110.62,110.12,109.12,109.62,109.25,109, +110,110.12,110.37,109.5,109.5,110.25,110.87,111.25,111.25,108,106.5,106.37,105.87,106.37, +106.87,107.75,106.75,105.87,106.75,106.87,105.87,104.75,105.75,106.12,107.5,108.5,109.37,109.12, +108.75,107.37,107,108.25,107.75,107.37,107.37,106.25,105.75,105.87,105.37,104.37,104.62,105.5, +104.12,103.87,105.5,105.12,103.12,104.5,104.62,104.25,103.25,102.37,103.25,103.87,103.75,101.37, +99.87,98.75,99.75,98.62,97.62,97.75,97.25,97.87,97.87,98.25,99.12,99.87,99.62,100.87, +100.37,98.37,99.25,100.37,100,101.25,100.87,101.62,100.37,99.5,98.12,94.62,95.12,95.37, +95.5,95.75,95.37,95.12,95.25,95.25,95.25,95.5,97.37,97,96.75,98.12,99.25,99.25, +101.87,99.5,98.12,98.12,98.62,99.37,100.75,100.75,100.5,99.75,99.37,99.75,98.25,98.5, +99.25,98.87,98.62,97.5,98,97.75,98.12,98.87,99.62,100.37,101.37,100.75,100.87,101.75, +102.75,104.5,104.75,104.62,105.37,103,102.87,107.75,108,107.75,108.25,109.37,109.25,108.12, +109.12,108.25,108.25,109.75,109.37,111.25,112.5,117.75,117.87,116.87,117.25,116.37,116.5,116.12, +116.25,115.87,117.5,117.25,116.37,116.37,117,117.62,118.75,118.25,117.62,117.5,118.37,118.12, +116.5,116.12,114.12,113.87,115.37,115.5,115.75,116.37,116.5,116.5,118.25,118.25,119.12,119.37, +117.62,115.75,114,115,116.5,115.25,114.25,113,112.62,114.37,114.12,114.37,114.62,115.5, +116.75,116.5,115,115.25,115.12,115.87,115,112.75,112.37,112.75,112.5,112.12,113.25,115.12, +114.5,112.75,111.12,109.87,110.37,111.25,110.5,109.62,110.5,111.5,111.62,109,109.5,109.62, +110.37,109.75,110.12,110.87,110.75,110.12,109.75,110,110.25,110.12,109.87,111.87,112.5,112.5, +111.87,113.12,112.87,111.25,109.87,110.25,110.12,109.75,111.37,111.12,112.5,113.75,113.62,114.62, +115.75,114.75,115.12,114.37,113.5,112.87,113.12,113.12,111.75,112,111,112.25,111.37,110.25, +110.25,108.25,108,108.5,109.5,109.5,109.75,110.37,110.87,110.37,110.25,109.37,110.5,111.37, +116.5,118.75,118.75,119.37,119.62,118.5,119.87,120.62,121.12,121.62,121,120.87,122.37,122.25, +121.87,123.5,123.62,125.5,126,126.62,126.87,127.12,126.75,126.25,126.62,127.5,128.38,128.63, +127.87,128.88,129.88,130.88,130.88,129.25,127.87,127,124.37,124.62,124.12,124.37,125.37,125, +124.5,125.12,123.75,124.12,122.25,122.5,122.37,122.75,123.12,122.62,122.25,123.62,124,123.12, +123.87,123.5,123.25,123.62,124.12,123.25,121.87,121.62,121.75,120.75,121.87,120.75,121.37,122.75, +122.12,121.62,119.37,118.75,119.75,119.75,119.75,116.75,118.5,117.25,115.62,116.12,116,117.5, +118.12,117.5,119.25,120.37,120,120.62,120.12,121.37,122.87,123.87,124.37,122.87,121.25,121.25, +122.5,123.5,124.62,124.62,124.87,124.75,124.37,121.87,120.25,119.75,118.5,118.75,116.5,116.25, +114.12,114.37,115.37,115.25,116.5,115.5,114.12,113.62,113.62,113.37,113.87,113.62,113.37,114.12, +115,115.37,115.87,115,115.37,115.25,113.12,113.25,113.87,114.75,111.12,113.5,113.75,114, +112.75,112.12,112.87,111.75,113.12,115,115.5,116.37,116.75,117.87,118.75,119.62,121.62,123.62, +124.37,124.25,125.5,126.5,126.87,126.5,126.25,123.87,123.12,123.37,122.37,121.62,123.62,124.75, +125.37,126.25,126.5,125.75,125.62,127.37,127.37,128.25,127.87,129.5,129.25,127.75,127.75,128.38, +127.75,126.25,126.25,125.87,123.62,120.37,117.62,117.5,118.37,119.62,119.75,117.37,117.37,117.12, +116.87,115.25,114.37,113.87,113.62,114.5,113,108.37,109.25,109.75,109.5,109.87,110.75,110.62, +110.62,112.75,111.75,110.37,109.37,109.87,111.5,110.87,111.87,111.62,114.75,115.12,114.37,113.75, +113.5,114.5,114.75,114.62,114.25,114.12,113.87,116,114.5,114.37,115.75,116.5,114.12,113.62, +112.62,110.25,109.75,108.25,109,108.5,106.62,108.75,108.37,110.37,110.5,113.37,114.25,114, +114.62,115.5,115.37,115.37,115.75,115.5,116.5,117.75,118.62,117.5,117.5,117.25,118.37,118.37, +117.75,115.75,117.87,116.75,115.87,115.62,113.37,113.75,114.25,113.75,112.87,112.37,111.75,109.25, +108.37,109.5,109.25,111.75,110.62,113.5,114.37,114.5,114.75,113.5,113.25,111.75,112,111.37, +115.5,119.75,120.25,117.37,118.25,117.75,118,123.75,124,123.25,123.5,121.25,116.37,117.75, +116.62,117.62,119.87,120.37,118.37,119.5,118.25,119.5,119.25,117,115.75,111.62,114.5,114.75, +111.5,109.5,107.75,110.87,112.12,112.87,112.37,117,118.87,119.5,117.75,117.87,118.87,119.5, +119.25,123.25,122.62,123.5,120.12,119.5,119.75,124.5,124.62,122.5,123,124.87,125,123, +120,118.62,117,122.75,122.5,125.5,122,138,141.25,145.75,147.38,151.5,151.25,151.63, +152.88,153,156.38,157.25,156.88,154.75,151.88,153.75,158.25,156.63,158.13,156,155.75,156.5, +158.5,158.63,159.88,162.25,162.75,161.38,158.38,158.13,160.5,162.75,163.5,164.13,169.38,169.5, +168,168.38,169.5,174.88,175.13,175.88,175.25,173.25,173.88,174.75,175,174,172.13,169.63, +166.75,165.63,163.25,161,160,160.88,163,162.5,161.75,162.88,162.63,161.5,162.25,162.88, +164.63,165.88,168.5,168.75,169.5,169.88,169.88,167.25,167.25,166.88,166,165.63,165.13,164.63, +165.75,166.5,167.75,168.63,167.63,165,163.5,162.13,162,162.5,162.25,160.13,159.38,159.13, +161.5,161.63,161.88,161.25,161.38,160.38,159.75,161.38,163.88,162.75,162.38,160.75,159.25,158.75, +158.63,161.75,161.25,165.38,167.38,167,166.13,167.38,165.88,166.75,167.63,167.63,163,162.38, +161.5,159.63,156.63,156,154.13,156.5,157,158,150.63,152.25,151.88,150.88,150.25,145.63, +147.5,148.25,150.13,150.38,150.75,151.38,152,153.38,152.75,154.13,156.63,156.5,152.88,150.25, +149.25,147.38,148,147.13,145,146,145.13,144.38,142.88,138.88,140.5,141.88,141.38,138.88, +140,140.63,141.63,143.5,144.25,144.13,139.75,139.63,139.5,138.63,134.75,135,134.5,135.5, +135.88,137.13,137.5,135.13,134.38,132.5,129.13,130.88,130.25,129.75,127.87,129.88,128,124.87, +127.25,125.25,121.12,121.37,118.75,118.75,121.12,122.62,123.37,124,124.37,124,122.5,121.87, +121.62,122,122.25,122.5,122.5,125,125.87,127,128.13,128.5,127.62,128.25,129.38,129, +128.13,128.75,128.5,129.25,130.13,129.88,127.37,127.25,127.87,127.5,125.25,125.37,123.87,123, +123.12,123.62,121.5,123,124.37,124.25,123.25,121.87,122,124.75,126.5,126.37,123.75,123, +121.75,122.37,122.12,122.25,122.5,121.5,121.37,121.25,122.37,123.37,123,123,125.25,124.5, +127.87,127.5,133.63,133.63,133.25,133.38,135.5,135.88,135.25,136.63,137.63,139.38,139.38,138.63, +138.25,139,139.63,138.5,138.5,139.88,142.88,144.5,145.5,143.88,141,139.5,136.38,138.88, +140,140.38,142,141.25,140,138.13,140.5,139.5,137.75,135.75,134.5,135.25,134.38,132.75, +131.63,131.63,131.88,131.5,131.88,131.88,133.38,133.25,133.25,132.75,134.88,135,133.63,134, +133.88,132.38,133.5,134,136.13,138.63,141.38,145.63,145.88,144.75,144.63,148.13,150.13,150.13, +148.63,147.5,147.38,147.63,148.5,147.88,147,147.5,147,147,148.75,149.88,149.88,149.13, +149.5,148.75,149,151,150.88,152.88,152.75,153.5,154.63,153.63,152.5,147,146.25,145.13, +146.63,146.38,145.25,145.63,148.13,149.13,150.38,151.5,150.25,150.5,153.5,155.88,155.88,157.25, +157.5,159.75,161.88,161.38,160.38,158.5,155.25,155.13,154.88,154.88,155.63,155.25,153.63,152.63, +152.38,151.5,152.63,152,150.25,150.13,152.88,151.13,152,153.13,151,147.88,148.75,150, +150.88,152.75,152.38,153.5,151,151.5,150.88,152.63,152.13,148.5,147.25,149.13,148.38,153.13, +152.5,156.75,158.25,159.13,158.63,160,161,159.13,160.38,159.75,157.88,155.88,157.25,158.25, +157.88,157.25,156,155,155.5,154.63,153.5,151.13,153.63,151.75,151.25,150.5,148,150, +150.38,150,156.25,156.5,152.75,149.88,149.63,151,150.38,156,156.5,154.88,154.38,154.88, +158.75,158.5,155.63,153.75,154.63,155.13,156.63,154,153.88,154.5,153.5,151.5,149.38,149.38, +148,144.88,141.75,142.88,141.88,138.63,139.88,140.75,140.5,139.75,139.5,140.5,140.25,139.13, +139.25,138.63,138.38,137,135.75,136.38,134.88,133,132.75,133.25,134,132.63,131.13,130.75, +131.38,131.38,129.38,128.88,131.25,130.88,130.13,127.87,129,130,129.5,129,128.13,126.25, +124.75,125.37,124.75,125,124.37,125.25,127,126.62,124.25,123.87,127,128,128.38,128, +128,128,128.5,128.5,128,128.5,128.5,129.5,130.5,129.75,128.63,127.25,127.5,127.62, +128,128.63,128.88,128.25,127.12,128.38,128.38,127.75,126.37,126.37,127.25,129.13,127.5,127.37, +128.63,128.88,129.75,131.75,131.5,132.25,132.75,131.88,130.75,132,132.5,130.25,129.88,131.88, +129.88,130,130,130.25,128.75,126.75,124.62,124.12,123.37,123.25,124.5,124.87,124.62,125.37, +125,124.5,124.25,123.25,123.37,121.12,119.75,119.75,120.87,121.62,120.5,121.12,120.25,126.12, +128.25,127.87,129.88,129.75,130.63,130.13,129.5,130,129.5,130.25,131.75,131.63,132.38,132.75, +133.25,133.25,131.25,129.5,129.25,130.88,130.63,130.88,128.25,127.25,126.25,125.62,125.62,126.87, +126.87,126.75,127.12,129.75,129,129.13,129.25,128,128.13,130,130.13,130.38,129.75,128.13, +127.62,126.62,125.37,127,127.25,127.62,129.5,128.25,127.12,127.62,126.62,125.62,128,128.75, +130,130.63,131.13,129.88,130,130.38,132,132.5,131.75,131,133.38,135.5,135.88,136.38, +136.75,134.5,135,135.5,133.88,134.25,134.5,134.88,132.25,132.75,134.63,134.63,133,137.25, +137.88,137.63,136.63,138.25,138.25,136.63,136.88,137.63,137,135.25,134.13,134.5,132.63,130.63, +128.5,125,124.62,125.5,125.62,125.25,124,123.75,120.75,120.5,120.87,120.37,122.25,122.62, +123.87,124,124.25,124.25,124.5,123.75,123.87,124.5,123.25,119,120.25,119.62,119.37,119.12, +118.25,119.12,119.5,120.25,121,121.37,122.25,123.12,124.87,125.12,123.25,122.62,121.37,121.37, +121.62,123.12,123.25,123.75,124.25,124,125.5,125.75,127.12,127.75,126.87,126.5,126.87,126.75, +127.12,124.87,125.12,126.75,127.37,127.37,126.5,127.75,126.25,123,122.75,123.37,122.25,122.12, +121.75,122.25,121,122.37,122.25,122.5,123.62,123.75,126.12,126,126,124.75,125.12,127.5, +126.25,128.38,127.87,128.5,127.75,126.12,123.37,124.5,123.37,123.87,124.25,122.62,123.12,124.12, +124.87,126,125.75,124.75,125.62,125.75,126.37,126.75,123.5,123.87,123.62,123.5,123.25,122.75, +124.87,123.25,121,122.75,124,121.25,115.12,113.25,110.87,109.37,109.62,108.75,107.75,107, +106.37,107.25,107.37,108.12,108.37,107.25,105.75,105.62,107.12,107.37,107.5,106,107.5,107.37, +105.75,106.5,105.62,104.5,105.5,106.25,106.5,108,102.5,103.75,101.87,101.12,104.12,105.5, +104.87,105.5,106,106.25,106,107.62,109.25,108.62,108.75,108.5,107.62,107.87,108.12,109, +108.5,109.75,110.87,111.75,112.87,113.25,112.25,112.12,113.37,114.87,114.25,113.37,114.87,116.37, +117.25,116.5,114.62,114.25,113.5,112.25,111.62,111.37,111.12,112.25,113.5,112.87,113.5,112.75, +110.37,110.75,110,109.75,111.37,111.5,112.5,114.62,114.62,115.75,115.37,113.87,113.25,113, +114,115.5,115.37,114,114.25,112.5,111.5,112,110.5,108.62,109.25,108.25,111.62,111.5, +112.87,111.62,111.75,112.5,113.5,111.5,109.25,110.87,109.87,110.5,110.37,111.37,111,110.25, +110.5,110.12,110.87,110.75,110.87,114.37,114.5,114.62,114.75,115,115,115.87,117.75,117.25, +117.12,119.12,120.75,121.87,121,120.5,122.25,123,122.75,123.87,124,124.5,125,124, +123.37,123.37,124.87,124.62,124.75,123.75,124.12,123.62,122.62,122.37,120.87,121.62,123.12,124.37, +124.5,122.37,119.87,119.37,119.25,119.12,119.25,119.5,122.25,121.75,121,121.75,123.37,125.62, +125.5,123.75,124.5,125.87,127.62,127.75,127.25,125.75,123.62,122.87,123.37,123.25,126.5,127, +127.25,129,130,129.38,128.88,129.75,128.63,129.75,130.5,130.75,132.13,132.63,133.75,133.88, +133.38,134,134.25,132.5,132.25,131.25,130.13,128.5,128.13,129.5,129.13,128.38,129.5,126.62, +124.75,124.12,124.5,124.87,124.25,123.25,123.5,122,123.37,122.87,123.5,122.87,121.87,119.75, +119.62,119.5,119.25,119.25,118.25,116.87,119,120.87,123.25,122.5,123.75,123.5,122,121.5, +118.87,119.12,119,119.5,119.87,120.12,119.87,121.37,121.5,121.37,122,124.12,126.5,127, +126.25,125.5,126.25,125.37,121.5,120.5,121.75,124,121.75,123.5,123.37,121.5,122.75,121.75, +119.62,121.25,121,120.87,121.37,122.75,123.87,123.75,124.5,123.62,122.75,122.5,122.87,121, +119.75,117.25,114.62,114.5,114.75,116.25,116.12,114.87,113.87,111.87,112.87,115,115.87,115.62, +115,112.87,111.75,112.5,114.75,115,115.25,116.62,116,117,117.62,118.25,118.5,115.87, +116.87,115.87,117.12,117.62,117.5,118,117.25,117.12,117.87,115.5,115.25,112.12,112.62,110.5, +110,109,107.37,106.75,104,103.37,102.75,103.25,102.5,104.87,104.5,104,102.87,103.25, +103.12,102.87,101.12,101.12,100,99.25,100.75,101,101.12,101,102.62,102.37,103.25,103.37, +102.25,103,103,101.87,100.5,101.25,101.5,98.75,99.5,99.5,99,100.25,100.5,99.5, +97.75,96.87,95.5,97.37,98.37,97.5,96,97.25,99.25,98.87,98.5,98,96.12,96.25, +94.12,97.5,98.75,100.25,100.37,100.75,99.87,99.25,100.12,98.37,99.25,98.37,98.5,96.75, +95.62,97,97.12,98,97.25,96.37,96.87,94.5,96.37,96,94.62,94.62,91.25,91.5, +96.25,94.75,95.12,96,97.5,96.37,93.75,89.37,89.25,88.25,86.5,83.75,83.62,82.75, +82.12,83,84.37,84.5,84.5,83.12,82.75,85.37,85.37,86.5,85.87,83.75,85,85.37, +85.5,83,81.5,80.5,81.5,82.37,82.12,81.87,84.75,84.75,84.5,83.5,83,80.37, +81.87,84.12,84.37,84.5,81.12,80.37,79,76.12,74.62,74.62,74.87,76.37,77.25,77, +76.5,76.62,77.62,76.75,74.75,74.75,75,73.62,74,73,72.12,73.25,73.62,72.75, +74,72,71,71,70,69.25,70.5,70.12,69.25,69.5,68.62,66.75,67.62,66.12, +63.63,63,62.88,63.13,63.75,63.25,64.25,64.75,66.12,67.25,67.12,66.25,65.62,66, +66.25,66.62,67,67.37,68.62,67.62,66.62,67.75,67.5,66.87,65,66.87,62.5,61.63, +61.25,60.75,60.63,60.88,61.5,61.38,61.5,60.63,61.25,61.5,59.88,59.63,58.63,59.25, +60,59.75,59.5,60.13,59,58.63,59.88,60.63,61.63,62.13,62.13,61.88,62.13,62.38, +62.38,62.63,62.63,63,63,63.25,63.25,63.75,64,64.25,64.62,64.75,64.87,65.12, +65.12,65.25,65.25,64.75,64.75,64.62,65.25,65.75,66.12,65.75,64.75,63.88,63.88,65.12, +64.87,64.62,64,62.75,62.5,62.5,62.13,61.88,61.75,61.88,61.13,60.63,60.5,60.25, +59.75,60.13,59.38,59.63,59.5,58,58.38,58.13,58.88,58.88,58.13,59.38,59.63,59.5, +59.25,59.38,60,60.88,62.38,62.75,61.88,62.5,62.13,61.38,62.88,63,63,63.25, +62.38,61.75,62,62.38,61.75,63,64,63.5,63.25,63.5,63.38,64.75,64.5,62.75, +62.5,62.25,62.63,63,62,62.13,62.13,60.13,58.88,58.25,58.38,58.75,56.75,57.25, +57,57.88,58.38,57.38,57.63,57,57.38,57,56.88,57.25,56.88,57,55.75,54.5, +53.88,53.88,54.75,54.75,54,53.75,55.38,55.13,54,53.75,54.63,54.5,54.5,53.13, +52.38,50.88,50.88,50.38,51.13,51.38,51.25,52.63,53.13,52.63,53,51.75,51.75,52.75, +52.38,53,53.13,51.75,49.75,50.88,51.25,50.88,51.13,51.63,52.25,51.88,51.63,52.38, +52.88,53.38,55.13,56,56.25,55.5,55,55.13,55.5,55.13,54.38,54.5,54.88,55, +54.25,55.25,54.63,55,55.13,54.5,55.13,55.38,56.5,56.75,56.13,55,54.5,54.13, +54.88,56.13,56.25,56.13,56.38,56.13,56.38,56.13,56.63,56.63,57.38,57.5,57.25,57.13, +58.25,58.75,58.63,58.75,58.88,58.13,57.25,57.5,58.75,58.25,56.75,56.63,56.63,55.75, +55.5,55.63,55.13,55.25,55.88,55.63,55.88,56.63,56.88,56.88,56.88,56.25,56.5,56.88, +57.13,57.38,57.13,57.25,57.88,58,59.13,59.63,60.13,59.5,59.63,58.25,58,58.5, +58.88,59.75,60.38,59.63,59.5,58.25,58.13,58.88,58.5,59.13,59.75,60.5,60.75,59.13, +58.5,58.13,56.38,55.88,56.38,56.63,56.63,56.88,56.88,57.13,57.25,56.88,57.63,57.88, +57.63,58.13,58.25,58.38,59.38,59.75,60.25,61.25,61.38,61.13,61.38,61,61.38,61.75, +60.25,59.88,60,60.75,63.25,61.75,60.5,60.63,61,62.38,62.75,63.38,62.63,62.13, +63.38,64.25,64.12,63.25,63.38,64.12,64.75,65.25,65.25,64.75,64.62,64.12,62.75,63.38, +63.25,62.38,62.38,62.88,63.75,64.25,64.5,64.87,64.25,62.63,62.38,61.63,62.25,62.38, +62.5,62.13,62.75,63.25,63.63,64.37,64.75,64.5,64.75,64.25,64.37,65.5,65.5,65.62, +65.87,65.5,65.62,65.37,65.62,67.12,67.25,67,66.75,67.5,66.75,68,68,69.75, +70.12,71.5,70.75,69.25,69.12,69.25,69.5,69,68.75,68.12,67.25,64.87,65.62,66, +66.25,66.37,66,64.5,66.5,66.75,67.25,68.87,69.5,69,68,68,68.87,69.75, +70.62,70.37,71.62,72.25,72.75,72.62,71.75,72.25,71.62,71.12,67.75,67.25,67.12,68.12, +70.25,67.62,67.25,66.25,67.12,66.75,66.5,66.62,67.75,68.12,68.87,68.5,69.37,71.12, +70.37,70.87,70.75,71.5,70.87,70.37,68.25,68.25,67,65.37,65.62,64.5,64.25,65.87, +67.87,68,69,68.37,67.5,67.37,67.87,66.37,66.25,66.5,66.37,66.25,66.25,66.62, +67.25,68.12,67.5,66.5,65.62,66,67,67.75,67.5,68.87,67.75,67.87,67,68, +69.12,69.12,67.5,68,66.75,66.25,65.75,65.62,65.37,65,65.37,65.37,66,65.5, +65.25,64.62,65,65.37,66.12,66,65.75,65.62,64.62,65.25,65,62.88,62.38,62.88, +62.25,62.25,61.5,61,59.63,59.5,60,60.25,60.25,59.38,59.25,58.38,59.75,59.75, +60.38,60.38,59.13,58.38,58.38,57.75,57.5,57.88,58.38,58.13,57.13,57.38,55.5,56.13, +56.63,55.63,55,54.13,52.88,53.5,53.75,53,53.25,53.5,53.25,53,53.75,54.38, +55.75,55.75,55.75,54.38,54.88,55.13,55.13,55.38,55.38,54.25,54.38,54.5,51.63,51.75, +51.63,52.88,53.5,53.75,55,55.25,54.75,55.75,54.88,55.88,56,55.75,55.88,56.38, +57.5,55.88,55.13,56.38,58.13,59.25,59.75,60.25,60.38,60.75,61.25,62.13,62.25,62.25, +61.88,62.25,63.13,63.38,63.5,63.75,64,65.12,65.37,65.87,66.25,67.12,67.75,67.75, +68,70.25,70.5,68.87,67.5,67.62,68.25,69,69.62,69.62,69.5,71.12,70.62,71.37, +72,70.75,71.5,71.25,69.87,69.87,69.75,70.37,70.87,70.25,67.25,68.25,67.75,68, +67.5,63.38,63.75,63.5,64.5,64.62,64.62,65,65.12,64.87,65.25,65.75,64.62,65.25, +65.87,66.12,65.25,65.75,66.75,66.62,67.62,67.25,66.37,65.37,65.12,65.5,66.25,67, +65.25,64.62,62.25,61.88,62.5,62.38,62.38,63.25,63,62.75,62.88,62.5,62.13,62, +63.13,63.25,63.75,63.63,64.12,64,62.88,62.38,62.88,63.13,63.38,64.37,63,63.75, +64.5,65.75,65.87,67.12,67.62,67.75,67.37,69,69.5,68.87,69,68.75,67.62,68.5, +68.75,69.5,69.25,69.87,71,71.37,68.62,68.5,69.25,68.37,66.87,66.62,67.75,67.87, +68,68.25,68.5,69.87,70,70,70.25,70.12,70.62,70.5,70.75,71.12,71.62,71.87, +71.87,72.5,72.37,70.37,70.37,70.5,69.25,70.37,71.12,69.37,69.5,70.25,70,70, +69.75,69.5,69.37,69.62,69.62,69.37,70.12,70,69.5,70.37,70.62,70,71.5,72.37, +73.62,74,76.75,72.37,72.5,73.62,74.12,74.12,74.5,74.25,74.5,74.25,74.5,73.75, +73.5,74,75,75.25,78,78.5,77.62,77.87,78.25,78.25,78,76.37,76.37,304.75, +306.38,307.25,307.38,307.5,310.5,310.5,308.88,309.75,309.5,307,310,309.75,309,310.13, +312.75,312.25,309.88,317.5,321.5,318.5,317.5,314.25,310.5,312,312.25,312.88,310.25,309.25, +312.88,314,313.5,313.38,314.25,321.5,322,319.75,320.38,320.75,321.38,319.75,315.5,318.63, +319.38,319.88,320.75,314.5,317,317.5,316,311.63,312.25,309.25,308.63,309.75,311.75,310, +309.88,309.5,307.75,306.5,307.75,301.25,301.5,301,304,304.75,303.5,305.5,308.63,308.38, +308,308.5,308.25,310,307,301.88,300.63,299.75,306.5,306.63,311,311,312.5,314.5, +313.25,313.5,312,311.25,313,312,310.75,312,312,314.63,316.25,313.88,312,307.5, +308.38,305.75,307,309,308.75,305,306.5,308,306.5,310,295,284.88,285.5,283.25, +271.88,275.38,275,276.5,278.5,278.75,276.5,278.25,279.5,278.38,274.63,274.5,270,267.5, +272,271.75,270.5,268,265.25,264.5,262.25,261.25,262.25,260.38,264.5,265.5,266.75,266, +263.25,268.25,271.5,272.75,276.5,272.5,273,273.88,275.13,277.5,278.25,278.5,277.5,280.75, +279.75,279.75,286,288.5,293.5,290.5,283.5,283,281.5,282,282,281.5,280.5,278.5, +279,282,282.5,281.5,284.5,285.75,288.5,291.25,291.88,294.5,296.38,301.38,300.88,303.38, +304.5,302.5,303,301,294.88,294,295,296.25,297.38,299.5,300,300.75,297.63,295.75, +299.75,299.38,298.5,291.5,291.5,290.75,291.25,293.25,289.75,290.5,289.63,295,293,281.75, +281.5,279.5,276.25,276.75,273,271,270.25,272,269.75,266.88,270.13,267.75,259.5,259.75, +260.75,260.88,260.63,259,259.5,257.5,260.25,262.25,261.88,262,262.5,266.5,267,268.25, +269.75,270,270.63,272.5,276.25,274.25,271.38,270,269.75,266.63,268.5,266,260.75,259.5, +262.38,261.75,261.88,264,262.5,266,266.75,264.63,266.25,267.63,268.5,266.25,266.25,265.25, +260.88,260.38,263.5,264.5,261.25,266.25,267.63,268.75,266,261.75,265,264,258.25,255.5, +257.88,254,253,253.63,244,239.5,242,240.5,241.5,243,244,241.5,238.38,236.25, +237.63,238.38,240,239.88,239,240.75,240.75,241,244.38,244.25,243.5,242.13,243,243.75, +245.75,247.38,246.75,244.75,244.25,249.75,252.25,252.5,253.75,257.13,257.5,256,256.25,255.63, +256.38,256.25,258,257.75,258.5,260.25,260.13,261.88,260.75,258.75,260.5,266.25,266.38,266.88, +266.88,265.75,266.63,267.38,267,266.25,267.25,269.25,269.75,269.25,268,267.75,268.25,268.13, +269.75,268.88,267,271.75,270.75,273,275.25,273.5,271.25,270.63,270.25,268,266.75,264.38, +264.75,266,267.63,266.38,264.5,265.88,265.88,262.75,261.5,262.38,264.75,264.5,264.25,265, +267.13,268.88,269.25,269.25,266.25,261,260.88,259.25,261.5,263,260,260.75,259.5,252.75, +252.38,253.25,253,250.75,253.38,257.63,259.25,260.13,261.25,261,257.5,259.63,259.5,258.63, +257.5,259.25,258.75,258.75,258.5,256,257.63,258,258.38,258.75,259.25,262,262.5,261.25, +260.63,260.5,259.75,260,258.5,258.63,259,259,258,262.5,263.88,264.25,263.38,263.13, +265.25,267.75,268.5,268.63,268.5,269,268.75,270.88,269.5,267.88,268.75,270.38,272,271.5, +269.38,271.25,270.13,269.25,269.38,267.38,268.75,268.25,266.25,266.5,269.63,269,270.5,269.63, +270.75,268.13,268.5,271.5,273.25,274.25,274.38,273.25,274.75,275.5,274.25,270.75,261.63,261.5, +259.88,262.25,261.5,261.75,263.63,263.88,266.38,265.75,268.88,267.25,266.5,262.25,260.38,261.25, +260.25,258.75,258.38,259.88,258.5,253.75,252.25,253.5,253.75,253,252,250.75,248.38,249, +246.63,249.25,249.13,248.38,248.13,249.63,251,254.5,256.5,255.38,255.13,254.25,252.88,255.5, +257.25,257,260,262,263.75,262,260,259.75,261.63,262,260.5,259.63,263.25,270.5, +271.5,272.88,272.63,272.5,275.5,278,279.25,277.25,276.88,275.5,276.75,278.13,278.5,278.5, +280.5,281.25,279.5,280.75,282.63,285.63,285.5,284,284.75,284.13,285.63,286.13,285,284.38, +284.5,280.13,281.25,280.5,279,278.5,277.5,277.75,276,276.13,276,276.63,277,270.88, +271.88,274,274.5,274.25,269.63,270,270.25,272.13,270.5,272.25,271.75,276.75,277.88,275.25, +274.25,269.5,269.5,273,276,275.5,279,279.63,275.75,273,271,271.25,269,272, +273,274.13,276.5,274.75,277.25,280.5,282,280.5,279,280.13,278,271.75,272.38,270.38, +266.25,269.25,268.88,270.5,270.5,271.25,272.63,274.13,273,273.75,274.5,272,273.88,273.88, +271.63,274,275.5,272.5,271.75,273,270.75,271.38,267.5,266.25,265,264.5,264.88,261.88, +260.63,261.75,267.75,269.38,270.75,272.5,272,268.38,266,263.5,259.75,257.25,264,264.75, +265.5,265.25,265.38,271.5,273.25,279.13,278.75,281.63,281.88,280.38,281,281,283.25,283.5, +285,287.5,287.5,285.5,286.13,288.5,287.75,286.75,285.63,284,279.5,278.5,280.13,279.63, +279,280.13,280.13,278.5,278,277.25,274.75,272.75,270.38,272,272.75,273.75,273.5,275.13, +279.63,280.5,280.75,280,278.88,278,279.75,278.5,275.25,275.25,275.63,277.5,275.88,272.88, +273.5,273.75,273.13,275.5,275.5,273.88,272.5,272.5,272.75,275.5,276.38,279.5,280.38,280.38, +280,279,279.38,278,277.25,276,278,278.88,276,276,276.75,275.25,272,272.88, +270.5,270,269,263,260.5,260.75,257.88,255.75,255.13,254.63,253.63,256.25,258.5,258.25, +256.5,257.25,254,252.75,251.5,253,257.5,257.63,255.25,254.25,253.75,255,257,257.25, +259.5,258.25,251.25,250,251.5,252.88,252.75,254.38,256.75,256,259.75,259.25,260,262.25, +262,261.75,259.25,257.5,262.88,263.75,270.75,269.5,269.25,271.75,273.25,272,267.25,263.75, +262.75,260.75,261.75,260.5,262.5,265.13,262,260.25,259.25,259.63,262.5,262.75,261.25,265.88, +265.88,262.25,262.5,260.13,257.5,259.25,260.38,260.75,259.25,256.38,261.5,262.5,263.13,262, +264.5,262.25,257.25,255.25,255,258,260.5,258,257.75,257.25,263.25,264.5,261.25,259.25, +259.75,257,252.25,255,256,255.5,251,252.5,253,250,242.75,242.88,241.25,238.38, +236.25,231.75,230.75,231,230.88,230,226.5,225.25,223.5,224.63,223.5,223.5,220.75,218, +219.88,221.5,220.75,219.88,216.88,215.75,217.75,218,215.88,217,220.63,220.13,219.63,224.25, +227.25,226.5,226,225.25,222.88,222.75,222,220.75,225.75,225.25,223.25,225,224.75,219.88, +216.88,217.63,218,217,214.25,212.75,212.75,213.5,214.25,215.5,211.75,214.75,215.75,213.75, +214.75,211.88,210.5,212.5,210,213,210.5,207,209.25,206.75,202.38,203.5,195.5,188.75, +189.75,191,195,196.25,193,193.25,188.75,190.25,190,186.5,180.63,180.25,180,183, +182.75,180.75,185.88,183.5,182,183.75,182.75,186.5,187.5,186.5,181,181.75,182,180.25, +178.75,178.13,182.25,183.75,182.25,181,182.25,185.38,183.5,183.75,185.75,186.25,188.75,190.25, +190.75,195.25,194.88,194,192.25,194.5,194.5,198.75,199.25,203.5,201.88,205.25,207.75,209.5, +208,208,209.25,210,206.5,207,208,207.5,210.75,211,211.5,210.5,213.25,215.38, +213,210.25,208.38,205.5,209,208.5,208.75,211.75,213.25,212.88,215,217.63,218,218.75, +219.75,219.25,215.75,215,216.5,219,219.38,216,216.5,220,219.25,219.25,226.38,227.38, +223.5,218.75,214.5,211.5,212.5,214.88,215,210.75,212.5,210,204,207,210,209, +211.75,215.75,215.25,212.88,217.38,212.75,212,209.5,206.25,212.5,210.5,201.5,198.38,200.5, +204.25,207.75,207.5,208.5,210.5,212,210.5,206.25,210,216.38,214.75,219.38,218.75,218.25, +217,216,221,220.5,220.13,219.25,220.25,224.75,220,215.75,214,212.5,209.75,217.75, +220.75,218.88,217.75,220.75,221,218.25,210.5,201.88,201.88,197.75,202,199.88,194.75,193, +189,191.5,188,188,162.88,164.63,165.25,163.5,162.25,160,160.75,164.5,170,170.5, +172.5,173,168.5,167.13,166.5,170.25,171.25,171.38,168.88,164.25,166,168.75,167.5,170, +170,171,173.25,171.63,168.25,170.5,173,175.63,174,168.5,165.75,171.5,172.75,170.5, +175.5,178.75,181.5,178.25,174.5,175.25,173,171.88,174.75,177.5,184,187.75,186.25,189.88, +191.75,191,191.25,200,196,191.25,193.5,194.25,197,191.75,181.25,183.75,181.25,185.5, +195.5,192.5,186.75,181.5,181,182,184,179.38,179.5,172,164.5,164.75,159.5,160.5, +163.5,161.75,159.5,166.75,164,171,168,175,173.5,173.75,166.5,168.5,159.75,157.25, +165,172.25,175.25,178.5,185.5,183.5,180,192.5,193.5,192,195,194.25,196.5,195.25, +196.5,200,200.5,196.75,201,202.5,202,203.75,209.75,210.75,215,215,211.75,206.88, +203.5,203.75,207.5,207.5,203.5,214.5,222.75,222.75,223.88,219.88,220,221.5,217.75,216, +221,215,200.75,203,203,202.25,209.13,213.25,213.5,213.5,214,215,220.5,221.5, +215.75,213.75,218,218.5,219.5,222,226.75,228.25,226,229,230.5,232,227.75,222.5, +222,219,215,214.75,217.88,219.5,218.75,216.75,220.25,221.5,220.75,219.75,223.75,223.5, +224.5,224,230.5,230.75,228.5,228.5,224.5,228.75,232,231.75,229,225,226.75,222.5, +227.75,230.38,232.5,233.75,237,235.5,234.5,233.5,232,234.5,235,233.5,236.5,242.5, +239.5,235.25,236.5,240.25,242.5,249,250.75,247.75,244.5,247.75,246.75,247.5,250.75,250.5, +251.5,254,251.5,246.5,243.25,244.75,244.5,242,236.75,238.25,238,240,237.75,237.5, +237,238,235.5,238,233.5,229.5,232,230,233.5,237.25,237.25,238.5,239.5,240.75, +244.5,249.75,248.5,244.25,248,248.75,248.25,250,249.75,245,251,251.5,244.5,242.25, +245.75,240,235,228.25,230.75,230.75,238,245.75,247,249.5,255,256.25,248.5,239, +244,251,254,249.5,244.5,251.5,255,253,263.5,266,267,260.75,257.75,260.5, +264.75,268,271,270.75,268.25,269.5,276.25,277.75,274.75,284.63,288.25,286,290,290, +284.75,282,285.75,279.5,280.75,279,285,284.75,281.75,284.75,288.75,291.75,291.5,288.75, +289.75,288.25,295,292.5,285,282,280.25,284.5,283.75,284.5,261.75,263.5,262,251.5, +254,257.5,257.75,261,264.5,267.5,261,260.75,264.5,271.75,270.75,261,285.13,298, +294,292.5,291.5,296,298.25,298.75,298,300.5,303,304.25,305,306.5,304.5,299.75, +300.25,300,300.75,301.25,302,304.75,303.5,303.5,302,305.5,306.75,306,310.75,312.75, +312,314,314.75,323.5,320.75,320.75,322.25,322.5,313.5,316.5,318.5,319.25,316,319.5, +319,316.5,319,320,314,305.5,302,301,304,314,319.5,319.75,314.5,315.5, +314.13,320,319,322.25,318,317,319.75,328.5,333.5,330,327,325.25,332.5,319.75, +317,310.75,314,319.75,324,328.5,408,400.5,396.5,393.75,386.75,395,400,402, +402,403.5,409.5,415.5,423,422,419,425.25,424,417.75,417.75,409,411,411.5, +409.75,423.5,428.25,432.5,432,425.75,429.75,430.75,432.25,436.25,435,429.5,428,424, +426.5,428.75,432.75,437.5,439,437.75,438.5,435,429,428.88,441.25,440,442.88,448.5, +449.75,449.5,446.75,444,442.5,443.25,445.5,445.75,442.13,444,435,431.5,432,433.5, +442.5,445,447.5,447,442.75,447.25,450.75,456.5,450,446,439,442,440,432, +432,438,437.75,445,442,438,448.5,444.75,439,439,430,424.25,424.75,429, +425,423,415.5,419.25,420,419.5,412.5,413.75,409.5,403,399,395.5,390.5,389.75, +392.75,393.75,397.5,401,397,399,403.75,405,404.5,397.5,399,400,400.75,401, +391.25,387,386.25,387.25,394.25,394.5,388,385.5,385.25,385.5,390,388,377,374.75, +376.25,383,388.5,390.88,391,389.75,385.5,381,380.75,383.5,388.75,390.5,392.5,387, +379.25,379.75,372,380,383.5,388.5,394.25,403,403.38,403.75,403.5,407.88,407.5,406.75, +406.75,405.75,407,401.5,399,399.75,401,400.88,399.25,397,400.25,400.5,398,398.5, +397.75,400.5,403,405.5,406.75,409.75,409.25,409.5,409,407.5,408,413.5,414,414.5, +413.75,416.5,417.25,421.5,422.75,426.75,425.5,425,423.5,419,420.25,417,416.5,411.5, +410,400.75,399.75,398,398.13,400.5,401,396.5,391.5,394,388.75,395.75,401,397, +398.75,399.5,404,405.5,405.13,401.75,395.25,394.25,392,394.25,395,393.5,397.25,396, +400.75,398,398.75,399.5,400.75,399.75,393,393.25,394.63,397,395.5,396.5,397.5,401, +401,399,403.25,406,404,404.75,402.5,401.5,398,395,389.5,387,386.75,386.5, +386.5,386,385.75,387,389.75,385,383.75,386,386.25,387,384.5,385,383.5,385.5, +389.25,390.75,396.75,399.5,395,398,398,399.75,393.5,393.75,391,393.5,393.75,389.5, +387.75,383.5,383.63,386,385,384,382.5,380.75,379,381,377,374,374.5,374, +377.75,382,385,384.5,383.75,381.75,378.75,380.5,373.75,370.75,371.75,373,371,371.75, +373.5,368.75,372,370,370.25,372.75,374.75,374.75,375,372.25,371,372.25,375,374.88, +369,369.88,372,369.25,370,370,366,370,365,355.25,353.5,350.75,350,341.25, +347.5,341.25,339.75,342.75,341.5,343.5,340,338.5,338,337.25,340,339.75,336.5,339.75, +345,347,348.5,339.75,339.75,328,325.25,328,324.75,318.5,317.25,317.25,320.75,321.5, +312,310,305.5,302.5,298.75,294,293.25,295.25,295.75,301,301.75,302,295,296.5, +296,299.75,302,300,300,306.5,303.5,295.75,300,301,301,300.5,304.75,303.25, +308,305.75,308.5,309.25,309.25,309.25,309.5,313.63,315.25,306,309.25,312.5,309,307.75, +308,306,306.19,304.25,306.5,304.5,309.5,308.75,308.75,306.5,304.5,302.75,302.5,303.75, +300.25,304,305.75,310.75,311.75,313,308,301.75,305.75,307.5,316.75,317.5,315,318.38, +318.88,314.75,310,310,315,318,320,296.5,297.5,291.5,287,285.75,287.75,288.75, +292.75,294.75,296,297.75,299.88,301,296,299.5,299.5,301.75,301.75,301.88,296.75,301.5, +302,301,314.5,316,316.5,313.5,317.25,317.5,319.25,318.5,317.5,314.25,312.5,312, +315.75,316.25,317.5,316.75,320.13,323.75,325,322.5,323.5,325.75,322,318.5,319.5,323.75, +329,327.75,329,331.5,333,338,339.75,340,343,347.5,349.75,342.13,339.5,344.5, +339,343.75,344.5,345.25,347,349.5,354.75,353,355.5,355,361.25,362,361.25,358.5, +358,356.75,352.5,355.75,356,355.25,353.75,358.75,359.25,361.25,360.5,362,364,362.75, +360.75,359,358,359.75,358.25,360,359,356.25,357,359.5,361.75,362.25,365.75,364, +363.25,364.75,354,349.5,350.25,350.75,348.5,345.5,342.75,338.25,338.5,339.25,336.5,338.75, +339.5,335.5,331,331.75,337.25,340.38,343.5,339.5,339.5,338,341.25,341.75,337.5,331, +329.25,328.75,328,325.5,321,326,327.75,321.75,317.75,316,314.75,314,313.75,315, +316,317.75,316.5,314,316.75,319.5,320.5,318.25,316.75,319.75,320.75,320.5,318.5,315.75, +316.75,318.75,318.25,316.75,315.75,314,311.5,316.75,319,319.88,318,319.25,316,314.75, +315,314.25,309,309,308.5,300.75,300,300.5,296.75,293,292.5,295.25,293.25,296, +298.5,303,300,299,294,296.5,300.5,300.75,299.75,297,300,297.25,291,294.75, +295.25,289.5,295.5,292,286.75,293.5,294.88,294.75,293,294.75,298.5,305,307,309.75, +308,301,297,295.5,292.75,292,291.25,288.5,281,275.25,280.38,284.75,277,271.5, +266.5,270.5,271,270.75,276.75,275,274,270.25,264,265.25,269.5,271.5,267.75,270, +268,262.75,250,244.75,242.75,240.25,235.25,229.88,230,235.75,239.75,245.5,249,249.75, +250.75,250.5,251.88,253.25,254.75,254,253.75,255,256,258.5,259,258.25,262.5,260, +255.5,253,251.75,252,254.5,256,252.5,247.25,250.38,255.25,254.75,259.75,260,261, +262,262.25,270,273.25,275.75,272,272.75,271,263,260,262.25,268.75,269.5,273.5, +273.25,281.25,284.75,286.5,287,279.75,267.75,260.5,247.25,247.25,250,245.75,255.5,268.5, +271.5,271,274.5,278.75,288.25,289.5,290.5,290.13,291,284,294.63,299,300.25,301, +299.75,310,311.5,314.5,319.63,325,325.75,323.5,325,327,326.5,331,337,330.5, +324,323,323.5,330.75,337,340.5,338.5,337.75,335,337,328,322.75,323,323.75, +324.25,324,321.75,329,328.75,332,326.5,320,329.13,332,334.75,335.5,341,345, +345,349,348.5,352.5,354.5,354.75,349.75,350.75,352,355,355,351.5,351.5,345.25, +339.5,346.75,346.75,343,344.75,344.75,347.25,345.75,354,359,357,356.5,357,355.13, +387,381.5,375.5,376,369.75,370.5,369.5,368.75,369,368.25,365.75,364.5,360.25,362.75, +361.5,359.5,360,366,367,360.75,354.5,358,359,360.25,356.75,356,361.5,359, +360,357.5,359,359.5,361,357.5,351,351.75,350,354.5,357.25,363.5,363.75,363.75, +364.5,365.75,368.5,368.75,368.5,365.25,361.25,361.25,360.5,360,362.25,359.5,360,363.5, +365,365,356.5,357.25,358.75,353,353.5,356,355.75,353.5,347.75,349.88,347.75,345.75, +350.5,349,346.75,345.5,346,347,348.25,351,356,357.5,360.25,359,353,349.5, +347.5,347.75,347.25,345.5,346.5,349.5,338.5,337.5,340.5,341.5,345.25,345.5,349.88,348, +346,341.75,346.5,350.75,349.5,346.88,344.25,341.5,339.5,338.75,335,330.5,334.25,337.5, +337,338.5,334.5,334,331.75,326.5,320,323,316.25,318.5,321.5,322,325,326, +332,328.5,324,332,333,336,335.5,345,351.5,364.5,348,339.25,339.5,334.5, +329.75,325.5,326.5,315.5,319,317.75,318,314.25,314.75,313.25,309,311,313,314.25, +318.5,319.25,320.5,321.5,320,324,322.5,329.25,329,327.5,324,324,323.75,329, +333,332.5,334.88,331.5,328.25,329.75,331.5,332.5,331.75,328,327.5,328.5,330.25,328.5, +324.5,318,316,313.5,313,308.75,308.75,308.75,311.25,312,312,314.5,313.75,312, +309.5,309,311,313,316,315.5,311.5,310.25,309.5,307,305.5,305.75,304.75,301.75, +303,295.75,300,303.5,307.75,303.5,299.75,302.5,302.5,298.5,296,297.25,298,298.5, +299.5,297.5,296.5,302,300,306.5,310.5,310.5,306.75,303,298,299,296.75,297, +297.25,297.5,297.25,300,300.5,300,300.5,303,303.75,303,300,313,312.75,309.5, +308.5,303.75,310,311,306.75,303.5,307.5,312,315.25,317,318,321.5,324,322, +321.88,329.5,326,319.75,318,319.75,327.5,329,328.5,328.25,330.75,330.25,334.75,334.75, +334.5,331,328,327.88,326.5,325,327.75,327.25,327,324,320,316,317,317, +317,309.75,307.5,314.5,316.75,317.5,323.5,327,329.5,327,319,318.5,325.75,327.75, +333,331,332.25,332.5,326.75,330.5,335,335.5,337,337,337,334,337.5,336.75, +337.5,339.5,338,338,341,341.5,341.5,339,336.5,337.5,338.5,340.5,340.5,343.63, +346.5,344.75,345,341.5,344.75,343.5,339.5,335.5,341,338,336.5,336.5,344,340.5, +332,337,346,344,346.75,353,358,356.5,360.5,358.75,362.5,364.75,365,358, +352,356,359.75,360.5,357,358,359.75,358.5,350,358,359,371.75,371.75,371.75, +370.5,369.5,370.5,375,375,357,345.75,335.5,333.75,329.5,328.25,334.5,330,326.75, +328.25,335,335.25,336.75,338.5,343,344,343.88,345.25,345.25,349.5,350.75,343.25,338.75, +334.5,331,329.75,331.5,327.5,639,640.75,644,644.5,647,649.88,649.5,648,643, +638.5,638.5,648,637.5,632,613,604.5,599.75,596,589,595,588.5,589,592, +599,593,586.13,594.5,597,593.75,582,590,590,571.5,573.75,580,586,596.5, +594,590.5,597.25,600,595,588,579,592.5,586,577,575.5,591.5,592.5,591.5, +594.5,602,599.75,606,612.5,620,620.75,618.5,623.5,626,619,624,624,616.5, +624.75,626,620.5,614,604.5,603,598,599.5,601.75,616,627.25,627.75,626.75,626.5, +619,622,625,626,623,632.5,646,648,644.5,647,647,648,643,633, +633.5,630,616,615.75 +}; + + + + + + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c new file mode 100644 index 000000000..ce311ee75 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c @@ -0,0 +1,719 @@ +double gDataLow[10000] = { +110.01,109.15,108.08,109.13,108.66,103.7,109.91,111.74,112.31,109.7,110.73,112.26,112.25,111.7, +111.7,111.5,110.06,110.02,113.52,115.62,115.52,115.24,115.02,114.85,113.94,114.65,110.04,109.45, +108.42,108.1,108.22,108.25,108.25,108.2,107.66,105.98,105.24,104.58,104.1,105.22,104.4,104.82, +104.5,104.44,105.61,105.95,104.9,104.89,103.88,102.81,102.1,102.15,102.5,101.75,101.56,102.39, +105.54,105.58,106.02,106,105.21,105.3,103.85,103.57,105.25,106.01,106.87,105.6,104.73,104.53, +104.7,104.79,104.67,103.71,103.7,102.21,102.4,102.25,101.35,102.13,102.05,100.97,100.06,100.21, +98.73,97.23,95.05,93.91,94,94.4,96.02,94.72,94.59,94.53,94.95,96.16,96.12,95.75, +95.57,95.33,94.06,93.57,93.96,93.8,94.2,94.32,94.65,94.65,93.83,93.55,93.39,93.02, +93.1,92.1,92.62,92.97,92.82,92.52,93.62,92.26,90.1,90.84,88.77,92.47,92.88,96.46, +97.41,97.77,98.7,98.55,98.63,98.48,98.25,97.8,98.22,97.81,98.65,99.12,99.54,98.9, +98.88,97.96,98.35,98.5,97.45,96.84,97.22,96.58,96.2,96.12,94.55,98.91,99.9,99.3, +98.5,98.5,97.93,99.07,98.35,96.91,96.88,96.26,96.83,96.87,96.27,94.92,95.24,95.53, +95.7,94.91,94.8,95.05,94.54,94.5,93.3,93.56,93.47,93.55,94.01,93.44,92.25,90.55, +91.25,91.01,90.43,91.12,92.98,92.8,92.85,93.01,93.31,92.6,92.54,91.65,91.41,91.63, +92.37,92.01,92.41,91.5,91.18,91.25,91.5,91.5,89.8,90.58,91.25,90.94,90.8,90.01, +89.55,89.31,89.73,86.22,85.75,84.44,84.1,83.79,83.56,83,82.5,82.6,81.63,81.56, +81.58,81.77,81.72,81.71,81.7,81.28,81.01,81.35,82.2,81.42,82.17,82.79,81.74,81.84, +81.06,80.25,79.35,79.31,80.17,80.6,80.81,80.78,80.84,80.06,79.76,79.14,78.87,78.42, +78.61,78.87,78.63,78.53,77.35,76.31,75.6,75.2,75.05,75.39,75.11,75.28,75.32,75.4, +76.2,75.75,76.15,76.26,75.75,75.36,75.31,74.92,74.5,75.2,76,72.73,73.2,73.37, +73.83,74.82,75.44,75.87,76.12,77.57,77.52,77.27,76.79,76.56,76.06,76.32,76.8,76.94, +77,77.98,77.25,77.34,77.57,76.95,76.93,76.82,77.01,77.05,76.75,79.12,78.5,79.01, +79.15,79.81,79.61,80.15,79.7,79.65,79.06,79.64,79.4,79.51,80.03,81.02,82.07,81.8, +82.3,82.45,82.6,82.41,82.3,82.7,82.4,82.45,82,82.1,81.98,82.7,82.71,81.6, +81.1,81.38,81.64,81.26,81.7,81.4,81.12,80.63,80.75,82,82.44,83.36,83.32,82.8, +82.65,82.29,82.83,82.2,82.29,82.58,82.99,82.93,83.35,83.58,82.99,82.82,82.61,82.64, +81.47,81.45,81.03,80.8,80.25,79.86,79.9,79.51,79.54,79.78,79.71,79.95,79.85,80.04, +79.97,79.97,80.13,80.13,80.5,80.35,80.18,80.2,79.5,80.24,79.3,78.93,79.72,80.9, +80.65,81.17,80.21,80.75,80.59,80.61,80.8,80.92,81.25,83.02,83.52,82.54,82.5,83.4, +83.4,83.12,83.38,83.41,81.25,81.33,80.81,81.56,82.22,82.8,82.89,83.39,82.3,82.46, +82.06,82.65,83,82.75,82.95,83.5,85.76,86.33,86.67,88.45,88.56,87.71,88.36,89.05, +88.73,89.02,88.75,88.62,87.95,86.88,87.01,87.17,85.76,85.39,84.03,84.11,84.15,82.3, +82.49,83.11,83.07,82.65,81.31,80.64,81.29,81.3,80.5,82.25,82.72,82.71,82.6,82.91, +82.88,82.38,83.35,81.93,81.6,81.7,81.95,81.97,81.08,80.09,78.7,79.56,79.93,79.5, +79.97,78.87,78.06,77.16,76.93,77.5,77.3,77.37,78.63,79.01,79.83,79.67,80.42,80.52, +81,80.52,80.5,80.32,79.7,79.46,79.34,79.87,79.98,79.9,80.26,80.72,81.23,81.6, +81.85,81.36,80.8,80.84,81.09,81.61,82.06,81.62,81.97,82.94,83.02,82.73,82.98,83.11, +83.04,82.85,83.22,83.27,82.81,83.85,83.92,83.86,83.4,82.99,83.7,81.68,81.52,82, +81.16,79.18,78.52,77.14,75,74.4,74.16,74.3,74.07,74.62,73.45,73.5,74,75.06, +76.67,76.11,75.57,76.38,76.31,75.15,74.73,74.45,74.1,74.23,74.63,75,74.92,75.74, +76.68,75.57,75.5,76.53,76.29,75.17,75.56,76,76.36,76.37,74.69,73.33,73.09,72.52, +72.5,72.51,73.04,74.71,74.97,75.33,76.5,75.93,76.03,75.91,75.65,75.5,74.65,74.05, +73.26,72.8,71.85,75.25,76.14,76.33,83.47,84.24,85.17,86.09,87.5,88.1,88.71,89.26, +89.77,90.04,90.22,90.32,90.18,90.62,90.7,89.82,89.26,89.27,89.09,89.7,90.25,91.2, +91.5,91.2,92.09,92.01,91.7,91.59,92.36,92.2,92.75,92.59,92.41,92.29,91.85,91.55, +92.23,92.9,93.74,94.2,93.48,93.16,92.5,92.3,92.54,94.13,94.33,93,93.06,93.63, +93.37,93.05,92.48,91.44,91.94,91.95,91.76,92.23,92.6,92.93,93.62,93.55,93.7,94.06, +94.71,95.24,95.47,96.05,96.4,96.52,97.25,98.49,98.07,97.8,97.37,97.38,97.5,97.29, +96.51,96.35,96.2,96.8,96.81,96.29,96.08,96.1,95.71,95.77,95.99,96.65,96.55,95.49, +94.47,94.24,94.94,94.58,95.04,94.55,94.16,94.25,95.03,95.3,94.65,94.8,94.56,93.54, +92.92,93,92.5,92.4,90.82,90.97,89.5,89.23,88.95,89.43,88.5,88.25,87.31,87.29, +87.66,88.29,88,84.29,84.6,84.3,84.43,85.58,86.27,86.51,87.4,87.1,87.13,86.72, +85.88,85.01,84.15,83.88,83.98,83.78,83.24,84.17,85.34,85.4,85.44,85.93,85.89,86.15, +86.08,86.25,85.86,84.88,84.6,83.96,83.85,84.01,83.65,84.39,84.59,84.69,84.55,84.35, +84.65,84.52,84.45,83.57,83.66,83.51,82.51,81.9,83.1,83.81,82.87,83.42,85.01,85.25, +85.44,86.42,86.39,86.23,84.88,85.45,84.51,84.5,84.68,85.3,85.3,84.4,84.28,83.61, +83.78,85.2,83.42,83.51,83.58,85.05,85.13,86.6,86.57,87.7,87.9,88.36,88.94,89.84, +89.84,89.13,89.31,89.9,90.07,90.09,90.23,89.62,89.89,89.81,88.4,88.01,87.5,87.35, +87.89,87.3,88.25,87.98,88.04,86.55,86.55,86.91,87.05,86.5,86,85.15,86.07,86.26, +85.12,86.82,86.37,87.62,87.59,88.51,88,87.2,88.01,88.19,90.21,90.56,90.35,90.36, +89.7,90.69,90.65,91.7,91.04,93.06,92.1,92.5,93.4,92.55,92.51,93.02,93.51,93.33, +91.62,91.51,91.35,92.18,92.16,91.45,91.04,90.68,90.28,91.51,91.9,92.45,91.42,90.88, +91.68,91.15,92.68,93.77,94.59,95.56,96.13,95.6,96.62,96.15,96.1,96.25,96.23,95.2, +95.46,97.19,97.52,98.15,99.32,99.08,99.3,98.8,98.41,98.6,98.25,98.26,99.3,98.95, +98.5,97.84,96.55,97.28,98.7,97.56,97.1,97.32,96.64,95.73,94.71,93.55,89.75,89.01, +91.21,91,92.03,92.47,92.14,92,91.2,92.16,92.36,93.03,92.3,92.18,92.34,92.78, +92.67,92.5,92.85,91.88,92.08,92.24,91.92,90.65,90.61,90.52,90.5,90.03,90.3,90.52, +90.48,89.62,89.11,89.27,88.95,88.23,88.38,88.32,88.9,89.03,89.81,90.16,89.31,88.89, +89.55,88.26,87.72,88,88.86,89.48,89.2,89.06,89.15,88.52,88.05,87.72,87.53,87.9, +88.7,88.86,88.81,88.66,92.74,92.32,92.58,92.36,92.2,91.95,90.4,90.51,90.57,89.22, +88.7,87.9,89.07,89,89.2,89.33,90.56,90.9,91.8,90.46,90.2,88.49,88.39,87.2, +86.4,87.61,88.93,88.35,86.75,85.69,86,82.3,81.56,81.27,81.9,81.27,81.75,82.96, +82.85,82,82.56,81.9,81.2,80.69,80.58,80.65,80.28,80.35,79.38,78.73,79.8,80.06, +80.05,81.1,80.58,81.6,82.04,81.57,81.51,81.73,81.52,82.21,83.21,82.5,85.85,85.82, +85.42,83.7,83.47,84.85,85.19,84.74,83.48,83.75,81.4,82.5,83.22,82.82,82.09,82.85, +82.97,84.69,84.5,83.22,83.8,82.55,82.51,83.55,82.29,81.21,79.81,79.84,81.75,83.83, +83.24,87.25,87.45,87.2,87.4,84.51,85.1,85.8,85.08,84.89,86.41,88.95,89,88.3, +88.56,87.1,86.4,85.75,86.5,86,86.52,84.45,84.47,84.68,84.97,83.62,83.86,84.63, +84.96,82.6,83.1,81.89,82.74,79.71,78.16,78.45,78.13,78.63,78.47,80.25,80.04,81.71, +79.9,78.12,78.31,80.5,80.51,81.18,81.74,82.23,82.76,80.64,81.08,81.49,77.84,78.11, +75.31,73.17,75.2,75.5,75.71,76.7,76.25,76.53,77.12,77,76.75,77.3,76.9,78.56, +78.16,78.71,78.82,77.91,75.35,74.31,76.5,77.31,76.45,76.61,76.51,76.87,76.25,77.75, +77.02,78.3,78.57,78.36,77.61,78.82,79.8,79.39,80.5,81.18,85.38,86.95,87.22,87.35, +85.7,84.75,84.07,83.75,81.81,80.21,78.19,77.1,75.6,76.61,78.26,79.76,79.44,78.88, +78.35,78.24,80.03,79.05,78.27,79.7,79.99,78.6,79.5,81.07,82.6,82.82,85.15,86.3, +86.76,85.85,84.39,83.52,83.8,82.05,77.9,77.84,79.08,79.01,79.4,77.98,77.3,76.7, +77.2,78.32,80.05,80.47,81.7,78.32,78.5,76.02,74.2,74.56,72.16,71.75,72.46,73.62, +72.94,70.26,71.23,64.24,66.58,61.54,61.5,54.01,54.81,54.8,56.6,55.77,58.95,58.35, +58.99,57.99,60.31,61.33,60.99,59.55,62.37,63.9,64.65,68.86,71.35,71.23,71.31,71.64, +74.06,73.85,71.85,73.07,71.5,71.6,72.3,75.1,75.15,75.67,77.3,77.8,79.35,80.2, +79.55,80.18,79.01,75.98,74.6,71.35,71.19,70.61,70.4,68.35,66.8,66.61,65.85,67.12, +67.22,69.11,70.02,68,65.76,67.3,65.7,66.66,68.31,70,70,69.62,68.48,66.6, +68.8,67.55,68.53,69.45,71.03,72,67.87,67.7,67.16,71.25,69.1,66.1,68.41,67.25, +68.19,71.43,73.25,75.47,75.16,73.25,75.3,73.25,75.2,76.6,77,78.89,79.11,77.6, +78,80.4,80.22,81,81.69,82.62,82.52,82.74,83.3,83.93,85,83.4,84.05,82.19, +79.5,79.25,79,78.2,75.92,76,81.11,83.13,81.67,83.53,83.55,84.7,85.77,86.27, +87.24,87.36,87.6,86.9,84,85.58,84.7,84.4,83.34,88.2,87.1,85.35,97.25,99.5, +98.9,100.51,102.4,103.39,102.5,102.3,103.5,105.07,104.7,105.49,106.49,106.23,105.59,106.59, +106.7,105.51,103.6,104.82,103.24,104.75,104.16,103.13,98.5,97.82,96.7,95.99,97.12,95.76, +96.01,97,98.86,101.7,107.2,106.12,106.06,104.51,102.61,103.86,105.33,106,105.99,106.64, +104.46,101,102.41,107.06,108.1,107.07,107,110.33,112.81,117.26,117.25,117.72,117.1,120.28, +121.42,124.15,123.73,123.7,123.98,120.25,119.8,120.95,122.35,122.64,121.81,121.1,121.71,122.15, +121.01,121.35,120.15,119.41,120.12,120.06,119.8,119.41,118.75,119.8,116.65,113.38,113.21,113.8, +111.81,112.1,114.07,115.2,113.72,113.05,114.25,113.77,112.55,113.84,113.33,115.7,112.05,113.1, +113.61,113.03,109,109.08,108.77,106.9,108.07,107.76,108.62,109.62,106.75,106.09,104.55,101.9, +100.07,100.78,102.9,99.66,99.85,98,96.5,94.9,96.76,96.75,95.37,96.8,92.4,92.1, +91.34,89.9,87.49,90.3,93.41,91.8,89.5,92.85,92.45,93.68,92.55,95.59,96,97.65, +99.61,99.29,99.24,98.86,103.82,104.87,106.64,103.41,103,101.76,101.4,102.8,103.9,103.66, +105.01,105.4,104.65,102.81,102.7,104.1,105.26,105.79,107.1,107.21,105.31,105.15,104.76,104.11, +102.93,102.73,103.79,105.3,103.03,103.1,103.2,104.75,107.28,106.11,105.62,101.56,101.6,103.65, +105.81,111.79,112.76,112.96,113,113.75,112.45,111.1,111.78,112.5,111.36,111.76,114.56,113.31, +113.38,113.99,116.53,115.55,116.1,115.6,117,116.5,113.56,112.85,111.9,111.64,112,115.08, +117.76,117.5,117.1,117.25,117.55,114.9,115.05,112.2,112.5,111,110.96,115.2,115.3,115.5, +115,111.2,112.35,113.74,114.9,114.72,114.55,113.68,111.99,112.3,111.68,113.75,110.45,102.3, +97,95.2,95.15,95.8,96.56,93.8,96.4,95.53,90.05,90.1,93.58,95.14,94.26,94.25, +93.97,93.75,90.29,87.65,87.75,88.1,89.2,88.2,95.17,93.34,94.2,95.02,97.9,105.37, +105.66,105.25,102.64,100.94,97.5,99.1,102.56,101.83,100.25,103.38,107.29,110.78,113.94,116.38, +112.5,113.07,110.3,111,114.03,112.67,111.2,109.3,109.6,111.2,112,113.4,112.47,109.19, +109.44,108.94,107.62,108.19,107.25,103.5,94.31,91.81,92.37,91.25,91.69,91.44,91.56,91, +92.69,83.75,84.12,84.25,82.12,83.56,84.25,84.5,80.06,84.81,89.81,88.37,87.31,91.81, +90.69,92.5,93.75,95.75,93.12,94.81,99.62,95.75,94.37,92.25,96.69,97.37,98.44,99.25, +98.31,98.5,100.87,98.25,98.25,97.62,98.5,91.62,93,95.69,99.25,100.69,99.44,99.37, +98.5,97.25,93.75,90.31,91,87.62,86.94,90.19,91.06,94.19,92.69,90.25,108.56,108.56, +104.19,103.12,107.5,112.44,114.31,112.75,111.56,108.56,110,112.62,110.25,115,115.5,118.37, +121,121.31,120,123.5,122.56,123.06,124.75,126.31,122.75,124.06,123.62,129.38,131.88,130.38, +130.81,132.63,131.63,129.56,131,129.75,124.25,122.69,119.87,121,120.06,120.12,119.5,119.5, +120.75,119.31,119.19,117.87,118.75,115.56,115.81,114.31,112.31,110.75,110.25,110.06,108.87,109.31, +108.87,110.25,111.62,113.75,111.75,101,102.62,104.19,103.12,102,102.62,101,102.87,101.62, +100,101.12,108.31,108.62,110.06,109.87,108.75,112.87,110.81,111.25,113.5,115.37,113.25,113.25, +115.87,115.5,116.75,118.84,118.87,117.5,111.5,111.25,108.44,107.62,105.5,107.19,107.69,104.56, +106.37,104.19,107.12,103.44,105,104.69,106.12,105,102,103.25,103.19,102.06,108.25,107.62, +106.5,107.19,106.56,110.69,110.44,110.12,108.69,109,106.44,101.25,102.06,102.81,110.06,103.31, +102.87,110,111.69,117.81,121.56,121.5,122.62,119.75,115.06,119.44,117.06,118.69,118.5,122.06, +124.62,115.06,111.62,113.87,111.94,109.94,107.69,107.87,106.12,107.37,102.5,105,104.12,102.75, +101.69,101,106.06,99.5,100.06,100.94,103.94,104.94,108.19,108.5,108.75,111.5,115.75,115.25, +113.87,114.5,114.56,116.87,117,116.19,113.12,114.81,114.06,110.37,109.12,109.62,110.06,111.62, +116,116,116.56,119.94,119,112.69,115,117.5,115.75,118.25,116.62,115.37,110.62,113.5, +112.12,110.87,111.87,106.62,108.56,108.75,109.06,108.12,108.19,108,108.06,107.75,108.62,105.75, +104.5,106.87,106.56,107.56,112.25,115.5,115.44,112.5,107.94,103.37,102.25,102.12,103.37,104.12, +101.81,106,104.44,98.37,93.56,92.62,93,93.87,93,94.87,94.12,92.12,90.5,90.19, +90,93.5,93.69,96.37,96.25,94.25,92.81,94.62,92.12,92.5,89,107,105.44,104.69, +103.87,104.69,105,110,113.12,111.06,115.06,119.06,119.06,116.75,115.5,119.62,120,121.69, +121.37,120.44,121.44,124.37,126.25,126,123.75,129.56,131.94,131.94,132,134.38,131.63,130.69, +128.38,128,124.25,125.5,122.87,122.69,122.75,122.06,120.87,121,122.31,121.06,121.25,123.5, +126.56,124.5,122,121,119.81,118.94,121.12,121,117.56,118.06,118.19,121.81,124.37,124.62, +125.81,123.56,122.75,122.62,123.5,126.87,126.06,133.69,135.38,134.5,136.19,135.75,135.38,133.88, +132.13,130.63,130.81,129.5,128,124.37,122.75,122.19,123.12,121.56,121.75,123,122.62,119.75, +119,118.87,114.75,114,112.56,113.31,116.56,116.06,117.5,112.44,111.56,109.44,111.19,114.19, +112.62,221.44,221,221.75,229.19,232.5,233.06,237,232,236,234,215.5,217.5,217.06, +211.06,208,207.31,211.38,206.31,203.44,203.44,203.5,208.5,202.31,192.94,192.69,165.13,163, +164.06,170.13,173.5,177.63,179.94,181.06,184,182.31,179.06,182.19,178.56,174.69,176.5,176.88, +174.38,170.56,169.5,166.5,164,166.63,168,172.94,178,180.19,177.13,178,181.5,180.25, +178.56,177.06,173.75,170.13,165.06,166.88,165.13,166.5,169.31,173.13,175.75,171.06,171,170.19, +168.81,171.94,171.19,168.13,162.5,161.75,163.13,164.56,169.25,173.06,175,179.5,178.5,177.56, +177.81,181.88,173.5,177.63,192.06,192.63,185.5,181.25,178.88,179.5,184,187,185.63,187, +188.5,182.81,181.5,183.5,186.31,187,186,184.06,181.13,175.25,171.56,166.63,165.06,164.31, +162.5,162.75,163.25,163.75,167.38,165.06,164.25,162.25,163,164.75,163.5,164.88,166.63,164.38, +165,160.56,158.5,158.13,157.63,158,158.06,155.75,156.63,156.5,150.69,149.94,147.5,146.81, +145.75,147.19,147.31,147.5,147,143.81,143.06,140.06,141.19,139.63,139,136.5,135,134.81, +129.75,127.19,126.56,129.56,122.5,116.81,118.12,118.75,117.31,118.94,123.37,127.62,130,132.19, +129.81,130.25,128.5,127.69,120,124.25,126.19,128.19,128.5,127.62,120.62,118.19,123.37,122.19, +115.31,118.06,119.87,110.75,112.62,120.81,124.81,127,127.62,127.31,124.5,127.5,129.06,127, +124.25,124,126,127.56,125.31,128.75,129.13,127.37,124,126.81,132.31,132.25,128.44,127.06, +124.19,122.25,122.5,123.69,124.5,127.75,120.31,118.5,116,117,119,118.25,117.37,114.62, +113.62,112.75,113.31,114.5,115.5,113.5,113.56,112.31,112,110.06,109.94,106.19,106,107.62, +110.06,107.12,112.12,114,115.75,116.87,117.81,118.37,116.56,114.25,113.87,114.81,114.62,117.37, +119.81,118.56,120.81,121.12,121.94,122.56,124.75,123.44,124.12,122.87,120.12,117.31,118.31,116.87, +116.12,117.25,116.69,116.62,115.5,115.5,114.62,115.31,114.37,116.25,114.12,114.62,113.62,107.19, +106.5,107.62,106.5,104.62,104.19,105.31,103.75,103.56,105,103.94,104,103.31,103.37,102.5, +103.87,105,104.87,102.12,101.37,101.44,101.44,100.56,99.56,99.25,99,98.19,97.44,96.69, +95.87,98.12,98.31,99,99.81,100,103.87,104.31,102.5,101.75,102.81,101.56,102.75,101.31, +101.5,102.37,101.56,101.5,97.5,98,97.75,98.37,98.06,98.69,100,98,97,96.5, +95.62,98,98.94,98.5,99.62,104.69,104.5,102.37,101.25,100.31,97.5,99.37,102.94,102.62, +105.06,105,104.06,103.19,102.94,102.75,99.25,99,98.62,100.87,97,99,101.87,101.12, +97,96.37,101.37,105.44,110,111.75,109,108.87,109,110.56,109.87,109.12,107.37,103.87, +103,105,103.25,101.75,102,102.87,99.12,95.25,96.5,97.94,97.62,98.25,101.06,101.56, +100.94,99.12,96.56,95.56,97.87,88.62,89.87,96.87,100.06,104.25,101,94.5,95.25,99.12, +101.37,102.06,104.06,104.12,104.19,104.5,105.94,104.37,103.5,103,103.19,103.62,102,101.94, +101.19,101.44,102.75,102,98.31,98.75,99,96.37,96.12,96.94,96.5,96.12,100,102.62, +103.56,103,103.5,101.25,100.47,101,102.5,103.06,104.5,102.44,105.25,106.12,104.25,99.69, +99.87,102.62,102.75,103,103,104,106.87,105.81,106.5,104.31,103.31,105,102.87,102.75, +104.81,105.62,104.5,103.19,99.37,102.19,100,97.12,95.37,93.37,94,95.62,94.06,95.31, +94.5,94,94.31,91.62,90.12,90.12,91.19,90.25,91.37,89.5,87.62,89.75,89.12,88.25, +89,88.62,88.12,85.5,86.12,85.5,85.62,82.62,82.12,81.75,84.12,86.62,84.5,87.5, +88.5,174,173.13,172.5,174.38,168.38,166.88,169.63,173.13,171.88,173.38,168.13,166.63,163.5, +162.13,164.63,162.63,159.88,159.38,157.25,152,149.13,150.63,150.5,139,134.75,136.63,137.75, +136.75,135.75,134.38,133.25,131.38,132.88,133,132.25,130.5,127.12,128.88,133.25,135.63,134.38, +136.13,135.5,134.75,130,132.13,136.5,135.88,137.88,137.38,142.13,142.25,144.13,146,144.38, +144.13,144.63,144.38,142.5,143.63,140.63,143,144,144.13,137.5,137.13,140.25,143,143.13, +144,145.13,143,141.13,142,145.88,145.5,145.5,150.75,154.5,156.13,155.75,152.38,148.63, +145,149,150.63,155,166.38,164.5,163.88,163.25,163.38,164.5,162.75,160.13,158.38,159.13, +159.38,158.5,154.88,150.25,150.88,153.63,153.5,155.13,154.13,152.75,154.13,157.25,152.38,147.38, +147.25,152,151.5,153.75,157.75,156.25,153.38,158.38,159.13,162.63,159.63,158.13,157.75,157, +156.13,154.13,152.5,152.38,146.5,143,137.38,134.63,133.25,133,134,132.88,132.75,130.25, +129.25,127.37,127.12,125.87,125.75,125.12,126.5,126.37,127.37,126.12,126.25,126.75,124,125.25, +127.37,128.63,129.13,128.25,125.5,126.12,127.62,126.87,125.62,124.62,124,123.12,124.12,124, +124.12,124.5,124,122.12,122.87,123,123,121.5,121.75,118.12,117.12,116.75,116.5,115.87, +113.5,113,114.5,112.56,113.62,114.62,113.87,111.25,112.25,112,112.37,110.12,110,109.5, +109.87,110.75,109.37,109.12,111.62,112.12,111.5,109.75,108.25,108,107.75,107.25,107,103.75, +103.37,101.62,95,89.12,90,91.87,93.5,93.12,94,89.75,89.75,94.62,94.12,97.75, +98.75,98.12,97.75,98.12,99.87,99.12,98.87,97.62,98.5,98.87,98.5,98.25,99.37,101.5, +101.25,100.87,101.62,101.75,102.75,102.37,101.37,96.12,101,104.75,105.37,105,106.62,106.12, +105.62,107.87,108,109.25,109.75,110.75,111,109,107.62,108.5,107.5,105.87,106.12,105.75, +103.62,105.62,106.37,107.75,107.37,107.62,107.5,107.37,107.62,106.62,105.62,106.75,105.62,104.62, +103.62,103.37,114.62,111.5,110.12,114.75,115.12,117.5,114.5,117.25,116.12,110.5,110,110.37, +109.5,110.25,107.62,108.37,114.25,114.12,114.25,121.5,120.5,115.75,116.12,114.5,113.62,113.87, +112.25,115.37,116.37,116.12,115.25,117,122,127,124.5,123.87,124,121.25,118.62,116.75, +117.5,114.25,113.75,113.5,113.87,113,111.87,111.5,112.62,109.25,108.75,108.12,107.5,106.37, +104.25,103.5,104.12,103.12,100.75,101.37,96.5,89.62,85.75,83.5,83.12,86.12,86,86.62, +86.12,88.62,86,85.62,89,90.62,89.5,90,90.75,91.62,90.87,89.75,89.12,89.12, +87.75,89.87,92.37,94.37,95.25,95.87,94.62,94,94.25,95.62,94.62,94.75,96.62,96.75, +95.62,95.62,95.25,94.37,93,93,94.75,95.12,94.75,95.25,97,96.62,98,97.25, +98.12,100,99.87,96.75,96.37,96.87,97.12,95.75,94.62,96,97.25,95.62,95.25,96, +95.75,91.25,92.5,92.5,92.12,91.25,89.12,92,94.12,93.5,93.37,93.37,93.37,93.62, +93.87,91.87,92.5,92.62,93.37,93.87,95.62,94.25,92.37,91.62,92.5,92.37,95.12,95.87, +98.12,99,100.62,100.12,102.37,102,101.12,98.62,101.37,103.75,104.5,106.5,105.62,106.5, +111.12,112.25,110.75,110.25,109.25,108.37,108.87,109.62,108.87,108.62,108.5,105.62,107,107.25, +108.5,109.87,109.5,108.25,107.5,103.5,103.12,101.37,97.75,102.87,104,102.12,101.25,99.62, +99.5,100,98.62,96.87,96.75,95.75,95.37,96.37,94.37,94.5,98,97.25,97.37,97.12, +93.87,93.25,92.62,93,91.87,90.87,89.75,88.62,88.37,89,91.37,90,93.37,93.37, +91.87,91.5,94.5,95.87,94.5,95.5,93.5,92.25,93.12,94.75,94.25,94.12,93.75,93.25, +93.87,93.37,92.62,92.87,93.25,93,91.62,91.75,94.25,94.62,92.87,92.87,91,89.12, +88.62,86,87.12,86.87,86.12,86.12,85.62,84,83.5,83.62,82.87,82.5,82.25,81.37, +81.75,82.5,84.25,83.87,83.5,81.5,81.25,82.12,82.5,82.62,81.62,81.25,81.5,81.5, +80.37,80.37,78.5,79.37,79.5,77,75.37,75.12,74,73.75,74.25,74.12,74.12,74.12, +74.75,75.5,75.12,74.62,74.75,75,74.25,74.12,73.87,74.12,74.5,73.5,72.25,70.25, +71.5,70.62,72.25,72,73.5,72.37,75,76.37,76.62,77.12,76.37,75.75,75.5,75.25, +75.62,74.87,74.12,73.75,73.25,73.37,73.12,73,72.5,73.75,73.25,73.5,71,70.75, +70.5,69.87,70.12,69.37,69.62,69.62,69.5,69.75,70.62,71.25,71.37,68.87,69.25,70.62, +70.25,70.25,70,68,69.37,72.62,72.75,72.75,72.62,72.5,72.25,71.75,71.62,73.25, +71.37,70.75,71.12,73.12,73.75,73.5,74.5,74.12,73.75,73.62,72.62,72.87,74.12,73.87, +73.75,73.37,72.75,71.87,72.25,71,71.5,70.75,68.75,68.62,67.37,68.25,68.62,68.87, +67.75,68.5,68.62,67.75,68.87,69.37,69.37,69.62,70.25,69.5,69.5,69,68.62,67.5, +66.75,67.25,67.37,66.62,66.75,66.87,68.5,68.87,69.25,69.12,66.87,66.62,67.62,67.25, +66,65.37,64.37,63.75,63.75,63.75,63.75,64.12,63.25,62.63,61.88,62.75,62.25,62.25, +61.5,61.75,62.25,61.88,62.13,61.33,61.13,58,54.5,55.63,56.63,56.75,57.25,55.88, +54.88,55.38,56.5,56.63,56.38,56.25,56.75,58.63,60.13,60,58.13,59.5,60.88,61.13, +60.38,61.63,62.25,62.88,63.5,63.88,62.25,62.25,61.5,61.5,62.63,61.13,60.75,61.88, +62.5,62.75,63.63,62.5,62.5,61.88,61.38,61,60.5,60.5,58.63,57.38,57.25,57, +57,57.38,56.5,56.25,56.88,57.5,57.88,56.88,56.88,56.75,58.5,58.25,58,54, +51.75,51.38,52.75,52.63,52.5,51.88,52.5,52.25,52.38,52.25,52.75,53,52.25,52, +52.5,52.5,52.5,53.63,56,56.63,57.75,56.75,56.75,57.5,57.13,57.38,55.88,55.25, +55.13,54.75,51.38,52.13,52.38,52.63,52.13,52.5,52.63,52.63,52.63,53.25,52.63,52.13, +52.5,54.5,54,53.38,52,52.75,53.13,53.38,52.25,52,55.75,55.5,56.5,56.5, +57.5,56.5,56,55.38,55.75,54.75,55.13,55.75,56.38,57.13,58.38,58.25,58.13,58.5, +58.5,58,58.5,58.5,58,56.88,56.38,56.88,58.13,58.25,58,58.5,58.5,58.13, +58.25,57.75,57.13,55.63,56,55.38,53.88,53.25,53.38,53.25,52.75,53.13,53.25,53.13, +53.75,54.38,55.13,53.75,51.88,51.63,51.5,52.13,51.88,50.75,50.88,51.5,50.13,49, +49,50,49.38,49.38,50.13,48.5,45.75,45.88,45.63,45.75,44.38,43.75,44.38,43.5, +42.88,42.88,43.88,42.88,42.5,43.13,43.75,43.88,43.38,43.63,43.25,43.25,43.75,42.13, +41.38,41.25,41.63,41.5,41.5,41.75,41.63,41.88,42.25,42.75,43.38,43.25,43.38,43.5, +43.5,44.13,43.75,45.25,45.63,45.75,45.63,44.75,44.13,43.63,43.63,43.5,43.63,43, +42.63,42.75,42.38,41,40.63,41.5,41.25,42,42.88,42.88,43.13,43.5,43.25,43.13, +43.88,43.63,43.38,43.88,44.5,41.13,42,43,43,41.63,43.38,45.5,47.13,47.13, +47.25,46.75,46.38,46.38,46.38,46.88,47.75,49.13,49.13,48.75,49.75,49,48.63,48.5, +49.13,49,48.88,49.38,48.88,49.75,51.88,52.38,51.5,52.63,51.63,52.25,53.63,53.5, +51.75,51.88,52,52.88,50.5,49.88,48.5,48.25,48.75,48.38,47.75,47.5,47.38,47.13, +47.88,48.38,48.38,47.75,48,48.88,49.25,48.5,48.63,48.38,48.63,47.88,47.88,47.38, +48.13,49.13,48.75,48.88,48.5,48.5,48.5,49.25,50.63,50.25,50.88,51.75,51.63,51.75, +51.38,50.13,49.88,51.63,50.63,50.13,50.88,52.88,52.75,53.63,54.25,54.13,54.88,55, +53.63,54.75,55,56,55.25,54.75,54.5,53.63,53.75,54.5,53.38,51.63,51,50.75, +50.5,50,49.75,49.75,48.75,50.5,50.5,51.63,52.88,52.13,51.63,50.75,50.88,52, +52,50.88,49.75,48.25,48.75,47.5,46.5,45.88,46.63,47.25,48.63,47.75,47.75,47.5, +47.75,46.75,45.88,46.63,47.13,48.5,50,50,49.75,49.25,51.13,51.25,51,49, +48.75,50.25,51.25,50.75,56,62.38,61.63,61.38,61.5,64.37,65.75,66.62,66.75,67.62, +67.5,67.5,65.25,65.12,63.5,62.25,60.88,61,62.75,64,64.62,64,64.12,64.5, +65.87,66.25,65,65.62,68.12,68.5,67,66,65.62,65.62,65,67.5,68.37,68, +68.25,67.75,68.5,68.87,72,76.75,78.37,78.37,78.25,78.5,78,78.62,75.5,78.25, +80,80,81,82,82,82.25,83.25,83.12,83.87,83.25,82.75,82.5,85.37,88.12, +87.12,86.62,86.25,85.87,85.87,86.62,86.75,86.5,86.5,86.62,86.37,86.25,85.25,85, +85.75,85.5,86.5,87.87,88.5,88.25,87.87,88,87.75,87.25,86.62,88.12,91.37,94.25, +94.37,94.5,94.37,94.25,92.37,92.37,92.37,92.62,92.5,92.87,92.75,94.62,99,98, +97.5,97.62,96.5,97.5,96.75,96.62,97,96.87,97.75,97.75,97.75,96.5,96.62,96.25, +95.25,94.62,94.75,93.12,92.12,92.87,92.5,92.25,90.37,90.12,90.37,90.37,88.25,88.87, +89.75,90.37,90.12,90.75,90.37,90.12,90.37,91.25,90.62,91.5,90.62,90.5,91.12,91, +92.37,93,93.37,93.12,92.75,93.12,92.37,92.12,90.37,88.25,87.75,87.37,87.75,88.12, +89,89.62,89.5,88.25,87.5,87.62,88,85.87,84.5,84.62,82.62,82.25,81.62,81.75, +81.87,82.75,83.37,83.12,83.12,84.12,84.75,85,85.62,85.75,85.62,87.25,87.37,88.25, +89.12,87.62,87.12,87.5,85.12,86,86.5,87.37,87.12,86.25,86.62,87.5,87.62,88.12, +88.75,89.25,89.12,89.37,89.12,89.5,90.12,89.87,89.75,89.12,88.62,89.62,91,90, +89.25,90,91.37,91.62,92.87,93.37,93.12,93.25,92.87,92.87,95.25,92.62,95,93.5, +90.25,89.75,90.62,91.25,92.25,91.87,90.87,90,88.87,88.87,89.12,88.37,87.5,87.87, +85.5,85,84.5,84.87,85.25,86.75,87.25,88,85.62,83.5,84.62,89,90.12,90, +91,90.62,92.37,94.12,94.62,94.62,94.62,95.12,95.37,95,96.25,96,98.37,98.37, +99.12,99.87,100,98.25,96.37,96.62,96.62,97.75,98.25,98.87,97.5,98,97.5,97.62, +97.25,98.5,99.87,99.62,99.37,101.37,99.75,99.12,99.5,97,96.75,97.62,98.25,98.12, +99,100.75,102.5,101.25,102,104.25,104.75,104.12,104.12,104,104.75,104.5,103.25,102.87, +101.5,102.25,99.62,99.25,99.5,97.75,97.62,97.62,97.62,95.75,94,94.25,94.62,94.75, +94.37,94.12,94,95.12,92,96.5,98.12,98.37,98.37,98.62,98.75,99,99,99.62, +100.37,100.25,100.75,101.12,100.37,100.37,100.12,100.5,100,100.62,100.87,98.5,95.62,96.12, +96,99.25,98.25,98,98.5,99.25,97.75,97.87,98.12,98.12,97.37,96.62,97.37,98.12, +98.25,98.25,99.12,97.12,100,99.75,99.5,99.87,100.12,100.62,102.12,102.12,101.37,102, +103.12,104.62,105.75,103.75,103.62,103.75,103.62,104.5,103.75,102,100.5,103.12,103.5,103, +101.25,104.62,103.25,103,104.12,101.75,101.87,102.37,102,103.75,102.12,102.12,104.62,107.25, +107.62,108,107.87,108.12,109,109.37,109.25,106.75,105.62,108.12,110.12,110,111,112, +112.5,112.12,113,111.12,111.87,112.87,112.5,113.37,111.75,111.25,111,113.5,115,126.25, +126.25,126.5,126.75,126.5,128.75,131,131.63,132.63,129.88,129.88,128.13,127.5,128.13,129.75, +132.13,132.63,135.5,137.88,137,135.38,133.88,132.25,131.5,129.63,128.25,128.38,128,127, +125.62,125.62,126.25,124.62,123,122.37,120.5,119.87,117.87,117.75,116.62,114.87,114.25,106.62, +106.75,105.5,107.75,107.25,106.75,108.75,110,111.87,112.25,112.12,112.87,113.25,113,113.5, +113.75,113.37,112.25,112.12,111.5,110.62,111,112.87,112.62,112.37,112.12,110.75,111.25,113.75, +113,113,111.25,111.62,112.37,112.62,111.62,112.62,112.37,113.25,114,112,112.5,112.5, +112,110.75,107.87,106.25,106.25,107.62,106.5,107.25,104.87,104.75,104.87,105.12,106.5,106.62, +106.75,106.62,106.5,104.62,101.75,99.37,98.25,96.25,99.5,99.75,102.87,105.37,108.62,106, +106.37,107.12,108.25,107.12,102.87,102.87,104.25,104.87,104.5,105.5,106.62,107.5,105.12,104.12, +103.62,104.75,107.12,105.87,105.5,101.87,101.5,102.25,100.75,100.37,101.37,102.75,103.37,102.75, +97.87,96.5,98.87,99.75,101.87,100.75,103.75,104.5,103.12,101,101.5,103,102.87,102.5, +102.5,103.75,109,110.62,110.62,110.5,110.62,112.25,114.25,113.62,114.12,117.5,118.75,119.87, +119.87,121.25,120.25,118.75,117.87,117.75,117.87,117,116.87,117.62,117.37,117.37,117.5,116.75, +116.5,116.5,116.25,117.5,117.25,117.87,118.62,120.12,120.12,120.25,119.25,118.62,118.62,119.75, +120.37,120.12,119.25,119,119.5,119.62,116.75,116.12,117.87,117.25,116.62,115.12,115.25,115.12, +114.62,113.75,114,113,111.25,110.37,110.37,110.25,108.25,109.12,108,107.87,107,107.37, +108.5,109.12,108.87,108.62,108.25,109.12,109.5,109.87,110,107,105.87,105.12,105.25,105.25, +105.87,105.87,106,105,105.62,105.75,103.75,103.37,104.12,104.87,105.5,107.12,107.87,107.37, +107.37,106.5,105.62,106.25,106.25,106.25,106,105.25,104.25,104.62,104,103.37,103.12,103.62, +102.5,102,103.25,102,102.25,103.37,103.75,103.25,101.25,100.62,102,101.87,100.62,98.62, +97.5,97.87,97.75,97.62,95.75,95.5,95.12,95,95.5,96.62,96.5,98.5,97.62,98.37, +97.5,97.25,97.62,99.37,98.62,99.37,99.25,99.5,98.87,98.37,94.5,94,94,94.5, +94.25,95.12,94.37,93.87,93.37,93.37,94,95,95.62,95.62,95.5,96.5,97.62,98.5, +99.62,97.37,96.87,96.87,97.5,98.5,98.25,100.25,99.37,98.5,98,96.75,96,97.12, +97.75,97.75,97.62,96.5,96.75,96.25,96.5,97.87,96.75,99.62,99.87,99.37,99.5,100.5, +101.75,101,103.37,103.5,103.12,101.5,100.5,97.75,99.87,107.25,107.5,107.87,107.75,107.12, +107,106,105.62,108.37,108.62,107.75,111,116.62,116.12,116.12,116,115.75,116,115.37, +115.12,115,115.37,116.12,115.37,115,115.87,116,117.37,116.87,116.87,116.12,116,115.37, +115.62,113.25,112.75,112.5,113,114.75,114.37,115.12,115.37,114.75,114.87,116.12,117.12,117.75, +115.75,113.25,112.62,113.62,114.5,113.62,113.12,111.87,110.62,112.5,113.37,112.5,112.75,114.12, +114.5,114.5,113.62,114.25,113.37,113.62,112.25,111.25,111.37,111.25,111.75,109.62,111.25,113.12, +112.37,110.87,109.62,108.5,109.37,109.37,109.62,108.37,108.5,109.62,108.5,107.5,108.37,108.75, +109.12,108.62,108.75,109.62,109.5,107.87,107.5,109.25,109.5,109.37,109.12,109.25,110.87,110.62, +110.25,111.25,110.62,110.25,109,109.62,109.12,108.62,109.12,110.25,111.5,112.37,112.87,114, +114.25,113.5,113.37,113.12,112.12,111,112.12,112.12,110.75,110.5,108.87,110.87,110,109.5, +107.75,107.12,107.12,106.25,108.5,109,108.25,109.12,109.37,109,108.5,107.62,109.75,109, +111.37,117.25,117,117.62,118.12,117.12,118.12,119.5,119.37,120.62,120.12,119.75,119.12,121.37, +120.62,121.12,122.62,123.25,125,125.25,125,124.87,124.75,124.75,125,126,126.87,126.25, +126.25,126.87,127.87,129.25,127.37,127.25,126.37,123.12,123,122.12,122.12,123.5,123.75,122.12, +123.5,123.37,122.37,122.25,120.75,120.87,121.5,121.37,122,121.25,120.62,121.62,122.5,121.87, +122.62,122.75,122.37,122.75,123,121.12,121.12,120.25,120.25,119.5,120.12,119.62,119.37,120.87, +120.5,119.5,117.62,117.75,118.25,117.62,116.25,116,117,115.37,114.12,115.37,114.87,114.5, +117,116.37,116.37,119.62,118.5,119.37,118.62,120.25,122.12,121.75,122.5,120.25,120.37,119.5, +121.5,122.25,123.12,123.62,122.37,120.5,121.12,119.37,119.37,117.75,117.5,116.12,115.5,114.75, +113.37,112.75,114.37,114,114.75,113.75,113,111.37,112.25,111.75,112,112.5,112.37,111.75, +113.37,113.75,113.5,112.5,113.37,111.25,111.37,111.62,112.37,111.62,109.5,110.75,112.62,112.75, +111.5,110.75,111.25,110.37,110.75,112.5,114.12,113.75,114.62,115,117.87,117.37,118.87,121.62, +123.12,123.5,124,125.5,124.62,125.37,124.25,121.25,120.75,122.37,120.25,120,121.5,123.37, +123.12,124.87,125,124.62,123.5,124.37,126.37,126.25,126.37,126,126,125.75,126.75,126.37, +125,124.75,124.75,122.75,122.62,117.5,116.62,115.75,117.12,118.5,118.25,115.75,115.5,115.25, +114,113.62,113,112,111.75,112.37,108.12,107.5,108.12,108.5,108.62,108.12,109.37,108.62, +108.5,110,109.87,109.12,108.62,108.37,110,109.87,110.12,110.87,113.25,113.25,113.12,112.62, +112.62,113.12,113.37,113.5,112.37,111.5,112,113,113.25,111,111.25,114.25,113.25,111.87, +109.37,108.12,105.75,105.62,106.75,104.5,104.75,105.87,104.25,106.5,109.37,111.25,113.12,112.75, +113.25,113.75,113.37,113.62,114.5,112.37,113.62,116.25,117.25,116.12,115.25,115.75,116.87,116.25, +115.87,114.12,114.12,114.75,114.37,113.12,112.12,112.12,112,112.5,111,110.5,109.5,107.25, +106.87,107.75,107.5,108.25,109.12,110,110.5,113,111.5,111.5,110.5,109.62,109,108.62, +111.5,117,118.37,114.5,113.37,113.25,114.5,114.87,121.12,121.25,121.62,116.75,115,116.37, +115.5,115.12,119,118.75,116.5,116.87,115.25,115,115.75,114.25,110.25,109.25,110.5,111, +108.37,107.75,105,106.5,110.25,111,110,114.37,117.37,117.87,116.25,114.75,115.62,116.25, +116.25,117.75,121.25,121.12,118.25,115.12,118,119,119.12,119.5,118,121,121.75,118.25, +114,115,112,118,111.5,120,108,100,132,140,144.13,145,145.5,147, +150,150,151,154.5,154.75,151,148.5,149.5,151.5,155,153.63,152.88,149.25,149.75, +155.13,156.13,156,157,161.25,157.88,157.13,155,155.88,160.63,160.25,161.25,162.25,166.5, +165.25,165.88,166.75,171,173.13,174.5,173.13,170.63,171,173.25,172,170.38,168.63,167.13, +164.5,163,159.13,159.75,158.5,158.75,160.75,160.63,159.63,160.13,160.88,160.13,159.13,161.25, +162,164,166.75,167.38,166.63,166.5,167.13,165.5,165.75,164.5,163.88,164.13,164,162.75, +162.5,165,166.13,167,164.63,162.5,161.88,160.38,160.13,160.25,159.38,158,156.25,157, +156,159.25,158.75,158.88,159.63,157.88,157.25,159.25,160,159.25,160,158.25,156.13,156.88, +155,155.63,157.13,160.63,165,164.5,162.25,163,163.25,163.88,166,164.25,159.75,159.13, +157.75,155.88,154.63,149.5,151.5,153.13,153.88,148.5,148.75,149.88,149,146.5,146.75,142.63, +143.5,146.13,146.5,148.88,145.63,147.5,149,149.5,145.88,150.5,153.88,152.13,149.25,148.5, +147.38,145.88,145.13,144.38,143.13,144.63,140.88,141.5,138.75,137.88,139,140,138.25,137.63, +138.25,139.25,139.38,141.75,142.38,138.75,138.13,137.5,137.13,134.25,132.25,132.63,132.75,131.5, +132.5,135.5,134.25,131.5,132.63,128,127.5,127.5,128.5,127.87,124.75,124,122.62,121.75, +122,119,119.5,118.75,115.75,116,120,121.5,121.37,122.12,122.62,122.62,120.87,120, +120.25,120.25,121.75,120.5,120.37,121.12,124.25,125.12,126.37,127,125.37,126.37,127.75,126.75, +126.5,125.75,126.25,127.62,128.63,127.5,125.25,126.5,126,124.12,123.25,122.62,121.75,120.12, +120.25,120.62,119.62,119.87,121.87,122.87,121.25,120,119.25,122.5,124.75,123.75,121.75,121.37, +120.25,120.62,120,121.25,120.62,120.12,120.25,119.87,120.5,120.87,120.37,119.75,121.87,122.37, +121.75,126.25,128.13,131,130.63,132.25,132.63,134.25,133.13,135,134.25,137.13,138.38,137.13, +136.75,136.75,137.63,135.63,136,136.25,138.75,142.88,143.5,140.88,138.5,136,135.13,135.5, +138,139.5,140.5,138.88,138,137.38,137.25,136.75,135.13,133.13,133,133.75,132.5,130.63, +129.25,129.75,130.13,129.63,130.75,130.13,131.38,132.13,130.25,130.88,132,133.25,132.5,132.63, +131.5,130.75,129.88,131.75,132.75,135.5,139.25,143,141.25,143.5,143,145,148.25,148.25, +146.38,146.25,146.63,146.63,146.75,144.75,144.5,144.63,145,144.13,146.5,148.13,148,147.75, +148.25,146.63,146.5,149,149.38,149.5,151.5,151.75,152,150.25,147.88,143.88,143.63,142.25, +144.25,144.25,143.75,144.63,145.38,147,148.75,149.75,148.13,148.63,150,153.5,154.5,153.63, +155.75,156.25,158.25,158.5,158.5,155.5,152.13,152.25,152.25,152.5,154.13,153.25,151.5,149.13, +149.25,148.13,148.38,149.75,147.38,148.13,149,148,149.13,149.63,148.13,146.75,147.25,146.5, +148.5,149.88,150.25,150.75,149.5,148,147.75,148.88,149,146.25,144.5,145.25,146.5,149.13, +150.13,150,154.5,157.38,156.5,157.75,159.13,157.13,157.13,156,155.13,153.5,153.75,156, +155.38,151,154,152.13,151.75,151.63,149.38,148.63,150.38,149,148.25,147.88,144.13,143, +148.5,148.25,150,152.63,149.25,148.75,147.88,148,147.25,147,154.38,153.13,152.38,151.63, +155,156,153.75,152.13,151.25,153.38,153.75,152.38,151.63,151.5,150,149.13,147,146.63, +144.25,142.13,140.25,140.63,138.63,137.63,137.75,139.25,139,138.75,138.38,139.25,139,137.88, +137.25,136.63,136.38,134.75,134.63,134.75,132.63,131.75,131.63,131.25,132.25,130.5,129.63,129.38, +130.25,129.5,127.5,127.5,128.25,129.38,127.62,127.25,127.62,128.25,127.5,127,125.37,123.62, +123.75,124.25,123.5,123.12,122.87,123.75,124.37,123.87,123,122.25,123.75,126.25,127.62,126.37, +126.5,126.5,126.5,127.5,126.12,126.75,127,127.62,129.25,128.63,127,126.5,126.5,126.5, +127.25,127.5,127.75,126.37,126.37,126.37,127.62,125.87,125.75,125.5,125.75,126.75,125.75,126.62, +127.25,127.25,129,129.13,130.5,131.38,131.63,130.5,129.13,129.38,130.13,128.63,127.62,129, +128.63,128.75,128.38,129,125.5,123.37,123.25,122.87,120,120.5,123.25,124.12,123.25,124.25, +123,123.5,123.12,122,121.37,118.75,118.37,117.37,119.25,119.12,119.25,119.37,118.25,120.62, +126,126.87,127.25,127.62,128.5,128.75,128.25,127.25,127.25,129.25,129.75,130.75,131.25,131.88, +132.38,131.38,128.63,128.5,127.75,127.75,129.75,128.5,127,125.37,125,124.75,124.62,124.75, +125.12,125.5,126.12,127.12,128.13,127.25,127.25,126.75,126.87,127.37,129.25,128.5,127.87,126.87, +125.87,125,124.25,123.87,125.5,126.25,127.5,126.87,125.62,126.37,125.5,124.12,124.5,127.75, +128.13,129,128.25,128,128,128.75,129.38,131,129.75,129.13,130,132.75,134.63,134.38, +134,132.75,132.75,133.25,132.13,132.13,133,131.88,131.25,130.75,132,131.75,131.25,132.75, +136.75,135.88,135,136,135,135.38,135.25,136.13,133.75,133.25,132.63,132.38,129.25,129.13, +124.37,123.62,123,123.62,124.12,120.5,122.12,119.62,119.5,119.25,119.75,119,119.87,120.75, +122.87,122.75,122.75,123.62,123.25,120,122.12,122.37,120,117.12,117.87,117.5,118.37,117.75, +116,116.5,117.25,117.37,120,119.5,120.75,121.62,123,122.75,122.12,121.12,119.62,120.12, +119.5,121.12,122,122,122.5,122.75,123.25,124.25,125.37,126.5,123.75,125.75,125.25,124.62, +125.12,124.12,123.75,124.87,126.25,126,124.87,123.75,121.75,120.62,120.5,121.37,120.62,120.12, +118.75,120.5,120.25,121.12,121,120.5,121.75,122.25,124,125.25,124,122.75,123.62,123.62, +125.12,125,126.5,126.12,126.25,122.62,122,122.25,120.87,121.25,122.87,121.62,121.87,123, +123.37,124.25,124.37,123.62,124.25,123.87,124,123.5,122.5,122.5,122.25,121,120.75,120, +120.75,118.5,118.25,120,120,117,113.5,110.87,108.87,108.25,107.87,106.75,104.5,105.12, +105.12,105.5,106.25,107.12,106.75,104.5,104,104.12,105.25,106.25,105.37,104.62,106.25,106.12, +104.75,105.12,103,102.75,103.12,105.37,105.12,105.37,101.62,101.87,99,99.12,100.5,104.25, +103.75,104.12,104.62,104.75,103.37,105,108,107.25,107.5,105.62,105.75,106.75,106.12,107.75, +107.5,108.25,108.62,109.62,111.75,112.25,110.5,110.5,111.62,112.5,112.75,112.37,112.5,115, +116,114,112.75,112.62,111.87,110.62,109.5,109.62,110.12,110.5,112,110.62,111.12,107.5, +108.75,109.75,108.37,107.75,108.37,110.62,110.37,111,113.62,113.75,113.62,112.62,111.75,111.5, +112.37,114,113.5,112.5,112.75,111.12,110.37,110.37,108.5,107.37,107.62,106.62,109.12,110.37, +111.62,109.75,109.37,109.87,110.75,109.25,107,108.62,108.62,109.12,108.62,109.5,109.12,108, +109.37,106.5,107.5,108.5,108.5,110.75,112.75,113.25,113.25,113.12,112.62,114,115,116.37, +116,117,118.25,119,119.87,119,118.25,121.25,121.87,122,122.5,123,122.62,121.75, +121.62,122,123,123.5,124,122.62,122.5,122.12,121.12,120.5,119.62,119.5,120.62,122, +122.25,120.62,118.5,117.62,117.62,117.12,117.62,117.62,117.37,118.62,118.25,120.87,120,122.62, +123.12,122,122.87,123.62,124,127,125.12,124,122.37,121.87,122,121.75,123.5,125.5, +125,126,127.12,127.37,127.5,128.25,125.5,125.75,129.63,128.63,128.5,130.5,130.75,132.63, +131.88,132.75,131.5,131.75,131,129.13,128.88,126.25,126.5,127.87,127.75,126.5,126,123.87, +122.75,122.87,123.12,122.62,121.5,121.5,121.62,120.62,121.12,121.37,121.62,121,120,118.5, +118.12,117.12,117.25,116.87,115.62,115.25,116,118.5,120.62,121.12,121.37,121.62,120.37,119.12, +117.87,117.5,117,116.62,118.5,119,117.5,119.12,120.12,120.25,119.37,121.5,122.62,125.25, +123.5,124.37,123.5,122,120,119.12,119.5,121.62,120.25,120.62,121.5,120.25,119.75,119, +118.62,120.37,119.75,117.87,117.75,120.25,122.62,122.75,122.5,120.62,121.5,120.25,121.5,118.12, +117,114.12,113.62,113.12,112.62,113,113.62,113,111.25,110.25,110.25,112.87,114.25,113.37, +113,109.75,110.25,110.5,110.75,113.12,114,115.62,115,115.25,116.75,116.62,115.5,114.62, +115.37,114.62,114.75,116,115.87,115,113.62,113.75,114.75,114.12,111.75,111,110,109.62, +107.25,107.37,106,104.62,102.62,102,101.25,101.87,101.12,101.62,103.25,102.5,101.75,101.75, +101.37,100.25,100,99.25,99.12,98.62,98.75,100,99.75,99.87,100.12,100.62,100,101.75, +101.12,101.25,101.25,99.62,99,100,99.25,97.12,97,98.25,97,98.25,98.75,97, +96,95.12,93.87,95,96.62,95.37,95.12,95.25,97,96.75,97.12,95.75,94.87,94.37, +92.25,94,96.75,97,98.5,99.25,98.5,98.12,98,97,96,96.5,95.5,95, +92.37,92.5,96.12,95.75,95.37,94.75,93.37,93.5,93.5,92.75,92,91.5,89.5,89.12, +90.5,93.12,92.37,92.5,94.5,93.25,87.87,87.87,86.5,86.12,82.5,82,83,81.75, +80.62,80.5,82.87,83.5,82.37,81,82,83.37,83.5,83.75,83.62,83,83.62,83.75, +82.25,81.5,79.5,79.12,79.5,80.5,79.37,80,82.75,82,81.5,81.25,79.62,79, +79.5,81.25,82.37,81.37,79.25,78.37,75.37,74.62,73.25,73.37,73.25,74.5,76.25,75.75, +75.62,75.25,75.5,74.75,73.37,73.75,73.25,72.25,72.25,71.12,70.75,71.75,72.12,71.75, +71.62,69.37,69.5,69.62,68.37,68.37,69,68.37,68.12,67.75,66,65.25,65.75,63, +62.75,62.25,62.13,62.38,63,62.38,63,63.75,65.5,66,66.12,65.5,64.37,64.87, +65.5,65.75,66.37,66.5,67.25,65.87,65.62,66.5,66.37,64.75,63.13,64.75,61.38,59.75, +60.38,59.38,60,60.25,60.63,60.63,60.13,60.13,60.38,59.63,58.75,58.25,58.38,58.38, +59.25,58.88,59.13,59.13,58,57.5,58.13,59.5,60.13,61.25,61.5,61.38,61.25,61.75, +61.63,61.88,62,62.38,62,62.38,62.75,62.75,63.63,63.63,63.5,64,63.88,64.75, +64.75,64.75,64.5,64,64,64.12,64.5,64.62,65,64.5,64,63.25,63,63.63, +64.25,63.38,61.25,61.88,62,61.63,61.5,61,61.13,61,59.88,59.63,59.63,58.75, +59,59.13,58.88,58.75,57.88,57.25,57.63,57.38,57.25,57.38,57.38,58.13,58.63,57.13, +57.38,58.13,58.5,59.63,60.88,61.5,61.13,61.5,60.13,59.75,60.13,61.63,62.5,62, +60.13,61,60.88,61.63,61,61.38,62.88,61.63,61.5,62.38,62.5,63.63,63,61.5, +61.63,61,61.38,61.63,60.75,60.75,59.38,58.5,57.38,57,56.75,56.75,56.75,55.63, +56,56.75,56.88,56.63,56,55.75,56.25,56.25,56,56.63,56.13,55.5,54.13,53.13, +53,53.25,53.38,53.75,53.38,53,53.38,54,53,53,53.88,53.75,52.88,52.5, +50.5,50.5,50.25,49.88,50.25,50.63,50.5,51.5,52.25,51.25,52,50.88,50.75,51.5, +51.75,52.25,52,49.13,48.38,49.5,50.75,50.38,50.75,50.88,51.13,51.5,50.63,51, +52.13,52.25,53.5,55.13,55.13,54.5,54.13,54.25,54.75,54.25,53.75,53.13,53.13,52.25, +53.25,54.25,53.38,54.13,53.75,53.88,53.5,54.5,55.5,55,54.75,54.13,53.63,53.38, +54,54.5,55.63,55,55,55.38,55,55.38,55.13,55.63,56.75,57,56.63,56.25, +56.75,58,58.13,57.88,57.88,56.75,56.75,56.88,58,56.25,56.13,56,55.25,55.25, +55,54.88,54.63,54.75,55.13,55.13,55.25,56.13,56.13,56.38,55.63,55.75,56.25,56.38, +56.38,56.38,56.38,56.38,56.75,57.25,57.63,58.63,58.75,58.63,58.13,57.63,57.38,57.25, +58,58.75,59.63,58.75,57.88,57.38,57.13,58.25,58,57.63,58.5,59.88,59.75,57.88, +57.25,55.88,55.13,55.25,55.5,56.13,55.75,56.25,56,56.38,56.5,56.13,56,57, +57,57.63,57.38,58.13,58.5,58.63,59.5,59.88,60.63,59.75,60.25,60.13,60.38,59.75, +59.75,59,59.13,60.13,60.5,59.75,59.88,60,59.88,60.75,61.88,62,61.88,61.38, +61.63,62.63,62.13,62.13,62.63,62.75,63.25,64.25,64.12,62.88,63.25,62.38,61.75,62.25, +61.75,61.5,61.88,61.63,62.5,63.38,63.75,63.38,61.88,61.88,60.5,60.25,61.13,61.63, +61.63,61.25,61.75,62.38,62.75,63.25,64,63.88,63.63,63.38,63,64,64.5,64.5, +65,64.62,64.87,64.5,64.62,64.75,66.37,65.75,65.62,66.37,65.25,66.25,66.75,67.37, +69.12,69.62,69.5,67.62,67.5,67.87,67.75,68.37,67,66.87,64.5,63.75,63.63,64.75, +64.37,64.5,64.37,63.25,63.75,65.62,66,67.5,67.5,67.5,66.25,66.5,67.62,68.62, +69.5,69.5,70.12,70.62,71.25,71.62,70.62,70.37,70.25,67.25,66.87,66.5,66.5,66.25, +68,66.75,65.25,65.12,65.5,65.87,65.75,65.5,65.62,67.5,67.5,66.5,67.75,68.5, +69.62,69.5,69.25,69.12,69.75,68,67.12,66.5,65.5,64.12,63.63,63.88,63.38,64.25, +66.12,66.75,65.62,66.5,66.25,66.25,65.62,65.25,65,65.75,65.75,65.25,64.12,64.25, +66.12,66.25,66.12,65.37,64.75,64.87,65.87,66.62,66.62,67.37,66.62,65.87,65.87,66.37, +68.25,66.75,66.5,66.37,65.12,65.25,64.75,64,64.12,64.5,64.37,64.37,65.12,64.37, +64,63.88,64.25,64.37,64.75,64.25,64.87,64,63.63,63.75,62.75,61.63,61.25,61.25, +61.25,61,60.63,59.38,58.38,58.38,58.75,59.13,59,58.5,57.88,57.75,57.63,58.88, +58.88,58.75,57.88,57.25,57.25,56.63,56.63,57.13,56.88,56.5,56,55.25,54.13,54.38, +55.13,54.88,53.88,52.75,52.13,52.63,52.88,52.5,52.5,53,52.38,52.13,52,53.5, +54.75,54.75,53.75,53.88,53.75,53.63,54.13,54.38,52.88,53.25,53.25,52,50.5,50.88, +50.38,51,51.88,52.75,53.5,54,53.38,53,53.38,54.63,54.63,54.5,54.63,54.13, +51.38,52.5,54,54,56.25,58,58.75,58.63,59.13,59.63,59.88,60.88,61.5,61.13, +60.88,60.63,61.75,62.25,62.63,63,62.13,62,64.62,64.87,65.5,65.87,67.12,66.37, +67.12,68.12,69.25,66.37,66.5,66.25,67.12,67.75,68.75,68.62,68.37,68.25,69.62,69.37, +70.12,69.87,70.12,69,69,69,68.62,69.25,69.75,66.5,66.25,65.62,66,65.37, +62.63,62.63,63,61.25,62.5,64,64,64.25,64.37,64,64,64.12,63.25,63.88, +65.37,64.87,64.62,65.12,65.62,66.12,66.37,65.37,65.5,64.87,64.5,64.87,65.37,64.12, +64.25,62.38,61.75,61.25,61.5,61.75,61.75,62,62,62,61.63,61.63,61.13,61.25, +62.5,62.75,63.25,62.25,62.38,62.5,62.25,61.75,61.75,62.38,62,61.13,61.75,62.88, +63.13,64,65,65.62,66.25,65,66,67,68.5,68.25,68.12,67.25,67,67.5, +67.62,68,66.5,67.75,69.37,67.62,67.75,67.75,68.37,66.5,66.12,65.75,66.12,67.37, +67.37,67.5,67.25,68.5,69.75,69.5,69.62,69.62,69.5,69.12,69.5,70.37,70.5,70.87, +71,71,69.87,69.75,69.75,68.5,68.75,69.12,69.5,68.25,68.75,69.25,69.25,69.25, +68.5,68,68.5,69.12,68.87,68.37,69.5,69.37,68.5,69.25,69.75,69,70,71.12, +72,72.87,71.87,71.75,72.12,71.87,73,73.62,73,72.5,73.37,73.87,72.87,72.12, +72.25,72.62,73.87,73.75,75.25,77.5,76.62,76.87,77.62,77.37,76.12,75.75,75.87,302.25, +303,305.75,306.25,305.25,306,307.5,307.25,307,306,302.75,305,307.5,307.5,306, +309.75,308.63,308.13,311,318,315,314.25,309.75,307.5,308.5,309.88,309.75,307,306.25, +308.25,312,311.25,311,311,312,318.88,317,317.75,317.25,316,314.5,312.5,314.5, +316.75,317,312.75,312,314.75,314.75,310.25,309.5,309.38,306.75,305.25,306.75,308.13,305.5, +307.5,304.25,304.13,303.75,302.13,299.25,298.63,298.63,298.13,302.5,301.25,302.13,305.63,305, +306,304.5,304,306.75,299.75,300.13,299.13,297.13,303,304.5,307.63,308.13,308.63,311.38, +310.75,311,309.25,307.75,310,305.25,306,309,306.5,308.75,312.25,310.75,304.75,304.88, +306,302.5,305.13,304,304.5,294.5,298,302.5,300.5,295.25,285,282,281.38,270.38, +269.38,272,273,274.13,275.5,274.5,273.75,275,276,274.38,271.75,270.63,265,264.75, +267.5,268.25,266.75,264,262.38,261.25,261,259.25,258,256,259.63,263.25,262.75,260.63, +259.38,264,267.25,268,265.25,263.5,266.5,269,271,272.5,275,274,273.63,276, +277,275.25,279,284.75,285.25,280.5,280.5,279.25,278.75,278.13,275,276.5,276.88,276.25, +273.5,274.5,279.63,277.5,284,280.5,282.5,286.5,287.5,289,292.88,295,298.75,299.5, +298.75,297.5,299.5,293.88,292,291.5,292.5,291.5,294.5,296.63,296.5,297,293,292.25, +293.5,294.75,290.75,286.75,288.63,287.63,286.75,288.5,285,286,284.5,285,279,279, +278.75,275.5,273,273,269.25,267.75,267,267.75,266,264,266,259.38,256.63,258.38, +258.75,258.75,257.75,256.63,255.25,255,257.25,259,258.5,258.25,257.75,262.25,265.25,265.13, +265.5,265.75,266,269,271,266.75,267.5,267.25,265,264.5,266,260.5,256.88,256, +258.25,259.88,260.5,260.5,260,262.5,262,261,264.5,265,266.13,261.25,262.5,259.38, +259,258.5,259,261.13,258,262.75,265.5,264.38,260.38,259.88,261.38,261.25,253,252.13, +252.5,249.63,248.88,248.38,240.5,235.5,236.25,239.38,239.75,239.75,240.5,238.25,236.13,234.75, +235.25,237.38,238.5,237.13,237.25,239.13,238.38,238,240.75,241.5,239.25,239.5,239.25,238.75, +242.25,243.75,241.38,241.13,240.25,245,248.75,250.38,250.25,253.5,255.38,253.63,254.75,254.25, +255.13,254.75,256.5,256.5,257.25,258,258.63,259.5,258.25,257.13,258,262.75,264.63,264.5, +264.5,264.25,264,265.75,264.75,264.5,265.13,267,267,266.75,264,265.5,266.38,265.5, +266.5,265.25,264.63,266,267.5,268.5,272.75,269.88,269.25,269,267.5,266.63,264.25,261.63, +262.5,263.75,264.75,263.13,262.63,263.25,260.25,261.13,259.75,259.25,262.5,262.25,262.25,261.75, +262.75,267,267.25,264.5,261.63,259,258.38,257,257.5,258.25,258.13,259.5,252.75,250.63, +250.5,251.5,250.38,249,249,255.75,257,258.5,259,257,255.75,258.5,257.38,255.63, +255.38,257.25,257.13,256.75,255.13,254.13,256.25,256.5,256.75,257.38,257,258.5,259.25,259.63, +259.63,258.25,258,256.75,256.38,256,255.25,255.63,255.5,259.13,261.75,262.5,261.63,261.25, +262.75,265.25,267.13,266.5,267.5,266.75,265.63,266.63,267.75,266,266.88,267.13,269.5,269, +267.25,267.5,267.75,267.5,265.75,265.5,265.75,265,264.25,263.88,266.5,266.63,268.25,268.63, +268.13,265.88,266.25,267.25,271.25,272.5,272.63,270.75,272.63,272.75,270.5,262.13,259.13,259.5, +258.13,258,259.25,259.25,261.25,261,264,261.5,264.13,265,262.38,260.38,259.13,259.13, +257.88,256.88,255.25,257,254.13,251.75,250.5,251.25,252.25,249.63,250,247.38,246.13,246, +244.5,245,246.75,245.88,245.38,245.25,249.38,252.25,253.75,251.75,253.25,252,250.5,251.63, +255.13,253.63,256,259.5,260.38,259.5,257.38,257.13,259.25,259.25,257.5,256.5,257.5,263.5, +269.88,270.75,271.38,270.13,271.25,269,275.63,273.75,275,274.25,274.5,275.63,276.5,275.75, +275.75,279.5,277.5,277.5,279.63,282.5,282.5,282.5,282.63,282.5,283.63,284,282.5,282.25, +278.75,279.63,280.13,278,276.5,276.75,276.38,276.13,275.38,275.38,275.25,275.13,275,269, +269.38,271,271.75,267.75,267,267.63,266,269.5,268.5,268.13,269.75,273.5,275.25,271.5, +268.75,267.25,267.25,269,271.25,271,272.38,274.75,271.25,270,268.25,269,266.13,268, +269.13,271.63,273.75,271.75,272.38,276.5,279,277.25,276.5,277.75,273.5,270.25,270.13,265.25, +264.75,265,267,267.75,268.25,269.5,270,271.5,270.75,270.75,272.5,270.25,269.5,269.5, +269.25,271.13,272.75,270,269.25,269.5,268.25,268,262.75,263.5,260.5,261.25,260.19,258.88, +257.5,257.5,262,266.25,265.75,270.13,266.5,265.25,261.5,259.88,255.5,253,256.5,263.5, +261.5,262.75,262.5,263.5,269.75,271,277.25,277.5,278,276.5,277.75,279.13,278.75,280.75, +280,282.75,284.5,283.38,284,285,284.63,283.5,282.5,277.75,277.13,277,277.63,277.5, +277.5,277,278,275.75,276,273.25,272.13,270,267.75,268.5,268.75,269.5,270.88,272.25, +274.63,278.5,279.25,277.5,277.5,275.88,277.25,274.5,274.25,274.25,274.25,276,271.5,271, +271.75,272.25,270.88,272,273.75,272,270.25,270.5,268,272,272.75,276,276.63,276.75, +277.13,276.75,276,274.63,274.5,274.5,273.75,276.25,273.5,273.63,274,271.5,268.38,268.5, +266.5,266,263.63,259,257.75,259,254.75,253.75,252.75,252.5,252,252.5,255.75,253.88, +253.25,253.5,249.88,249.5,248.5,249.13,253.5,253.75,253.5,253,251.5,252.13,255.38,256, +255.5,252.25,249.63,248,245.25,249.25,249,252.5,252.38,253.75,255.5,257,256.75,260, +258.5,259.25,255.75,254.38,255.5,258.5,261.25,266.75,266.13,268,269.5,268.25,260.75,260.25, +260.5,258.5,259.25,258,258.5,261,258.25,257.5,257,257,258,259,258.5,261.25, +261.75,259.25,258.75,258.5,255.25,255.75,257.75,258,254.25,252.5,256,259,261,259, +262,258.5,252.5,252.88,251.75,252.5,255.25,253,252.75,254,257.75,261.25,259.25,256, +257.63,251,248.13,249.63,253.38,249.88,246.75,247,248.25,242.88,238.5,239,234.25,233.75, +230.13,230,228.5,228.38,229,226.25,223.38,223.5,221.5,222.25,221.13,221.13,216.25,215.88, +207.75,219,218.5,216.75,215,214.25,214.75,215,210.5,214,214.63,217.25,217,220.63, +224,224.5,223.75,222.13,220.5,220.5,219.63,217.5,220.13,223.13,220.75,221,220.5,217, +215,215.75,213,213.25,211.63,211,210.5,210.5,209.75,211.88,208.75,209,212,210.25, +212.5,208,207.25,208.63,207.5,208,205.25,203.75,204.75,201,197.5,200.13,189,183.75, +183.25,188,190.75,192.13,190,190.5,185.5,186,185.75,180,178.63,177.75,178,179, +179.5,177.63,179,179.5,179.75,181.5,179.63,180.75,185.75,181.5,178.25,178.25,180,177.75, +176.25,176,177.75,181.63,179.75,177.75,177.13,181.63,180.13,179.5,182,184.38,184.38,187.75, +188,190,191.25,190.38,190.25,189.75,191.5,192,197.13,199.5,199.25,201.5,203.5,206.25, +205,202.5,204.75,206.75,203.63,203.88,206.25,205.5,208.13,208.25,208.25,208,210,211.25, +206.25,204.5,204,203,203.5,205.75,206,208,210.25,210.5,212,213.25,214.5,216.63, +216.5,217,213.5,212.5,213,215.5,214.25,212.75,212,216,214.5,216.25,216,223, +216.25,215.25,210.5,208.5,208.5,208.75,206.25,206,207.63,201.75,200,202.5,205.13,206.25, +208,211,210.25,208,212.25,207.75,207.5,204.75,201.5,207,202.25,198.75,196.25,197.25, +198,203.5,204.88,205.75,206.25,208.75,203.25,203.5,208.13,209,213,214.13,215.75,215.25, +212.5,213,215.5,215.75,217,213.75,214.25,214.25,216,211.88,211.5,207.5,206,212, +217.5,214.75,211.5,210.5,214,213.25,201.63,196.75,198.25,192.5,195.25,191.25,188,187.25, +183.25,182,179.63,179.25,162.88,162,162.13,158.5,159.5,157.25,157.88,160.25,157.5,167.75, +169,169.63,162.63,163.25,163.5,165.5,166.75,168.25,166,160.13,161.75,164.5,166,165, +168,168,169.75,165,165,165.38,169.13,171.13,170.25,162.5,162.5,166.13,166.13,168, +170.5,176.5,177,172.5,168.5,170.5,166.75,167.5,169,173.75,180,182,183,184.75, +188.25,186.75,185.5,183.25,189.5,186,187.25,189,188.5,184.25,176.25,177.25,175.88,181.25, +186.5,182.25,182.5,175.25,174.5,176.13,176.25,174,175.38,160.5,160.75,159.25,154.25,155.63, +158.5,154.25,153.5,160,160.25,165,164.75,168.25,166.5,169.25,158,161.75,150.5,150.5, +155.25,165.13,170.25,171.75,179,176.5,173.5,183.5,190.25,188.25,190.75,190,188.25,189, +189,192,195.25,193.5,198.5,198.5,199,199.75,202.5,206,207,207.75,207,200.88, +200.63,198.63,201.63,202.25,201.25,204.75,213.75,219.5,221,214.75,217,216.5,210.5,213, +215.5,203.25,196.25,197,198.75,198.13,205.25,210,210.25,211.5,210,211.25,216,215.75, +211.25,210.5,213.5,216,215.5,218.25,222.75,225,222.75,226.25,226,228.75,219.5,218.75, +218.75,211,212,209.63,210.5,216.5,215,212.5,215,217.13,217.5,217.5,220,220.63, +221.75,219.13,222.63,225.5,225.5,224.25,221.5,224.5,228,225.75,223.5,221.88,222,218.75, +223.5,227.25,229.75,231.25,234,231.25,231.25,229.25,229.5,230,230.63,230.25,233.25,238.5, +235,231.63,228.5,235,239,244,248,241,241.5,242.5,245.13,245.25,247.38,246.75, +247,249.13,246.5,236.5,237.5,238.25,240.25,238.25,231.5,235.5,236,235.75,233.5,233.88, +232.75,235.75,228.75,230.75,227.5,225,228,226.5,226.5,232.5,234,235.5,235.25,237, +240.25,245.13,245.25,240.5,244,245,244,247.75,243.25,238.25,245.5,247.25,238.75,236.5, +235,232,227.5,225.25,226,225,229.5,238.75,241,245,248.5,251.5,243.5,235.13, +239.75,242.5,248.25,238.75,238.25,243.5,250.5,249,251.25,261,259.5,253.13,253,255.25, +255.5,263,265.25,264.5,263.5,266,272,270,267.13,275.13,280.25,275.5,283.75,287, +276.25,278.25,282,275.5,276,275,280,278.5,277.25,278.5,284,283,285.5,283.75, +275.25,280,289,283.25,281.25,276,278,281,277.5,270.5,261.75,255,252.5,245, +247.25,253.5,255,257,259,260.5,253,250.5,258,266,266,252.75,270.75,290.5, +290.5,286.25,285.25,293.25,296,297.5,295.5,296.75,299,302.75,302.5,303.25,298.25,298.25, +298,297.25,297.75,298,299.25,300.25,298.5,299,300.5,300.63,303.25,304,308,308.25, +310.25,310.25,311,314.5,316.25,317,315.75,314,309,310.5,313,312.5,308,309.13, +307.5,310,313.75,315,308.25,299.25,298.75,296.5,295,305.25,315.75,313,309.5,306, +308.63,315.25,313.75,317.75,311.13,312.88,315.5,320,328.5,323.25,322.5,321,318.5,313.13, +309.75,307.13,310,314,318.75,323.5,397.5,390,389,388.5,381.5,388.5,396.75,397.5, +392.25,395.25,405.5,409.25,414,416,416.25,421,410.25,411.5,411.5,401.25,405.13,405.5, +406.25,415,424.5,428.25,424.25,423.5,425,428.5,428.75,426.5,429.75,420.5,423.25,420, +420,424,427,430.5,434,434,432,427.25,419.5,424.25,430.25,433.5,437.5,440.5, +444,444.75,442,440.75,438,438.25,438.5,435.25,432.5,422,426.5,418.5,422,427.25, +432,438.5,441,443,439.25,440.25,445.5,451,446.5,437.75,431.5,438.5,431,428.5, +427,428.5,434.5,438.5,434,432.25,434.5,433.75,436,427.25,427,420.75,420.75,422.75, +417.25,412,411.25,415.25,416,412.75,406,409.25,404.5,399,392.25,391.5,385,385.5, +386,390,392.5,396,394.5,396.25,398.5,402,397.25,396,396,397.75,399.25,391, +387,380,381.5,384,388.5,387,385.25,382.75,380.5,382.75,384.25,378.75,373.25,371.25, +371,373.25,376.5,387,388.25,386,381,378,378.25,377,383,385.5,389,378, +375.5,374.5,361.5,362.25,377.25,384.5,384,392,400,393.75,395,403.25,405.25,403.5, +403.5,401.5,398.25,398,397.25,396.5,398.5,397,397,394,397.75,397.25,393.25,393.25, +393.5,398.75,398.75,401,404.5,405.25,406,407,403,404.25,405.5,407.13,411.5,411, +408.25,411.5,413.25,416,419,424.75,422.25,421.25,418,415.5,415.25,412.5,408,408.5, +402,398.25,396.25,394.5,393,398,398,389.25,389.5,390,383.5,387.5,391.5,391.75, +395.25,396.5,399,403.5,403,396.5,393,392,388.25,390.63,390.5,391,394.75,392, +396.5,395.25,395.5,396,396.25,395,387,387.5,391,392.75,391.25,391.5,394.25,397.63, +399,396,394.5,402.25,401.25,400.5,397.75,398.5,394.5,390,383.5,383.5,384.5,380.63, +383,379,379.25,383.5,382.75,376.75,378.75,380,382,381.25,381,379.25,381,383.25, +383.5,387.5,390.5,395.25,393,393.75,394,391.75,389.5,390,388.5,391,389,383.5, +382,378.75,380,383.75,381,381.25,379,377,373,376.75,371.25,366,372,371.5, +372,377.5,380.25,382,379.5,376.5,374.5,374.25,369.5,366,365,365.5,364.75,368, +368.5,364.5,366.5,369,367.75,368.25,370.5,370.5,372,369,367.5,369.25,370.25,368.5, +365,366.75,367.5,367,364.25,357,360.5,363.25,360,349.25,349.5,347,342.5,339, +342,338.25,336.75,336.5,338.75,339.25,331.75,333,334,335,336.75,330.5,333.5,335, +341.25,338,341,334.25,334.25,318.5,320,324.25,317.75,312,313.5,311,313.25,309.5, +308.25,306.5,300.25,299.25,291.5,290.25,290,291.75,293.5,294,298.25,293.75,293.63,288.5, +288.25,296.75,299,297.5,296.5,300.25,297.5,290,290.75,295.5,295.75,296.25,299,301.5, +301,301,305,305.25,305.25,306.75,307,308.5,305,303.5,304,308,305.75,305.25, +306,304.25,302.5,302.25,303.5,301,304.5,305,306,303.25,302.25,300,299.75,299.75, +299,300,302.5,306.25,309.25,310,299.75,299,301,301.5,310,313.5,310.25,313.25, +315,311.25,305.5,306.5,309.5,314,313.5,294,294,286.5,283.25,283.5,285,285.5, +285.5,289,292.75,290.25,293.5,292.25,291.25,296,296.75,298.5,299.5,298.5,293,293.5, +297.5,295,301.25,314.5,311.25,310.75,310,315,316.75,316.75,315.5,311.88,310.5,310, +312.5,314.25,313.25,312.63,315,321,321,317.75,318,323.5,318.75,308,311.25,317, +322.25,320.75,325.75,327.5,325,334,336.5,336.25,341,343.5,342,338,333.5,331.25, +334.25,338.75,342,342.25,344.25,345.5,351.75,349,352.75,350.25,356.5,361,358.75,355.5, +354.5,351.25,349,352.25,354,353,352,356.25,356.5,357,356.5,356,360,359, +356.5,355.25,354.25,356,356.25,356.5,356.25,351,354,355.25,358.5,358,360.5,359, +360.25,353,347.5,346.5,348.75,348,343.25,341.25,338.25,336,336,334.75,332,334, +336,329.75,326.5,327,329.25,335.75,338.75,337.5,336.75,334.25,338.25,332.5,328.25,327, +326.5,325.75,325,318.25,317,319.5,323,316.25,316.13,313.5,312,311.75,311,310, +313.25,315.5,312.25,310.25,314,315.75,316,311.5,312.25,316.5,319,317,316,312.75, +311,315.38,314.5,313,313,310.75,309.63,310.5,317,317,314.5,314.75,311,309, +310.25,307.75,306.25,305.25,298.5,297.75,295.25,297,290.75,290,290,292.25,288.5,293, +296.25,297.25,298.25,295.25,291.5,292.5,296.25,296.13,292.75,293,297,289.5,289,289, +288.75,286.25,288.75,284.5,283,290,291.5,290.25,286,288.5,294,298,301.5,307, +300.5,297.75,291.75,291.5,286,287,287,282,273.75,271.5,273.75,277.25,273,266.13, +263.25,264.5,268.25,268,270.25,267,269.25,265.75,259.25,261,266.25,265.25,260.75,263, +260,254,243.75,236,238.75,235.5,227.5,225,218.75,230.5,236.25,238.5,245,247.5, +249.25,247,248.13,251.13,252.5,252.25,251.25,251.25,253,253.5,253.63,256.25,257.75,255.75, +252.25,250,247.75,245,248.75,250.5,243.5,242,244,250,249.88,250,254.5,255.25, +256.75,255,257.13,265.13,270.25,260,265.25,259.13,254.5,253.25,258.75,262,265,265.25, +264.25,270.25,278,279.25,276,263.5,259,245,238,241,243,237,249.5,258.5, +269.5,263,262,274.25,278,285,287,287.5,280.5,279,282,292,294.5,286.25, +290,299.63,306,309.5,313,321,323,319.5,320.5,322.75,321.25,326.38,325.75,325.5, +319.5,319,317.5,325.75,331.75,337.25,336,334.25,332.75,329.5,322,317.75,317.75,321.25, +322.25,319.25,318.5,324.25,325.13,325,318.5,315.25,323.5,329,328.5,333,334.75,340.25, +339.5,335,344.5,348,352,349.5,346,347.75,347.5,350.5,348.75,344.5,346.5,338.25, +334.75,336.5,336.5,337,334.25,334.25,340.25,341,348.5,356,354.25,353.5,345,349.5, +369,375,373,367.75,367.75,368.5,367.5,366.25,366.25,366,364,362,356.5,358, +355,354,351.25,360.25,360.5,351,350.25,353.25,356.25,356.25,355.25,352.5,355.25,355.5, +355.25,352.25,355.13,355.5,358.5,351.75,346.75,345.5,344.25,351,352.5,359,360.5,361.5, +363,359.5,366.25,366.25,365,361.75,359.25,359.25,356,356.25,359.5,354.25,356.25,360, +360.5,358.75,352.75,355,353.25,351,350.25,348.5,353.75,347,343,344,340.25,341.13, +345.25,343.25,343.75,340,343.25,344.5,343,345,347,355,354.5,352.5,349.25,347, +345.25,341.5,340,337.5,342.75,340,331,335.25,336.25,338,340.25,340.5,343,343.5, +341.5,338,341,348.75,346,341,340,338.25,337,334.5,328.75,328,329.25,333.5, +332.75,335.25,327.5,325.5,326,320,310,313,313,315.25,316.5,315.5,317.75,320.5, +327,325.5,317.25,321,326.5,325.5,332.5,336,344,348,339.5,334.25,332.5,329.5, +320,320.5,319.5,312,312,313.25,314.25,310.25,313,309.5,307.75,308,310,311, +315,318,317.75,317.5,319,318.25,319,322.25,326.5,322.5,321.75,319.75,319.5,324.25, +330,329,331.5,325.5,325.13,326.25,328,326,327.75,326.75,325,322.5,326.25,324.5, +318,314.5,311.5,311,306.19,305.25,306.5,306.5,307,310,309,311.5,311.5,307, +305.25,307,308,310.5,312.75,311.5,308.75,307,305.75,305.25,302,303,300,298, +294.5,293.5,294.25,299.5,301.5,299,295,299,299,295.5,291.75,293.25,295.5,296, +295.25,295.25,294,295.25,297,300,306.75,306.5,303.5,300.25,295.5,294.5,295.5,295, +294.75,295.25,295.25,296.25,298.25,297.75,298.5,300,300,299.75,295,305.25,310,307, +300,299,304,307.5,304.25,300.25,300.25,309.25,313,314,310,315,319,319.25, +316.5,320.25,319.75,316.5,315.25,316.5,318,326,323.25,325,327.5,328,328.5,333, +330.25,328,326.25,322.5,323,318.5,321.5,325.5,323.25,319.75,317,312.5,310,309.25, +307.5,308,304.5,309,308,315.5,317,323,326,321.25,315.5,313.25,319,322, +328.5,328,328,325,322.25,325.25,332,331.5,335.25,334.25,330,330.25,334.75,335.25, +335.25,337.25,334.75,335,338.25,338,338,337,332,333.5,332,335.5,338.5,335.5, +339,341,341,336.5,338,338.75,335.25,331.5,335,335.25,334,330,336,331.5, +326,332,334,339,338,345,352.5,352,355,352,354,361.5,361,351, +348,348.25,351.5,356.25,349,348,355.75,351.5,345.25,345,352,358.75,369,364.5, +367,366,363,368,369,349,337,331.75,330,326,325.5,329,324.13,323.75, +322.5,331.25,333,333,334.5,338.25,340.5,342.5,342.63,340,343.5,346.5,339.5,335, +329.5,327.5,326,326,320,633,636.5,639.5,642,642,645.5,639,641,631.5, +628,628.25,633.5,625,625.5,602.25,598,595,590,584,579.25,580,584,581.5, +590.75,573.5,573,589.5,586,580.5,576,581,566,561,560,576.5,578,587, +585.5,586.25,587.5,596,586,577,572.5,586,572,570,568.5,579,588.5,586.5, +589,593.25,594,591.5,606,614,618,603.5,614,605,606,617,619,609, +616,618,612,605.75,599.25,597.75,594,590.5,588.75,600.5,613.5,624,620,617, +613.5,613.5,620,619.5,614,617,636,644,640,640,642,641,637,629, +624,620,610,610.5 +}; + + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c new file mode 100644 index 000000000..ae087f294 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c @@ -0,0 +1,667 @@ +double gDataOpen[10000] = { 110.4,110.09,108.9,110.9,111.87,110.98,111,112.83,112.99,109.75,110.77,114.3,113.02,111.97,113.24, +112.1,110.39,114.72,115,116.62,117.01,116.19,115.32,114.88,114.85,115,110.25,109.66,108.57,108.75, +109.35,108.3,108.55,108.73,107.79,106.31,105.5,105.39,105.96,105.52,104.75,105.1,104.73,105.96,105.77, +106.5,104.93,105.27,104.22,103.1,102.85,103.11,102.87,101.8,102.46,105.5,106.55,106.5,106.62,107.26, +105.4,105.57,103.9,105.45,106.8,106.95,107.67,105.84,105.61,105.1,105.4,105.81,104.69,103.82,103.93, +102.42,102.76,102.75,101.75,102.8,102.06,101.11,100.3,101,98.74,97.23,95.16,95.02,94.5,94.8, +96.3,94.99,95.75,95.03,96.51,96.4,96.43,95.98,95.8,95.45,94.51,94.24,94.66,93.9,94.71, +95,94.82,95.1,94.5,94,93.95,94.45,93.4,92.65,93.86,93.29,93.48,94.5,93.97,92.4, +90.25,92,90.25,93.71,96,97.86,98.4,98.8,98.9,98.66,99.12,99.06,98.5,98.6,98.8, +99.52,98.9,99.8,100,99.17,99.1,98.97,98.8,98.57,97.7,97.52,97.22,97.08,96.91,96.42, +95,99.8,100.69,99.4,98.99,99,98.5,99.08,98.5,97.6,97.25,97.18,97,97.11,96.3, +95,95.75,95.78,96.1,95.1,94.95,95.61,94.97,94.78,93.6,93.72,93.65,94,94.48,93.51, +92.5,91.9,91.35,91.35,90.65,92.71,93.05,92.9,93.01,93.6,93.42,93.07,93.08,92,91.55, +92.3,92.59,92.25,92.42,91.5,91.76,91.8,92.5,91.5,89.8,90.91,91.83,91.21,90.91,90.05, +90.04,89.8,90.51,86.33,86.08,84.45,84.2,84.15,83.71,83.14,82.93,82.81,81.65,81.88,81.76, +81.9,81.85,82,81.9,81.65,81.75,82.61,82.37,81.97,82.56,83.21,81.9,82.25,81.14,80.6, +79.6,79.9,80.29,81.19,81.13,81.3,81.26,80.06,79.91,79.2,78.9,78.95,79.28,79.51,79.38, +78.93,77.48,76.9,76.05,75.34,75.2,75.56,75.63,75.63,76.65,76,76.21,76.65,76.44,76.38, +75.83,75.48,75.99,74.92,75.49,75.73,76,73.7,73.35,74.24,75.01,76.07,76.25,76.18,78.09, +77.59,78,77.54,77.7,76.89,76.53,77.32,77.04,77.15,78.16,77.99,77.84,77.9,78.44,77.85, +76.93,77.14,77.63,77.24,78.55,79.78,79.06,79.1,80.5,79.89,80.15,80.35,80.16,79.89,79.35, +80.25,79.83,80.86,80.5,81.75,83,81.8,82.47,82.65,82.9,82.49,82.6,82.95,82.87,82.54, +82.11,82.59,83.51,82.7,82.84,81.95,81.3,82.49,81.65,83.95,81.89,81.92,81.18,81.1,81.83, +82.27,83.6,83.7,83.33,83.05,82.72,82.95,82.88,82.2,82.86,82.98,82.99,84.23,83.35,83.82, +83.11,83.35,83.43,82.65,81.51,81.56,81.03,81.26,80.25,80.01,79.91,79.51,79.55,80.2,80.1, +79.97,80.65,81.2,80,80.1,80.91,80.68,80.86,80.55,81.33,80.4,80.4,80.58,79.5,79.94, +80.55,81.45,80.9,81.5,80.21,80.75,81.5,81.05,81.39,81.33,83.04,84.14,84,82.8,83, +83.82,84.37,83.15,83.9,83.95,81.4,82.2,82.45,81.85,82.8,83.1,83.48,84,82.61,82.46, +82.95,83.23,83.89,82.88,83.65,84.5,87.01,86.8,88.57,89,88.56,88.4,89,89.15,89.05, +89.18,88.8,88.95,88.12,86.88,87.6,88,86.18,85.45,84.03,84.25,84.2,82.7,82.71,83.41, +83.1,82.91,81.55,81.2,81.85,81.51,82.32,82.53,82.97,83.08,83.15,83.08,84,82.41,84.33, +82.36,82.6,81.7,82.75,82.25,81.24,80.25,79.82,80.11,80.65,80.22,80.02,79.25,78.06,77.17, +78.31,77.7,77.56,78,79.27,79.74,80.38,80.43,80.75,81.49,81.03,80.86,81.28,80.7,79.7, +79.5,80.16,80.35,81,80,80.81,81.45,81.53,82.7,82.75,81.36,81.1,81.4,82.07,81.9, +82.15,81.93,83.65,83.4,83.41,82.75,83.75,83.31,83.27,83,83.3,83.55,83.8,84.15,83.98, +83.98,84.6,83.2,84.72,81.99,82.43,82,81.16,79.2,79.4,77.38,75.15,74.8,74.38,74.3, +74.8,75.26,73.83,74.01,75.17,76.81,76.83,76.7,76.03,77.7,76.4,75.7,75.05,74.5,74.75, +74.58,75.04,75,75.8,77.06,76.75,75.57,77.3,77.11,76.45,75.42,76.14,76.3,77.28,76.5, +75,73.93,73.09,72.53,73.53,73.63,74.75,75.26,75.56,78,76.6,76.78,76.88,77.05,77.05, +75.6,74.68,75.1,74.23,73,75.48,76.98,77.15,79,84.51,85.76,85.9,87.35,88.28,89, +89.05,90.23,90.08,91.49,90.46,90.32,90.74,90.71,90.8,89.97,89.61,89.42,89.86,90.49,90.74, +92,91.5,92.25,92.35,92.02,91.7,92.35,92.94,93.15,92.75,92.64,92.53,92.35,91.98,92.29, +92.67,93.75,94.5,94.23,93.5,93.16,92.7,92.95,94.14,94.21,94.35,93.01,93.87,93.78,93.67, +93.65,92.68,91.5,92.3,91.98,92.7,93,92.61,94.95,93.65,94.01,95.39,95,95.68,95.78, +96.5,96.54,96.6,97.74,98.97,98.6,98.1,97.81,97.4,97.69,97.5,97.35,96.59,96.35,97, +96.8,96.92,96.3,96.85,96.1,96.2,96.43,97.7,96.88,96.55,95.65,94.5,95.15,94.94,95.05, +95.04,94.7,94.3,94.95,95.36,95.3,95.25,95.08,94.66,93.6,92.92,93,92.5,92.4,91.05, +91.25,89.55,89.33,89.4,89.8,88.58,88.33,87.36,88.22,88.4,88.45,88.2,84.3,84.78,84.75, +86.26,86.02,86.77,87.43,88.04,87.14,87.95,87,85.95,85.14,84.48,84.35,84.1,83.8,84.04, +85.35,85.7,85.4,86.4,86.2,85.94,86.6,87,86.43,85.86,84.9,84.7,84.3,84.22,84.05, +84.55,84.57,84.65,85,85,85,85.23,84.52,84.75,83.6,84.1,83.7,82.54,83.05,83.7, +84,83.48,84.38,85.97,85.3,86.7,86.87,86.45,86.25,85.88,85.6,84.85,85.7,85,86.75, +85.63,84.5,86.05,84.13,84.84,85.9,84,84.4,85,85.3,86.5,87.45,88.28,88.3,88.35, +89.71,89.95,90.28,90.1,89.28,90.4,90.2,90.5,90.25,90.49,90.05,90.23,89.9,88.64,88.75, +87.95,87.85,88.64,88,88.48,88.75,88.64,86.75,87.75,87.59,87.06,87.4,86.08,85.3,86.65, +86.79,87.25,87.2,87.6,87.75,88.1,89.75,88.02,88.13,89.01,90.01,90.3,90.65,90.75,91, +90.5,91.15,92,91.9,92.3,93.8,92.1,93.79,93.5,94,93.37,93.6,93.95,93.55,91.67, +92.07,92.67,92.99,92.39,92.15,91.57,91.6,91.27,92.86,93.05,92.57,92.4,92.6,92,92, +94.38,94.3,96.49,95.95,96.58,96.57,97.6,96.5,96.8,96.27,96.5,95.2,97.4,98.6,98.42, +99.31,99.99,99.1,100.06,99.2,98.45,99.31,98.85,100,99.38,99,99.15,98.02,98.1,99.15, +99.4,97.9,97.82,97.84,97.23,96,95,95.07,89.9,91.45,91.21,91.75,93.21,93.14,92.2, +92,92.86,92.66,93.27,93.1,92.37,92.8,93.07,92.83,93.23,93,93.85,92.11,93.43,92.7, +91.96,90.69,91.15,90.52,91.3,90.05,91.15,90.57,90.9,89.9,89.79,89.66,89.03,88.4,89.3, +88.32,89.92,89.9,91.02,90.4,89.45,90,89.55,89.4,88.33,88.52,89.68,89.9,90.71,90, +89.6,89.05,88.8,88.15,87.6,88.3,89.25,89.35,89.28,89.27,93.9,92.65,93.1,92.4,93.3, +92,90.5,90.74,91,89.55,88.75,89.2,89.25,89.41,89.4,91.08,91.5,92.24,92.45,90.63, +90.4,88.49,89.7,87.6,86.75,88.99,89.2,88.45,87,86.33,86.24,82.4,81.95,82,82, +81.65,82.85,84.25,83.39,82,83.1,82.05,81.8,81,81.65,81.45,80.87,81.05,79.69,79.7, +81.13,80.75,81.15,81.8,82.45,82.55,83.67,81.6,82.95,82,82.5,83.2,83.85,82.7,87, +86.15,86,84.1,85,86.1,86.09,84.8,84.25,83.95,81.4,83.9,84.15,83.7,83.55,82.95, +84.79,85,84.95,84.15,84.95,83.1,84.15,84.8,82.75,82.35,80,82.25,84,84,84.32, +89,87.45,87.57,87.6,84.51,85.75,86.25,85.77,86.58,88.05,89.67,89.5,90,88.78,87.55, +86.9,86.37,86.95,86.3,87.2,84.45,85.3,85.66,85.34,84.05,85.21,84.65,85.24,83.36,84.4, +81.89,83.38,80.07,78.5,80.1,79.1,79.7,80.62,82.6,82.35,82.32,79.9,78.5,79.26,81.05, +80.75,83,82,82.46,82.76,81.71,82.09,82.46,78,78.45,75.99,75.25,75.82,77.45,75.71, +77,76.7,77.6,78.9,77,77.9,78.45,77.9,79.7,79.49,79.57,79.08,78.02,76.4,76.1, +77.5,78.3,77.1,77.97,77.11,77.85,78.18,78.2,77.7,81.3,79.5,78.5,77.99,80.6,80.15, +80,81.3,83.74,87.4,88.58,87.23,88.31,85.85,84.75,85.55,83.95,81.9,80.7,78.8,77.1, +77,78.5,79.81,80.2,79.75,79.4,78.6,79.25,80.6,79.6,79.25,81.25,80.8,78.6,81, +81.5,84.9,83.41,86.72,88.6,87.71,85.9,86.15,84.63,83.95,82.05,77.95,78.24,80.8,80.38, +80.38,79.5,77.5,77.59,78.5,80,80.8,81.75,81.99,78.9,78.67,77,76.56,75.15,72.5, +75.5,74.4,74.5,73.65,71.73,72.8,66.6,67.75,61.54,62,54.65,56.05,57.78,56.6,59.5, +60.3,61.18,59.2,59.55,61.43,64.2,61.2,61.08,63.75,65.4,64.8,70.65,73,72,71.5, +74.05,76.4,74.6,72.45,73.75,72.74,72.35,74.2,75.55,75.6,76,80.4,80.4,81.2,80.95, +81.9,81.56,79.35,76.5,75.4,71.95,71.55,71.05,70.61,69.2,69,67,67.94,68.21,70.4, +70.75,70.5,70.37,68.75,68.9,66,68.25,71.25,70.96,70.5,71,69.51,68.4,70,68, +70.6,71.4,73,72.45,67.95,67.85,72.01,71.35,71.2,66.1,70.3,67.25,70,74,74.2, +75.6,76.18,74.2,75.45,75.4,77.85,77.75,78.48,80.55,79.65,78.11,80.75,82.05,80.6,81.5, +82.8,83.65,84.25,83.76,84.41,85.45,86.25,84.2,84.6,84.5,80.25,79.95,81.9,78.2,76.89, +81.7,83.1,83.75,83.85,83.91,84.71,86.7,86.05,88.2,88.35,88.95,89.9,86.97,87.05,86.35, +86.5,87.56,88.05,88.45,88.5,87.5,100.84,99.96,101.4,102,104,103.55,103.75,103.57,105.8, +106.5,105.7,106.9,106.85,107.1,106.55,107.02,108.3,105.52,104.35,104.82,107.3,105.15,104.25,103.35, +98.6,98.49,98.1,99,98.45,96.38,98.75,99.54,101.5,104.8,109,106.7,106.75,105,103, +106.64,106.7,106.25,108,107.64,106.4,104.25,108.15,109.5,108.5,108.8,110.8,114.25,114.25,119.85, +118,118.05,120,121.5,123.75,124.7,124.25,125,124.05,121.5,120.6,122.75,123.5,122.75,122, +122.05,122.7,123.89,121.9,121.51,120.15,120.8,121.55,121.12,120.4,120,119.5,120.5,116.85,114.3, +114.8,114.43,112.9,114.1,116.25,115.9,114.29,114.95,114.35,114.7,115,114.1,116.7,115.7,113, +113.1,113.96,113.05,109.6,109.95,109.15,107.25,109.6,107.8,110.5,110,108.05,106.5,105.75,102.65, +101.65,103.05,106.3,101.87,99.85,98.7,97.7,95,98.5,98.03,96.65,97.15,92.9,92.3,91.72, +90.2,91.3,94.45,94.1,91.8,90.6,94.1,96.4,94,93.9,96,97.9,100.68,101.5,100.15, +101,102.75,105.75,106.9,106.99,103.95,104,102.5,103.85,104.68,105.49,104.2,106.35,106.5,105, +103.85,103.7,105,105.8,107.25,107.8,108.5,105.35,105.9,104.9,104.75,104.75,104.5,104.85,105.7, +103.4,105.6,106.1,106.1,108.53,106.15,105.9,101.6,104.73,106.5,110.9,112.6,114.1,113.5,115.6, +113.8,113.1,111.25,113.75,112.6,112.15,113.5,116.26,113.98,115.1,115.6,117.25,116.75,116.3,117.5, +117,117.6,113.64,113.25,112.5,112.65,114,117.35,119.52,117.5,117.8,119.7,117.95,115.07,115.8, +112.5,113.5,111.2,113.75,118.5,116.2,117.25,116.2,112,114.6,118.3,115.85,116.4,116.8,114.95, +112,113.4,114.01,114.35,112,103,97,96.2,96.4,101.5,97,98.5,98,95.8,90.45, +94.6,97.45,96.5,94.46,97.9,94,95.25,93.5,89.12,88.45,91.6,91,93.9,96,95.4, +95.1,97.9,105,107.17,107.45,106.25,102.81,104,99.3,102.95,104.9,105.8,107.5,106.5,109.55, +114.55,114.55,116.8,113.75,114.15,110.55,114.03,116.91,113.4,112.23,109.4,112.75,112.4,115.75,115, +112.5,109.62,110.12,109.06,109.56,109.5,107.5,104.37,95.37,93.75,93.69,92.94,92.5,94.44,93.5, +93.94,94.75,83.75,84.5,86.94,83.5,84.75,89,84.5,85.5,85.87,90.19,88.37,90,92, +94.87,95.25,96.5,98,95.06,101.75,100.44,96,94.44,98,97.75,98.75,100.44,99.37,98.5, +103.25,101.5,98.31,99.25,99.5,99.25,91.81,98,96.75,103.62,101.12,99.87,102.5,99,98.44, +93.75,93.5,93,88,90.5,93,94.75,95.12,98,96.75,111.94,111.5,104.19,114.25,111.87, +116.62,115.94,114,113.81,110.37,118.87,112.62,115.5,117.37,120.06,120,124.5,123,124.19,124.69, +122.75,125.25,126.81,128,123.12,124.81,127.87,132.5,131.88,130.88,132.81,133.06,131.88,130.75,131.5, +129.88,124.31,123,120.31,121.19,121.06,122.37,119.75,121.06,122.06,120,119.75,118.75,119,115.69, +116.62,116,113,111,112,110.5,111.12,109.87,111,113.25,114.12,117,112,102.37,104.12, +104.44,103.75,105.44,103.19,103.25,104.69,102.69,105,105.62,108.75,112.69,111.75,110,111.62,113, +113.5,114.12,115.56,120,113.5,116.31,116,118.87,118.87,119.12,119.87,119.37,112.5,112.25,108.44, +109,107.56,110.5,107.75,105.5,110.5,106.5,109,106,106.06,106.12,107.5,105.12,104,103.75, +104,105.5,110.5,108.06,106.62,109.12,110.5,111,112.5,112,109.5,112.5,106.5,102,105, +109.75,112.25,103.87,109.81,112.5,119.62,121.62,124.75,123.5,123.5,120.5,121.5,120,122.62,118.87, +122.31,125.75,125,115.37,115.87,114.5,112.81,110,108.25,109,107.5,107.75,104,107.62,106.5, +103,106,109.94,107.25,100.5,102,105.56,104.62,109.87,108.81,110.5,112,115.25,116.5,116.5, +115.87,116,119.06,117.69,119,116.94,116,118.19,115,112,112.37,111.37,112.75,118,119.06, +116.75,121.87,121.87,123,115.56,119.69,120.94,119.94,119.62,117.87,117.25,117.25,118,112.94,114, +112.44,109.19,109.69,110.44,109.56,109.69,109.12,109.87,108.5,109.06,110.69,108,107.75,110.19,108.12, +111.62,120.5,116.25,117,113,109.81,103.44,102.56,103.69,104.94,105.94,105,108.81,105.5,99, +94,94.87,94.62,96,96,97.5,94.62,95.06,90.5,92.75,94.44,95.87,96.75,98.5,97, +94.5,95.5,94.87,94.25,93.75,93,108.62,107,108,106.44,106.5,110.81,114,113.5,115, +119.12,122.25,122,118,121,121,122.06,123,126.62,120.5,127.5,127.19,128.75,126.5,131.38, +132,134,132,134.63,137.5,132.5,131.5,128.88,128.38,126.5,125.62,124.37,124.25,125,122.62, +122,123.37,122.75,124.37,123.87,128.38,128.5,125,122.75,123.75,120.12,121.5,123.62,122,120, +120,122.75,124,125.94,126.25,126.37,125,123.62,124,127.62,127.5,132,136.5,136.38,138, +138.31,135.75,137.44,134,132.5,131,132.5,130.88,130,124.81,123,124,123.31,123.12,122.25, +123.87,122.87,120.19,119.25,119.87,117.5,115.87,115.06,115.87,116.62,119.87,118.12,113.62,114.56,111.75, +113.62,116,116.69,223,222.5,230.31,232.75,235.63,238.25,238.25,236,241.5,234,221.13,220.5, +217.25,211.25,211.88,212.13,212.25,208,208.5,205,209.25,212,204.75,193.38,197.25,169.75,167, +170.88,177.5,179.5,182.75,184,183.5,185.63,186,184,183.13,179,177.31,180,177,175, +171.06,172,168,167,168.69,176.63,177.5,179.5,182,179.19,182.69,182.38,181.63,179.88,178.63, +173.88,173.5,168.5,170.5,169.5,171,172,177.25,178,172.25,174.38,172,170.5,175,176.25, +170.25,162.5,167,167,170.44,175.19,175.88,179.56,184.5,178.69,179.5,186.81,183.75,182.25,184, +197.63,195,187.75,182.25,183.63,183,190,189,191,187.94,190.31,183,185,186.75,186.88, +188.63,186.5,184.75,182.69,177.5,171.56,166.63,165.44,166.88,163.5,166.5,164,169.31,168.06,168.19, +164.44,164.63,168.25,168.94,163.5,169.75,166.63,165.13,165.5,161,158.88,159.5,158.06,159.38,158.63, +157,156.69,157,150.88,150.75,148.88,147.69,148.88,148.5,148.44,149.5,148,144.63,145,141.31, +141.5,140,140.13,140.63,135,137,130,127.75,130.5,130.13,124.44,120.75,119.5,124,123.75, +124.12,125.06,130.75,133.75,134.5,130,131.56,128.75,129.38,120.12,126.75,127.5,130,129,128, +121.37,122.12,125.75,124.94,122.5,118.75,121,113,123,125.25,128.75,127.25,129.13,128,127.5, +129.5,129.5,127,125.12,126.62,127.56,128.75,126.12,128.88,131.75,127.81,127,134,134,133.25, +128.63,127.94,126.25,123.75,125.87,127.19,126,128.25,121,118.56,117.12,119.25,119.75,118.5,118.25, +114.75,113.75,113.62,115,116.56,116,114.12,114.12,112.37,112.5,111.87,110,106.25,108.75,109, +111,111.87,114.62,115.87,117.5,118.75,119,118.75,116.75,114.25,116,117.19,117.37,120.56,120.25, +119.31,122.37,123.62,123.5,125.25,125.62,124.75,125.62,123.37,120.25,118.25,120.19,116.94,117.5,118, +116.69,117.12,115.94,116.06,115.69,116.12,116.25,116.75,114.5,118,114,107.94,107.44,109.37,107, +105,106.56,105.62,104.75,105.75,106.25,105.62,104.31,103.87,104,104.12,105.25,105.87,105,102.25, +101.56,103,101.69,100.62,101.31,99.69,100.87,99.19,97.87,97.37,97.12,99.12,100.19,102,100, +104.19,104.81,104.75,102.56,102.62,103.44,103,103,102,103.06,102.69,101.87,101.62,98.06,98.12, +99.12,99.12,99.12,100.12,100,98.31,97,97.12,96.75,99.25,99.81,99.81,100.25,105.19,104.87, +103.19,103.5,100.56,98.25,104.31,103.5,105,105.37,105.56,104.5,104,103.69,102.87,99.37,100.12, +102.44,104.75,99.25,102.19,105,101.12,101.5,103,103,109.44,111.5,112.87,109.5,110.62,110.5, +112.12,110,109.12,107.5,104.12,104.94,105.25,104.06,102,103.69,103,99.94,97.5,98.37,98.12, +100.75,99,102.62,102.5,101.12,99.12,98.37,96.5,100,89,97.25,102.25,102,105.25,101.62, +95.81,98.12,102.37,102.12,104.06,105.5,104.37,104.31,106.81,106.5,105.06,106.87,103.81,106.12,104.75, +102.37,102.81,101.69,103.87,104.06,102,98.94,100.12,100.25,97.25,98.12,97.94,97,100,103, +103.94,104.94,103.56,103.81,101.37,100.56,102.75,103.19,103.37,106.37,102.5,107.5,107.62,104.75,101, +103.31,104.56,105.81,103.37,104.75,106.31,108.5,106.44,106.5,104.56,105.5,106.12,102.87,104.5,106.5, +107.94,105.62,104.37,100.5,105.25,100,97.81,95.75,94.87,95.62,95.81,94.69,96,94.5,95, +94.87,91.62,90.25,92.25,91.25,91.81,91.87,89.75,89.87,89.87,89.12,89.37,89.75,88.75,88.25, +86.25,86.25,87.12,86,83.5,84,85,86.37,87.75,85,90,90.5,174,173.38,175.13, +174.75,168.5,169.88,173,174.13,174.25,174.75,168.25,168.75,164,164.38,165.88,162.88,161,160.5, +157.88,152.38,149.63,152.25,150.5,140,137.25,139.63,138,137.38,137.38,138.63,134.5,132.25,133.75, +138,132.25,130.75,127.25,132,136.88,137,137.25,140.5,136.5,136.88,132.63,136.88,138,138.63, +139.88,142.75,143.63,144.75,146,146.38,144.75,147.25,145.63,145.88,145.63,143.75,143.13,146.88,147, +144.38,137.63,140.75,143.13,145.25,145.5,146.38,145.13,144,143.38,148.75,148.5,149,153.63,154.75, +157.38,157.63,157.75,153.5,149.88,151.38,151.88,158.88,159,166.38,164.88,165.13,164.75,166.38,165, +163,160.5,159.75,164.13,160.88,159.38,155,153.75,153.75,155.25,155.63,157.38,154.13,154,158.13, +159.75,152.5,148.38,153,152.25,158.13,155.25,161.5,156.63,154,161.38,162.88,163.63,159.63,158.13, +158.25,157.5,158.13,154.13,153.13,153.38,146.88,144.75,137.63,134.63,133.5,135,134.38,133.38,133.13, +130.63,129.75,127.37,128.88,126.5,125.75,127.5,126.62,126.37,129.5,126.5,129.63,128,125.5,128.75, +129.5,130.75,129.88,128.5,125.5,129,128,126.87,125.87,125.75,124.25,124,124.87,124.75,126.25, +124.5,124.25,122.25,123.62,124.25,124.37,123,122.12,118.12,118,116.75,117.62,116,113.5,114, +115,113.25,114.62,115.12,114,112.62,113,112.12,112.75,110.5,110.12,109.87,111,111.62,109.37, +111.62,112,113,111.62,110,109.25,108,108.37,108,107.12,105.25,103.5,103.12,96,89.62, +92.5,93.37,94.5,94.25,97.87,92.25,94.5,95.62,97.62,98.75,98.75,98.12,97.87,99.75,101, +99.25,99.12,98.37,99.75,99.37,99.62,100.75,102.25,101.75,102,101.87,103.37,103,103.62,103.25, +102,96.5,104.87,106,105.37,106.37,107.62,106.87,107.75,109.25,109.5,109.87,110.75,111.87,112, +109,108,109,108.25,106.37,107.37,105.75,105,107,108.5,108.25,108,107.75,110,107.75, +108.5,107,107.62,107.5,106.87,105.75,105.62,116.75,115.12,112.62,115.25,116.37,117.75,119.75,115.62, +119.87,117.5,111,112.12,110.37,111.87,111.12,108.37,114.87,115,117.5,120.87,124.75,120.62,116.87, +116.5,114.5,115.62,113.87,115.5,117,119.75,117.12,118.75,121.62,125,127.62,125.12,123.87,125, +121.75,119,116.75,118,114.37,113.87,114,114.12,113.37,112.37,114,112.87,109.37,109,108.75, +108,106.5,104.75,103.87,107.62,103.12,100.75,101.5,96.62,90,86.75,84.12,86.5,87.25,88.12, +86.62,89.12,88.62,86,89.12,91,91.37,90.37,91.12,91.75,92,90.87,89.87,92,89.12, +90,92,94.75,95.12,96.37,97.12,95,95.25,96.25,96.87,95,97,97.25,97.25,95.75, +96.5,95.25,94.75,93.12,95,95.37,95.62,95.62,96.87,97.5,97.5,99,99.12,99.5,101.25, +100,97,97.25,98.37,97.5,95.87,96.25,98.5,98.87,95.62,98.25,96.87,97.87,92.5,92.5, +94,93.25,91.5,90,93.87,95.25,93.87,94.25,93.5,95,94.25,94.87,92.62,93.25,94, +93.87,95.75,97.62,94.62,92.5,92.75,95.25,97.5,96.12,98.25,100,100.5,102,103,102.75, +102.5,103.12,102.12,103.75,103.75,106.62,108.12,107,111.37,113.87,112.37,112.12,111,109.25,109.5, +109.87,110,108.87,109.12,109.12,106.5,110.62,109.12,110.62,110.87,109.5,109.12,107.5,104.12,104, +102,105.25,107,104.12,102.62,101.75,100.37,100,100,98.62,97.12,97.87,96.25,97.75,96.37, +95,98.12,98.5,97.5,97.37,98,93.87,93.37,93.12,93.62,91.87,91.37,90.5,89.62,90.12, +90.75,92.37,91.75,93.62,93.5,92.37,95.62,96.62,96.25,97.5,95.5,93.5,92.25,94.62,95, +94.25,94.5,93.75,93.5,93.87,94.12,92.75,94.25,94.75,93,91.62,93.87,96,94.87,93.12, +93.12,91.5,89.37,89.62,87.87,88.12,87,86.87,86.5,85.87,84,83.75,84.37,82.87,83.12, +82.25,82.12,83.12,84.25,84.87,83.87,83.62,81.5,82.12,83.5,82.75,83.5,81.75,81.25,82.25, +81.5,80.87,80.37,79.75,80.37,79.5,77.12,75.37,75.12,74,74.62,74.25,74.75,74.25,75, +75.75,75.87,75.62,75,75.12,75.12,74.25,74.12,74.25,74.37,74.87,73.62,72.37,72,72.75, +72.75,72.37,72,74.12,74.5,76.37,77.12,77.62,77.25,76.37,76.75,75.87,77,76,75, +74.25,74.37,73.87,73.5,74.25,73,74.37,74.12,73.62,73.62,71.12,71.37,70.5,70.87,70.37, +69.5,70.75,71.12,69.62,71.12,70.75,71.25,71.62,69.25,70.62,71.12,70.62,70.87,70,69.25, +72.75,73.25,73,73.25,73,72.87,72.75,72,73.5,73.75,71.62,71.37,73.37,74.5,74, +74.37,75.62,74.12,74.5,74,72.62,74.62,74.62,75.5,74,73.5,72.87,72.5,73.62,71, +71.75,71.25,68.87,69,68.12,69.12,69.37,69.25,68.37,69.12,68.87,69,69.37,69.75,71, +69.87,70.62,69.75,69.5,69.12,68.75,67.5,66.87,67.25,67.5,67.12,68,66.87,69.25,69.37, +69.75,69.37,67,67.37,67.87,67.5,66.37,65.37,64.87,64.5,63.75,64.75,64,64.5,63.38, +62.75,62.75,63,62.38,63,61.88,62.63,62.38,62.25,62.5,61.38,62.25,59,55.75,56.75, +57.25,57.75,57.5,56,55.75,56.88,56.5,57.38,56.5,57,59,60.38,60.88,61.5,59, +60.75,61.88,61.38,61.75,61.88,62.63,63.25,64.5,63.88,62.38,62.25,61.5,62.88,62.75,61.25, +61.75,63.38,63,63.5,63.88,63.25,63,62,62.13,61.38,60.88,61.63,58.63,57.63,57.5, +57.63,58,57.63,56.5,56.5,57.38,58.25,58.13,57.5,57.38,57.88,58.88,58.5,58.38,55, +53.25,53.5,52.88,53.88,52.5,52.88,53.75,52.63,52.88,53.25,53.5,53.5,53,54,52.5, +53.63,54.38,56.5,56.88,57,58,56.88,57.88,58.25,57.63,57.75,56.13,56.13,55.5,55, +52.13,53,53.25,52.88,52.75,52.88,53.13,53.38,53.25,53.75,52.63,52.63,54.88,55.25,54.38, +53.38,52.5,53.38,53.88,54.75,52.38,55.5,56.25,56.5,56.88,57.88,58.13,56.63,58.75,58.88, +55.75,55.13,55.88,56.75,57.38,58.5,58.75,58.25,58.75,59.13,58.88,58.5,60,59,58.13, +56.88,56.63,58,58.5,58.88,58.63,59.25,58.75,58.25,59.25,57.75,57.25,56.13,57.25,55.88, +54,53.88,53.88,54.13,53,54,53.25,54.75,54.5,56,55.5,54,52.38,51.88,52.25, +52.25,53.5,51.13,51.63,52.25,50.25,49.5,50.5,50.25,49.75,50.25,51,49,46,46, +45.75,46.38,45.75,43.88,45.38,43.63,43.38,44,44.5,43,43.13,43.5,44.13,44.25,44.38, +44,43.5,44.38,44.25,42.13,41.63,41.75,41.75,41.75,41.88,42,42.25,42.5,43.25,43.25, +43.5,43.5,43.88,43.88,44.63,44.25,45.25,46.13,46.25,46,45.75,44.75,44.13,43.88,44.13, +44,44.5,43.13,43,43.13,43.38,41,41.63,42,42.5,43.5,43.13,43.38,43.63,44.13, +43.38,44,44.38,43.63,44,46,44.88,41.88,43.63,43.75,43.13,43.63,45.63,47.5,47.38, +47.5,48.13,46.88,46.75,46.88,46.88,48,48.5,49.63,49.5,50.38,49.88,49,48.63,49.25, +49.13,50.13,49.63,50.13,49.5,51.88,52.25,52.88,52.75,53,52.25,54,54,54,51.75, +53.25,53.13,53.25,50.5,49.88,48.63,48.75,49.38,49.13,47.75,47.88,47.5,47.5,48.25,48.88, +48.88,48.13,48.5,49,49.63,49.13,48.88,49.88,48.75,48.38,48.13,48.13,48.88,50,49.88, +50.25,49,49,49.13,51,50.75,52.25,51.25,52.63,52.63,52,51.5,50.25,52,52, +50.63,50.75,53.38,53.38,53.5,54.5,54.63,55,55.13,56.13,54,55.88,56.88,56.13,55.5, +55.38,55.25,54.38,54.63,54.75,54,51.75,51.13,51.5,50.5,50.63,51,50.25,50.5,51.13, +51.88,53.63,53,52.25,51.75,51,52.5,52.25,52,51,50,49.13,52.88,48.75,46.5, +47,48.25,50.25,48.88,48.25,48.38,49,48,46.75,46.75,48,48.88,50,51.75,50.13, +50.38,50.13,52.88,51.38,51.63,50,51.25,53.13,52.13,53.63,59.88,62.38,61.75,61.63,64, +65.5,67.25,67.37,67.87,67.75,68.37,67.87,65.87,65.37,63.75,62.38,61.38,63,64.12,64.87, +64.75,64.87,65.12,65.62,67.62,66.25,65.37,67.12,69,68.5,67,66,67.37,65.75,67.12, +68.5,68.5,68.75,68.62,69.25,70.12,72.87,73.25,78.37,78.75,78.62,79.37,78.87,79.87,79.12, +78.12,80.25,81,80.37,82.25,82,82.5,83.75,83.37,84.37,83.87,83.37,83.25,84,87, +88.62,87.25,87,86.25,85.87,86.25,87.75,87.5,86.62,87.5,87.37,86.75,87,85.37,85.62, +86.37,86.62,88.25,88.62,88.87,88.37,88.62,88.12,88.37,87.25,88.37,90,92.62,94.75,94.5, +94.87,94.37,94.62,92.62,92.75,92.62,92.75,93.5,93.12,93.25,97,99,98,97.87,98, +97.75,97.75,96.75,98.12,97.12,98.25,97.87,98.62,97.87,96.75,97.62,96.37,95.5,94.75,95, +93.37,92.87,94,92.5,92.5,90.5,90.5,91,90.37,88.62,89.62,90.62,90.62,90.5,91.37, +90.87,90.37,91.25,91.5,91.37,92.37,90.87,91.62,91.37,92.12,93.5,93.75,93.5,94.12,92.75, +94,92.5,92.5,91.25,88.5,88.87,88.12,87.87,89.12,90,89.87,89.62,88.5,88.5,88.75, +89.5,86.12,85.62,85.37,82.62,83.37,82,82.12,83.25,83.5,83.37,83.37,84,85.37,85.12, +85.75,86,85.87,85.87,87.37,88.75,89.25,90.25,87.62,87.87,87.75,86.37,86.75,86.75,88.25, +87.62,86.87,88.37,88,88.37,89.25,89.87,89.75,89.75,90,90,90.5,92.75,90.5,89.75, +89.62,90,90.37,91.75,91.12,90,91.87,92.12,92.75,93.87,93.5,93.62,95.5,92.87,95.25, +96.25,95,95.12,94,90.37,90.75,91.37,92.62,94,92,91,90.25,89,90.12,89.75, +88.37,88.25,88.25,85.87,86,85.62,85.5,86.75,87.75,88.75,88.5,87,85.37,89.37,90, +90.12,91.37,91.75,91.12,93.87,96.62,95.62,95,95.37,95.12,97,96.62,96.87,100,99.12, +98.62,100.25,100.12,101,98.37,96.75,97.25,97,98.37,100.12,99,98.37,98.25,98.25,98, +98.62,100.25,100.25,100,101,103.75,101.87,99.25,100,97.62,97.75,99.12,98.37,99.12,100.87, +102.5,103.62,102.37,104.62,104.5,105.62,104.87,104.25,104.87,105.37,104.5,103.37,102.87,103.62,102.37, +100,101.25,99.5,98.25,98.62,98.37,97.75,95.75,94.75,95.12,95.25,95.12,94.37,95.62,96.12, +96.25,93.25,98.37,98.5,99.37,99,98.87,99.25,99.12,100.37,100.25,100.37,101.5,101,101.87, +101.75,100.5,100.62,101.25,100.75,102.75,101,100,96.62,96.25,99.5,99.5,99,98.87,99.87, +100.37,98,98.12,98.75,98.25,97.62,97.25,98.75,99.12,98.62,99.12,99.25,98.75,100.25,99.75, +99.62,101.37,101.37,101.87,102.75,102.37,102.87,103.12,105.37,105.62,106,104.37,103.62,104.62,105.25, +104.62,104.5,102.25,103.62,104.12,103.62,103.75,105,105.5,103.62,105.87,104.25,102.12,103.37,102.37, +105.5,103.75,102.5,105.5,107.75,108,108.37,108.37,109,108.75,109.25,110,109.62,107,108.25, +111,111.12,111.37,112.75,112.37,114.12,113.62,113.37,112.5,113.87,114,114.37,113.5,111.87,112, +114.75,115,118.75,126.37,127.75,129.25,127,128.88,130,133.13,132.75,134.38,130.63,131.25,128.25, +131.25,130,132.75,134.25,135.63,138,138.25,137.25,135.5,134.88,132.38,131.5,129.88,128.88,130, +128.13,127.25,126.25,126.5,126.62,124.75,124.12,122.5,121.12,120,117.87,119.37,116.75,115.25,115, +107.25,106.87,106.87,107.87,107.62,109.75,110.37,111.37,112.75,112.37,112.87,113.37,113.62,113.25,114, +113.87,114,112.25,113,111.5,110.87,112,114.37,112.87,113,112.25,111.5,115.87,114.12,113.37, +114.5,111.62,112.5,113,113.87,112,113.87,113.25,114.75,114.12,113,113.25,112.5,113,110.87, +108.5,106.5,108,107.87,107.37,107.25,105.37,106.5,106.12,106.5,107.37,109,106.75,107.37,107.62, +105.25,102,99.5,99.37,100.62,101.75,103.75,105.62,108.37,108.75,106.5,107.37,108.25,109.5,107.12, +103.12,105.75,106.5,105.25,106.25,107.62,108.12,107.87,105.25,104.25,104.87,107.75,108.37,106.37,106.5, +101.87,102.87,102.87,101,101.62,103.87,103.5,103.87,103,98.5,96.75,100.75,100.62,102,103, +104.25,105.12,103.62,101.5,103.25,103.5,103,104.62,103.87,109.25,109,111.87,112.37,110.75,112.75, +114.62,114.5,115.87,117.75,120.12,119.62,120.87,122.5,122,120.62,119,118.12,119.25,118.12,117.12, +117.5,118.62,117.5,117.62,118.25,116.87,117.62,116.62,119,118,118.75,118.87,120.25,120.37,121.25, +120.5,120.12,118.62,120.87,121.25,120.37,120.5,119.5,120.5,119.75,120,117,117.62,118.75,117.5, +117.5,115.12,115.87,115.87,115.25,113.87,114.12,113.62,111.37,110.75,110.5,110.5,108.62,109.5,108, +109.5,107,109,109.87,109.25,109.62,109,109.37,109.5,110.87,110.5,110,107.12,106.12,105.25, +105.62,106.25,106.75,106.62,106,105.12,106.37,106,104.25,103.62,105.5,106,107,108.5,108.87, +108.12,107.75,106.62,106.87,107.5,106.5,107,106,106,105.25,104.87,104,103.75,103.62,104.12, +103,102.75,105,102.25,102.62,104.5,104.12,103.37,101.87,102.37,102.87,103.62,100.75,99.62,97.62, +97.87,98.62,98,97.37,97.37,96.12,97.87,95.75,97,98.75,99.75,98,100.37,97.5,97.62, +98.62,99.5,99.5,100.5,99.25,99.87,99,98.75,94.75,94.25,94.87,94.75,95.12,95.25,94.5, +94.87,93.62,94.62,95.25,95.12,96.87,96.12,96.62,98,98.87,99,101.75,97.37,97.62,97.5, +98.5,99.12,100.5,100.25,99.62,99,99.12,97,98,98.37,98.75,98.37,97.87,96.87,97.62, +96.5,98.12,97.87,99.12,100.25,100,100.5,100.25,101.12,101.75,103.25,104.25,104.12,103.5,101.75, +102,98.5,107.37,107.62,108,109.25,107.75,107.5,108.75,106,108.12,109.37,109,111.12,111, +116.75,116.75,116.37,116,116,116.37,115.62,115.62,115.37,117,116.12,115.87,115.87,117,117.62, +117.5,116.87,117.25,116.5,117.75,116,116,113.87,113.87,113.12,115,114.75,115.5,116.25,116.5, +115,118,116.87,118,117.87,116.5,113.37,112.75,114.75,115.5,113.62,113.25,112.5,111.37,113.62, +113.87,112.5,114,115.25,116.12,114.5,114.75,114.75,113.62,115.5,112.37,111.87,112.37,111.75,112.5, +111.75,113.12,114.25,112.5,111.25,110,109.62,109.87,110.25,109.62,108.87,110.37,111.25,109,107.5, +109,109.62,109.75,109.12,110.12,110.5,109.5,108.12,109.62,109.62,109.5,109.5,109.25,111.62,112.25, +110.75,111.37,112.5,110.87,111,109.87,110,109.37,109.12,111.25,110.5,112.25,113.62,113,114.62, +114.62,114.5,114,113.5,112.5,112.62,112.5,112.25,110.75,110.5,110.75,111.87,110.25,109.5,107.75, +107.37,107.12,108,109.25,109,109.62,109.75,110.62,109.5,109.75,108.25,110.37,111.12,115.62,117.37, +117.75,119.25,118.12,118.25,119.62,119.62,121,121.37,120.62,119.75,122.12,121.75,121.25,123.37,122.75, +125.25,125.62,125.87,126.87,124.87,126.62,125.75,125.75,126.37,128.13,126.25,127.25,128,128.75,129.75, +128.75,127.37,126.75,123.12,124.25,122.37,123.5,124,124.87,123.87,123.87,123.62,123.12,122.5,121.12, +122.12,121.62,122.5,122.5,121.5,121.87,123.5,122.5,123,123,123,122.87,123.12,123.87,121.25, +121.25,121.37,120.37,120.25,120.5,119.62,120.62,121.87,120.87,119.5,117.62,118.37,119.25,119.37,116.25, +116.75,117.25,115.5,115.5,115.87,115.75,117.5,117.25,117.25,119,119.75,119.5,119.62,120,120.37, +122.87,123.62,122.87,120.25,120.75,121.25,122.5,123.25,124.62,124.62,122.62,124.25,121.25,119.62,119.87, +117.87,117.75,116.25,116,115.25,113.37,114.12,114.87,115.12,115.37,114,113,112.37,113,112, +113.12,113,112.62,113.75,113.5,114.87,115.75,112.75,114.87,112,111.62,113.25,113.75,111.62,111.12, +113.37,113.62,112.75,111.62,111.75,111.37,111.12,113,114.87,114.75,115.75,115,117.62,118.62,119.37, +121.25,123.62,123.75,123.62,125.5,125.75,126.5,126,124.5,121.75,122.87,122.5,120.62,121.5,123.5, +124.62,125.12,125.62,125.5,125.37,125.37,127.12,126.75,127.25,126.62,129.13,126.37,127.75,127.5,127.75, +125.12,125.25,126.25,123,123,117.87,116.87,117.25,117.75,118.5,119,116.37,115.87,116.37,114.12, +114.25,113.62,112.87,113.12,113,108.25,108.12,108.75,109.5,109,109.75,110.62,108.87,110.25,112.25, +110.5,109.25,108.87,109.87,111,110.5,111.25,111.5,114.75,114.37,113.62,113,113.5,114.37,114, +114.25,112.75,113.25,113.12,114.5,113.62,111.75,114.25,114.87,113.37,112.37,109.5,109.62,107.87,107.87, +107.5,104.62,106.5,108.75,106.75,109.62,110.25,113,113.87,113.5,114.62,115.25,114,115.12,115, +114.25,116.25,117.62,117.75,116.37,116.25,117,117.75,117.87,116.25,114.75,116.25,115.62,115.37,113.12, +112.5,112.75,113.62,112.62,111.25,111.62,109.5,108,107.25,108.75,109,109.87,109.62,112.75,114.12, +113.5,112.12,112.75,110.75,111.37,110.75,110,115,118.87,118.37,115.62,114.5,117.5,116.25,123, +121.75,122,122.5,117,115.5,116.37,116.25,117,119.62,118.87,117,117.12,115.5,119,116, +115.37,110.37,111,111.75,111,109.5,108.25,105.75,110.5,111,112.5,112.25,116.5,118.37,118, +117.12,115,118,118,119,123,122.12,122,119,116,119,123.75,119.5,120.75,122.75, +121,123.87,118.75,118,118,117,118.5,116.5,123,115,135,141,143.38,146.75,151.25, +147,151,152.63,151,155.75,155.5,155,151.25,149.25,152.5,157,156,153.63,155.13,150.63, +156,158.25,157.75,156.63,162.25,162.25,158,158.25,156.75,160.13,162.25,163.25,162.75,168.63,166.63, +166.13,167,168,174.75,174.63,175,173.25,172.5,173.5,173.5,172,170.63,169,167.25,164.63, +163.13,160.25,159.88,159.38,159.5,162,161.13,160.88,162.75,161.38,160.13,162.25,162.75,163.75,165.5, +168.5,168.63,167.13,169.88,167.25,166.63,165.88,165.13,164.63,165.5,164.5,162.88,165.63,165.75,167, +167.38,164.75,163.75,162,160.75,160.63,162.25,159.63,158.25,159,159,160.63,161.63,159.75,160.75, +160.13,158,159.5,161,163.25,161.38,160.25,158.5,158.25,158.25,156.5,161.5,159.75,163.5,167.25, +165.5,162.63,165,165.5,165.75,166.88,164.38,160.13,160,158.5,156,155.5,150.5,153.25,154.5, +156,149,150.25,151.25,151,148.75,147.63,143,147.25,147.25,149.13,150.13,147.25,151.38,149, +153.25,146,154,156.5,152.88,149.88,149,147.63,146,147.88,144.38,144.38,144.75,141.75,144.25, +139.75,138.75,140.38,140.63,138.38,137.75,139.5,140.13,141,142.75,143.13,139.75,139.13,138,139, +134.38,132.63,135,133.38,133.5,135.5,136.88,134.25,133.5,132.75,128.25,128.63,130.75,130,127.87, +126,127.62,122.75,122.25,126,119.62,120.62,118.87,116.12,118,120,122,123.25,122.75,123.87, +122.75,121,121.12,120.5,121.75,121.75,120.75,122.25,124.5,125,126.62,127.5,127.5,125.5,128, +128.38,127,128,126.87,128,128.88,129.88,127.87,126.5,127,127,124.87,123.62,123.25,123.87, +120.37,122.12,120.62,120.25,122.87,124.25,123.25,121.5,120.87,122,124.62,125.5,124,122.12,122.62, +120.37,122.12,121.12,121.87,120.62,121.37,120.87,120.87,120.75,123.37,120.5,121.5,124.5,122.37,127.5, +126.5,133.5,131.25,133,132.63,134.88,134.5,134.25,135.13,137.5,139,138.63,137.25,137.5,136.88, +138.63,136.75,138,139.25,142.5,144.13,145,141,139.5,136.38,135.5,138.88,139.88,139.75,141.38, +139,139,138,139.63,136.88,135.75,133.63,134.5,133.88,133,131.38,129.75,130.75,130.25,130.75, +131.75,130.75,132.63,132.25,131.13,132.5,134.25,133.38,133.5,133.5,131.75,130.75,132.13,132.5,135.88, +138.5,141.13,145,144.25,144.25,143.5,148,150,148.63,146.5,147,147.13,147.63,146.88,145.63, +146.88,145.25,145.88,146.88,148.63,149.88,148.75,149,148.63,146.75,149,150.5,150.38,152.75,152.38, +152.75,152,150.63,148,144.75,143.88,144.88,146.38,145.25,145.25,145.25,147.75,148.88,150.13,149.88, +148.63,150.38,153.25,155.88,154.5,157,156,159.5,161.75,159.88,159,155.75,152.5,154.88,152.88, +154.75,154.5,153.75,152,151.25,151,149.5,152.63,150.5,148.25,149.63,151.38,148,151.88,149.75, +148.5,147.5,148.75,150,150.5,151.75,152.38,150.88,149.75,150.75,148.38,152,149.38,146.5,146, +149,148,152,150.38,156.75,156.38,157.5,158,159.5,160.25,157.13,158.63,156.88,155.75,154.88, +156.75,156.63,155.88,152.5,155.25,153.75,155,151.88,149.38,150.75,151.75,149.75,151,148.13,144.25, +149.38,149.75,149.75,156,153,149.5,149.75,148.25,150.88,148.25,156,154.88,154.63,152.38,154.75, +158.75,156.25,153.88,152.88,153.88,154,154.5,152.63,152.5,153.13,150.38,149.25,148.88,146.63,144.63, +142.38,140.5,141.75,138.88,137.75,139.75,140.75,139.13,139.13,139.5,140.13,139.5,138.13,139,136.88, +136.38,134.88,135.63,134.88,132.88,132.13,132,132.88,132.5,131,129.63,130.75,131,129.63,127.5, +128.38,130.88,129.5,127.75,127.75,128.75,129.25,128,128.38,125.87,124.5,124.37,124.37,124.5,123.37, +123,124.37,126.87,124,124,123.75,126.87,127.87,128.25,127.62,127,126.75,128.38,127.87,127.5, +127.37,127.62,129.5,129.5,128.63,127.5,127.25,126.62,127.5,128,128.5,128.63,126.62,126.87,128.38, +127.75,126.75,125.75,126,127,126.87,127,127.12,128.38,128.5,129.13,131.5,131.38,132.25,131.75, +130.75,129.38,132,130.25,129.13,129.38,129.75,129.13,128.88,128.5,130,126.12,124.25,123.62,123, +121.12,123.12,124.5,124.25,124.37,124.87,123.75,124.37,123.75,122.25,121.75,119.25,118.5,119.37,119.87, +120,120.5,119.5,119.87,125.75,128,127.37,129.88,128.25,130.38,129.25,129.38,127.25,129.5,130.13, +131.38,131.25,132.38,132.75,132.63,132,128.75,128.75,127.87,130.63,130.25,128.88,127.37,125.75,125.12, +125,125.25,125.87,126.37,126.37,126.87,128.75,128.25,129.13,127.5,128,127.62,130,130,129.38, +127.87,127.12,126.5,125.5,124.37,126.87,126.5,127.5,128.38,127,126.87,127,125.62,124.37,128, +128.63,129,129.38,128.63,128.63,129,129.5,131.5,131,129.88,130.5,132.38,135.13,135.38,136.25, +134.5,132.75,134.13,133.38,132.75,133.63,133.5,132,131.5,132.25,134.25,131.75,131.5,137.25,137.25, +135.88,135.25,137.63,135,135.63,136.25,137.5,134.5,133.5,133.13,132.63,129.5,129.25,124.75,123.62, +124.37,124.87,125.25,122.75,123.62,119.87,119.87,120.12,120.37,120,120.37,122.37,123.87,123.12,123.75, +123.75,123.37,122.37,123.25,123,120.25,117.75,117.87,118.75,119.12,118.37,117.12,118.5,117.75,120.25, +120.25,121.25,121.62,122.87,124.87,123.12,122.87,121.5,121.12,120.25,121.62,123.12,123,122.75,123.75, +123.25,125.37,125,127,126.62,125.87,126,125.75,125.5,125.12,124.25,124,126.75,126.25,126.12, +125,127.75,122,120.62,122.37,121.5,120.75,121.75,120.87,122,120.87,122.37,121.75,121.87,122.75, +123.75,125.5,125.25,124.12,123.87,124.37,125.62,125.62,126.37,127.37,126.25,126.87,123.25,122.5,122.75, +121,123.87,123.12,122,123,123,124.75,125.5,125,124,125.12,124.12,126,123.75,123.12, +123.25,122.25,121.12,122.75,120.62,124.25,118.62,120.5,120,120,117.25,113.5,111,109,108.75, +108.37,107.12,105.5,106.37,105.5,106.5,107.37,107.87,107.12,105.75,105,105.25,106.5,107.12,106.12, +105.75,107.25,106.12,105.75,105.25,103.12,104.12,105.12,106,105.5,107,102,102.12,99.37,101, +104,105.12,104.25,105.5,105.5,105.25,105.12,107.62,108.87,107.75,107.62,106.12,107.12,107,107.87, +108.12,108.5,109.25,110.5,111.62,112.87,112.37,110.75,111.87,112.87,114.25,113.25,112.75,114.62,116.37, +116.25,114,113.75,112.75,111.87,110.87,109.75,111.12,110.87,111.87,113,110.87,112.37,108.87,110.25, +110,110,109.25,111.12,111.25,111.12,114.25,113.87,115.5,113.87,112.75,112.12,112.75,114,114.87, +114.12,112.5,114.25,111.37,110.62,110.75,108.62,107.87,107.62,108,111.25,111.5,112,109.75,110.62, +112.5,111.25,109.25,108.87,109.12,109.5,109.75,109.75,111.12,109.5,110.12,109.62,107.75,110.75,109.62, +110,114,113.62,114.25,114.12,114.87,114.87,115.75,117.5,116.5,116.75,118.87,120.75,121,120.37, +119.5,122.12,122.5,122.12,123.5,123.25,123.75,124.5,121.87,122.25,122.75,124.62,124.62,124.37,122.62, +123.62,122.37,121.5,120.87,120,120.87,122.62,123.37,122.62,121,118.75,117.62,118.75,117.87,118.75, +117.75,121.5,119,121,121.12,123.25,125.5,123.12,123.5,124.12,124.62,126.5,127.12,125.37,124, +122.37,121.87,122.12,123.25,126.5,125.5,127.25,128.38,129.13,127.87,128.63,128.88,125.5,129.63,130.38, +128.75,131.5,131.25,133.63,132.75,132.88,133,131.88,132.25,131.13,129.75,129,126.5,128.13,128.88, +128.13,128.38,126.62,125,122.87,123.75,124.37,123.37,121.5,122.87,121.87,121.25,123.25,122.25,122.25, +121.75,120.5,118.62,119.62,117.62,119,117.25,115.62,116.75,118.5,120.75,122.87,121.87,123.37,121.62, +120.75,119.62,118,118.5,117.75,119.37,119.25,119,119.5,120.5,121.12,120.25,121.75,123.25,126.12, +126,123.5,124.94,125.12,122,120.12,120.12,121.62,121.75,120.75,123,121.75,120.62,121.62,119.87, +119.25,120.62,120.5,118.62,121.12,122.75,123.12,123.5,123.5,122.37,121.62,121.75,121.75,118.25,117.25, +115.25,114,113.62,112.62,115.75,114.37,113.5,112.37,111.25,112.5,114.75,115,114.87,113.12,109.75, +110.75,111.87,114.25,114.12,114,115.75,116,116.62,117.12,117.62,115.62,115.25,116.12,115,116, +116.87,116.75,117.12,115.5,115.5,115,115.12,111.75,111.87,110.12,109.87,108.87,107.5,106.62,105.75, +103.25,102.75,102,103.25,101.62,104.75,103.87,102.62,102.12,102.25,102.37,100.25,100.87,100.25,99.12, +99,99.75,100.5,100.5,100.5,101.37,101.5,101.62,102.62,101.75,102.12,102.12,100.75,99.75,100.62, +100.37,98,98.25,98.87,98,99.25,99.62,98.25,96.87,96,94.75,96.25,97.5,96.5,95.62, +96.25,98.12,97.87,97.87,96.87,95.5,95.37,93.25,95.75,97.75,98.62,99.5,100,99.25,98.75, +99.12,97.75,97.62,97.5,97,95.87,94,94.75,96.62,96.87,96.37,95.62,95.12,94,95, +94.37,93.37,93.12,90.37,90.37,93.37,94,93.75,94.25,96,94.87,90.87,88.62,87.87,87.25, +84.5,82.87,83.37,82.25,81.37,81.75,83.62,84,83.5,82.12,82.37,84.37,84.5,85.12,84.75, +83.37,84.37,84.62,83.87,82.25,80.5,79.87,80.5,81.5,80.75,81,83.75,83.37,83,82.37, +79.75,79.75,80.75,82.87,83.25,83,80.25,79.37,77.25,75.37,74,74,74.12,75.5,76.75, +76.37,76.12,76,76.62,75.75,74.12,74.25,74.12,73,73.12,72.12,71.5,72.5,72.87,72.25, +72.87,70.75,70.25,70.37,69.25,68.87,69.75,69.25,68.75,68.62,67.37,66,66.75,64.62,63.25, +62.63,62.5,62.75,63.38,62.88,63.63,64.25,65.87,66.62,66.62,65.87,65,65,65.87,66.25, +66.75,67,68,66.75,66.12,67.12,67,65,64.37,65.87,62,60.75,60.88,60.13,60.38, +60.63,61.13,61,60.88,60.38,60.88,60.63,59.38,59,58.5,58.88,59.63,59.38,59.38,59.63, +58.5,58.13,59,60.13,60.88,61.75,61.88,61.63,61.75,62.13,62,62.25,62.38,62.75,62.5, +62.88,63,63.25,63.88,64,64.12,64.37,64.37,65,65,65,64.87,64.37,64.37,64.37, +64.87,65.25,65.62,65.12,64.37,63.63,63.5,64.37,64.62,64,62.63,62.38,62.25,62.13,61.88, +61.5,61.5,61.5,60.5,60.13,60.13,59.5,59.38,59.63,59.13,59.25,58.75,57.88,58,57.75, +58.13,58.13,57.75,59,59.13,58.38,58.38,58.75,59.25,60.25,61.63,62.13,61.5,62,61.13, +60.63,61.5,62.38,62.75,62.63,61.25,61.38,61.5,62,61.38,62.25,63.5,62.63,62.38,63, +63,64.25,63.75,62.13,62.13,61.63,62,62.38,61.38,61.5,60.75,59.38,58.13,57.63,57.63, +57.75,56.75,56.5,56.5,57.38,57.63,57,56,56.5,57,56.25,56.88,56.63,56.75,55.75, +54.13,53.63,53.38,53.88,54.63,53.88,53.38,53.5,54.63,54,53,53.75,54.5,54.5,52.88, +52.5,50.5,50.63,50.38,50.38,51,51,51.25,52.63,52.5,52.25,52,50.88,51.5,52.38, +52.38,53,52,49.13,49.5,50.75,50.75,50.88,51.13,51.38,51.63,51.5,51.25,52.25,52.5, +53.38,55.13,55.88,55.5,55,54.25,55.13,55,54.25,54.13,53.25,54.88,53.63,54.25,54.5, +54.38,54.88,54,54.13,54.88,55.38,55.88,55.75,54.75,54.13,54,54,54.63,55.75,56, +55.13,55.88,55.38,55.5,55.88,55.88,56.63,57.25,57,56.63,56.75,58,58.25,58.13,58.75, +57.88,57,56.88,57.5,58.25,56.5,56.13,56.38,55.38,55.38,55.5,55,54.88,55.13,55.5, +55.38,55.88,56.63,56.63,56.88,55.88,56.25,56.5,56.63,57,57,56.88,56.88,57.88,57.88, +58.75,59,59.5,59.38,58.13,57.63,57.63,58.5,58.88,59.75,59.63,59,57.88,57.38,58.13, +58.38,58,59.13,59.75,60.25,59.75,58,57.88,56.13,55.5,55.63,56.38,56.63,56.63,56.38, +56.63,56.75,56.75,56.13,57.63,57.38,57.63,57.75,58.25,58.38,58.63,59.63,60.25,61.13,60.63, +60.38,60.38,60.5,61.38,60,59.75,59.13,60,60.75,61.75,60,60,60.38,61,62.13, +62.75,62.38,61.88,61.75,63.13,63.88,62.25,62.88,63.13,63.75,64.75,64.25,64.62,63.25,64, +62.38,62.5,63,61.75,62,61.88,62.5,63.63,64.25,64.5,64.25,62.13,62,60.5,61.25, +62,62,61.75,61.75,62.63,63,63.5,64.25,64,64.5,64.25,63.38,64.37,64.87,64.62, +65.5,65,65,65.25,65.12,65,66.62,66.87,65.75,66.75,66.5,66.75,67.37,67.62,69.5, +70.12,70.25,69.5,67.87,68.62,68,69,68.5,67.25,67.12,64.62,63.75,65.25,66,64.5, +65.75,64.5,63.75,66.12,66.37,67.25,68.37,68,67.87,66.5,68,68.75,69.5,70.37,70.37, +71.62,71.37,72,71.62,71.62,71.25,70.87,67.25,67.25,67.12,66.5,68.12,68,66.75,65.25, +65.5,66.62,66.12,66.5,65.87,67.75,68,68.5,68,68.62,70.37,69.62,70.5,69.25,70.12, +70,68,68,66.5,65.5,64.62,64.12,63.88,64.25,65.87,67.5,66.87,68.12,67,66.5, +67.25,65.62,66.12,65.87,66.37,65.75,66.12,64.25,66.5,66.62,67.5,66.12,65.5,65,65.87, +66.75,67.12,67.37,67.5,66.87,66,66.37,68,68.87,66.75,66.75,66.75,65.25,65.75,65.62, +64.25,64.75,65,65.25,65.37,65.12,65,64.37,64.62,64.87,65.12,66,65.12,65.62,64.25, +63.75,65,62.75,61.63,61.5,61.75,62,61.13,60.63,59.5,58.75,59.5,59.25,59.75,59.38, +58.88,57.88,57.88,59.63,58.88,60.38,58.88,58,58,57.5,56.75,57.13,57.13,58.13,56.5, +56,55.38,54.38,56.13,55.25,54.88,53.88,52.88,52.75,53.38,53,52.5,53,53.25,52.38, +52.13,53.75,54.38,54.88,55.38,54,54.38,54.88,54.88,54.5,55.38,53.75,53.5,53.88,52, +51.25,51.25,51.13,52,53,53.5,54.25,54.63,53.5,53.38,54.88,55.5,54.88,55.75,55.88, +56.38,53,54.75,54.13,56.38,58.13,58.88,59.63,59.13,59.88,60.13,61.25,62.13,61.63,61.13, +61.13,62,63.13,62.75,63.5,63.38,62.13,65,65.12,65.87,66.25,67.12,67.12,67.62,68, +69.37,69.25,66.75,67.25,67.12,68.25,69,69.12,69.37,68.62,70.37,70.37,71,70.12,70.62, +71.25,69,69,69.62,69.25,70,70.12,66.87,67,67.5,66,67.37,63.13,63.38,63.5, +62.5,63,64.25,64.62,64.87,64.87,64,65.12,64.37,64,65.25,65.87,65,65.25,65.62, +66.37,66.62,67.25,65.75,65.5,65,65.12,65.5,65.75,64.5,64.62,62.38,61.75,61.63,61.88, +62,62.38,62.5,62.25,62.75,61.75,61.88,61.5,62,63.13,63.25,63.5,62.38,64,62.5, +62.25,62.13,62.5,62.75,62.5,61.88,62.88,63.25,64.12,65.37,65.75,66.5,67.62,66,67.37, +68.87,68.62,68.25,68.25,67.62,67.62,68.25,68.12,68.62,67.87,69.87,71,67.75,67.87,68.5, +68.37,66.75,66.25,66.5,67.5,67.75,67.62,68.25,68.5,69.87,69.75,69.62,70,70,69.62, +69.62,70.5,70.87,71.62,71.25,71.62,72.25,70.25,70.25,70.37,68.87,69.25,70.37,69.5,68.87, +69.5,70,69.75,69.25,68.5,68.5,69.37,69.12,69.12,69.37,69.5,69.5,69.25,70.37,70, +70,71.5,72.25,73.5,73.62,72.12,72.37,72.37,73.37,73.87,73.62,73,74.25,74.12,73.87, +73,72.62,72.75,74,74.62,75.25,78,77.5,77.37,77.87,77.62,77.87,76.12,76.25,76.37, +303.63,306.38,306.75,306.75,306,309,308.25,307.5,309.5,306.75,305,308,308.38,307.5,309.75, +312,309,309.88,317.5,318,315.63,314.25,310.5,308.88,312,310.25,310,307,308.88,312, +312.5,311.63,311.75,312,320,319,318.5,320.38,317.5,319.5,314.5,315.5,317.75,317.75,319.88, +312.75,314.5,316,316,310.5,310.63,309.38,306.88,307.5,308.5,310,307.75,309,304.75,304.13, +306.13,302.13,301,300,299.13,304,302.5,303.5,305.5,308,306.5,308,305.5,308.13,306.75, +301.75,300.13,299.13,299.75,305.75,306.63,311,308.75,312,311.38,313,312,309.25,311.25,311.5, +306.5,310.75,310.25,309.63,314.63,312.75,311.5,305.38,306,306,305.75,305.13,306.5,304.5,298.5, +304,302.5,306.5,295.25,285,284.38,282.88,270.38,271.88,274.25,274.25,276,278,274.5,276, +278,277.88,274.38,273.38,270.63,265.5,267.5,271.25,269.38,270.5,264,263.75,261.25,261,259.25, +260,259.75,263.63,263.75,265.88,262.25,263.25,268.25,269.38,272.75,265.25,263.5,269.5,272.63,273.75, +275,278,277.13,276,279.75,279,279,286,287,290.5,281.25,283,279.25,279,282, +276.63,280.5,277,277,275,281,280.5,280,284,284.5,286.5,289,289.75,293.5,295, +300.88,299.5,303.38,299.25,300,301,293.88,292,293,292.5,295,297.25,297,297.75,297, +293.38,293.75,295.25,296.75,291.5,288.63,289,287.63,288.75,289.75,286,288.5,285,293,279.13, +281,278.75,276.25,273.5,273,271,270.25,268.13,269.75,266,266,267.5,259.38,258.38,258.75, +260,260.5,258.38,258,256.75,257.25,259.63,261.75,260.88,258.25,262.5,266.38,267,265.88,269.25, +266.25,270,271.13,274.25,266.75,269,268,265.25,266,266,260.75,257.13,258.25,261.13,260.75, +261.25,262.5,262.5,266,262.13,264.5,266,267.25,266.13,262.63,265.25,259.75,260.25,259.63,262.5, +261.13,261.25,266,267,266,261.5,261.75,261.75,261.25,254,253.5,253,251.25,251.13,253.63, +240.5,236.25,239.88,240.5,240.88,240.63,241.38,238.25,236.25,236.25,237.63,238.38,239.63,238.25,239, +239.5,239.25,240.75,243.88,243.25,240.13,242.13,239.25,242.75,244.25,246.13,244.75,241.13,244.25,249, +251.5,251.25,253.75,256.63,256,254.75,255.25,255.25,256,256.25,257.25,257.75,258,259.75,260.13, +260.75,258.5,258.63,260.5,265.5,265.5,266.88,265,264.25,265.88,266,265.38,266.25,267.25,269.25, +269,267.5,266,266.63,266.38,267,268.88,267,266.88,270.75,268.75,268.5,272.75,271,270.25, +270.25,267.5,266.63,264.25,263.13,263.75,264.75,266.25,264.25,263.25,264.5,262.38,261.13,260.5,262.38, +264.5,263,264,262.88,267,268.75,268.5,266.25,261.63,260.25,258.38,257.88,261,258.25,260, +259.5,252.75,251,252,253,250.38,249.63,253.38,257.25,258.88,260.13,260.5,257.25,257.25,258.75, +257.75,256,257.38,258.75,257.88,257.5,255.25,256,257.63,257.25,257.88,257.38,259,262,261, +260.38,259.63,258.25,259.5,257,257.63,256.25,259,255.75,258,262.5,263.13,262.75,262.75,262.75, +265.25,267.75,268.38,268.5,267.5,268.38,266.63,269.5,267.75,267.25,268,270.13,271.25,269.13,268.5, +267.75,267.75,269.25,266,266.13,268.25,265.63,264.25,266.5,269,269,269.25,269.63,268.13,267, +267.5,271.5,273.25,273.25,273,273,274.75,274,270.5,262.13,259.13,259.5,259.13,261.5,259.88, +261.5,261.63,263.88,265.25,264.13,267.13,266,262.38,260.38,259.75,260,257.88,257.25,258.38,258.5, +254.13,251.75,251.25,252.88,252.88,250.5,250.75,247.38,248,246,245.25,249,247.13,247.5,245.38, +249.63,251,254,255.38,253.25,253.25,252.38,252.75,255.25,255.25,256.25,260,262,261.25,260, +258.75,259.75,261.25,259.5,258.25,258,263.25,270,271.13,272,272.5,272,273.75,278,276.63, +276.75,275.5,274.5,275.75,278,276.5,276.63,280.5,279.5,277.5,280.13,282.5,285.5,283.25,283.5, +283.5,284,285.25,284,283.25,284.38,279.63,280.13,280.5,278,278.25,276.75,277,276.13,275.5, +275.5,276,275.75,275,270.5,271.5,272.25,274.25,267.75,269,268,270,270.5,269,271.13, +271.75,276.5,275.25,272.5,268.75,268.25,269.5,271.75,274,273,277.5,275.25,273,270.5,270.5, +269,269,271.25,272,274,274,273,276.5,276.5,280.5,277.25,278.5,277.75,273.5,270.25, +270.38,265.75,265,267.25,268.75,269.88,270,271,271.5,272.75,270.75,273,272.5,270.25,272, +271,271.38,274,272.75,270,271.5,270,270.75,268,263.5,264.25,262,264.5,261,260.25, +259.5,261.75,267.38,268,270.75,271.75,266.5,266,263.5,259.88,256.5,257.25,263.5,263.5,263.63, +262.75,264.5,271.5,271.75,278,278.25,281.25,279.5,279,280,280.5,281.38,281.5,283.88,286.75, +284.5,284.25,285.5,287.75,284.63,284,284,278.25,278,277.63,279.5,278,277.5,280,278.5, +276.38,276.88,273.63,272.25,270,268.88,272,269.5,273.5,273,275.13,279.5,280,279.38,278.25, +277.5,277.38,278.5,274.5,275.25,274.63,275.63,276,271.75,272.13,273,273,272.25,275.5,273.75, +272.5,271,270.5,272,274.25,276.25,276.63,277.63,279.75,278,276.75,278,275,276,274.5, +276.75,276.25,273.63,274.5,275.25,272,268.75,270.5,266.5,269,263.63,259,260.25,259,255.5, +253.75,253,253.38,253,256,257.5,254,256.5,253.5,250,251,249.75,253,257,253.75, +253.5,253,252.25,255,257,256.5,258,252.25,249.63,250,251.5,249.25,252.75,253.5,256, +255.88,259.25,258.63,260,260.5,261.25,259.25,256.5,255.5,262.88,261.63,267.88,268.25,269,269.75, +272,268.25,261.75,262,260.5,260.25,259.5,258.5,261.75,262,258.25,258.75,258,258.13,261.88, +259.63,261.25,265.75,261.75,259.25,260,258.5,256.25,259.25,259.25,259.25,255.63,256,260,262.5, +261,262,262,258.5,253.13,254,252.5,255.25,258,253.5,254,257.25,263.25,261.25,259.25, +257.75,257.63,251,249.88,254.25,254.25,250,247.5,252.5,250,242.88,239.63,241.25,234.25,235.75, +231.25,230.38,228.5,229.38,230,226.5,224.25,223.5,222.5,223.25,221.38,221.13,216.25,217.75,219.5, +219.75,219.88,216.75,215.63,214.75,217.5,215.88,215,214.63,220.13,219,219.63,224.13,226.38,225, +224.63,222.25,221.75,221,219.63,220.38,225,223.13,221.38,224.75,220.5,217,216.25,217,215.75, +213.5,211.63,212.25,211.13,211,214.25,211.88,209,214.75,213.25,212.88,212.5,208,209.38,208.75, +208.5,210.5,206,205.25,206,201.25,201,200.13,189,183.75,188.25,190.75,195,192.13,191, +190.5,186.5,189.25,186.25,180,178.63,179.88,180,181.25,180,179,183.5,180,182,182.75, +181.25,186.25,186.25,181.5,178.25,181.75,180.25,177.75,176.5,178.13,182,182.25,179.75,177.75,182, +183.5,180.13,183,185.75,184.38,187.75,189.25,190.25,194.88,192,190.63,190.5,194.25,193,197.5, +199.25,201.88,201.88,204.63,206.75,208,205.5,204.75,209.25,206.75,204,206.5,206.88,207.5,209, +209,209.25,210.5,211.5,213,206.38,208.38,204.25,203.5,208.25,206.13,208.5,210.25,211.5,212, +213.5,217.63,216.63,218.5,218,217,213.5,213.38,216.13,218.88,214.25,212.75,216,219,216.63, +217.5,223.5,223.5,216.25,215.25,210.5,211.5,209.75,213.75,207.63,209.25,209.88,202.25,202.5,206, +206.88,208,211.75,213.75,210.25,212.5,212.75,209.5,209.5,205,206.25,209.5,202.25,198.75,198, +198,203.75,206.13,206.63,207.5,209.88,210,204.63,206.25,209.5,214.5,214.75,218.75,215.75,217, +213,215.5,219.5,217,219.25,215.38,214.5,220,216,212.25,212,207.5,209.75,217.75,217.75, +217.75,212,220.13,215.5,213.25,201.63,198.63,198.25,196,199.88,191.75,193,188.25,183.25,187.25, +179.75,179.25,162.88,163,163.5,159.63,160,158.13,160.75,163.5,168.25,169.25,171.25,169.63,163.25, +165.75,166.5,167.5,168.88,168.25,166,162.25,165,167.38,166,169.5,169,170,171.63,165.25, +167.25,169.5,171.75,172,170.25,164.5,165.75,169.75,168.13,170.5,175.5,178.25,177,174,170.5, +171.5,168.5,169.5,173.88,177.5,182.13,184.75,185,189.88,190.5,187.25,185.5,195.88,189.5,191.25, +189.13,193,191.75,184.25,177.25,181.25,181.25,185.5,192.5,184.25,182.5,177.13,177.25,179,178, +176.13,175.38,162,164.13,159.25,157.75,159.5,160.25,159,159.5,164,164,166.75,168,171.5, +170.5,169.25,161.88,161.75,152,156.5,165,171.5,173,178.5,182.25,180,180,192,190.25, +191.25,192,193.5,190,192.75,192,199.75,196.75,196.75,200,200,202,203,208.5,208.5, +214.75,208.75,207,200.88,201.75,201.63,207.5,203,203.5,214.5,221,222.25,221,217.75,217, +217.75,213.75,216,215.5,203.25,197.75,201.75,199,202.25,209.13,211.5,212.75,212.75,212,215, +220.5,215.75,213,213.75,216.5,216,218.75,222,226.75,225,226,229,229.25,228.75,220.38, +220.5,219,212.5,214.5,210.63,217,218.75,216.25,216.13,217.5,218.25,218.25,219.75,222.38,223, +221.75,224,230.5,226,228.13,224.25,224.5,228.75,230,227.25,224.5,225,222,222.5,227.25, +230.38,231.63,233.75,234.25,234.25,231.25,229.5,230.25,233,230.75,233.5,236.5,239.25,235,231.63, +235.75,239.75,242.5,249,248,243.5,243,246.25,245.75,247.5,249.25,248.75,250,249.5,246.5, +240.5,239.75,244.25,241.75,238.25,236,237.88,237,237.75,235.75,236.5,237,235.75,231.75,233.5, +227.5,229.25,228.25,228,233.13,236.25,237.25,236.75,237,240.75,244.5,246.25,245.25,244.25,247, +246.5,248,249.75,245,245,250.75,247.25,239.13,237,240,232,227.75,228,227.25,230.75, +238,242.75,246.75,249.25,255,251.5,243.5,239,243,250.75,249.5,240,244.5,251.5,250.63, +251.5,263,265,260.75,253.25,255.25,258.5,264.75,266,269.25,264.5,266,269.5,276.25,272, +274.75,284.5,280.25,286,289.75,287,278.38,282,282,276,276.75,279,281.25,280.25,278.5, +284.75,285.5,289,287.5,286,280,288.25,289,283.25,281.88,279.25,280.25,281,277.5,270.5, +261.75,259.5,252.5,248.5,254,257.5,257.75,260,260.5,260.5,253,260,264.5,270.75,266, +261,285.13,292.25,290.5,286.25,291.5,296,298.25,297.75,296.88,300.5,303,304.25,304,304.5, +298.25,299.25,298,297.75,299.75,300.5,300.5,302.5,299.75,301.5,301.25,303.5,304,306,310.75, +311.5,312,311.5,314.5,320.75,318,318.75,319,314,312.75,315,315,314.25,310,319, +310,313.75,319,315,308.25,300.25,300,298.5,304,314,319.5,313.25,312.75,308.75,314.13, +315.5,319,318,314,317,319.75,328.5,329.25,323.25,324.25,322,318.5,317,309.75,310, +314,319,323.5,328.5,400.5,390,390,388.5,386.75,395,400,400,396.13,403.5,409.5, +414,422,417,419,424,415.38,411.5,411.5,405.25,409.75,407.5,409.75,423.5,428.25,432, +425,425.25,429.75,430.75,430.25,434.25,429.75,423.5,423.25,423,424.25,428,431.5,437.5,434.5, +437.5,432.5,428,425.5,428.88,437.75,437.88,442.88,444,448.75,444.75,442.5,440.75,440.5,441, +438.5,438.75,442,427,431.5,423,431,433.5,442.5,443.75,447,443,441.5,445.63,450.75, +451,446.5,437.75,438.5,438.5,431,429.75,429,435.5,437.75,441.5,437.75,436,444.25,436, +439,428.88,427,422.5,423.25,422.75,417.25,412,415.5,418.75,418.75,412.75,409.25,409.25,404.5, +399,392.25,391.5,385.5,389.5,390,393.75,397.5,396,396.25,399,403.75,403,397.25,397, +398,400,399.25,391,387,382.25,385.5,387.25,394,387.25,385.25,384,385,384.25,388, +378.75,373.25,371.5,376.25,381,387.88,390.88,389.5,386,381,378.75,378.25,383.5,388.75,390.5, +389,378.5,379,374.5,364.5,379,383.5,388.5,394,400.25,401.5,395,403.25,406.75,405.25, +406.5,404.25,405.75,398.25,398.25,398.25,399.5,400.5,397,397,397,399.5,398,395,396.5, +397.75,399.5,401.25,404.75,406.25,408.5,408,408.75,404.25,406,407.25,413,412.75,411,411.5, +413.25,416,420.25,422.75,425.5,423.5,423.5,418.25,417.75,416,415.25,409,410,402,398.25, +397,394.5,398,398.75,398,390.75,390,390,388,393.25,391.75,395.75,397,399,404, +403.75,403,396.5,393,392,390.63,392.25,392.25,393.5,395.75,396,397,396.5,398.75,397.5, +399.75,395,387.75,391,392.75,395.25,393,394.5,397.5,399,399,396,403.25,404,403, +402,401,398.5,394.5,390,383.75,386.5,384.5,383.5,383.75,379.25,385.75,387,384.5,379, +380,382.5,386,381.25,381,381.5,383.5,385,387.75,390.75,395.75,395.25,395,394.25,397.5, +391.75,390.5,390,391,392,389,385.5,382.25,380,383.63,385,382.75,382.25,379,377, +376.88,377,373,373,372,373.25,377.75,382,382,383.75,380,377.5,376.25,374.25,369.5, +367,371.75,365.5,369,368.5,368.75,367.75,369.38,369.75,369,372.75,372,373.75,372.25,369, +369.75,372.25,373.5,369,368,368.25,368.25,368.75,366,360.5,366,363.5,360,349.5,349.5, +350,342.5,341.25,342,338.25,338.75,341,341,340,333,336.5,335,337,339.25,333.5, +336,339.75,345,341.5,341,339,334.25,320,324.25,324.5,317.75,313.5,317,313.25,320.75, +309.5,309.75,306.5,302.25,299.25,291.75,290.5,291.75,293.5,294.75,301,301.75,294.25,294.25,292.25, +296,299,299.25,300,300,303,297.5,292.38,300,298.25,297,299,302,301.63,304, +305,308.5,306.25,308.75,307.75,309.25,313.63,305.75,304.75,308.5,309,307.75,306.5,306,304.25, +302.75,304.25,303.88,304.5,305,307.75,306,304,302.25,301,302.5,299.75,300,304,305.75, +310.5,310,310,299.75,301.5,304,307.5,315.5,314,314.75,318.25,315,311.25,307,310, +315,314,313.5,296.5,294,286.5,284,285.5,287,287,290,293.75,292.75,296.75,299.5, +292.75,296,298,299.5,301.75,299.5,298.5,294.5,298,300,301,314.5,316,311.25,311.5, +316.5,317.5,317.75,317,315.5,311.88,311.25,312,315.25,314.75,314,315.5,320.13,323.5,321.5, +318.63,323.5,323.5,318.75,312.5,317.75,323.75,322.25,326.5,328.75,327.5,333,337.25,337,340, +343,347.5,342,338,334,335.5,339,342.5,342.25,344.75,347,349.5,353,353,353.25, +355,361.25,361.25,358.75,356,355,352,352.5,355.75,354,353,353.75,358.75,358,357, +356.75,361,361.13,360.75,358,356,357.5,357,356.5,358,356.25,355,355.75,358.5,360.63, +361,363.5,362.5,363.25,354,347.75,348.75,349,348.5,345.5,341.25,338.25,338,338.5,336.5, +334,338.25,336,330.5,328.25,329.25,336.5,340.38,339.5,338.75,337.25,338,340.75,336.5,330.5, +328.63,327.75,327.25,325.5,318.25,321,326,323,321.75,316.13,314.75,312.75,311.75,311,314.5, +315.63,315.75,312.5,314,316.25,318,316.25,313,316.75,319.5,320.25,318.5,316,312.75,316, +317.25,315.5,313,313,311,310.75,316.75,317.5,317.25,316.25,316,311.75,311.5,314,308, +307.25,308.5,299,300,299,297,291,290.5,292.5,293.25,293.13,296,297.25,299,298.25, +295.25,292.63,296.25,296.25,299.75,294,297,297,291,289.75,294.75,288.75,288.88,291.13,284.5, +286.75,293,291.5,292,290.25,294.75,298.25,305,307,307,300.5,297.75,291.75,291.75,290, +288.5,288.5,282,273.75,275.25,280.25,277.25,273,266.38,266,268.75,268.25,270.75,275,272, +269.75,265.75,263.88,265.25,269.5,265.25,263.75,264,262.75,254,244.75,239.75,239.75,235.5,229.88, +225,230,235.75,239.75,245.5,248.5,249.75,250.25,249.25,251.88,253.25,252.5,252.75,253.25,253.75, +256,254,257.75,258,259.5,255.75,252.25,251.25,247.75,250.25,254.25,252.5,243.5,244.5,250.38, +254,250,257.5,257.5,258,256.75,257.13,268.5,270.25,272,265.75,271,259.13,259,259.25, +262.25,268.25,266.25,270,271.25,281.25,283,286.5,278,267,259,245,241,247.25,245.5, +245.75,255.5,268.5,270.75,268.5,274.5,278.75,285.5,289.5,289.75,287.5,283,283,294.63,298, +300.25,290.25,299.75,309,309.63,313,319.63,324.5,323,320.75,323.25,324.75,326.5,331,325.75, +325.5,320,320.5,323.5,330.75,337,338.5,336.75,334.25,333,329.5,322,319.75,322.38,322.25, +322.5,320,321.75,328.75,328.5,326.5,318.5,320,329.13,329.75,333.25,335.5,340.25,344.25,345, +344.5,348.5,352,352,349.75,349.25,349,352,355,348.75,349.75,346.5,338.75,339.5,343.25, +343,337,335.19,341,345.25,345.75,354,356,355,356.5,350,355.13,381.5,375,374.13, +367.75,369,369.5,368.75,368.5,368.25,366,364.5,362,358.25,361,355,354,360,366, +360.5,351.5,353.25,358,359,356.25,355.5,356,355.5,357,357,355.13,356,359.5,358.5, +351.75,346.75,345.75,350,354.5,357.25,363.25,362.5,363,364.5,365.75,367.75,366.75,365,361.75, +360.5,359.5,359.5,360,359.5,356.25,360,363.5,364,358.75,355.5,357,353.25,351,351.75, +354,353.75,347.25,346.5,347,341.5,345.75,348.5,344.75,344.5,343.5,345.25,346.25,346.5,347.75, +356,357.25,358.5,352.5,349.25,347,346.75,344,345.5,343.5,346.5,340,335.25,337.5,340.25, +340.75,343.5,345,348,343.5,341.5,341,346.5,349,346.88,342,341.25,339.5,338.75,335, +330.5,329.25,333.5,333.75,336,335.25,327.5,329.5,326,320,313,313.13,316.25,317,320.25, +318.25,323,326,328.5,325.5,321.5,331.5,327,333.5,335.5,345,351.25,348,339.5,337.75, +332.5,329.75,320.5,325.5,319.5,312.25,314,314.25,314.25,313.5,313,309.5,309,310.25,312.25, +314.25,318,319,318,319.5,319,321.75,322.25,327,327,322.75,322.5,319.75,323.75,329, +330,332.5,331.5,326.5,327,329.75,329,331.5,327.75,326.75,325.5,328,327.25,324.5,318, +315.5,311.5,312.5,308,308.25,306.75,308.75,310.5,310,312,313.75,312,307,307.25,309, +311,313,314,311.5,309.5,308,306.5,305.5,305.5,303.5,300,301.75,295.75,294.75,299.63, +303,303.5,299.75,299.75,302.5,299,296,293.38,296,298,296.25,296.75,295.5,295.5,300, +300,306.5,310.25,306.5,303.5,300.25,297.25,296.75,296.25,295,296.25,296.5,296.25,299.75,299.75, +299.75,300.5,303,303,300,300,312.75,310,308.5,300,303.75,310,307.5,304.25,302.5, +307.5,312,315,314,318,319.75,321,319.25,321.88,326,319.75,316.5,316.5,319.75,327.5, +327,326,328.25,330,329,333.75,334.5,330.25,328,327.75,326,325,322.5,327,325.5, +324,320,317,316,310,315,309,308,307.5,313.5,316.75,317.5,323.5,327,327, +321.25,315.5,318.5,325,327.75,330.75,330.25,331,325,326.75,330.5,332.25,335.5,337,337, +331,334,336.75,336,337.5,337.25,337,338,340.5,339.75,339,337,335,337.5,338, +340,338.5,343.5,344.5,344.75,341,339,343.25,338.75,335.25,335.5,338,335.5,336,336.5, +338.75,331.5,332,335.5,343.75,342,345,353,355,356.5,355,358,362.5,364.75,361, +352,351.5,353.75,359.75,356.25,349,358,358.5,351.5,346.5,358,359,370,370.75,370, +368,366,369.75,375,369,349,337,332.5,330,329.5,328.25,330,324.88,325,328.25, +334.5,335.25,335,338.5,341.25,343.5,343.88,343,344,348,346.5,339.5,335,329.5,328, +326.5,327.5,327.5,636.5,640,643,644.5,647,649,641,642,631.5,637.5,638.5,635, +631,625.5,602.25,598,595,590,585.5,580,586.75,584,590.75,590.75,573.5,586.13,594.5, +593,580.5,582,587.5,569.75,562,573.75,580,586,594,587.5,589.75,597.25,596,586, +577,579,586,572,571,575.5,591.5,588.5,591.5,594.5,599.5,594.5,606,612.5,618.5, +618,614,623,607,619,621.5,619,616,623,618,612,605.75,599.25,597.75,594, +590.5,601.75,613.5,627,624.5,625,617,613.5,622,625,619.5,618,632.5,646,644, +641,645.5,644.5,641,637,629,630,620,612,614 }; diff --git a/src/ta-lib/src/tools/ta_regtest/ta_regtest.c b/src/ta-lib/src/tools/ta_regtest/ta_regtest.c new file mode 100644 index 000000000..331329e80 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_regtest.c @@ -0,0 +1,301 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AC Angelo Ciceri + * AB Anatoliy Belsky + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 063001 MF First version (initial framework only). + * 090404 MF Add test_candlestick + * 110206 AC Change volume and open interest to double + * 122506 MF Add MININDEX,MAXINDEX,MINMAX and MINMAXINDEX. + * 101812 AB Add AVGDEV. + * 101912 AB Add IMI. + */ + +/* Description: + * Perform regression testing of the TA-LIB. + */ + +/**** Headers ****/ +#ifdef WIN32 + #include "windows.h" +#endif + +#include +#include +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +int nbProfiledCall; +double timeInProfiledCall; +double worstProfiledCall; +int insufficientClockPrecision; +int doExtensiveProfiling; + +/**** Local declarations. ****/ +/* None */ + +/**** Local functions declarations. ****/ +static ErrorNumber testTAFunction_ALL( void ); +static ErrorNumber test_with_simulator( void ); +static void printUsage(void); + +/**** Local variables definitions. ****/ +/* None */ + +/**** Global functions definitions. ****/ +int main( int argc, char **argv ) +{ +#ifdef WIN32 + LARGE_INTEGER QPFrequency; +#endif + double freq; + + ErrorNumber retValue; + + (void)argv; + + insufficientClockPrecision = 0; + timeInProfiledCall = 0.0; + worstProfiledCall = 0.0; + nbProfiledCall = 0; + doExtensiveProfiling = 0; + + printf( "\n" ); + printf( "ta_regtest V%s - Regression Tests of TA-Lib code\n", TA_GetVersionString() ); + printf( "\n" ); + + if( argc == 2 ) + { + /* Detect option to perform extended profiling. */ + if( (argv[1][0] == '-') && (argv[1][1] == 'p') && (argv[1][2] == '\0')) + { + doExtensiveProfiling = 1; + } + else + { + printUsage(); + return TA_REGTEST_BAD_USER_PARAM; + } + } + + if( argc > 2 ) + { + printUsage(); + return TA_REGTEST_BAD_USER_PARAM; + } + + /* Some tests are using randomness. */ + srand( (unsigned)time( NULL ) ); + + /* Test utility like List/Stack/Dictionary/Memory Allocation etc... */ + retValue = test_internals(); + if( retValue != TA_TEST_PASS ) + { + printf( "\nFailed an internal test with code=%d\n", retValue ); + return retValue; + } + + /* Test abstract interface. */ + retValue = test_abstract(); + if( retValue != TA_TEST_PASS ) + { + printf( "Failed: Abstract interface Tests (error number = %d)\n", retValue ); + return retValue; + } + + /* Perform all regresstions tests (except when ta_regtest is executed for profiling only). */ + if( !doExtensiveProfiling ) + { + retValue = test_with_simulator(); + if( retValue != TA_TEST_PASS ) + return retValue; + + if( insufficientClockPrecision != 0 ) + { + printf( "\nWarning: Code profiling not supported for this platform.\n" ); + } + else if( nbProfiledCall > 0 ) + { + printf( "\nNumber profiled function call = %d function calls", nbProfiledCall ); + +#ifdef WIN32 + QueryPerformanceFrequency(&QPFrequency); + freq = (double)QPFrequency.QuadPart; + printf( "\nTotal execution time = %g milliseconds", (timeInProfiledCall/freq)*1000.0 ); + printf( "\nWorst single function call = %g milliseconds", (worstProfiledCall/freq)*1000.0 ); + printf( "\nAverage execution time per function = %g microseconds\n", ((timeInProfiledCall/freq)*1000000.0)/((double)nbProfiledCall) ); +#else + freq = (double)CLOCKS_PER_SEC; + printf( "\nTotal execution time = %g milliseconds", timeInProfiledCall/freq/1000.0 ); + printf( "\nWorst single function call = %g milliseconds", worstProfiledCall/freq/1000.0 ); + printf( "\nAverage execution time per function = %g microseconds\n", (timeInProfiledCall/freq/1000000.0)/((double)nbProfiledCall) ); +#endif + } + printf( "\n* All tests succeeded. Enjoy the library. *\n" ); + } + + + return TA_TEST_PASS; /* Everything succeed !!! */ +} + +/**** Local functions definitions. ****/ +static ErrorNumber test_with_simulator( void ) +{ + ErrorNumber retValue; + + /* Initialize the library. */ + retValue = allocLib(); + if( retValue != TA_TEST_PASS ) + return retValue; + + /* Perform testing of each of the TA Functions. */ + retValue = testTAFunction_ALL(); + if( retValue != TA_TEST_PASS ) + { + return retValue; + } + + /* Clean-up and exit. */ + + retValue = freeLib( ); + if( retValue != TA_TEST_PASS ) + return retValue; + + return TA_TEST_PASS; /* All test succeed. */ +} + +extern TA_Real TA_SREF_open_daily_ref_0_PRIV[]; +extern TA_Real TA_SREF_high_daily_ref_0_PRIV[]; +extern TA_Real TA_SREF_low_daily_ref_0_PRIV[]; +extern TA_Real TA_SREF_close_daily_ref_0_PRIV[]; +extern TA_Real TA_SREF_volume_daily_ref_0_PRIV[]; + +static ErrorNumber testTAFunction_ALL( void ) +{ + ErrorNumber retValue; + TA_History history; + + history.nbBars = 252; + history.open = TA_SREF_open_daily_ref_0_PRIV; + history.high = TA_SREF_high_daily_ref_0_PRIV; + history.low = TA_SREF_low_daily_ref_0_PRIV; + history.close = TA_SREF_close_daily_ref_0_PRIV; + history.volume = TA_SREF_volume_daily_ref_0_PRIV; + + printf( "Testing the TA functions\n" ); + + initGlobalBuffer(); + + /* Make tests for each TA functions. */ + #define DO_TEST(func,str) \ + { \ + printf( "%50s: Testing....", str ); \ + fflush(stdout); \ + showFeedback(); \ + TA_SetCompatibility( TA_COMPATIBILITY_DEFAULT ); \ + retValue = func( &history ); \ + if( retValue != TA_TEST_PASS ) \ + return retValue; \ + hideFeedback(); \ + printf( "done.\n" ); \ + fflush(stdout); \ + } + DO_TEST( test_func_1in_1out, "MATH,VECTOR,DCPERIOD/PHASE,TRENDLINE/MODE" ); + DO_TEST( test_func_ma, "All Moving Averages" ); + DO_TEST( test_func_per_hl, "AROON,CORREL,BETA" ); + DO_TEST( test_func_per_hlc, "CCI,WILLR,ULTOSC,NATR" ); + DO_TEST( test_func_per_ohlc, "BOP,AVGPRICE" ); + DO_TEST( test_func_rsi, "RSI,CMO" ); + DO_TEST( test_func_imi, "IMI" ); + DO_TEST( test_func_minmax, "MIN,MAX,MININDEX,MAXINDEX,MINMAX,MINMAXINDEX" ); + DO_TEST( test_func_po, "PO,APO" ); + DO_TEST( test_func_adx, "ADX,ADXR,DI,DM,DX" ); + DO_TEST( test_func_sar, "SAR,SAREXT" ); + DO_TEST( test_func_stoch, "STOCH,STOCHF,STOCHRSI" ); + DO_TEST( test_func_per_hlcv, "MFI,AD,ADOSC" ); + DO_TEST( test_func_1in_2out, "PHASOR,SINE" ); + DO_TEST( test_func_per_ema, "TRIX" ); + DO_TEST( test_func_macd, "MACD,MACDFIX,MACDEXT" ); + DO_TEST( test_func_mom_roc, "MOM,ROC,ROCP,ROCR,ROCR100" ); + DO_TEST( test_func_trange, "TRANGE,ATR" ); + DO_TEST( test_func_stddev, "STDDEV,VAR" ); + DO_TEST( test_func_avgdev, "AVGDEV" ); + DO_TEST( test_func_bbands, "BBANDS" ); + DO_TEST( test_candlestick, "All Candlesticks" ); + + return TA_TEST_PASS; /* All tests succeeded. */ +} + +static void printUsage(void) +{ + printf( "Usage: ta_regtest [-p]\n" ); + printf( "\n" ); + printf( " No parameter needed for regression testing.\n" ); + printf( "\n" ); + printf( " This tool will execute a series of tests to\n" ); + printf( " make sure that the library is behaving as\n" ); + printf( " expected.\n"); + printf( "\n" ); + printf( " ** Must be run from the 'bin' directory.\n" ); + printf( "\n" ); + printf( " OPTION:\n" ); + printf( " -p Only generate profiling data on stdout. This is\n" ); + printf( " intended only for the TA-Lib developers. It is\n" ); + printf( " not further documented for general use.\n" ); + printf( "\n" ); + printf( " On success, the exit code is 0.\n" ); + printf( " On failure, the exit code is a number that can be\n" ); + printf( " found in c/src/tools/ta_regtest/ta_error_number.h\n" ); +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func.h b/src/ta-lib/src/tools/ta_regtest/ta_test_func.h new file mode 100644 index 000000000..8fdf8c924 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func.h @@ -0,0 +1,28 @@ +#ifndef TA_TEST_FUNC_H +#define TA_TEST_FUNC_H + +ErrorNumber test_candlestick ( TA_History *history ); +ErrorNumber test_func_adx ( TA_History *history ); +ErrorNumber test_func_ma ( TA_History *history ); +ErrorNumber test_func_trange ( TA_History *history ); +ErrorNumber test_func_rsi ( TA_History *history ); +ErrorNumber test_func_po ( TA_History *history ); +ErrorNumber test_func_macd ( TA_History *history ); +ErrorNumber test_func_stddev ( TA_History *history ); +ErrorNumber test_func_bbands ( TA_History *history ); +ErrorNumber test_func_mom_roc ( TA_History *history ); +ErrorNumber test_func_stoch ( TA_History *history ); +ErrorNumber test_func_minmax ( TA_History *history ); +ErrorNumber test_func_per_ema ( TA_History *history ); +ErrorNumber test_func_per_hl ( TA_History *history ); +ErrorNumber test_func_per_hlc ( TA_History *history ); +ErrorNumber test_func_per_hlcv( TA_History *history ); +ErrorNumber test_func_per_ohlc( TA_History *history ); +ErrorNumber test_func_per ( TA_History *history ); +ErrorNumber test_func_sar ( TA_History *history ); +ErrorNumber test_func_1in_1out( TA_History *history ); +ErrorNumber test_func_1in_2out( TA_History *history ); +ErrorNumber test_func_avgdev ( TA_History *history ); +ErrorNumber test_func_imi ( TA_History *history ); + +#endif diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c new file mode 100644 index 000000000..6d3375230 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c @@ -0,0 +1,507 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 020203 MF First version. + * + */ + +/* Description: + * + * Test functions which have the following + * characterisic: + * - have one input and one output + * - there is no optional parameters + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { + TA_HT_DCPERIOD_TEST, + TA_HT_DCPHASE_TEST, + TA_HT_TRENDLINE_TEST, + TA_HT_TRENDMODE_TEST, + TA_SIN_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *price; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /********************************/ + /* Some Hilbert Transform Tests */ + /********************************/ + { 1, TA_HT_TRENDMODE_TEST, 0, 0, 251, TA_SUCCESS, 0, 1.0, 63, 252-63 }, /* First Value */ + + { 1, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 0, 88.257, 63, 252-63 }, /* First Value */ + { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 0, 88.257, 63, 252-63 }, + { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 252-66, 109.69, 63, 252-63 }, + { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 252-65, 110.18, 63, 252-63 }, + { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 252-64, 110.46, 63, 252-63 }, /* Last Value */ + + { 1, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 0, 22.1495, 63, 252-63 }, /* First Value */ + { 0, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 252-66, -31.182, 63, 252-63 }, + { 0, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 252-65, 23.2691, 63, 252-63 }, + { 0, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 252-64, 47.2765, 63, 252-63 }, /* Last Value */ + + { 1, TA_HT_DCPERIOD_TEST, 0, 0, 251, TA_SUCCESS, 0, 15.5527, 32, 252-32 }, /* First Value */ + { 0, TA_HT_DCPERIOD_TEST, 0, 0, 251, TA_SUCCESS, 252-33, 18.6140, 32, 252-32 }, /* Last Value */ + + /*********************************/ + /* Trigonometric and Vector Math */ + /*********************************/ + { 1, TA_SIN_TEST, 0, 0, 251, TA_SUCCESS, 0, -0.38371, 0, 252 }, /* First Value */ + { 0, TA_SIN_TEST, 0, 0, 251, TA_SUCCESS, 251, 0.870319, 0, 252 } /* Last Value */ + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_1in_1out( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Integer *intBuffer; + int size, i; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + switch( testParam->test->theFunction ) + { + case TA_HT_DCPERIOD_TEST: + retCode = TA_HT_DCPERIOD( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_HT_DCPERIOD_Lookback(); + break; + case TA_HT_DCPHASE_TEST: + retCode = TA_HT_DCPHASE( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_HT_DCPHASE_Lookback(); + break; + case TA_HT_TRENDLINE_TEST: + retCode = TA_HT_TRENDLINE( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_HT_TRENDLINE_Lookback(); + break; + case TA_HT_TRENDMODE_TEST: + /* Trendmode returns integers, but this test + * is comparing real, so a translation is done + * here. + */ + #define PRE_SENTINEL ((TA_Integer)0xABABFEDC) + #define POST_SENTINEL ((TA_Integer)0xEFABCDFF) + #define ALLOC_INT_BUFFER(varSize) \ + { \ + intBuffer = TA_Malloc(sizeof(TA_Integer)*(varSize+2)); \ + intBuffer[0] = PRE_SENTINEL; \ + intBuffer[varSize+1] = POST_SENTINEL; \ + } + + size = endIdx-startIdx+1; \ + ALLOC_INT_BUFFER(size); + retCode = TA_HT_TRENDMODE( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + &intBuffer[1] ); + *lookback = TA_HT_TRENDMODE_Lookback(); + + #define FREE_INT_BUFFER( destBuffer, varNbElement ) \ + { \ + if( intBuffer[0] != PRE_SENTINEL ) \ + { \ + retCode = TA_INTERNAL_ERROR(138); \ + } \ + else if( intBuffer[size+1] != POST_SENTINEL ) \ + { \ + retCode = TA_INTERNAL_ERROR(139); \ + } \ + else \ + { \ + for( i=0; i < varNbElement; i++ ) \ + destBuffer[i] = (double)intBuffer[i+1]; \ + } \ + TA_Free( intBuffer ); \ + } + + FREE_INT_BUFFER( outputBuffer, *outNbElement ); + break; + case TA_SIN_TEST: + retCode = TA_SIN( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_SIN_Lookback(); + break; + default: + retCode = TA_INTERNAL_ERROR(132); + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + const TA_Real *referenceInput; + + TA_Integer *intBuffer; + int size, i; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + + /* Change the input to MEDPRICE for some tests. */ + switch( test->theFunction ) + { + case TA_HT_DCPERIOD_TEST: + case TA_HT_DCPHASE_TEST: + case TA_HT_TRENDLINE_TEST: + case TA_HT_TRENDMODE_TEST: + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[0].in ); + + /* Will be use as reference */ + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[1].in ); + + referenceInput = gBuffer[1].in; + break; + default: + referenceInput = history->close; + } + + /* Make a simple first call. */ + size = (test->endIdx-test->startIdx)+1; + + switch( test->theFunction ) + { + case TA_HT_DCPERIOD_TEST: + retCode = TA_HT_DCPERIOD( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_HT_DCPHASE_TEST: + retCode = TA_HT_DCPHASE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + case TA_HT_TRENDLINE_TEST: + retCode = TA_HT_TRENDLINE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + case TA_HT_TRENDMODE_TEST: + ALLOC_INT_BUFFER(size); + retCode = TA_HT_TRENDMODE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + &intBuffer[1] ); + FREE_INT_BUFFER( gBuffer[0].out0, outNbElement ); + break; + case TA_SIN_TEST: + retCode = TA_SIN( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + default: + retCode = TA_INTERNAL_ERROR(133); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, referenceInput, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output + * are the same buffer. + */ + switch( test->theFunction ) + { + case TA_HT_DCPERIOD_TEST: + retCode = TA_HT_DCPERIOD( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + + case TA_HT_DCPHASE_TEST: + retCode = TA_HT_DCPHASE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + case TA_HT_TRENDLINE_TEST: + retCode = TA_HT_TRENDLINE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + case TA_HT_TRENDMODE_TEST: + ALLOC_INT_BUFFER(size); + retCode = TA_HT_TRENDMODE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + &intBuffer[1] + ); + FREE_INT_BUFFER( gBuffer[0].in, outNbElement ); + break; + case TA_SIN_TEST: + retCode = TA_SIN( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + default: + retCode = TA_INTERNAL_ERROR(134); + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.price = referenceInput; + + if( test->doRangeTestFlag ) + { + switch( test->theFunction ) + { + case TA_HT_DCPERIOD_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_HT_DCPERIOD, + (void *)&testParam, 1, 0 ); + break; + + case TA_HT_DCPHASE_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_HT_DCPHASE, + (void *)&testParam, 1, 360 ); + break; + + case TA_HT_TRENDLINE_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_HT_TRENDLINE, + (void *)&testParam, 1, 0 ); + break; + + case TA_HT_TRENDMODE_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_HT_TRENDMODE, + (void *)&testParam, 1, 0 ); + break; + + default: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + } + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c new file mode 100644 index 000000000..edcf0d4e3 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c @@ -0,0 +1,469 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 020203 MF First version. + * + */ + +/* Description: + * + * Test functions which have the following + * characterisic: + * - have one input and two outputs + * - there is no optional parameters + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { + TA_HT_PHASOR_TEST, + TA_HT_SINE_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer oneOfTheExpectedOutRealIndex1; + TA_Real oneOfTheExpectedOutReal1; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *price; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /********************************/ + /* Some Hilbert Transform Tests */ + /********************************/ + { 1, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 0, 0.38, + 0, 0.92, + 63, 252-63 }, + { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 1, 0.77, + 1, 1.00, + 63, 252-63 }, + + { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 5, 0.65, + 5, -0.08, + 63, 252-63 }, + + { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 252-67, -0.94, + 252-67, -0.44, + 63, 252-63 }, + + { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 252-66, -0.52, + 252-66, 0.24, + 63, 252-63 }, + + { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 252-64, 0.73, + 252-64, 1.00, + 63, 252-63 }, + + { 1, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 0, 0.9456, + 0, 5.2143, + 32, 252-32 }, /* First Value */ + + { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 1, 2.7539, + 1, 2.4129, + 32, 252-32 }, + + { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 9, -0.7235, + 9, -5.9336, + 32, 252-32 }, + + { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 252-34, 0.8386, + 252-34, -0.8913, + 32, 252-32 }, + + { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 252-33, 0.3258, + 252-33, -0.9447, + 32, 252-32 }, /* Last Value */ + + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_1in_2out( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + + for( i=0; i < NB_TEST; i++ ) + { + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *out1; + TA_Real *out2; + TA_Real *dummyOutput; + + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + dummyOutput = TA_Malloc( (endIdx-startIdx+1) * sizeof(TA_Real) ); + + if( outputNb == 0 ) + { + out1 = outputBuffer; + out2 = dummyOutput; + } + else + { + out1 = dummyOutput; + out2 = outputBuffer; + } + + switch( testParam->test->theFunction ) + { + case TA_HT_PHASOR_TEST: + retCode = TA_HT_PHASOR( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + out1, out2 ); + *lookback = TA_HT_PHASOR_Lookback(); + break; + case TA_HT_SINE_TEST: + retCode = TA_HT_SINE( startIdx, + endIdx, + testParam->price, + outBegIdx, + outNbElement, + out1, out2 ); + *lookback = TA_HT_SINE_Lookback(); + break; + default: + retCode = TA_INTERNAL_ERROR(132); + } + + TA_Free(dummyOutput); + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + const TA_Real *referenceInput; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + + /* Change the input to MEDPRICE for some tests. */ + switch( test->theFunction ) + { + case TA_HT_PHASOR_TEST: + case TA_HT_SINE_TEST: + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[0].in ); + + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[1].in ); + + /* Will be use as reference */ + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[2].in ); + + referenceInput = gBuffer[2].in; + break; + default: + referenceInput = history->close; + } + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_HT_PHASOR_TEST: + retCode = TA_HT_PHASOR( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1 ); + break; + case TA_HT_SINE_TEST: + retCode = TA_HT_SINE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1 ); + break; + default: + retCode = TA_INTERNAL_ERROR(133); + } + + /* Check that the inputs were preserved. */ + errNb = checkDataSame( gBuffer[0].in, referenceInput, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkDataSame( gBuffer[1].in, referenceInput, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output + * are the same buffer. + */ + switch( test->theFunction ) + { + case TA_HT_PHASOR_TEST: + retCode = TA_HT_PHASOR( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in, + gBuffer[1].out1 + ); + break; + case TA_HT_SINE_TEST: + retCode = TA_HT_SINE( test->startIdx, + test->endIdx, + gBuffer[0].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in, + gBuffer[1].out1 + ); + break; + default: + retCode = TA_INTERNAL_ERROR(134); + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkSameContent( gBuffer[0].out1, gBuffer[1].out1 ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); + + /* Make another call where the input and the output + * are the same buffer. + */ + switch( test->theFunction ) + { + case TA_HT_PHASOR_TEST: + retCode = TA_HT_PHASOR( test->startIdx, + test->endIdx, + gBuffer[1].in, + &outBegIdx, + &outNbElement, + gBuffer[1].out0, + gBuffer[1].in + ); + break; + case TA_HT_SINE_TEST: + retCode = TA_HT_SINE( test->startIdx, + test->endIdx, + gBuffer[1].in, + &outBegIdx, + &outNbElement, + gBuffer[1].out0, + gBuffer[1].in + ); + break; + default: + retCode = TA_INTERNAL_ERROR(134); + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out1, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].out0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out0, 0 ); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.price = referenceInput; + + if( test->doRangeTestFlag ) + { + switch( test->theFunction ) + { + case TA_HT_PHASOR_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_HT_PHASOR, + (void *)&testParam, 1, 0 ); + break; + case TA_HT_SINE_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_HT_SINE, + (void *)&testParam, 1, 10 ); + break; + + default: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + } + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c new file mode 100644 index 000000000..170605bb1 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c @@ -0,0 +1,682 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Test all the directional movement functions. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum +{ + TST_MINUS_DM, + TST_MINUS_DI, + TST_PLUS_DM, + TST_PLUS_DI, + TST_DX, + TST_ADX, + TST_ADXR +} TestId; + +typedef struct +{ + TestId id; + + TA_Integer doRangeTestFlag; + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /* Test the fixes for Bug#1089506 */ + { TST_MINUS_DI, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 0.0, 1, 252-1 }, + { TST_PLUS_DI, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 0.478, 1, 252-1 }, + { TST_MINUS_DM, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 0.0, 1, 252-1 }, + { TST_PLUS_DM, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 1.69, 1, 252-1 }, + + /* Normal regression tests. */ + { TST_ADXR,1, 0, 0, 251, 14, TA_SUCCESS, 0, 19.8666, 40, 252-40 }, /* First Value */ + { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 1, 18.9092, 40, 252-40 }, + + { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 210, 21.5972, 40, 252-40 }, + { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 211, 20.4920, 40, 252-40 }, /* Last Value */ + + { TST_PLUS_DM, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 10.28, 13, 252-13 }, /* First Value */ + { TST_PLUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 10.317, 13, 252-13 }, + { TST_PLUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 238, 9.58, 13, 252-13 }, /* Last Value */ + + { TST_PLUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 20.3781, 14, 252-14 }, /* First Value */ + + { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 13, 22.1073, 14, 252-14 }, + { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 20.3746, 14, 252-14 }, + { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.0000, 14, 252-14 }, /* Last Value */ + + { TST_MINUS_DM, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 12.995, 13, 252-13 }, /* First Value */ + { TST_MINUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 8.33, 13, 252-13 }, + { TST_MINUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 238, 9.672, 13, 252-13 }, /* Last Value */ + + { TST_MINUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 30.1684, 14, 252-14 }, /* First Value */ + { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 24.969182, 14, 252-14 }, + { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.1988, 14, 252-14 }, /* Last Value */ + + { TST_DX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 19.3689, 14, 252-14 }, /* First Value */ + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 9.7131, 14, 252-14 }, + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 2, 17.2905, 14, 252-14 }, + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 236, 10.6731, 14, 252-14 }, + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 0.4722, 14, 252-14 }, /* Last Value */ + + { TST_ADX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 23.0000, 27, 252-27 }, /* First Value */ + { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 22.0802, 27, 252-27 }, + { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 223, 16.6840, 27, 252-27 }, + { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 224, 15.5260, 27, 252-27 } /* Last Value */ + +#if 0 + /*These were the values when using integer rounding in the logic */ + { TST_ADXR,1, 0, 0, 251, 14, TA_SUCCESS, 0, 19.0, 40, 252-40 }, /* First Value */ + { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 1, 18.0, 40, 252-40 }, + { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 210, 22.0, 40, 252-40 }, + { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 211, 21.0, 40, 252-40 }, /* Last Value */ + + { TST_PLUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 20.0, 14, 252-14 }, /* First Value */ + { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 13, 22.0, 14, 252-14 }, + { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 20.0, 14, 252-14 }, + { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.0, 14, 252-14 }, /* Last Value */ + + { TST_MINUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 30.0, 14, 252-14 }, /* First Value */ + { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 25.0, 14, 252-14 }, + { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.0, 14, 252-14 }, /* Last Value */ + + { TST_DX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 20.0, 14, 252-14 }, /* First Value */ + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 9.0, 14, 252-14 }, + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 2, 18.0, 14, 252-14 }, + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 236, 10.0, 14, 252-14 }, + { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 0.0, 14, 252-14 }, /* Last Value */ + + { TST_ADX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 23.0, 27, 252-27 }, /* First Value */ + { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 22.0, 27, 252-27 }, + { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 223, 17.0, 27, 252-27 }, + { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 224, 16.0, 27, 252-27 } /* Last Value */ +#endif +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_adx( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + switch( testParam->test->id ) + { + case TST_MINUS_DM: + retCode = TA_MINUS_DM( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_MINUS_DM_Lookback( testParam->test->optInTimePeriod ); + break; + + case TST_MINUS_DI: + retCode = TA_MINUS_DI( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_MINUS_DI_Lookback( testParam->test->optInTimePeriod ); + break; + + case TST_DX: + retCode = TA_DX( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_DX_Lookback( testParam->test->optInTimePeriod ); + break; + + case TST_ADX: + retCode = TA_ADX( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_ADX_Lookback( testParam->test->optInTimePeriod ); + break; + + case TST_PLUS_DM: + retCode = TA_PLUS_DM( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_PLUS_DM_Lookback( testParam->test->optInTimePeriod ); + break; + + case TST_PLUS_DI: + retCode = TA_PLUS_DI( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_PLUS_DI_Lookback( testParam->test->optInTimePeriod ); + break; + + case TST_ADXR: + retCode = TA_ADXR( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_ADXR_Lookback( testParam->test->optInTimePeriod ); + break; + default: + retCode = TA_BAD_PARAM; + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + setInputBuffer( 3, history->high, history->nbBars ); + + /* Make a simple first call. */ + switch( test->id ) + { + case TST_MINUS_DM: + retCode = TA_SetUnstablePeriod( + TA_FUNC_UNST_MINUS_DM, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_MINUS_DM( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TST_MINUS_DI: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_MINUS_DI, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_MINUS_DI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TST_DX: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_DX, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_DX( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TST_ADX: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_ADX, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_ADX( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TST_PLUS_DM: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_PLUS_DM, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_PLUS_DM( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TST_PLUS_DI: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_PLUS_DI, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_PLUS_DI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TST_ADXR: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_ADX, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + retCode = TA_ADXR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + default: + retCode = TA_BAD_PARAM; + } + + /* Verify that the inputs were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->id ) + { + case TST_MINUS_DM: + retCode = TA_MINUS_DM( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + + case TST_MINUS_DI: + retCode = TA_MINUS_DI( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + + case TST_DX: + retCode = TA_DX( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + + case TST_ADX: + retCode = TA_ADX( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + + case TST_PLUS_DM: + retCode = TA_PLUS_DM( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + + case TST_PLUS_DI: + retCode = TA_PLUS_DI( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + + case TST_ADXR: + retCode = TA_ADXR( test->startIdx, + test->endIdx, + gBuffer[3].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + default: + retCode = TA_BAD_PARAM; + } + + /* Verify that the inputs were preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[3].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[3].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + switch( test->id ) + { + case TST_MINUS_DM: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_MINUS_DM, + (void *)&testParam, 1, 0 ); + break; + + case TST_MINUS_DI: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_MINUS_DI, + (void *)&testParam, 1, 2 ); + break; + + case TST_DX: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_DX, + (void *)&testParam, 1, 2 ); + break; + + case TST_ADX: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_ADX, + (void *)&testParam, 1, 2 ); + break; + + case TST_PLUS_DM: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_PLUS_DM, + (void *)&testParam, 1, 0 ); + break; + + case TST_PLUS_DI: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_PLUS_DI, + (void *)&testParam, 1, 2 ); + break; + + case TST_ADXR: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_ADX, + (void *)&testParam, 1, 2 ); + break; + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c new file mode 100644 index 000000000..49bf28067 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c @@ -0,0 +1,256 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AB Anatoliy Belsky + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 AB First version. + * + */ + +/* Description: + * Test AVGDEV function. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*************************/ + /* AVGDEV TEST */ + /*************************/ + { 1, 0, 251, 5, TA_SUCCESS, 0, 1.0184, 4, 252-4 }, /* First Value */ + { 0, 0, 251, 5, TA_SUCCESS, 1, 0.3684, 4, 252-4 }, + { 0, 0, 251, 5, TA_SUCCESS, 252-5, 0.5952, 4, 252-4 }, /* Last Value */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_avgdev( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + retCode = TA_AVGDEV( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + + *lookback = TA_AVGDEV_Lookback( testParam->test->optInTimePeriod ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + + /* Make a simple first call. */ + retCode = TA_AVGDEV( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + + errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_AVGDEV( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( + rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c new file mode 100644 index 000000000..bf85e6a17 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c @@ -0,0 +1,533 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Regression test of Bollinger Bands (BBANDS). + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + TA_Real optInNbDevUp; + TA_Real optInNbDevDn; + TA_Integer optInMethod_3; + TA_Integer compatibility; + + TA_RetCode expectedRetCode; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer oneOfTheExpectedOutRealIndex1; + TA_Real oneOfTheExpectedOutReal1; + + TA_Integer oneOfTheExpectedOutRealIndex2; + TA_Real oneOfTheExpectedOutReal2; + +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ +static TA_Test tableTest[] = +{ + + /****************************/ + /* BBANDS - CLASSIC - EMA */ + /****************************/ + + /* No multiplier */ + /* With upper band multiplier only. */ + /* With lower band multiplier only. */ + /* With identical upper/lower multiplier. */ + { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, + 19, 252-19, + 13, 93.674, /* Upper */ + 13, 87.679, /* Middle */ + 13, 81.685 }, /* Lower */ + + { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, + 19, 252-19, + 0, 98.0734, /* Upper */ + 0, 92.8910, /* Middle */ + 0, 87.7086 }, /* Lower */ + /* With distinctive upper/lower multiplier. */ + + /****************************/ + /* BBANDS - CLASSIC - SMA */ + /****************************/ + /* No multiplier */ + /* With upper band multiplier only. */ + /* With lower band multiplier only. */ + /* With identical upper/lower multiplier. */ + { 1, 0, 251, 20, 2.0, 2.0, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, + 19, 252-19, + 0, 98.0734, /* Upper */ + 0, 92.8910, /* Middle */ + 0, 87.7086 }, /* Lower */ + /* With distinctive upper/lower multiplier. */ + + + /******************************/ + /* BBANDS - METASTOCK - SMA */ + /******************************/ + + /* No multiplier */ + /* With upper band multiplier only. */ + /* With lower band multiplier only. */ + + /* With identical upper/lower multiplier. */ + { 1, 0, 251, 20, 2.0, 2.0, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 0, 98.0734, /* Upper */ + 0, 92.8910, /* Middle */ + 0, 87.7086 }, /* Lower */ + + /* With distinctive upper/lower multiplier. */ + + /******************************/ + /* BBANDS - METASTOCK - EMA */ + /******************************/ + + /* No multiplier */ + { 1, 0, 251, 20, 1.0, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 0, 94.6914, /* Upper */ + 0, 92.1002, /* Middle */ + 0, 89.5090 }, /* Lower */ + { 0, 0, 251, 20, 1.0, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 3, 94.0477, /* Upper */ + 3, 90.7270, /* Middle */ + 3, 87.4063 }, /* Lower */ + { 0, 0, 251, 20, 1.0, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 252-20, 111.5415, /* Upper */ + 252-20, 108.5265, /* Middle */ + 252-20, 105.5115 }, /* Lower */ + + /* With upper band multiplier only. */ + { 0, 0, 251, 20, 1.5, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 0, 95.9870, /* Upper */ + 0, 92.1002, /* Middle */ + 0, 89.5090}, /* Lower */ + { 0, 0, 251, 20, 1.5, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 3, 95.7080, /* Upper */ + 3, 90.7270, /* Middle */ + 3, 87.4063}, /* Lower */ + { 0, 0, 251, 20, 1.5, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 252-20, 113.0490, /* Upper */ + 252-20, 108.5265, /* Middle */ + 252-20, 105.5115 }, /* Lower */ + + /* With lower band multiplier only. */ + { 1, 0, 251, 20, 1.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 0, 94.6914, /* Upper */ + 0, 92.1002, /* Middle */ + 0, 88.2134 }, /* Lower */ + { 0, 0, 251, 20, 1.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 3, 94.0477, /* Upper */ + 3, 90.7270, /* Middle */ + 3, 85.7460}, /* Lower */ + { 0, 0, 251, 20, 1.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 252-20, 111.5415, /* Upper */ + 252-20, 108.5265, /* Middle */ + 252-20, 104.0040}, /* Lower */ + + /* With identical upper/lower multiplier. */ + { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 0, 97.2826, /* Upper */ + 0, 92.1002, /* Middle */ + 0, 86.9178}, /* Lower */ + { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 1, 97.2637, /* Upper */ + 1, 91.7454, /* Middle */ + 1, 86.2271}, /* Lower */ + { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 252-20, 114.5564, /* Upper */ + 252-20, 108.5265, /* Middle */ + 252-20, 102.4965}, /* Lower */ + + /* With distinctive upper/lower multiplier. */ + { 0, 0, 251, 20, 2.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 0, 97.2826, /* Upper */ + 0, 92.1002, /* Middle */ + 0, 88.2134 }, /* Lower */ + { 0, 0, 251, 20, 2.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 3, 97.3684, /* Upper */ + 3, 90.7270, /* Middle */ + 3, 85.7460}, /* Lower */ + { 0, 0, 251, 20, 2.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, + 19, 252-19, + 252-20, 114.5564, /* Upper */ + 252-20, 108.5265, /* Middle */ + 252-20, 104.0040} /* Lower */ + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_bbands( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, + tableTest[i].expectedNbElement, + history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *dummyBuffer1, *dummyBuffer2; + TA_Real *out1, *out2, *out3; + + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + dummyBuffer1 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer1 ) + return TA_ALLOC_ERR; + + dummyBuffer2 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer2 ) + { + TA_Free( dummyBuffer1 ); + return TA_ALLOC_ERR; + } + + switch( outputNb ) + { + case 0: + out1 = outputBuffer; + out2 = dummyBuffer1; + out3 = dummyBuffer2; + break; + case 1: + out2 = outputBuffer; + out1 = dummyBuffer1; + out3 = dummyBuffer2; + break; + case 2: + out3 = outputBuffer; + out2 = dummyBuffer1; + out1 = dummyBuffer2; + break; + default: + TA_Free( dummyBuffer1 ); + TA_Free( dummyBuffer2 ); + return TA_BAD_PARAM; + } + + retCode = TA_BBANDS( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + testParam->test->optInNbDevUp, + testParam->test->optInNbDevDn, + (TA_MAType)testParam->test->optInMethod_3, + outBegIdx, outNbElement, + out1, out2, out3 ); + + *lookback = TA_BBANDS_Lookback( testParam->test->optInTimePeriod, + testParam->test->optInNbDevUp, + testParam->test->optInNbDevDn, + (TA_MAType)testParam->test->optInMethod_3 ); + + TA_Free( dummyBuffer1 ); + TA_Free( dummyBuffer2 ); + + return retCode; +} + + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 0 ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + setInputBuffer( 3, history->close, history->nbBars ); + + TA_SetCompatibility( (TA_Compatibility)test->compatibility ); + + /* Make a simple first call. */ + retCode = TA_BBANDS( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + test->optInNbDevUp, + test->optInNbDevDn, + (TA_MAType)test->optInMethod_3, + + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1, + gBuffer[0].out2 ); + + errNb = checkDataSame( gBuffer[0].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[0].out2, 2 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_BBANDS( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + test->optInNbDevUp, + test->optInNbDevDn, + (TA_MAType)test->optInMethod_3, + &outBegIdx, &outNbElement, + gBuffer[1].in, gBuffer[1].out1, gBuffer[1].out2 ); + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out2, 2 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_BBANDS( test->startIdx, + test->endIdx, + gBuffer[2].in, + test->optInTimePeriod, + test->optInNbDevUp, + test->optInNbDevDn, + (TA_MAType)test->optInMethod_3, + &outBegIdx, &outNbElement, + gBuffer[2].out1, + gBuffer[2].in, + gBuffer[2].out2 ); + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[1].out1, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].out1, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[2].in, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[2].out2, 2 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_BBANDS( test->startIdx, + test->endIdx, + gBuffer[3].in, + test->optInTimePeriod, + test->optInNbDevUp, + test->optInNbDevDn, + (TA_MAType)test->optInMethod_3, + &outBegIdx, &outNbElement, + gBuffer[3].out0, + gBuffer[3].out1, + gBuffer[3].in ); + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[2].out2, gBuffer[3].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[3].out0, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[3].out1, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[3].in, 2 ); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + if( test->optInMethod_3 == TA_MAType_EMA ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_EMA, + (void *)&testParam, 3, 0 ); + } + else + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 3, 0 ); + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c new file mode 100644 index 000000000..87473fea9 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c @@ -0,0 +1,744 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 082304 MF First version. + * 041305 MF Add latest list of function. + */ + +/* Description: + * Test functions for candlestick. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +#define MAX_OPTIN_PARAM 5 +#define MAX_TESTED_OUTPUT 3 + +TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, + TA_RangeType rangeType, + int avgPeriod, + double factor ); + +typedef struct +{ + TA_RangeType bodyLong_type; + int bodyLong_avg; + double bodyLong_factor; + TA_RangeType bodyVeryLong_type; + int bodyVeryLong_avg; + double bodyVeryLong_factor; + TA_RangeType bodyShort_type; + int bodyShort_avg; + double bodyShort_factor; + TA_RangeType bodyDoji_type; + int bodyDoji_avg; + double bodyDoji_factor; + TA_RangeType shadowLong_type; + int shadowLong_avg; + double shadowLong_factor; + TA_RangeType shadowVeryLong_type; + int shadowVeryLong_avg; + double shadowVeryLong_factor; + TA_RangeType shadowShort_type; + int shadowShort_avg; + double shadowShort_factor; + TA_RangeType shadowVeryShort_type; + int shadowVeryShort_avg; + double shadowVeryShort_factor; + TA_RangeType near_type; + int near_avg; + double near_factor; + TA_RangeType far_type; + int far_avg; + double far_factor; +} TA_CDLGlobals; + +typedef struct +{ + int index; + int value; +} TA_ExpectedOutput; + + +typedef struct +{ + /* Indicate which function will be called */ + const char *name; + + /* Indicate if ranging test should be done. + * (These tests are very time consuming). + */ + int doRangeTestFlag; + + /* Range for the function call. + * When both value are -1 a series of automated range + * tests are performed. + */ + TA_Integer startIdx; + TA_Integer endIdx; + + /* Up to 5 parameters depending of functions. + * Will be converted to integer when input is integer. + */ + TA_Real params[MAX_OPTIN_PARAM]; + + /* The expected return code. */ + TA_RetCode expectedRetCode; + + /* When return code is TA_SUCCESS, the following output's + * element are verified. + */ + TA_ExpectedOutput output[MAX_TESTED_OUTPUT]; +} TA_Test; + + +typedef struct +{ + /* Allows to pass key information as an + * opaque parameter for doRangeTest. + */ + const TA_Test *test; + const TA_Real *open; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; + + TA_ParamHolder *paramHolder; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +static ErrorNumber callCandlestick( TA_ParamHolder **paramHolderPtr, + const char *name, + int startIdx, + int endIdx, + const double *inOpen, + const double *inHigh, + const double *inLow, + const double *inClose, + const double optInArray[], + int *outBegIdx, + int *outNbElement, + int outInteger[], + int *lookback, + TA_RetCode *retCode ); +/**** Local variables definitions. ****/ + +/* Some set of globals */ + +/* List of test to perform. */ +static TA_Test tableTest[] = +{ + { "CDL2CROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDL3BLACKCROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDL3INSIDE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDL3LINESTRIKE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDL3OUTSIDE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDL3STARSINSOUTH",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDL3WHITESOLDIERS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLABANDONEDBABY",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLADVANCEBLOCK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLBELTHOLD",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLBREAKAWAY",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLCLOSINGMARUBOZU",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLCONCEALBABYSWALL",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLCOUNTERATTACK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLDARKCLOUDCOVER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLDOJISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLDRAGONFLYDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLENGULFING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLEVENINGDOJISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLEVENINGSTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLGAPSIDESIDEWHITE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLGRAVESTONEDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHAMMER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHANGINGMAN",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHARAMI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHARAMICROSS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHIKKAKE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHIKKAKEMOD",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHIGHWAVE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLHOMINGPIGEON",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLIDENTICAL3CROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLINNECK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLINVERTEDHAMMER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLKICKING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLKICKINGBYLENGTH",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLLADDERBOTTOM",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLLONGLEGGEDDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLLONGLINE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLMARUBOZU",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLMATCHINGLOW",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLMATHOLD",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLMORNINGDOJISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLMORNINGSTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLONNECK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLPIERCING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLRICKSHAWMAN",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLRISEFALL3METHODS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLSEPARATINGLINES",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLSHOOTINGSTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLSHORTLINE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLSPINNINGTOP",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLSTALLEDPATTERN",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLSTICKSANDWICH",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLTAKURI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLTASUKIGAP",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLTHRUSTING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLTRISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLUNIQUE3RIVER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLUPSIDEGAP2CROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, + { "CDLXSIDEGAP3METHODS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }} +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_candlestick( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Initialize all the unstable period with a large number that would + * break the logic if a candlestick unexpectably use a function affected + * by an unstable period. + */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 20000 ); + + /* Perform sequentialy all the tests. */ + for( i=0; i < NB_TEST; i++ ) + { + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d for %s (retValue=%d)\n", i, tableTest[i].name, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All tests succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ + +/* Abstract call for all candlestick functions. + * + * Call the function by 'name'. + * + * Optional inputs are pass as an array of double. + * Elements will be converted to integer as needed. + * + * All outputs are returned in the remaining parameters. + * + * 'lookback' is the return value of the corresponding Lookback function. + * taFuncRetCode is the return code from the call of the TA function. + * + */ +static ErrorNumber callCandlestick( TA_ParamHolder **paramHolderPtr, + const char *name, + int startIdx, + int endIdx, + const double *inOpen, + const double *inHigh, + const double *inLow, + const double *inClose, + const double optInArray[], + int *outBegIdx, + int *outNbElement, + int outInteger[], + int *lookback, + TA_RetCode *taFuncRetCode ) +{ + + /* Use the abstract interface to call the function by name. */ + TA_ParamHolder *paramHolder; + const TA_FuncHandle *handle; + const TA_FuncInfo *funcInfo; + const TA_InputParameterInfo *inputInfo; + const TA_OutputParameterInfo *outputInfo; + + TA_RetCode retCode; + + (void)optInArray; + + /* Speed optimization if paramHolder is already initialized. */ + paramHolder = *paramHolderPtr; + if( !paramHolder ) + { + retCode = TA_GetFuncHandle( name, &handle ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't get the function handle [%d]\n", retCode ); + return TA_TSTCDL_GETFUNCHANDLE_FAIL; + } + + retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't allocate the param holder [%d]\n", retCode ); + return TA_TSTCDL_PARAMHOLDERALLOC_FAIL; + } + + *paramHolderPtr = paramHolder; + TA_GetFuncInfo( handle, &funcInfo ); + + /* Verify that the input are only OHLC. */ + if( funcInfo->nbInput != 1 ) + { + printf( "Candlestick are expected to use only OHLC as input.\n" ); + return TA_TSTCDL_NBINPUT_WRONG; + } + + TA_GetInputParameterInfo( handle, 0, &inputInfo ); + + if( inputInfo->type != TA_Input_Price ) + { + printf( "Candlestick are expected to use only OHLC as input.\n" ); + return TA_TSTCDL_INPUT_TYPE_WRONG; + } + + if( inputInfo->flags != (TA_IN_PRICE_OPEN | + TA_IN_PRICE_HIGH | + TA_IN_PRICE_LOW | + TA_IN_PRICE_CLOSE) ) + { + printf( "Candlestick are expected to use only OHLC as input.\n" ); + return TA_TSTCDL_INPUT_FLAG_WRONG; + } + + /* Set the optional inputs. */ + + /* Verify that there is only one output. */ + if( funcInfo->nbOutput != 1 ) + { + printf( "Candlestick are expected to have only one output array.\n" ); + return TA_TSTCDL_NBOUTPUT_WRONG; + } + + TA_GetOutputParameterInfo( handle, 0, &outputInfo ); + if( outputInfo->type != TA_Output_Integer ) + { + printf( "Candlestick are expected to have only one output array of type integer.\n" ); + return TA_TSTCDL_OUTPUT_TYPE_WRONG; + } + + /* !!!!!!!!!!!!! TO BE DONE !!!!!!!!!!!!!!!!!! + * For now all candlestick functions will be called with default optional parameter. + */ + } + + /* Set the input buffers. */ + TA_SetInputParamPricePtr( paramHolder, 0, + inOpen, inHigh, inLow, inClose, NULL, NULL ); + + TA_SetOutputParamIntegerPtr(paramHolder,0,outInteger); + + + /* Do the function call. */ + *taFuncRetCode = TA_CallFunc(paramHolder,startIdx,endIdx,outBegIdx,outNbElement); + + if( *taFuncRetCode != TA_SUCCESS ) + { + printf( "TA_CallFunc() failed [%d]\n", *taFuncRetCode ); + TA_ParamHolderFree( paramHolder ); + return TA_TSTCDL_CALLFUNC_FAIL; + } + + /* Do the lookback function call. */ + retCode = TA_GetLookback( paramHolder, lookback ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_GetLookback() failed [%d]\n", retCode ); + TA_ParamHolderFree( paramHolder ); + return TA_TSTCDL_GETLOOKBACK_FAIL; + } + + return TA_TEST_PASS; +} + +/* rangeTestFunction is a different way to call any of + * the TA function. + * + * This is called by doRangeTest found in test_util.c + * + * The doRangeTest verifies behavior that should be common + * for ALL TA functions. It detects bugs like: + * - outBegIdx, outNbElement and lookback inconsistency. + * - off-by-one writes to output. + * - output inconsistency for different start/end index. + * - ... many other limit cases... + * + * In the case of candlestick, the output is integer and + * should be put in outputBufferInt, and outputBuffer is + * ignored. + */ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RangeTestParam *testParam1; + const TA_Test *testParam2; + ErrorNumber errNb; + + TA_RetCode retCode; + + (void)outputBuffer; + (void)outputNb; + + testParam1 = (TA_RangeTestParam *)opaqueData; + testParam2 = (const TA_Test *)testParam1->test; + + *isOutputInteger = 1; /* Must be != 0 */ + + retCode = TA_INTERNAL_ERROR(166); + + /* Call the TA function by name */ + errNb = callCandlestick( &testParam1->paramHolder, + testParam2->name, + startIdx, endIdx, + testParam1->open, + testParam1->high, + testParam1->low, + testParam1->close, + testParam2->params, + outBegIdx, + outNbElement, + outputBufferInt, + lookback, + &retCode ); + + if( errNb != TA_TEST_PASS ) + retCode = TA_INTERNAL_ERROR(168); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RangeTestParam testParam; + ErrorNumber errNb; + TA_RetCode retCode; + + (void)test; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->open, history->nbBars ); + setInputBuffer( 1, history->high, history->nbBars ); + setInputBuffer( 2, history->low, history->nbBars ); + setInputBuffer( 3, history->close, history->nbBars ); + + +#if 0 + /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ + /* Test for specific value not yet implemented */ + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_CCI_TEST: + retCode = TA_CCI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_WILLR_TEST: + retCode = TA_WILLR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + default: + retCode = TA_INTERNAL_ERROR(133); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_CCI_TEST: + retCode = TA_CCI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + case TA_WILLR_TEST: + retCode = TA_WILLR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(134); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call to TA_MA should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + setInputBuffer( 0, history->high, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_CCI_TEST: + retCode = TA_CCI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_WILLR_TEST: + retCode = TA_WILLR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(135); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + setInputBuffer( 1, history->low, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_CCI_TEST: + retCode = TA_CCI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + case TA_WILLR_TEST: + retCode = TA_WILLR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(136); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call to TA_MA should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); + setInputBuffer( 2, history->close, history->nbBars ); +#endif + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.open = history->open; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + testParam.paramHolder = NULL; + + if( test->doRangeTestFlag ) + { + + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + + if( testParam.paramHolder ) + { + retCode = TA_ParamHolderFree( testParam.paramHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_ParamHolderFree failed [%d]\n", retCode ); + return TA_TSTCDL_PARAMHOLDERFREE_FAIL; + } + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c new file mode 100644 index 000000000..ebc8ca14e --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c @@ -0,0 +1,293 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * AB Anatoliy Belsky + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 AB First version. + * + */ + +/* Description: + * Test AVGDEV function. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; + const TA_Real *open; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*************************/ + /* AVGDEV TEST */ + /*************************/ + { 1, 0, 0, 251, 5, TA_SUCCESS, 0, 55.9194, 4, 252-4 }, /* First Value */ + { 0, 0, 0, 251, 5, TA_SUCCESS, 1, 64.6143, 4, 252-4 }, + { 0, 0, 0, 251, 5, TA_SUCCESS, 252-5, 7.730673, 4, 252-4 }, /* Last Value */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_imi( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + retCode = TA_IMI( + startIdx, + endIdx, + testParam->open, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + + *lookback = TA_IMI_Lookback( testParam->test->optInTimePeriod ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->open, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + setInputBuffer( 2, history->open, history->nbBars ); + + retCode = TA_SetUnstablePeriod( + TA_FUNC_UNST_IMI, + test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + /* Make a simple first call. */ + retCode = TA_IMI( + test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + + /* Verify that the inputs were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkDataSame( gBuffer[1].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_IMI( + test->startIdx, + test->endIdx, + gBuffer[2].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + + /* Verify that the inputs were preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + + + // TODO: Review remaining code, unexpectable fails, the test might be wrong!? + return TA_TEST_PASS; + +#if 0 + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + testParam.open = history->open; +// XXX FAIL HERE + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( + rangeTestFunction, + TA_FUNC_UNST_IMI, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +#endif +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c new file mode 100644 index 000000000..f7673355f --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c @@ -0,0 +1,816 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 031707 MF Add TA_MAVP tests. + */ + +/* Description: + * Test all MA (Moving Average) functions. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { + TA_ANY_MA_TEST, + TA_MAMA_TEST, + TA_FAMA_TEST +} TA_TestId; + + +typedef struct +{ + TA_Integer doRangeTestFlag; + TA_TestId id; + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + TA_Integer optInTimePeriod; + TA_Integer optInMAType_1; + TA_Integer compatibility; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex; + TA_Real oneOfTheExpectedOutReal; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; + const TA_Real *mavpPeriod; + int testMAVP; /* Boolean */ +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test_ma( const TA_History *history, + const TA_Test *test, + int testMAVP /* Boolean */ ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /************/ + /* T3 TEST */ + /************/ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 85.73, 24, 252-24 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 84.37, 24, 252-24 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-26, 109.03, 24, 252-24 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-25, 108.88, 24, 252-24 }, /* Last Value */ + + /***************/ + /* TRIMA TEST */ + /***************/ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.6043, 9, 252-9 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 93.4252, 9, 252-9 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-11, 109.1850, 9, 252-9 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-10, 109.1407, 9, 252-9 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 9, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.8176, 8, 252-8 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 9, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-9, 109.1312, 8, 252-8 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 12, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.5329, 11, 252-11 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 12, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-12, 109.1157, 11, 252-11 }, /* Last Value */ + + + + /************* + * MAMA TEST * + *************/ + { 1, TA_MAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 85.3643, 32, 252-32 }, /* First Value */ + { 0, TA_MAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-33, 110.1116, 32, 252-32 }, /* Last Value */ + + { 0, TA_FAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 81.88, 32, 252-32 }, /* First Value */ + { 0, TA_FAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-33, 108.82, 32, 252-32 }, /* Last Value */ + + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 85.3643, 32, 252-32 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-33, 110.1116, 32, 252-32 }, /* Last Value */ + + /***************************/ + /* KAMA TEST - Classic */ + /***************************/ + + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0}, +#ifndef TA_FUNC_NO_RANGE_CHECK + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* Test with period 10 */ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 92.6575, 10, 252-10 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 92.7783, 10, 252-10 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-11, 109.294, 10, 252-10 }, /* Last Value */ + + + /*****************************************/ + /* SMA TEST - CLASSIC/METASTOCK */ + /*****************************************/ + +#ifndef TA_FUNC_NO_RANGE_CHECK + /* Test with invalid parameters */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, -1, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* Test suppose to succeed. */ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.15, 1, 252-1 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 94.59, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 94.73, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 250, 108.31, 1, 252-1 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 90.42, 29, 252-29 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 90.21, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 89.96, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 29, 87.12, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 221, 107.95, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 222, 108.42, 29, 252-29 }, /* Last Value */ + + /* Same test and result as TA_COMPATIBILITY_DEFAULT */ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.15, 1, 252-1 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.59, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 94.73, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250, 108.31, 1, 252-1 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 90.42, 29, 252-29 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 90.21, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 89.96, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 29, 87.12, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 221, 107.95, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 222, 108.42, 29, 252-29 }, /* Last Value */ + + + /*******************************/ + /* WMA TEST - CLASSIC */ + /*******************************/ + +#ifndef TA_FUNC_NO_RANGE_CHECK + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* One value tests. */ + { 0, TA_ANY_MA_TEST, 0, 2, 2, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 94.52, 2, 1 }, + + /* Misc tests: period 2, 30 */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.71, 1, 252-1 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 94.52, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 94.85, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 250, 108.16, 1, 252-1 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 88.567, 29, 252-29 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 88.233, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 88.034, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 29, 87.191, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 221, 109.3413, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 222, 109.3466, 29, 252-29 }, /* Last Value */ + + /*******************************/ + /* WMA TEST - METASTOCK */ + /*******************************/ + + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, +#ifndef TA_FUNC_NO_RANGE_CHECK + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* One value tests. */ + { 0, TA_ANY_MA_TEST, 0, 2, 2, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 94.52, 2, 1 }, + + /* Misc tests: period 2, 30 */ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.71, 1, 252-1 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.52, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 94.85, 1, 252-1 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250, 108.16, 1, 252-1 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 88.567, 29, 252-29 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 88.233, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 88.034, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 29, 87.191, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 221, 109.3413, 29, 252-29 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 222, 109.3466, 29, 252-29 }, /* Last Value */ + + /*******************************/ + /* EMA TEST - Classic */ + /*******************************/ + + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0}, +#ifndef TA_FUNC_NO_RANGE_CHECK + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* Misc tests: period 2, 10 */ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.15, 1, 251 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 93.96, 1, 251 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 250, 108.21, 1, 251 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.22, 9, 243 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 93.75, 9, 243 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 20, 86.46, 9, 243 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 242, 108.97, 9, 243 }, /* Last Value */ + + /*******************************/ + /* EMA TEST - Metastock */ + /*******************************/ + + + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, +#ifndef TA_FUNC_NO_RANGE_CHECK + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* Test with 1 unstable price bar. Test for period 2, 10 */ + { 1, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 94.15, 1+1, 251-1 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.78, 1+1, 251-1 }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250-1, 108.21, 1+1, 251-1 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.24, 9+1, 243-1 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 93.97, 9+1, 243-1 }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 20, 86.23, 9+1, 243-1 }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 242-1, 108.97, 9+1, 243-1 }, /* Last Value */ + + /* Test with 2 unstable price bar. Test for period 2, 10 */ + { 0, TA_ANY_MA_TEST, 2, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 94.78, 1+2, 251-2 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 2, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.11, 1+2, 251-2 }, + { 0, TA_ANY_MA_TEST, 2, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250-2, 108.21, 1+2, 251-2 }, /* Last Value */ + + { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.97, 9+2, 243-2 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.79, 9+2, 243-2 }, + { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 20, 86.39, 9+2, 243-2 }, + { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 242-2, 108.97, 9+2, 243-2 }, /* Last Value */ + + /* Last 3 value with 1 unstable, period 10 */ + { 0, TA_ANY_MA_TEST, 1, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 109.22, 249, 3 }, + { 0, TA_ANY_MA_TEST, 1, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 108.97, 249, 3 }, + + /* Last 3 value with 2 unstable, period 10 */ + { 0, TA_ANY_MA_TEST, 2, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 108.97, 249, 3 }, + + /* Last 3 value with 3 unstable, period 10 */ + { 0, TA_ANY_MA_TEST, 3, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 108.97, 249, 3 }, + + /*******************************/ + /* DEMA TEST - Metastock */ + /*******************************/ + + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, +#ifndef TA_FUNC_NO_RANGE_CHECK + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* Test with period 14 */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 83.785, 26, 252-26 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 84.768, 26, 252-26 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-27, 109.467, 26, 252-26 }, /* Last Value */ + + /* Test with 1 unstable price bar. Test for period 2, 14 */ + { 1, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.960, 4, 252-4 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.522, 4, 252-4 }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-5, 107.94, 4, 252-4 }, /* Last Value */ + + { 1, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 84.91, (13*2)+2, 252-((13*2)+2) }, /* First Value */ + { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 84.97, (13*2)+2, 252-((13*2)+2) }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 84.80, (13*2)+2, 252-((13*2)+2) }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 3, 85.14, (13*2)+2, 252-((13*2)+2) }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 20, 89.83, (13*2)+2, 252-((13*2)+2) }, + { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-((13*2)+2+1), 109.4676, (13*2)+2, 252-((13*2)+2) }, /* Last Value */ + + /*******************************/ + /* TEMA TEST - Metastock */ + /*******************************/ + /* No output value. */ + { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, +#ifndef TA_FUNC_NO_RANGE_CHECK + { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, +#endif + + /* Test with period 14 */ + { 1, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 84.721, 39, 252-39 }, /* First Value */ + { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 84.089, 39, 252-39 }, + { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-40, 108.418, 39, 252-39 }, /* Last Value */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_ma( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "TA_MA Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test_ma( history, &tableTest[i], 0 ); + if( retValue != 0 ) + { + printf( "TA_MA Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + + /* If TA_ANY_MA_TEST. repeat test with TA_MAVP */ + if( tableTest[i].id == TA_ANY_MA_TEST ) + { + retValue = do_test_ma( history, &tableTest[i], 1 ); + if( retValue != 0 ) + { + printf( "TA_MAVP Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *dummyBuffer; + + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + switch( testParam->test->optInMAType_1 ) + { + case TA_MAType_MAMA: + dummyBuffer = TA_Malloc( sizeof(TA_Real)*(endIdx-startIdx+600) ); + if( outputNb == 0 ) + { + retCode = TA_MAMA( startIdx, + endIdx, + testParam->close, + 0.5, 0.05, + outBegIdx, + outNbElement, + outputBuffer, + &dummyBuffer[300] ); + } + else + { + retCode = TA_MAMA( startIdx, + endIdx, + testParam->close, + 0.5, 0.05, + outBegIdx, + outNbElement, + &dummyBuffer[300], + outputBuffer ); + } + TA_Free( dummyBuffer ); + *lookback = TA_MAMA_Lookback( 0.5, 0.05 ); + break; + default: + if( testParam->testMAVP ) + { + retCode = TA_MAVP( startIdx, + endIdx, + testParam->close, + testParam->mavpPeriod, + 2,testParam->test->optInTimePeriod, + (TA_MAType)testParam->test->optInMAType_1, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_MAVP_Lookback( 2, testParam->test->optInTimePeriod, + (TA_MAType)testParam->test->optInMAType_1 ); + } + else + { + /* Test for the TA_MA function. All the MA can be done + * through that function. + */ + retCode = TA_MA( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + (TA_MAType)testParam->test->optInMAType_1, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_MA_Lookback( testParam->test->optInTimePeriod, + (TA_MAType)testParam->test->optInMAType_1 ); + } + break; + } + + return retCode; +} + +static ErrorNumber do_test_ma( const TA_History *history, + const TA_Test *test, + int testMAVP ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + TA_Integer temp, temp2; + const TA_Real *referenceInput; + + /* TA_MAVP is tested only for TA_ANY_MA_TEST */ + if( testMAVP && (test->id != TA_ANY_MA_TEST) ) + { + return TA_TEST_PASS; + } + + TA_SetCompatibility( (TA_Compatibility)test->compatibility ); + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + if( testMAVP ) + { + setInputBufferValue( 2, test->optInTimePeriod, history->nbBars ); + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* Set the unstable period requested for that test. */ + switch( test->optInMAType_1 ) + { + case TA_MAType_TEMA: + case TA_MAType_DEMA: + case TA_MAType_EMA: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, test->unstablePeriod ); + break; + case TA_MAType_KAMA: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_KAMA, test->unstablePeriod ); + break; + case TA_MAType_MAMA: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_MAMA, test->unstablePeriod ); + break; + case TA_MAType_T3: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_T3, test->unstablePeriod ); + break; + default: + retCode = TA_SUCCESS; + break; + } + + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + /* Transform the inputs for MAMA (it is an AVGPRICE in John Ehlers book). */ + if( test->optInMAType_1 == TA_MAType_MAMA ) + { + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[0].in ); + + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[1].in ); + + /* Will be use as reference */ + TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, + &outBegIdx, &outNbElement, gBuffer[2].in ); + referenceInput = gBuffer[2].in; + } + else + referenceInput = history->close; + + + + /* Make a simple first call. */ + switch( test->id ) + { + case TA_ANY_MA_TEST: + if(testMAVP) + { + retCode = TA_MAVP( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[2].in, + 2, test->optInTimePeriod, + (TA_MAType)test->optInMAType_1, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + else + { + retCode = TA_MA( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + (TA_MAType)test->optInMAType_1, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + break; + case TA_MAMA_TEST: + retCode = TA_MAMA( test->startIdx, + test->endIdx, + gBuffer[0].in, + 0.5, 0.05, + &outBegIdx, + &outNbElement, + gBuffer[0].out0, + gBuffer[0].out2 ); + + break; + case TA_FAMA_TEST: + retCode = TA_MAMA( test->startIdx, + test->endIdx, + gBuffer[0].in, + 0.5, 0.05, + &outBegIdx, + &outNbElement, + gBuffer[0].out2, + gBuffer[0].out0 ); + + break; + } + + errNb = checkDataSame( gBuffer[0].in, referenceInput, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[0].out0, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->id ) + { + case TA_ANY_MA_TEST: + if(testMAVP) + { + retCode = TA_MAVP( test->startIdx, + test->endIdx, + gBuffer[1].in, + gBuffer[2].in, + 2,test->optInTimePeriod, + (TA_MAType)test->optInMAType_1, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + else + { + retCode = TA_MA( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + (TA_MAType)test->optInMAType_1, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + break; + case TA_MAMA_TEST: + retCode = TA_MAMA( test->startIdx, + test->endIdx, + gBuffer[1].in, + 0.5, 0.05, + &outBegIdx, + &outNbElement, + gBuffer[1].in, + gBuffer[0].out2 ); + break; + case TA_FAMA_TEST: + retCode = TA_MAMA( test->startIdx, + test->endIdx, + gBuffer[1].in, + 0.5, 0.05, + &outBegIdx, + &outNbElement, + gBuffer[0].out2, + gBuffer[1].in ); + break; + } + + /* The previous call to TA_MA should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[1].in, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Verify that the "all-purpose" TA_MA_Lookback is consistent + * with the corresponding moving average lookback function. + */ + if( test->optInTimePeriod >= 2 ) + { + switch( test->optInMAType_1 ) + { + case TA_MAType_WMA: + temp = TA_WMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_SMA: + temp = TA_SMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_EMA: + temp = TA_EMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_DEMA: + temp = TA_DEMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_TEMA: + temp = TA_TEMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_KAMA: + temp = TA_KAMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_MAMA: + temp = TA_MAMA_Lookback( 0.5, 0.05 ); + break; + + case TA_MAType_TRIMA: + temp = TA_TRIMA_Lookback( test->optInTimePeriod ); + break; + + case TA_MAType_T3: + temp = TA_T3_Lookback( test->optInTimePeriod, 0.7 ); + break; + + default: + return TA_TEST_TFRR_BAD_MA_TYPE; + } + + temp2 = TA_MA_Lookback( test->optInTimePeriod, (TA_MAType)test->optInMAType_1 ); + + if( temp != temp2 ) + { + printf( "\nFailed for MA Type #%d for period %d\n", test->optInMAType_1, test->optInTimePeriod ); + return TA_TEST_TFFR_BAD_MA_LOOKBACK; + } + } + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = referenceInput; + testParam.testMAVP = testMAVP; + testParam.mavpPeriod = gBuffer[2].in; + + if( test->doRangeTestFlag ) + { + switch( test->optInMAType_1 ) + { + case TA_MAType_TEMA: + case TA_MAType_DEMA: + case TA_MAType_EMA: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_EMA, + (void *)&testParam, 1, 0 ); + break; + case TA_MAType_T3: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_T3, + (void *)&testParam, 1, 0 ); + break; + case TA_MAType_KAMA: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_KAMA, + (void *)&testParam, 1, 0 ); + break; + case TA_MAType_MAMA: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_MAMA, + (void *)&testParam, 2, 0 ); + break; + default: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c new file mode 100644 index 000000000..dbe2731ac --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c @@ -0,0 +1,603 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Regression test of MACD. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_MACD_TEST, +TA_MACDFIX_TEST, +TA_MACDEXT_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + TA_TestId testId; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInFastPeriod; + TA_Integer optInSlowPeriod; + TA_Integer optInSignalPeriod_2; + TA_Integer compatibility; + + TA_RetCode expectedRetCode; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer oneOfTheExpectedOutRealIndex1; + TA_Real oneOfTheExpectedOutReal1; + + TA_Integer oneOfTheExpectedOutRealIndex2; + TA_Real oneOfTheExpectedOutReal2; + +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ +static TA_Test tableTest[] = +{ + + /*********************/ + /* MACD - CLASSIC */ + /*********************/ + { 0, TA_MACD_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ + 0, -1.9738, /* MACD */ + 0, -2.7071, /* Signal */ + 0, (-1.9738)-(-2.7071) }, /* Histogram */ + + /* Test period inversion */ + { 0, TA_MACD_TEST, 0, 251, 26, 12, 9, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ + 0, -1.9738, /* MACD */ + 0, -2.7071, /* Signal */ + 0, (-1.9738)-(-2.7071) }, /* Histogram */ + + /***********************/ + /* MACD - METASTOCK */ + /***********************/ + + /*******************************/ + /* MACDEXT - MIMIC CLASSIC */ + /*******************************/ + { 0, TA_MACDEXT_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ + 0, -1.9738, /* MACD */ + 0, -2.7071, /* Signal */ + 0, (-1.9738)-(-2.7071)}, /* Histogram */ + + /***************************/ + /* MACD FIX - CLASSIC */ + /***************************/ + + /***************************/ + /* MACD FIX - METASTOCK */ + /***************************/ + { 1, TA_MACDFIX_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ + 0, -1.2185, /* MACD */ + 0, -1.7119, /* Signal */ + 0, (-1.2185)-(-1.7119) }, /* Histogram */ + + { 0, TA_MACDFIX_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 33, 252-33, + 252-34, 0.8764, /* MACD */ + 252-34, 1.3533, /* Signal */ + 252-34, (0.8764)-(1.3533)}, /* Histogram */ + /* Test period inversion */ + { 0, TA_MACDFIX_TEST, 0, 251, 26, 12, 9, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 33, 252-33, + 252-34, 0.8764, /* MACD */ + 252-34, 1.3533, /* Signal */ + 252-34, (0.8764)-(1.3533)} /* Histogram */ + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_macd( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "TA_MACD Failed Bad Parameter for Test #%d (%d,%d)\n", + i, + tableTest[i].expectedNbElement, + history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "TA_MACD Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *dummyBuffer1, *dummyBuffer2; + TA_Real *out1, *out2, *out3; + + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + dummyBuffer1 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer1 ) + return TA_ALLOC_ERR; + + dummyBuffer2 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer2 ) + { + TA_Free( dummyBuffer1 ); + return TA_ALLOC_ERR; + } + + switch( outputNb ) + { + case 0: + out1 = outputBuffer; + out2 = dummyBuffer1; + out3 = dummyBuffer2; + break; + case 1: + out2 = outputBuffer; + out1 = dummyBuffer1; + out3 = dummyBuffer2; + break; + case 2: + out3 = outputBuffer; + out2 = dummyBuffer1; + out1 = dummyBuffer2; + break; + default: + TA_Free( dummyBuffer1 ); + TA_Free( dummyBuffer2 ); + return TA_BAD_PARAM; + } + + switch( testParam->test->testId ) + { + case TA_MACDFIX_TEST: + retCode = TA_MACDFIX( startIdx, + endIdx, + testParam->close, + testParam->test->optInSignalPeriod_2, + outBegIdx, outNbElement, + out1, out2, out3 ); + *lookback = TA_MACDFIX_Lookback( testParam->test->optInSignalPeriod_2 ); + break; + case TA_MACD_TEST: + retCode = TA_MACD( startIdx, + endIdx, + testParam->close, + testParam->test->optInFastPeriod, + testParam->test->optInSlowPeriod, + testParam->test->optInSignalPeriod_2, + outBegIdx, outNbElement, + out1, out2, out3 ); + + *lookback = TA_MACD_Lookback( testParam->test->optInFastPeriod, + testParam->test->optInSlowPeriod, + testParam->test->optInSignalPeriod_2 ); + break; + case TA_MACDEXT_TEST: + retCode = TA_MACDEXT( startIdx, + endIdx, + testParam->close, + testParam->test->optInFastPeriod, + TA_MAType_EMA, + testParam->test->optInSlowPeriod, + TA_MAType_EMA, + testParam->test->optInSignalPeriod_2, + TA_MAType_EMA, + outBegIdx, outNbElement, + out1, out2, out3 ); + + *lookback = TA_MACDEXT_Lookback( testParam->test->optInFastPeriod, + TA_MAType_EMA, + testParam->test->optInSlowPeriod, + TA_MAType_EMA, + testParam->test->optInSignalPeriod_2, + TA_MAType_EMA ); + break; + default: + retCode = TA_BAD_PARAM; + } + + TA_Free( dummyBuffer1 ); + TA_Free( dummyBuffer2 ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 0 ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + TA_SetCompatibility( (TA_Compatibility)test->compatibility ); + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + setInputBuffer( 3, history->close, history->nbBars ); + + CLEAR_EXPECTED_VALUE(0); + CLEAR_EXPECTED_VALUE(1); + CLEAR_EXPECTED_VALUE(2); + + /* Make a simple first call. */ + switch( test->testId ) + { + case TA_MACDFIX_TEST: + retCode = TA_MACDFIX( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1, + gBuffer[0].out2 ); + break; + case TA_MACD_TEST: + retCode = TA_MACD(test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInFastPeriod, + test->optInSlowPeriod, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1, + gBuffer[0].out2 ); + break; + case TA_MACDEXT_TEST: + retCode = TA_MACDEXT( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInFastPeriod, + TA_MAType_EMA, + test->optInSlowPeriod, + TA_MAType_EMA, + test->optInSignalPeriod_2, + TA_MAType_EMA, + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1, + gBuffer[0].out2 ); + break; + } + + + errNb = checkDataSame( gBuffer[0].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[0].out2, 2 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->testId ) + { + case TA_MACDFIX_TEST: + retCode = TA_MACDFIX( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[1].in, + gBuffer[1].out1, + gBuffer[1].out2 ); + break; + case TA_MACD_TEST: + retCode = TA_MACD(test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInFastPeriod, + test->optInSlowPeriod, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[1].in, + gBuffer[1].out1, + gBuffer[1].out2 ); + break; + case TA_MACDEXT_TEST: + retCode = TA_MACDEXT( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInFastPeriod, + TA_MAType_EMA, + test->optInSlowPeriod, + TA_MAType_EMA, + test->optInSignalPeriod_2, + TA_MAType_EMA, + &outBegIdx, &outNbElement, + gBuffer[1].in, + gBuffer[1].out1, + gBuffer[1].out2 ); + break; + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out2, 2 ); + + outBegIdx = outNbElement = 0; + + CLEAR_EXPECTED_VALUE(0); + CLEAR_EXPECTED_VALUE(1); + CLEAR_EXPECTED_VALUE(2); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->testId ) + { + case TA_MACDFIX_TEST: + retCode = TA_MACDFIX( + test->startIdx, + test->endIdx, + gBuffer[2].in, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[2].out1, + gBuffer[2].in, + gBuffer[2].out2 ); + break; + + case TA_MACD_TEST: + retCode = TA_MACD( + test->startIdx, + test->endIdx, + gBuffer[2].in, + test->optInFastPeriod, + test->optInSlowPeriod, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[2].out1, + gBuffer[2].in, + gBuffer[2].out2 ); + break; + case TA_MACDEXT_TEST: + retCode = TA_MACDEXT( + test->startIdx, + test->endIdx, + gBuffer[2].in, + test->optInFastPeriod, + TA_MAType_EMA, + test->optInSlowPeriod, + TA_MAType_EMA, + test->optInSignalPeriod_2, + TA_MAType_EMA, + &outBegIdx, &outNbElement, + gBuffer[2].out1, + gBuffer[2].in, + gBuffer[2].out2 ); + break; + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[1].out1, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].out1, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[2].in, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[2].out2, 2 ); + + outBegIdx = outNbElement = 0; + + CLEAR_EXPECTED_VALUE(0); + CLEAR_EXPECTED_VALUE(1); + CLEAR_EXPECTED_VALUE(2); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->testId ) + { + case TA_MACDFIX_TEST: + retCode = TA_MACDFIX( test->startIdx, + test->endIdx, + gBuffer[3].in, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[3].out1, + gBuffer[3].out2, + gBuffer[3].in ); + break; + case TA_MACD_TEST: + retCode = TA_MACD(test->startIdx, + test->endIdx, + gBuffer[3].in, + test->optInFastPeriod, + test->optInSlowPeriod, + test->optInSignalPeriod_2, + &outBegIdx, &outNbElement, + gBuffer[3].out1, + gBuffer[3].out2, + gBuffer[3].in ); + break; + case TA_MACDEXT_TEST: + retCode = TA_MACDEXT( test->startIdx, + test->endIdx, + gBuffer[3].in, + test->optInFastPeriod, + TA_MAType_EMA, + test->optInSlowPeriod, + TA_MAType_EMA, + test->optInSignalPeriod_2, + TA_MAType_EMA, + &outBegIdx, &outNbElement, + gBuffer[3].out1, + gBuffer[3].out2, + gBuffer[3].in ); + break; + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[2].out2, gBuffer[3].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[3].out1, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[3].out2, 1 ); + CHECK_EXPECTED_VALUE( gBuffer[3].in, 2 ); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_EMA, + (void *)&testParam, 3, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c new file mode 100644 index 000000000..58897482d --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c @@ -0,0 +1,833 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 122506 MF Add tests for MININDEX,MAXINDEX,MINMAX and MINMAXINDEX. + */ + +/* Description: + * Test the min/max related functions. + * + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_MIN_TEST, +TA_MAX_TEST, +TA_MINMAX_TEST, +TA_MININDEX_TEST, +TA_MAXINDEX_TEST, +TA_MINMAXINDEX_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Real *input; + unsigned int nbElement; +} TA_RefTest; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +static TA_RetCode referenceMin( TA_Integer startIdx, + TA_Integer endIdx, + const TA_Real inReal[], + TA_Integer optInTimePeriod, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Real outReal[] ); + +static TA_RetCode referenceMax( TA_Integer startIdx, + TA_Integer endIdx, + const TA_Real inReal[], + TA_Integer optInTimePeriod, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Real outReal[] ); + +static ErrorNumber testCompareToReference( const TA_Real *input, int nbElement ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /**********************/ + /* MIN TEST */ + /**********************/ + + /* No output value. */ + { 0, TA_MIN_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_MIN_TEST, 14, 14, 14, TA_SUCCESS, 0, 91.125, 14, 1}, + + /* Index too low test. */ + { 0, TA_MIN_TEST, 0, 15, 14, TA_SUCCESS, 0, 91.125, 13, 3}, + { 0, TA_MIN_TEST, 1, 15, 14, TA_SUCCESS, 0, 91.125, 13, 3}, + { 0, TA_MIN_TEST, 2, 16, 14, TA_SUCCESS, 0, 91.125, 13, 4}, + { 0, TA_MIN_TEST, 2, 16, 14, TA_SUCCESS, 1, 91.125, 13, 4}, + { 0, TA_MIN_TEST, 2, 16, 14, TA_SUCCESS, 2, 91.125, 13, 4}, + { 0, TA_MIN_TEST, 0, 14, 14, TA_SUCCESS, 0, 91.125, 13, 2}, + { 0, TA_MIN_TEST, 0, 13, 14, TA_SUCCESS, 0, 91.125, 13, 1}, + + /* Middle of data test. */ + { 0, TA_MIN_TEST, 20, 21, 14, TA_SUCCESS, 0, 89.345, 20, 2 }, + { 0, TA_MIN_TEST, 20, 21, 14, TA_SUCCESS, 1, 87.94, 20, 2 }, + + /* Misc tests: 2 and 14 periods */ + { 1, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, /* First Value */ + { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 1, 91.125, 13, 252-13 }, + { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 2, 91.125, 13, 252-13 }, + { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 3, 91.125, 13, 252-13 }, + { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 4, 89.75, 13, 252-13 }, + { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 252-14, 107.75, 13, 252-13 }, /* Last Value */ + + { 1, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 0, 91.5, 1, 252-1 }, /* First Value */ + { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 1, 91.5, 1, 252-1 }, + { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 2, 93.97, 1, 252-1 }, + { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 3, 93.97, 1, 252-1 }, + { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 4, 94.5, 1, 252-1 }, + { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 252-2, 109.19, 1, 252-1 }, /* Last Value */ + + /**********************/ + /* MAX TEST */ + /**********************/ + + /* One value tests. */ + { 0, TA_MAX_TEST, 14, 14, 14, TA_SUCCESS, 0, 98.815, 14, 1}, + + /* Index too low test. */ + { 0, TA_MAX_TEST, 0, 15, 14, TA_SUCCESS, 0, 98.815, 13, 3}, + { 0, TA_MAX_TEST, 1, 15, 14, TA_SUCCESS, 0, 98.815, 13, 3}, + { 0, TA_MAX_TEST, 2, 16, 14, TA_SUCCESS, 0, 98.815, 13, 4}, + { 0, TA_MAX_TEST, 2, 16, 14, TA_SUCCESS, 1, 98.815, 13, 4}, + { 0, TA_MAX_TEST, 2, 16, 14, TA_SUCCESS, 2, 98.815, 13, 4}, + { 0, TA_MAX_TEST, 0, 14, 14, TA_SUCCESS, 0, 98.815, 13, 2}, + { 0, TA_MAX_TEST, 0, 13, 14, TA_SUCCESS, 0, 98.815, 13, 1}, + + /* Middle of data test. */ + { 0, TA_MAX_TEST, 20, 21, 14, TA_SUCCESS, 0, 98.815, 20, 2 }, + { 0, TA_MAX_TEST, 20, 21, 14, TA_SUCCESS, 1, 98.815, 20, 2 }, + { 0, TA_MAX_TEST, 20, 99, 14, TA_SUCCESS, 6, 93.405, 20, 80 }, + { 0, TA_MAX_TEST, 20, 99, 14, TA_SUCCESS, 6, 93.405, 20, 80 }, + { 0, TA_MAX_TEST, 20, 99, 14, TA_SUCCESS, 13, 89.78, 20, 80 }, + + /* Misc tests: 1, 2 and 14 periods */ + { 1, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 0, 98.815, 13, 252-13 }, /* First Value */ + { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 1, 98.815, 13, 252-13 }, + { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 2, 98.815, 13, 252-13 }, + { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 3, 98.815, 13, 252-13 }, + { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 4, 98.815, 13, 252-13 }, + { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 252-14, 110.69, 13, 252-13 }, /* Last Value */ + + { 1, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 0, 92.5, 1, 252-1 }, /* First Value */ + { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 1, 95.155, 1, 252-1 }, + { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 2, 95.155, 1, 252-1 }, + { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 3, 95.5, 1, 252-1 }, + { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 4, 95.5, 1, 252-1 }, + { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 5, 95.0, 1, 252-1 }, + { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 252-2, 109.69, 1, 252-1 }, /* Last Value */ + + /*************************************/ + /* MINMAX and INDEX Functions tests */ + /*************************************/ + + /* Note: for now only range tests done on these */ + { 1, TA_MINMAX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, + { 1, TA_MINMAXINDEX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, + { 1, TA_MININDEX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, + { 1, TA_MAXINDEX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 } +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +static TA_Real testSerie1[] = {9,8,7,6,5}; +static TA_Real testSerie2[] = {3,7,9,10,15,33,50}; +static TA_Real testSerie3[] = {0,0,0,1,2,0,0,0}; +static TA_Real testSerie4[] = {0,0,0,2,1,0,0,0}; +static TA_Real testSerie5[] = {2,0,0,0,0,0,0,0}; +static TA_Real testSerie6[] = {0,0,0,0,0,0,0,1}; +static TA_Real testSerie7[] = {-3,2}; +static TA_Real testSerie8[] = {2,-2}; +static TA_Real testSerie9[] = {4,2,3}; +static TA_Real testSerie10[] = {3,3,-3,2,-1,0,2}; + +static TA_RefTest tableRefTest[] = +{ + {testSerie1, sizeof(testSerie1)/sizeof(TA_Real)}, + {testSerie2, sizeof(testSerie2)/sizeof(TA_Real)}, + {testSerie3, sizeof(testSerie3)/sizeof(TA_Real)}, + {testSerie4, sizeof(testSerie4)/sizeof(TA_Real)}, + {testSerie5, sizeof(testSerie5)/sizeof(TA_Real)}, + {testSerie6, sizeof(testSerie6)/sizeof(TA_Real)}, + {testSerie7, sizeof(testSerie7)/sizeof(TA_Real)}, + {testSerie8, sizeof(testSerie8)/sizeof(TA_Real)}, + {testSerie9, sizeof(testSerie10)/sizeof(TA_Real)} +}; + +#define NB_TEST_REF (sizeof(tableRefTest)/sizeof(TA_RefTest)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_minmax( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* Do tests against a local reference which is the non-optimized implementation */ + for( i=0; i < NB_TEST_REF; i++ ) + { + retValue = testCompareToReference( tableRefTest[i].input, + tableRefTest[i].nbElement ); + if( retValue != 0 ) + { + printf( "%s Failed Ref Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *dummyBufferReal; + TA_Real *out1Real; + TA_Real *out2Real; + + TA_Integer *dummyBufferInt; + TA_Integer *out1Int; + TA_Integer *out2Int; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + dummyBufferReal = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBufferReal ) + return TA_ALLOC_ERR; + + dummyBufferInt = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Integer)); + if( !dummyBufferInt ) + { + TA_Free( dummyBufferReal ); + return TA_ALLOC_ERR; + } + + switch( outputNb ) + { + case 0: + out1Real = outputBuffer; + out2Real = dummyBufferReal; + out1Int = outputBufferInt; + out2Int = dummyBufferInt; + break; + case 1: + out1Real = dummyBufferReal; + out2Real = outputBuffer; + out1Int = dummyBufferInt; + out2Int = outputBufferInt; + break; + default: + TA_Free( dummyBufferReal ); + return TA_BAD_PARAM; + } + + switch( testParam->test->theFunction ) + { + case TA_MIN_TEST: + retCode = TA_MIN( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_MIN_Lookback( testParam->test->optInTimePeriod ); + break; + + case TA_MAX_TEST: + retCode = TA_MAX( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_MAX_Lookback( testParam->test->optInTimePeriod ); + break; + + case TA_MINMAX_TEST: + retCode = TA_MINMAX( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + out1Real, out2Real ); + *lookback = TA_MINMAX_Lookback( testParam->test->optInTimePeriod ); + break; + + case TA_MINMAXINDEX_TEST: + retCode = TA_MINMAXINDEX( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + out1Int, out2Int ); + *lookback = TA_MINMAXINDEX_Lookback( testParam->test->optInTimePeriod ); + *isOutputInteger = 1; + break; + + case TA_MININDEX_TEST: + retCode = TA_MININDEX( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + out1Int ); + *lookback = TA_MININDEX_Lookback( testParam->test->optInTimePeriod ); + *isOutputInteger = 1; + break; + + case TA_MAXINDEX_TEST: + retCode = TA_MAXINDEX( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + out1Int ); + *lookback = TA_MAXINDEX_Lookback( testParam->test->optInTimePeriod ); + *isOutputInteger = 1; + break; + + default: + retCode = TA_INTERNAL_ERROR(129); + break; + } + + TA_Free( dummyBufferReal ); + TA_Free( dummyBufferInt ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->open, history->nbBars ); + setInputBuffer( 1, history->open, history->nbBars ); + + CLEAR_EXPECTED_VALUE(0); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + + /* Make a simple first call. */ + if( test->theFunction == TA_MIN_TEST ) + { + retCode = TA_MIN( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + else if( test->theFunction == TA_MAX_TEST ) + { + retCode = TA_MAX( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + else + { + /* For now, tests only MIN and MAX. Only range check tests implemented. */ + return TA_TEST_PASS; + } + + errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + CLEAR_EXPECTED_VALUE(0); + if( test->theFunction == TA_MIN_TEST ) + { + retCode = TA_MIN( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + else if( test->theFunction == TA_MAX_TEST ) + { + retCode = TA_MAX( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + + return TA_TEST_PASS; +} + + +/* These reference functions were the original non-optimized + * version of TA_MIN and TA_MAX. + * + * TA-Lib might implement a faster algorithm, at the cost + * of complexity. Consequently, it is important to verify the + * equivalence between the optimize and non-optimized version. + */ +static TA_RetCode referenceMin( TA_Integer startIdx, + TA_Integer endIdx, + const TA_Real inReal[], + TA_Integer optInTimePeriod, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Real outReal[] ) +{ + TA_Real lowest, tmp; + TA_Integer outIdx, nbInitialElementNeeded; + TA_Integer trailingIdx, today, i; + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + *outBegIdx = 0; + *outNbElement = 0; + return TA_SUCCESS; + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + + while( today <= endIdx ) + { + lowest = inReal[trailingIdx++]; + for( i=trailingIdx; i <= today; i++ ) + { + tmp = inReal[i]; + if( tmp < lowest) lowest= tmp; + } + + outReal[outIdx++] = lowest; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + *outBegIdx = startIdx; + *outNbElement = outIdx; + + return TA_SUCCESS; +} + +static TA_RetCode referenceMax( TA_Integer startIdx, + TA_Integer endIdx, + const TA_Real inReal[], + TA_Integer optInTimePeriod, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Real outReal[] ) +{ + /* Insert local variables here. */ + TA_Real highest, tmp; + TA_Integer outIdx, nbInitialElementNeeded; + TA_Integer trailingIdx, today, i; + + +#ifndef TA_FUNC_NO_RANGE_CHECK + + /* Validate the requested output range. */ + if( startIdx < 0 ) + return TA_OUT_OF_RANGE_START_INDEX; + if( (endIdx < 0) || (endIdx < startIdx)) + return TA_OUT_OF_RANGE_END_INDEX; + + /* Validate the parameters. */ + if( !inReal ) return TA_BAD_PARAM; + /* min/max are checked for optInTimePeriod. */ + if( optInTimePeriod == TA_INTEGER_DEFAULT ) + optInTimePeriod = 30; + + if( outReal == NULL ) + return TA_BAD_PARAM; + +#endif /* TA_FUNC_NO_RANGE_CHECK */ + + /* Insert TA function code here. */ + + /* Identify the minimum number of price bar needed + * to identify at least one output over the specified + * period. + */ + nbInitialElementNeeded = (optInTimePeriod-1); + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < nbInitialElementNeeded ) + startIdx = nbInitialElementNeeded; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + *outBegIdx = 0; + *outNbElement = 0; + return TA_SUCCESS; + } + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + today = startIdx; + trailingIdx = startIdx-nbInitialElementNeeded; + + while( today <= endIdx ) + { + highest = inReal[trailingIdx++]; + for( i=trailingIdx; i <= today; i++ ) + { + tmp = inReal[i]; + if( tmp > highest ) highest = tmp; + } + + outReal[outIdx++] = highest; + today++; + } + + /* Keep the outBegIdx relative to the + * caller input before returning. + */ + *outBegIdx = startIdx; + *outNbElement = outIdx; + + return TA_SUCCESS; +} + +static ErrorNumber testCompareToReference( const TA_Real *input, int nbElement ) +{ + TA_Integer outBegIdx, outNbElement; + TA_RetCode retCode; + + TA_Integer outBegIdxRef, outNbElementRef; + TA_RetCode retCodeRef; + + int period, startIdx, endIdx, testNb; + + ErrorNumber errNb; + + outBegIdxRef = outNbElementRef = -1; + + /* Do a systematic tests, even for failure cases. */ + for( testNb=0; testNb <= 1; testNb++ ) /* 0=TA_MIN, 1=TA_MAX */ + { + for( period=2; period <= nbElement; period++ ) + { + for( startIdx=0; startIdx < nbElement; startIdx++ ) + { + for( endIdx=0; (endIdx < nbElement) && (startIdx <= endIdx); endIdx++ ) + { + /* Set to NAN all the elements of the gBuffers. + * Note: These buffer are used as an attempt to detect + * out-of-bound writing in the output. + */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, input, nbElement ); + + /* Get the reference output. */ + if( testNb == 0 ) + retCodeRef = referenceMin( startIdx, endIdx, input, period, + &outBegIdxRef, &outNbElementRef, gBuffer[0].out0 ); + else + retCodeRef = referenceMax( startIdx, endIdx, input, period, + &outBegIdxRef, &outNbElementRef, gBuffer[0].out0 ); + + /* Verify that the input was preserved */ + errNb = checkDataSame( gBuffer[0].in, input, nbElement ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Get the TA-Lib implementation output. */ + if( testNb == 0 ) + retCode = TA_MIN( startIdx, endIdx, input, period, + &outBegIdx, &outNbElement, gBuffer[1].out0 ); + else + retCode = TA_MAX( startIdx, endIdx, input, period, + &outBegIdx, &outNbElement, gBuffer[1].out0 ); + + /* Verify that the input was preserved */ + errNb = checkDataSame( gBuffer[0].in, input, nbElement ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The reference and TA-LIB should have the same output. */ + if( retCode != retCodeRef ) + { + printf( "Failure: retCode != retCodeRef\n" ); + return TA_REGTEST_OPTIMIZATION_REF_ERROR; + } + + if( outBegIdx != outBegIdxRef ) + { + printf( "Failure: outBegIdx != outBegIdxRef\n" ); + return TA_REGTEST_OPTIMIZATION_REF_ERROR; + } + + if( outNbElement != outNbElementRef ) + { + printf( "Failure: outNbElement != outNbElementRef\n" ); + return TA_REGTEST_OPTIMIZATION_REF_ERROR; + } + + /* checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].out0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + + if( retCode == TA_SUCCESS ) + { + /* Make another test using the same input/output buffer. + * The output should still be the same. + */ + if( testNb == 0 ) + retCode = TA_MIN( startIdx, endIdx, gBuffer[0].in, period, + &outBegIdx, &outNbElement, gBuffer[0].in ); + else + retCode = TA_MAX( startIdx, endIdx, gBuffer[0].in, period, + &outBegIdx, &outNbElement, gBuffer[0].in ); + + /* The reference and TA-LIB should have the same output. */ + if( retCode != retCodeRef ) + { + printf( "Failure: retCode != retCodeRef (2)\n" ); + return TA_REGTEST_OPTIMIZATION_REF_ERROR; + } + + if( outBegIdx != outBegIdxRef ) + { + printf( "Failure: outBegIdx != outBegIdxRef (2)\n" ); + return TA_REGTEST_OPTIMIZATION_REF_ERROR; + } + + if( outNbElement != outNbElementRef ) + { + printf( "Failure: outNbElement != outNbElementRef (2)\n" ); + return TA_REGTEST_OPTIMIZATION_REF_ERROR; + } + + /* checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + } + } + } + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c new file mode 100644 index 000000000..d6b9e37c5 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c @@ -0,0 +1,553 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Test the momentum functions + * + * The interpretation of the rate of change varies widely depending + * which software and/or books you are refering to. + * + * The following is the table of Rate-Of-Change implemented in TA-LIB: + * MOM = (price - prevPrice) [Momentum] + * ROC = ((price/prevPrice)-1)*100 [Rate of change] + * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] + * ROCR = (price/prevPrice) [Rate of change ratio] + * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] + * + * Here are the equivalent function in other software: + * TA-Lib | Tradestation | Metastock + * ================================================= + * MOM | Momentum | ROC (Point) + * ROC | ROC | ROC (Percent) + * ROCP | PercentChange | - + * ROCR | - | - + * ROCR100 | - | MO + * + * The MOM function is the only one who is not normalized, and thus + * should be avoided for comparing different time serie of prices. + * + * ROC and ROCP are centered at zero and can have positive and negative + * value. Here are some equivalence: + * ROC = ROCP/100 + * = ((price-prevPrice)/prevPrice)/100 + * = ((price/prevPrice)-1)*100 + * + * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are + * always positive values. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_MOM_TEST, +TA_ROC_TEST, +TA_ROCP_TEST, +TA_ROCR_TEST, +TA_ROCR100_TEST } TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + TA_TestId theFunction; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /**********************/ + /* MOM TEST */ + /**********************/ + +#ifndef TA_FUNC_NO_RANGE_CHECK + /* Test out of range. */ + { 0, TA_MOM_TEST, -1, 3, 14, TA_OUT_OF_RANGE_START_INDEX, 0, 0, 0, 0}, + { 0, TA_MOM_TEST, 3, -1, 14, TA_OUT_OF_RANGE_END_INDEX, 0, 0, 0, 0}, + { 0, TA_MOM_TEST, 4, 3, 14, TA_OUT_OF_RANGE_END_INDEX, 0, 0, 0, 0}, +#endif + + { 1, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 0, -0.50, 14, 252-14 }, /* First Value */ + { 0, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 1, -2.00, 14, 252-14 }, + { 0, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 2, -5.22, 14, 252-14 }, + { 0, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 252-15, -1.13, 14, 252-14 }, /* Last Value */ + + /* No output value. */ + { 0, TA_MOM_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_MOM_TEST, 14, 14, 14, TA_SUCCESS, 0, -0.50, 14, 1}, + + /* Index too low test. */ + { 0, TA_MOM_TEST, 0, 15, 14, TA_SUCCESS, 0, -0.50, 14, 2}, + { 0, TA_MOM_TEST, 1, 15, 14, TA_SUCCESS, 0, -0.50, 14, 2}, + { 0, TA_MOM_TEST, 2, 16, 14, TA_SUCCESS, 0, -0.50, 14, 3}, + { 0, TA_MOM_TEST, 2, 16, 14, TA_SUCCESS, 1, -2.00, 14, 3}, + { 0, TA_MOM_TEST, 2, 16, 14, TA_SUCCESS, 2, -5.22, 14, 3}, + { 0, TA_MOM_TEST, 0, 14, 14, TA_SUCCESS, 0, -0.50, 14, 1}, + { 0, TA_MOM_TEST, 0, 13, 14, TA_SUCCESS, 0, -0.50, 14, 0}, + + /* Middle of data test. */ + { 0, TA_MOM_TEST, 20, 21, 14, TA_SUCCESS, 0, -4.15, 20, 2 }, + { 0, TA_MOM_TEST, 20, 21, 14, TA_SUCCESS, 1, -5.12, 20, 2 }, + + /**********************/ + /* ROC TEST */ + /**********************/ + { 1, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 0, -0.546, 14, 252-14 }, /* First Value */ + { 0, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 1, -2.109, 14, 252-14 }, + { 0, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 2, -5.53, 14, 252-14 }, + { 0, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 252-15, -1.0367, 14, 252-14 }, /* Last Value */ + + /* No output value. */ + { 0, TA_ROC_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_ROC_TEST, 14, 14, 14, TA_SUCCESS, 0, -0.546, 14, 1}, + + /* Index too low test. */ + { 0, TA_ROC_TEST, 0, 15, 14, TA_SUCCESS, 0, -0.546, 14, 2}, + { 0, TA_ROC_TEST, 1, 15, 14, TA_SUCCESS, 0, -0.546, 14, 2}, + { 0, TA_ROC_TEST, 2, 16, 14, TA_SUCCESS, 0, -0.546, 14, 3}, + { 0, TA_ROC_TEST, 2, 16, 14, TA_SUCCESS, 1, -2.109, 14, 3}, + { 0, TA_ROC_TEST, 2, 16, 14, TA_SUCCESS, 2, -5.53, 14, 3}, + { 0, TA_ROC_TEST, 0, 14, 14, TA_SUCCESS, 0, -0.546, 14, 1}, + { 0, TA_ROC_TEST, 0, 13, 14, TA_SUCCESS, 0, -0.546, 14, 0}, + + /* Middle of data test. */ + { 0, TA_ROC_TEST, 20, 21, 14, TA_SUCCESS, 0, -4.49, 20, 2 }, + { 0, TA_ROC_TEST, 20, 21, 14, TA_SUCCESS, 1, -5.5256, 20, 2 }, + + + /**********************/ + /* ROCR TEST */ + /**********************/ + { 1, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 0, 0.994536, 14, 252-14 }, /* First Value */ + { 0, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 1, 0.978906, 14, 252-14 }, + { 0, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 2, 0.944689, 14, 252-14 }, + { 0, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 0.989633, 14, 252-14 }, /* Last Value */ + + /* No output value. */ + { 0, TA_ROCR_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_ROCR_TEST, 14, 14, 14, TA_SUCCESS, 0, 0.994536, 14, 1}, + + /* Index too low test. */ + { 0, TA_ROCR_TEST, 0, 15, 14, TA_SUCCESS, 0, 0.994536, 14, 2}, + { 0, TA_ROCR_TEST, 1, 15, 14, TA_SUCCESS, 0, 0.994536, 14, 2}, + { 0, TA_ROCR_TEST, 2, 16, 14, TA_SUCCESS, 0, 0.994536, 14, 3}, + { 0, TA_ROCR_TEST, 2, 16, 14, TA_SUCCESS, 1, 0.978906, 14, 3}, + { 0, TA_ROCR_TEST, 2, 16, 14, TA_SUCCESS, 2, 0.944689, 14, 3}, + { 0, TA_ROCR_TEST, 0, 14, 14, TA_SUCCESS, 0, 0.994536, 14, 1}, + { 0, TA_ROCR_TEST, 0, 13, 14, TA_SUCCESS, 0, 0.994536, 14, 0}, + + /* Middle of data test. */ + { 0, TA_ROCR_TEST, 20, 21, 14, TA_SUCCESS, 0, 0.955096, 20, 2 }, + { 0, TA_ROCR_TEST, 20, 21, 14, TA_SUCCESS, 1, 0.944744, 20, 2 }, + + /**********************/ + /* ROCR100 TEST */ + /**********************/ + { 1, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 0, 99.4536, 14, 252-14 }, /* First Value */ + { 0, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 1, 97.8906, 14, 252-14 }, + { 0, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 2, 94.4689, 14, 252-14 }, + { 0, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 98.9633, 14, 252-14 }, /* Last Value */ + + /* No output value. */ + { 0, TA_ROCR100_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_ROCR100_TEST, 14, 14, 14, TA_SUCCESS, 0, 99.4536, 14, 1}, + + /* Index too low test. */ + { 0, TA_ROCR100_TEST, 0, 15, 14, TA_SUCCESS, 0, 99.4536, 14, 2}, + { 0, TA_ROCR100_TEST, 1, 15, 14, TA_SUCCESS, 0, 99.4536, 14, 2}, + { 0, TA_ROCR100_TEST, 2, 16, 14, TA_SUCCESS, 0, 99.4536, 14, 3}, + { 0, TA_ROCR100_TEST, 2, 16, 14, TA_SUCCESS, 1, 97.8906, 14, 3}, + { 0, TA_ROCR100_TEST, 2, 16, 14, TA_SUCCESS, 2, 94.4689, 14, 3}, + { 0, TA_ROCR100_TEST, 0, 14, 14, TA_SUCCESS, 0, 99.4536, 14, 1}, + { 0, TA_ROCR100_TEST, 0, 13, 14, TA_SUCCESS, 0, 99.4536, 14, 0}, + + /* Middle of data test. */ + { 0, TA_ROCR100_TEST, 20, 21, 14, TA_SUCCESS, 0, 95.5096, 20, 2 }, + { 0, TA_ROCR100_TEST, 20, 21, 14, TA_SUCCESS, 1, 94.4744, 20, 2 } + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_mom_roc( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + switch( testParam->test->theFunction ) + { + case TA_MOM_TEST: + retCode = TA_MOM( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_MOM_Lookback(testParam->test->optInTimePeriod ); + break; + case TA_ROC_TEST: + retCode = TA_ROC( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ROC_Lookback(testParam->test->optInTimePeriod ); + break; + case TA_ROCR_TEST: + retCode = TA_ROCR( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ROCR_Lookback(testParam->test->optInTimePeriod ); + break; + case TA_ROCR100_TEST: + retCode = TA_ROCR100( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ROCR100_Lookback(testParam->test->optInTimePeriod ); + break; + case TA_ROCP_TEST: + retCode = TA_ROCP( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ROCP_Lookback(testParam->test->optInTimePeriod ); + break; + default: + retCode = TA_INTERNAL_ERROR(130); + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + + CLEAR_EXPECTED_VALUE(0); + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_MOM_TEST: + retCode = TA_MOM( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_ROC_TEST: + retCode = TA_ROC( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + case TA_ROCR_TEST: + retCode = TA_ROCR( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + case TA_ROCR100_TEST: + retCode = TA_ROCR100( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_ROCP_TEST: + retCode = TA_ROCP( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + default: + retCode = TA_BAD_PARAM; + } + + errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + CLEAR_EXPECTED_VALUE(0); + switch( test->theFunction ) + { + case TA_MOM_TEST: + retCode = TA_MOM( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_ROC_TEST: + retCode = TA_ROC( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_ROCR_TEST: + retCode = TA_ROCR( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_ROCR100_TEST: + retCode = TA_ROCR100( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_ROCP_TEST: + retCode = TA_ROCP( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + } + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( + rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c new file mode 100644 index 000000000..0dd5004e0 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c @@ -0,0 +1,307 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Test functions that have one output and takes a period and + * basically use only an EMA in its algorithm. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_TRIX_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex; + TA_Real oneOfTheExpectedOutReal; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test_per_ema( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /****************/ + /* TRIX TEST */ + /****************/ + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 0, 0.2589, 13, 252-13 }, /* First Value */ + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 1, 0.010495, 13, 252-13 }, + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-15, -0.058, 13, 252-13 }, + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-14, -0.095, 13, 252-13 }, /* Last Value */ + +#if 0 + /* Metastock values. */ + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 0, 0.221, 13, 252-13 }, /* First Value */ + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 1, -0.009, 13, 252-13 }, + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-15, -0.058, 13, 252-13 }, + { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-14, -0.095, 13, 252-13 }, /* Last Value */ +#endif + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_per_ema( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "TA_MA Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test_per_ema( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "TA_MA Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + switch( testParam->test->theFunction ) + { + case TA_TRIX_TEST: + retCode = TA_TRIX( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_TRIX_Lookback( testParam->test->optInTimePeriod ); + break; + default: + retCode = TA_INTERNAL_ERROR(131); + } + + return retCode; +} + +static ErrorNumber do_test_per_ema( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + + /* Set the unstable period requested for that test. */ + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_TRIX_TEST: + retCode = TA_TRIX( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + + } + + errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[0].out0, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_TRIX_TEST: + retCode = TA_TRIX( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + + /* The previous call to TA_MA should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[1].in, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_EMA, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c new file mode 100644 index 000000000..f3236de95 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c @@ -0,0 +1,640 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 020203 MF First version. + * 122506 MF Add TA_BETA tests. + */ + +/* Description: + * + * Test functions which have the following characterisic: + * - two inputs are needed (high and low are used here). + * - has zero or one parameter being a period. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_AROON_UP_TEST, +TA_AROON_DOWN_TEST, +TA_AROONOSC_TEST, +TA_CORREL_TEST, +TA_BETA_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer startIdx; + TA_Integer endIdx; + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *high; + const TA_Real *low; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*****************/ + /* BETA TEST */ + /*****************/ + + /* Uncomment following to enable tons of tests. Replace 999.99 with the first + * value you are expecting. + */ + + { 1, TA_BETA_TEST, 0, 251, 5, TA_SUCCESS, 0, 0.62907, 5, 252-5 }, + { 0, TA_BETA_TEST, 0, 251, 5, TA_SUCCESS, 1, 0.83604, 5, 252-5 }, + + /*****************/ + /* CORREL TEST */ + /*****************/ + { 1, TA_CORREL_TEST, 0, 251, 20, TA_SUCCESS, 0, 0.9401569, 19, 252-19 }, /* First Value */ + { 0, TA_CORREL_TEST, 0, 251, 20, TA_SUCCESS, 1, 0.9471812, 19, 252-19 }, + { 0, TA_CORREL_TEST, 0, 251, 20, TA_SUCCESS, 252-20, 0.8866901, 19, 252-19 }, /* Last Value */ + + + /*******************/ + /* AROON UP TEST */ + /*******************/ + { 1, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 0, 78.571, 14, 252-14 }, /* First Value */ + { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 1, 71.429, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 2, 64.2857, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 3, 57.143, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 4, 50.000, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 5, 42.857, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 6, 35.714, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 7, 28.571, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 8, 21.429, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 9, 14.286, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 10, 7.1429, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 11, 0.0000, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 12, 0.0000, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 13, 21.429, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 14, 14.286, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 15, 7.1429, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 16, 0.0000, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 17, 14.286, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 20, 0.00, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 21, 92.857, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 27, 50.000, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 28, 42.857, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 29,100.000, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 1, 251, 14, TA_SUCCESS, 252-16, 0.0, 14, 252-14 }, + { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 7.1429, 14, 252-14 }, /* Last Value */ + + /*******************/ + /* AROON DOWN TEST */ + /*******************/ + { 1, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 0, 100.0, 14, 252-14 }, /* First Value */ + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 1, 92.857, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 2, 85.714, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 3, 78.571, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 4, 71.429, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 5, 64.286, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 6, 57.143, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 7,100.000, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 8,100.000, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 9,100.000, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 10,100.000, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 11,100.000, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 12, 92.857, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 13, 85.714, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 14, 78.571, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 15, 71.429, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 16, 64.286, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 17, 57.143, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 18, 50.000, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 19, 42.857, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 20, 35.714, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 21, 28.571, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 22, 21.429, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 23, 14.286, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 24, 7.1429, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 25, 0.0, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 26, 0.0, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 27, 92.857, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 28, 85.714, 14, 252-14 }, + + { 0, TA_AROON_DOWN_TEST, 4, 251, 14, TA_SUCCESS, 252-16, 28.571, 14, 252-14 }, + { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 21.429, 14, 252-14 }, /* Last Value */ + + /******************/ + /* AROON OSC TEST */ + /******************/ + { 0, TA_AROONOSC_TEST, 13, 251, 14, TA_SUCCESS, 0, -21.4285, 14, 252-14 }, /* First Value */ + { 0, TA_AROONOSC_TEST, 13, 251, 14, TA_SUCCESS, 6, -21.4285, 14, 252-14 }, + { 0, TA_AROONOSC_TEST, 13, 251, 14, TA_SUCCESS, 7, -71.4285, 14, 252-14 }, + { 0, TA_AROONOSC_TEST, 0, 251, 14, TA_SUCCESS, 252-16, -28.5714, 14, 252-14 }, + { 0, TA_AROONOSC_TEST, 0, 251, 14, TA_SUCCESS, 252-15, -14.28571, 14, 252-14 }, /* Last Value */ + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_per_hl( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + double *dummyBuffer; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + /* Allocate a buffer for the output who is going + * to be ignored (make it slightly larger to play + * safe) + */ + dummyBuffer = TA_Malloc( sizeof(double) * (endIdx-startIdx+100) ); + switch( testParam->test->theFunction ) + { + case TA_AROON_UP_TEST: + retCode = TA_AROON( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + &dummyBuffer[20], + outputBuffer ); + + *lookback = TA_AROON_Lookback( testParam->test->optInTimePeriod ); + break; + case TA_AROON_DOWN_TEST: + retCode = TA_AROON( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer, + &dummyBuffer[20] + ); + *lookback = TA_AROON_Lookback( testParam->test->optInTimePeriod ); + break; + case TA_AROONOSC_TEST: + retCode = TA_AROONOSC( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_AROONOSC_Lookback( testParam->test->optInTimePeriod ); + break; + case TA_CORREL_TEST: + retCode = TA_CORREL( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_CORREL_Lookback( testParam->test->optInTimePeriod ); + break; + + case TA_BETA_TEST: + retCode = TA_BETA( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->test->optInTimePeriod, /* time period */ + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_BETA_Lookback(testParam->test->optInTimePeriod); + break; + + default: + retCode = TA_INTERNAL_ERROR(132); + } + + TA_Free( dummyBuffer ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_AROON_UP_TEST: + retCode = TA_AROON( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].out0, + gBuffer[0].out0 + ); + break; + + case TA_AROON_DOWN_TEST: + retCode = TA_AROON( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0, + gBuffer[1].out0 + ); + break; + + case TA_AROONOSC_TEST: + retCode = TA_AROONOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 + ); + break; + + case TA_CORREL_TEST: + retCode = TA_CORREL( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 + ); + break; + + case TA_BETA_TEST: + retCode = TA_BETA( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 + ); + break; + + default: + retCode = TA_INTERNAL_ERROR(133); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where one of the input and one of the output + * are the same buffer. + */ + switch( test->theFunction ) + { + case TA_AROON_UP_TEST: + retCode = TA_AROON( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].out1, + gBuffer[0].in + ); + break; + + case TA_AROON_DOWN_TEST: + retCode = TA_AROON( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in, + gBuffer[1].out1 + ); + break; + + case TA_AROONOSC_TEST: + retCode = TA_AROONOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + + case TA_CORREL_TEST: + retCode = TA_CORREL( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + + case TA_BETA_TEST: + retCode = TA_BETA( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in + ); + break; + + default: + retCode = TA_INTERNAL_ERROR(134); + } + + /* Check that the other input was preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkSameContent( gBuffer[1].out1, gBuffer[1].out0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_AROON_UP_TEST: + retCode = TA_AROON( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].out2, + gBuffer[1].in + ); + break; + + case TA_AROON_DOWN_TEST: + retCode = TA_AROON( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in, + gBuffer[1].out2 + ); + break; + + case TA_AROONOSC_TEST: + retCode = TA_AROONOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in + ); + break; + + case TA_CORREL_TEST: + retCode = TA_CORREL( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in + ); + break; + + case TA_BETA_TEST: + retCode = TA_BETA( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in + ); + break; + + default: + retCode = TA_INTERNAL_ERROR(135); + } + + /* Check that the other input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.high = history->high; + testParam.low = history->low; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c new file mode 100644 index 000000000..3b17a6083 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c @@ -0,0 +1,651 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 061904 MF Add test to detect cumulative errors in CCI algorithm + * when some values were close to zero (epsilon). + * 021106 MF Add tests for ULTOSC. + * 042206 MF Add tests for NATR + * 120507 MF Add tests for ACCBANDS + * + */ + +/* Description: + * + * Test functions which have the following characteristic: + * - the input arrays are high, low and close. + * - the only parameter is a period. + * + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_CCI_TEST, +TA_WILLR_TEST, +TA_ULTOSC_TEST, +TA_NATR_TEST, +TA_ACCBANDS_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod1; + TA_Integer optInTimePeriod2; + TA_Integer optInTimePeriod3; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*****************/ + /* ACCBANDS TEST */ + /*****************/ + { 1, TA_ACCBANDS_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 0, 93.8575, 13, 252-13 }, + + /****************/ + /* NATR TEST */ + /****************/ + /* TODO Analyze further why NATR requires a very large unstable period. + * for now, just disable range testing. + */ + { 0, TA_NATR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 0, 3.9321, 14, 252-14 }, + { 0, TA_NATR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 1, 3.7576, 14, 252-14 }, + { 0, TA_NATR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 252-15, 3.0229, 14, 252-14 }, + + /****************/ + /* ULTOSC TEST */ + /****************/ + { 0, TA_ULTOSC_TEST, 0, 251, 7, 14, 28, TA_SUCCESS, 0, 47.1713, 28, 252-28 }, + { 0, TA_ULTOSC_TEST, 0, 251, 7, 14, 28, TA_SUCCESS, 1, 46.2802, 28, 252-28 }, + { 1, TA_ULTOSC_TEST, 0, 251, 7, 14, 28, TA_SUCCESS, 252-29, 40.0854, 28, 252-28 }, + + + /****************/ + /* WILLR TEST */ + /****************/ + { 0, TA_WILLR_TEST, 13, 251, 14, 0, 0, TA_SUCCESS, 1, -66.9903, 13, 252-13 }, /* First Value */ + { 1, TA_WILLR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 0, -90.1943, 13, 252-13 }, + { 0, TA_WILLR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 112, 0.0, 13, 252-13 }, + + { 0, TA_WILLR_TEST, 24, 24, 14, 0, 0, TA_SUCCESS, 0, -89.2857, 24, 1 }, + { 0, TA_WILLR_TEST, 25, 25, 14, 0, 0, TA_SUCCESS, 0, -97.2602, 25, 1 }, + { 0, TA_WILLR_TEST, 26, 26, 14, 0, 0, TA_SUCCESS, 0, -71.5482, 26, 1 }, + + { 0, TA_WILLR_TEST, 251, 251, 14, 0, 0, TA_SUCCESS, 0, -59.1515, 251, 1 }, + { 0, TA_WILLR_TEST, 14, 251, 14, 0, 0, TA_SUCCESS, 252-15, -59.1515, 14, 252-14 }, + + /****************/ + /* CCI TEST */ + /****************/ + + /* The following two should always be identical. */ + { 0, TA_CCI_TEST, 186,187, 2, 0, 0, TA_SUCCESS, 1, 0.0, 186, 2 }, + { 0, TA_CCI_TEST, 187,187, 2, 0, 0, TA_SUCCESS, 0, 0.0, 187, 1 }, + + /* Test period 2, 5 and 11 */ + { 0, TA_CCI_TEST, 0, 251, 2, 0, 0, TA_SUCCESS, 0, 66.666, 1, 252-1 }, + { 1, TA_CCI_TEST, 0, 251, 5, 0, 0, TA_SUCCESS, 0, 18.857, 4, 252-4 }, + + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 0, 87.927, 10, 252-10 }, /* First Value */ + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 1, 180.005, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 2, 143.5190963, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 3, -113.8669783, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 4, -111.064497, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 5, -26.77393309, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 6, -70.77933765, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 7, -83.15662884, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 8, -41.14421073, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 9, -49.63059589, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 10, -86.45142995, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 11, -105.6275799, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 12, -157.698269, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 13, -190.5251436, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 14, -142.8364298, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 15, -122.4448056, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 16, -79.95100041, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 17, 22.03829204, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 18, 7.765575065, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 19, 32.38905945, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 20, -0.005587727, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 21, 43.84607294, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 22, 40.35152301, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 23, 92.89237535, 10, 252-10 }, + { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 24, 113.4778681, 10, 252-10 }, + { 1, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 252-11, -169.65514, 10, 252-10 }, /* Last Value */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_per_hlc( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *dummyBuffer1, *dummyBuffer2; + TA_Real *out1, *out2, *out3; + + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + if( testParam->test->theFunction != TA_ACCBANDS_TEST ) + { + out1 = out2 = out3 = NULL; + dummyBuffer1 = NULL; + dummyBuffer2 = NULL; + } + else + { + dummyBuffer1 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer1 ) + return TA_ALLOC_ERR; + + dummyBuffer2 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer2 ) + { + TA_Free( dummyBuffer1 ); + return TA_ALLOC_ERR; + } + + switch( outputNb ) + { + case 0: + out1 = outputBuffer; + out2 = dummyBuffer1; + out3 = dummyBuffer2; + break; + case 1: + out2 = outputBuffer; + out1 = dummyBuffer1; + out3 = dummyBuffer2; + break; + case 2: + out3 = outputBuffer; + out2 = dummyBuffer1; + out1 = dummyBuffer2; + break; + default: + TA_Free( dummyBuffer1 ); + TA_Free( dummyBuffer2 ); + return TA_BAD_PARAM; + } + } + + switch( testParam->test->theFunction ) + { + case TA_NATR_TEST: + retCode = TA_NATR( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod1, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_NATR_Lookback( testParam->test->optInTimePeriod1 ); + break; + + case TA_CCI_TEST: + retCode = TA_CCI( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod1, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_CCI_Lookback( testParam->test->optInTimePeriod1 ); + break; + case TA_WILLR_TEST: + retCode = TA_WILLR( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod1, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_WILLR_Lookback( testParam->test->optInTimePeriod1 ); + break; + + case TA_ULTOSC_TEST: + retCode = TA_ULTOSC( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod1, + testParam->test->optInTimePeriod2, + testParam->test->optInTimePeriod3, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ULTOSC_Lookback( testParam->test->optInTimePeriod1, + testParam->test->optInTimePeriod2, + testParam->test->optInTimePeriod3 ); + break; + case TA_ACCBANDS_TEST: + retCode = TA_ACCBANDS( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod1, + outBegIdx, + outNbElement, + out1, out2, out3 ); + *lookback = TA_ACCBANDS_Lookback( testParam->test->optInTimePeriod1 ); + break; + + default: + retCode = TA_INTERNAL_ERROR(132); + } + + FREE_IF_NOT_NULL( dummyBuffer1 ); + FREE_IF_NOT_NULL( dummyBuffer2 ); + return retCode; +} + +static TA_RetCode do_call( const TA_Test *test, + const double high[], + const double low[], + const double close[], + int *outBegIdx, + int *outNbElement, + double output[] ) +{ + TA_RetCode retCode; + TA_Real *dummyBuffer1, *dummyBuffer2; + + if( test->theFunction != TA_ACCBANDS_TEST ) + { + dummyBuffer1 = NULL; + dummyBuffer2 = NULL; + } + else + { + dummyBuffer1 = TA_Malloc( ((test->endIdx-test->startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer1 ) + return TA_ALLOC_ERR; + + dummyBuffer2 = TA_Malloc( ((test->endIdx-test->startIdx)+1)*sizeof(TA_Real)); + if( !dummyBuffer2 ) + { + TA_Free( dummyBuffer1 ); + return TA_ALLOC_ERR; + } + } + + switch( test->theFunction ) + { + case TA_NATR_TEST: + retCode = TA_NATR( test->startIdx, + test->endIdx, + high, low, close, + test->optInTimePeriod1, + outBegIdx, + outNbElement, + output ); + break; + + case TA_CCI_TEST: + retCode = TA_CCI( test->startIdx, + test->endIdx, + high, low, close, + test->optInTimePeriod1, + outBegIdx, + outNbElement, + output ); + break; + + case TA_WILLR_TEST: + retCode = TA_WILLR( test->startIdx, + test->endIdx, + high, low, close, + test->optInTimePeriod1, + outBegIdx, + outNbElement, + output ); + break; + + case TA_ULTOSC_TEST: + retCode = TA_ULTOSC( test->startIdx, + test->endIdx, + high, low, close, + test->optInTimePeriod1, + test->optInTimePeriod2, + test->optInTimePeriod3, + outBegIdx, + outNbElement, + output ); + break; + + case TA_ACCBANDS_TEST: + /* TODO: replace dummy with real for more complete tests. */ + retCode = TA_ACCBANDS( test->startIdx, + test->endIdx, + high, low, close, + test->optInTimePeriod1, + outBegIdx, + outNbElement, + dummyBuffer1, output, dummyBuffer2 ); + break; + + default: + retCode = TA_INTERNAL_ERROR(133); + } + + FREE_IF_NOT_NULL( dummyBuffer1 ); + FREE_IF_NOT_NULL( dummyBuffer2 ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + + /* Make a simple first call. */ + retCode = do_call( test, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = do_call( test, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + setInputBuffer( 0, history->high, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = do_call( test, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + setInputBuffer( 1, history->low, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = do_call( test, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); + setInputBuffer( 2, history->close, history->nbBars ); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + switch( test->theFunction ) + { + case TA_NATR_TEST: + /* Special case: Unstable period to test */ + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NATR, + (void *)&testParam, 1, 0 ); + break; + + case TA_ACCBANDS_TEST: + /* Special case: 3 outputs to test */ + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 3, 0 ); + break; + + default: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + break; + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c new file mode 100644 index 000000000..1348ac53d --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c @@ -0,0 +1,710 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 011103 MF First version. + * 111705 MF Add test for Fix#1359452 (AD Function). + * 110206 AC Change volume and open interest to double + */ + +/* Description: + * + * Test functions which have the following + * characterisic: + * - the inputs are high,low, close and volume. + * - have one output of type real. + * - might have an optional parameter. + * + * + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_MFI_TEST, +TA_AD_TEST, +TA_ADOSC_3_10_TEST, +TA_ADOSC_5_2_TEST, +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer startIdx; + TA_Integer endIdx; + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; + const TA_Real *volume; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*************/ + /* AD TEST */ + /*************/ + /* Note: the period field is ignored. The period is irrelevant */ + { 1, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 0, -1631000.00, 0, 252 }, /* First Value */ + { 0, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 1, 2974412.02, 0, 252 }, + { 0, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 250, 8707691.07, 0, 252 }, + { 0, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 251, 8328944.54, 0, 252 }, /* Last Value */ + + /****************/ + /* ADOSC TEST */ + /****************/ + /* Note: the period field is ignored. The periods are always 3 and 10 */ + { 1, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 0, 841238.32, 9, 243 }, /* First Value */ + { 0, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 1, 2255663.07, 9, 243 }, + { 0, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 241, -526700.32, 9, 243 }, + { 0, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 242, -1139932.729, 9, 243 }, /* Last Value */ + + /* Note: the period field is ignored. The periods are always 2 and 5 */ + { 1, TA_ADOSC_5_2_TEST, 0, 251, -1, TA_SUCCESS, 0, 585361.28, 4, 248 }, /* First Value */ + + /**************/ + /* MFI TEST */ + /**************/ + { 0, TA_MFI_TEST, 0, 251, 14, TA_SUCCESS, 0, 42.8923, 14, 252-14 }, /* First Value */ + { 0, TA_MFI_TEST, 0, 251, 14, TA_SUCCESS, 1, 45.6072, 14, 252-14 }, + { 0, TA_MFI_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 53.1997, 14, 252-14 }, /* Last Value */ + + { 1, TA_MFI_TEST, 0, 251, 49, TA_SUCCESS, 0, 44.7902, 49, 252-49 }, /* First Value */ + { 0, TA_MFI_TEST, 0, 251, 49, TA_SUCCESS, 1, 43.1963, 49, 252-49 }, + { 0, TA_MFI_TEST, 0, 251, 49, TA_SUCCESS, 252-50, 57.4806, 49, 252-49 }, /* Last Value */ + + { 1, TA_MFI_TEST, 0, 251, 50, TA_SUCCESS, 0, 44.2414, 50, 252-50 }, /* First Value */ + { 0, TA_MFI_TEST, 0, 251, 50, TA_SUCCESS, 1, 42.1108, 50, 252-50 }, + { 0, TA_MFI_TEST, 0, 251, 50, TA_SUCCESS, 252-51, 50.5905, 50, 252-50 }, /* Last Value */ + + { 1, TA_MFI_TEST, 0, 251, 51, TA_SUCCESS, 0, 43.1496, 51, 252-51 }, /* First Value */ + { 0, TA_MFI_TEST, 0, 251, 51, TA_SUCCESS, 1, 40.7692, 51, 252-51 }, + { 0, TA_MFI_TEST, 0, 251, 51, TA_SUCCESS, 252-52, 51.7265, 51, 252-51 }, /* Last Value */ + + { 1, TA_MFI_TEST, 0, 251, 100, TA_SUCCESS, 0, 50.0166, 100, 252-100 }, /* First Value */ + { 0, TA_MFI_TEST, 0, 251, 100, TA_SUCCESS, 1, 50.2648, 100, 252-100 }, + { 0, TA_MFI_TEST, 0, 251, 100, TA_SUCCESS, 252-101, 48.4264, 100, 252-100 } /* Last Value */ + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_per_hlcv( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + + for( i=0; i < NB_TEST; i++ ) + { + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + switch( testParam->test->theFunction ) + { + case TA_MFI_TEST: + retCode = TA_MFI( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->volume, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_MFI_Lookback( testParam->test->optInTimePeriod ); + break; + + case TA_AD_TEST: + retCode = TA_AD( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->volume, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_AD_Lookback(); + break; + + case TA_ADOSC_3_10_TEST: + retCode = TA_ADOSC( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->volume, + 3, 10, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ADOSC_Lookback(3,10); + break; + + case TA_ADOSC_5_2_TEST: + retCode = TA_ADOSC( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->volume, + 5, 2, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ADOSC_Lookback(5,2); + break; + + default: + retCode = TA_INTERNAL_ERROR(132); + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + + /* Clear the unstable periods from previous tests. */ + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_MFI, 0 ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_MFI_TEST: + retCode = TA_MFI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + case TA_AD_TEST: + retCode = TA_AD( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_ADOSC_3_10_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 3, 10, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_ADOSC_5_2_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 5, 2, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + default: + retCode = TA_INTERNAL_ERROR(133); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_MFI_TEST: + retCode = TA_MFI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + case TA_AD_TEST: + retCode = TA_AD( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + case TA_ADOSC_3_10_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 3, 10, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + case TA_ADOSC_5_2_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 5, 2, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(134); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + setInputBuffer( 0, history->high, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_MFI_TEST: + retCode = TA_MFI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_AD_TEST: + retCode = TA_AD( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_ADOSC_3_10_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 3, 10, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_ADOSC_5_2_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 5, 2, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(135); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call to TA_MA should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + setInputBuffer( 1, history->low, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_MFI_TEST: + retCode = TA_MFI( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + case TA_AD_TEST: + retCode = TA_AD( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + case TA_ADOSC_3_10_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 3, 10, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + case TA_ADOSC_5_2_TEST: + retCode = TA_ADOSC( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + 5, 2, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(136); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); + setInputBuffer( 2, history->close, history->nbBars ); + + if( test->doRangeTestFlag ) + { + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + testParam.volume = history->volume; + + switch( test->theFunction ) + { + case TA_MFI_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_MFI, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + break; + case TA_AD_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, + TA_DO_NOT_COMPARE ); + if( errNb != TA_TEST_PASS ) + return errNb; + break; + case TA_ADOSC_3_10_TEST: + case TA_ADOSC_5_2_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_EMA, + (void *)&testParam, 1, + TA_DO_NOT_COMPARE ); + if( errNb != TA_TEST_PASS ) + return errNb; + break; + default: + break; + } + } + + /* Check for fix #1359452 - AD RAnge not working as expected. */ + if( test->theFunction == TA_AD_TEST ) + { + gBuffer[0].out0[0] = -1.0; + gBuffer[0].out0[1] = -1.0; + retCode = TA_AD( 0, + 0, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + &outBegIdx, + &outNbElement, + &gBuffer[0].out0[0] ); + if( retCode != TA_SUCCESS ) + { + printf( "Failed AD call for fix #1359452 [%d]\n", retCode ); + return TA_TEST_FAIL_BUG1359452_1; + } + if( gBuffer[0].out0[0] == -1.0 ) + { + printf( "Failed AD call for fix #1359452 out0[0] == -1\n" ); + return TA_TEST_FAIL_BUG1359452_2; + } + + retCode = TA_AD( 1, + 1, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + history->volume, + &outBegIdx, + &outNbElement, + &gBuffer[0].out0[1] ); + if( retCode != TA_SUCCESS ) + { + printf( "Failed AD call for fix #1359452 [%d]\n", retCode ); + return TA_TEST_FAIL_BUG1359452_3; + } + if( gBuffer[0].out0[1] == -1.0 ) + { + printf( "Failed AD call for fix #1359452 out0[1] == -1\n" ); + return TA_TEST_FAIL_BUG1359452_4; + } + + /* The two values are to be different. */ + if( gBuffer[0].out0[1] == gBuffer[0].out0[0] ) + { + printf( "Failed AD logic for fix #1359452\n" ); + return TA_TEST_FAIL_BUG1359452_5; + } + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c new file mode 100644 index 000000000..41eefcea0 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c @@ -0,0 +1,527 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112405 MF First version. + * + */ + +/* Description: + * + * Test functions which have the following + * characterisic: + * - have one output + * - zero or one parameter being a period. + * - the input is open, high, low and close. + * + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_AVGPRICE_TEST, +TA_BOP_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer startIdx; + TA_Integer endIdx; + TA_Integer optInTimePeriod; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *open; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*******************/ + /* AVGPRICE TEST */ + /*******************/ + { 0, TA_AVGPRICE_TEST, 0, 251, 0, TA_SUCCESS, 0, 92.0, 0, 252 }, + { 1, TA_AVGPRICE_TEST, 0, 251, 0, TA_SUCCESS, 1, 93.17, 0, 252 }, + + /*************/ + /* BOP TEST */ + /*************/ + + /* The following two should always be identical. */ + { 0, TA_BOP_TEST, 0, 251, 0, TA_SUCCESS, 0, -0.40, 0, 252 }, + { 1, TA_BOP_TEST, 0, 251, 0, TA_SUCCESS, 1, 0.94, 0, 252 } + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_per_ohlc( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + switch( testParam->test->theFunction ) + { + case TA_BOP_TEST: + retCode = TA_BOP( startIdx, + endIdx, + testParam->open, + testParam->high, + testParam->low, + testParam->close, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_BOP_Lookback(); + break; + case TA_AVGPRICE_TEST: + retCode = TA_AVGPRICE( startIdx, + endIdx, + testParam->open, + testParam->high, + testParam->low, + testParam->close, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_AVGPRICE_Lookback(); + break; + default: + retCode = TA_INTERNAL_ERROR(171); + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->open, history->nbBars ); + setInputBuffer( 1, history->high, history->nbBars ); + setInputBuffer( 2, history->low, history->nbBars ); + setInputBuffer( 3, history->close, history->nbBars ); + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_BOP_TEST: + retCode = TA_BOP( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + case TA_AVGPRICE_TEST: + retCode = TA_AVGPRICE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + + default: + retCode = TA_INTERNAL_ERROR(172); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->low,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[3].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_BOP_TEST: + retCode = TA_BOP( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + case TA_AVGPRICE_TEST: + retCode = TA_AVGPRICE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(173); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->low,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[3].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + setInputBuffer( 0, history->open, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_BOP_TEST: + retCode = TA_BOP( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_AVGPRICE_TEST: + retCode = TA_AVGPRICE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(174); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->low,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[3].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + setInputBuffer( 1, history->high, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_BOP_TEST: + retCode = TA_BOP( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + case TA_AVGPRICE_TEST: + retCode = TA_AVGPRICE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[2].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(175); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[3].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); + setInputBuffer( 2, history->low, history->nbBars ); + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_BOP_TEST: + retCode = TA_BOP( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + case TA_AVGPRICE_TEST: + retCode = TA_AVGPRICE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + gBuffer[3].in, + &outBegIdx, + &outNbElement, + gBuffer[3].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(176); + } + + /* Check that the input were preserved. */ + errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[3].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[3].in, 0 ); + setInputBuffer( 3, history->close, history->nbBars ); + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.open = history->open; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c new file mode 100644 index 000000000..d38c7e03d --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c @@ -0,0 +1,440 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AA Andrew Atkinson + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 020605 MF Add regression test with inverted slow/fast period. + * 020805 AA Fix one of the TA_PPO call (wrong buffer was pass). + */ + +/* Description: + * Regression test of APO(Absolute Price Oscillator). + * Regression test of PPO (Percentage Price Oscillator). + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_Integer doPercentage; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInFastPeriod; /* From 1 to 200 */ + TA_Integer optInSlowPeriod; /* From 1 to 200 */ + TA_Integer optInMethod_2; + TA_Integer compatibility; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex; + TA_Real oneOfTheExpectedOutReal; + + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ +static TA_Test tableTest[] = +{ + /**********************************/ + /* APO TEST - SIMPLE - CLASSIC */ + /**********************************/ + { 1, 0, 0, 251, 26, 12, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -3.3124, 25, 252-25 }, /* First Value */ + { 1, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -3.3124, 25, 252-25 }, /* First Value */ + { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -3.5876, 25, 252-25 }, + { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-26, -0.1667, 25, 252-25 }, /* Last Value */ + + { 0, 0, 0, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 0, 1, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 0, 25, 25, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -3.3124, 25, 1 }, /* First/Last Value */ + { 0, 0, 250, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -0.1667, 250, 2 }, /* Last Value */ + + /************************************/ + /* APO TEST - SIMPLE - METASTOCK */ + /************************************/ + { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.3124, 25, 252-25 }, /* First Value */ + { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -3.5876, 25, 252-25 }, + { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, -0.1667, 25, 252-25 }, /* Last Value */ + + { 0, 0, 0, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 0, 1, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 0, 25, 25, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.3124, 25, 1 }, /* First/Last Value */ + { 0, 0, 250, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.1667, 250, 2 }, /* Last Value */ + + + /***************************************/ + /* APO TEST - EXPONENTIAL - CLASSIC */ + /***************************************/ + /* !!! To be done. */ + + /*****************************************/ + /* APO TEST - EXPONENTIAL - METASTOCK */ + /*****************************************/ + { 1, 0, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4193, 25, 252-25 }, /* First Value */ + { 0, 0, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -2.4367, 25, 252-25 }, + { 0, 0, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, 0.90401, 25, 252-25 }, /* Last Value */ + + { 0, 0, 0, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 0, 1, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 0, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4193, 25, 1 }, + { 0, 0, 250, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 0.90401, 250, 2 }, /* Last Value */ + + { 0, 0, 251, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0.90401, 251, 1 }, /* Last Value */ + { 0, 0, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4193, 25, 1 }, /* Just enough to calculate first. */ + { 0, 0, 26, 26, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4367, 26, 1 }, /* Just enough to calculate second. */ + + /**********************************/ + /* PPO TEST - SIMPLE - CLASSIC */ + /**********************************/ + { 1, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 1.10264, 2, 252-2 }, /* First Value */ + { 0, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -0.02813, 2, 252-2 }, + { 0, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 249, -0.21191, 2, 252-2 }, /* Last Value */ + + { 0, 1, 0, 1, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 1, 1, 1, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 1, 2, 2, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 1.10264, 2, 1 }, /* First/Last Value */ + { 0, 1, 250, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -0.21191, 250, 2 }, /* Last Value */ + + /************************************/ + /* PPO TEST - SIMPLE - METASTOCK */ + /************************************/ + { 0, 1, 0, 251, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 1.10264, 2, 252-2 }, /* First Value */ + { 0, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.02813, 2, 252-2 }, + { 0, 1, 0, 251, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 249, -0.21191, 2, 252-2 }, /* Last Value */ + + { 0, 1, 0, 1, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 1, 1, 1, 1, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 1, 1, 2, 2, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 1.10264, 2, 1 }, /* First/Last Value */ + { 0, 1, 250, 251, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.21191, 250, 2 }, /* Last Value */ + + { 0, 1, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.6393, 25, 252-25 }, /* First Value */ + { 0, 1, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -3.9534, 25, 252-25 }, + { 0, 1, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, -0.15281, 25, 252-25 }, /* Last Value */ + + { 0, 1, 0, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 1, 1, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 1, 25, 25, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.6393, 25, 1 }, /* First/Last Value */ + { 0, 1, 250, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.15281, 250, 2 }, /* Last Value */ + + /***************************************/ + /* PPO TEST - EXPONENTIAL - CLASSIC */ + /***************************************/ + /* !!! To be done. */ + + /*****************************************/ + /* PPO TEST - EXPONENTIAL - METASTOCK */ + /*****************************************/ + { 1, 1, 0, 251, 26, 12, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7083, 25, 252-25 }, /* First Value */ + { 0, 1, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -2.7390, 25, 252-25 }, + { 0, 1, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, 0.83644, 25, 252-25 }, /* Last Value */ + + { 0, 1, 0, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 1, 1, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ + { 0, 1, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7083, 25, 1 }, + { 0, 1, 250, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 0.83644, 250, 2 }, /* Last Value */ + + { 0, 1, 251, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0.83644, 251, 1 }, /* Last Value */ + { 0, 1, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7083, 25, 1 }, /* Just enough to calculate first. */ + { 0, 1, 26, 26, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7390, 26, 1 }, /* Just enough to calculate second. */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_po( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "TA_APO/TA_PPO Failed Bad Parameter for Test #%d (%d,%d)\n", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "TA_APO/TA_PPO Failed Test #%d (Code=%d)\n", i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + if( testParam->test->doPercentage ) + { + retCode = TA_PPO( startIdx, + endIdx, + testParam->close, + testParam->test->optInFastPeriod, + testParam->test->optInSlowPeriod, + (TA_MAType)testParam->test->optInMethod_2, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_PPO_Lookback( testParam->test->optInFastPeriod, + testParam->test->optInSlowPeriod, + (TA_MAType)testParam->test->optInMethod_2 ); + } + else + { + retCode = TA_APO( startIdx, + endIdx, + testParam->close, + testParam->test->optInFastPeriod, + testParam->test->optInSlowPeriod, + (TA_MAType)testParam->test->optInMethod_2, + outBegIdx, + outNbElement, + outputBuffer ); + + + *lookback = TA_APO_Lookback( testParam->test->optInFastPeriod, + testParam->test->optInSlowPeriod, + (TA_MAType)testParam->test->optInMethod_2 ); + } + + return retCode; +} + + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + TA_SetCompatibility( (TA_Compatibility)test->compatibility ); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + + TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 0 ); + + /* Make a simple first call. */ + if( test->doPercentage ) + { + retCode = TA_PPO( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInFastPeriod, + test->optInSlowPeriod, + (TA_MAType)test->optInMethod_2, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + else + { + retCode = TA_APO( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInFastPeriod, + test->optInSlowPeriod, + (TA_MAType)test->optInMethod_2, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + + errNb = checkDataSame( gBuffer[0].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[0].out0, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + if( test->doPercentage ) + { + retCode = TA_PPO( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInFastPeriod, + test->optInSlowPeriod, + (TA_MAType)test->optInMethod_2, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + else + { + retCode = TA_APO( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInFastPeriod, + test->optInSlowPeriod, + (TA_MAType)test->optInMethod_2, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + } + + /* The previous call should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[1].in, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + + if( test->optInMethod_2 == TA_MAType_EMA ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_EMA, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + else + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c new file mode 100644 index 000000000..6c71587a5 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c @@ -0,0 +1,507 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * 112605 MF Add CMO test. + */ + +/* Description: + * Test RSI/CMO function. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum { +TA_RSI_TEST, +TA_CMO_TEST +} TA_TestId; + +typedef struct +{ + TA_Integer doRangeTestFlag; + + TA_TestId theFunction; + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + TA_Integer compatibility; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /**********************/ + /* RSI TEST */ + /**********************/ + { 1, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 252-14 }, /* First Value */ + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 52.32, 14, 252-14 }, + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 46.07, 14, 252-14 }, + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-15, 49.63, 14, 252-14 }, /* Last Value */ + + /* No output value. */ + { 0, TA_RSI_TEST, 0, 1, 1, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_RSI_TEST, 0, 14, 14, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 1}, + + /* Index too low test. */ + { 0, TA_RSI_TEST, 0, 0, 15, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 2}, + { 0, TA_RSI_TEST, 0, 1, 15, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 2}, + { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 3}, + { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 52.32, 14, 3}, + { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 46.07, 14, 3}, + { 0, TA_RSI_TEST, 0, 0, 14, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 1}, + { 0, TA_RSI_TEST, 0, 0, 13, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 0}, + + /* Test with 1 unstable price bar. Test for period 1, 2, 14 */ + { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 52.32, 15, 252-(14+1) }, + { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 46.07, 15, 252-(14+1) }, + { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-(15+1), 49.63, 15, 252-(14+1) }, /* Last Value */ + + /* Test with 2 unstable price bar. Test for period 1, 2, 14 */ + { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 46.07, 16, 252-(14+2) }, + { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-(15+2), 49.63, 16, 252-(14+2) }, /* Last Value */ + + + /**********************/ + /* RSI Metastock TEST */ + /**********************/ + { 1, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 252-13 }, /* First Value */ + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 49.14, 13, 252-13 }, + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 52.32, 13, 252-13 }, + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 3, 46.07, 13, 252-13 }, + { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-14, 49.63, 13, 252-13 }, /* Last Value */ + + /* No output value. */ + { 0, TA_RSI_TEST, 0, 1, 1, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, + + /* One value tests. */ + { 0, TA_RSI_TEST, 0, 13, 13, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 1}, + { 0, TA_RSI_TEST, 0, 13, 13, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 1}, + + /* Index too low test. */ + { 0, TA_RSI_TEST, 0, 0, 15, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 3}, + { 0, TA_RSI_TEST, 0, 1, 15, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 3}, + { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 4}, + { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 49.14, 13, 4}, + { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 52.32, 13, 4}, + { 0, TA_RSI_TEST, 0, 0, 14, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 2}, + { 0, TA_RSI_TEST, 0, 0, 13, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 1}, + { 0, TA_RSI_TEST, 0, 0, 12, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 0}, + + /* Test with 1 unstable price bar. Test for period 1, 2, 14 */ + { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 49.14, 14, 252-(13+1) }, + { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 52.32, 14, 252-(13+1) }, + { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-(14+1), 49.63, 14, 252-(13+1) }, /* Last Value */ + + /* Test with 2 unstable price bar. Test for period 1, 2, 14 */ + { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 52.32, 15, 252-(13+2) }, + { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-(14+2), 49.63, 15, 252-(13+2) }, /* Last Value */ + + /**********************/ + /* CMO TEST */ + /**********************/ + { 1, TA_CMO_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -1.70, 14, 252-14 }, + { 1, TA_CMO_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -5.76, 13, 252-13 }, + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_rsi( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + + switch( testParam->test->theFunction ) + { + case TA_RSI_TEST: + retCode = TA_RSI( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_RSI_Lookback( testParam->test->optInTimePeriod); + break; + case TA_CMO_TEST: + retCode = TA_CMO( startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_CMO_Lookback( testParam->test->optInTimePeriod); + break; + default: + retCode = TA_INTERNAL_ERROR(177); + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + const TA_FuncHandle *funcHandle; + const TA_FuncInfo *funcInfo; + TA_ParamHolder *params; + + retCode = TA_SUCCESS; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + TA_SetCompatibility( (TA_Compatibility)test->compatibility ); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + + /* Set the unstable period requested for that test. */ + switch( test->theFunction ) + { + case TA_RSI_TEST: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_RSI, test->unstablePeriod ); + break; + case TA_CMO_TEST: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_CMO, test->unstablePeriod ); + break; + } + + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + + /* Make a simple first call. */ + switch( test->theFunction ) + { + case TA_RSI_TEST: + retCode = TA_RSI( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + case TA_CMO_TEST: + retCode = TA_CMO( test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + break; + default: + retCode = TA_INTERNAL_ERROR(178); + } + + errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->theFunction ) + { + case TA_RSI_TEST: + retCode = TA_RSI( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + case TA_CMO_TEST: + retCode = TA_CMO( test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + break; + default: + retCode = TA_INTERNAL_ERROR(179); + } + + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Make a call using the abstract interface. */ + switch( test->theFunction ) + { + case TA_RSI_TEST: + retCode = TA_GetFuncHandle( "RSI", &funcHandle ); + break; + case TA_CMO_TEST: + retCode = TA_GetFuncHandle( "CMO", &funcHandle ); + break; + default: + retCode = TA_INTERNAL_ERROR(180); + } + + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_GetFuncHandle with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_GETFUNCHANDLE; + } + + retCode = TA_GetFuncInfo( funcHandle, &funcInfo ); + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_GetFuncInfo with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_GETFUNCINFO; + } + + retCode = TA_ParamHolderAlloc( funcHandle, ¶ms ); + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_ParamHolderAlloc with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; + } + + retCode = TA_SetInputParamRealPtr( params, 0, gBuffer[0].in ); + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_SetInputParamRealPtr with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_PARAMREALPTR; + } + + retCode = TA_SetOptInputParamInteger( params, 0, test->optInTimePeriod ); + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_SetOptInputParamInteger with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_SetOutputParamRealPtr( params, 0, gBuffer[1].out0 ); + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_SetOutputParamRealPtr with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_SETOUTPUTPARAMREALPTR; + } + + retCode = TA_CallFunc( params, + test->startIdx, + test->endIdx, + &outBegIdx, + &outNbElement ); + + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_CallFunc with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_CALLFUNC; + } + + retCode = TA_ParamHolderFree( params ); + if( retCode != TA_SUCCESS ) + { + printf( "Fail: TA_GetFuncHandle with retCode = %d\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERFREE; + } + + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].out0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].out0, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + switch( test->theFunction ) + { + case TA_RSI_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_RSI, + (void *)&testParam, 1, 0 ); + break; + case TA_CMO_TEST: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_CMO, + (void *)&testParam, 1, 0 ); + break; + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c new file mode 100644 index 000000000..6d60dc090 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c @@ -0,0 +1,301 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Test Parabolic SAR function using the example given + * in Wilder's book. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer useWilderData; + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Real optInAcceleration; + TA_Real optInMaximum; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Real wilderHigh[] = +{ +51.12, +52.35,52.1,51.8,52.1,52.5,52.8,52.5,53.5,53.5,53.8,54.2,53.4,53.5, +54.4,55.2,55.7,57,57.5,58,57.7,58,57.5,57,56.7,57.5, +56.70,56.00,56.20,54.80,55.50,54.70,54.00,52.50,51.00,51.50,51.70,53.00 +}; + +static TA_Real wilderLow[] = +{ +50.0, +51.5,51,50.5,51.25,51.7,51.85,51.5,52.3,52.5,53,53.5,52.5,52.1,53, +54,55,56,56.5,57,56.5,57.3,56.7,56.3,56.2,56, +55.50,55.00,54.90,54.00,54.50,53.80,53.00,51.50,50.00,50.50,50.20,51.50 +}; + +#define WILDER_NB_BAR (sizeof(wilderLow)/sizeof(TA_Real)) + +static TA_Test tableTest[] = +{ + /**************************************/ + /* SAR TEST WITH WILDER DATA */ + /**************************************/ + { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 0, 50.00, 1, (WILDER_NB_BAR-1) }, /* First Value */ + { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 1, 50.047, 1, (WILDER_NB_BAR-1) }, + { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 4, 50.182, 1, (WILDER_NB_BAR-1) }, + { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 35, 52.93, 1, (WILDER_NB_BAR-1) }, + { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 36, 50.00, 1, (WILDER_NB_BAR-1) } /* Last value */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_sar( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Set all the unstable period to a weird value. This is to make sure + * that no unstable period affects the SAR. + */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 124 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + + const TA_Real *highPtr; + const TA_Real *lowPtr; + TA_Integer nbPriceBar; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + if( test->useWilderData ) + { + highPtr = wilderHigh; + lowPtr = wilderLow; + nbPriceBar = WILDER_NB_BAR; + } + else + { + highPtr = history->high; + lowPtr = history->low; + nbPriceBar = history->nbBars; + } + + setInputBuffer( 0, highPtr, nbPriceBar ); + setInputBuffer( 1, lowPtr, nbPriceBar ); + + /* Make a simple first call. */ + retCode = TA_SAR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInAcceleration, + test->optInMaximum, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + + errNb = checkDataSame( gBuffer[0].in, highPtr, nbPriceBar ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, lowPtr, nbPriceBar ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_SAR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInAcceleration, + test->optInMaximum, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Make sure the other input is untouched. */ + errNb = checkDataSame( gBuffer[0].in, highPtr, nbPriceBar ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Repeat that last test but with the first parameter this time. */ + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, highPtr, nbPriceBar ); + setInputBuffer( 1, lowPtr, nbPriceBar ); + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_SAR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + test->optInAcceleration, + test->optInMaximum, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Make sure the other input is untouched. */ + errNb = checkDataSame( gBuffer[1].in, lowPtr, nbPriceBar); + if( errNb != TA_TEST_PASS ) + return errNb; + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c new file mode 100644 index 000000000..083855b26 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c @@ -0,0 +1,265 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Test STDDEV function. This tests indirectly the VAR function. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInTimePeriod; + TA_Real optInNbDeviation_1; + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /*************************/ + /* STDDEV TEST */ + /*************************/ + { 1, 0, 251, 5, 1.0, TA_SUCCESS, 0, 1.2856, 4, 252-4 }, /* First Value */ + { 0, 0, 251, 5, 1.0, TA_SUCCESS, 1, 0.4462, 4, 252-4 }, + { 0, 0, 251, 5, 1.0, TA_SUCCESS, 252-5, 0.7144, 4, 252-4 }, /* Last Value */ + + { 1, 0, 251, 5, 1.5, TA_SUCCESS, 0, 1.9285, 4, 252-4 }, /* First Value */ + { 0, 0, 251, 5, 1.5, TA_SUCCESS, 1, 0.66937, 4, 252-4 }, + { 0, 0, 251, 5, 1.5, TA_SUCCESS, 252-5, 1.075, 4, 252-4 } /* Last Value */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_stddev( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + retCode = TA_STDDEV( + startIdx, + endIdx, + testParam->close, + testParam->test->optInTimePeriod, + testParam->test->optInNbDeviation_1, + outBegIdx, + outNbElement, + outputBuffer ); + + + *lookback = TA_STDDEV_Lookback( testParam->test->optInTimePeriod, + testParam->test->optInNbDeviation_1 ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->close, history->nbBars ); + setInputBuffer( 1, history->close, history->nbBars ); + + /* Make a simple first call. */ + retCode = TA_STDDEV( + test->startIdx, + test->endIdx, + gBuffer[0].in, + test->optInTimePeriod, + test->optInNbDeviation_1, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + + errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + retCode = TA_STDDEV( + test->startIdx, + test->endIdx, + gBuffer[1].in, + test->optInTimePeriod, + test->optInNbDeviation_1, + &outBegIdx, + &outNbElement, + gBuffer[1].in ); + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( + rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c new file mode 100644 index 000000000..c228c7d27 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c @@ -0,0 +1,794 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 122101 MF First version. + * 111603 MF Add test of TA_STOCHRSI + */ + +/* Description: + * Test the Stochastic function. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" +#include "ta_memory.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum +{ + TEST_STOCH, + TEST_STOCHF, + TEST_STOCHRSI +} TestId; + +typedef struct +{ + TestId testId; + + TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer optInPeriod_0; + TA_Integer optInPeriod_1; + TA_Integer optInMAType_1; + TA_Integer optInPeriod_2; + TA_Integer optInMAType_2; + + TA_RetCode expectedRetCode; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; + + TA_Integer oneOfTheExpectedOutRealIndex0; + TA_Real oneOfTheExpectedOutReal0; + + TA_Integer oneOfTheExpectedOutRealIndex1; + TA_Real oneOfTheExpectedOutReal1; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +static TA_RetCode referenceStoch( TA_Integer startIdx, + TA_Integer endIdx, + const TA_Real inHigh[], + const TA_Real inLow[], + const TA_Real inClose[], + TA_Integer optInPeriod_0, /* From 1 to TA_INTEGER_MAX */ + TA_Integer optInPeriod_1, /* From 1 to TA_INTEGER_MAX */ + TA_Integer optInMAType_1, + TA_Integer optInPeriod_2, /* From 1 to TA_INTEGER_MAX */ + TA_Integer optInMAType_2, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Real outSlowK_0[], + TA_Real outSlowD_1[] ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /**************/ + /* STOCH TEST */ + /**************/ + { TEST_STOCH, 1, 0, 9, 9, 5, 3, TA_MAType_SMA, 4, TA_MAType_SMA, TA_SUCCESS, 9, 1, + 0, 38.139, + 0, 36.725 }, /* Test one value */ + + + { TEST_STOCH, 0, 0, 0, 251, 5, 3, TA_MAType_SMA, 3, TA_MAType_SMA, TA_SUCCESS, 8, 252-8, + 0, 24.0128, + 0, 36.254, }, /* First Value */ + + { TEST_STOCH, 0, 0, 0, 251, 5, 3, TA_MAType_SMA, 4, TA_MAType_SMA, TA_SUCCESS, 9, 252-9, + 252-10, 30.194, + 252-10, 46.641, }, /* Last Value */ + + { TEST_STOCH, 0, 0, 0, 251, 5, 3, TA_MAType_SMA, 3, TA_MAType_SMA, TA_SUCCESS, 8, 252-8, + 252-9, 30.194, + 252-9, 43.69, }, /* Last Value */ + + /*****************/ + /* STOCHRSI TEST */ + /*****************/ + { TEST_STOCHRSI, 0, 0, 27, 27, 14, 14, -1, 1, TA_MAType_SMA, TA_SUCCESS, 27, 1, + 0, 94.156709, + 0, 94.156709 }, /* Test one Value */ + + { TEST_STOCHRSI, 1, 0, 0, 251, 14, 14, -1, 1, TA_MAType_SMA, TA_SUCCESS, 27, 252-27, + 0, 94.156709, + 0, 94.156709 }, /* First Value */ + + { TEST_STOCHRSI, 0, 0, 0, 251, 14, 14, -1, 1, TA_MAType_SMA, TA_SUCCESS, 27, 252-27, + 251-27, 0.0, + 251-27, 0.0 }, /* Last Value */ + + { TEST_STOCHRSI, 0, 0, 0, 251, 14, 45, -1, 1, TA_MAType_SMA, TA_SUCCESS, 58, 252-58, + 0, 79.729186, + 0, 79.729186 }, /* First Value */ + + { TEST_STOCHRSI, 0, 0, 0, 251, 14, 45, -1, 1, TA_MAType_SMA, TA_SUCCESS, 58, 252-58, + 251-58, 48.1550743, + 251-58, 48.1550743 }, /* Last Value */ + + + { TEST_STOCHRSI, 1, 0, 0, 251, 11, 13, -1, 16, TA_MAType_SMA, TA_SUCCESS, 38, 252-38, + 0, 5.25947, + 0, 57.1711}, /* First Value */ + + { TEST_STOCHRSI, 0, 0, 0, 251, 11, 13, -1, 16, TA_MAType_SMA, TA_SUCCESS, 38, 252-38, + 251-38, 0.0, + 251-38, 15.7303 }, /* Last Value */ + + /* More test needed!!! */ +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_stoch( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, + i, retValue ); + return retValue; + } + } + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + TA_Real *dummyOutput; + + (void)outputBufferInt; + + *isOutputInteger = 0; + + retCode = TA_NOT_SUPPORTED; + + testParam = (TA_RangeTestParam *)opaqueData; + + + dummyOutput = TA_Malloc( (endIdx-startIdx+1) * sizeof(TA_Real) ); + + switch( testParam->test->testId ) + { + case TEST_STOCH: + if( outputNb == 0 ) + { + retCode = TA_STOCH( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + (TA_MAType)testParam->test->optInMAType_1, + testParam->test->optInPeriod_2, + (TA_MAType)testParam->test->optInMAType_2, + outBegIdx, outNbElement, + outputBuffer, + dummyOutput ); + + } + else + { + retCode = TA_STOCH( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + (TA_MAType)testParam->test->optInMAType_1, + testParam->test->optInPeriod_2, + (TA_MAType)testParam->test->optInMAType_2, + outBegIdx, outNbElement, + dummyOutput, + outputBuffer ); + } + + *lookback = TA_STOCH_Lookback( testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + (TA_MAType)testParam->test->optInMAType_1, + testParam->test->optInPeriod_2, + (TA_MAType)testParam->test->optInMAType_2 ); + break; + case TEST_STOCHF: + if( outputNb == 0 ) + { + retCode = TA_STOCHF( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + (TA_MAType)testParam->test->optInMAType_1, + outBegIdx, outNbElement, + outputBuffer, + dummyOutput ); + + } + else + { + retCode = TA_STOCHF( startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + (TA_MAType)testParam->test->optInMAType_1, + outBegIdx, outNbElement, + dummyOutput, + outputBuffer ); + } + + *lookback = TA_STOCHF_Lookback( testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + (TA_MAType)testParam->test->optInMAType_1 ); + break; + + case TEST_STOCHRSI: + if( outputNb == 0 ) + { + retCode = TA_STOCHRSI( startIdx, + endIdx, + testParam->close, + testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + testParam->test->optInPeriod_2, + (TA_MAType)testParam->test->optInMAType_2, + outBegIdx, outNbElement, + outputBuffer, + dummyOutput ); + + } + else + { + retCode = TA_STOCHRSI( startIdx, + endIdx, + testParam->close, + testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + testParam->test->optInPeriod_2, + (TA_MAType)testParam->test->optInMAType_2, + outBegIdx, outNbElement, + dummyOutput, + outputBuffer ); + } + + *lookback = TA_STOCHRSI_Lookback( testParam->test->optInPeriod_0, + testParam->test->optInPeriod_1, + testParam->test->optInPeriod_2, + (TA_MAType)testParam->test->optInMAType_2 ); + break; + } + + TA_Free( dummyOutput ); + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + retCode = TA_NOT_SUPPORTED; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + + /* Re-initialize all the unstable period to zero. */ + TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); + + /* Set the unstable period requested for that test. */ + switch( test->optInMAType_1 ) + { + case TA_MAType_EMA: + retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, test->unstablePeriod ); + if( retCode != TA_SUCCESS ) + return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; + break; + default: + /* No unstable period for other methods. */ + break; + } + + /* Make a simple first call. */ + switch( test->testId ) + { + case TEST_STOCH: + retCode = TA_STOCH( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + (TA_MAType)test->optInMAType_1, + test->optInPeriod_2, + (TA_MAType)test->optInMAType_2, + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1 ); + break; + case TEST_STOCHF: + retCode = TA_STOCHF( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + (TA_MAType)test->optInMAType_1, + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1 ); + break; + case TEST_STOCHRSI: + retCode = TA_STOCHRSI( test->startIdx, + test->endIdx, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + test->optInPeriod_2, + (TA_MAType)test->optInMAType_2, + &outBegIdx, &outNbElement, + gBuffer[0].out0, + gBuffer[0].out1 ); + break; + } + + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); + + outBegIdx = outNbElement = 0; + + if( test->testId == TEST_STOCH ) + { + /* Call a local non-optimized version of the function. + * This way, we make sure that the currently speed optimized + * version in TA-Lib is not broken. + */ + retCode = referenceStoch( + test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + test->optInMAType_1, + test->optInPeriod_2, + test->optInMAType_2, + &outBegIdx, &outNbElement, + gBuffer[1].out0, + gBuffer[1].out1 ); + + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[1].out0, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); + + /* The non-optimized reference shall be identical to the optimized + * TA-Lib implementation. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[1].out0, gBuffer[0].out0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkSameContent( gBuffer[1].out1, gBuffer[0].out1 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + /* Make another call where the input and the output are the + * same buffer. + */ + switch( test->testId ) + { + case TEST_STOCH: + retCode = TA_STOCH( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + (TA_MAType)test->optInMAType_1, + test->optInPeriod_2, + (TA_MAType)test->optInMAType_2, + &outBegIdx, &outNbElement, + gBuffer[0].in, + gBuffer[1].in ); + break; + case TEST_STOCHF: + retCode = TA_STOCHF( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + (TA_MAType)test->optInMAType_1, + &outBegIdx, &outNbElement, + gBuffer[0].in, + gBuffer[1].in ); + break; + case TEST_STOCHRSI: + retCode = TA_STOCHRSI( test->startIdx, + test->endIdx, + gBuffer[2].in, + test->optInPeriod_0, + test->optInPeriod_1, + test->optInPeriod_2, + (TA_MAType)test->optInMAType_2, + &outBegIdx, &outNbElement, + gBuffer[0].in, + gBuffer[1].in ); + break; + + } + + /* The previous call should have the same output as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkSameContent( gBuffer[0].out1, gBuffer[1].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); + CHECK_EXPECTED_VALUE( gBuffer[1].in, 1 ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + switch( test->testId ) + { + case TEST_STOCH: + case TEST_STOCHF: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_NONE, + (void *)&testParam, 2, 0 ); + break; + case TEST_STOCHRSI: + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_RSI, + (void *)&testParam, 2, 0 ); + break; + } + + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} + + +/* This is an un-optimized version of the STOCH function */ +static TA_RetCode referenceStoch( TA_Integer startIdx, + TA_Integer endIdx, + const TA_Real inHigh[], + const TA_Real inLow[], + const TA_Real inClose[], + TA_Integer optInPeriod_0, /* From 1 to TA_INTEGER_MAX */ + TA_Integer optInPeriod_1, /* From 1 to TA_INTEGER_MAX */ + TA_Integer optInMAType_1, + TA_Integer optInPeriod_2, /* From 1 to TA_INTEGER_MAX */ + TA_Integer optInMAType_2, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Real outSlowK_0[], + TA_Real outSlowD_1[] ) +{ + TA_RetCode retCode; + double Lt, Ht, tmp, *tempBuffer; + int outIdx; + int lookbackTotal, lookbackK, lookbackKSlow, lookbackDSlow; + int trailingIdx, today, i, bufferIsAllocated; + + /* Identify the lookback needed. */ + lookbackK = optInPeriod_0-1; + lookbackKSlow = TA_MA_Lookback( optInPeriod_1, (TA_MAType)optInMAType_1 ); + lookbackDSlow = TA_MA_Lookback( optInPeriod_2, (TA_MAType)optInMAType_2 ); + lookbackTotal = lookbackK + lookbackDSlow + lookbackKSlow; + + /* Move up the start index if there is not + * enough initial data. + */ + if( startIdx < lookbackTotal ) + startIdx = lookbackTotal; + + /* Make sure there is still something to evaluate. */ + if( startIdx > endIdx ) + { + /* Succeed... but no data in the output. */ + *outBegIdx = 0; + *outNbElement = 0; + return TA_SUCCESS; + } + + /* Do the K calculation: + * + * Kt = 100 x ((Ct-Lt)/(Ht-Lt)) + * + * Kt is today stochastic + * Ct is today closing price. + * Lt is the lowest price of the last K Period (including today) + * Ht is the highest price of the last K Period (including today) + */ + + /* Proceed with the calculation for the requested range. + * Note that this algorithm allows the input and + * output to be the same buffer. + */ + outIdx = 0; + + /* Calculate just enough K for ending up with the caller + * requested range. (The range of k must consider all + * the lookback involve with the smoothing). + */ + trailingIdx = startIdx-lookbackTotal; + today = trailingIdx+lookbackK; + + /* Allocate a temporary buffer large enough to + * store the K. + * + * If the output is the same as the input, great + * we just save ourself one memory allocation. + */ + bufferIsAllocated = 0; + if( (outSlowK_0 == inHigh) || + (outSlowK_0 == inLow) || + (outSlowK_0 == inClose) ) + { + tempBuffer = outSlowK_0; + } + else if( (outSlowD_1 == inHigh) || + (outSlowD_1 == inLow) || + (outSlowD_1 == inClose) ) + { + tempBuffer = outSlowD_1; + } + else + { + bufferIsAllocated = 1; + tempBuffer = TA_Malloc( (endIdx-today+1)*sizeof(TA_Real) ); + } + + /* Do the K calculation */ + while( today <= endIdx ) + { + /* Find Lt and Ht for the requested K period. */ + Lt = inLow [trailingIdx]; + Ht = inHigh[trailingIdx]; + trailingIdx++; + for( i=trailingIdx; i <= today; i++ ) + { + tmp = inLow[i]; + if( tmp < Lt ) Lt = tmp; + tmp = inHigh[i]; + if( tmp > Ht ) Ht = tmp; + } + + /* Calculate stochastic. */ + tmp = Ht-Lt; + if( tmp > 0.0 ) + tempBuffer[outIdx++] = 100.0*((inClose[today]-Lt)/tmp); + else + tempBuffer[outIdx++] = 100.0; + + today++; + } + + /* Un-smoothed K calculation completed. This K calculation is not returned + * to the caller. It is always smoothed and then return. + * Some documentation will refer to the smoothed version as being + * "K-Slow", but often this end up to be shorten to "K". + */ + retCode = TA_MA( 0, outIdx-1, + tempBuffer, optInPeriod_1, + (TA_MAType)optInMAType_1, + outBegIdx, outNbElement, tempBuffer ); + + + if( (retCode != TA_SUCCESS) || (*outNbElement == 0) ) + { + if( bufferIsAllocated ) + TA_Free( tempBuffer ); + /* Something wrong happen? No further data? */ + *outBegIdx = 0; + *outNbElement = 0; + return retCode; + } + + /* Calculate the %D which is simply a moving average of + * the already smoothed %K. + */ + retCode = TA_MA( 0, (*outNbElement)-1, + tempBuffer, optInPeriod_2, + (TA_MAType)optInMAType_2, + outBegIdx, outNbElement, outSlowD_1 ); + + /* Copy tempBuffer into the caller buffer. + * (Calculation could not be done directly in the + * caller buffer because more input data then the + * requested range was needed for doing %D). + */ + memmove( outSlowK_0, &tempBuffer[lookbackDSlow], (*outNbElement) * sizeof(TA_Real) ); + + /* Don't need K anymore, free it if it was allocated here. */ + if( bufferIsAllocated ) + TA_Free( tempBuffer ); + + if( retCode != TA_SUCCESS ) + { + /* Something wrong happen while processing %D? */ + *outBegIdx = 0; + *outNbElement = 0; + return retCode; + } + + /* Note: Keep the outBegIdx relative to the + * caller input before returning. + */ + *outBegIdx = startIdx; + + return TA_SUCCESS; +} + + diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c new file mode 100644 index 000000000..c5a707fd0 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c @@ -0,0 +1,349 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Test TRANGE and ATR function. + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_test_func.h" +#include "ta_utility.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef struct +{ + TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ + + TA_Integer unstablePeriod; + + TA_Integer startIdx; + TA_Integer endIdx; + + TA_Integer doAverage; /* 1 indicate ATR, else TRANGE. */ + TA_Integer optInTimePeriod; /* Meaningful only for ATR. */ + + TA_RetCode expectedRetCode; + + TA_Integer oneOfTheExpectedOutRealIndex; + TA_Real oneOfTheExpectedOutReal; + + TA_Integer expectedBegIdx; + TA_Integer expectedNbElement; +} TA_Test; + +typedef struct +{ + const TA_Test *test; + const TA_Real *high; + const TA_Real *low; + const TA_Real *close; +} TA_RangeTestParam; + +/**** Local functions declarations. ****/ +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ); + +/**** Local variables definitions. ****/ + +static TA_Test tableTest[] = +{ + /* TRANGE TEST */ + { 1, 0, 0, 251, 0, 0, TA_SUCCESS, 0, 3.535, 1, 251 }, /* First Value */ + { 0, 0, 0, 251, 0, 0, TA_SUCCESS, 12, 9.685, 1, 251 }, + { 0, 0, 0, 251, 0, 0, TA_SUCCESS, 40, 5.125, 1, 251 }, + { 0, 0, 0, 251, 0, 0, TA_SUCCESS, 250, 2.88, 1, 251 }, /* Last Value */ + + /* ATR TEST */ + { 1, 0, 0, 251, 1, 1, TA_SUCCESS, 0, 3.535, 1, 251 }, /* First Value */ + { 0, 0, 0, 251, 1, 1, TA_SUCCESS, 12, 9.685, 1, 251 }, + { 0, 0, 0, 251, 1, 1, TA_SUCCESS, 40, 5.125, 1, 251 }, + { 0, 0, 0, 251, 1, 1, TA_SUCCESS, 250, 2.88, 1, 251 }, /* Last Value */ + + { 0, 1, 14, 15, 1, 14, TA_SUCCESS, 0, 3.4876, 15, 1 }, + { 0, 1, 15, 16, 1, 14, TA_SUCCESS, 0, 3.4876, 15, 2 }, + + { 1, 0, 0, 251, 1, 14, TA_SUCCESS, 0, 3.578, 14, 252-14 }, /* First Value */ + { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 1, 3.4876, 14, 252-14 }, + { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 2, 3.55, 14, 252-14 }, + { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 12, 3.245, 14, 252-14 }, + { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 13, 3.394, 14, 252-14 }, + { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 14, 3.413, 14, 252-14 }, + { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 237, 3.26, 14, 252-14 }, /* Last Value */ + +}; + +#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) + +/**** Global functions definitions. ****/ +ErrorNumber test_func_trange( TA_History *history ) +{ + unsigned int i; + ErrorNumber retValue; + + for( i=0; i < NB_TEST; i++ ) + { + if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) + { + printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", + tableTest[i].doAverage? "TA_ATR":"TA_TRANGE", + i, tableTest[i].expectedNbElement, history->nbBars ); + return TA_TESTUTIL_TFRR_BAD_PARAM; + } + + retValue = do_test( history, &tableTest[i] ); + if( retValue != 0 ) + { + printf( "%s Failed Test #%d (Code=%d)\n", + tableTest[i].doAverage? "TA_ATR":"TA_TRANGE", + i, retValue ); + return retValue; + } + } + + + /* All test succeed. */ + return TA_TEST_PASS; +} + +/**** Local functions definitions. ****/ +static TA_RetCode rangeTestFunction( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + TA_RetCode retCode; + TA_RangeTestParam *testParam; + + (void)outputNb; + (void)outputBufferInt; + + *isOutputInteger = 0; + + testParam = (TA_RangeTestParam *)opaqueData; + + + if( testParam->test->doAverage ) + { + retCode = TA_ATR( + startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + testParam->test->optInTimePeriod, + outBegIdx, + outNbElement, + outputBuffer ); + *lookback = TA_ATR_Lookback( testParam->test->optInTimePeriod ); + } + else + { + retCode = TA_TRANGE( + startIdx, + endIdx, + testParam->high, + testParam->low, + testParam->close, + outBegIdx, + outNbElement, + outputBuffer ); + + *lookback = TA_TRANGE_Lookback(); + } + + return retCode; +} + +static ErrorNumber do_test( const TA_History *history, + const TA_Test *test ) +{ + TA_RetCode retCode; + ErrorNumber errNb; + TA_Integer outBegIdx; + TA_Integer outNbElement; + TA_RangeTestParam testParam; + + /* Set to NAN all the elements of the gBuffers. */ + clearAllBuffers(); + + /* Build the input. */ + setInputBuffer( 0, history->high, history->nbBars ); + setInputBuffer( 1, history->low, history->nbBars ); + setInputBuffer( 2, history->close, history->nbBars ); + + if( test->doAverage ) + { + TA_SetUnstablePeriod( TA_FUNC_UNST_ATR, test->unstablePeriod ); + retCode = TA_ATR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + else + { + retCode = TA_TRANGE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + &outBegIdx, + &outNbElement, + gBuffer[0].out0 ); + } + + errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + errNb = checkDataSame( gBuffer[2].in, history->close, history->nbBars ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[0].out0, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + outBegIdx = outNbElement = 0; + + /* Make another call where the input and the output are the + * same buffer. + */ + if( test->doAverage ) + { + TA_SetUnstablePeriod( TA_FUNC_UNST_ATR, test->unstablePeriod ); + retCode = TA_ATR( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + test->optInTimePeriod, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + } + else + { + retCode = TA_TRANGE( test->startIdx, + test->endIdx, + gBuffer[0].in, + gBuffer[1].in, + gBuffer[2].in, + &outBegIdx, + &outNbElement, + gBuffer[0].in ); + } + + /* The previous call to TA_MA should have the same output + * as this call. + * + * checkSameContent verify that all value different than NAN in + * the first parameter is identical in the second parameter. + */ + errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); + if( errNb != TA_TEST_PASS ) + return errNb; + + errNb = checkExpectedValue( gBuffer[0].in, + retCode, test->expectedRetCode, + outBegIdx, test->expectedBegIdx, + outNbElement, test->expectedNbElement, + test->oneOfTheExpectedOutReal, + test->oneOfTheExpectedOutRealIndex ); + if( errNb != TA_TEST_PASS ) + return errNb; + + /* Do a systematic test of most of the + * possible startIdx/endIdx range. + */ + testParam.test = test; + testParam.high = history->high; + testParam.low = history->low; + testParam.close = history->close; + + if( test->doRangeTestFlag ) + { + errNb = doRangeTest( rangeTestFunction, + TA_FUNC_UNST_ATR, + (void *)&testParam, 1, 0 ); + if( errNb != TA_TEST_PASS ) + return errNb; + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_priv.h b/src/ta-lib/src/tools/ta_regtest/ta_test_priv.h new file mode 100644 index 000000000..435f06758 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/ta_test_priv.h @@ -0,0 +1,210 @@ +#ifndef TA_TEST_PRIV_H +#define TA_TEST_PRIV_H + +#ifndef TA_LIBC_H + #include "ta_libc.h" +#endif + +#ifndef TA_ERROR_NUMBER_H + #include "ta_error_number.h" +#endif + +typedef struct +{ + unsigned int nbBars; /* Nb of element into the following arrays. */ + + /* The arrays containing data. Unused array are set to NULL. */ + TA_Real *open; + TA_Real *high; + TA_Real *low; + TA_Real *close; + TA_Real *volume; + TA_Real *openInterest; +} TA_History; + +ErrorNumber test_internals( void ); +ErrorNumber test_abstract( void ); + +ErrorNumber freeLib( void ); +ErrorNumber allocLib( void ); + +void reportError( const char *str, TA_RetCode retCode ); + +/* Global Temporary Used by the ta_func_xxx function. */ + + +typedef struct +{ + TA_Real *in; + + TA_Real *out0; + TA_Real *out1; + TA_Real *out2; +} TestBuffer; + + +/* That's quite a lot of global data, but who cares for + * regression testing... it simplify memory alloc/dealloc. + */ +#define NB_GLOBAL_BUFFER 5 +extern TestBuffer gBuffer[NB_GLOBAL_BUFFER]; + +/* Maximum number of element that can be written + * at a gBuffer[n].ptr + */ +#define MAX_NB_TEST_ELEMENT 280 + +/* Must be called once to initialize the gBuffer. */ +void initGlobalBuffer( void ); + +/* Will set to NAN all elements of gBuffer. */ +void clearAllBuffers( void ); + +/* Initialize the 'gBuffer[i].in' with the provided data. */ +void setInputBuffer( unsigned int i, const TA_Real *data, unsigned int nbElement ); + +/* Same as setInputBuffer but fill with a single value. */ +void setInputBufferValue( unsigned int i, const TA_Real data, unsigned int nbElement ); + +/* Check that a buffer (within a TestBuffer) is not containing + * NAN within the specified range (it also checks that all value + * outside the range are untouched). + * + * Return TA_TEST_PASS if all ok. + */ +ErrorNumber checkForNAN( const TA_Real *buffer, + unsigned int nbElement ); + +/* Check that the 'data' is equal to the provided + * originalInput. + * + * The data must be one of the 'gBuffer[n].buffer'. + * + * It is also checked that all value outside of the + * nbElement range are not-a-number. + * + * Return TA_TEST_PASS if no difference are found. + */ +ErrorNumber checkDataSame( const TA_Real *data, + const TA_Real *originalInput, + unsigned int nbElement ); + +/* Check that the content of the first buffer + * is found in the second buffer (when the elements + * in the first buffer is NAN, no check is done for + * this paricular element). + * + * Return TA_TEST_PASS if no difference are found. + */ +ErrorNumber checkSameContent( TA_Real *buffer1, + TA_Real *buffer2 ); + +ErrorNumber checkExpectedValue( const TA_Real *data, + TA_RetCode retCode, TA_RetCode expectedRetCode, + unsigned int outBegIdx, unsigned int expectedBegIdx, + unsigned int outNbElement, unsigned int expectedNbElement, + TA_Real oneOfTheExpectedOutReal, + unsigned int oneOfTheExpectedOutRealIndex ); + +#define CHECK_EXPECTED_VALUE(bufid,id) \ + { \ + errNb = checkExpectedValue( bufid, \ + retCode, test->expectedRetCode, \ + outBegIdx, test->expectedBegIdx, \ + outNbElement, test->expectedNbElement, \ + test->oneOfTheExpectedOutReal##id, \ + test->oneOfTheExpectedOutRealIndex##id ); \ + if( errNb != TA_TEST_PASS ) \ + { \ + printf( "Fail for output id=%d\n", id ); \ + return errNb; \ + } \ + } + +#define CLEAR_EXPECTED_VALUE(id) \ + { \ + retCode = TA_INTERNAL_ERROR(127); \ + outBegIdx = 0;\ + outNbElement = 0;\ + } + + +/* A systematic test can be done for most of the possible + * range that a TA function can be called with. This test + * is common to all TA function and can be easily done + * with a RangeTestFunction. + * + * The RangeTestFunction is making abstraction of the + * TA function (handles the inputs, the parameters etc...) + * The RangeTestFunction must call the TA function for + * the requested startIdx/endIdx range and put the output + * in the provided buffer. + * + * The RangeTestFunction must also set the outBegIdx and + * outNbElement for verification. + * + * Opaque data (for mostly passing optional parameters) are + * pass through the pointer 'void * opaqueData'. + * + * The output of the function must be put in the outputBuffer + * or outputBufferInt depending of the return type. + */ +#define MAX_RANGE_SIZE 252 +#define MAX_RANGE_END (MAX_RANGE_SIZE-1) + +typedef TA_RetCode (*RangeTestFunction)( TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ); + +/* This is the function starting the range tests. + * The parameter 'nbOutput' allows to repeat the + * tests indepedently for each outputs. + * + * A lot of coherency tests are performed, + * including comparing that the same value are + * returned even when using a different startIdx + * and endIdx. + * + * Because of the complexity added by algorithm that + * have an unstable period, the comparison is + * done using a tolerance algorithm (see test_util.c). + * + * Comparison can be ignored by specifiying + * an integerTolerance == TA_DO_NOT_COMPARE + * + * Even without comparison, a lot of coherency + * tests are still performed (like making sure the + * lookback function is coherent with its TA function). + * + * In the case that the TA function output are + * integer, the integerTolerance indicate by how much + * the value can vary for a function having an + * unstable period. Example: If 2 is pass, the + * value can vary of no more or less 2. + * When passing zero, the tolerance is done using + * a "reasonable" logic using double calculation (see + * test_util.c for more info). + */ +#define TA_DO_NOT_COMPARE 0xFFFFFFFF +ErrorNumber doRangeTest( RangeTestFunction testFunction, + TA_FuncUnstId unstId, + void *opaqueData, + unsigned int nbOutput, + unsigned int integerTolerance ); + +/* Print out info about a retCode */ +void printRetCode( TA_RetCode retCode ); + +/* Function to print character to show that the software is still alive. */ +void showFeedback(void); +void hideFeedback(void); + +#endif + diff --git a/src/ta-lib/src/tools/ta_regtest/test_abstract.c b/src/ta-lib/src/tools/ta_regtest/test_abstract.c new file mode 100644 index 000000000..b8d304974 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/test_abstract.c @@ -0,0 +1,788 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * AC Angelo Ciceri + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112703 MF First version. + * 030104 MF Add tests for TA_GetLookback + * 062504 MF Add test_default_calls. + * 110206 AC Change volume and open interest to double + * 082607 MF Add profiling feature. + */ + +/* Description: + * Regression testing of the functionality provided + * by the ta_abstract module. + * + * Also perform call to all functions for the purpose + * of profiling (doExtensiveProfiling option). + */ + +/**** Headers ****/ +#ifdef WIN32 + #include "windows.h" +#else + #include "time.h" +#endif + +#include +#include +#include +#include +#include "ta_test_priv.h" + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +extern int doExtensiveProfiling; + +extern double gDataOpen[]; +extern double gDataHigh[]; +extern double gDataLow[]; +extern double gDataClose[]; + +extern int nbProfiledCall; +extern double timeInProfiledCall; +extern double worstProfiledCall; +extern int insufficientClockPrecision; + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +typedef enum +{ + PROFILING_10000, + PROFILING_8000, + PROFILING_5000, + PROFILING_2000, + PROFILING_1000, + PROFILING_500, + PROFILING_100 +} ProfilingType; + +/**** Local functions declarations. ****/ +static ErrorNumber testLookback(TA_ParamHolder *paramHolder ); +static ErrorNumber test_default_calls(void); +static ErrorNumber callWithDefaults( const char *funcName, + const double *input, + const int *input_int, int size ); +static ErrorNumber callAndProfile( const char *funcName, ProfilingType type ); + +/**** Local variables definitions. ****/ +static double inputNegData[100]; +static double inputZeroData[100]; +static double inputRandFltEpsilon[100]; +static double inputRandDblEpsilon[100]; +static double inputRandomData[2000]; + +static int inputNegData_int[100]; +static int inputZeroData_int[100]; +static int inputRandFltEpsilon_int[100]; +static int inputRandDblEpsilon_int[100]; +static int inputRandomData_int[2000]; + +static double output[10][2000]; +static int output_int[10][2000]; + +/**** Global functions definitions. ****/ +ErrorNumber test_abstract( void ) +{ + ErrorNumber retValue; + TA_RetCode retCode; + TA_ParamHolder *paramHolder; + const TA_FuncHandle *handle; + int i; + const char *xmlArray; + + printf( "Testing Abstract interface\n" ); + + retValue = allocLib(); + if( retValue != TA_TEST_PASS ) + return retValue; + + /* Verify TA_GetLookback. */ + retCode = TA_GetFuncHandle( "STOCH", &handle ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't get the function handle [%d]\n", retCode ); + return TA_ABS_TST_FAIL_GETFUNCHANDLE; + } + + retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't allocate the param holder [%d]\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; + } + + retValue = testLookback(paramHolder); + if( retValue != TA_SUCCESS ) + { + printf( "testLookback() failed [%d]\n", retValue ); + TA_ParamHolderFree( paramHolder ); + return retValue; + } + + retCode = TA_ParamHolderFree( paramHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_ParamHolderFree failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERFREE; + } + + retValue = freeLib(); + if( retValue != TA_TEST_PASS ) + return retValue; + + /* Call all the TA functions through the abstract interface. */ + retValue = allocLib(); + if( retValue != TA_TEST_PASS ) + return retValue; + + retValue = test_default_calls(); + if( retValue != TA_TEST_PASS ) + { + printf( "TA-Abstract default call failed\n" ); + return retValue; + } + + retValue = freeLib(); + if( retValue != TA_TEST_PASS ) + return retValue; + + /* Verify that the TA_FunctionDescription is null terminated + * and as at least 500 characters (less is guaranteed bad...) + */ + xmlArray = TA_FunctionDescriptionXML(); + for( i=0; i < 1000000; i++ ) + { + if( xmlArray[i] == 0x0 ) + break; + } + + if( i < 500) + { + printf( "TA_FunctionDescriptionXML failed. Size too small.\n" ); + return TA_ABS_TST_FAIL_FUNCTION_DESC_SMALL; + } + + if( i == 1000000 ) + { + printf( "TA_FunctionDescriptionXML failed. Size too large (missing null?).\n" ); + return TA_ABS_TST_FAIL_FUNCTION_DESC_LARGE; + } + + return TA_TEST_PASS; /* Succcess. */ +} + +/**** Local functions definitions. ****/ +static ErrorNumber testLookback( TA_ParamHolder *paramHolder ) +{ + TA_RetCode retCode; + int lookback; + + /* Change the parameters of STOCH and verify that TA_GetLookback respond correctly. */ + retCode = TA_SetOptInputParamInteger( paramHolder, 0, 3 ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_SetOptInputParamInteger( paramHolder, 1, 4 ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_SetOptInputParamInteger( paramHolder, 2, (TA_Integer)TA_MAType_SMA ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_SetOptInputParamInteger( paramHolder, 3, 4 ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_SetOptInputParamInteger( paramHolder, 4, (TA_Integer)TA_MAType_SMA ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_GetLookback(paramHolder,&lookback); + if( retCode != TA_SUCCESS ) + { + printf( "TA_GetLookback failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_GETLOOKBACK_CALL_1; + } + + if( lookback != 8 ) + { + printf( "TA_GetLookback failed [%d != 8]\n", lookback ); + return TA_ABS_TST_FAIL_GETLOOKBACK_1; + } + + /* Change one parameter and check again. */ + retCode = TA_SetOptInputParamInteger( paramHolder, 3, 3 ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; + } + + retCode = TA_GetLookback(paramHolder,&lookback); + if( retCode != TA_SUCCESS ) + { + printf( "TA_GetLookback failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_GETLOOKBACK_CALL_2; + } + + if( lookback != 7 ) + { + printf( "TA_GetLookback failed [%d != 7]\n", lookback ); + return TA_ABS_TST_FAIL_GETLOOKBACK_2; + } + + return TA_TEST_PASS; +} + +/* Some processings are a bit different for functions under + * the Math Operator and Math Transform category. + */ +static int isMath( const TA_FuncInfo *funcInfo ) +{ + int notMath; + notMath = (strlen(funcInfo->group) < 4) || + !((tolower(funcInfo->group[0]) == 'm') && + (tolower(funcInfo->group[1]) == 'a') && + (tolower(funcInfo->group[2]) == 't') && + (tolower(funcInfo->group[3]) == 'h')); + + return !notMath; +} + +#if 0 +// Unused for now +static int isCandlePattern( const TA_FuncInfo *funcInfo ) +{ + int notCandlePattern; + notCandlePattern = (strlen(funcInfo->group) < 3) || + !((tolower(funcInfo->name[0]) == 'c') && + (tolower(funcInfo->name[1]) == 'd') && + (tolower(funcInfo->name[2]) == 'l')); + + return !notCandlePattern; +} +#endif + +static void testDefault( const TA_FuncInfo *funcInfo, void *opaqueData ) +{ + static int nbFunctionDone = 0; + ErrorNumber *errorNumber; + errorNumber = (ErrorNumber *)opaqueData; + if( *errorNumber != TA_TEST_PASS ) + return; + +/* if( !isCandlePattern(funcInfo) ) + return;*/ + +#define CALL(x) { \ + *errorNumber = callWithDefaults( funcInfo->name, x, x##_int, sizeof(x)/sizeof(double) ); \ + if( *errorNumber != TA_TEST_PASS ) { \ + printf( "Failed for [%s][%s]\n", funcInfo->name, #x ); \ + return; \ + } \ +} + /* Do not test value outside the ]0..1[ domain for the "Math" groups. */ + if( !isMath(funcInfo) ) + { + CALL( inputNegData ); + CALL( inputZeroData ); + CALL( inputRandFltEpsilon ); + CALL( inputRandDblEpsilon ); + } + + CALL( inputRandomData ); + +#undef CALL + +#define CALL(x) { \ + *errorNumber = callAndProfile( funcInfo->name, x ); \ + if( *errorNumber != TA_TEST_PASS ) { \ + printf( "Failed for [%s][%s]\n", funcInfo->name, #x ); \ + return; \ + } \ +} + if( doExtensiveProfiling /*&& (nbFunctionDone<5)*/ ) + { + nbFunctionDone++; + printf( "%s ", funcInfo->name ); + CALL( PROFILING_100 ); + CALL( PROFILING_500 ); + CALL( PROFILING_1000 ); + CALL( PROFILING_2000 ); + CALL( PROFILING_5000 ); + CALL( PROFILING_8000 ); + CALL( PROFILING_10000 ); + printf( "\n" ); + } +} + +static ErrorNumber callWithDefaults( const char *funcName, const double *input, const int *input_int, int size ) +{ + TA_ParamHolder *paramHolder; + const TA_FuncHandle *handle; + const TA_FuncInfo *funcInfo; + const TA_InputParameterInfo *inputInfo; + const TA_OutputParameterInfo *outputInfo; + + TA_RetCode retCode; + unsigned int i; + int j; + int outBegIdx, outNbElement, lookback; + + retCode = TA_GetFuncHandle( funcName, &handle ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't get the function handle [%d]\n", retCode ); + return TA_ABS_TST_FAIL_GETFUNCHANDLE; + } + + retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't allocate the param holder [%d]\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; + } + + TA_GetFuncInfo( handle, &funcInfo ); + + for( i=0; i < funcInfo->nbInput; i++ ) + { + TA_GetInputParameterInfo( handle, i, &inputInfo ); + switch(inputInfo->type) + { + case TA_Input_Price: + TA_SetInputParamPricePtr( paramHolder, i, + inputInfo->flags&TA_IN_PRICE_OPEN?input:NULL, + inputInfo->flags&TA_IN_PRICE_HIGH?input:NULL, + inputInfo->flags&TA_IN_PRICE_LOW?input:NULL, + inputInfo->flags&TA_IN_PRICE_CLOSE?input:NULL, + inputInfo->flags&TA_IN_PRICE_VOLUME?input:NULL, NULL ); + break; + case TA_Input_Real: + TA_SetInputParamRealPtr( paramHolder, i, input ); + break; + case TA_Input_Integer: + TA_SetInputParamIntegerPtr( paramHolder, i, input_int ); + break; + } + } + + for( i=0; i < funcInfo->nbOutput; i++ ) + { + TA_GetOutputParameterInfo( handle, i, &outputInfo ); + switch(outputInfo->type) + { + case TA_Output_Real: + TA_SetOutputParamRealPtr(paramHolder,i,&output[i][0]); + for( j=0; j < 2000; j++ ) + output[i][j] = TA_REAL_MIN; + break; + case TA_Output_Integer: + TA_SetOutputParamIntegerPtr(paramHolder,i,&output_int[i][0]); + for( j=0; j < 2000; j++ ) + output_int[i][j] = TA_INTEGER_MIN; + break; + } + } + + /* Do the function call. */ + retCode = TA_CallFunc(paramHolder,0,size-1,&outBegIdx,&outNbElement); + if( retCode != TA_SUCCESS ) + { + printf( "TA_CallFunc() failed zero data test [%d]\n", retCode ); + TA_ParamHolderFree( paramHolder ); + return TA_ABS_TST_FAIL_CALLFUNC_1; + } + + /* Verify consistency with Lookback */ + retCode = TA_GetLookback( paramHolder, &lookback ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_GetLookback() failed zero data test [%d]\n", retCode ); + TA_ParamHolderFree( paramHolder ); + return TA_ABS_TST_FAIL_CALLFUNC_2; + } + + if( outBegIdx != lookback ) + { + printf( "TA_GetLookback() != outBegIdx [%d != %d]\n", lookback, outBegIdx ); + TA_ParamHolderFree( paramHolder ); + return TA_ABS_TST_FAIL_CALLFUNC_3; + } + + /* TODO Add back nan/inf tests. + for( i=0; i < funcInfo->nbOutput; i++ ) + { + switch(outputInfo->type) + { + case TA_Output_Real: + for( j=0; j < outNbElement; j++ ) + { + if( trio_isnan(output[i][j]) || + trio_isinf(output[i][j])) + { + printf( "Failed for output[%d][%d] = %e\n", i, j, output[i][j] ); + return TA_ABS_TST_FAIL_INVALID_OUTPUT; + } + } + break; + case TA_Output_Integer: + break; + } + }*/ + + /* Do another function call where startIdx == endIdx == 0. + * In that case, outBegIdx should ALWAYS be zero. + */ + retCode = TA_CallFunc(paramHolder,0,0,&outBegIdx,&outNbElement); + if( retCode != TA_SUCCESS ) + { + printf( "TA_CallFunc() failed data test 4 [%d]\n", retCode ); + TA_ParamHolderFree( paramHolder ); + return TA_ABS_TST_FAIL_CALLFUNC_4; + } + + if( outBegIdx != 0 ) + { + printf( "failed outBegIdx=%d when startIdx==endIdx==0\n", outBegIdx ); + TA_ParamHolderFree( paramHolder ); + return TA_ABS_TST_FAIL_STARTEND_ZERO; + } + + retCode = TA_ParamHolderFree( paramHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_ParamHolderFree failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERFREE; + } + + return TA_TEST_PASS; +} + +static ErrorNumber test_default_calls(void) +{ + ErrorNumber errNumber; + unsigned int i; + unsigned int sign; + double tempDouble; + + errNumber = TA_TEST_PASS; + + for( i=0; i < sizeof(inputNegData)/sizeof(double); i++ ) + { + inputNegData[i] = -((double)((int)i)); + inputNegData_int[i] = -(int)i; + } + + for( i=0; i < sizeof(inputZeroData)/sizeof(double); i++ ) + { + inputZeroData[i] = 0.0; + inputZeroData_int[i] = (int)inputZeroData[i]; + } + + for( i=0; i < sizeof(inputRandomData)/sizeof(double); i++ ) + { + /* Make 100% sure input range is ]0..1[ */ + tempDouble = (double)rand() / ((double)(RAND_MAX)+(double)(1)); + while( (tempDouble <= 0.0) || (tempDouble >= 1.0) ) + { + tempDouble = (double)rand() / ((double)(RAND_MAX)+(double)(1)); + } + inputRandomData[i] = tempDouble; + inputRandomData_int[i] = (int)inputRandomData[i]; + } + + for( i=0; i < sizeof(inputRandFltEpsilon)/sizeof(double); i++ ) + { + sign= (unsigned int)rand()%2; + inputRandFltEpsilon[i] = (sign?1.0:-1.0)*(FLT_EPSILON); + inputRandFltEpsilon_int[i] = sign?TA_INTEGER_MIN:TA_INTEGER_MAX; + } + + for( i=0; i < sizeof(inputRandFltEpsilon)/sizeof(double); i++ ) + { + sign= (unsigned int)rand()%2; + inputRandFltEpsilon[i] = (sign?1.0:-1.0)*(DBL_EPSILON); + inputRandFltEpsilon_int[i] = sign?1:-1; + } + + if( doExtensiveProfiling ) + { + printf( "\n[PROFILING START]\n" ); + } + + TA_ForEachFunc( testDefault, &errNumber ); + + if( doExtensiveProfiling ) + { + printf( "[PROFILING END]\n" ); + } + + + return errNumber; +} + +static ErrorNumber callAndProfile( const char *funcName, ProfilingType type ) +{ + TA_ParamHolder *paramHolder; + const TA_FuncHandle *handle; + const TA_FuncInfo *funcInfo; + const TA_InputParameterInfo *inputInfo; + const TA_OutputParameterInfo *outputInfo; + + TA_RetCode retCode; + int h, i, j, k; + int outBegIdx, outNbElement; + + /* Variables to control iteration and corresponding input size */ + int nbInnerLoop, nbOuterLoop; + int stepSize; + int inputSize; + + /* Variables measuring the execution time */ +#ifdef WIN32 + LARGE_INTEGER startClock; + LARGE_INTEGER endClock; +#else + clock_t startClock; + clock_t endClock; +#endif + double clockDelta; + int nbProfiledCallLocal; + double timeInProfiledCallLocal; + double worstProfiledCallLocal; + + nbProfiledCallLocal = 0; + timeInProfiledCallLocal = 0.0; + worstProfiledCallLocal = 0.0; + nbInnerLoop = nbOuterLoop = stepSize = inputSize = 0; + + switch( type ) + { + case PROFILING_10000: + nbInnerLoop = 1; + nbOuterLoop = 100; + stepSize = 10000; + inputSize = 10000; + break; + case PROFILING_8000: + nbInnerLoop = 2; + nbOuterLoop = 50; + stepSize = 2000; + inputSize = 8000; + break; + case PROFILING_5000: + nbInnerLoop = 2; + nbOuterLoop = 50; + stepSize = 5000; + inputSize = 5000; + break; + case PROFILING_2000: + nbInnerLoop = 5; + nbOuterLoop = 20; + stepSize = 2000; + inputSize = 2000; + break; + case PROFILING_1000: + nbInnerLoop = 10; + nbOuterLoop = 10; + stepSize = 1000; + inputSize = 1000; + break; + case PROFILING_500: + nbInnerLoop = 20; + nbOuterLoop = 5; + stepSize = 500; + inputSize = 500; + break; + case PROFILING_100: + nbInnerLoop = 100; + nbOuterLoop = 1; + stepSize = 100; + inputSize = 100; + break; + } + + retCode = TA_GetFuncHandle( funcName, &handle ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't get the function handle [%d]\n", retCode ); + return TA_ABS_TST_FAIL_GETFUNCHANDLE; + } + + retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "Can't allocate the param holder [%d]\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; + } + + TA_GetFuncInfo( handle, &funcInfo ); + + for( i=0; i < (int)funcInfo->nbOutput; i++ ) + { + TA_GetOutputParameterInfo( handle, i, &outputInfo ); + switch(outputInfo->type) + { + case TA_Output_Real: + TA_SetOutputParamRealPtr(paramHolder,i,&output[i][0]); + for( j=0; j < 2000; j++ ) + output[i][j] = TA_REAL_MIN; + break; + case TA_Output_Integer: + TA_SetOutputParamIntegerPtr(paramHolder,i,&output_int[i][0]); + for( j=0; j < 2000; j++ ) + output_int[i][j] = TA_INTEGER_MIN; + break; + } + } + + for( h=0; h < 2; h++ ) + { + for( i=0; i < nbOuterLoop; i++ ) + { + for( j=0; j < nbInnerLoop; j++ ) + { + /* Prepare input. */ + for( k=0; k < (int)funcInfo->nbInput; k++ ) + { + TA_GetInputParameterInfo( handle, k, &inputInfo ); + switch(inputInfo->type) + { + case TA_Input_Price: + TA_SetInputParamPricePtr( paramHolder, k, + inputInfo->flags&TA_IN_PRICE_OPEN?&gDataOpen[j*stepSize]:NULL, + inputInfo->flags&TA_IN_PRICE_HIGH?&gDataHigh[j*stepSize]:NULL, + inputInfo->flags&TA_IN_PRICE_LOW?&gDataLow[j*stepSize]:NULL, + inputInfo->flags&TA_IN_PRICE_CLOSE?&gDataClose[j*stepSize]:NULL, + inputInfo->flags&TA_IN_PRICE_VOLUME?&gDataClose[j*stepSize]:NULL, NULL ); + break; + case TA_Input_Real: + TA_SetInputParamRealPtr( paramHolder, k, &gDataClose[j*stepSize] ); + break; + case TA_Input_Integer: + printf( "\nError: Integer input not yet supported for profiling.\n" ); + return TA_ABS_TST_FAIL_CALLFUNC_1; + } + } + + #ifdef WIN32 + QueryPerformanceCounter(&startClock); + #else + startClock = clock(); + #endif + + /* Do the function call. */ + retCode = TA_CallFunc(paramHolder,0,inputSize-1,&outBegIdx,&outNbElement); + if( retCode != TA_SUCCESS ) + { + printf( "TA_CallFunc() failed zero data test [%d]\n", retCode ); + TA_ParamHolderFree( paramHolder ); + return TA_ABS_TST_FAIL_CALLFUNC_1; + } + + #ifdef WIN32 + QueryPerformanceCounter(&endClock); + clockDelta = (double)((__int64)endClock.QuadPart - (__int64) startClock.QuadPart); + #else + endClock = clock(); + clockDelta = (double)(endClock - startClock); + #endif + + /* Setup global profiling info. */ + if( clockDelta <= 0 ) + { + printf( "Error: Insufficient timer precision to perform benchmarking on this platform.\n" ); + return TA_ABS_TST_FAIL_CALLFUNC_1; + } + else + { + if( clockDelta > worstProfiledCall ) + worstProfiledCall = clockDelta; + timeInProfiledCall += clockDelta; + nbProfiledCall++; + } + + /* Setup local profiling info for this particular function. */ + if( clockDelta > worstProfiledCallLocal ) + worstProfiledCallLocal = clockDelta; + timeInProfiledCallLocal += clockDelta; + nbProfiledCallLocal++; + } + } + } + + /* Output statistic (remove worst call, average the others. */ + printf( "%g ", (timeInProfiledCallLocal-worstProfiledCallLocal)/(double)(nbProfiledCallLocal-1)); + + retCode = TA_ParamHolderFree( paramHolder ); + if( retCode != TA_SUCCESS ) + { + printf( "TA_ParamHolderFree failed [%d]\n", retCode ); + return TA_ABS_TST_FAIL_PARAMHOLDERFREE; + } + + return TA_TEST_PASS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/test_data.c b/src/ta-lib/src/tools/ta_regtest/test_data.c new file mode 100644 index 000000000..c4400e043 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/test_data.c @@ -0,0 +1,145 @@ +/* Input price data used to do regression tests. */ +#include "ta_libc.h" + +/* Market data used for profiling (10000 price bars). */ +#include "ta_gDataOpen.c" +#include "ta_gDataHigh.c" +#include "ta_gDataLow.c" +#include "ta_gDataClose.c" + +/* Market data used for regression tests (252 price bars). */ +TA_Real TA_SREF_open_daily_ref_0_PRIV[252] = {92.500000,91.500000,95.155000,93.970000,95.500000,94.500000,95.000000,91.500000,91.815000,91.125000,93.875000, +97.500000,98.815000,92.000000,91.125000,91.875000,93.405000,89.750000,89.345000,92.250000,89.780000, +87.940000,87.595000,85.220000,83.500000,83.500000,81.250000,85.125000,88.125000,87.500000,85.250000, +86.000000,87.190000,86.125000,89.000000,88.625000,86.000000,85.500000,84.750000,85.250000,84.250000, +86.750000,86.940000,89.315000,89.940000,90.815000,91.190000,91.345000,89.595000,91.000000,89.750000, +88.750000,88.315000,84.345000,83.500000,84.000000,86.000000,85.530000,87.500000,88.500000,90.000000, +88.655000,89.500000,91.565000,92.000000,93.000000,92.815000,91.750000,92.000000,91.375000,89.750000, +88.750000,85.440000,83.500000,84.875000,98.625000,96.690000,102.375000,106.000000,104.625000,102.500000, +104.250000,104.000000,106.125000,106.065000,105.940000,105.625000,108.625000,110.250000,110.565000,117.000000, +120.750000,118.000000,119.125000,119.125000,117.815000,116.375000,115.155000,111.250000,111.500000,116.690000, +116.000000,113.620000,111.750000,114.560000,113.620000,118.120000,119.870000,116.620000,115.870000,115.060000, +115.870000,117.500000,119.870000,119.250000,120.190000,122.870000,123.870000,122.250000,123.120000,123.310000, +124.000000,123.000000,124.810000,130.000000,130.880000,132.500000,131.000000,132.500000,134.000000,137.440000, +135.750000,138.310000,138.000000,136.380000,136.500000,132.000000,127.500000,127.620000,124.000000,123.620000, +125.000000,126.370000,126.250000,125.940000,124.000000,122.750000,120.000000,120.000000,122.000000,123.620000, +121.500000,120.120000,123.750000,122.750000,125.000000,128.500000,128.380000,123.870000,124.370000,122.750000, +123.370000,122.000000,122.620000,125.000000,124.250000,124.370000,125.620000,126.500000,128.380000,128.880000, +131.500000,132.500000,137.500000,134.630000,132.000000,134.000000,132.000000,131.380000,126.500000,128.750000, +127.190000,127.500000,120.500000,126.620000,123.000000,122.060000,121.000000,121.000000,118.000000,122.000000, +122.250000,119.120000,115.000000,113.500000,114.000000,110.810000,106.500000,106.440000,108.000000,107.000000, +108.620000,93.000000,93.750000,94.250000,94.870000,95.500000,94.500000,97.000000,98.500000,96.750000, +95.870000,94.440000,92.750000,90.500000,95.060000,94.620000,97.500000,96.000000,96.000000,94.620000, +94.870000,94.000000,99.000000,105.500000,108.810000,105.000000,105.940000,104.940000,103.690000,102.560000, +103.440000,109.810000,113.000000,117.000000,116.250000,120.500000,111.620000,108.120000,110.190000,107.750000, +108.000000,110.690000,109.060000,108.500000,109.870000,109.120000,109.690000,109.560000,110.440000,109.690000, +109.190000}; + +TA_Real TA_SREF_high_daily_ref_0_PRIV[252] = {93.250000,94.940000,96.375000,96.190000,96.000000,94.720000,95.000000,93.720000,92.470000,92.750000,96.250000, +99.625000,99.125000,92.750000,91.315000,93.250000,93.405000,90.655000,91.970000,92.250000,90.345000, +88.500000,88.250000,85.500000,84.440000,84.750000,84.440000,89.405000,88.125000,89.125000,87.155000, +87.250000,87.375000,88.970000,90.000000,89.845000,86.970000,85.940000,84.750000,85.470000,84.470000, +88.500000,89.470000,90.000000,92.440000,91.440000,92.970000,91.720000,91.155000,91.750000,90.000000, +88.875000,89.000000,85.250000,83.815000,85.250000,86.625000,87.940000,89.375000,90.625000,90.750000, +88.845000,91.970000,93.375000,93.815000,94.030000,94.030000,91.815000,92.000000,91.940000,89.750000, +88.750000,86.155000,84.875000,85.940000,99.375000,103.280000,105.375000,107.625000,105.250000,104.500000, +105.500000,106.125000,107.940000,106.250000,107.000000,108.750000,110.940000,110.940000,114.220000,123.000000, +121.750000,119.815000,120.315000,119.375000,118.190000,116.690000,115.345000,113.000000,118.315000,116.870000, +116.750000,113.870000,114.620000,115.310000,116.000000,121.690000,119.870000,120.870000,116.750000,116.500000, +116.000000,118.310000,121.500000,122.000000,121.440000,125.750000,127.750000,124.190000,124.440000,125.750000, +124.690000,125.310000,132.000000,131.310000,132.250000,133.880000,133.500000,135.500000,137.440000,138.690000, +139.190000,138.500000,138.130000,137.500000,138.880000,132.130000,129.750000,128.500000,125.440000,125.120000, +126.500000,128.690000,126.620000,126.690000,126.000000,123.120000,121.870000,124.000000,127.000000,124.440000, +122.500000,123.750000,123.810000,124.500000,127.870000,128.560000,129.630000,124.870000,124.370000,124.870000, +123.620000,124.060000,125.870000,125.190000,125.620000,126.000000,128.500000,126.750000,129.750000,132.690000, +133.940000,136.500000,137.690000,135.560000,133.560000,135.000000,132.380000,131.440000,130.880000,129.630000, +127.250000,127.810000,125.000000,126.810000,124.750000,122.810000,122.250000,121.060000,120.000000,123.250000, +122.750000,119.190000,115.060000,116.690000,114.870000,110.870000,107.250000,108.870000,109.000000,108.500000, +113.060000,93.000000,94.620000,95.120000,96.000000,95.560000,95.310000,99.000000,98.810000,96.810000, +95.940000,94.440000,92.940000,93.940000,95.500000,97.060000,97.500000,96.250000,96.370000,95.000000, +94.870000,98.250000,105.120000,108.440000,109.870000,105.000000,106.000000,104.940000,104.500000,104.440000, +106.310000,112.870000,116.500000,119.190000,121.000000,122.120000,111.940000,112.750000,110.190000,107.940000, +109.690000,111.060000,110.440000,110.120000,110.310000,110.440000,110.000000,110.750000,110.500000,110.500000, +109.500000}; + +TA_Real TA_SREF_low_daily_ref_0_PRIV[252] = {90.750000,91.405000,94.250000,93.500000,92.815000,93.500000,92.000000,89.750000,89.440000,90.625000,92.750000, +96.315000,96.030000,88.815000,86.750000,90.940000,88.905000,88.780000,89.250000,89.750000,87.500000, +86.530000,84.625000,82.280000,81.565000,80.875000,81.250000,84.065000,85.595000,85.970000,84.405000, +85.095000,85.500000,85.530000,87.875000,86.565000,84.655000,83.250000,82.565000,83.440000,82.530000, +85.065000,86.875000,88.530000,89.280000,90.125000,90.750000,89.000000,88.565000,90.095000,89.000000, +86.470000,84.000000,83.315000,82.000000,83.250000,84.750000,85.280000,87.190000,88.440000,88.250000, +87.345000,89.280000,91.095000,89.530000,91.155000,92.000000,90.530000,89.970000,88.815000,86.750000, +85.065000,82.030000,81.500000,82.565000,96.345000,96.470000,101.155000,104.250000,101.750000,101.720000, +101.720000,103.155000,105.690000,103.655000,104.000000,105.530000,108.530000,108.750000,107.750000,117.000000, +118.000000,116.000000,118.500000,116.530000,116.250000,114.595000,110.875000,110.500000,110.720000,112.620000, +114.190000,111.190000,109.440000,111.560000,112.440000,117.500000,116.060000,116.560000,113.310000,112.560000, +114.000000,114.750000,118.870000,119.000000,119.750000,122.620000,123.000000,121.750000,121.560000,123.120000, +122.190000,122.750000,124.370000,128.000000,129.500000,130.810000,130.630000,132.130000,133.880000,135.380000, +135.750000,136.190000,134.500000,135.380000,133.690000,126.060000,126.870000,123.500000,122.620000,122.750000, +123.560000,125.810000,124.620000,124.370000,121.810000,118.190000,118.060000,117.560000,121.000000,121.120000, +118.940000,119.810000,121.000000,122.000000,124.500000,126.560000,123.500000,121.250000,121.060000,122.310000, +121.000000,120.870000,122.060000,122.750000,122.690000,122.870000,125.500000,124.250000,128.000000,128.380000, +130.690000,131.630000,134.380000,132.000000,131.940000,131.940000,129.560000,123.750000,126.000000,126.250000, +124.370000,121.440000,120.440000,121.370000,121.690000,120.000000,119.620000,115.500000,116.750000,119.060000, +119.060000,115.060000,111.060000,113.120000,110.000000,105.000000,104.690000,103.870000,104.690000,105.440000, +107.000000,89.000000,92.500000,92.120000,94.620000,92.810000,94.250000,96.250000,96.370000,93.690000, +93.500000,90.000000,90.190000,90.500000,92.120000,94.120000,94.870000,93.000000,93.870000,93.000000, +92.620000,93.560000,98.370000,104.440000,106.000000,101.810000,104.120000,103.370000,102.120000,102.250000, +103.370000,107.940000,112.500000,115.440000,115.500000,112.250000,107.560000,106.560000,106.870000,104.500000, +105.750000,108.620000,107.750000,108.060000,108.000000,108.190000,108.120000,109.060000,108.750000,108.560000, +106.620000}; + +TA_Real TA_SREF_close_daily_ref_0_PRIV[252] = {91.500000,94.815000,94.375000,95.095000,93.780000,94.625000,92.530000,92.750000,90.315000,92.470000,96.125000, +97.250000,98.500000,89.875000,91.000000,92.815000,89.155000,89.345000,91.625000,89.875000,88.375000, +87.625000,84.780000,83.000000,83.500000,81.375000,84.440000,89.250000,86.375000,86.250000,85.250000, +87.125000,85.815000,88.970000,88.470000,86.875000,86.815000,84.875000,84.190000,83.875000,83.375000, +85.500000,89.190000,89.440000,91.095000,90.750000,91.440000,89.000000,91.000000,90.500000,89.030000, +88.815000,84.280000,83.500000,82.690000,84.750000,85.655000,86.190000,88.940000,89.280000,88.625000, +88.500000,91.970000,91.500000,93.250000,93.500000,93.155000,91.720000,90.000000,89.690000,88.875000, +85.190000,83.375000,84.875000,85.940000,97.250000,99.875000,104.940000,106.000000,102.500000,102.405000, +104.595000,106.125000,106.000000,106.065000,104.625000,108.625000,109.315000,110.500000,112.750000,123.000000, +119.625000,118.750000,119.250000,117.940000,116.440000,115.190000,111.875000,110.595000,118.125000,116.000000, +116.000000,112.000000,113.750000,112.940000,116.000000,120.500000,116.620000,117.000000,115.250000,114.310000, +115.500000,115.870000,120.690000,120.190000,120.750000,124.750000,123.370000,122.940000,122.560000,123.120000, +122.560000,124.620000,129.250000,131.000000,132.250000,131.000000,132.810000,134.000000,137.380000,137.810000, +137.880000,137.250000,136.310000,136.250000,134.630000,128.250000,129.000000,123.870000,124.810000,123.000000, +126.250000,128.380000,125.370000,125.690000,122.250000,119.370000,118.500000,123.190000,123.500000,122.190000, +119.310000,123.310000,121.120000,123.370000,127.370000,128.500000,123.870000,122.940000,121.750000,124.440000, +122.000000,122.370000,122.940000,124.000000,123.190000,124.560000,127.250000,125.870000,128.860000,132.000000, +130.750000,134.750000,135.000000,132.380000,133.310000,131.940000,130.000000,125.370000,130.130000,127.120000, +125.190000,122.000000,125.000000,123.000000,123.500000,120.060000,121.000000,117.750000,119.870000,122.000000, +119.190000,116.370000,113.500000,114.250000,110.000000,105.060000,107.000000,107.870000,107.000000,107.120000, +107.000000,91.000000,93.940000,93.870000,95.500000,93.000000,94.940000,98.250000,96.750000,94.810000, +94.370000,91.560000,90.250000,93.940000,93.620000,97.000000,95.000000,95.870000,94.060000,94.620000, +93.750000,98.000000,103.940000,107.870000,106.060000,104.500000,105.000000,104.190000,103.060000,103.420000, +105.270000,111.870000,116.000000,116.620000,118.280000,113.370000,109.000000,109.700000,109.250000,107.000000, +109.190000,110.000000,109.200000,110.120000,108.000000,108.620000,109.750000,109.810000,109.000000,108.750000, +107.870000}; + +TA_Real TA_SREF_volume_daily_ref_0_PRIV[252] = {4077500,4955900,4775300,4155300,4593100,3631300,3382800,4954200,4500000,3397500,4204500, +6321400,10203600,19043900,11692000,9553300,8920300,5970900,5062300,3705600,5865600, +5603000,5811900,8483800,5995200,5408800,5430500,6283800,5834800,4515500,4493300, +4346100,3700300,4600200,4557200,4323600,5237500,7404100,4798400,4372800,3872300, +10750800,5804800,3785500,5014800,3507700,4298800,4842500,3952200,3304700,3462000, +7253900,9753100,5953000,5011700,5910800,4916900,4135000,4054200,3735300,2921900, +2658400,4624400,4372200,5831600,4268600,3059200,4495500,3425000,3630800,4168100, +5966900,7692800,7362500,6581300,19587700,10378600,9334700,10467200,5671400,5645000, +4518600,4519500,5569700,4239700,4175300,4995300,4776600,4190000,6035300,12168900, +9040800,5780300,4320800,3899100,3221400,3455500,4304200,4703900,8316300,10553900, +6384800,7163300,7007800,5114100,5263800,6666100,7398400,5575000,4852300,4298100, +4900500,4887700,6964800,4679200,9165000,6469800,6792000,4423800,5231900,4565600, +6235200,5225900,8261400,5912500,3545600,5714500,6653900,6094500,4799200,5050800, +5648900,4726300,5585600,5124800,7630200,14311600,8793600,8874200,6966600,5525500, +6515500,5291900,5711700,4327700,4568000,6859200,5757500,7367000,6144100,4052700, +5849700,5544700,5032200,4400600,4894100,5140000,6610900,7585200,5963100,6045500, +8443300,6464700,6248300,4357200,4774700,6216900,6266900,5584800,5284500,7554500, +7209500,8424800,5094500,4443600,4591100,5658400,6094100,14862200,7544700,6985600, +8093000,7590000,7451300,7078000,7105300,8778800,6643900,10563900,7043100,6438900, +8057700,14240000,17872300,7831100,8277700,15017800,14183300,13921100,9683000,9187300, +11380500,69447300,26673600,13768400,11371600,9872200,9450500,11083300,9552800,11108400, +10374200,16701900,13741900,8523600,9551900,8680500,7151700,9673100,6264700,8541600, +8358000,18720800,19683100,13682500,10668100,9710600,3113100,5682000,5763600,5340000, +6220800,14680500,9933000,11329500,8145300,16644700,12593800,7138100,7442300,9442300, +7123600,7680600,4839800,4775500,4008800,4533600,3741100,4084800,2685200,3438000, +2870500}; + diff --git a/src/ta-lib/src/tools/ta_regtest/test_internals.c b/src/ta-lib/src/tools/ta_regtest/test_internals.c new file mode 100644 index 000000000..30d162026 --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/test_internals.c @@ -0,0 +1,274 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 070401 MF First version. + * 050104 MF Add TA_RegressionTest calls. + * 080605 MF Add tests for pseudo-random generator. + * 091705 MF Add tests for TA_AddTimeToTimestamp (Fix#1293953). + * 110906 MF Remove pseudo-random to eliminate dependencies. + */ + +/* Description: + * Regression testing of some internal utility like: + * - collections: List/Stack/Circular buffer. + * - Memory allocation mechanism. + * etc... + */ + +/**** Headers ****/ +#include +#include + +#include "ta_test_priv.h" +#include "ta_memory.h" +#include "ta_defs.h" +#include "ta_common.h" + + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +/* None */ + +/**** Global variables definitions. ****/ +/* None */ + +/**** Local declarations. ****/ +/* None */ + +/**** Local functions declarations. ****/ +static ErrorNumber testCircularBuffer( void ); + +static TA_RetCode circBufferFillFrom0ToSize( int size, int *buffer ); + + +/**** Local variables definitions. ****/ +/* None */ + +/**** Global functions definitions. ****/ +/* None */ + +/**** Local functions definitions. ****/ +ErrorNumber test_internals( void ) +{ + ErrorNumber retValue; + + printf( "Testing utility functions\n" ); + + retValue = testCircularBuffer(); + if( retValue != TA_TEST_PASS ) + { + printf( "\nFailed: Circular buffer tests (%d)\n", retValue ); + return retValue; + } + + return TA_TEST_PASS; /* Success. */ +} + +static ErrorNumber testCircularBuffer( void ) +{ + TA_RetCode retCode; + int i; + int buffer[20]; + ErrorNumber retValue; + + /* Initialize the library. */ + retValue = allocLib(); + if( retValue != TA_TEST_PASS ) + { + printf( "\nFailed: Can't initialize the library\n" ); + return retValue; + } + + /* The following function is supose to fill + * the buffer with the value 0 to 8 sequentialy, + * if somehow it is not 0 to 8, there is a bug! + */ + memset( buffer, 0xFF, sizeof(buffer) ); + retCode = circBufferFillFrom0ToSize( 1, buffer ); + if( retCode != TA_SUCCESS ) + { + printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); + return TA_INTERNAL_CIRC_BUFF_FAIL_0; + } + for( i=0; i < (1+3); i++ ) + { + if( buffer[i] != i ) + { + printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); + return TA_INTERNAL_CIRC_BUFF_FAIL_1; + } + } + + memset( buffer, 0xFF, sizeof(buffer) ); + retCode = circBufferFillFrom0ToSize( 2, buffer ); + if( retCode != TA_SUCCESS ) + { + printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); + return TA_INTERNAL_CIRC_BUFF_FAIL_0; + } + for( i=0; i < (2+3); i++ ) + { + if( buffer[i] != i ) + { + printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); + return TA_INTERNAL_CIRC_BUFF_FAIL_2; + } + } + + memset( buffer, 0xFF, sizeof(buffer) ); + retCode = circBufferFillFrom0ToSize( 3, buffer ); + if( retCode != TA_SUCCESS ) + { + printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); + return TA_INTERNAL_CIRC_BUFF_FAIL_0; + } + for( i=0; i < (3+3); i++ ) + { + if( buffer[i] != i ) + { + printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); + return TA_INTERNAL_CIRC_BUFF_FAIL_3; + } + } + + memset( buffer, 0xFF, sizeof(buffer) ); + retCode = circBufferFillFrom0ToSize( 4, buffer ); + if( retCode != TA_SUCCESS ) + { + printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); + return TA_INTERNAL_CIRC_BUFF_FAIL_0; + } + for( i=0; i < (4+3); i++ ) + { + if( buffer[i] != i ) + { + printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); + return TA_INTERNAL_CIRC_BUFF_FAIL_4; + } + } + + memset( buffer, 0xFF, sizeof(buffer) ); + retCode = circBufferFillFrom0ToSize( 5, buffer ); + if( retCode != TA_SUCCESS ) + { + printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); + return TA_INTERNAL_CIRC_BUFF_FAIL_0; + } + for( i=0; i < (5+3); i++ ) + { + if( buffer[i] != i ) + { + printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); + return TA_INTERNAL_CIRC_BUFF_FAIL_5; + } + } + + memset( buffer, 0xFF, sizeof(buffer) ); + retCode = circBufferFillFrom0ToSize( 6, buffer ); + if( retCode != TA_SUCCESS ) + { + printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); + return TA_INTERNAL_CIRC_BUFF_FAIL_0; + } + for( i=0; i < (6+3); i++ ) + { + if( buffer[i] != i ) + { + printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); + return TA_INTERNAL_CIRC_BUFF_FAIL_6; + } + } + + retValue = freeLib(); + if( retValue != TA_TEST_PASS ) + return retValue; + + return TA_TEST_PASS; /* Success. */ +} + +/* This function is suppose to fill the buffer + * with values going from 0 to 'size'. + * The filling is done using the CIRCBUF macros. + */ +static TA_RetCode circBufferFillFrom0ToSize( int size, int *buffer ) +{ + CIRCBUF_PROLOG(MyBuf,int,4); + int i, value; + int outIdx; + + CIRCBUF_INIT(MyBuf,int,size); + + outIdx = 0; + + // 1st Loop: Fill MyBuf with initial values + // (must be done). + value = 0; + for( i=0; i < size; i++ ) + { + MyBuf[MyBuf_Idx] = value++; + CIRCBUF_NEXT(MyBuf); + } + + // 2nd Loop: Get and Add subsequent values + // in MyBuf (optional) + for( i=0; i < 3; i++ ) + { + buffer[outIdx++] = MyBuf[MyBuf_Idx]; + MyBuf[MyBuf_Idx] = value++; + CIRCBUF_NEXT(MyBuf); + } + + // 3rd Loop: Empty MyBuf (optional) + for( i=0; i < size; i++ ) + { + buffer[outIdx++] = MyBuf[MyBuf_Idx]; + CIRCBUF_NEXT(MyBuf); + } + + CIRCBUF_DESTROY(MyBuf); + + return TA_SUCCESS; +} diff --git a/src/ta-lib/src/tools/ta_regtest/test_util.c b/src/ta-lib/src/tools/ta_regtest/test_util.c new file mode 100644 index 000000000..098077b3e --- /dev/null +++ b/src/ta-lib/src/tools/ta_regtest/test_util.c @@ -0,0 +1,1338 @@ +/* TA-LIB Copyright (c) 1999-2024, Mario Fortier + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * - Neither name of author nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* List of contributors: + * + * Initial Name/description + * ------------------------------------------------------------------- + * MF Mario Fortier + * + * + * Change history: + * + * MMDDYY BY Description + * ------------------------------------------------------------------- + * 112400 MF First version. + * + */ + +/* Description: + * Provide utility function internally used in ta_regtest only. + */ + +/**** Headers ****/ +#ifdef WIN32 + #include "windows.h" +#endif + +#include +#include +#include +#include +#include "ta_test_priv.h" +#include "ta_utility.h" +#include "ta_memory.h" + + +/**** External functions declarations. ****/ +/* None */ + +/**** External variables declarations. ****/ +extern int nbProfiledCall; +extern double timeInProfiledCall; +extern double worstProfiledCall; +extern int insufficientClockPrecision; + +/**** Global variables definitions. ****/ + +/* Global temporary buffers used while testing. */ +#define RESV_PATTERN_MEMGUARD_1 (2.4789205E-150) +#define RESV_PATTERN_MEMGUARD_2 (4.2302468E-165) + +#define RESV_PATTERN_PREFIX (9.1349043E-200) +#define RESV_PATTERN_SUFFIX (8.1489031E-158) +#define RESV_PATTERN_IMPROBABLE (-2.849284E-199) + +#define RESV_PATTERN_PREFIX_INT (TA_INTEGER_DEFAULT) +#define RESV_PATTERN_SUFFIX_INT (TA_INTEGER_DEFAULT) +#define RESV_PATTERN_IMPROBABLE_INT (TA_INTEGER_DEFAULT) + +#define TA_BUF_PREFIX 100 +#define TA_BUF_SUFFIX 100 +#define TA_BUF_SIZE (TA_BUF_PREFIX+MAX_NB_TEST_ELEMENT+TA_BUF_SUFFIX) + +#define TA_NB_OUT 3 +#define TA_NB_IN 1 +#define TA_NB_OUT_IN (TA_NB_OUT+TA_NB_IN) + +TA_Real memoryGuard1 = RESV_PATTERN_MEMGUARD_1; /* Magic number to detect problem. */ +TA_Real buf[NB_GLOBAL_BUFFER][TA_NB_OUT_IN][TA_BUF_SIZE]; /* The global buffers. */ +TA_Real memoryGuard2 = RESV_PATTERN_MEMGUARD_2; /* Magic number to detect problem. */ + +#define NB_TOTAL_ELEMENTS (sizeof(buf)/sizeof(TA_Real)) + +TestBuffer gBuffer[5]; /* See initGlobalBuffer. */ + +/**** Local declarations. ****/ +/* None */ + +/**** Local functions declarations. ****/ +static ErrorNumber doRangeTestFixSize( RangeTestFunction testFunction, + void *opaqueData, + TA_Integer refOutBeg, + TA_Integer refOutNbElement, + TA_Integer refLookback, + const TA_Real *refBuffer, + const TA_Integer *refBufferInt, + TA_FuncUnstId unstId, + TA_Integer fixSize, + unsigned int outputNb, + unsigned int integerTolerance ); + +static int dataWithinReasonableRange( TA_Real val1, TA_Real val2, + unsigned int outputPosition, + TA_FuncUnstId unstId, + unsigned int integerTolerance ); + +static ErrorNumber doRangeTestForOneOutput( RangeTestFunction testFunction, + TA_FuncUnstId unstId, + void *opaqueData, + unsigned int outputNb, + unsigned int integerTolerance ); + +static TA_RetCode CallTestFunction( RangeTestFunction testFunction, + TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ); + +/**** Local variables definitions. ****/ +/* None */ + +/**** Global functions definitions. ****/ +static int ta_g_val = 0; +static const char *ta_g_wheel = "-\\|/"; +void showFeedback() +{ + if( ta_g_wheel[ta_g_val] == '\0' ) + ta_g_val = 0; + putchar('\b'); + putchar(ta_g_wheel[ta_g_val]); + fflush(stdout); + ta_g_val++; +} + +void hideFeedback() +{ + putchar('\b'); + fflush(stdout); + ta_g_val = 0; +} + +ErrorNumber allocLib() +{ + TA_RetCode retCode; + + /* Initialize the library. */ + retCode = TA_Initialize(); + if( retCode != TA_SUCCESS ) + { + printf( "TA_Initialize failed [%d]\n", retCode ); + return TA_TESTUTIL_INIT_FAILED; + } + + return TA_TEST_PASS; +} + +ErrorNumber freeLib() +{ + TA_RetCode retCode; + + /* For testing purpose */ + /* TA_FATAL_RET( "Test again", 100, 200, 0 ); */ + + retCode = TA_Shutdown(); + if( retCode != TA_SUCCESS ) + { + printf( "TA_Shutdown failed [%d]\n", retCode ); + return TA_TESTUTIL_SHUTDOWN_FAILED; + } + + return TA_TEST_PASS; +} + +void reportError( const char *str, TA_RetCode retCode ) +{ + TA_RetCodeInfo retCodeInfo; + + TA_SetRetCodeInfo( retCode, &retCodeInfo ); + + printf( "%s,%d==%s\n", str, retCode, retCodeInfo.enumStr ); + printf( "[%s]\n", retCodeInfo.infoStr ); +} + +/* Need to be called only once. */ +void initGlobalBuffer( void ) +{ + gBuffer[0].in = &buf[0][0][TA_BUF_PREFIX]; + gBuffer[0].out0 = &buf[0][1][TA_BUF_PREFIX]; + gBuffer[0].out1 = &buf[0][2][TA_BUF_PREFIX]; + gBuffer[0].out2 = &buf[0][3][TA_BUF_PREFIX]; + + gBuffer[1].in = &buf[1][0][TA_BUF_PREFIX]; + gBuffer[1].out0 = &buf[1][1][TA_BUF_PREFIX]; + gBuffer[1].out1 = &buf[1][2][TA_BUF_PREFIX]; + gBuffer[1].out2 = &buf[1][3][TA_BUF_PREFIX]; + + gBuffer[2].in = &buf[2][0][TA_BUF_PREFIX]; + gBuffer[2].out0 = &buf[2][1][TA_BUF_PREFIX]; + gBuffer[2].out1 = &buf[2][2][TA_BUF_PREFIX]; + gBuffer[2].out2 = &buf[2][3][TA_BUF_PREFIX]; + + gBuffer[3].in = &buf[3][0][TA_BUF_PREFIX]; + gBuffer[3].out0 = &buf[3][1][TA_BUF_PREFIX]; + gBuffer[3].out1 = &buf[3][2][TA_BUF_PREFIX]; + gBuffer[3].out2 = &buf[3][3][TA_BUF_PREFIX]; + + gBuffer[4].in = &buf[4][0][TA_BUF_PREFIX]; + gBuffer[4].out0 = &buf[4][1][TA_BUF_PREFIX]; + gBuffer[4].out1 = &buf[4][2][TA_BUF_PREFIX]; + gBuffer[4].out2 = &buf[4][3][TA_BUF_PREFIX]; +} + +/* Will set some values in the buffers allowing + * to detect later if the function is writing + * out-of-bound (and to make sure the + * function is writing exactly the number + * of values it pretends to do). + */ +void clearAllBuffers( void ) +{ + unsigned int i,j,k; + + for( i=0; i < NB_GLOBAL_BUFFER; i++ ) + { + for( j=0; j < TA_NB_OUT_IN; j++ ) + { + for( k=0; k < TA_BUF_PREFIX; k++ ) + buf[i][j][k] = RESV_PATTERN_PREFIX; + for( ; k < TA_BUF_SIZE; k++ ) + buf[i][j][k] = RESV_PATTERN_SUFFIX; + } + } +} + +void setInputBuffer( unsigned int i, const TA_Real *data, unsigned int nbElement ) +{ + unsigned int j; + for( j=0; j < nbElement; j++ ) + buf[i][0][j+TA_BUF_PREFIX] = data[j]; +} + +void setInputBufferValue( unsigned int i, const TA_Real data, unsigned int nbElement ) +{ + unsigned int j; + for( j=0; j < nbElement; j++ ) + buf[i][0][j+TA_BUF_PREFIX] = data; + +} + +/* Check that a buffer (within a TestBuffer) is not containing + * NAN (or any reserved "impossible" value) within the specified + * range (it also checks that all out-of-bound values are untouch). + * + * Return 1 on success. + */ +ErrorNumber checkForNAN( const TA_Real *buffer, + unsigned int nbElement ) +{ + unsigned int i; + unsigned int idx; + + const TA_Real *theBuffer; + theBuffer = buffer - TA_BUF_PREFIX; + + /* Check that the prefix are all still untouch. */ + for( idx=0; idx < TA_BUF_PREFIX; idx++ ) + { + if( theBuffer[idx] != RESV_PATTERN_PREFIX ) + { + printf( "Fail: Out of range writing in prefix buffer (%d,%f)\n", idx, theBuffer[idx] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_0; + } + } + + if( nbElement > MAX_NB_TEST_ELEMENT ) + { + printf( "Fail: outNbElement is out of range 0 (%d)\n", nbElement ); + return TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE; + } + + /* Check that no NAN (or reserved "impossible" value) exist + * in the specified range. + */ + for( i=0; i < nbElement; i++,idx++ ) + { + /* TODO Add back some nan/inf checking + if( trio_isnan(theBuffer[idx]) ) + { + printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_1; + } + + if( trio_isinf(theBuffer[idx]) ) + { + printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_2; + }*/ + + if( theBuffer[idx] == RESV_PATTERN_PREFIX ) + { + printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_3; + } + + if( theBuffer[idx] == RESV_PATTERN_SUFFIX ) + { + printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_4; + } + } + + /* Make sure that the remaining of the buffer is untouch. */ + for( ; idx < TA_BUF_SIZE; idx++ ) + { + if( theBuffer[idx] != RESV_PATTERN_SUFFIX ) + { + printf( "Fail: Out of range writing in suffix buffer (%d,%f)\n", idx, theBuffer[idx] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_5; + } + + idx++; + } + + /* Make sure the global memory guard are untouch. */ + if( memoryGuard1 != RESV_PATTERN_MEMGUARD_1 ) + { + printf( "Fail: MemoryGuard1 have been modified (%f,%f)\n", memoryGuard1, RESV_PATTERN_MEMGUARD_1 ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_6; + } + + if( memoryGuard2 != RESV_PATTERN_MEMGUARD_2 ) + { + printf( "Fail: MemoryGuard2 have been modified (%f,%f)\n", memoryGuard2, RESV_PATTERN_MEMGUARD_2 ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_7; + } + + /* Everything looks good! */ + return TA_TEST_PASS; +} + +/* Return 1 on success */ +ErrorNumber checkSameContent( TA_Real *buffer1, + TA_Real *buffer2 ) +{ + const TA_Real *theBuffer1; + const TA_Real *theBuffer2; + + unsigned int i; + + theBuffer1 = buffer1 - TA_BUF_PREFIX; + theBuffer2 = buffer2 - TA_BUF_PREFIX; + + for( i=0; i < TA_BUF_SIZE; i++ ) + { + /* TODO Add back nan/inf checking + (!trio_isnan(theBuffer1[i])) && + (!trio_isinf(theBuffer1[i])) && + */ + + if( (theBuffer1[i] != RESV_PATTERN_SUFFIX) && + (theBuffer1[i] != RESV_PATTERN_PREFIX) ) + { + + if(!TA_REAL_EQ( theBuffer1[i], theBuffer2[i], 0.000001)) + { + printf( "Fail: Large difference found between two value expected identical (%f,%f,%d)\n", + theBuffer1[i], theBuffer2[i], i ); + return TA_TEST_TFRR_CHECK_SAME_CONTENT; + } + } + } + + return TA_TEST_PASS; +} + +ErrorNumber checkDataSame( const TA_Real *data, + const TA_Real *originalInput, + unsigned int nbElement ) +{ + unsigned int i; + ErrorNumber errNb; + + errNb = checkForNAN( data, nbElement ); + + if( errNb != TA_TEST_PASS ) + return errNb; + + if( nbElement > MAX_NB_TEST_ELEMENT ) + { + printf( "Fail: outNbElement is out of range 1 (%d)\n", nbElement ); + return TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE; + } + + for( i=0; i < nbElement; i++ ) + { + if( originalInput[i] != data[i] ) + { + printf( "Fail: Data was wrongly modified (%f,%f,%d)\n", + originalInput[i], + data[i], i ); + return TA_TEST_TFRR_INPUT_HAS_BEEN_MODIFIED; + } + } + + return TA_TEST_PASS; +} + +ErrorNumber checkExpectedValue( const TA_Real *data, + TA_RetCode retCode, TA_RetCode expectedRetCode, + unsigned int outBegIdx, unsigned int expectedBegIdx, + unsigned int outNbElement, unsigned int expectedNbElement, + TA_Real oneOfTheExpectedOutReal, + unsigned int oneOfTheExpectedOutRealIndex ) +{ + if( retCode != expectedRetCode ) + { + printf( "Fail: RetCode %d different than expected %d\n", retCode, expectedRetCode ); + return TA_TESTUTIL_TFRR_BAD_RETCODE; + } + + if( retCode != TA_SUCCESS ) + { + /* An error did occured, but it + * was expected. No need to go + * further. + */ + return TA_TEST_PASS; + } + + if( outNbElement > MAX_NB_TEST_ELEMENT ) + { + printf( "Fail: outNbElement is out of range 2 (%d)\n", outNbElement ); + return TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE; + } + + + /* Make sure the range of output does not contains NAN. */ + /* TODO Add back nan/inf checking + for( i=0; i < outNbElement; i++ ) + { + if( trio_isnan(data[i]) ) + { + printf( "Fail: Not a number find within the data (%d,%f)\n", i, data[i] ); + return TA_TEST_TFRR_OVERLAP_OR_NAN_3; + } + }*/ + + /* Verify that the expected output is there. */ + + if( outNbElement != expectedNbElement ) + { + printf( "Fail: outNbElement expected %d but got %d\n", + expectedNbElement, outNbElement ); + return TA_TESTUTIL_TFRR_BAD_OUTNBELEMENT; + } + + if( expectedNbElement > 0 ) + { + if( !TA_REAL_EQ( oneOfTheExpectedOutReal, data[oneOfTheExpectedOutRealIndex], 0.01 ) ) + { + printf( "Fail: For index %d, Expected value = %f but calculate value is %f\n", + oneOfTheExpectedOutRealIndex, + oneOfTheExpectedOutReal, + data[oneOfTheExpectedOutRealIndex] ); + return TA_TESTUTIL_TFRR_BAD_CALCULATION; + } + + if( expectedBegIdx != outBegIdx ) + { + printf( "Fail: outBegIdx expected %d but got %d\n", expectedBegIdx, outBegIdx ); + return TA_TESTUTIL_TFRR_BAD_BEGIDX; + } + } + + /* Succeed. */ + return TA_TEST_PASS; +} + + +ErrorNumber doRangeTest( RangeTestFunction testFunction, + TA_FuncUnstId unstId, + void *opaqueData, + unsigned int nbOutput, + unsigned int integerTolerance ) +{ + unsigned int outputNb; + ErrorNumber errNb; + + /* Test all the outputs individually. */ + for( outputNb=0; outputNb < nbOutput; outputNb++ ) + { + errNb = doRangeTestForOneOutput( testFunction, + unstId, + opaqueData, + outputNb, + integerTolerance ); + if( errNb != TA_TEST_PASS ) + { + printf( "Failed: For output #%d of %d\n", outputNb+1, nbOutput ); + return errNb; + } + } + + return TA_TEST_PASS; +} + +void printRetCode( TA_RetCode retCode ) +{ + TA_RetCodeInfo retCodeInfo; + + TA_SetRetCodeInfo( retCode, &retCodeInfo ); + printf( "\nFailed: ErrorCode %d=%s:[%s]\n", retCode, + retCodeInfo.enumStr, + retCodeInfo.infoStr ); +} + + + +/**** Local functions definitions. ****/ +static ErrorNumber doRangeTestForOneOutput( RangeTestFunction testFunction, + TA_FuncUnstId unstId, + void *opaqueData, + unsigned int outputNb, + unsigned int integerTolerance ) +{ + TA_RetCode retCode; + TA_Integer refOutBeg, refOutNbElement, refLookback; + TA_Integer fixSize; + TA_Real *refBuffer; + TA_Integer *refBufferInt; + ErrorNumber errNb; + TA_Integer unstablePeriod, temp; + unsigned int outputIsInteger; + + showFeedback(); + + /* Caculate the whole range. This is going + * to be the reference for all subsequent test. + */ + refBuffer = (TA_Real *)TA_Malloc( MAX_RANGE_SIZE * sizeof( TA_Real ) ); + + if( !refBuffer ) + return TA_TESTUTIL_DRT_ALLOC_ERR; + + refBufferInt = (TA_Integer *)TA_Malloc( MAX_RANGE_SIZE * sizeof( TA_Integer ) ); + + if( !refBufferInt ) + { + TA_Free( refBuffer ); + return TA_TESTUTIL_DRT_ALLOC_ERR; + } + + if( unstId != TA_FUNC_UNST_NONE ) + { + /* Caller wish to test for a range of unstable + * period values. But the reference is calculated + * on the whole range by keeping that unstable period + * to zero. + */ + TA_SetUnstablePeriod( unstId, 0 ); + } + + outputIsInteger = 0; + retCode = CallTestFunction( testFunction, 0, MAX_RANGE_END, refBuffer, refBufferInt, + &refOutBeg, &refOutNbElement, &refLookback, + opaqueData, outputNb, &outputIsInteger ); + + if( retCode != TA_SUCCESS ) + { + printf( "Fail: doRangeTest whole range failed (%d)\n", retCode ); + TA_Free( refBuffer ); + TA_Free( refBufferInt ); + return TA_TESTUTIL_DRT_REF_FAILED; + } + + /* When calculating for the whole range, the lookback and the + * refOutBeg are supppose to be equal. + */ + if( refLookback != refOutBeg ) + { + printf( "Fail: doRangeTest refLookback != refOutBeg (%d != %d)\n", refLookback, refOutBeg ); + TA_Free( refBuffer ); + TA_Free( refBufferInt ); + return TA_TESTUTIL_DRT_LOOKBACK_INCORRECT; + } + + temp = MAX_RANGE_SIZE-refLookback; + if( temp != refOutNbElement ) + { + printf( "Fail: doRangeTest either refOutNbElement or refLookback bad (%d,%d)\n", temp, refOutNbElement ); + TA_Free( refBuffer ); + TA_Free( refBufferInt ); + return TA_TESTUTIL_DRT_REF_OUTPUT_INCORRECT; + } + + /* Calculate each value ONE by ONE and make sure it is identical + * to the reference. + * + * Then repeat the test but calculate TWO by TWO and so on... + */ + for( fixSize=1; fixSize <= MAX_RANGE_SIZE; fixSize++ ) + { + /* When a function has an unstable period, verify some + * unstable period between 0 and MAX_RANGE_SIZE. + */ + if( unstId == TA_FUNC_UNST_NONE ) + { + errNb = doRangeTestFixSize( testFunction, opaqueData, + refOutBeg, refOutNbElement, refLookback, + refBuffer, refBufferInt, + unstId, fixSize, outputNb, integerTolerance ); + if( errNb != TA_TEST_PASS) + { + TA_Free( refBuffer ); + TA_Free( refBufferInt ); + return errNb; + } + } + else + { + for( unstablePeriod=0; unstablePeriod <= MAX_RANGE_SIZE; unstablePeriod++ ) + { + TA_SetUnstablePeriod( unstId, unstablePeriod ); + + errNb = doRangeTestFixSize( testFunction, opaqueData, + refOutBeg, refOutNbElement, refLookback, + refBuffer, refBufferInt, + unstId, fixSize, outputNb, integerTolerance ); + if( errNb != TA_TEST_PASS) + { + printf( "Fail: Using unstable period %d\n", unstablePeriod ); + TA_Free( refBuffer ); + TA_Free( refBufferInt ); + return errNb; + } + + /* Randomly skip the test of some unstable period (limit case are + * always tested though). + */ + if( (unstablePeriod > 5) && (unstablePeriod < 240) ) + { + /* Randomly skips from 0 to 239 tests. Never + * make unstablePeriod exceed 240. + */ + temp = (rand() % 240); + unstablePeriod += temp; + if( unstablePeriod > 240 ) + unstablePeriod = 240; + } + } + + /* Because the tests with an unstable period are very intensive + * and kinda repetitive, skip the test of some fixSize (limit + * case are always tested though). + */ + if( (fixSize > 5) && (fixSize < 240) ) + { + /* Randomly skips from 0 to 239 tests. Never + * make fixSize exceed 240. + */ + temp = (rand() % 239); + fixSize += temp; + if( fixSize > 240 ) + fixSize = 240; + } + } + } + + TA_Free( refBuffer ); + TA_Free( refBufferInt ); + return TA_TEST_PASS; +} + +static ErrorNumber doRangeTestFixSize( RangeTestFunction testFunction, + void *opaqueData, + TA_Integer refOutBeg, + TA_Integer refOutNbElement, + TA_Integer refLookback, + const TA_Real *refBuffer, + const TA_Integer *refBufferInt, + TA_FuncUnstId unstId, + TA_Integer fixSize, + unsigned int outputNb, + unsigned int integerTolerance ) +{ + TA_RetCode retCode; + TA_Real *outputBuffer; + TA_Real val1, val2; + TA_Integer i, temp; + TA_Integer outputBegIdx, outputNbElement, lookback; + TA_Integer startIdx, endIdx, relativeIdx, outputSizeByOptimalLogic; + TA_Integer *outputBufferInt; + unsigned int outputIsInteger; + + (void)refLookback; + + /* Allocate the output buffer (+prefix and suffix memory guard). */ + outputBuffer = (TA_Real *)TA_Malloc( (fixSize+2) * sizeof( TA_Real ) ); + + if( !outputBuffer ) + return TA_TESTUTIL_DRT_ALLOC_ERR; + + outputBufferInt = (TA_Integer *)TA_Malloc( (fixSize+2) * sizeof( TA_Integer ) ); + + if( !refBufferInt ) + { + TA_Free( outputBuffer ); + return TA_TESTUTIL_DRT_ALLOC_ERR; + } + + outputBuffer[0] = RESV_PATTERN_PREFIX; + outputBuffer[fixSize+1] = RESV_PATTERN_SUFFIX; + + outputBufferInt[0] = RESV_PATTERN_PREFIX_INT; + outputBufferInt[fixSize+1] = RESV_PATTERN_SUFFIX_INT; + + /* Initialize the outputs with improbable values. */ + for( i=1; i <= fixSize; i++ ) + { + outputBuffer[i] = RESV_PATTERN_IMPROBABLE; + outputBufferInt[i] = RESV_PATTERN_IMPROBABLE_INT; + } + + /* Test for a large number of possible startIdx */ + for( startIdx=0; startIdx <= (MAX_RANGE_SIZE-fixSize); startIdx++ ) + { + /* Call the TA function. */ + endIdx = startIdx+fixSize-1; + retCode = CallTestFunction( testFunction, startIdx, endIdx, + &outputBuffer[1], &outputBufferInt[1], + &outputBegIdx, &outputNbElement, &lookback, + opaqueData, outputNb, &outputIsInteger ); + + if( retCode != TA_SUCCESS ) + { + /* No call shall never fail here. When the range + * is "out-of-range" the function shall still return + * TA_SUCCESS with the outNbElement equal to zero. + */ + printf( "Fail: doRangeTestFixSize testFunction return error=(%d) (%d,%d)\n", retCode, fixSize, startIdx ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_RETCODE_ERR; + } + else + { + /* Possible startIdx gap of the output shall be always the + * same regardless of the range. + */ + if( outputNbElement == 0 ) + { + /* Trap cases where there is no output. */ + if( (startIdx > lookback) || (endIdx > lookback) ) + { + /* Whenever startIdx is greater than lookback, some data + * shall be return. Same idea with endIdx. + * + * Note: + * some output will never start at the startIdx, particularly + * when a TA function have multiple output. Usually, the first output + * will be between startIdx/endIdx and other outputs may have a "gap" + * from the startIdx. + * + * Example: + * Stochastic %K is between startIdx/endIdx, but %D output will + * have less data because it is a MA of %K. A gap will then + * exist for the %D output. + */ + printf( "Fail: doRangeTestFixSize data missing (%d,%d,%d)\n", startIdx, endIdx, lookback ); + + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_MISSING_DATA; + } + } + else + { + /* Some output was returned. Are the returned index correct? */ + if( (outputBegIdx < startIdx) || (outputBegIdx > endIdx) || (outputBegIdx < refOutBeg)) + { + printf( "Fail: doRangeTestFixSize bad outBegIdx\n" ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_BAD_OUTBEGIDX; + } + + if( (outputNbElement > fixSize) || (outputNbElement > refOutNbElement) ) + { + printf( "Fail: doRangeTestFixSize Incorrect outputNbElement\n" ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + return TA_TESTUTIL_DRT_BAD_OUTNBLEMENT; + } + + /* Is the calculated lookback too high? */ + if( outputBegIdx < lookback ) + { + printf( "Fail: doRangeTestFixSize Lookback calculation too high? (%d)\n", lookback ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_LOOKBACK_TOO_HIGH; + } + + /* Is the output identical to the reference? */ + relativeIdx = outputBegIdx-refOutBeg; + for( i=0; i < outputNbElement; i++ ) + { + if( outputIsInteger ) + { + if( outputBufferInt[1+i] != refBufferInt[relativeIdx+i] ) + { + printf( "Fail: doRangeTestFixSize diff data for idx=%d (%d,%d)\n", i, + outputBufferInt[1+i], refBufferInt[relativeIdx+i] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_DATA_DIFF_INT; + } + } + else + { + val1 = outputBuffer[1+i]; + val2 = refBuffer[relativeIdx+i]; + if( !dataWithinReasonableRange( val1, val2, i, unstId, integerTolerance ) ) + { + printf( "Fail: doRangeTestFixSize diff data for idx=%d (%e,%e)\n", i, val1, val2 ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + if( val1 != 0.0 ) + printf( "Fail: Diff %g %%\n", ((val2-val1)/val1)*100.0 ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_DATA_DIFF; + } + } + + /* Randomly skip the verification of some value. Limit + * cases are always checked though. + */ + if( outputNbElement > 30 ) + { + temp = outputNbElement-20; + if( (i > 20) && (i < temp) ) + { + /* Randomly skips from 0 to 200 verification. + * Never make it skip the last 20 values. + */ + i += (rand() % 200); + if( i > temp ) + i = temp; + } + } + } + + /* Verify out-of-bound writing in the output buffer. */ + outputSizeByOptimalLogic = max(lookback,startIdx); + if( outputSizeByOptimalLogic > endIdx ) + outputSizeByOptimalLogic = 0; + else + outputSizeByOptimalLogic = endIdx-outputSizeByOptimalLogic+1; + + if( (fixSize != outputNbElement) && (outputBuffer[1+outputSizeByOptimalLogic] != RESV_PATTERN_IMPROBABLE) ) + { + printf( "Fail: doRangeTestFixSize out-of-bound output (%e)\n", outputBuffer[1+outputSizeByOptimalLogic] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT; + } + + if( (fixSize != outputNbElement) && (outputBufferInt[1+outputSizeByOptimalLogic] != RESV_PATTERN_IMPROBABLE_INT) ) + { + printf( "Fail: doRangeTestFixSize out-of-bound output (%d)\n", outputBufferInt[1+outputSizeByOptimalLogic] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT_INT; + } + + /* Verify that the memory guard were preserved. */ + if( outputBuffer[0] != RESV_PATTERN_PREFIX ) + { + printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_PREFIX (%e)\n", outputBuffer[0] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_BAD_PREFIX; + } + + if( outputBufferInt[0] != RESV_PATTERN_PREFIX_INT ) + { + printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_PREFIX_INT (%d)\n", outputBufferInt[0] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_BAD_PREFIX; + } + + if( outputBuffer[fixSize+1] != RESV_PATTERN_SUFFIX ) + { + printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_SUFFIX (%e)\n", outputBuffer[fixSize+1] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_BAD_SUFFIX; + } + + if( outputBufferInt[fixSize+1] != RESV_PATTERN_SUFFIX_INT ) + { + printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_SUFFIX_INT (%d)\n", outputBufferInt[fixSize+1] ); + printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); + printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TESTUTIL_DRT_BAD_SUFFIX; + } + + /* Clean-up for next test. */ + if( outputIsInteger ) + { + for( i=1; i <= fixSize; i++ ) + outputBufferInt[i] = RESV_PATTERN_IMPROBABLE_INT; + } + else + { + for( i=1; i <= fixSize; i++ ) + outputBuffer[i] = RESV_PATTERN_IMPROBABLE; + } + } + + /* Skip some startIdx at random. Limit case are still + * tested though. + */ + if( (startIdx > 30) && ((startIdx+100) <= (MAX_RANGE_SIZE-fixSize)) ) + { + /* Randomly skips from 40 to 100 tests. */ + temp = (rand() % 100)+40; + startIdx += temp; + } + } + + /* Loop and move forward for the next startIdx to test. */ + } + + TA_Free( outputBuffer ); + TA_Free( outputBufferInt ); + return TA_TEST_PASS; +} + +/* This function compares two value. + * The value is determined to be equal + * if it is within a certain error range. + */ +static int dataWithinReasonableRange( TA_Real val1, TA_Real val2, + unsigned int outputPosition, + TA_FuncUnstId unstId, + unsigned int integerTolerance ) +{ + TA_Real difference, tolerance, temp; + unsigned int val1_int, val2_int, tempInt, periodToIgnore; + + if( integerTolerance == TA_DO_NOT_COMPARE ) + return 1; /* Don't compare, says that everything is fine */ + + /* If the function does not have an unstable period, + * the compared value shall be identical. + * + * Because the algo may vary slightly allow for + * a small epsilon error because of the nature + * of floating point operations. + */ + if( unstId == TA_FUNC_UNST_NONE ) + return TA_REAL_EQ( val1, val2, 0.000000001 ); + + /* In the context of the TA functions, all value + * below 0.00001 are considered equal to zero and + * are considered to be equal within a reasonable range. + * (the percentage difference might be large, but + * unsignificant at that level, so no tolerance + * check is being done). + */ + if( (val1 < 0.00001) && (val2 < 0.00001) ) + return 1; + + /* When the function is unstable, the comparison + * tolerate at first a large difference. + * + * As the number of "outputPosition" is higher + * the tolerance is reduced. + * + * In the same way, as the unstable period + * increase, the tolerance is reduced (that's + * what the unstable period is for... reducing + * difference). + * + * When dealing with an unstable period, the + * first 100 values are ignored. + * + * Following 100, the tolerance is + * progressively reduced as follow: + * + * 1 == 0.5/1 == 50 % + * 2 == 0.5/2 == 25 % + * ... + * 100 == 0.5/100 == 0.005 % + * ... + * + * Overall, the following is a fair estimation: + * When using a unstable period of 200, you + * can expect the output to not vary more + * than 0.005 % + * + * The logic is sligthly different if the + * output are rounded integer, but it is + * the same idea. + * + * The following describe the special meaning of + * the integerTolerance: + * + * Value 10 -> A tolerance of 1/10 is used. + * + * Value 100 -> A tolerance of 1/100 is used. + * + * Value 1000 -> A tolerance of 1/1000 is used. + * + * Value 360 -> Useful when the output are + * degrees. In that case, a fix + * tolerance of 1 degree is used. + * + * Value TA_DO_NOT_COMPARE -> + * Indicate that NO COMPARISON take + * place. This is useful for functions + * that cannot be compare when changing + * the range (like the accumulative + * algorithm used for TA_AD and TA_ADOSC). + */ + + + /* Some functions requires a longer unstable period. + * These are trap here. + */ + switch( unstId ) + { + case TA_FUNC_UNST_T3: + periodToIgnore = 200; + break; + default: + periodToIgnore = 100; + break; + } + + if( integerTolerance == 1000 ) + { + /* Check for no difference of more + * than 1/1000 + */ + if( val1 > val2 ) + difference = (val1-val2); + else + difference = (val2-val1); + + difference *= 1000.0; + + temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; + if( temp <= periodToIgnore ) + { + /* Pretend it is fine. */ + return 1; + } + else if( (int)difference > 1 ) + { + printf( "\nFail: Value diffferent by more than 1/1000 (%f)\n", difference ); + return 0; + } + } + else if( integerTolerance == 100 ) + { + /* Check for no difference of more + * than 1/1000 + */ + if( val1 > val2 ) + difference = (val1-val2); + else + difference = (val2-val1); + + difference *= 100.0; + + temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; + if( temp <= periodToIgnore ) + { + /* Pretend it is fine. */ + return 1; + } + else if( (int)difference > 1 ) + { + printf( "\nFail: Value diffferent by more than 1/100 (%f)\n", difference ); + return 0; + } + } + else if( integerTolerance == 10 ) + { + /* Check for no difference of more + * than 1/1000 + */ + if( val1 > val2 ) + difference = (val1-val2); + else + difference = (val2-val1); + + difference *= 10.0; + + temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; + if( temp <= periodToIgnore ) + { + /* Pretend it is fine. */ + return 1; + } + else if( (int)difference > 1 ) + { + printf( "\nFail: Value diffferent by more than 1/10 (%f)\n", difference ); + return 0; + } + } + else if( integerTolerance == 360 ) + { + /* Check for no difference of no more + * than 10% when the value is higher than + * 1 degree. + * + * Difference of less than 1 degree are not significant. + */ + val1_int = (unsigned int)val1; + val2_int = (unsigned int)val2; + if( val1_int > val2_int ) + tempInt = val1_int - val2_int; + else + tempInt = val2_int - val1_int; + + if( val1 > val2 ) + difference = (val1-val2)/val1; + else + difference = (val2-val1)/val2; + + temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; + if( temp <= periodToIgnore ) + { + /* Pretend it is fine. */ + return 1; + } + else if( (tempInt > 1) && (difference > 0.10) ) + { + printf( "\nFail: Value diffferent by more than 10 percent over 1 degree (%d)\n", tempInt ); + return 0; + } + } + else if( integerTolerance ) + { + /* Check that the integer part of the value + * is not different more than the specified + * integerTolerance. + */ + val1_int = (unsigned int)val1; + val2_int = (unsigned int)val2; + if( val1_int > val2_int ) + tempInt = val1_int - val2_int; + else + tempInt = val2_int - val1_int; + + temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; + if( temp <= periodToIgnore ) + { + /* Pretend it is fine. */ + return 1; + } + else if( temp < 100 ) + { + if( tempInt >= 3*integerTolerance ) + { + printf( "\nFail: Value out of 3*tolerance range (%d,%d)\n", tempInt, integerTolerance ); + return 0; /* Value considered different */ + } + } + else if( temp < 150 ) + { + if( tempInt >= 2*integerTolerance ) + { + printf( "\nFail: Value out of 2*tolerance range (%d,%d)\n", tempInt, integerTolerance ); + return 0; /* Value considered different */ + } + } + else if( temp < 200 ) + { + if( tempInt >= integerTolerance ) + { + printf( "\nFail: Value out of tolerance range (%d,%d)\n", tempInt, integerTolerance ); + return 0; /* Value considered different */ + } + } + else if( tempInt >= 1 ) + { + printf( "\nFail: Value not equal (difference is %d)\n", tempInt ); + return 0; /* Value considered different */ + } + } + else + { + if( val1 > val2 ) + difference = (val1-val2)/val1; + else + difference = (val2-val1)/val2; + + temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; + if( temp <= periodToIgnore ) + { + /* Pretend it is fine. */ + return 1; + } + else + { + temp -= periodToIgnore; + tolerance = 0.5/temp; + } + + if( difference > tolerance ) + { + printf( "\nFail: Value out of tolerance range (%g,%g)\n", difference, tolerance ); + return 0; /* Out of tolerance... values are not equal. */ + } + } + + return 1; /* Value equal within tolerance. */ +} + +static TA_RetCode CallTestFunction( RangeTestFunction testFunction, + TA_Integer startIdx, + TA_Integer endIdx, + TA_Real *outputBuffer, + TA_Integer *outputBufferInt, + TA_Integer *outBegIdx, + TA_Integer *outNbElement, + TA_Integer *lookback, + void *opaqueData, + unsigned int outputNb, + unsigned int *isOutputInteger ) +{ + /* Call the function and do profiling. */ + TA_RetCode retCode; + double clockDelta; + +#ifdef WIN32 + LARGE_INTEGER startClock; + LARGE_INTEGER endClock; +#else + clock_t startClock; + clock_t endClock; +#endif + +#ifdef WIN32 + QueryPerformanceCounter(&startClock); +#else + startClock = clock(); +#endif + retCode = testFunction( startIdx, + endIdx, + outputBuffer, + outputBufferInt, + outBegIdx, + outNbElement, + lookback, + opaqueData, + outputNb, + isOutputInteger ); + + /* Profile only functions producing at least 20 values. */ + if( *outNbElement < 20 ) + { + return retCode; + } + +#ifdef WIN32 + QueryPerformanceCounter(&endClock); + clockDelta = (double)((__int64)endClock.QuadPart - (__int64) startClock.QuadPart); +#else + endClock = clock(); + clockDelta = (double)(endClock - startClock); +#endif + + if( clockDelta <= 0 ) + { + insufficientClockPrecision = 1; + } + else + { + if( clockDelta > worstProfiledCall ) + worstProfiledCall = clockDelta; + timeInProfiledCall += clockDelta; + nbProfiledCall++; + } + + return retCode; +} diff --git a/src/ta-lib/ta-lib.dpkg.in b/src/ta-lib/ta-lib.dpkg.in new file mode 100644 index 000000000..d41b81b2c --- /dev/null +++ b/src/ta-lib/ta-lib.dpkg.in @@ -0,0 +1,16 @@ +Package: ta-lib +Version: @VERSION@ +Section: dev-libs +Priority: optional +Architecture: i686 +Essential: no +Depends: +Pre-Depends: +Recommends: +Suggests: +Installed-Size: 3700000 +Maintainer: Mario Fortier [mfortier@ta-lib.org] +Conflicts: +Replaces: +Provides: +Description: TA-Lib provides common functions for the technical analysis of stock/future/commodity market data. diff --git a/src/ta-lib/ta-lib.pc.in b/src/ta-lib/ta-lib.pc.in new file mode 100644 index 000000000..b0a8ebd30 --- /dev/null +++ b/src/ta-lib/ta-lib.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/ta-lib + +Name: ta-lib +Description: TA-Lib : Technical Analysis Library +URL: https://github.com/TA-Lib/ta-lib +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lta-lib diff --git a/src/ta-lib/ta-lib.spec.in b/src/ta-lib/ta-lib.spec.in new file mode 100644 index 000000000..aaf6c45c4 --- /dev/null +++ b/src/ta-lib/ta-lib.spec.in @@ -0,0 +1,70 @@ +# List of contributors: +# +# Initial Name/description +# ------------------------------------------------------------------- +# MW Michael Williamson +# JS John Sheehy +# MF Mario Fortier + +# Change history: +# MMDDYY BY Description +# ------------------------------------------------------------------- +# 082104 MW Initial Version +# 012908 JS Enhancement + add x86_64 support +# 011024 MF Change source to Github, add URL + +%define ta_ver 0.6.4 + +Summary: Technical Analysis Library +Name: ta-lib +Version: %{ta_ver} +Release: 1 +License: BSD +Group: Development/Libraries +URL: https://github.com/ta-lib/ta-lib +Source: https://github.com/ta-lib/ta-lib/releases/download/v%{ta_ver}/ta-lib-%{ta_ver}-src.tar.gz +Prefix: /usr +Buildroot: %{_tmppath}/%{name}-%{version} + +%description + + TA-Lib provides common functions for the technical analysis of + stock/future/commodity market data. + + TA-Lib is intended for software developers looking to add technical + analysis functionality to their application. It is a library of more than + 150 functions that can be integrated in your application. It is not an + application by itself. + + + + +%prep +%setup -n %{name} + +%build + ./autogen.sh +%ifarch x86_64 + CFLAGS="-g0 -O2 -pipe" ./configure --prefix=%{prefix} --libdir=%{prefix}/lib64 +%else + CFLAGS="-g0 -O2 -pipe" ./configure --prefix=%{prefix} +%endif + make + +%install + [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} + make DESTDIR=${RPM_BUILD_ROOT} install + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%clean + [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} + +%files + %defattr(-,root,root) + %{prefix}/bin/* + %{prefix}/lib/* + %{prefix}/include/* + %{prefix}/share/* + diff --git a/src/ta_avgprice.c b/src/ta_avgprice.c new file mode 100644 index 000000000..20ffd379f --- /dev/null +++ b/src/ta_avgprice.c @@ -0,0 +1,67 @@ +/* Average Price + * + * Function Description + * + * x: An object coercible to double matrix on the form Open, High, Low, Close + * and Volume + * + * + * + * + */ +#include "lib.h" + +SEXP c_average_price(SEXP const x) { + if (TYPEOF(x) != REALSXP) + Rf_error("Input must be a numeric (double) matrix."); + SEXP dim = GET_DIM(x); + if (dim == R_NilValue || LENGTH(dim) < 2) + Rf_error("Input must have a dim attribute."); + int nrow = INTEGER(dim)[0]; + int ncol = INTEGER(dim)[1]; + if (ncol != 4) + Rf_error("Input matrix must have 4 columns: Open, High, Low, Close."); + + double *mat = REAL(x); + const double *inOpen = mat + 0 * nrow; + const double *inHigh = mat + 1 * nrow; + const double *inLow = mat + 2 * nrow; + const double *inClose = mat + 3 * nrow; + + ensure_ta_initialized(); + + int startIdx = 0; + int endIdx = nrow - 1; + int outBegIdx = 0, outNBElement = 0; + int maxSize = endIdx - startIdx + 1; + double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); + + TA_RetCode ret = TA_AVGPRICE(startIdx, endIdx, inOpen, inHigh, inLow, inClose, + &outBegIdx, &outNBElement, outReal); + if (ret != TA_SUCCESS) { + Rf_error("TA_AVGPRICE failed with code %d.", ret); + } + + SEXP result = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); + double *res = REAL(result); + + /* initialize to NA */ + for (int i = 0; i < nrow; ++i) + res[i] = NA_REAL; + + /* sanity-check the returned window before copying */ + if (outNBElement > 0) { + if (outBegIdx < 0 || outBegIdx + outNBElement > nrow) { + UNPROTECT(1); + Rf_error("TA_AVGPRICE returned invalid outBegIdx/outNBElement: " + "outBegIdx=%d outNBElement=%d", + outBegIdx, outNBElement); + } + for (int i = 0; i < outNBElement; ++i) { + res[outBegIdx + i] = outReal[i]; + } + } + + UNPROTECT(1); + return result; +} diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 000000000..2092ea20f --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,12 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + +library(testthat) +library(talib) + +test_check("talib") diff --git a/tests/testthat/test-average_price.R b/tests/testthat/test-average_price.R new file mode 100644 index 000000000..5634b2ced --- /dev/null +++ b/tests/testthat/test-average_price.R @@ -0,0 +1,24 @@ +## script: Average Price +## author: Serkan Korkmaz +## objective: +## +## +testthat::test_that(desc = "average_price()", code = { + + ## 1) generate matrix + ohlc <- data.frame( + Open = c(1,2,3), + High = c(2,3,4), + Low = c(0.5,1.5,2.5), + Close = c(1.5,2.5,3.5) + ) + + avg <- average_price(ohlc) + + ## 2) check values + testthat::expect_equal( + object = avg, + expected = c(1.25, 2.25, 3.25) + ) + +}) \ No newline at end of file From 1f4ce3e9957b252825f10621946bb4bf623ce65f Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 3 Aug 2025 21:28:59 +0200 Subject: [PATCH 002/166] Re-add ta-lib submodule --- .gitmodules | 3 + src/ta-lib | 1 + src/ta-lib/.editorconfig | 14 - src/ta-lib/.github/actions/diffs/action.yml | 34 - .../.github/workflows/dev-nightly-tests.yml | 114 - src/ta-lib/.github/workflows/docs.yml | 35 - .../.github/workflows/main-nightly-tests.yml | 92 - .../.github/workflows/release-step-1.yml | 214 - .../.github/workflows/release-step-2.yml | 87 - src/ta-lib/.gitignore | 89 - src/ta-lib/.vscode/settings.json | 9 - src/ta-lib/Makefile.am | 19 - src/ta-lib/README.md | 11 - src/ta-lib/VERSION | 1 - src/ta-lib/configure.ac | 51 - src/ta-lib/include/ta_abstract.h | 553 - src/ta-lib/include/ta_common.h | 160 - src/ta-lib/include/ta_defs.h | 328 - src/ta-lib/include/ta_func.h | 5346 ---------- src/ta-lib/include/ta_libc.h | 51 - src/ta-lib/local/include/ta-lib/ta_abstract.h | 553 - src/ta-lib/local/include/ta-lib/ta_common.h | 160 - src/ta-lib/local/include/ta-lib/ta_defs.h | 328 - src/ta-lib/local/include/ta-lib/ta_func.h | 5346 ---------- src/ta-lib/local/include/ta-lib/ta_libc.h | 51 - src/ta-lib/src/Makefile.am | 12 - src/ta-lib/src/ta_abstract/Makefile.am | 48 - src/ta-lib/src/ta_abstract/frames/ta_frame.c | 3469 ------- src/ta-lib/src/ta_abstract/frames/ta_frame.h | 1508 --- src/ta-lib/src/ta_abstract/ta_abstract.c | 1313 --- src/ta-lib/src/ta_abstract/ta_def_ui.c | 573 -- src/ta-lib/src/ta_abstract/ta_def_ui.h | 293 - src/ta-lib/src/ta_abstract/ta_frame_priv.h | 128 - src/ta-lib/src/ta_abstract/ta_func_api.c | 9159 ----------------- src/ta-lib/src/ta_abstract/ta_group_idx.c | 453 - src/ta-lib/src/ta_abstract/ta_java_defs.h | 366 - src/ta-lib/src/ta_abstract/tables/table_a.c | 441 - src/ta-lib/src/ta_abstract/tables/table_b.c | 196 - src/ta-lib/src/ta_abstract/tables/table_c.c | 1885 ---- src/ta-lib/src/ta_abstract/tables/table_d.c | 129 - src/ta-lib/src/ta_abstract/tables/table_e.c | 102 - src/ta-lib/src/ta_abstract/tables/table_f.c | 76 - src/ta-lib/src/ta_abstract/tables/table_g.c | 72 - src/ta-lib/src/ta_abstract/tables/table_h.c | 246 - src/ta-lib/src/ta_abstract/tables/table_i.c | 99 - src/ta-lib/src/ta_abstract/tables/table_j.c | 72 - src/ta-lib/src/ta_abstract/tables/table_k.c | 98 - src/ta-lib/src/ta_abstract/tables/table_l.c | 188 - src/ta-lib/src/ta_abstract/tables/table_m.c | 739 -- src/ta-lib/src/ta_abstract/tables/table_n.c | 127 - src/ta-lib/src/ta_abstract/tables/table_o.c | 96 - src/ta-lib/src/ta_abstract/tables/table_p.c | 186 - src/ta-lib/src/ta_abstract/tables/table_q.c | 72 - src/ta-lib/src/ta_abstract/tables/table_r.c | 206 - src/ta-lib/src/ta_abstract/tables/table_s.c | 630 -- src/ta-lib/src/ta_abstract/tables/table_t.c | 277 - src/ta-lib/src/ta_abstract/tables/table_u.c | 142 - src/ta-lib/src/ta_abstract/tables/table_v.c | 98 - src/ta-lib/src/ta_abstract/tables/table_w.c | 149 - src/ta-lib/src/ta_abstract/tables/table_x.c | 72 - src/ta-lib/src/ta_abstract/tables/table_y.c | 72 - src/ta-lib/src/ta_abstract/tables/table_z.c | 72 - src/ta-lib/src/ta_common/Makefile.am | 13 - src/ta-lib/src/ta_common/ta_global.c | 178 - src/ta-lib/src/ta_common/ta_global.h | 119 - src/ta-lib/src/ta_common/ta_magic_nb.h | 31 - src/ta-lib/src/ta_common/ta_memory.h | 362 - src/ta-lib/src/ta_common/ta_pragma.h | 87 - src/ta-lib/src/ta_common/ta_retcode.c | 109 - src/ta-lib/src/ta_common/ta_version.c | 97 - src/ta-lib/src/ta_func/Makefile.am | 171 - src/ta-lib/src/ta_func/ta_ACCBANDS.c | 518 - src/ta-lib/src/ta_func/ta_ACOS.c | 250 - src/ta-lib/src/ta_func/ta_AD.c | 327 - src/ta-lib/src/ta_func/ta_ADD.c | 260 - src/ta-lib/src/ta_func/ta_ADOSC.c | 495 - src/ta-lib/src/ta_func/ta_ADX.c | 798 -- src/ta-lib/src/ta_func/ta_ADXR.c | 387 - src/ta-lib/src/ta_func/ta_APO.c | 619 -- src/ta-lib/src/ta_func/ta_AROON.c | 463 - src/ta-lib/src/ta_func/ta_AROONOSC.c | 468 - src/ta-lib/src/ta_func/ta_ASIN.c | 249 - src/ta-lib/src/ta_func/ta_ATAN.c | 251 - src/ta-lib/src/ta_func/ta_ATR.c | 466 - src/ta-lib/src/ta_func/ta_AVGDEV.c | 331 - src/ta-lib/src/ta_func/ta_AVGPRICE.c | 291 - src/ta-lib/src/ta_func/ta_BBANDS.c | 659 -- src/ta-lib/src/ta_func/ta_BETA.c | 496 - src/ta-lib/src/ta_func/ta_BOP.c | 292 - src/ta-lib/src/ta_func/ta_CCI.c | 429 - src/ta-lib/src/ta_func/ta_CDL2CROWS.c | 369 - src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c | 397 - src/ta-lib/src/ta_func/ta_CDL3INSIDE.c | 388 - src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c | 410 - src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c | 351 - src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c | 465 - src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c | 489 - src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c | 473 - src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c | 561 - src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c | 389 - src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c | 396 - .../src/ta_func/ta_CDLCLOSINGMARUBOZU.c | 390 - .../src/ta_func/ta_CDLCONCEALBABYSWALL.c | 399 - src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c | 392 - src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c | 398 - src/ta-lib/src/ta_func/ta_CDLDOJI.c | 350 - src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c | 382 - src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c | 379 - src/ta-lib/src/ta_func/ta_CDLENGULFING.c | 361 - .../src/ta_func/ta_CDLEVENINGDOJISTAR.c | 441 - src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c | 427 - .../src/ta_func/ta_CDLGAPSIDESIDEWHITE.c | 398 - src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c | 378 - src/ta-lib/src/ta_func/ta_CDLHAMMER.c | 427 - src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c | 427 - src/ta-lib/src/ta_func/ta_CDLHARAMI.c | 401 - src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c | 396 - src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c | 372 - src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c | 412 - src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c | 470 - src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c | 384 - .../src/ta_func/ta_CDLIDENTICAL3CROWS.c | 433 - src/ta-lib/src/ta_func/ta_CDLINNECK.c | 387 - src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c | 403 - src/ta-lib/src/ta_func/ta_CDLKICKING.c | 420 - .../src/ta_func/ta_CDLKICKINGBYLENGTH.c | 421 - src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c | 375 - src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c | 378 - src/ta-lib/src/ta_func/ta_CDLLONGLINE.c | 372 - src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c | 373 - src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c | 359 - src/ta-lib/src/ta_func/ta_CDLMATHOLD.c | 470 - .../src/ta_func/ta_CDLMORNINGDOJISTAR.c | 439 - src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c | 425 - src/ta-lib/src/ta_func/ta_CDLONNECK.c | 386 - src/ta-lib/src/ta_func/ta_CDLPIERCING.c | 377 - src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c | 411 - .../src/ta_func/ta_CDLRISEFALL3METHODS.c | 437 - .../src/ta_func/ta_CDLSEPARATINGLINES.c | 419 - src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c | 403 - src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c | 372 - src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c | 356 - src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c | 469 - src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c | 365 - src/ta-lib/src/ta_func/ta_CDLTAKURI.c | 401 - src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c | 398 - src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c | 388 - src/ta-lib/src/ta_func/ta_CDLTRISTAR.c | 379 - src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c | 388 - .../src/ta_func/ta_CDLUPSIDEGAP2CROWS.c | 390 - .../src/ta_func/ta_CDLXSIDEGAP3METHODS.c | 363 - src/ta-lib/src/ta_func/ta_CEIL.c | 250 - src/ta-lib/src/ta_func/ta_CMO.c | 613 -- src/ta-lib/src/ta_func/ta_CORREL.c | 416 - src/ta-lib/src/ta_func/ta_COS.c | 250 - src/ta-lib/src/ta_func/ta_COSH.c | 250 - src/ta-lib/src/ta_func/ta_DEMA.c | 498 - src/ta-lib/src/ta_func/ta_DIV.c | 260 - src/ta-lib/src/ta_func/ta_DX.c | 705 -- src/ta-lib/src/ta_func/ta_EMA.c | 512 - src/ta-lib/src/ta_func/ta_EXP.c | 250 - src/ta-lib/src/ta_func/ta_FLOOR.c | 250 - src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c | 571 - src/ta-lib/src/ta_func/ta_HT_DCPHASE.c | 689 -- src/ta-lib/src/ta_func/ta_HT_PHASOR.c | 592 -- src/ta-lib/src/ta_func/ta_HT_SINE.c | 706 -- src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c | 651 -- src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c | 804 -- src/ta-lib/src/ta_func/ta_IMI.c | 340 - src/ta-lib/src/ta_func/ta_KAMA.c | 508 - src/ta-lib/src/ta_func/ta_LINEARREG.c | 365 - src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c | 365 - .../src/ta_func/ta_LINEARREG_INTERCEPT.c | 363 - src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c | 359 - src/ta-lib/src/ta_func/ta_LN.c | 250 - src/ta-lib/src/ta_func/ta_LOG10.c | 250 - src/ta-lib/src/ta_func/ta_MA.c | 488 - src/ta-lib/src/ta_func/ta_MACD.c | 806 -- src/ta-lib/src/ta_func/ta_MACDEXT.c | 721 -- src/ta-lib/src/ta_func/ta_MACDFIX.c | 314 - src/ta-lib/src/ta_func/ta_MAMA.c | 727 -- src/ta-lib/src/ta_func/ta_MAVP.c | 506 - src/ta-lib/src/ta_func/ta_MAX.c | 384 - src/ta-lib/src/ta_func/ta_MAXINDEX.c | 379 - src/ta-lib/src/ta_func/ta_MEDPRICE.c | 275 - src/ta-lib/src/ta_func/ta_MFI.c | 586 -- src/ta-lib/src/ta_func/ta_MIDPOINT.c | 356 - src/ta-lib/src/ta_func/ta_MIDPRICE.c | 369 - src/ta-lib/src/ta_func/ta_MIN.c | 384 - src/ta-lib/src/ta_func/ta_MININDEX.c | 379 - src/ta-lib/src/ta_func/ta_MINMAX.c | 441 - src/ta-lib/src/ta_func/ta_MINMAXINDEX.c | 441 - src/ta-lib/src/ta_func/ta_MINUS_DI.c | 716 -- src/ta-lib/src/ta_func/ta_MINUS_DM.c | 591 -- src/ta-lib/src/ta_func/ta_MOM.c | 346 - src/ta-lib/src/ta_func/ta_MULT.c | 260 - src/ta-lib/src/ta_func/ta_NATR.c | 499 - src/ta-lib/src/ta_func/ta_OBV.c | 291 - src/ta-lib/src/ta_func/ta_PLUS_DI.c | 716 -- src/ta-lib/src/ta_func/ta_PLUS_DM.c | 592 -- src/ta-lib/src/ta_func/ta_PPO.c | 367 - src/ta-lib/src/ta_func/ta_ROC.c | 357 - src/ta-lib/src/ta_func/ta_ROCP.c | 358 - src/ta-lib/src/ta_func/ta_ROCR.c | 359 - src/ta-lib/src/ta_func/ta_ROCR100.c | 358 - src/ta-lib/src/ta_func/ta_RSI.c | 617 -- src/ta-lib/src/ta_func/ta_SAR.c | 724 -- src/ta-lib/src/ta_func/ta_SAREXT.c | 1004 -- src/ta-lib/src/ta_func/ta_SIN.c | 250 - src/ta-lib/src/ta_func/ta_SINH.c | 250 - src/ta-lib/src/ta_func/ta_SMA.c | 431 - src/ta-lib/src/ta_func/ta_SQRT.c | 250 - src/ta-lib/src/ta_func/ta_STDDEV.c | 519 - src/ta-lib/src/ta_func/ta_STOCH.c | 820 -- src/ta-lib/src/ta_func/ta_STOCHF.c | 738 -- src/ta-lib/src/ta_func/ta_STOCHRSI.c | 522 - src/ta-lib/src/ta_func/ta_SUB.c | 261 - src/ta-lib/src/ta_func/ta_SUM.c | 344 - src/ta-lib/src/ta_func/ta_T3.c | 536 - src/ta-lib/src/ta_func/ta_TAN.c | 249 - src/ta-lib/src/ta_func/ta_TANH.c | 250 - src/ta-lib/src/ta_func/ta_TEMA.c | 492 - src/ta-lib/src/ta_func/ta_TRANGE.c | 340 - src/ta-lib/src/ta_func/ta_TRIMA.c | 659 -- src/ta-lib/src/ta_func/ta_TRIX.c | 461 - src/ta-lib/src/ta_func/ta_TSF.c | 365 - src/ta-lib/src/ta_func/ta_TYPPRICE.c | 283 - src/ta-lib/src/ta_func/ta_ULTOSC.c | 594 -- src/ta-lib/src/ta_func/ta_VAR.c | 498 - src/ta-lib/src/ta_func/ta_WCLPRICE.c | 282 - src/ta-lib/src/ta_func/ta_WILLR.c | 466 - src/ta-lib/src/ta_func/ta_WMA.c | 436 - src/ta-lib/src/ta_func/ta_utility.c | 134 - src/ta-lib/src/ta_func/ta_utility.h | 362 - src/ta-lib/src/tools/Makefile.am | 2 - src/ta-lib/src/tools/gen_code/Makefile.am | 16 - src/ta-lib/src/tools/gen_code/gen_code.c | 5005 --------- src/ta-lib/src/tools/post-build-bin.sh | 17 - src/ta-lib/src/tools/ta_regtest/Makefile.am | 43 - .../src/tools/ta_regtest/ta_error_number.h | 297 - .../src/tools/ta_regtest/ta_gDataClose.c | 723 -- .../src/tools/ta_regtest/ta_gDataHigh.c | 723 -- src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c | 719 -- .../src/tools/ta_regtest/ta_gDataOpen.c | 667 -- src/ta-lib/src/tools/ta_regtest/ta_regtest.c | 301 - .../src/tools/ta_regtest/ta_test_func.h | 28 - .../ta_regtest/ta_test_func/test_1in_1out.c | 507 - .../ta_regtest/ta_test_func/test_1in_2out.c | 469 - .../tools/ta_regtest/ta_test_func/test_adx.c | 682 -- .../ta_regtest/ta_test_func/test_avgdev.c | 256 - .../ta_regtest/ta_test_func/test_bbands.c | 533 - .../ta_test_func/test_candlestick.c | 744 -- .../tools/ta_regtest/ta_test_func/test_imi.c | 293 - .../tools/ta_regtest/ta_test_func/test_ma.c | 816 -- .../tools/ta_regtest/ta_test_func/test_macd.c | 603 -- .../ta_regtest/ta_test_func/test_minmax.c | 833 -- .../tools/ta_regtest/ta_test_func/test_mom.c | 553 - .../ta_regtest/ta_test_func/test_per_ema.c | 307 - .../ta_regtest/ta_test_func/test_per_hl.c | 640 -- .../ta_regtest/ta_test_func/test_per_hlc.c | 651 -- .../ta_regtest/ta_test_func/test_per_hlcv.c | 710 -- .../ta_regtest/ta_test_func/test_per_ohlc.c | 527 - .../tools/ta_regtest/ta_test_func/test_po.c | 440 - .../tools/ta_regtest/ta_test_func/test_rsi.c | 507 - .../tools/ta_regtest/ta_test_func/test_sar.c | 301 - .../ta_regtest/ta_test_func/test_stddev.c | 265 - .../ta_regtest/ta_test_func/test_stoch.c | 794 -- .../ta_regtest/ta_test_func/test_trange.c | 349 - .../src/tools/ta_regtest/ta_test_priv.h | 210 - .../src/tools/ta_regtest/test_abstract.c | 788 -- src/ta-lib/src/tools/ta_regtest/test_data.c | 145 - .../src/tools/ta_regtest/test_internals.c | 274 - src/ta-lib/src/tools/ta_regtest/test_util.c | 1338 --- src/ta-lib/ta-lib.dpkg.in | 16 - src/ta-lib/ta-lib.pc.in | 11 - src/ta-lib/ta-lib.spec.in | 70 - 276 files changed, 4 insertions(+), 132098 deletions(-) create mode 100644 .gitmodules create mode 160000 src/ta-lib delete mode 100644 src/ta-lib/.editorconfig delete mode 100644 src/ta-lib/.github/actions/diffs/action.yml delete mode 100644 src/ta-lib/.github/workflows/dev-nightly-tests.yml delete mode 100644 src/ta-lib/.github/workflows/docs.yml delete mode 100644 src/ta-lib/.github/workflows/main-nightly-tests.yml delete mode 100644 src/ta-lib/.github/workflows/release-step-1.yml delete mode 100644 src/ta-lib/.github/workflows/release-step-2.yml delete mode 100644 src/ta-lib/.gitignore delete mode 100644 src/ta-lib/.vscode/settings.json delete mode 100644 src/ta-lib/Makefile.am delete mode 100644 src/ta-lib/README.md delete mode 100644 src/ta-lib/VERSION delete mode 100644 src/ta-lib/configure.ac delete mode 100644 src/ta-lib/include/ta_abstract.h delete mode 100644 src/ta-lib/include/ta_common.h delete mode 100644 src/ta-lib/include/ta_defs.h delete mode 100644 src/ta-lib/include/ta_func.h delete mode 100644 src/ta-lib/include/ta_libc.h delete mode 100644 src/ta-lib/local/include/ta-lib/ta_abstract.h delete mode 100644 src/ta-lib/local/include/ta-lib/ta_common.h delete mode 100644 src/ta-lib/local/include/ta-lib/ta_defs.h delete mode 100644 src/ta-lib/local/include/ta-lib/ta_func.h delete mode 100644 src/ta-lib/local/include/ta-lib/ta_libc.h delete mode 100644 src/ta-lib/src/Makefile.am delete mode 100644 src/ta-lib/src/ta_abstract/Makefile.am delete mode 100644 src/ta-lib/src/ta_abstract/frames/ta_frame.c delete mode 100644 src/ta-lib/src/ta_abstract/frames/ta_frame.h delete mode 100644 src/ta-lib/src/ta_abstract/ta_abstract.c delete mode 100644 src/ta-lib/src/ta_abstract/ta_def_ui.c delete mode 100644 src/ta-lib/src/ta_abstract/ta_def_ui.h delete mode 100644 src/ta-lib/src/ta_abstract/ta_frame_priv.h delete mode 100644 src/ta-lib/src/ta_abstract/ta_func_api.c delete mode 100644 src/ta-lib/src/ta_abstract/ta_group_idx.c delete mode 100644 src/ta-lib/src/ta_abstract/ta_java_defs.h delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_a.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_b.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_c.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_d.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_e.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_f.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_g.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_h.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_i.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_j.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_k.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_l.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_m.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_n.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_o.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_p.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_q.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_r.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_s.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_t.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_u.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_v.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_w.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_x.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_y.c delete mode 100644 src/ta-lib/src/ta_abstract/tables/table_z.c delete mode 100644 src/ta-lib/src/ta_common/Makefile.am delete mode 100644 src/ta-lib/src/ta_common/ta_global.c delete mode 100644 src/ta-lib/src/ta_common/ta_global.h delete mode 100644 src/ta-lib/src/ta_common/ta_magic_nb.h delete mode 100644 src/ta-lib/src/ta_common/ta_memory.h delete mode 100644 src/ta-lib/src/ta_common/ta_pragma.h delete mode 100644 src/ta-lib/src/ta_common/ta_retcode.c delete mode 100644 src/ta-lib/src/ta_common/ta_version.c delete mode 100644 src/ta-lib/src/ta_func/Makefile.am delete mode 100644 src/ta-lib/src/ta_func/ta_ACCBANDS.c delete mode 100644 src/ta-lib/src/ta_func/ta_ACOS.c delete mode 100644 src/ta-lib/src/ta_func/ta_AD.c delete mode 100644 src/ta-lib/src/ta_func/ta_ADD.c delete mode 100644 src/ta-lib/src/ta_func/ta_ADOSC.c delete mode 100644 src/ta-lib/src/ta_func/ta_ADX.c delete mode 100644 src/ta-lib/src/ta_func/ta_ADXR.c delete mode 100644 src/ta-lib/src/ta_func/ta_APO.c delete mode 100644 src/ta-lib/src/ta_func/ta_AROON.c delete mode 100644 src/ta-lib/src/ta_func/ta_AROONOSC.c delete mode 100644 src/ta-lib/src/ta_func/ta_ASIN.c delete mode 100644 src/ta-lib/src/ta_func/ta_ATAN.c delete mode 100644 src/ta-lib/src/ta_func/ta_ATR.c delete mode 100644 src/ta-lib/src/ta_func/ta_AVGDEV.c delete mode 100644 src/ta-lib/src/ta_func/ta_AVGPRICE.c delete mode 100644 src/ta-lib/src/ta_func/ta_BBANDS.c delete mode 100644 src/ta-lib/src/ta_func/ta_BETA.c delete mode 100644 src/ta-lib/src/ta_func/ta_BOP.c delete mode 100644 src/ta-lib/src/ta_func/ta_CCI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL2CROWS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL3INSIDE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLDOJI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLENGULFING.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHAMMER.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHARAMI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLINNECK.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLKICKING.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLLONGLINE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLMATHOLD.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLONNECK.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLPIERCING.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLTAKURI.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLTRISTAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c delete mode 100644 src/ta-lib/src/ta_func/ta_CEIL.c delete mode 100644 src/ta-lib/src/ta_func/ta_CMO.c delete mode 100644 src/ta-lib/src/ta_func/ta_CORREL.c delete mode 100644 src/ta-lib/src/ta_func/ta_COS.c delete mode 100644 src/ta-lib/src/ta_func/ta_COSH.c delete mode 100644 src/ta-lib/src/ta_func/ta_DEMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_DIV.c delete mode 100644 src/ta-lib/src/ta_func/ta_DX.c delete mode 100644 src/ta-lib/src/ta_func/ta_EMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_EXP.c delete mode 100644 src/ta-lib/src/ta_func/ta_FLOOR.c delete mode 100644 src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c delete mode 100644 src/ta-lib/src/ta_func/ta_HT_DCPHASE.c delete mode 100644 src/ta-lib/src/ta_func/ta_HT_PHASOR.c delete mode 100644 src/ta-lib/src/ta_func/ta_HT_SINE.c delete mode 100644 src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c delete mode 100644 src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c delete mode 100644 src/ta-lib/src/ta_func/ta_IMI.c delete mode 100644 src/ta-lib/src/ta_func/ta_KAMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG.c delete mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c delete mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c delete mode 100644 src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c delete mode 100644 src/ta-lib/src/ta_func/ta_LN.c delete mode 100644 src/ta-lib/src/ta_func/ta_LOG10.c delete mode 100644 src/ta-lib/src/ta_func/ta_MA.c delete mode 100644 src/ta-lib/src/ta_func/ta_MACD.c delete mode 100644 src/ta-lib/src/ta_func/ta_MACDEXT.c delete mode 100644 src/ta-lib/src/ta_func/ta_MACDFIX.c delete mode 100644 src/ta-lib/src/ta_func/ta_MAMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_MAVP.c delete mode 100644 src/ta-lib/src/ta_func/ta_MAX.c delete mode 100644 src/ta-lib/src/ta_func/ta_MAXINDEX.c delete mode 100644 src/ta-lib/src/ta_func/ta_MEDPRICE.c delete mode 100644 src/ta-lib/src/ta_func/ta_MFI.c delete mode 100644 src/ta-lib/src/ta_func/ta_MIDPOINT.c delete mode 100644 src/ta-lib/src/ta_func/ta_MIDPRICE.c delete mode 100644 src/ta-lib/src/ta_func/ta_MIN.c delete mode 100644 src/ta-lib/src/ta_func/ta_MININDEX.c delete mode 100644 src/ta-lib/src/ta_func/ta_MINMAX.c delete mode 100644 src/ta-lib/src/ta_func/ta_MINMAXINDEX.c delete mode 100644 src/ta-lib/src/ta_func/ta_MINUS_DI.c delete mode 100644 src/ta-lib/src/ta_func/ta_MINUS_DM.c delete mode 100644 src/ta-lib/src/ta_func/ta_MOM.c delete mode 100644 src/ta-lib/src/ta_func/ta_MULT.c delete mode 100644 src/ta-lib/src/ta_func/ta_NATR.c delete mode 100644 src/ta-lib/src/ta_func/ta_OBV.c delete mode 100644 src/ta-lib/src/ta_func/ta_PLUS_DI.c delete mode 100644 src/ta-lib/src/ta_func/ta_PLUS_DM.c delete mode 100644 src/ta-lib/src/ta_func/ta_PPO.c delete mode 100644 src/ta-lib/src/ta_func/ta_ROC.c delete mode 100644 src/ta-lib/src/ta_func/ta_ROCP.c delete mode 100644 src/ta-lib/src/ta_func/ta_ROCR.c delete mode 100644 src/ta-lib/src/ta_func/ta_ROCR100.c delete mode 100644 src/ta-lib/src/ta_func/ta_RSI.c delete mode 100644 src/ta-lib/src/ta_func/ta_SAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_SAREXT.c delete mode 100644 src/ta-lib/src/ta_func/ta_SIN.c delete mode 100644 src/ta-lib/src/ta_func/ta_SINH.c delete mode 100644 src/ta-lib/src/ta_func/ta_SMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_SQRT.c delete mode 100644 src/ta-lib/src/ta_func/ta_STDDEV.c delete mode 100644 src/ta-lib/src/ta_func/ta_STOCH.c delete mode 100644 src/ta-lib/src/ta_func/ta_STOCHF.c delete mode 100644 src/ta-lib/src/ta_func/ta_STOCHRSI.c delete mode 100644 src/ta-lib/src/ta_func/ta_SUB.c delete mode 100644 src/ta-lib/src/ta_func/ta_SUM.c delete mode 100644 src/ta-lib/src/ta_func/ta_T3.c delete mode 100644 src/ta-lib/src/ta_func/ta_TAN.c delete mode 100644 src/ta-lib/src/ta_func/ta_TANH.c delete mode 100644 src/ta-lib/src/ta_func/ta_TEMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_TRANGE.c delete mode 100644 src/ta-lib/src/ta_func/ta_TRIMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_TRIX.c delete mode 100644 src/ta-lib/src/ta_func/ta_TSF.c delete mode 100644 src/ta-lib/src/ta_func/ta_TYPPRICE.c delete mode 100644 src/ta-lib/src/ta_func/ta_ULTOSC.c delete mode 100644 src/ta-lib/src/ta_func/ta_VAR.c delete mode 100644 src/ta-lib/src/ta_func/ta_WCLPRICE.c delete mode 100644 src/ta-lib/src/ta_func/ta_WILLR.c delete mode 100644 src/ta-lib/src/ta_func/ta_WMA.c delete mode 100644 src/ta-lib/src/ta_func/ta_utility.c delete mode 100644 src/ta-lib/src/ta_func/ta_utility.h delete mode 100644 src/ta-lib/src/tools/Makefile.am delete mode 100644 src/ta-lib/src/tools/gen_code/Makefile.am delete mode 100644 src/ta-lib/src/tools/gen_code/gen_code.c delete mode 100755 src/ta-lib/src/tools/post-build-bin.sh delete mode 100644 src/ta-lib/src/tools/ta_regtest/Makefile.am delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_error_number.h delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_regtest.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func.h delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/ta_test_priv.h delete mode 100644 src/ta-lib/src/tools/ta_regtest/test_abstract.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/test_data.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/test_internals.c delete mode 100644 src/ta-lib/src/tools/ta_regtest/test_util.c delete mode 100644 src/ta-lib/ta-lib.dpkg.in delete mode 100644 src/ta-lib/ta-lib.pc.in delete mode 100644 src/ta-lib/ta-lib.spec.in diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..08629fe76 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/ta-lib"] + path = src/ta-lib + url = https://github.com/TA-Lib/ta-lib.git diff --git a/src/ta-lib b/src/ta-lib new file mode 160000 index 000000000..c042ea3a7 --- /dev/null +++ b/src/ta-lib @@ -0,0 +1 @@ +Subproject commit c042ea3a7b38baa05b57764cdbb1288da9baf5bf diff --git a/src/ta-lib/.editorconfig b/src/ta-lib/.editorconfig deleted file mode 100644 index 875ae3fd1..000000000 --- a/src/ta-lib/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# top-most EditorConfig file -root = true - -# Python files -[*.py] -indent_style = space -indent_size = 4 -insert_final_newline = true -trim_trailing_whitespace = true - -# Custom settings for Visual Studio -[*.py] -editor.formatOnPaste = false -editor.formatOnSave = true diff --git a/src/ta-lib/.github/actions/diffs/action.yml b/src/ta-lib/.github/actions/diffs/action.yml deleted file mode 100644 index 54045e75b..000000000 --- a/src/ta-lib/.github/actions/diffs/action.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Detect Changes -description: Defines variables indicating the parts of the code that changed -outputs: - isDoc: - description: True when changes happened to some documentation - value: "${{ steps.diff.outputs.isDoc }}" - isRust: - description: True when changes happened to the Rust code - value: "${{ steps.diff.outputs.isRust }}" - isMove: - description: True when changes happened to the Move code - value: "${{ steps.diff.outputs.isMove }}" - -runs: - using: composite - steps: - - uses: actions/checkout@v3 - - name: Detect Changes - uses: dorny/paths-filter@v2.11.1 - id: diff - with: - filters: | - isRust: - - 'crates/**' - - '.github/workflows/rust.yml' - isDoc: - - 'docs/**' - - 'mkdocs.yml' - - '*.md' - - '.github/workflows/docs.yml' - isMove: - - 'move/sources/**' - - 'Cargo.toml' - - 'Cargo.lock' diff --git a/src/ta-lib/.github/workflows/dev-nightly-tests.yml b/src/ta-lib/.github/workflows/dev-nightly-tests.yml deleted file mode 100644 index 114ec2106..000000000 --- a/src/ta-lib/.github/workflows/dev-nightly-tests.yml +++ /dev/null @@ -1,114 +0,0 @@ -# Periodic tests of latest dev branch -# -# This is for early detection of breaking changes. -# - -name: dev nightly tests - -# Controls when the workflow will run -on: - schedule: - - cron: "0 5 * * *" # every day 5AM - - workflow_dispatch: - -jobs: - test: - name: Test ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-2022] - - steps: - - name: Checkout dev Branch - uses: actions/checkout@v4 - with: - ref: dev - - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Prepare shell envs (Linux) - if: runner.os == 'Linux' - shell: bash - run: | - echo "PYTHON=python3" >> $GITHUB_ENV - - - name: Build dist assets (Linux) - if: runner.os == 'Linux' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - sudo apt update - sudo apt install -y automake libtool autogen mcpp - sudo apt install -y openjdk-21-jdk - sudo apt install -y gcc-multilib - sudo apt install -y gcc-i686-linux-gnu - sudo apt install -y gcc-aarch64-linux-gnu - $PYTHON $GITHUB_WORKSPACE/scripts/package.py - $PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py - - - name: Prepare shell envs (Windows x64) - if: runner.os == 'Windows' - shell: cmd - run: | - :: call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt - :: set /p MSBUILD_PATH=> %GITHUB_ENV% - echo PYTHON=python >> %GITHUB_ENV% - - - name: Build dist assets (Windows x64) - if: runner.os == 'Windows' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: cmd - run: | - :: call "%VCVARSALL%" x64 - dotnet tool install --global wix - set PATH=%PATH%;%USERPROFILE%\.dotnet\tools - wix extension add --global WixToolset.UI.wixext - wix extension list --global - %PYTHON% %GITHUB_WORKSPACE%\scripts\package.py - %PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py - - - name: Check for changes and commit if any - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - dist_changes=$(git status --porcelain dist/) - ta_common_changes=$(git status --porcelain include/ta_common.h) - if [ -n "$dist_changes" ] || [ -n "$ta_common_changes" ]; then - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - echo "Changes detected by git status:" - if [ -n "$dist_changes" ]; then - echo "$dist_changes" - git add dist/ - fi - if [ -n "$ta_common_changes" ]; then - echo "$ta_common_changes" - git add include/ta_common.h - fi - - git commit -m "Update dist package (from ${{ matrix.os }})" - - # Check for unstaged changes and log them. - # (this help debugging because it should not happen) - if [ -n "$(git status --porcelain)" ]; then - echo "Unstaged changes detected:" - git status --porcelain - fi - - # Retry mechanism for handling concurrent pushes - for i in {1..5}; do - git pull --rebase --strategy-option=ours origin dev && git push origin dev && break || sleep 10 - done - else - echo "No changes detected in dist directory" - fi diff --git a/src/ta-lib/.github/workflows/docs.yml b/src/ta-lib/.github/workflows/docs.yml deleted file mode 100644 index 88ce88590..000000000 --- a/src/ta-lib/.github/workflows/docs.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Documentation - -on: - push: - branches: [main] - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - workflow_dispatch: - -permissions: - contents: write - -jobs: - diff: - runs-on: [ubuntu-latest] - outputs: - isDoc: ${{ steps.diff.outputs.isDoc }} - steps: - - uses: actions/checkout@v4 - - name: Detect Changes - uses: "./.github/actions/diffs" - id: diff - - deploy: - runs-on: ubuntu-latest - if: github.event.repository.fork == false - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - run: pip install mkdocs-material - - run: pip install mkdocs-git-revision-date-localized-plugin - - run: pip install mkdocs-minify-plugin - - run: mkdocs gh-deploy --force diff --git a/src/ta-lib/.github/workflows/main-nightly-tests.yml b/src/ta-lib/.github/workflows/main-nightly-tests.yml deleted file mode 100644 index 8d0c17c7e..000000000 --- a/src/ta-lib/.github/workflows/main-nightly-tests.yml +++ /dev/null @@ -1,92 +0,0 @@ -# Periodic tests of latest main branch -# - -name: main nightly tests - -# Controls when the workflow will run -on: - schedule: - - cron: "0 7 * * *" # every day 7AM - - workflow_dispatch: - -jobs: - test: - name: Test ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-2022] - - steps: - - name: Checkout main branch - uses: actions/checkout@v4 - with: - ref: main - - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Install Python dependencies - run: | - pip install PyGithub - - - name: Prepare shell envs (Linux) - if: runner.os == 'Linux' - shell: bash - run: | - echo "PYTHON=python3" >> $GITHUB_ENV - - - name: Build dist assets (Linux) - if: runner.os == 'Linux' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - sudo apt update - sudo apt install -y automake libtool autogen mcpp - sudo apt install -y openjdk-21-jdk - sudo apt install -y gcc-multilib - sudo apt install -y gcc-i686-linux-gnu - sudo apt install -y gcc-aarch64-linux-gnu - $PYTHON $GITHUB_WORKSPACE/scripts/package.py - $PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py - - - name: Prepare shell envs (Windows x64) - if: runner.os == 'Windows' - shell: cmd - run: | - :: call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt - :: set /p MSBUILD_PATH=> %GITHUB_ENV% - echo PYTHON=python >> %GITHUB_ENV% - - - name: Build dist assets (Windows x64) - if: runner.os == 'Windows' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: cmd - run: | - :: call "%VCVARSALL%" x64 - dotnet tool install --global wix - set PATH=%PATH%;%USERPROFILE%\.dotnet\tools - wix extension add --global WixToolset.UI.wixext - wix extension list --global - %PYTHON% %GITHUB_WORKSPACE%\scripts\package.py - %PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py - - - name: Verify dist assets are up-to-date - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - shell: bash - run: | - dist_changes=$(git status --porcelain dist/) - ta_common_changes=$(git status --porcelain include/ta_common.h) - if [ -n "$dist_changes" ] || [ -n "$ta_common_changes" ]; then - echo "Error: Unexpected changes in dist/ assets." - echo "The dev-nigthly-tests.yml should have updated these assets." - exit 1 - fi diff --git a/src/ta-lib/.github/workflows/release-step-1.yml b/src/ta-lib/.github/workflows/release-step-1.yml deleted file mode 100644 index ee4ce33e3..000000000 --- a/src/ta-lib/.github/workflows/release-step-1.yml +++ /dev/null @@ -1,214 +0,0 @@ -# Manually triggered for creating a TA-Lib draft release. -# -# You can re-run release-step-1 to refresh with the latest -# commit and assets. -# -# Once you are satisfied with the draft release (review the notes and all expected -# assets are attached), you can trigger release-step-2.yml to make the release public. -# -# More info: README-DEVS.md - -name: Release (step 1) - -# Controls when the workflow will run -on: - workflow_dispatch: - -jobs: - process_draft_release: - runs-on: ubuntu-latest - - steps: - - name: Checkout main branch - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 0 # Fetch all history for all tags - - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Prepare shell envs - shell: bash - run: | - VERSION=$(cat VERSION) - echo "VERSION=${VERSION}" >> $GITHUB_ENV - TAG="v${VERSION}" - echo "TAG=${TAG}" >> $GITHUB_ENV - echo "PYTHON=python3" >> $GITHUB_ENV - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Pre-release checks - shell: bash - run: | - $PYTHON $GITHUB_WORKSPACE/scripts/pre-release-checks.py - - - name: Ensure tagging on latest commit - shell: bash - env: - TAG: ${{ env.TAG }} - run: | - # Ensure latest commit is tag with '$TAG' - LATEST_COMMIT=$(git rev-parse HEAD) - if git rev-parse --verify "$TAG" >/dev/null 2>&1; then - EXISTING_TAG_COMMIT=$(git rev-parse --verify "$TAG") - if [ "$LATEST_COMMIT" != "$EXISTING_TAG_COMMIT" ]; then - echo "Deleting tag $TAG on older commit $EXISTING_TAG_COMMIT" - git tag -d "$TAG" - git push --delete origin "$TAG" - else - echo "Tag $TAG already exists for latest commit. No changes needed." - exit 0 - fi - fi - echo "Creating new tag $TAG on latest commit $LATEST_COMMIT" - git tag "$TAG" - git push origin "$TAG" - - - name: Ensure a draft release exists - id: release_vars - uses: actions/github-script@v7 - env: - TAG: ${{ env.TAG }} - with: - script: | - const fs = require('fs'); - const path = require('path'); - let tag_name = process.env.TAG; - console.log(`tag_name: ${tag_name}`); - let upload_url; - let release_id; - - try { - // Check if the release already exists - const { data: releases } = await github.rest.repos.listReleases({ - owner: context.repo.owner, - repo: context.repo.repo, - }); - let release = releases.find(release => release.tag_name === tag_name); - - if (release) { - console.log(`Existing release found: ${JSON.stringify(release, null, 2)}`); - if (!release.draft) { - console.log(`Release for tag ${tag_name} is already published. Exiting with error.`); - core.setFailed(`Release for tag ${tag_name} is already published.`); - return; - } - - // Update the release to point to potentially new commit (noop when no change) - release_id = release.id; - release = await github.rest.repos.updateRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: release_id, - tag_name: tag_name, - target_commitish: context.sha, - }); - - console.log(`updateRelease result: ${JSON.stringify(release, null, 2)}`); - - // Retrieve the latest draft release object to get the upload_url - const { data: updatedRelease } = await github.rest.repos.getRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: release_id, - }); - - console.log(`getRelease result: ${JSON.stringify(updatedRelease, null, 2)}`); - - upload_url = updatedRelease.upload_url; - } else { - // Read release notes from file - const release_notes_path = path.join(process.env.GITHUB_WORKSPACE, 'temp', 'DRAFT_RELEASE_NOTES.md'); - const release_notes = fs.readFileSync(release_notes_path, 'utf8'); - - // Release does not exists, so create it. - const response = await github.rest.repos.createRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - tag_name: tag_name, - name: tag_name, - body: release_notes, - draft: true, - prerelease: false, - }); - if (response.status >= 200 && response.status < 300 && response.data.upload_url) { - console.log(`updateRelease result: ${JSON.stringify(response, null, 2)}`); - upload_url = response.data.upload_url; - release_id = response.data.id; - console.log(`Draft release created with tag [${tag_name}]`); - } else { - core.setFailed(`Failed to create release with tag [${tag_name}] Status: ${response.status}`); - return; - } - } - } catch (error) { - core.setFailed(`Error while creating draft release: ${error.message}`); - return; - } - - console.log(`upload_url: ${upload_url}`); - console.log(`release_id: ${release_id}`); - core.setOutput("upload_url", upload_url); - core.setOutput("release_id", release_id); - - - name: Attach/Update assets with latest in dist/ - uses: actions/github-script@v7 - env: - UPLOAD_URL: ${{ steps.release_vars.outputs.upload_url }} - RELEASE_ID: ${{ steps.release_vars.outputs.release_id }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - script: | - const fs = require('fs'); - const path = require('path'); - const upload_url = process.env.UPLOAD_URL; - const release_id = process.env.RELEASE_ID; - const dist_dir = path.join(process.env.GITHUB_WORKSPACE, 'dist'); - - console.log(`upload_url: ${upload_url}`); - console.log(`release_id: ${release_id}`); - - const files = fs.readdirSync(dist_dir); - for (const file of files) { - const filePath = path.join(dist_dir, file); - const fileStat = fs.statSync(filePath); - - try { - // Check if the asset already exists and replace it if it does. - const { data: assets } = await github.rest.repos.listReleaseAssets({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: release_id, - }); - - const existingAsset = assets.find(asset => asset.name === file); - if (existingAsset) { - await github.rest.repos.deleteReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - asset_id: existingAsset.id, - }); - } - - // Upload the new asset - console.log(`Uploading asset: ${filePath}`); - - await github.rest.repos.uploadReleaseAsset({ - url: upload_url, - headers: { - 'content-type': 'application/octet-stream', - 'content-length': fileStat.size, - }, - name: file, - data: fs.createReadStream(filePath), - }); - - console.log(`Uploaded asset: ${file}`); - } catch (error) { - console.error(`Error processing file ${file}: ${error.message}`); - } - } diff --git a/src/ta-lib/.github/workflows/release-step-2.yml b/src/ta-lib/.github/workflows/release-step-2.yml deleted file mode 100644 index 8087ced06..000000000 --- a/src/ta-lib/.github/workflows/release-step-2.yml +++ /dev/null @@ -1,87 +0,0 @@ -# Upgrade a draft release to an official public release. -# -# More info: README-DEVS.md - -name: Release (step 2) - -# Controls when the workflow will run -on: - workflow_dispatch: - -jobs: - upgrade_draft_to_official: - runs-on: ubuntu-latest - - steps: - - name: Checkout main branch - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 0 # Fetch all history for all tags - - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Install Python dependencies - run: | - pip install PyGithub - - - name: Prepare shell envs - shell: bash - run: | - VERSION=$(cat VERSION) - echo "VERSION=${VERSION}" >> $GITHUB_ENV - TAG="v${VERSION}" - echo "TAG=${TAG}" >> $GITHUB_ENV - echo "PYTHON=python3" >> $GITHUB_ENV - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Pre-release checks - shell: bash - run: | - $PYTHON $GITHUB_WORKSPACE/scripts/pre-release-checks.py - - - name: Upgrade draft release to public release - id: release_vars - uses: actions/github-script@v7 - env: - TAG: ${{ env.TAG }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - script: | - const tag_name = process.env.TAG; - console.log(`tag_name: ${tag_name}`); - - try { - // Check if the draft release exists - const { data: releases } = await github.rest.repos.listReleases({ - owner: context.repo.owner, - repo: context.repo.repo, - }); - const release = releases.find(release => release.tag_name === tag_name); - - if (!release) { - core.setFailed(`No draft release found for tag ${tag_name}. Please run "Release (step 1)" first.`); - return; - } - - if (!release.draft) { - core.setFailed(`Release for tag ${tag_name} is already officially published.`); - return; - } - - // Publish the draft release - await github.rest.repos.updateRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: release.id, - draft: false, - }); - - console.log(`Published release for tag ${tag_name} completed`); - } catch (error) { - core.setFailed(`Error while publishing release: ${error.message}`); - } diff --git a/src/ta-lib/.gitignore b/src/ta-lib/.gitignore deleted file mode 100644 index f8380a809..000000000 --- a/src/ta-lib/.gitignore +++ /dev/null @@ -1,89 +0,0 @@ -*.o -*.lo -*.la -*.pc -*.m4 -Makefile -Makefile.in -.deps -.libs -.dirstamp -config.* -ta-lib.dpkg -ta-lib.spec -missing -ltmain.sh -libtool -install-sh -include/ta_config.* -include/stamp-h1 -depcomp -configure -compile -autom4te.cache -ar-lib -**/.history/ - -# TA-Lib tools (must be built by devs on its own platform) -src/tools/gen_code/gen_code -src/tools/ta_regtest/ta_regtest -bin/*.class -bin/gen_code* -bin/ta_* -!bin/HOLDER - -## TA-Lib misc. build and packaging artifacts -msbuild_path.txt -lib/ta_* -lib/ta-* -build/ta-lib-*.tar.gz -LICENSE.rtf - -## File system -.DS_Store -desktop.ini - -## User stuff... -node_modules -__pycache__ -venv -.venv -.env - -# Build files (from mkdocs) -/site -/build -/MANIFEST - -## Temporary files -*~ -\#* -\#*\# -.# -TODO -tmp -temp/ - -## Editors -*.swp -*.swo -Session.vim -.cproject -.idea -*.iml -.project -.favorites.json -.settings/ -.vscode/ltex.disabledRules.en-US.txt -.vscode/ltex.dictionary.en-US.txt - -# Visual Studio -.vs/ -out/ -*.vcxproj.user - -## MSVC Windows builds (debug info) -*.pdb - -# Never ignore .gitkeep files -!**/.gitkeep \ No newline at end of file diff --git a/src/ta-lib/.vscode/settings.json b/src/ta-lib/.vscode/settings.json deleted file mode 100644 index 1e845f0d0..000000000 --- a/src/ta-lib/.vscode/settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "files.associations": { - "stdlib.h": "c", - "random": "c", - "cstdlib": "c", - "string.h": "c", - "ta_memory.h": "c" - } -} diff --git a/src/ta-lib/Makefile.am b/src/ta-lib/Makefile.am deleted file mode 100644 index 2016e6381..000000000 --- a/src/ta-lib/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = foreign 1.4 -SUBDIRS = src src/tools - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = ta-lib.pc - -# Distribute all .h files in the src directory and its subdirectories -HEADER_FILES = $(shell find src -name '*.h') - -# Distribute some C files containing static data used for ta_regtest -GDATA_FILES = $(shell find . -name 'ta_gData*.c') - -# Distribute additional bash scripts needed to "make all" -BUILD_SHELL_FILES = src/tools/post-build-bin.sh - -# Add more files to EXTRA_DIST to be included on "make dist" -# This is only for files that are not auto-discovered by autotools. -EXTRA_DIST = $(HEADER_FILES) $(GDATA_FILES) $(BUILD_SHELL_FILES) VERSION diff --git a/src/ta-lib/README.md b/src/ta-lib/README.md deleted file mode 100644 index 45db60eac..000000000 --- a/src/ta-lib/README.md +++ /dev/null @@ -1,11 +0,0 @@ -[![Discord chat](https://img.shields.io/discord/1038616996062953554.svg?logo=discord&style=flat-square)](https://discord.gg/Erb6SwsVbH) - -[![main nightly tests](https://github.com/TA-Lib/ta-lib/actions/workflows/main-nightly-tests.yml/badge.svg)](https://github.com/TA-Lib/ta-lib/actions/workflows/main-nightly-tests.yml) [![dev nightly tests](https://github.com/TA-Lib/ta-lib/actions/workflows/dev-nightly-tests.yml/badge.svg)](https://github.com/TA-Lib/ta-lib/actions/workflows/dev-nightly-tests.yml) - -# TA-Lib - Technical Analysis Library -This is now the official home for C/C++ TA-Lib (instead of SourceForge). - -More info [https://ta-lib.org](https://ta-lib.org) - -# You want a new TA Function implemented? -First step is to document the algorithm, with a sample of input/output in the [ta-lib-proposal-drafts]( https://github.com/TA-Lib/ta-lib-proposal-drafts ) repos. diff --git a/src/ta-lib/VERSION b/src/ta-lib/VERSION deleted file mode 100644 index d2b13eb64..000000000 --- a/src/ta-lib/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.6.4 diff --git a/src/ta-lib/configure.ac b/src/ta-lib/configure.ac deleted file mode 100644 index e53c2f797..000000000 --- a/src/ta-lib/configure.ac +++ /dev/null @@ -1,51 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.71]) -AC_COPYRIGHT([(c) Mario Fortier 1999-2024]) -AC_INIT([ta-lib], m4_esyscmd([cat VERSION | tr -d '\n']), [https://github.com/TA-Lib/ta-lib/issues], [ta-lib], [https://github.com/TA-Lib/ta-lib]) -AC_CONFIG_MACRO_DIRS([m4]) -AC_CONFIG_SRCDIR([src/ta_func/ta_AD.c]) -AC_CONFIG_HEADERS([include/ta_config.h]) -AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror]) - -# Checks for programs. -AM_PROG_AR -AC_PROG_CC -LT_INIT - -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. -AC_CHECK_INCLUDES_DEFAULT -AC_PROG_EGREP - -AC_CHECK_HEADERS([float.h inttypes.h limits.h locale.h stddef.h stdint.h stdlib.h string.h unistd.h wchar.h wctype.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_STRUCT_TM -AC_C_VOLATILE -AC_CHECK_TYPES([ptrdiff_t]) - -# Checks for library functions. -AC_FUNC_STRCOLL -AC_FUNC_STRFTIME -AC_FUNC_STRTOD -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([floor isascii localeconv mblen memmove memset modf pow sqrt strcasecmp strchr strerror strncasecmp strrchr strstr strtol strtoul]) - -# Checks for libm -LT_LIB_M -AC_SUBST([LIBM]) - -# Versioning: -# Only change this if library is no longer -# ABI compatible with previous version -# (e.g. function declaration changed) -TALIB_LIBRARY_VERSION=0:0:0 - -AC_SUBST(TALIB_LIBRARY_VERSION) - -AC_CONFIG_FILES([Makefile src/Makefile src/ta_abstract/Makefile src/ta_common/Makefile src/ta_func/Makefile src/tools/Makefile src/tools/gen_code/Makefile src/tools/ta_regtest/Makefile ta-lib.pc ta-lib.spec ta-lib.dpkg]) -AC_OUTPUT diff --git a/src/ta-lib/include/ta_abstract.h b/src/ta-lib/include/ta_abstract.h deleted file mode 100644 index c6ceac3a3..000000000 --- a/src/ta-lib/include/ta_abstract.h +++ /dev/null @@ -1,553 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef TA_ABSTRACT_H -#define TA_ABSTRACT_H - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* This file defines the interface for calling all the TA functions without - * knowing at priori the parameters. - * - * This capability is particularly useful for an application who needs - * to support the complete list of TA functions without having to - * re-write new code each time a new function is added to TA-Lib. - * - * Example 1: - * Lets say you are doing a charting software. When the user select - * a price bar, a side list offers blindly all the TA functions - * that could be applied to a price bar. The user selects one of - * these, then a dialog open for allowing to adjust some parameter - * (TA-LIB will tell your software which parameter are needed and the - * valid range for each). Once all the parameter are set, you can - * call blindly the corresponding TA function. The returned - * information can then also blindly be drawn on the chart (some - * output flags allows to get some hint about how the data shall be - * displayed). - * The same "abstract" logic apply to all the TA functions. - * Some TA Functions works only on volume, or can work indiferently - * with any time serie data (the open, close, another indicator...). - * All the applicable functions to the currently selected/available - * data can be determined through this "virtual" interface. - * - * Example 2: - * Let's say you do not like the direct interface for - * calling the TA Functions, you can write a code that - * re-generate a different interface. This is already - * done even for the 'C' interface (ta_func.h is generated). - * - * Example 3: - * With the abstract interface you can easily generate - * glue code. Like generating an interface that integrates - * well within Perl... see the project SWIG if you are - * interested by such things. - * - * The abstract interface is used within TA-Lib to perform at least - * the following: - * - used by gen_code to generate all the glue code. - * - used to generate a XML representation of the TA functions. - */ - -/* The following functions are used to obtain the name of all the - * TA function groups ("Market Strength", "Trend Indicator" etc...). - * - * On success, it becomes the responsibility of the caller to - * call TA_GroupTableFree once the 'table' is no longuer needed. - * - * Example: - * This code snippet will print out the name of all the supported - * function group available: - * - * TA_StringTable *table; - * TA_RetCode retCode; - * int i; - * - * retCode = TA_GroupTableAlloc( &table ); - * - * if( retCode == TA_SUCCESS ) - * { - * for( i=0; i < table->size; i++ ) - * printf( "%s\n", table->string[i] ); - * - * TA_GroupTableFree( table ); - * } - */ -TA_LIB_API TA_RetCode TA_GroupTableAlloc( TA_StringTable **table ); -TA_LIB_API TA_RetCode TA_GroupTableFree ( TA_StringTable *table ); - -/* The following functions are used to obtain the name of all the - * function provided in a certain group. - * - * On success, it becomes the responsibility of the caller to - * call TA_FuncTableFree once the 'table' is no longuer needed. - * - * Example: - * This code snippet will print out the name of all the supported - * function in the "market strength" category: - * - * TA_StringTable *table; - * TA_RetCode retCode; - * int i; - * - * retCode = TA_FuncTableAlloc( "Market Strength", &table ); - * - * if( retCode == TA_SUCCESS ) - * { - * for( i=0; i < table->size; i++ ) - * printf( "%s\n", table->string[i] ); - * - * TA_FuncTableFree( table ); - * } - */ -TA_LIB_API TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table ); -TA_LIB_API TA_RetCode TA_FuncTableFree ( TA_StringTable *table ); - -/* Using the name, you can obtain an handle unique to this function. - * This handle is further used for obtaining information on the - * parameters needed and also for potentially calling this TA function. - * - * For convenience, this handle can also be found in - * the TA_FuncInfo structure (see below). - */ -typedef unsigned int TA_FuncHandle; -TA_LIB_API TA_RetCode TA_GetFuncHandle( const char *name, - const TA_FuncHandle **handle ); - -/* Get some basic information about a function. - * - * A const pointer will be set on the corresponding TA_FuncInfo structure. - * The whole structure are hard coded constants and it can be assumed they - * will not change at runtime. - * - * Example: - * Print the number of inputs used by the MA (moving average) function. - * - * TA_RetCode retCode; - * const TA_FuncHandle *handle; - * const TA_FuncInfo *theInfo; - * - * retCode = TA_GetFuncHandle( "MA", &handle ); - * - * if( retCode == TA_SUCCESS ) - * { - * retCode = TA_GetFuncInfo( handle, &theInfo ); - * if( retCode == TA_SUCCESS ) - * printf( "Nb Input = %d\n", theInfo->nbInput ); - * } - * - */ -typedef int TA_FuncFlags; -#define TA_FUNC_FLG_OVERLAP 0x01000000 /* Output scale same as input data. */ -#define TA_FUNC_FLG_VOLUME 0x04000000 /* Output shall be over the volume data. */ -#define TA_FUNC_FLG_UNST_PER 0x08000000 /* Indicate if this function have an unstable - * initial period. Some additional code exist - * for these functions for allowing to set that - * unstable period. See Documentation. - */ -#define TA_FUNC_FLG_CANDLESTICK 0x10000000 /* Output shall be a candlestick */ - -typedef struct TA_FuncInfo -{ - /* Constant information about the function. The - * information found in this structure is guarantee - * to not change at runtime. - */ - const char * name; - const char * group; - - const char * hint; - const char * camelCaseName; - TA_FuncFlags flags; - - unsigned int nbInput; - unsigned int nbOptInput; - unsigned int nbOutput; - - const TA_FuncHandle *handle; -} TA_FuncInfo; - -TA_LIB_API TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle, - const TA_FuncInfo **funcInfo ); - - -/* An alternate way to access all the functions is through the - * use of the TA_ForEachFunc(). You can setup a function to be - * call back for each TA function in the TA-Lib. - * - * Example: - * This code will print the group and name of all available functions. - * - * void printFuncInfo( const TA_FuncInfo *funcInfo, void *opaqueData ) - * { - * printf( "Group=%s Name=%s\n", funcInfo->group, funcInfo->name ); - * } - * - * void displayListOfTAFunctions( void ) - * { - * TA_ForEachFunc( printFuncInfo, NULL ); - * } - */ -typedef void (*TA_CallForEachFunc)(const TA_FuncInfo *funcInfo, void *opaqueData ); - -TA_LIB_API TA_RetCode TA_ForEachFunc( TA_CallForEachFunc functionToCall, void *opaqueData ); - -/* The next section includes the data structures and function allowing to - * proceed with the call of a Tech. Analysis function. - * - * At first, it may seems a little bit complicated, but it is worth to take the - * effort to learn about it. Once you succeed to interface with TA-Abstract you get - * access to the complete library of TA functions at once without further effort. - */ - -/* Structures representing extended information on a parameter. */ - -typedef struct TA_RealRange -{ - TA_Real min; - TA_Real max; - TA_Integer precision; /* nb of digit after the '.' */ - - /* The following suggested value are used by Tech. Analysis software - * doing parameter "optimization". Can be ignored by most user. - */ - TA_Real suggested_start; - TA_Real suggested_end; - TA_Real suggested_increment; -} TA_RealRange; - -typedef struct TA_IntegerRange -{ - TA_Integer min; - TA_Integer max; - - /* The following suggested value are used by Tech. Analysis software - * doing parameter "optimization". Can be ignored by most user. - */ - TA_Integer suggested_start; - TA_Integer suggested_end; - TA_Integer suggested_increment; -} TA_IntegerRange; - -typedef struct TA_RealDataPair -{ - /* A TA_Real value and the corresponding string. */ - TA_Real value; - const char *string; -} TA_RealDataPair; - -typedef struct TA_IntegerDataPair -{ - /* A TA_Integer value and the corresponding string. */ - TA_Integer value; - const char *string; -} TA_IntegerDataPair; - -typedef struct TA_RealList -{ - const TA_RealDataPair *data; - unsigned int nbElement; -} TA_RealList; - -typedef struct TA_IntegerList -{ - const TA_IntegerDataPair *data; - unsigned int nbElement; -} TA_IntegerList; - -typedef enum -{ - TA_Input_Price, - TA_Input_Real, - TA_Input_Integer -} TA_InputParameterType; - -typedef enum -{ - TA_OptInput_RealRange, - TA_OptInput_RealList, - TA_OptInput_IntegerRange, - TA_OptInput_IntegerList -} TA_OptInputParameterType; - -typedef enum -{ - TA_Output_Real, - TA_Output_Integer -} TA_OutputParameterType; - -/* When the input is a TA_Input_Price, the following - * TA_InputFlags indicates the required components. - * These can be combined for functions requiring more - * than one component. - * - * Example: - * (TA_IN_PRICE_OPEN|TA_IN_PRICE_HIGH) - * Indicates that the functions requires two inputs - * that must be specifically the open and the high. - */ -typedef int TA_InputFlags; -#define TA_IN_PRICE_OPEN 0x00000001 -#define TA_IN_PRICE_HIGH 0x00000002 -#define TA_IN_PRICE_LOW 0x00000004 -#define TA_IN_PRICE_CLOSE 0x00000008 -#define TA_IN_PRICE_VOLUME 0x00000010 -#define TA_IN_PRICE_OPENINTEREST 0x00000020 -#define TA_IN_PRICE_TIMESTAMP 0x00000040 - -/* The following are flags for optional inputs. - * - * TA_OPTIN_IS_PERCENT: Input is a percentage. - * - * TA_OPTIN_IS_DEGREE: Input is a degree (0-360). - * - * TA_OPTIN_IS_CURRENCY: Input is a currency. - * - * TA_OPTIN_ADVANCED: - * Used for parameters who are rarely changed. - * Most application can hide these advanced optional inputs to their - * end-user (or make it harder to change). - */ -typedef int TA_OptInputFlags; -#define TA_OPTIN_IS_PERCENT 0x00100000 /* Input is a percentage. */ -#define TA_OPTIN_IS_DEGREE 0x00200000 /* Input is a degree (0-360). */ -#define TA_OPTIN_IS_CURRENCY 0x00400000 /* Input is a currency. */ -#define TA_OPTIN_ADVANCED 0x01000000 - - -/* The following are flags giving hint on what - * could be done with the output. - */ -typedef int TA_OutputFlags; -#define TA_OUT_LINE 0x00000001 /* Suggest to display as a connected line. */ -#define TA_OUT_DOT_LINE 0x00000002 /* Suggest to display as a 'dotted' line. */ -#define TA_OUT_DASH_LINE 0x00000004 /* Suggest to display as a 'dashed' line. */ -#define TA_OUT_DOT 0x00000008 /* Suggest to display with dots only. */ -#define TA_OUT_HISTO 0x00000010 /* Suggest to display as an histogram. */ -#define TA_OUT_PATTERN_BOOL 0x00000020 /* Indicates if pattern exists (!=0) or not (0) */ -#define TA_OUT_PATTERN_BULL_BEAR 0x00000040 /* =0 no pattern, > 0 bullish, < 0 bearish */ -#define TA_OUT_PATTERN_STRENGTH 0x00000080 /* =0 neutral, ]0..100] getting bullish, ]100..200] bullish, [-100..0[ getting bearish, [-200..100[ bearish */ -#define TA_OUT_POSITIVE 0x00000100 /* Output can be positive */ -#define TA_OUT_NEGATIVE 0x00000200 /* Output can be negative */ -#define TA_OUT_ZERO 0x00000400 /* Output can be zero */ -#define TA_OUT_UPPER_LIMIT 0x00000800 /* Indicates that the values represent an upper limit. */ -#define TA_OUT_LOWER_LIMIT 0x00001000 /* Indicates that the values represent a lower limit. */ - - -/* The following 3 structures will exist for each input, optional - * input and output. - * - * These structures tells you everything you need to know for identifying - * the parameters applicable to the function. - */ -typedef struct TA_InputParameterInfo -{ - TA_InputParameterType type; - const char *paramName; - TA_InputFlags flags; - -} TA_InputParameterInfo; - -typedef struct TA_OptInputParameterInfo -{ - TA_OptInputParameterType type; - const char *paramName; - TA_OptInputFlags flags; - - const char *displayName; - const void *dataSet; - TA_Real defaultValue; - const char *hint; - const char *helpFile; - -} TA_OptInputParameterInfo; - -typedef struct TA_OutputParameterInfo -{ - TA_OutputParameterType type; - const char *paramName; - TA_OutputFlags flags; - -} TA_OutputParameterInfo; - -/* Functions to get a const ptr on the "TA_XXXXXXParameterInfo". - * Max value for the 'paramIndex' can be found in the TA_FuncInfo structure. - * The 'handle' can be obtained from TA_GetFuncHandle or from a TA_FuncInfo. - * - * Short example: - * - * void displayInputType( const TA_FuncInfo *funcInfo ) - * { - * unsigned int i; - * const TA_InputParameterInfo *paramInfo; - * - * for( i=0; i < funcInfo->nbInput; i++ ) - * { - * TA_GetInputParameterInfo( funcInfo->handle, i, ¶mInfo ); - * switch( paramInfo->type ) - * { - * case TA_Input_Price: - * printf( "This function needs price bars as input\n" ); - * break; - * case TA_Input_Real: - * printf( "This function needs an array of floats as input\n" ); - * break; - * (... etc. ...) - * } - * } - * } - */ -TA_LIB_API TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_InputParameterInfo **info ); - -TA_LIB_API TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_OptInputParameterInfo **info ); - -TA_LIB_API TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_OutputParameterInfo **info ); - -/* Alloc a structure allowing to build the list of parameters - * for doing a call. - * - * All input and output parameters must be setup. If not, TA_BAD_PARAM - * will be returned when TA_CallFunc is called. - * - * The optional input are not required to be setup. A default value - * will always be used in that case. - * - * If there is an attempts to set a parameter with the wrong function - * (and thus the wrong type), TA_BAD_PARAM will be immediatly returned. - * - * Although this mechanism looks complicated, it is written for being fairly solid. - * If you provide a wrong parameter value, or wrong type, or wrong pointer etc. the - * library shall return TA_BAD_PARAM or TA_BAD_OBJECT and not hang. - */ -typedef struct TA_ParamHolder -{ - /* Implementation is hidden. */ - void *hiddenData; -} TA_ParamHolder; - -TA_LIB_API TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle, - TA_ParamHolder **allocatedParams ); - -TA_LIB_API TA_RetCode TA_ParamHolderFree( TA_ParamHolder *params ); - -/* Setup the values of the data input parameters. - * - * paramIndex is zero for the first input. - */ -TA_LIB_API TA_RetCode TA_SetInputParamIntegerPtr( TA_ParamHolder *params, - unsigned int paramIndex, - const TA_Integer *value ); - -TA_LIB_API TA_RetCode TA_SetInputParamRealPtr( TA_ParamHolder *params, - unsigned int paramIndex, - const TA_Real *value ); - -TA_LIB_API TA_RetCode TA_SetInputParamPricePtr( TA_ParamHolder *params, - unsigned int paramIndex, - const TA_Real *open, - const TA_Real *high, - const TA_Real *low, - const TA_Real *close, - const TA_Real *volume, - const TA_Real *openInterest ); - -/* Setup the values of the optional input parameters. - * If an optional input is not set, a default value will be used. - * - * paramIndex is zero for the first optional input. - */ -TA_LIB_API TA_RetCode TA_SetOptInputParamInteger( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Integer optInValue ); - -TA_LIB_API TA_RetCode TA_SetOptInputParamReal( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Real optInValue ); - -/* Setup the parameters indicating where to store the output. - * - * The caller is responsible to allocate sufficient memory. A safe bet is to - * always do: nb of output elements == (endIdx-startIdx+1) - * - * paramIndex is zero for the first output. - * - */ -TA_LIB_API TA_RetCode TA_SetOutputParamIntegerPtr( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Integer *out ); - -TA_LIB_API TA_RetCode TA_SetOutputParamRealPtr( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Real *out ); - -/* Once the optional parameter are set, it is possible to - * get the lookback for this call. This information can be - * used to calculate the optimal size for the output buffers. - * (See the documentation for method to calculate the output size). - */ -TA_LIB_API TA_RetCode TA_GetLookback( const TA_ParamHolder *params, - TA_Integer *lookback ); - -/* Finally, call the TA function with the parameters. - * - * The TA function who is going to be called was specified - * when the TA_ParamHolderAlloc was done. - */ -TA_LIB_API TA_RetCode TA_CallFunc( const TA_ParamHolder *params, - TA_Integer startIdx, - TA_Integer endIdx, - TA_Integer *outBegIdx, - TA_Integer *outNbElement ); - - -/* Return XML representation of all the TA functions. - * The returned array is the same as the ta_func_api.xml file. - */ -TA_LIB_API const char *TA_FunctionDescriptionXML( void ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/ta-lib/include/ta_common.h b/src/ta-lib/include/ta_common.h deleted file mode 100644 index 2679a5bd9..000000000 --- a/src/ta-lib/include/ta_common.h +++ /dev/null @@ -1,160 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_COMMON_H -#define TA_COMMON_H - -/* The following macros are used to return internal errors. - * The Id can be from 1 to 999 and translate to the user - * as the return code 5000 to 5999. - * - * Everytime you wish to add a new fatal error code, - * use the "NEXT AVAILABLE NUMBER" and increment the - * number in this file. - * - * NEXT AVAILABLE NUMBER: 181 - */ -#define TA_INTERNAL_ERROR(Id) ((TA_RetCode)(TA_INTERNAL_ERROR+Id)) - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#ifndef TA_DEFS_H - #include "ta_defs.h" -#endif - -/* Some functions to get the version of TA-Lib. - * - * Format is "Major.Minor.Patch (Month Day Year Hour:Min:Sec)" - * - * Example: "1.2.0 (Jan 17 2004 23:59:59)" - * - * Major increments indicates an "Highly Recommended" update. - * - * Minor increments indicates arbitrary milestones in the - * development of the next major version. - * - * Patch are fixes to a "Major.Minor" release. - */ -TA_LIB_API const char *TA_GetVersionString( void ); - -/* Get individual component of the Version string */ -TA_LIB_API const char *TA_GetVersionMajor ( void ); -TA_LIB_API const char *TA_GetVersionMinor ( void ); -TA_LIB_API const char *TA_GetVersionPatch ( void ); -TA_LIB_API const char *TA_GetVersionDate ( void ); -TA_LIB_API const char *TA_GetVersionTime ( void ); - -/* Deprecated */ -TA_LIB_API const char *TA_GetVersionBuild ( void ); -TA_LIB_API const char *TA_GetVersionExtra ( void ); - -/* Misc. declaration used throughout the library code. */ -typedef double TA_Real; -typedef int TA_Integer; - -/* General purpose structure containing an array of string. - * - * Example of usage: - * void printStringTable( TA_StringTable *table ) - * { - * int i; - * for( i=0; i < table->size; i++ ) - * cout << table->string[i] << endl; - * } - * - */ -typedef struct TA_StringTable -{ - unsigned int size; /* Number of string. */ - const char **string; /* Pointer to the strings. */ - - /* Hidden data for internal use by TA-Lib. Do not modify. */ - void *hiddenData; -} TA_StringTable; -/* End-user can get additional information related to a TA_RetCode. - * - * Example: - * TA_RetCodeInfo info; - * - * retCode = TA_Initialize( ... ); - * - * if( retCode != TA_SUCCESS ) - * { - * TA_SetRetCodeInfo( retCode, &info ); - * printf( "Error %d(%s): %s\n", - * retCode, - * info.enumStr, - * info.infoStr ); - * } - * - * Would display: - * "Error 1(TA_LIB_NOT_INITIALIZE): TA_Initialize was not sucessfully called" - */ -typedef struct TA_RetCodeInfo -{ - const char *enumStr; /* Like "TA_LIB_NOT_INITIALIZE" */ - const char *infoStr; /* Like "TA_Initialize was not successfully called" */ -} TA_RetCodeInfo; - -/* Info is always returned, even when 'theRetCode' is invalid. */ -TA_LIB_API void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo ); - -/* TA_Initialize() initialize the ressources used by TA-Lib. This - * function must be called once prior to any other functions declared in - * this file. - * - * TA_Shutdown() allows to free all ressources used by TA-Lib. Following - * a shutdown, TA_Initialize() must be called again for re-using TA-Lib. - * - * TA_Shutdown() should be called prior to exiting the application code. - */ -TA_LIB_API TA_RetCode TA_Initialize( void ); -TA_LIB_API TA_RetCode TA_Shutdown( void ); - -/* TA_LIB_SOURCES_DIGEST helps for TA-Lib automated maintenance. - * - * This value is updated whenever a make, cmake or any source files - * modification should trig a repackaging of TA-Lib. - */ -#define TA_LIB_SOURCES_DIGEST f56bc6c0c0d72f1ee648897220e3ec3f - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/ta-lib/include/ta_defs.h b/src/ta-lib/include/ta_defs.h deleted file mode 100644 index bae153c96..000000000 --- a/src/ta-lib/include/ta_defs.h +++ /dev/null @@ -1,328 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_DEFS_H -#define TA_DEFS_H - -/*** The following block of code is to define: - *** - *** UInt32 : 32 bits unsigned integer. - *** Int32 : 32 bits signed integer. - *** UInt64 : 64 bits unsigned integer. - *** Int64 : 64 bits signed integer. - *** - *** INT_MIN : The minimal value for Int32 - *** INT_MAX : The maximal value for Int32 - ***/ -#ifndef FD_DEFS_H - #if defined( _MANAGED ) - /* Int32, UInt32, Int64 and UInt64 are built-in for .NET */ - #define INT_MIN (Int32::MinValue) - #define INT_MAX (Int32::MaxValue) - #elif defined( _JAVA ) || defined( _RUST ) - #define INT_MIN Integer.MIN_VALUE - #define INT_MAX Integer.MAX_VALUE - #else - #include - - /* Identify if 64 bits platform with __64BIT__. - * Can also be done from compiler command line. - */ - #if defined(_WIN64) - #define __64BIT__ 1 - #endif - - #if defined( __LP64__ ) || defined( _LP64 ) - #define __64BIT__ 1 - #endif - - /* Check also for some known GCC def for 64 bits platform. */ - #if defined(__alpha__)\ - ||defined(__ia64__)\ - ||defined(__ppc64__)\ - ||defined(__s390x__)\ - ||defined(__x86_64__) - #define __64BIT__ 1 - #endif - - #if !defined(__MACTYPES__) - typedef signed int Int32; - typedef unsigned int UInt32; - - #if defined(_WIN32) || defined(_WIN64) - /* See "Windows Data Types". Platform SDK. MSDN documentation. */ - typedef signed __int64 Int64; - typedef unsigned __int64 UInt64; - #else - #if defined(__64BIT__) - /* Standard LP64 model for 64 bits Unix platform. */ - typedef signed long Int64; - typedef unsigned long UInt64; - #else - /* Standard ILP32 model for 32 bits Unix platform. */ - typedef signed long long Int64; - typedef unsigned long long UInt64; - #endif - #endif - #endif - #endif -#endif - -/* Enumeration and macros to abstract syntax differences - * between C, C++, managed C++ and Java. - */ -#if defined( _MANAGED ) - - /* Enumeration abstraction */ - #define ENUM_BEGIN(w) enum class w { - #define ENUM_DEFINE(x,y) y - #define ENUM_VALUE(w,x,y) (w::y) - #define ENUM_CASE(w,x,y) (w::y) - #define ENUM_DECLARATION(w) w - #define ENUM_END(w) }; - - /* Structure abstraction */ - #define STRUCT_BEGIN(x) struct x { - #define STRUCT_END(x) }; - - /* Pointer/reference abstraction */ - #define VALUE_HANDLE_INT(name) int name - #define VALUE_HANDLE_DEREF(name) name - #define VALUE_HANDLE_DEREF_TO_ZERO(name) name = 0 - #define VALUE_HANDLE_OUT(name) name - - #define VALUE_HANDLE_GET(name) name - #define VALUE_HANDLE_SET(name,x) name = x - - /* Misc. */ - #define CONSTANT_DOUBLE(x) const double x - #define NAMESPACE(x) x:: - #define UNUSED_VARIABLE(x) (void)x - - #define TA_LIB_API - -#elif defined( _JAVA ) || defined( _RUST ) - - #define ENUM_BEGIN(w) public enum w { - #define ENUM_DEFINE(x,y) y - #define ENUM_VALUE(w,x,y) w.y - #define ENUM_CASE(w,x,y) y - #define ENUM_DECLARATION(w) w - #define ENUM_END(w) }; - - #define STRUCT_BEGIN(x) public class x { - #define STRUCT_END(x) }; - - #define VALUE_HANDLE_INT(name) MInteger name = new MInteger() - #define VALUE_HANDLE_DEREF(name) name.value - #define VALUE_HANDLE_DEREF_TO_ZERO(name) name.value = 0 - #define VALUE_HANDLE_OUT(name) name - - #define VALUE_HANDLE_GET(name) name.value - #define VALUE_HANDLE_SET(name,x) name.value = x - - #define CONSTANT_DOUBLE(x) final double x - #define NAMESPACE(x) x. - #define UNUSED_VARIABLE(x) - - #define TA_LIB_API - -#else - - #define ENUM_BEGIN(w) typedef enum { - #define ENUM_DEFINE(x,y) x - #define ENUM_VALUE(w,x,y) x - #define ENUM_CASE(w,x,y) x - #define ENUM_DECLARATION(w) TA_##w - #define ENUM_END(w) } TA_##w; - - #define STRUCT_BEGIN(x) typedef struct { - #define STRUCT_END(x) } x; - - #define VALUE_HANDLE_INT(name) int name - #define VALUE_HANDLE_DEREF(name) (*name) - #define VALUE_HANDLE_DEREF_TO_ZERO(name) (*name) = 0 - #define VALUE_HANDLE_OUT(name) &name - - #define VALUE_HANDLE_GET(name) name - #define VALUE_HANDLE_SET(name,x) name = x - - #define CONSTANT_DOUBLE(x) const double x - #define NAMESPACE(x) - #define UNUSED_VARIABLE(x) (void)x - - #ifdef _WIN32 - #ifdef TA_LIB_SHARED - #define TA_LIB_API __declspec(dllexport) - #else - #define TA_LIB_API - #endif - #elif defined(__GNUC__) && __GNUC__ >= 4 - #define TA_LIB_API __attribute__ ((visibility("default"))) - #else - #define TA_LIB_API - #endif -#endif - -/* Abstraction of function calls within the library. - * Needed because Java/.NET allows overloading, while for C the - * TA_PREFIX allows to select variant of the same function. - */ -#define FUNCTION_CALL(x) TA_PREFIX(x) -#define FUNCTION_CALL_DOUBLE(x) TA_##x -#define LOOKBACK_CALL(x) TA_##x##_Lookback - -/* min/max value for a TA_Integer */ -#define TA_INTEGER_MIN (INT_MIN+1) -#define TA_INTEGER_MAX (INT_MAX) - -/* min/max value for a TA_Real - * - * Use fix value making sense in the - * context of TA-Lib (avoid to use DBL_MIN - * and DBL_MAX standard macro because they - * are troublesome with some compiler). - */ -#define TA_REAL_MIN (-3e+37) -#define TA_REAL_MAX (3e+37) - -/* A value outside of the min/max range - * indicates an undefined or default value. - */ -#define TA_INTEGER_DEFAULT (INT_MIN) -#define TA_REAL_DEFAULT (-4e+37) - -/* Part of this file is generated by gen_code */ - -ENUM_BEGIN( RetCode ) - /* 0 */ ENUM_DEFINE( TA_SUCCESS, Success ), /* No error */ - /* 1 */ ENUM_DEFINE( TA_LIB_NOT_INITIALIZE, LibNotInitialize ), /* TA_Initialize was not sucessfully called */ - /* 2 */ ENUM_DEFINE( TA_BAD_PARAM, BadParam ), /* A parameter is out of range */ - /* 3 */ ENUM_DEFINE( TA_ALLOC_ERR, AllocErr ), /* Possibly out-of-memory */ - /* 4 */ ENUM_DEFINE( TA_GROUP_NOT_FOUND, GroupNotFound ), - /* 5 */ ENUM_DEFINE( TA_FUNC_NOT_FOUND, FuncNotFound ), - /* 6 */ ENUM_DEFINE( TA_INVALID_HANDLE, InvalidHandle ), - /* 7 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER, InvalidParamHolder ), - /* 8 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER_TYPE, InvalidParamHolderType ), - /* 9 */ ENUM_DEFINE( TA_INVALID_PARAM_FUNCTION, InvalidParamFunction ), - /* 10 */ ENUM_DEFINE( TA_INPUT_NOT_ALL_INITIALIZE, InputNotAllInitialize ), - /* 11 */ ENUM_DEFINE( TA_OUTPUT_NOT_ALL_INITIALIZE, OutputNotAllInitialize ), - /* 12 */ ENUM_DEFINE( TA_OUT_OF_RANGE_START_INDEX, OutOfRangeStartIndex ), - /* 13 */ ENUM_DEFINE( TA_OUT_OF_RANGE_END_INDEX, OutOfRangeEndIndex ), - /* 14 */ ENUM_DEFINE( TA_INVALID_LIST_TYPE, InvalidListType ), - /* 15 */ ENUM_DEFINE( TA_BAD_OBJECT, BadObject ), - /* 16 */ ENUM_DEFINE( TA_NOT_SUPPORTED, NotSupported ), - /* 5000 */ ENUM_DEFINE( TA_INTERNAL_ERROR, InternalError ) = 5000, - /* 0xFFFF */ ENUM_DEFINE( TA_UNKNOWN_ERR, UnknownErr ) = 0xFFFF -ENUM_END( RetCode ) - -ENUM_BEGIN( Compatibility ) - ENUM_DEFINE( TA_COMPATIBILITY_DEFAULT, Default ), - ENUM_DEFINE( TA_COMPATIBILITY_METASTOCK, Metastock ) -ENUM_END( Compatibility ) - -ENUM_BEGIN( MAType ) - ENUM_DEFINE( TA_MAType_SMA, Sma ) =0, - ENUM_DEFINE( TA_MAType_EMA, Ema ) =1, - ENUM_DEFINE( TA_MAType_WMA, Wma ) =2, - ENUM_DEFINE( TA_MAType_DEMA, Dema ) =3, - ENUM_DEFINE( TA_MAType_TEMA, Tema ) =4, - ENUM_DEFINE( TA_MAType_TRIMA, Trima ) =5, - ENUM_DEFINE( TA_MAType_KAMA, Kama ) =6, - ENUM_DEFINE( TA_MAType_MAMA, Mama ) =7, - ENUM_DEFINE( TA_MAType_T3, T3 ) =8 -ENUM_END( MAType ) - - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ ENUM_BEGIN( FuncUnstId ) -/* Generated */ /* 000 */ ENUM_DEFINE( TA_FUNC_UNST_ADX, Adx), -/* Generated */ /* 001 */ ENUM_DEFINE( TA_FUNC_UNST_ADXR, Adxr), -/* Generated */ /* 002 */ ENUM_DEFINE( TA_FUNC_UNST_ATR, Atr), -/* Generated */ /* 003 */ ENUM_DEFINE( TA_FUNC_UNST_CMO, Cmo), -/* Generated */ /* 004 */ ENUM_DEFINE( TA_FUNC_UNST_DX, Dx), -/* Generated */ /* 005 */ ENUM_DEFINE( TA_FUNC_UNST_EMA, Ema), -/* Generated */ /* 006 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPERIOD, HtDcPeriod), -/* Generated */ /* 007 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPHASE, HtDcPhase), -/* Generated */ /* 008 */ ENUM_DEFINE( TA_FUNC_UNST_HT_PHASOR, HtPhasor), -/* Generated */ /* 009 */ ENUM_DEFINE( TA_FUNC_UNST_HT_SINE, HtSine), -/* Generated */ /* 010 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDLINE, HtTrendline), -/* Generated */ /* 011 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDMODE, HtTrendMode), -/* Generated */ /* 012 */ ENUM_DEFINE( TA_FUNC_UNST_IMI, Imi), -/* Generated */ /* 013 */ ENUM_DEFINE( TA_FUNC_UNST_KAMA, Kama), -/* Generated */ /* 014 */ ENUM_DEFINE( TA_FUNC_UNST_MAMA, Mama), -/* Generated */ /* 015 */ ENUM_DEFINE( TA_FUNC_UNST_MFI, Mfi), -/* Generated */ /* 016 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DI, MinusDI), -/* Generated */ /* 017 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DM, MinusDM), -/* Generated */ /* 018 */ ENUM_DEFINE( TA_FUNC_UNST_NATR, Natr), -/* Generated */ /* 019 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DI, PlusDI), -/* Generated */ /* 020 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DM, PlusDM), -/* Generated */ /* 021 */ ENUM_DEFINE( TA_FUNC_UNST_RSI, Rsi), -/* Generated */ /* 022 */ ENUM_DEFINE( TA_FUNC_UNST_STOCHRSI, StochRsi), -/* Generated */ /* 023 */ ENUM_DEFINE( TA_FUNC_UNST_T3, T3), -/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll), -/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1 -/* Generated */ ENUM_END( FuncUnstId ) -/* Generated */ -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ - -/* The TA_RangeType enum specifies the types of range that can be considered - * when to compare a part of a candle to other candles - */ - -ENUM_BEGIN( RangeType ) - ENUM_DEFINE( TA_RangeType_RealBody, RealBody ), - ENUM_DEFINE( TA_RangeType_HighLow, HighLow ), - ENUM_DEFINE( TA_RangeType_Shadows, Shadows ) -ENUM_END( RangeType ) - -/* The TA_CandleSettingType enum specifies which kind of setting to consider; - * the settings are based on the parts of the candle and the common words - * indicating the length (short, long, very long) - */ -ENUM_BEGIN( CandleSettingType ) - ENUM_DEFINE( TA_BodyLong, BodyLong ), - ENUM_DEFINE( TA_BodyVeryLong, BodyVeryLong ), - ENUM_DEFINE( TA_BodyShort, BodyShort ), - ENUM_DEFINE( TA_BodyDoji, BodyDoji ), - ENUM_DEFINE( TA_ShadowLong, ShadowLong ), - ENUM_DEFINE( TA_ShadowVeryLong, ShadowVeryLong ), - ENUM_DEFINE( TA_ShadowShort, ShadowShort ), - ENUM_DEFINE( TA_ShadowVeryShort, ShadowVeryShort ), - ENUM_DEFINE( TA_Near, Near ), - ENUM_DEFINE( TA_Far, Far ), - ENUM_DEFINE( TA_Equal, Equal ), - ENUM_DEFINE( TA_AllCandleSettings, AllCandleSettings ) -ENUM_END( CandleSettingType ) - -#endif diff --git a/src/ta-lib/include/ta_func.h b/src/ta-lib/include/ta_func.h deleted file mode 100644 index e01cc42e4..000000000 --- a/src/ta-lib/include/ta_func.h +++ /dev/null @@ -1,5346 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_FUNC_H -#define TA_FUNC_H - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -/* This header contains the prototype of all the Technical Analysis - * function provided by TA-LIB. - */ - -/* TA-LIB Developer Note: Do not modify this file, it is automaticaly - * generated by gen_code. - */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef TA_DEFS_H - #include "ta_defs.h" -#endif - - -/* - * TA_ACCBANDS - Acceleration Bands - * - * Input = High, Low, Close - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ACCBANDS( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API TA_RetCode TA_S_ACCBANDS( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API int TA_ACCBANDS_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_ACOS - Vector Trigonometric ACos - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ACOS( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ACOS( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ACOS_Lookback( void ); - - -/* - * TA_AD - Chaikin A/D Line - * - * Input = High, Low, Close, Volume - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_AD( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - const double inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AD( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - const float inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AD_Lookback( void ); - - -/* - * TA_ADD - Vector Arithmetic Add - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ADD( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADD( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADD_Lookback( void ); - - -/* - * TA_ADOSC - Chaikin A/D Oscillator - * - * Input = High, Low, Close, Volume - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * - */ -TA_LIB_API TA_RetCode TA_ADOSC( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - const double inVolume[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADOSC( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - const float inVolume[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADOSC_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod ); /* From 2 to 100000 */ - - -/* - * TA_ADX - Average Directional Movement Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ADX( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADX( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_ADXR - Average Directional Movement Index Rating - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ADXR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADXR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADXR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_APO - Absolute Price Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_APO( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_APO( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_APO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_AROON - Aroon - * - * Input = High, Low - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_AROON( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outAroonDown[], - double outAroonUp[] ); - -TA_LIB_API TA_RetCode TA_S_AROON( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outAroonDown[], - double outAroonUp[] ); - -TA_LIB_API int TA_AROON_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_AROONOSC - Aroon Oscillator - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_AROONOSC( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AROONOSC( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AROONOSC_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_ASIN - Vector Trigonometric ASin - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ASIN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ASIN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ASIN_Lookback( void ); - - -/* - * TA_ATAN - Vector Trigonometric ATan - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ATAN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ATAN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ATAN_Lookback( void ); - - -/* - * TA_ATR - Average True Range - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ATR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ATR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_AVGPRICE - Average Price - * - * Input = Open, High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_AVGPRICE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AVGPRICE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AVGPRICE_Lookback( void ); - - -/* - * TA_AVGDEV - Average Deviation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_AVGDEV( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AVGDEV( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AVGDEV_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_BBANDS - Bollinger Bands - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInNbDevUp:(From TA_REAL_MIN to TA_REAL_MAX) - * Deviation multiplier for upper band - * - * optInNbDevDn:(From TA_REAL_MIN to TA_REAL_MAX) - * Deviation multiplier for lower band - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_BBANDS( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API TA_RetCode TA_S_BBANDS( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API int TA_BBANDS_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ - TA_MAType optInMAType ); - -/* - * TA_BETA - Beta - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_BETA( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_BETA( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_BETA_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_BOP - Balance Of Power - * - * Input = Open, High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_BOP( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_BOP( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_BOP_Lookback( void ); - - -/* - * TA_CCI - Commodity Channel Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_CCI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CCI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CCI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_CDL2CROWS - Two Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL2CROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL2CROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL2CROWS_Lookback( void ); - - -/* - * TA_CDL3BLACKCROWS - Three Black Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3BLACKCROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3BLACKCROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3BLACKCROWS_Lookback( void ); - - -/* - * TA_CDL3INSIDE - Three Inside Up/Down - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3INSIDE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3INSIDE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3INSIDE_Lookback( void ); - - -/* - * TA_CDL3LINESTRIKE - Three-Line Strike - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3LINESTRIKE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3LINESTRIKE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3LINESTRIKE_Lookback( void ); - - -/* - * TA_CDL3OUTSIDE - Three Outside Up/Down - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3OUTSIDE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3OUTSIDE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3OUTSIDE_Lookback( void ); - - -/* - * TA_CDL3STARSINSOUTH - Three Stars In The South - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3STARSINSOUTH( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3STARSINSOUTH( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3STARSINSOUTH_Lookback( void ); - - -/* - * TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3WHITESOLDIERS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3WHITESOLDIERS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3WHITESOLDIERS_Lookback( void ); - - -/* - * TA_CDLABANDONEDBABY - Abandoned Baby - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLABANDONEDBABY( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLABANDONEDBABY( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLABANDONEDBABY_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLADVANCEBLOCK - Advance Block - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLADVANCEBLOCK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLADVANCEBLOCK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLADVANCEBLOCK_Lookback( void ); - - -/* - * TA_CDLBELTHOLD - Belt-hold - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLBELTHOLD( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLBELTHOLD( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLBELTHOLD_Lookback( void ); - - -/* - * TA_CDLBREAKAWAY - Breakaway - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLBREAKAWAY( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLBREAKAWAY( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLBREAKAWAY_Lookback( void ); - - -/* - * TA_CDLCLOSINGMARUBOZU - Closing Marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLCLOSINGMARUBOZU( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLCLOSINGMARUBOZU( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLCLOSINGMARUBOZU_Lookback( void ); - - -/* - * TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLCONCEALBABYSWALL( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLCONCEALBABYSWALL( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLCONCEALBABYSWALL_Lookback( void ); - - -/* - * TA_CDLCOUNTERATTACK - Counterattack - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLCOUNTERATTACK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLCOUNTERATTACK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLCOUNTERATTACK_Lookback( void ); - - -/* - * TA_CDLDARKCLOUDCOVER - Dark Cloud Cover - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLDARKCLOUDCOVER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDARKCLOUDCOVER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDARKCLOUDCOVER_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLDOJI - Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDOJI_Lookback( void ); - - -/* - * TA_CDLDOJISTAR - Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLDOJISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDOJISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDOJISTAR_Lookback( void ); - - -/* - * TA_CDLDRAGONFLYDOJI - Dragonfly Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLDRAGONFLYDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDRAGONFLYDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDRAGONFLYDOJI_Lookback( void ); - - -/* - * TA_CDLENGULFING - Engulfing Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLENGULFING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLENGULFING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLENGULFING_Lookback( void ); - - -/* - * TA_CDLEVENINGDOJISTAR - Evening Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLEVENINGDOJISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLEVENINGDOJISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLEVENINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLEVENINGSTAR - Evening Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLEVENINGSTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLEVENINGSTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLEVENINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLGAPSIDESIDEWHITE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLGAPSIDESIDEWHITE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLGAPSIDESIDEWHITE_Lookback( void ); - - -/* - * TA_CDLGRAVESTONEDOJI - Gravestone Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLGRAVESTONEDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLGRAVESTONEDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLGRAVESTONEDOJI_Lookback( void ); - - -/* - * TA_CDLHAMMER - Hammer - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHAMMER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHAMMER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHAMMER_Lookback( void ); - - -/* - * TA_CDLHANGINGMAN - Hanging Man - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHANGINGMAN( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHANGINGMAN( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHANGINGMAN_Lookback( void ); - - -/* - * TA_CDLHARAMI - Harami Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHARAMI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHARAMI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHARAMI_Lookback( void ); - - -/* - * TA_CDLHARAMICROSS - Harami Cross Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHARAMICROSS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHARAMICROSS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHARAMICROSS_Lookback( void ); - - -/* - * TA_CDLHIGHWAVE - High-Wave Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHIGHWAVE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHIGHWAVE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHIGHWAVE_Lookback( void ); - - -/* - * TA_CDLHIKKAKE - Hikkake Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHIKKAKE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHIKKAKE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHIKKAKE_Lookback( void ); - - -/* - * TA_CDLHIKKAKEMOD - Modified Hikkake Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHIKKAKEMOD( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHIKKAKEMOD( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHIKKAKEMOD_Lookback( void ); - - -/* - * TA_CDLHOMINGPIGEON - Homing Pigeon - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHOMINGPIGEON( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHOMINGPIGEON( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHOMINGPIGEON_Lookback( void ); - - -/* - * TA_CDLIDENTICAL3CROWS - Identical Three Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLIDENTICAL3CROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLIDENTICAL3CROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLIDENTICAL3CROWS_Lookback( void ); - - -/* - * TA_CDLINNECK - In-Neck Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLINNECK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLINNECK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLINNECK_Lookback( void ); - - -/* - * TA_CDLINVERTEDHAMMER - Inverted Hammer - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLINVERTEDHAMMER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLINVERTEDHAMMER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLINVERTEDHAMMER_Lookback( void ); - - -/* - * TA_CDLKICKING - Kicking - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLKICKING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLKICKING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLKICKING_Lookback( void ); - - -/* - * TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLKICKINGBYLENGTH( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLKICKINGBYLENGTH( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLKICKINGBYLENGTH_Lookback( void ); - - -/* - * TA_CDLLADDERBOTTOM - Ladder Bottom - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLLADDERBOTTOM( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLLADDERBOTTOM( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLLADDERBOTTOM_Lookback( void ); - - -/* - * TA_CDLLONGLEGGEDDOJI - Long Legged Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLLONGLEGGEDDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLLONGLEGGEDDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLLONGLEGGEDDOJI_Lookback( void ); - - -/* - * TA_CDLLONGLINE - Long Line Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLLONGLINE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLLONGLINE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLLONGLINE_Lookback( void ); - - -/* - * TA_CDLMARUBOZU - Marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLMARUBOZU( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMARUBOZU( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMARUBOZU_Lookback( void ); - - -/* - * TA_CDLMATCHINGLOW - Matching Low - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLMATCHINGLOW( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMATCHINGLOW( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMATCHINGLOW_Lookback( void ); - - -/* - * TA_CDLMATHOLD - Mat Hold - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLMATHOLD( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMATHOLD( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMATHOLD_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLMORNINGDOJISTAR - Morning Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLMORNINGDOJISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMORNINGDOJISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMORNINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLMORNINGSTAR - Morning Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLMORNINGSTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMORNINGSTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMORNINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLONNECK - On-Neck Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLONNECK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLONNECK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLONNECK_Lookback( void ); - - -/* - * TA_CDLPIERCING - Piercing Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLPIERCING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLPIERCING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLPIERCING_Lookback( void ); - - -/* - * TA_CDLRICKSHAWMAN - Rickshaw Man - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLRICKSHAWMAN( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLRICKSHAWMAN( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLRICKSHAWMAN_Lookback( void ); - - -/* - * TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLRISEFALL3METHODS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLRISEFALL3METHODS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLRISEFALL3METHODS_Lookback( void ); - - -/* - * TA_CDLSEPARATINGLINES - Separating Lines - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSEPARATINGLINES( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSEPARATINGLINES( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSEPARATINGLINES_Lookback( void ); - - -/* - * TA_CDLSHOOTINGSTAR - Shooting Star - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSHOOTINGSTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSHOOTINGSTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSHOOTINGSTAR_Lookback( void ); - - -/* - * TA_CDLSHORTLINE - Short Line Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSHORTLINE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSHORTLINE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSHORTLINE_Lookback( void ); - - -/* - * TA_CDLSPINNINGTOP - Spinning Top - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSPINNINGTOP( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSPINNINGTOP( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSPINNINGTOP_Lookback( void ); - - -/* - * TA_CDLSTALLEDPATTERN - Stalled Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSTALLEDPATTERN( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSTALLEDPATTERN( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSTALLEDPATTERN_Lookback( void ); - - -/* - * TA_CDLSTICKSANDWICH - Stick Sandwich - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSTICKSANDWICH( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSTICKSANDWICH( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSTICKSANDWICH_Lookback( void ); - - -/* - * TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTAKURI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTAKURI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTAKURI_Lookback( void ); - - -/* - * TA_CDLTASUKIGAP - Tasuki Gap - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTASUKIGAP( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTASUKIGAP( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTASUKIGAP_Lookback( void ); - - -/* - * TA_CDLTHRUSTING - Thrusting Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTHRUSTING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTHRUSTING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTHRUSTING_Lookback( void ); - - -/* - * TA_CDLTRISTAR - Tristar Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTRISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTRISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTRISTAR_Lookback( void ); - - -/* - * TA_CDLUNIQUE3RIVER - Unique 3 River - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLUNIQUE3RIVER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLUNIQUE3RIVER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLUNIQUE3RIVER_Lookback( void ); - - -/* - * TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLUPSIDEGAP2CROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLUPSIDEGAP2CROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLUPSIDEGAP2CROWS_Lookback( void ); - - -/* - * TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLXSIDEGAP3METHODS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLXSIDEGAP3METHODS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLXSIDEGAP3METHODS_Lookback( void ); - - -/* - * TA_CEIL - Vector Ceil - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_CEIL( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CEIL( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CEIL_Lookback( void ); - - -/* - * TA_CMO - Chande Momentum Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_CMO( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CMO( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CMO_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_CORREL - Pearson's Correlation Coefficient (r) - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_CORREL( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CORREL( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CORREL_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_COS - Vector Trigonometric Cos - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_COS( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_COS( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_COS_Lookback( void ); - - -/* - * TA_COSH - Vector Trigonometric Cosh - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_COSH( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_COSH( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_COSH_Lookback( void ); - - -/* - * TA_DEMA - Double Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_DEMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_DEMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_DEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_DIV - Vector Arithmetic Div - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_DIV( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_DIV( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_DIV_Lookback( void ); - - -/* - * TA_DX - Directional Movement Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_DX( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_DX( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_DX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_EMA - Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_EMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_EMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_EMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_EXP - Vector Arithmetic Exp - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_EXP( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_EXP( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_EXP_Lookback( void ); - - -/* - * TA_FLOOR - Vector Floor - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_FLOOR( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_FLOOR( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_FLOOR_Lookback( void ); - - -/* - * TA_HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_HT_DCPERIOD( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_HT_DCPERIOD( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_HT_DCPERIOD_Lookback( void ); - - -/* - * TA_HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_HT_DCPHASE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_HT_DCPHASE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_HT_DCPHASE_Lookback( void ); - - -/* - * TA_HT_PHASOR - Hilbert Transform - Phasor Components - * - * Input = double - * Output = double, double - * - */ -TA_LIB_API TA_RetCode TA_HT_PHASOR( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outInPhase[], - double outQuadrature[] ); - -TA_LIB_API TA_RetCode TA_S_HT_PHASOR( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outInPhase[], - double outQuadrature[] ); - -TA_LIB_API int TA_HT_PHASOR_Lookback( void ); - - -/* - * TA_HT_SINE - Hilbert Transform - SineWave - * - * Input = double - * Output = double, double - * - */ -TA_LIB_API TA_RetCode TA_HT_SINE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outSine[], - double outLeadSine[] ); - -TA_LIB_API TA_RetCode TA_S_HT_SINE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outSine[], - double outLeadSine[] ); - -TA_LIB_API int TA_HT_SINE_Lookback( void ); - - -/* - * TA_HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_HT_TRENDLINE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_HT_TRENDLINE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_HT_TRENDLINE_Lookback( void ); - - -/* - * TA_HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode - * - * Input = double - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_HT_TRENDMODE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_HT_TRENDMODE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_HT_TRENDMODE_Lookback( void ); - - -/* - * TA_IMI - Intraday Momentum Index - * - * Input = Open, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_IMI( int startIdx, - int endIdx, - const double inOpen[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_IMI( int startIdx, - int endIdx, - const float inOpen[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_IMI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_KAMA - Kaufman Adaptive Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_KAMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_KAMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_KAMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG - Linear Regression - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG_ANGLE - Linear Regression Angle - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG_ANGLE( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG_ANGLE( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_ANGLE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG_INTERCEPT - Linear Regression Intercept - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG_INTERCEPT( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG_INTERCEPT( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_INTERCEPT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG_SLOPE - Linear Regression Slope - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG_SLOPE( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG_SLOPE( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_SLOPE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LN - Vector Log Natural - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_LN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LN_Lookback( void ); - - -/* - * TA_LOG10 - Vector Log10 - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_LOG10( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LOG10( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LOG10_Lookback( void ); - - -/* - * TA_MA - Moving average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_MA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MA_Lookback( int optInTimePeriod, /* From 1 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_MACD - Moving Average Convergence/Divergence - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * - */ -TA_LIB_API TA_RetCode TA_MACD( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API TA_RetCode TA_S_MACD( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API int TA_MACD_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int optInSignalPeriod ); /* From 1 to 100000 */ - - -/* - * TA_MACDEXT - MACD with controllable MA type - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInFastMAType: - * Type of Moving Average for fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInSlowMAType: - * Type of Moving Average for slow MA - * - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * optInSignalMAType: - * Type of Moving Average for signal line - * - * - */ -TA_LIB_API TA_RetCode TA_MACDEXT( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - TA_MAType optInFastMAType, - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInSlowMAType, - int optInSignalPeriod, /* From 1 to 100000 */ - TA_MAType optInSignalMAType, - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API TA_RetCode TA_S_MACDEXT( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - TA_MAType optInFastMAType, - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInSlowMAType, - int optInSignalPeriod, /* From 1 to 100000 */ - TA_MAType optInSignalMAType, - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API int TA_MACDEXT_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - TA_MAType optInFastMAType, - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInSlowMAType, - int optInSignalPeriod, /* From 1 to 100000 */ - TA_MAType optInSignalMAType ); - -/* - * TA_MACDFIX - Moving Average Convergence/Divergence Fix 12/26 - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * - */ -TA_LIB_API TA_RetCode TA_MACDFIX( int startIdx, - int endIdx, - const double inReal[], - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API TA_RetCode TA_S_MACDFIX( int startIdx, - int endIdx, - const float inReal[], - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API int TA_MACDFIX_Lookback( int optInSignalPeriod ); /* From 1 to 100000 */ - - -/* - * TA_MAMA - MESA Adaptive Moving Average - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastLimit:(From 0.01 to 0.99) - * Upper limit use in the adaptive algorithm - * - * optInSlowLimit:(From 0.01 to 0.99) - * Lower limit use in the adaptive algorithm - * - * - */ -TA_LIB_API TA_RetCode TA_MAMA( int startIdx, - int endIdx, - const double inReal[], - double optInFastLimit, /* From 0.01 to 0.99 */ - double optInSlowLimit, /* From 0.01 to 0.99 */ - int *outBegIdx, - int *outNBElement, - double outMAMA[], - double outFAMA[] ); - -TA_LIB_API TA_RetCode TA_S_MAMA( int startIdx, - int endIdx, - const float inReal[], - double optInFastLimit, /* From 0.01 to 0.99 */ - double optInSlowLimit, /* From 0.01 to 0.99 */ - int *outBegIdx, - int *outNBElement, - double outMAMA[], - double outFAMA[] ); - -TA_LIB_API int TA_MAMA_Lookback( double optInFastLimit, /* From 0.01 to 0.99 */ - double optInSlowLimit ); /* From 0.01 to 0.99 */ - - -/* - * TA_MAVP - Moving average with variable period - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInMinPeriod:(From 2 to 100000) - * Value less than minimum will be changed to Minimum period - * - * optInMaxPeriod:(From 2 to 100000) - * Value higher than maximum will be changed to Maximum period - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_MAVP( int startIdx, - int endIdx, - const double inReal[], - const double inPeriods[], - int optInMinPeriod, /* From 2 to 100000 */ - int optInMaxPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MAVP( int startIdx, - int endIdx, - const float inReal[], - const float inPeriods[], - int optInMinPeriod, /* From 2 to 100000 */ - int optInMaxPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MAVP_Lookback( int optInMinPeriod, /* From 2 to 100000 */ - int optInMaxPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_MAX - Highest value over a specified period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MAX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MAX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MAXINDEX - Index of highest value over a specified period - * - * Input = double - * Output = int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MAXINDEX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_MAXINDEX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_MAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MEDPRICE - Median Price - * - * Input = High, Low - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_MEDPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MEDPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MEDPRICE_Lookback( void ); - - -/* - * TA_MFI - Money Flow Index - * - * Input = High, Low, Close, Volume - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MFI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - const double inVolume[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MFI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - const float inVolume[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MFI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MIDPOINT - MidPoint over period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MIDPOINT( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MIDPOINT( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MIDPOINT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MIDPRICE - Midpoint Price over period - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MIDPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MIDPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MIDPRICE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MIN - Lowest value over a specified period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MIN( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MIN( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MIN_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MININDEX - Index of lowest value over a specified period - * - * Input = double - * Output = int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MININDEX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_MININDEX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_MININDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MINMAX - Lowest and highest values over a specified period - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINMAX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMin[], - double outMax[] ); - -TA_LIB_API TA_RetCode TA_S_MINMAX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMin[], - double outMax[] ); - -TA_LIB_API int TA_MINMAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MINMAXINDEX - Indexes of lowest and highest values over a specified period - * - * Input = double - * Output = int, int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINMAXINDEX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outMinIdx[], - int outMaxIdx[] ); - -TA_LIB_API TA_RetCode TA_S_MINMAXINDEX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outMinIdx[], - int outMaxIdx[] ); - -TA_LIB_API int TA_MINMAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MINUS_DI - Minus Directional Indicator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINUS_DI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MINUS_DI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MINUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_MINUS_DM - Minus Directional Movement - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINUS_DM( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MINUS_DM( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MINUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_MOM - Momentum - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MOM( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MOM( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MOM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_MULT - Vector Arithmetic Mult - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_MULT( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MULT( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MULT_Lookback( void ); - - -/* - * TA_NATR - Normalized Average True Range - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_NATR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_NATR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_NATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_OBV - On Balance Volume - * - * Input = double, Volume - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_OBV( int startIdx, - int endIdx, - const double inReal[], - const double inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_OBV( int startIdx, - int endIdx, - const float inReal[], - const float inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_OBV_Lookback( void ); - - -/* - * TA_PLUS_DI - Plus Directional Indicator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_PLUS_DI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_PLUS_DI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_PLUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_PLUS_DM - Plus Directional Movement - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_PLUS_DM( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_PLUS_DM( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_PLUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_PPO - Percentage Price Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_PPO( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_PPO( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_PPO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_ROC - Rate of change : ((price/prevPrice)-1)*100 - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROC( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROC( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROC_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROCP( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROCP( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROCP_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_ROCR - Rate of change ratio: (price/prevPrice) - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROCR( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROCR( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROCR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100 - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROCR100( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROCR100( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROCR100_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_RSI - Relative Strength Index - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_RSI( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_RSI( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_RSI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_SAR - Parabolic SAR - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInAcceleration:(From 0 to TA_REAL_MAX) - * Acceleration Factor used up to the Maximum value - * - * optInMaximum:(From 0 to TA_REAL_MAX) - * Acceleration Factor Maximum value - * - * - */ -TA_LIB_API TA_RetCode TA_SAR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - double optInAcceleration, /* From 0 to TA_REAL_MAX */ - double optInMaximum, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SAR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - double optInAcceleration, /* From 0 to TA_REAL_MAX */ - double optInMaximum, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SAR_Lookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ - double optInMaximum ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_SAREXT - Parabolic SAR - Extended - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInStartValue:(From TA_REAL_MIN to TA_REAL_MAX) - * Start value and direction. 0 for Auto, >0 for Long, <0 for Short - * - * optInOffsetOnReverse:(From 0 to TA_REAL_MAX) - * Percent offset added/removed to initial stop on short/long reversal - * - * optInAccelerationInitLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor initial value for the Long direction - * - * optInAccelerationLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor for the Long direction - * - * optInAccelerationMaxLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor maximum value for the Long direction - * - * optInAccelerationInitShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor initial value for the Short direction - * - * optInAccelerationShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor for the Short direction - * - * optInAccelerationMaxShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor maximum value for the Short direction - * - * - */ -TA_LIB_API TA_RetCode TA_SAREXT( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SAREXT( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SAREXT_Lookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxShort ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_SIN - Vector Trigonometric Sin - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SIN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SIN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SIN_Lookback( void ); - - -/* - * TA_SINH - Vector Trigonometric Sinh - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SINH( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SINH( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SINH_Lookback( void ); - - -/* - * TA_SMA - Simple Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_SMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_SQRT - Vector Square Root - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SQRT( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SQRT( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SQRT_Lookback( void ); - - -/* - * TA_STDDEV - Standard Deviation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) - * Nb of deviations - * - * - */ -TA_LIB_API TA_RetCode TA_STDDEV( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_STDDEV( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_STDDEV_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ - - -/* - * TA_STOCH - Stochastic - * - * Input = High, Low, Close - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInSlowK_Period:(From 1 to 100000) - * Smoothing for making the Slow-K line. Usually set to 3 - * - * optInSlowK_MAType: - * Type of Moving Average for Slow-K - * - * optInSlowD_Period:(From 1 to 100000) - * Smoothing for making the Slow-D line - * - * optInSlowD_MAType: - * Type of Moving Average for Slow-D - * - * - */ -TA_LIB_API TA_RetCode TA_STOCH( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInSlowK_Period, /* From 1 to 100000 */ - TA_MAType optInSlowK_MAType, - int optInSlowD_Period, /* From 1 to 100000 */ - TA_MAType optInSlowD_MAType, - int *outBegIdx, - int *outNBElement, - double outSlowK[], - double outSlowD[] ); - -TA_LIB_API TA_RetCode TA_S_STOCH( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInSlowK_Period, /* From 1 to 100000 */ - TA_MAType optInSlowK_MAType, - int optInSlowD_Period, /* From 1 to 100000 */ - TA_MAType optInSlowD_MAType, - int *outBegIdx, - int *outNBElement, - double outSlowK[], - double outSlowD[] ); - -TA_LIB_API int TA_STOCH_Lookback( int optInFastK_Period, /* From 1 to 100000 */ - int optInSlowK_Period, /* From 1 to 100000 */ - TA_MAType optInSlowK_MAType, - int optInSlowD_Period, /* From 1 to 100000 */ - TA_MAType optInSlowD_MAType ); - -/* - * TA_STOCHF - Stochastic Fast - * - * Input = High, Low, Close - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInFastD_Period:(From 1 to 100000) - * Smoothing for making the Fast-D line. Usually set to 3 - * - * optInFastD_MAType: - * Type of Moving Average for Fast-D - * - * - */ -TA_LIB_API TA_RetCode TA_STOCHF( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API TA_RetCode TA_S_STOCHF( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API int TA_STOCHF_Lookback( int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType ); - -/* - * TA_STOCHRSI - Stochastic Relative Strength Index - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInFastD_Period:(From 1 to 100000) - * Smoothing for making the Fast-D line. Usually set to 3 - * - * optInFastD_MAType: - * Type of Moving Average for Fast-D - * - * - */ -TA_LIB_API TA_RetCode TA_STOCHRSI( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API TA_RetCode TA_S_STOCHRSI( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API int TA_STOCHRSI_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType ); - -/* - * TA_SUB - Vector Arithmetic Subtraction - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SUB( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SUB( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SUB_Lookback( void ); - - -/* - * TA_SUM - Summation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_SUM( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SUM( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SUM_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_T3 - Triple Exponential Moving Average (T3) - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInVFactor:(From 0 to 1) - * Volume Factor - * - * - */ -TA_LIB_API TA_RetCode TA_T3( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInVFactor, /* From 0 to 1 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_T3( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInVFactor, /* From 0 to 1 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_T3_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - double optInVFactor ); /* From 0 to 1 */ - - -/* - * TA_TAN - Vector Trigonometric Tan - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TAN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TAN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TAN_Lookback( void ); - - -/* - * TA_TANH - Vector Trigonometric Tanh - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TANH( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TANH( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TANH_Lookback( void ); - - -/* - * TA_TEMA - Triple Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TEMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TEMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_TRANGE - True Range - * - * Input = High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TRANGE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TRANGE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TRANGE_Lookback( void ); - - -/* - * TA_TRIMA - Triangular Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TRIMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TRIMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TRIMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TRIX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TRIX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TRIX_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_TSF - Time Series Forecast - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TSF( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TSF( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TSF_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_TYPPRICE - Typical Price - * - * Input = High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TYPPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TYPPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TYPPRICE_Lookback( void ); - - -/* - * TA_ULTOSC - Ultimate Oscillator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod1:(From 1 to 100000) - * Number of bars for 1st period. - * - * optInTimePeriod2:(From 1 to 100000) - * Number of bars fro 2nd period - * - * optInTimePeriod3:(From 1 to 100000) - * Number of bars for 3rd period - * - * - */ -TA_LIB_API TA_RetCode TA_ULTOSC( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod1, /* From 1 to 100000 */ - int optInTimePeriod2, /* From 1 to 100000 */ - int optInTimePeriod3, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ULTOSC( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod1, /* From 1 to 100000 */ - int optInTimePeriod2, /* From 1 to 100000 */ - int optInTimePeriod3, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ULTOSC_Lookback( int optInTimePeriod1, /* From 1 to 100000 */ - int optInTimePeriod2, /* From 1 to 100000 */ - int optInTimePeriod3 ); /* From 1 to 100000 */ - - -/* - * TA_VAR - Variance - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) - * Nb of deviations - * - * - */ -TA_LIB_API TA_RetCode TA_VAR( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_VAR( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_VAR_Lookback( int optInTimePeriod, /* From 1 to 100000 */ - double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ - - -/* - * TA_WCLPRICE - Weighted Close Price - * - * Input = High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_WCLPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_WCLPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_WCLPRICE_Lookback( void ); - - -/* - * TA_WILLR - Williams' %R - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_WILLR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_WILLR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_WILLR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_WMA - Weighted Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_WMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_WMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_WMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* Some TA functions takes a certain amount of input data - * before stabilizing and outputing meaningful data. This is - * a behavior pertaining to the algo of some TA functions and - * is not particular to the TA-Lib implementation. - * TA-Lib allows you to automatically strip off these unstabl - * data from your output and from any internal processing. - * (See documentation for more info) - * - * Examples: - * TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 30 ); - * Always strip off 30 price bar for the TA_EMA function. - * - * TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 30 ); - * Always strip off 30 price bar from ALL functions - * having an unstable period. - * - * See ta_defs.h for the enumeration TA_FuncUnstId - */ - -TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id, - unsigned int unstablePeriod ); - -unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id ); - -/* You can change slightly the behavior of the TA functions - * by requesting compatibiliy with some existing software. - * - * By default, the behavior is as close as the original - * author of the TA functions intend it to be. - * - * See ta_defs.h for the enumeration TA_Compatibility. - */ -TA_RetCode TA_SetCompatibility( TA_Compatibility value ); -TA_Compatibility TA_GetCompatibility( void ); - -/* Candlesticks struct and functions - * Because candlestick patterns are subjective, it is necessary - * to allow the user to specify what should be the meaning of - * 'long body', 'short shadows', etc. - */ - -/* Call TA_SetCandleSettings to set that when comparing a candle - * basing on settingType it must be compared with the average - * of the last avgPeriod candles' rangeType multiplied by factor. - * This setting is valid until TA_RestoreCandleDefaultSettings is called - */ -TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, - TA_RangeType rangeType, - int avgPeriod, - double factor ); - -/* Call TA_RestoreCandleDefaultSettings after using custom settings - * to restore the default settings for the specified settingType - */ -TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType ); - -#ifdef __cplusplus -} -#endif - -#endif - -/***************/ -/* End of File */ -/***************/ - diff --git a/src/ta-lib/include/ta_libc.h b/src/ta-lib/include/ta_libc.h deleted file mode 100644 index 6c1c0bef2..000000000 --- a/src/ta-lib/include/ta_libc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_LIBC_H -#define TA_LIBC_H - -/* Includes all headers needed for using the ta-lib 'C' library. */ - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -#ifndef TA_FUNC_H - #include "ta_func.h" -#endif - -#ifndef TA_ABSTRACT_H - #include "ta_abstract.h" -#endif - -#endif - diff --git a/src/ta-lib/local/include/ta-lib/ta_abstract.h b/src/ta-lib/local/include/ta-lib/ta_abstract.h deleted file mode 100644 index c6ceac3a3..000000000 --- a/src/ta-lib/local/include/ta-lib/ta_abstract.h +++ /dev/null @@ -1,553 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef TA_ABSTRACT_H -#define TA_ABSTRACT_H - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* This file defines the interface for calling all the TA functions without - * knowing at priori the parameters. - * - * This capability is particularly useful for an application who needs - * to support the complete list of TA functions without having to - * re-write new code each time a new function is added to TA-Lib. - * - * Example 1: - * Lets say you are doing a charting software. When the user select - * a price bar, a side list offers blindly all the TA functions - * that could be applied to a price bar. The user selects one of - * these, then a dialog open for allowing to adjust some parameter - * (TA-LIB will tell your software which parameter are needed and the - * valid range for each). Once all the parameter are set, you can - * call blindly the corresponding TA function. The returned - * information can then also blindly be drawn on the chart (some - * output flags allows to get some hint about how the data shall be - * displayed). - * The same "abstract" logic apply to all the TA functions. - * Some TA Functions works only on volume, or can work indiferently - * with any time serie data (the open, close, another indicator...). - * All the applicable functions to the currently selected/available - * data can be determined through this "virtual" interface. - * - * Example 2: - * Let's say you do not like the direct interface for - * calling the TA Functions, you can write a code that - * re-generate a different interface. This is already - * done even for the 'C' interface (ta_func.h is generated). - * - * Example 3: - * With the abstract interface you can easily generate - * glue code. Like generating an interface that integrates - * well within Perl... see the project SWIG if you are - * interested by such things. - * - * The abstract interface is used within TA-Lib to perform at least - * the following: - * - used by gen_code to generate all the glue code. - * - used to generate a XML representation of the TA functions. - */ - -/* The following functions are used to obtain the name of all the - * TA function groups ("Market Strength", "Trend Indicator" etc...). - * - * On success, it becomes the responsibility of the caller to - * call TA_GroupTableFree once the 'table' is no longuer needed. - * - * Example: - * This code snippet will print out the name of all the supported - * function group available: - * - * TA_StringTable *table; - * TA_RetCode retCode; - * int i; - * - * retCode = TA_GroupTableAlloc( &table ); - * - * if( retCode == TA_SUCCESS ) - * { - * for( i=0; i < table->size; i++ ) - * printf( "%s\n", table->string[i] ); - * - * TA_GroupTableFree( table ); - * } - */ -TA_LIB_API TA_RetCode TA_GroupTableAlloc( TA_StringTable **table ); -TA_LIB_API TA_RetCode TA_GroupTableFree ( TA_StringTable *table ); - -/* The following functions are used to obtain the name of all the - * function provided in a certain group. - * - * On success, it becomes the responsibility of the caller to - * call TA_FuncTableFree once the 'table' is no longuer needed. - * - * Example: - * This code snippet will print out the name of all the supported - * function in the "market strength" category: - * - * TA_StringTable *table; - * TA_RetCode retCode; - * int i; - * - * retCode = TA_FuncTableAlloc( "Market Strength", &table ); - * - * if( retCode == TA_SUCCESS ) - * { - * for( i=0; i < table->size; i++ ) - * printf( "%s\n", table->string[i] ); - * - * TA_FuncTableFree( table ); - * } - */ -TA_LIB_API TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table ); -TA_LIB_API TA_RetCode TA_FuncTableFree ( TA_StringTable *table ); - -/* Using the name, you can obtain an handle unique to this function. - * This handle is further used for obtaining information on the - * parameters needed and also for potentially calling this TA function. - * - * For convenience, this handle can also be found in - * the TA_FuncInfo structure (see below). - */ -typedef unsigned int TA_FuncHandle; -TA_LIB_API TA_RetCode TA_GetFuncHandle( const char *name, - const TA_FuncHandle **handle ); - -/* Get some basic information about a function. - * - * A const pointer will be set on the corresponding TA_FuncInfo structure. - * The whole structure are hard coded constants and it can be assumed they - * will not change at runtime. - * - * Example: - * Print the number of inputs used by the MA (moving average) function. - * - * TA_RetCode retCode; - * const TA_FuncHandle *handle; - * const TA_FuncInfo *theInfo; - * - * retCode = TA_GetFuncHandle( "MA", &handle ); - * - * if( retCode == TA_SUCCESS ) - * { - * retCode = TA_GetFuncInfo( handle, &theInfo ); - * if( retCode == TA_SUCCESS ) - * printf( "Nb Input = %d\n", theInfo->nbInput ); - * } - * - */ -typedef int TA_FuncFlags; -#define TA_FUNC_FLG_OVERLAP 0x01000000 /* Output scale same as input data. */ -#define TA_FUNC_FLG_VOLUME 0x04000000 /* Output shall be over the volume data. */ -#define TA_FUNC_FLG_UNST_PER 0x08000000 /* Indicate if this function have an unstable - * initial period. Some additional code exist - * for these functions for allowing to set that - * unstable period. See Documentation. - */ -#define TA_FUNC_FLG_CANDLESTICK 0x10000000 /* Output shall be a candlestick */ - -typedef struct TA_FuncInfo -{ - /* Constant information about the function. The - * information found in this structure is guarantee - * to not change at runtime. - */ - const char * name; - const char * group; - - const char * hint; - const char * camelCaseName; - TA_FuncFlags flags; - - unsigned int nbInput; - unsigned int nbOptInput; - unsigned int nbOutput; - - const TA_FuncHandle *handle; -} TA_FuncInfo; - -TA_LIB_API TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle, - const TA_FuncInfo **funcInfo ); - - -/* An alternate way to access all the functions is through the - * use of the TA_ForEachFunc(). You can setup a function to be - * call back for each TA function in the TA-Lib. - * - * Example: - * This code will print the group and name of all available functions. - * - * void printFuncInfo( const TA_FuncInfo *funcInfo, void *opaqueData ) - * { - * printf( "Group=%s Name=%s\n", funcInfo->group, funcInfo->name ); - * } - * - * void displayListOfTAFunctions( void ) - * { - * TA_ForEachFunc( printFuncInfo, NULL ); - * } - */ -typedef void (*TA_CallForEachFunc)(const TA_FuncInfo *funcInfo, void *opaqueData ); - -TA_LIB_API TA_RetCode TA_ForEachFunc( TA_CallForEachFunc functionToCall, void *opaqueData ); - -/* The next section includes the data structures and function allowing to - * proceed with the call of a Tech. Analysis function. - * - * At first, it may seems a little bit complicated, but it is worth to take the - * effort to learn about it. Once you succeed to interface with TA-Abstract you get - * access to the complete library of TA functions at once without further effort. - */ - -/* Structures representing extended information on a parameter. */ - -typedef struct TA_RealRange -{ - TA_Real min; - TA_Real max; - TA_Integer precision; /* nb of digit after the '.' */ - - /* The following suggested value are used by Tech. Analysis software - * doing parameter "optimization". Can be ignored by most user. - */ - TA_Real suggested_start; - TA_Real suggested_end; - TA_Real suggested_increment; -} TA_RealRange; - -typedef struct TA_IntegerRange -{ - TA_Integer min; - TA_Integer max; - - /* The following suggested value are used by Tech. Analysis software - * doing parameter "optimization". Can be ignored by most user. - */ - TA_Integer suggested_start; - TA_Integer suggested_end; - TA_Integer suggested_increment; -} TA_IntegerRange; - -typedef struct TA_RealDataPair -{ - /* A TA_Real value and the corresponding string. */ - TA_Real value; - const char *string; -} TA_RealDataPair; - -typedef struct TA_IntegerDataPair -{ - /* A TA_Integer value and the corresponding string. */ - TA_Integer value; - const char *string; -} TA_IntegerDataPair; - -typedef struct TA_RealList -{ - const TA_RealDataPair *data; - unsigned int nbElement; -} TA_RealList; - -typedef struct TA_IntegerList -{ - const TA_IntegerDataPair *data; - unsigned int nbElement; -} TA_IntegerList; - -typedef enum -{ - TA_Input_Price, - TA_Input_Real, - TA_Input_Integer -} TA_InputParameterType; - -typedef enum -{ - TA_OptInput_RealRange, - TA_OptInput_RealList, - TA_OptInput_IntegerRange, - TA_OptInput_IntegerList -} TA_OptInputParameterType; - -typedef enum -{ - TA_Output_Real, - TA_Output_Integer -} TA_OutputParameterType; - -/* When the input is a TA_Input_Price, the following - * TA_InputFlags indicates the required components. - * These can be combined for functions requiring more - * than one component. - * - * Example: - * (TA_IN_PRICE_OPEN|TA_IN_PRICE_HIGH) - * Indicates that the functions requires two inputs - * that must be specifically the open and the high. - */ -typedef int TA_InputFlags; -#define TA_IN_PRICE_OPEN 0x00000001 -#define TA_IN_PRICE_HIGH 0x00000002 -#define TA_IN_PRICE_LOW 0x00000004 -#define TA_IN_PRICE_CLOSE 0x00000008 -#define TA_IN_PRICE_VOLUME 0x00000010 -#define TA_IN_PRICE_OPENINTEREST 0x00000020 -#define TA_IN_PRICE_TIMESTAMP 0x00000040 - -/* The following are flags for optional inputs. - * - * TA_OPTIN_IS_PERCENT: Input is a percentage. - * - * TA_OPTIN_IS_DEGREE: Input is a degree (0-360). - * - * TA_OPTIN_IS_CURRENCY: Input is a currency. - * - * TA_OPTIN_ADVANCED: - * Used for parameters who are rarely changed. - * Most application can hide these advanced optional inputs to their - * end-user (or make it harder to change). - */ -typedef int TA_OptInputFlags; -#define TA_OPTIN_IS_PERCENT 0x00100000 /* Input is a percentage. */ -#define TA_OPTIN_IS_DEGREE 0x00200000 /* Input is a degree (0-360). */ -#define TA_OPTIN_IS_CURRENCY 0x00400000 /* Input is a currency. */ -#define TA_OPTIN_ADVANCED 0x01000000 - - -/* The following are flags giving hint on what - * could be done with the output. - */ -typedef int TA_OutputFlags; -#define TA_OUT_LINE 0x00000001 /* Suggest to display as a connected line. */ -#define TA_OUT_DOT_LINE 0x00000002 /* Suggest to display as a 'dotted' line. */ -#define TA_OUT_DASH_LINE 0x00000004 /* Suggest to display as a 'dashed' line. */ -#define TA_OUT_DOT 0x00000008 /* Suggest to display with dots only. */ -#define TA_OUT_HISTO 0x00000010 /* Suggest to display as an histogram. */ -#define TA_OUT_PATTERN_BOOL 0x00000020 /* Indicates if pattern exists (!=0) or not (0) */ -#define TA_OUT_PATTERN_BULL_BEAR 0x00000040 /* =0 no pattern, > 0 bullish, < 0 bearish */ -#define TA_OUT_PATTERN_STRENGTH 0x00000080 /* =0 neutral, ]0..100] getting bullish, ]100..200] bullish, [-100..0[ getting bearish, [-200..100[ bearish */ -#define TA_OUT_POSITIVE 0x00000100 /* Output can be positive */ -#define TA_OUT_NEGATIVE 0x00000200 /* Output can be negative */ -#define TA_OUT_ZERO 0x00000400 /* Output can be zero */ -#define TA_OUT_UPPER_LIMIT 0x00000800 /* Indicates that the values represent an upper limit. */ -#define TA_OUT_LOWER_LIMIT 0x00001000 /* Indicates that the values represent a lower limit. */ - - -/* The following 3 structures will exist for each input, optional - * input and output. - * - * These structures tells you everything you need to know for identifying - * the parameters applicable to the function. - */ -typedef struct TA_InputParameterInfo -{ - TA_InputParameterType type; - const char *paramName; - TA_InputFlags flags; - -} TA_InputParameterInfo; - -typedef struct TA_OptInputParameterInfo -{ - TA_OptInputParameterType type; - const char *paramName; - TA_OptInputFlags flags; - - const char *displayName; - const void *dataSet; - TA_Real defaultValue; - const char *hint; - const char *helpFile; - -} TA_OptInputParameterInfo; - -typedef struct TA_OutputParameterInfo -{ - TA_OutputParameterType type; - const char *paramName; - TA_OutputFlags flags; - -} TA_OutputParameterInfo; - -/* Functions to get a const ptr on the "TA_XXXXXXParameterInfo". - * Max value for the 'paramIndex' can be found in the TA_FuncInfo structure. - * The 'handle' can be obtained from TA_GetFuncHandle or from a TA_FuncInfo. - * - * Short example: - * - * void displayInputType( const TA_FuncInfo *funcInfo ) - * { - * unsigned int i; - * const TA_InputParameterInfo *paramInfo; - * - * for( i=0; i < funcInfo->nbInput; i++ ) - * { - * TA_GetInputParameterInfo( funcInfo->handle, i, ¶mInfo ); - * switch( paramInfo->type ) - * { - * case TA_Input_Price: - * printf( "This function needs price bars as input\n" ); - * break; - * case TA_Input_Real: - * printf( "This function needs an array of floats as input\n" ); - * break; - * (... etc. ...) - * } - * } - * } - */ -TA_LIB_API TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_InputParameterInfo **info ); - -TA_LIB_API TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_OptInputParameterInfo **info ); - -TA_LIB_API TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_OutputParameterInfo **info ); - -/* Alloc a structure allowing to build the list of parameters - * for doing a call. - * - * All input and output parameters must be setup. If not, TA_BAD_PARAM - * will be returned when TA_CallFunc is called. - * - * The optional input are not required to be setup. A default value - * will always be used in that case. - * - * If there is an attempts to set a parameter with the wrong function - * (and thus the wrong type), TA_BAD_PARAM will be immediatly returned. - * - * Although this mechanism looks complicated, it is written for being fairly solid. - * If you provide a wrong parameter value, or wrong type, or wrong pointer etc. the - * library shall return TA_BAD_PARAM or TA_BAD_OBJECT and not hang. - */ -typedef struct TA_ParamHolder -{ - /* Implementation is hidden. */ - void *hiddenData; -} TA_ParamHolder; - -TA_LIB_API TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle, - TA_ParamHolder **allocatedParams ); - -TA_LIB_API TA_RetCode TA_ParamHolderFree( TA_ParamHolder *params ); - -/* Setup the values of the data input parameters. - * - * paramIndex is zero for the first input. - */ -TA_LIB_API TA_RetCode TA_SetInputParamIntegerPtr( TA_ParamHolder *params, - unsigned int paramIndex, - const TA_Integer *value ); - -TA_LIB_API TA_RetCode TA_SetInputParamRealPtr( TA_ParamHolder *params, - unsigned int paramIndex, - const TA_Real *value ); - -TA_LIB_API TA_RetCode TA_SetInputParamPricePtr( TA_ParamHolder *params, - unsigned int paramIndex, - const TA_Real *open, - const TA_Real *high, - const TA_Real *low, - const TA_Real *close, - const TA_Real *volume, - const TA_Real *openInterest ); - -/* Setup the values of the optional input parameters. - * If an optional input is not set, a default value will be used. - * - * paramIndex is zero for the first optional input. - */ -TA_LIB_API TA_RetCode TA_SetOptInputParamInteger( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Integer optInValue ); - -TA_LIB_API TA_RetCode TA_SetOptInputParamReal( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Real optInValue ); - -/* Setup the parameters indicating where to store the output. - * - * The caller is responsible to allocate sufficient memory. A safe bet is to - * always do: nb of output elements == (endIdx-startIdx+1) - * - * paramIndex is zero for the first output. - * - */ -TA_LIB_API TA_RetCode TA_SetOutputParamIntegerPtr( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Integer *out ); - -TA_LIB_API TA_RetCode TA_SetOutputParamRealPtr( TA_ParamHolder *params, - unsigned int paramIndex, - TA_Real *out ); - -/* Once the optional parameter are set, it is possible to - * get the lookback for this call. This information can be - * used to calculate the optimal size for the output buffers. - * (See the documentation for method to calculate the output size). - */ -TA_LIB_API TA_RetCode TA_GetLookback( const TA_ParamHolder *params, - TA_Integer *lookback ); - -/* Finally, call the TA function with the parameters. - * - * The TA function who is going to be called was specified - * when the TA_ParamHolderAlloc was done. - */ -TA_LIB_API TA_RetCode TA_CallFunc( const TA_ParamHolder *params, - TA_Integer startIdx, - TA_Integer endIdx, - TA_Integer *outBegIdx, - TA_Integer *outNbElement ); - - -/* Return XML representation of all the TA functions. - * The returned array is the same as the ta_func_api.xml file. - */ -TA_LIB_API const char *TA_FunctionDescriptionXML( void ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/ta-lib/local/include/ta-lib/ta_common.h b/src/ta-lib/local/include/ta-lib/ta_common.h deleted file mode 100644 index 2679a5bd9..000000000 --- a/src/ta-lib/local/include/ta-lib/ta_common.h +++ /dev/null @@ -1,160 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_COMMON_H -#define TA_COMMON_H - -/* The following macros are used to return internal errors. - * The Id can be from 1 to 999 and translate to the user - * as the return code 5000 to 5999. - * - * Everytime you wish to add a new fatal error code, - * use the "NEXT AVAILABLE NUMBER" and increment the - * number in this file. - * - * NEXT AVAILABLE NUMBER: 181 - */ -#define TA_INTERNAL_ERROR(Id) ((TA_RetCode)(TA_INTERNAL_ERROR+Id)) - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#ifndef TA_DEFS_H - #include "ta_defs.h" -#endif - -/* Some functions to get the version of TA-Lib. - * - * Format is "Major.Minor.Patch (Month Day Year Hour:Min:Sec)" - * - * Example: "1.2.0 (Jan 17 2004 23:59:59)" - * - * Major increments indicates an "Highly Recommended" update. - * - * Minor increments indicates arbitrary milestones in the - * development of the next major version. - * - * Patch are fixes to a "Major.Minor" release. - */ -TA_LIB_API const char *TA_GetVersionString( void ); - -/* Get individual component of the Version string */ -TA_LIB_API const char *TA_GetVersionMajor ( void ); -TA_LIB_API const char *TA_GetVersionMinor ( void ); -TA_LIB_API const char *TA_GetVersionPatch ( void ); -TA_LIB_API const char *TA_GetVersionDate ( void ); -TA_LIB_API const char *TA_GetVersionTime ( void ); - -/* Deprecated */ -TA_LIB_API const char *TA_GetVersionBuild ( void ); -TA_LIB_API const char *TA_GetVersionExtra ( void ); - -/* Misc. declaration used throughout the library code. */ -typedef double TA_Real; -typedef int TA_Integer; - -/* General purpose structure containing an array of string. - * - * Example of usage: - * void printStringTable( TA_StringTable *table ) - * { - * int i; - * for( i=0; i < table->size; i++ ) - * cout << table->string[i] << endl; - * } - * - */ -typedef struct TA_StringTable -{ - unsigned int size; /* Number of string. */ - const char **string; /* Pointer to the strings. */ - - /* Hidden data for internal use by TA-Lib. Do not modify. */ - void *hiddenData; -} TA_StringTable; -/* End-user can get additional information related to a TA_RetCode. - * - * Example: - * TA_RetCodeInfo info; - * - * retCode = TA_Initialize( ... ); - * - * if( retCode != TA_SUCCESS ) - * { - * TA_SetRetCodeInfo( retCode, &info ); - * printf( "Error %d(%s): %s\n", - * retCode, - * info.enumStr, - * info.infoStr ); - * } - * - * Would display: - * "Error 1(TA_LIB_NOT_INITIALIZE): TA_Initialize was not sucessfully called" - */ -typedef struct TA_RetCodeInfo -{ - const char *enumStr; /* Like "TA_LIB_NOT_INITIALIZE" */ - const char *infoStr; /* Like "TA_Initialize was not successfully called" */ -} TA_RetCodeInfo; - -/* Info is always returned, even when 'theRetCode' is invalid. */ -TA_LIB_API void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo ); - -/* TA_Initialize() initialize the ressources used by TA-Lib. This - * function must be called once prior to any other functions declared in - * this file. - * - * TA_Shutdown() allows to free all ressources used by TA-Lib. Following - * a shutdown, TA_Initialize() must be called again for re-using TA-Lib. - * - * TA_Shutdown() should be called prior to exiting the application code. - */ -TA_LIB_API TA_RetCode TA_Initialize( void ); -TA_LIB_API TA_RetCode TA_Shutdown( void ); - -/* TA_LIB_SOURCES_DIGEST helps for TA-Lib automated maintenance. - * - * This value is updated whenever a make, cmake or any source files - * modification should trig a repackaging of TA-Lib. - */ -#define TA_LIB_SOURCES_DIGEST f56bc6c0c0d72f1ee648897220e3ec3f - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/ta-lib/local/include/ta-lib/ta_defs.h b/src/ta-lib/local/include/ta-lib/ta_defs.h deleted file mode 100644 index bae153c96..000000000 --- a/src/ta-lib/local/include/ta-lib/ta_defs.h +++ /dev/null @@ -1,328 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_DEFS_H -#define TA_DEFS_H - -/*** The following block of code is to define: - *** - *** UInt32 : 32 bits unsigned integer. - *** Int32 : 32 bits signed integer. - *** UInt64 : 64 bits unsigned integer. - *** Int64 : 64 bits signed integer. - *** - *** INT_MIN : The minimal value for Int32 - *** INT_MAX : The maximal value for Int32 - ***/ -#ifndef FD_DEFS_H - #if defined( _MANAGED ) - /* Int32, UInt32, Int64 and UInt64 are built-in for .NET */ - #define INT_MIN (Int32::MinValue) - #define INT_MAX (Int32::MaxValue) - #elif defined( _JAVA ) || defined( _RUST ) - #define INT_MIN Integer.MIN_VALUE - #define INT_MAX Integer.MAX_VALUE - #else - #include - - /* Identify if 64 bits platform with __64BIT__. - * Can also be done from compiler command line. - */ - #if defined(_WIN64) - #define __64BIT__ 1 - #endif - - #if defined( __LP64__ ) || defined( _LP64 ) - #define __64BIT__ 1 - #endif - - /* Check also for some known GCC def for 64 bits platform. */ - #if defined(__alpha__)\ - ||defined(__ia64__)\ - ||defined(__ppc64__)\ - ||defined(__s390x__)\ - ||defined(__x86_64__) - #define __64BIT__ 1 - #endif - - #if !defined(__MACTYPES__) - typedef signed int Int32; - typedef unsigned int UInt32; - - #if defined(_WIN32) || defined(_WIN64) - /* See "Windows Data Types". Platform SDK. MSDN documentation. */ - typedef signed __int64 Int64; - typedef unsigned __int64 UInt64; - #else - #if defined(__64BIT__) - /* Standard LP64 model for 64 bits Unix platform. */ - typedef signed long Int64; - typedef unsigned long UInt64; - #else - /* Standard ILP32 model for 32 bits Unix platform. */ - typedef signed long long Int64; - typedef unsigned long long UInt64; - #endif - #endif - #endif - #endif -#endif - -/* Enumeration and macros to abstract syntax differences - * between C, C++, managed C++ and Java. - */ -#if defined( _MANAGED ) - - /* Enumeration abstraction */ - #define ENUM_BEGIN(w) enum class w { - #define ENUM_DEFINE(x,y) y - #define ENUM_VALUE(w,x,y) (w::y) - #define ENUM_CASE(w,x,y) (w::y) - #define ENUM_DECLARATION(w) w - #define ENUM_END(w) }; - - /* Structure abstraction */ - #define STRUCT_BEGIN(x) struct x { - #define STRUCT_END(x) }; - - /* Pointer/reference abstraction */ - #define VALUE_HANDLE_INT(name) int name - #define VALUE_HANDLE_DEREF(name) name - #define VALUE_HANDLE_DEREF_TO_ZERO(name) name = 0 - #define VALUE_HANDLE_OUT(name) name - - #define VALUE_HANDLE_GET(name) name - #define VALUE_HANDLE_SET(name,x) name = x - - /* Misc. */ - #define CONSTANT_DOUBLE(x) const double x - #define NAMESPACE(x) x:: - #define UNUSED_VARIABLE(x) (void)x - - #define TA_LIB_API - -#elif defined( _JAVA ) || defined( _RUST ) - - #define ENUM_BEGIN(w) public enum w { - #define ENUM_DEFINE(x,y) y - #define ENUM_VALUE(w,x,y) w.y - #define ENUM_CASE(w,x,y) y - #define ENUM_DECLARATION(w) w - #define ENUM_END(w) }; - - #define STRUCT_BEGIN(x) public class x { - #define STRUCT_END(x) }; - - #define VALUE_HANDLE_INT(name) MInteger name = new MInteger() - #define VALUE_HANDLE_DEREF(name) name.value - #define VALUE_HANDLE_DEREF_TO_ZERO(name) name.value = 0 - #define VALUE_HANDLE_OUT(name) name - - #define VALUE_HANDLE_GET(name) name.value - #define VALUE_HANDLE_SET(name,x) name.value = x - - #define CONSTANT_DOUBLE(x) final double x - #define NAMESPACE(x) x. - #define UNUSED_VARIABLE(x) - - #define TA_LIB_API - -#else - - #define ENUM_BEGIN(w) typedef enum { - #define ENUM_DEFINE(x,y) x - #define ENUM_VALUE(w,x,y) x - #define ENUM_CASE(w,x,y) x - #define ENUM_DECLARATION(w) TA_##w - #define ENUM_END(w) } TA_##w; - - #define STRUCT_BEGIN(x) typedef struct { - #define STRUCT_END(x) } x; - - #define VALUE_HANDLE_INT(name) int name - #define VALUE_HANDLE_DEREF(name) (*name) - #define VALUE_HANDLE_DEREF_TO_ZERO(name) (*name) = 0 - #define VALUE_HANDLE_OUT(name) &name - - #define VALUE_HANDLE_GET(name) name - #define VALUE_HANDLE_SET(name,x) name = x - - #define CONSTANT_DOUBLE(x) const double x - #define NAMESPACE(x) - #define UNUSED_VARIABLE(x) (void)x - - #ifdef _WIN32 - #ifdef TA_LIB_SHARED - #define TA_LIB_API __declspec(dllexport) - #else - #define TA_LIB_API - #endif - #elif defined(__GNUC__) && __GNUC__ >= 4 - #define TA_LIB_API __attribute__ ((visibility("default"))) - #else - #define TA_LIB_API - #endif -#endif - -/* Abstraction of function calls within the library. - * Needed because Java/.NET allows overloading, while for C the - * TA_PREFIX allows to select variant of the same function. - */ -#define FUNCTION_CALL(x) TA_PREFIX(x) -#define FUNCTION_CALL_DOUBLE(x) TA_##x -#define LOOKBACK_CALL(x) TA_##x##_Lookback - -/* min/max value for a TA_Integer */ -#define TA_INTEGER_MIN (INT_MIN+1) -#define TA_INTEGER_MAX (INT_MAX) - -/* min/max value for a TA_Real - * - * Use fix value making sense in the - * context of TA-Lib (avoid to use DBL_MIN - * and DBL_MAX standard macro because they - * are troublesome with some compiler). - */ -#define TA_REAL_MIN (-3e+37) -#define TA_REAL_MAX (3e+37) - -/* A value outside of the min/max range - * indicates an undefined or default value. - */ -#define TA_INTEGER_DEFAULT (INT_MIN) -#define TA_REAL_DEFAULT (-4e+37) - -/* Part of this file is generated by gen_code */ - -ENUM_BEGIN( RetCode ) - /* 0 */ ENUM_DEFINE( TA_SUCCESS, Success ), /* No error */ - /* 1 */ ENUM_DEFINE( TA_LIB_NOT_INITIALIZE, LibNotInitialize ), /* TA_Initialize was not sucessfully called */ - /* 2 */ ENUM_DEFINE( TA_BAD_PARAM, BadParam ), /* A parameter is out of range */ - /* 3 */ ENUM_DEFINE( TA_ALLOC_ERR, AllocErr ), /* Possibly out-of-memory */ - /* 4 */ ENUM_DEFINE( TA_GROUP_NOT_FOUND, GroupNotFound ), - /* 5 */ ENUM_DEFINE( TA_FUNC_NOT_FOUND, FuncNotFound ), - /* 6 */ ENUM_DEFINE( TA_INVALID_HANDLE, InvalidHandle ), - /* 7 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER, InvalidParamHolder ), - /* 8 */ ENUM_DEFINE( TA_INVALID_PARAM_HOLDER_TYPE, InvalidParamHolderType ), - /* 9 */ ENUM_DEFINE( TA_INVALID_PARAM_FUNCTION, InvalidParamFunction ), - /* 10 */ ENUM_DEFINE( TA_INPUT_NOT_ALL_INITIALIZE, InputNotAllInitialize ), - /* 11 */ ENUM_DEFINE( TA_OUTPUT_NOT_ALL_INITIALIZE, OutputNotAllInitialize ), - /* 12 */ ENUM_DEFINE( TA_OUT_OF_RANGE_START_INDEX, OutOfRangeStartIndex ), - /* 13 */ ENUM_DEFINE( TA_OUT_OF_RANGE_END_INDEX, OutOfRangeEndIndex ), - /* 14 */ ENUM_DEFINE( TA_INVALID_LIST_TYPE, InvalidListType ), - /* 15 */ ENUM_DEFINE( TA_BAD_OBJECT, BadObject ), - /* 16 */ ENUM_DEFINE( TA_NOT_SUPPORTED, NotSupported ), - /* 5000 */ ENUM_DEFINE( TA_INTERNAL_ERROR, InternalError ) = 5000, - /* 0xFFFF */ ENUM_DEFINE( TA_UNKNOWN_ERR, UnknownErr ) = 0xFFFF -ENUM_END( RetCode ) - -ENUM_BEGIN( Compatibility ) - ENUM_DEFINE( TA_COMPATIBILITY_DEFAULT, Default ), - ENUM_DEFINE( TA_COMPATIBILITY_METASTOCK, Metastock ) -ENUM_END( Compatibility ) - -ENUM_BEGIN( MAType ) - ENUM_DEFINE( TA_MAType_SMA, Sma ) =0, - ENUM_DEFINE( TA_MAType_EMA, Ema ) =1, - ENUM_DEFINE( TA_MAType_WMA, Wma ) =2, - ENUM_DEFINE( TA_MAType_DEMA, Dema ) =3, - ENUM_DEFINE( TA_MAType_TEMA, Tema ) =4, - ENUM_DEFINE( TA_MAType_TRIMA, Trima ) =5, - ENUM_DEFINE( TA_MAType_KAMA, Kama ) =6, - ENUM_DEFINE( TA_MAType_MAMA, Mama ) =7, - ENUM_DEFINE( TA_MAType_T3, T3 ) =8 -ENUM_END( MAType ) - - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ ENUM_BEGIN( FuncUnstId ) -/* Generated */ /* 000 */ ENUM_DEFINE( TA_FUNC_UNST_ADX, Adx), -/* Generated */ /* 001 */ ENUM_DEFINE( TA_FUNC_UNST_ADXR, Adxr), -/* Generated */ /* 002 */ ENUM_DEFINE( TA_FUNC_UNST_ATR, Atr), -/* Generated */ /* 003 */ ENUM_DEFINE( TA_FUNC_UNST_CMO, Cmo), -/* Generated */ /* 004 */ ENUM_DEFINE( TA_FUNC_UNST_DX, Dx), -/* Generated */ /* 005 */ ENUM_DEFINE( TA_FUNC_UNST_EMA, Ema), -/* Generated */ /* 006 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPERIOD, HtDcPeriod), -/* Generated */ /* 007 */ ENUM_DEFINE( TA_FUNC_UNST_HT_DCPHASE, HtDcPhase), -/* Generated */ /* 008 */ ENUM_DEFINE( TA_FUNC_UNST_HT_PHASOR, HtPhasor), -/* Generated */ /* 009 */ ENUM_DEFINE( TA_FUNC_UNST_HT_SINE, HtSine), -/* Generated */ /* 010 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDLINE, HtTrendline), -/* Generated */ /* 011 */ ENUM_DEFINE( TA_FUNC_UNST_HT_TRENDMODE, HtTrendMode), -/* Generated */ /* 012 */ ENUM_DEFINE( TA_FUNC_UNST_IMI, Imi), -/* Generated */ /* 013 */ ENUM_DEFINE( TA_FUNC_UNST_KAMA, Kama), -/* Generated */ /* 014 */ ENUM_DEFINE( TA_FUNC_UNST_MAMA, Mama), -/* Generated */ /* 015 */ ENUM_DEFINE( TA_FUNC_UNST_MFI, Mfi), -/* Generated */ /* 016 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DI, MinusDI), -/* Generated */ /* 017 */ ENUM_DEFINE( TA_FUNC_UNST_MINUS_DM, MinusDM), -/* Generated */ /* 018 */ ENUM_DEFINE( TA_FUNC_UNST_NATR, Natr), -/* Generated */ /* 019 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DI, PlusDI), -/* Generated */ /* 020 */ ENUM_DEFINE( TA_FUNC_UNST_PLUS_DM, PlusDM), -/* Generated */ /* 021 */ ENUM_DEFINE( TA_FUNC_UNST_RSI, Rsi), -/* Generated */ /* 022 */ ENUM_DEFINE( TA_FUNC_UNST_STOCHRSI, StochRsi), -/* Generated */ /* 023 */ ENUM_DEFINE( TA_FUNC_UNST_T3, T3), -/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll), -/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1 -/* Generated */ ENUM_END( FuncUnstId ) -/* Generated */ -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ - -/* The TA_RangeType enum specifies the types of range that can be considered - * when to compare a part of a candle to other candles - */ - -ENUM_BEGIN( RangeType ) - ENUM_DEFINE( TA_RangeType_RealBody, RealBody ), - ENUM_DEFINE( TA_RangeType_HighLow, HighLow ), - ENUM_DEFINE( TA_RangeType_Shadows, Shadows ) -ENUM_END( RangeType ) - -/* The TA_CandleSettingType enum specifies which kind of setting to consider; - * the settings are based on the parts of the candle and the common words - * indicating the length (short, long, very long) - */ -ENUM_BEGIN( CandleSettingType ) - ENUM_DEFINE( TA_BodyLong, BodyLong ), - ENUM_DEFINE( TA_BodyVeryLong, BodyVeryLong ), - ENUM_DEFINE( TA_BodyShort, BodyShort ), - ENUM_DEFINE( TA_BodyDoji, BodyDoji ), - ENUM_DEFINE( TA_ShadowLong, ShadowLong ), - ENUM_DEFINE( TA_ShadowVeryLong, ShadowVeryLong ), - ENUM_DEFINE( TA_ShadowShort, ShadowShort ), - ENUM_DEFINE( TA_ShadowVeryShort, ShadowVeryShort ), - ENUM_DEFINE( TA_Near, Near ), - ENUM_DEFINE( TA_Far, Far ), - ENUM_DEFINE( TA_Equal, Equal ), - ENUM_DEFINE( TA_AllCandleSettings, AllCandleSettings ) -ENUM_END( CandleSettingType ) - -#endif diff --git a/src/ta-lib/local/include/ta-lib/ta_func.h b/src/ta-lib/local/include/ta-lib/ta_func.h deleted file mode 100644 index e01cc42e4..000000000 --- a/src/ta-lib/local/include/ta-lib/ta_func.h +++ /dev/null @@ -1,5346 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_FUNC_H -#define TA_FUNC_H - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -/* This header contains the prototype of all the Technical Analysis - * function provided by TA-LIB. - */ - -/* TA-LIB Developer Note: Do not modify this file, it is automaticaly - * generated by gen_code. - */ -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef TA_DEFS_H - #include "ta_defs.h" -#endif - - -/* - * TA_ACCBANDS - Acceleration Bands - * - * Input = High, Low, Close - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ACCBANDS( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API TA_RetCode TA_S_ACCBANDS( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API int TA_ACCBANDS_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_ACOS - Vector Trigonometric ACos - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ACOS( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ACOS( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ACOS_Lookback( void ); - - -/* - * TA_AD - Chaikin A/D Line - * - * Input = High, Low, Close, Volume - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_AD( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - const double inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AD( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - const float inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AD_Lookback( void ); - - -/* - * TA_ADD - Vector Arithmetic Add - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ADD( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADD( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADD_Lookback( void ); - - -/* - * TA_ADOSC - Chaikin A/D Oscillator - * - * Input = High, Low, Close, Volume - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * - */ -TA_LIB_API TA_RetCode TA_ADOSC( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - const double inVolume[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADOSC( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - const float inVolume[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADOSC_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod ); /* From 2 to 100000 */ - - -/* - * TA_ADX - Average Directional Movement Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ADX( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADX( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_ADXR - Average Directional Movement Index Rating - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ADXR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ADXR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ADXR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_APO - Absolute Price Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_APO( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_APO( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_APO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_AROON - Aroon - * - * Input = High, Low - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_AROON( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outAroonDown[], - double outAroonUp[] ); - -TA_LIB_API TA_RetCode TA_S_AROON( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outAroonDown[], - double outAroonUp[] ); - -TA_LIB_API int TA_AROON_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_AROONOSC - Aroon Oscillator - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_AROONOSC( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AROONOSC( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AROONOSC_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_ASIN - Vector Trigonometric ASin - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ASIN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ASIN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ASIN_Lookback( void ); - - -/* - * TA_ATAN - Vector Trigonometric ATan - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_ATAN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ATAN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ATAN_Lookback( void ); - - -/* - * TA_ATR - Average True Range - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ATR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ATR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_AVGPRICE - Average Price - * - * Input = Open, High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_AVGPRICE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AVGPRICE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AVGPRICE_Lookback( void ); - - -/* - * TA_AVGDEV - Average Deviation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_AVGDEV( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_AVGDEV( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_AVGDEV_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_BBANDS - Bollinger Bands - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInNbDevUp:(From TA_REAL_MIN to TA_REAL_MAX) - * Deviation multiplier for upper band - * - * optInNbDevDn:(From TA_REAL_MIN to TA_REAL_MAX) - * Deviation multiplier for lower band - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_BBANDS( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API TA_RetCode TA_S_BBANDS( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outRealUpperBand[], - double outRealMiddleBand[], - double outRealLowerBand[] ); - -TA_LIB_API int TA_BBANDS_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ - TA_MAType optInMAType ); - -/* - * TA_BETA - Beta - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_BETA( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_BETA( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_BETA_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_BOP - Balance Of Power - * - * Input = Open, High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_BOP( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_BOP( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_BOP_Lookback( void ); - - -/* - * TA_CCI - Commodity Channel Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_CCI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CCI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CCI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_CDL2CROWS - Two Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL2CROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL2CROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL2CROWS_Lookback( void ); - - -/* - * TA_CDL3BLACKCROWS - Three Black Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3BLACKCROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3BLACKCROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3BLACKCROWS_Lookback( void ); - - -/* - * TA_CDL3INSIDE - Three Inside Up/Down - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3INSIDE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3INSIDE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3INSIDE_Lookback( void ); - - -/* - * TA_CDL3LINESTRIKE - Three-Line Strike - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3LINESTRIKE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3LINESTRIKE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3LINESTRIKE_Lookback( void ); - - -/* - * TA_CDL3OUTSIDE - Three Outside Up/Down - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3OUTSIDE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3OUTSIDE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3OUTSIDE_Lookback( void ); - - -/* - * TA_CDL3STARSINSOUTH - Three Stars In The South - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3STARSINSOUTH( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3STARSINSOUTH( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3STARSINSOUTH_Lookback( void ); - - -/* - * TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDL3WHITESOLDIERS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDL3WHITESOLDIERS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDL3WHITESOLDIERS_Lookback( void ); - - -/* - * TA_CDLABANDONEDBABY - Abandoned Baby - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLABANDONEDBABY( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLABANDONEDBABY( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLABANDONEDBABY_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLADVANCEBLOCK - Advance Block - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLADVANCEBLOCK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLADVANCEBLOCK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLADVANCEBLOCK_Lookback( void ); - - -/* - * TA_CDLBELTHOLD - Belt-hold - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLBELTHOLD( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLBELTHOLD( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLBELTHOLD_Lookback( void ); - - -/* - * TA_CDLBREAKAWAY - Breakaway - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLBREAKAWAY( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLBREAKAWAY( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLBREAKAWAY_Lookback( void ); - - -/* - * TA_CDLCLOSINGMARUBOZU - Closing Marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLCLOSINGMARUBOZU( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLCLOSINGMARUBOZU( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLCLOSINGMARUBOZU_Lookback( void ); - - -/* - * TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLCONCEALBABYSWALL( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLCONCEALBABYSWALL( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLCONCEALBABYSWALL_Lookback( void ); - - -/* - * TA_CDLCOUNTERATTACK - Counterattack - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLCOUNTERATTACK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLCOUNTERATTACK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLCOUNTERATTACK_Lookback( void ); - - -/* - * TA_CDLDARKCLOUDCOVER - Dark Cloud Cover - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLDARKCLOUDCOVER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDARKCLOUDCOVER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDARKCLOUDCOVER_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLDOJI - Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDOJI_Lookback( void ); - - -/* - * TA_CDLDOJISTAR - Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLDOJISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDOJISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDOJISTAR_Lookback( void ); - - -/* - * TA_CDLDRAGONFLYDOJI - Dragonfly Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLDRAGONFLYDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLDRAGONFLYDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLDRAGONFLYDOJI_Lookback( void ); - - -/* - * TA_CDLENGULFING - Engulfing Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLENGULFING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLENGULFING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLENGULFING_Lookback( void ); - - -/* - * TA_CDLEVENINGDOJISTAR - Evening Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLEVENINGDOJISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLEVENINGDOJISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLEVENINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLEVENINGSTAR - Evening Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLEVENINGSTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLEVENINGSTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLEVENINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLGAPSIDESIDEWHITE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLGAPSIDESIDEWHITE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLGAPSIDESIDEWHITE_Lookback( void ); - - -/* - * TA_CDLGRAVESTONEDOJI - Gravestone Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLGRAVESTONEDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLGRAVESTONEDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLGRAVESTONEDOJI_Lookback( void ); - - -/* - * TA_CDLHAMMER - Hammer - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHAMMER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHAMMER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHAMMER_Lookback( void ); - - -/* - * TA_CDLHANGINGMAN - Hanging Man - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHANGINGMAN( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHANGINGMAN( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHANGINGMAN_Lookback( void ); - - -/* - * TA_CDLHARAMI - Harami Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHARAMI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHARAMI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHARAMI_Lookback( void ); - - -/* - * TA_CDLHARAMICROSS - Harami Cross Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHARAMICROSS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHARAMICROSS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHARAMICROSS_Lookback( void ); - - -/* - * TA_CDLHIGHWAVE - High-Wave Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHIGHWAVE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHIGHWAVE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHIGHWAVE_Lookback( void ); - - -/* - * TA_CDLHIKKAKE - Hikkake Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHIKKAKE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHIKKAKE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHIKKAKE_Lookback( void ); - - -/* - * TA_CDLHIKKAKEMOD - Modified Hikkake Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHIKKAKEMOD( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHIKKAKEMOD( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHIKKAKEMOD_Lookback( void ); - - -/* - * TA_CDLHOMINGPIGEON - Homing Pigeon - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLHOMINGPIGEON( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLHOMINGPIGEON( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLHOMINGPIGEON_Lookback( void ); - - -/* - * TA_CDLIDENTICAL3CROWS - Identical Three Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLIDENTICAL3CROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLIDENTICAL3CROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLIDENTICAL3CROWS_Lookback( void ); - - -/* - * TA_CDLINNECK - In-Neck Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLINNECK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLINNECK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLINNECK_Lookback( void ); - - -/* - * TA_CDLINVERTEDHAMMER - Inverted Hammer - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLINVERTEDHAMMER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLINVERTEDHAMMER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLINVERTEDHAMMER_Lookback( void ); - - -/* - * TA_CDLKICKING - Kicking - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLKICKING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLKICKING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLKICKING_Lookback( void ); - - -/* - * TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLKICKINGBYLENGTH( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLKICKINGBYLENGTH( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLKICKINGBYLENGTH_Lookback( void ); - - -/* - * TA_CDLLADDERBOTTOM - Ladder Bottom - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLLADDERBOTTOM( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLLADDERBOTTOM( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLLADDERBOTTOM_Lookback( void ); - - -/* - * TA_CDLLONGLEGGEDDOJI - Long Legged Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLLONGLEGGEDDOJI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLLONGLEGGEDDOJI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLLONGLEGGEDDOJI_Lookback( void ); - - -/* - * TA_CDLLONGLINE - Long Line Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLLONGLINE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLLONGLINE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLLONGLINE_Lookback( void ); - - -/* - * TA_CDLMARUBOZU - Marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLMARUBOZU( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMARUBOZU( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMARUBOZU_Lookback( void ); - - -/* - * TA_CDLMATCHINGLOW - Matching Low - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLMATCHINGLOW( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMATCHINGLOW( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMATCHINGLOW_Lookback( void ); - - -/* - * TA_CDLMATHOLD - Mat Hold - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLMATHOLD( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMATHOLD( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMATHOLD_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLMORNINGDOJISTAR - Morning Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLMORNINGDOJISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMORNINGDOJISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMORNINGDOJISTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLMORNINGSTAR - Morning Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -TA_LIB_API TA_RetCode TA_CDLMORNINGSTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLMORNINGSTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - double optInPenetration, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLMORNINGSTAR_Lookback( double optInPenetration ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_CDLONNECK - On-Neck Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLONNECK( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLONNECK( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLONNECK_Lookback( void ); - - -/* - * TA_CDLPIERCING - Piercing Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLPIERCING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLPIERCING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLPIERCING_Lookback( void ); - - -/* - * TA_CDLRICKSHAWMAN - Rickshaw Man - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLRICKSHAWMAN( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLRICKSHAWMAN( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLRICKSHAWMAN_Lookback( void ); - - -/* - * TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLRISEFALL3METHODS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLRISEFALL3METHODS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLRISEFALL3METHODS_Lookback( void ); - - -/* - * TA_CDLSEPARATINGLINES - Separating Lines - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSEPARATINGLINES( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSEPARATINGLINES( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSEPARATINGLINES_Lookback( void ); - - -/* - * TA_CDLSHOOTINGSTAR - Shooting Star - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSHOOTINGSTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSHOOTINGSTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSHOOTINGSTAR_Lookback( void ); - - -/* - * TA_CDLSHORTLINE - Short Line Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSHORTLINE( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSHORTLINE( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSHORTLINE_Lookback( void ); - - -/* - * TA_CDLSPINNINGTOP - Spinning Top - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSPINNINGTOP( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSPINNINGTOP( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSPINNINGTOP_Lookback( void ); - - -/* - * TA_CDLSTALLEDPATTERN - Stalled Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSTALLEDPATTERN( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSTALLEDPATTERN( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSTALLEDPATTERN_Lookback( void ); - - -/* - * TA_CDLSTICKSANDWICH - Stick Sandwich - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLSTICKSANDWICH( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLSTICKSANDWICH( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLSTICKSANDWICH_Lookback( void ); - - -/* - * TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTAKURI( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTAKURI( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTAKURI_Lookback( void ); - - -/* - * TA_CDLTASUKIGAP - Tasuki Gap - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTASUKIGAP( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTASUKIGAP( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTASUKIGAP_Lookback( void ); - - -/* - * TA_CDLTHRUSTING - Thrusting Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTHRUSTING( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTHRUSTING( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTHRUSTING_Lookback( void ); - - -/* - * TA_CDLTRISTAR - Tristar Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLTRISTAR( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLTRISTAR( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLTRISTAR_Lookback( void ); - - -/* - * TA_CDLUNIQUE3RIVER - Unique 3 River - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLUNIQUE3RIVER( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLUNIQUE3RIVER( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLUNIQUE3RIVER_Lookback( void ); - - -/* - * TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLUPSIDEGAP2CROWS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLUPSIDEGAP2CROWS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLUPSIDEGAP2CROWS_Lookback( void ); - - -/* - * TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods - * - * Input = Open, High, Low, Close - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_CDLXSIDEGAP3METHODS( int startIdx, - int endIdx, - const double inOpen[], - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_CDLXSIDEGAP3METHODS( int startIdx, - int endIdx, - const float inOpen[], - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_CDLXSIDEGAP3METHODS_Lookback( void ); - - -/* - * TA_CEIL - Vector Ceil - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_CEIL( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CEIL( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CEIL_Lookback( void ); - - -/* - * TA_CMO - Chande Momentum Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_CMO( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CMO( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CMO_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_CORREL - Pearson's Correlation Coefficient (r) - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_CORREL( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_CORREL( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_CORREL_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_COS - Vector Trigonometric Cos - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_COS( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_COS( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_COS_Lookback( void ); - - -/* - * TA_COSH - Vector Trigonometric Cosh - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_COSH( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_COSH( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_COSH_Lookback( void ); - - -/* - * TA_DEMA - Double Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_DEMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_DEMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_DEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_DIV - Vector Arithmetic Div - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_DIV( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_DIV( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_DIV_Lookback( void ); - - -/* - * TA_DX - Directional Movement Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_DX( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_DX( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_DX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_EMA - Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_EMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_EMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_EMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_EXP - Vector Arithmetic Exp - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_EXP( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_EXP( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_EXP_Lookback( void ); - - -/* - * TA_FLOOR - Vector Floor - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_FLOOR( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_FLOOR( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_FLOOR_Lookback( void ); - - -/* - * TA_HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_HT_DCPERIOD( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_HT_DCPERIOD( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_HT_DCPERIOD_Lookback( void ); - - -/* - * TA_HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_HT_DCPHASE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_HT_DCPHASE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_HT_DCPHASE_Lookback( void ); - - -/* - * TA_HT_PHASOR - Hilbert Transform - Phasor Components - * - * Input = double - * Output = double, double - * - */ -TA_LIB_API TA_RetCode TA_HT_PHASOR( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outInPhase[], - double outQuadrature[] ); - -TA_LIB_API TA_RetCode TA_S_HT_PHASOR( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outInPhase[], - double outQuadrature[] ); - -TA_LIB_API int TA_HT_PHASOR_Lookback( void ); - - -/* - * TA_HT_SINE - Hilbert Transform - SineWave - * - * Input = double - * Output = double, double - * - */ -TA_LIB_API TA_RetCode TA_HT_SINE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outSine[], - double outLeadSine[] ); - -TA_LIB_API TA_RetCode TA_S_HT_SINE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outSine[], - double outLeadSine[] ); - -TA_LIB_API int TA_HT_SINE_Lookback( void ); - - -/* - * TA_HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_HT_TRENDLINE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_HT_TRENDLINE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_HT_TRENDLINE_Lookback( void ); - - -/* - * TA_HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode - * - * Input = double - * Output = int - * - */ -TA_LIB_API TA_RetCode TA_HT_TRENDMODE( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_HT_TRENDMODE( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_HT_TRENDMODE_Lookback( void ); - - -/* - * TA_IMI - Intraday Momentum Index - * - * Input = Open, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_IMI( int startIdx, - int endIdx, - const double inOpen[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_IMI( int startIdx, - int endIdx, - const float inOpen[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_IMI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_KAMA - Kaufman Adaptive Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_KAMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_KAMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_KAMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG - Linear Regression - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG_ANGLE - Linear Regression Angle - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG_ANGLE( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG_ANGLE( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_ANGLE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG_INTERCEPT - Linear Regression Intercept - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG_INTERCEPT( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG_INTERCEPT( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_INTERCEPT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LINEARREG_SLOPE - Linear Regression Slope - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_LINEARREG_SLOPE( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LINEARREG_SLOPE( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LINEARREG_SLOPE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_LN - Vector Log Natural - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_LN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LN_Lookback( void ); - - -/* - * TA_LOG10 - Vector Log10 - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_LOG10( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_LOG10( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_LOG10_Lookback( void ); - - -/* - * TA_MA - Moving average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_MA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MA_Lookback( int optInTimePeriod, /* From 1 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_MACD - Moving Average Convergence/Divergence - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * - */ -TA_LIB_API TA_RetCode TA_MACD( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API TA_RetCode TA_S_MACD( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API int TA_MACD_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - int optInSignalPeriod ); /* From 1 to 100000 */ - - -/* - * TA_MACDEXT - MACD with controllable MA type - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInFastMAType: - * Type of Moving Average for fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInSlowMAType: - * Type of Moving Average for slow MA - * - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * optInSignalMAType: - * Type of Moving Average for signal line - * - * - */ -TA_LIB_API TA_RetCode TA_MACDEXT( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - TA_MAType optInFastMAType, - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInSlowMAType, - int optInSignalPeriod, /* From 1 to 100000 */ - TA_MAType optInSignalMAType, - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API TA_RetCode TA_S_MACDEXT( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - TA_MAType optInFastMAType, - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInSlowMAType, - int optInSignalPeriod, /* From 1 to 100000 */ - TA_MAType optInSignalMAType, - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API int TA_MACDEXT_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - TA_MAType optInFastMAType, - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInSlowMAType, - int optInSignalPeriod, /* From 1 to 100000 */ - TA_MAType optInSignalMAType ); - -/* - * TA_MACDFIX - Moving Average Convergence/Divergence Fix 12/26 - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * - */ -TA_LIB_API TA_RetCode TA_MACDFIX( int startIdx, - int endIdx, - const double inReal[], - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API TA_RetCode TA_S_MACDFIX( int startIdx, - int endIdx, - const float inReal[], - int optInSignalPeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ); - -TA_LIB_API int TA_MACDFIX_Lookback( int optInSignalPeriod ); /* From 1 to 100000 */ - - -/* - * TA_MAMA - MESA Adaptive Moving Average - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastLimit:(From 0.01 to 0.99) - * Upper limit use in the adaptive algorithm - * - * optInSlowLimit:(From 0.01 to 0.99) - * Lower limit use in the adaptive algorithm - * - * - */ -TA_LIB_API TA_RetCode TA_MAMA( int startIdx, - int endIdx, - const double inReal[], - double optInFastLimit, /* From 0.01 to 0.99 */ - double optInSlowLimit, /* From 0.01 to 0.99 */ - int *outBegIdx, - int *outNBElement, - double outMAMA[], - double outFAMA[] ); - -TA_LIB_API TA_RetCode TA_S_MAMA( int startIdx, - int endIdx, - const float inReal[], - double optInFastLimit, /* From 0.01 to 0.99 */ - double optInSlowLimit, /* From 0.01 to 0.99 */ - int *outBegIdx, - int *outNBElement, - double outMAMA[], - double outFAMA[] ); - -TA_LIB_API int TA_MAMA_Lookback( double optInFastLimit, /* From 0.01 to 0.99 */ - double optInSlowLimit ); /* From 0.01 to 0.99 */ - - -/* - * TA_MAVP - Moving average with variable period - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInMinPeriod:(From 2 to 100000) - * Value less than minimum will be changed to Minimum period - * - * optInMaxPeriod:(From 2 to 100000) - * Value higher than maximum will be changed to Maximum period - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_MAVP( int startIdx, - int endIdx, - const double inReal[], - const double inPeriods[], - int optInMinPeriod, /* From 2 to 100000 */ - int optInMaxPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MAVP( int startIdx, - int endIdx, - const float inReal[], - const float inPeriods[], - int optInMinPeriod, /* From 2 to 100000 */ - int optInMaxPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MAVP_Lookback( int optInMinPeriod, /* From 2 to 100000 */ - int optInMaxPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_MAX - Highest value over a specified period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MAX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MAX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MAXINDEX - Index of highest value over a specified period - * - * Input = double - * Output = int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MAXINDEX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_MAXINDEX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_MAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MEDPRICE - Median Price - * - * Input = High, Low - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_MEDPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MEDPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MEDPRICE_Lookback( void ); - - -/* - * TA_MFI - Money Flow Index - * - * Input = High, Low, Close, Volume - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MFI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - const double inVolume[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MFI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - const float inVolume[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MFI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MIDPOINT - MidPoint over period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MIDPOINT( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MIDPOINT( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MIDPOINT_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MIDPRICE - Midpoint Price over period - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MIDPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MIDPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MIDPRICE_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MIN - Lowest value over a specified period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MIN( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MIN( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MIN_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MININDEX - Index of lowest value over a specified period - * - * Input = double - * Output = int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MININDEX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API TA_RetCode TA_S_MININDEX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outInteger[] ); - -TA_LIB_API int TA_MININDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MINMAX - Lowest and highest values over a specified period - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINMAX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMin[], - double outMax[] ); - -TA_LIB_API TA_RetCode TA_S_MINMAX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outMin[], - double outMax[] ); - -TA_LIB_API int TA_MINMAX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MINMAXINDEX - Indexes of lowest and highest values over a specified period - * - * Input = double - * Output = int, int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINMAXINDEX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outMinIdx[], - int outMaxIdx[] ); - -TA_LIB_API TA_RetCode TA_S_MINMAXINDEX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - int outMinIdx[], - int outMaxIdx[] ); - -TA_LIB_API int TA_MINMAXINDEX_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_MINUS_DI - Minus Directional Indicator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINUS_DI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MINUS_DI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MINUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_MINUS_DM - Minus Directional Movement - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MINUS_DM( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MINUS_DM( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MINUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_MOM - Momentum - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_MOM( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MOM( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MOM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_MULT - Vector Arithmetic Mult - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_MULT( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_MULT( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_MULT_Lookback( void ); - - -/* - * TA_NATR - Normalized Average True Range - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_NATR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_NATR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_NATR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_OBV - On Balance Volume - * - * Input = double, Volume - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_OBV( int startIdx, - int endIdx, - const double inReal[], - const double inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_OBV( int startIdx, - int endIdx, - const float inReal[], - const float inVolume[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_OBV_Lookback( void ); - - -/* - * TA_PLUS_DI - Plus Directional Indicator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_PLUS_DI( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_PLUS_DI( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_PLUS_DI_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_PLUS_DM - Plus Directional Movement - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_PLUS_DM( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_PLUS_DM( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_PLUS_DM_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_PPO - Percentage Price Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInMAType: - * Type of Moving Average - * - * - */ -TA_LIB_API TA_RetCode TA_PPO( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_PPO( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType, - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_PPO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ - int optInSlowPeriod, /* From 2 to 100000 */ - TA_MAType optInMAType ); - -/* - * TA_ROC - Rate of change : ((price/prevPrice)-1)*100 - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROC( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROC( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROC_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROCP( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROCP( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROCP_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_ROCR - Rate of change ratio: (price/prevPrice) - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROCR( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROCR( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROCR_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100 - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_ROCR100( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ROCR100( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ROCR100_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_RSI - Relative Strength Index - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_RSI( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_RSI( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_RSI_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_SAR - Parabolic SAR - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInAcceleration:(From 0 to TA_REAL_MAX) - * Acceleration Factor used up to the Maximum value - * - * optInMaximum:(From 0 to TA_REAL_MAX) - * Acceleration Factor Maximum value - * - * - */ -TA_LIB_API TA_RetCode TA_SAR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - double optInAcceleration, /* From 0 to TA_REAL_MAX */ - double optInMaximum, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SAR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - double optInAcceleration, /* From 0 to TA_REAL_MAX */ - double optInMaximum, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SAR_Lookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ - double optInMaximum ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_SAREXT - Parabolic SAR - Extended - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInStartValue:(From TA_REAL_MIN to TA_REAL_MAX) - * Start value and direction. 0 for Auto, >0 for Long, <0 for Short - * - * optInOffsetOnReverse:(From 0 to TA_REAL_MAX) - * Percent offset added/removed to initial stop on short/long reversal - * - * optInAccelerationInitLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor initial value for the Long direction - * - * optInAccelerationLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor for the Long direction - * - * optInAccelerationMaxLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor maximum value for the Long direction - * - * optInAccelerationInitShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor initial value for the Short direction - * - * optInAccelerationShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor for the Short direction - * - * optInAccelerationMaxShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor maximum value for the Short direction - * - * - */ -TA_LIB_API TA_RetCode TA_SAREXT( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SAREXT( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SAREXT_Lookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ - double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ - double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ - double optInAccelerationMaxShort ); /* From 0 to TA_REAL_MAX */ - - -/* - * TA_SIN - Vector Trigonometric Sin - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SIN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SIN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SIN_Lookback( void ); - - -/* - * TA_SINH - Vector Trigonometric Sinh - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SINH( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SINH( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SINH_Lookback( void ); - - -/* - * TA_SMA - Simple Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_SMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_SQRT - Vector Square Root - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SQRT( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SQRT( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SQRT_Lookback( void ); - - -/* - * TA_STDDEV - Standard Deviation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) - * Nb of deviations - * - * - */ -TA_LIB_API TA_RetCode TA_STDDEV( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_STDDEV( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_STDDEV_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ - - -/* - * TA_STOCH - Stochastic - * - * Input = High, Low, Close - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInSlowK_Period:(From 1 to 100000) - * Smoothing for making the Slow-K line. Usually set to 3 - * - * optInSlowK_MAType: - * Type of Moving Average for Slow-K - * - * optInSlowD_Period:(From 1 to 100000) - * Smoothing for making the Slow-D line - * - * optInSlowD_MAType: - * Type of Moving Average for Slow-D - * - * - */ -TA_LIB_API TA_RetCode TA_STOCH( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInSlowK_Period, /* From 1 to 100000 */ - TA_MAType optInSlowK_MAType, - int optInSlowD_Period, /* From 1 to 100000 */ - TA_MAType optInSlowD_MAType, - int *outBegIdx, - int *outNBElement, - double outSlowK[], - double outSlowD[] ); - -TA_LIB_API TA_RetCode TA_S_STOCH( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInSlowK_Period, /* From 1 to 100000 */ - TA_MAType optInSlowK_MAType, - int optInSlowD_Period, /* From 1 to 100000 */ - TA_MAType optInSlowD_MAType, - int *outBegIdx, - int *outNBElement, - double outSlowK[], - double outSlowD[] ); - -TA_LIB_API int TA_STOCH_Lookback( int optInFastK_Period, /* From 1 to 100000 */ - int optInSlowK_Period, /* From 1 to 100000 */ - TA_MAType optInSlowK_MAType, - int optInSlowD_Period, /* From 1 to 100000 */ - TA_MAType optInSlowD_MAType ); - -/* - * TA_STOCHF - Stochastic Fast - * - * Input = High, Low, Close - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInFastD_Period:(From 1 to 100000) - * Smoothing for making the Fast-D line. Usually set to 3 - * - * optInFastD_MAType: - * Type of Moving Average for Fast-D - * - * - */ -TA_LIB_API TA_RetCode TA_STOCHF( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API TA_RetCode TA_S_STOCHF( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API int TA_STOCHF_Lookback( int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType ); - -/* - * TA_STOCHRSI - Stochastic Relative Strength Index - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInFastD_Period:(From 1 to 100000) - * Smoothing for making the Fast-D line. Usually set to 3 - * - * optInFastD_MAType: - * Type of Moving Average for Fast-D - * - * - */ -TA_LIB_API TA_RetCode TA_STOCHRSI( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API TA_RetCode TA_S_STOCHRSI( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType, - int *outBegIdx, - int *outNBElement, - double outFastK[], - double outFastD[] ); - -TA_LIB_API int TA_STOCHRSI_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - int optInFastK_Period, /* From 1 to 100000 */ - int optInFastD_Period, /* From 1 to 100000 */ - TA_MAType optInFastD_MAType ); - -/* - * TA_SUB - Vector Arithmetic Subtraction - * - * Input = double, double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_SUB( int startIdx, - int endIdx, - const double inReal0[], - const double inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SUB( int startIdx, - int endIdx, - const float inReal0[], - const float inReal1[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SUB_Lookback( void ); - - -/* - * TA_SUM - Summation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_SUM( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_SUM( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_SUM_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_T3 - Triple Exponential Moving Average (T3) - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInVFactor:(From 0 to 1) - * Volume Factor - * - * - */ -TA_LIB_API TA_RetCode TA_T3( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInVFactor, /* From 0 to 1 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_T3( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - double optInVFactor, /* From 0 to 1 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_T3_Lookback( int optInTimePeriod, /* From 2 to 100000 */ - double optInVFactor ); /* From 0 to 1 */ - - -/* - * TA_TAN - Vector Trigonometric Tan - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TAN( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TAN( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TAN_Lookback( void ); - - -/* - * TA_TANH - Vector Trigonometric Tanh - * - * Input = double - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TANH( int startIdx, - int endIdx, - const double inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TANH( int startIdx, - int endIdx, - const float inReal[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TANH_Lookback( void ); - - -/* - * TA_TEMA - Triple Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TEMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TEMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TEMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_TRANGE - True Range - * - * Input = High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TRANGE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TRANGE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TRANGE_Lookback( void ); - - -/* - * TA_TRIMA - Triangular Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TRIMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TRIMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TRIMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TRIX( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TRIX( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TRIX_Lookback( int optInTimePeriod ); /* From 1 to 100000 */ - - -/* - * TA_TSF - Time Series Forecast - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_TSF( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TSF( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TSF_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_TYPPRICE - Typical Price - * - * Input = High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_TYPPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_TYPPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_TYPPRICE_Lookback( void ); - - -/* - * TA_ULTOSC - Ultimate Oscillator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod1:(From 1 to 100000) - * Number of bars for 1st period. - * - * optInTimePeriod2:(From 1 to 100000) - * Number of bars fro 2nd period - * - * optInTimePeriod3:(From 1 to 100000) - * Number of bars for 3rd period - * - * - */ -TA_LIB_API TA_RetCode TA_ULTOSC( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod1, /* From 1 to 100000 */ - int optInTimePeriod2, /* From 1 to 100000 */ - int optInTimePeriod3, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_ULTOSC( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod1, /* From 1 to 100000 */ - int optInTimePeriod2, /* From 1 to 100000 */ - int optInTimePeriod3, /* From 1 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_ULTOSC_Lookback( int optInTimePeriod1, /* From 1 to 100000 */ - int optInTimePeriod2, /* From 1 to 100000 */ - int optInTimePeriod3 ); /* From 1 to 100000 */ - - -/* - * TA_VAR - Variance - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) - * Nb of deviations - * - * - */ -TA_LIB_API TA_RetCode TA_VAR( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_VAR( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 1 to 100000 */ - double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_VAR_Lookback( int optInTimePeriod, /* From 1 to 100000 */ - double optInNbDev ); /* From TA_REAL_MIN to TA_REAL_MAX */ - - -/* - * TA_WCLPRICE - Weighted Close Price - * - * Input = High, Low, Close - * Output = double - * - */ -TA_LIB_API TA_RetCode TA_WCLPRICE( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_WCLPRICE( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_WCLPRICE_Lookback( void ); - - -/* - * TA_WILLR - Williams' %R - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_WILLR( int startIdx, - int endIdx, - const double inHigh[], - const double inLow[], - const double inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_WILLR( int startIdx, - int endIdx, - const float inHigh[], - const float inLow[], - const float inClose[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_WILLR_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* - * TA_WMA - Weighted Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -TA_LIB_API TA_RetCode TA_WMA( int startIdx, - int endIdx, - const double inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API TA_RetCode TA_S_WMA( int startIdx, - int endIdx, - const float inReal[], - int optInTimePeriod, /* From 2 to 100000 */ - int *outBegIdx, - int *outNBElement, - double outReal[] ); - -TA_LIB_API int TA_WMA_Lookback( int optInTimePeriod ); /* From 2 to 100000 */ - - -/* Some TA functions takes a certain amount of input data - * before stabilizing and outputing meaningful data. This is - * a behavior pertaining to the algo of some TA functions and - * is not particular to the TA-Lib implementation. - * TA-Lib allows you to automatically strip off these unstabl - * data from your output and from any internal processing. - * (See documentation for more info) - * - * Examples: - * TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 30 ); - * Always strip off 30 price bar for the TA_EMA function. - * - * TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 30 ); - * Always strip off 30 price bar from ALL functions - * having an unstable period. - * - * See ta_defs.h for the enumeration TA_FuncUnstId - */ - -TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id, - unsigned int unstablePeriod ); - -unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id ); - -/* You can change slightly the behavior of the TA functions - * by requesting compatibiliy with some existing software. - * - * By default, the behavior is as close as the original - * author of the TA functions intend it to be. - * - * See ta_defs.h for the enumeration TA_Compatibility. - */ -TA_RetCode TA_SetCompatibility( TA_Compatibility value ); -TA_Compatibility TA_GetCompatibility( void ); - -/* Candlesticks struct and functions - * Because candlestick patterns are subjective, it is necessary - * to allow the user to specify what should be the meaning of - * 'long body', 'short shadows', etc. - */ - -/* Call TA_SetCandleSettings to set that when comparing a candle - * basing on settingType it must be compared with the average - * of the last avgPeriod candles' rangeType multiplied by factor. - * This setting is valid until TA_RestoreCandleDefaultSettings is called - */ -TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, - TA_RangeType rangeType, - int avgPeriod, - double factor ); - -/* Call TA_RestoreCandleDefaultSettings after using custom settings - * to restore the default settings for the specified settingType - */ -TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType ); - -#ifdef __cplusplus -} -#endif - -#endif - -/***************/ -/* End of File */ -/***************/ - diff --git a/src/ta-lib/local/include/ta-lib/ta_libc.h b/src/ta-lib/local/include/ta-lib/ta_libc.h deleted file mode 100644 index 6c1c0bef2..000000000 --- a/src/ta-lib/local/include/ta-lib/ta_libc.h +++ /dev/null @@ -1,51 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef TA_LIBC_H -#define TA_LIBC_H - -/* Includes all headers needed for using the ta-lib 'C' library. */ - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -#ifndef TA_FUNC_H - #include "ta_func.h" -#endif - -#ifndef TA_ABSTRACT_H - #include "ta_abstract.h" -#endif - -#endif - diff --git a/src/ta-lib/src/Makefile.am b/src/ta-lib/src/Makefile.am deleted file mode 100644 index 0ef437226..000000000 --- a/src/ta-lib/src/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 -SUBDIRS = ta_abstract ta_common ta_func - -lib_LTLIBRARIES = libta-lib.la - -libta_lib_la_SOURCES = - -libta_lib_la_LIBADD = \ - ta_abstract/libta_abstract.la \ - ta_func/libta_func.la \ - ta_common/libta_common.la - diff --git a/src/ta-lib/src/ta_abstract/Makefile.am b/src/ta-lib/src/ta_abstract/Makefile.am deleted file mode 100644 index 53d57eb28..000000000 --- a/src/ta-lib/src/ta_abstract/Makefile.am +++ /dev/null @@ -1,48 +0,0 @@ - -noinst_LTLIBRARIES = libta_abstract.la libta_abstract_gc.la - -libta_abstract_la_SOURCES = ta_group_idx.c \ - ta_def_ui.c \ - ta_abstract.c \ - ta_func_api.c \ - frames/ta_frame.c \ - tables/table_a.c \ - tables/table_b.c \ - tables/table_c.c \ - tables/table_d.c \ - tables/table_e.c \ - tables/table_f.c \ - tables/table_g.c \ - tables/table_h.c \ - tables/table_i.c \ - tables/table_j.c \ - tables/table_k.c \ - tables/table_l.c \ - tables/table_m.c \ - tables/table_n.c \ - tables/table_o.c \ - tables/table_p.c \ - tables/table_q.c \ - tables/table_r.c \ - tables/table_s.c \ - tables/table_t.c \ - tables/table_u.c \ - tables/table_v.c \ - tables/table_w.c \ - tables/table_x.c \ - tables/table_y.c \ - tables/table_z.c - -libta_abstract_gc_la_SOURCES = $(libta_abstract_la_SOURCES) - -libta_abstract_gc_la_LDFLAGS = $(libta_abstract_la_LDFLAGS) - -libta_abstract_la_CPPFLAGS = -I../ta_common/ -Iframes/ - -# The 'gc' version is a minimal version used to just to compile gen_code -libta_abstract_gc_la_CPPFLAGS = -DTA_GEN_CODE $(libta_abstract_la_CPPFLAGS) - -libta_abstractdir=$(includedir)/ta-lib/ -libta_abstract_HEADERS = ../../include/ta_defs.h \ - ../../include/ta_libc.h \ - ../../include/ta_abstract.h diff --git a/src/ta-lib/src/ta_abstract/frames/ta_frame.c b/src/ta-lib/src/ta_abstract/frames/ta_frame.c deleted file mode 100644 index 9b38b5382..000000000 --- a/src/ta-lib/src/ta_abstract/frames/ta_frame.c +++ /dev/null @@ -1,3469 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Note: This file is generated by gencode, do not - * modify directly. - */ - -/* The function define in this file allows to have a consistent - * framework for calling all the TA function through - * the TA_CallFunc mechanism. - * - * See "ta_abstract.h" - */ - -#ifndef TA_FUNC_H - #include "ta_func.h" -#endif - -#ifndef TA_FRAME_PRIV_H - #include "ta_frame_priv.h" -#endif - -#ifndef TA_FRAME_H - #include "ta_frame.h" -#endif - -/* NEVER CALL directly these functions! Use TA_CallFunc. */ - -/* Generated */ TA_RetCode TA_ACCBANDS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ACCBANDS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outRealUpperBand */ -/* Generated */ params->out[1].data.outReal, /* outRealMiddleBand */ -/* Generated */ params->out[2].data.outReal /* outRealLowerBand */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ACCBANDS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ACCBANDS_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ACOS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ACOS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ACOS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_ACOS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_AD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_AD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->in[0].data.inPrice.volume, /* inVolume */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_AD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_AD_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ADD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ADD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal0 */ -/* Generated */ params->in[1].data.inReal, /* inReal1 */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ADD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_ADD_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ADOSC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ADOSC( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->in[0].data.inPrice.volume, /* inVolume */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ADOSC_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ADOSC_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger /* optInSlowPeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ADX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ADX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ADX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ADX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ADXR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ADXR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ADXR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ADXR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_APO_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_APO( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInMAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_APO_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_APO_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInMAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_AROON_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_AROON( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outAroonDown */ -/* Generated */ params->out[1].data.outReal /* outAroonUp */ ); -/* Generated */ } -/* Generated */ unsigned int TA_AROON_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_AROON_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_AROONOSC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_AROONOSC( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_AROONOSC_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_AROONOSC_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ASIN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ASIN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ASIN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_ASIN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ATAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ATAN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ATAN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_ATAN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ATR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ATR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ATR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ATR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_AVGPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_AVGPRICE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_AVGPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_AVGPRICE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_AVGDEV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_AVGDEV( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_AVGDEV_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_AVGDEV_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_BBANDS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_BBANDS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInNbDevUp*/ -/* Generated */ params->optIn[2].data.optInReal, /* optInNbDevDn*/ -/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInMAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outRealUpperBand */ -/* Generated */ params->out[1].data.outReal, /* outRealMiddleBand */ -/* Generated */ params->out[2].data.outReal /* outRealLowerBand */ ); -/* Generated */ } -/* Generated */ unsigned int TA_BBANDS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_BBANDS_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInNbDevUp*/ -/* Generated */ params->optIn[2].data.optInReal, /* optInNbDevDn*/ -/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger /* optInMAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_BETA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_BETA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal0 */ -/* Generated */ params->in[1].data.inReal, /* inReal1 */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_BETA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_BETA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_BOP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_BOP( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_BOP_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_BOP_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CCI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CCI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CCI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CCI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL2CROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL2CROWS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL2CROWS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL3BLACKCROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL3BLACKCROWS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL3BLACKCROWS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL3BLACKCROWS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL3INSIDE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL3INSIDE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL3INSIDE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL3INSIDE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL3LINESTRIKE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL3LINESTRIKE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL3LINESTRIKE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL3LINESTRIKE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL3OUTSIDE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL3OUTSIDE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL3OUTSIDE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL3OUTSIDE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL3STARSINSOUTH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL3STARSINSOUTH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL3STARSINSOUTH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL3STARSINSOUTH_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDL3WHITESOLDIERS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDL3WHITESOLDIERS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDL3WHITESOLDIERS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDL3WHITESOLDIERS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLABANDONEDBABY_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLABANDONEDBABY( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLABANDONEDBABY_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLABANDONEDBABY_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLADVANCEBLOCK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLADVANCEBLOCK( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLADVANCEBLOCK_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLADVANCEBLOCK_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLBELTHOLD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLBELTHOLD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLBELTHOLD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLBELTHOLD_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLBREAKAWAY_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLBREAKAWAY( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLBREAKAWAY_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLBREAKAWAY_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLCLOSINGMARUBOZU_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLCLOSINGMARUBOZU( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLCLOSINGMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLCLOSINGMARUBOZU_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLCONCEALBABYSWALL_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLCONCEALBABYSWALL( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLCONCEALBABYSWALL_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLCONCEALBABYSWALL_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLCOUNTERATTACK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLCOUNTERATTACK( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLCOUNTERATTACK_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLCOUNTERATTACK_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLDARKCLOUDCOVER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLDARKCLOUDCOVER( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLDARKCLOUDCOVER_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLDARKCLOUDCOVER_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLDOJI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLDOJI_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLDOJISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLDOJISTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLDOJISTAR_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLDRAGONFLYDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLDRAGONFLYDOJI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLDRAGONFLYDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLDRAGONFLYDOJI_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLENGULFING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLENGULFING( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLENGULFING_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLENGULFING_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLEVENINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLEVENINGDOJISTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLEVENINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLEVENINGDOJISTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLEVENINGSTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLEVENINGSTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLEVENINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLEVENINGSTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLGAPSIDESIDEWHITE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLGAPSIDESIDEWHITE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLGAPSIDESIDEWHITE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLGAPSIDESIDEWHITE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLGRAVESTONEDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLGRAVESTONEDOJI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLGRAVESTONEDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLGRAVESTONEDOJI_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHAMMER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHAMMER( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHAMMER_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHANGINGMAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHANGINGMAN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHANGINGMAN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHANGINGMAN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHARAMI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHARAMI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHARAMI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHARAMI_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHARAMICROSS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHARAMICROSS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHARAMICROSS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHARAMICROSS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHIGHWAVE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHIGHWAVE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHIGHWAVE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHIGHWAVE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHIKKAKE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHIKKAKE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHIKKAKE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHIKKAKE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHIKKAKEMOD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHIKKAKEMOD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHIKKAKEMOD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHIKKAKEMOD_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLHOMINGPIGEON_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLHOMINGPIGEON( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLHOMINGPIGEON_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLHOMINGPIGEON_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLIDENTICAL3CROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLIDENTICAL3CROWS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLIDENTICAL3CROWS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLIDENTICAL3CROWS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLINNECK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLINNECK( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLINNECK_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLINNECK_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLINVERTEDHAMMER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLINVERTEDHAMMER( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLINVERTEDHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLINVERTEDHAMMER_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLKICKING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLKICKING( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLKICKING_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLKICKING_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLKICKINGBYLENGTH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLKICKINGBYLENGTH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLKICKINGBYLENGTH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLKICKINGBYLENGTH_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLLADDERBOTTOM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLLADDERBOTTOM( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLLADDERBOTTOM_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLLADDERBOTTOM_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLLONGLEGGEDDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLLONGLEGGEDDOJI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLLONGLEGGEDDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLLONGLEGGEDDOJI_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLLONGLINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLLONGLINE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLLONGLINE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLLONGLINE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLMARUBOZU_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLMARUBOZU( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLMARUBOZU_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLMATCHINGLOW_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLMATCHINGLOW( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLMATCHINGLOW_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLMATCHINGLOW_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLMATHOLD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLMATHOLD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLMATHOLD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLMATHOLD_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLMORNINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLMORNINGDOJISTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLMORNINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLMORNINGDOJISTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLMORNINGSTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLMORNINGSTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInReal, /* optInPenetration*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLMORNINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CDLMORNINGSTAR_Lookback(params->optIn[0].data.optInReal /* optInPenetration*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLONNECK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLONNECK( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLONNECK_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLONNECK_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLPIERCING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLPIERCING( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLPIERCING_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLPIERCING_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLRICKSHAWMAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLRICKSHAWMAN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLRICKSHAWMAN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLRICKSHAWMAN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLRISEFALL3METHODS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLRISEFALL3METHODS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLRISEFALL3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLRISEFALL3METHODS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLSEPARATINGLINES_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLSEPARATINGLINES( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLSEPARATINGLINES_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLSEPARATINGLINES_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLSHOOTINGSTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLSHOOTINGSTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLSHOOTINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLSHOOTINGSTAR_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLSHORTLINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLSHORTLINE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLSHORTLINE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLSHORTLINE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLSPINNINGTOP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLSPINNINGTOP( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLSPINNINGTOP_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLSPINNINGTOP_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLSTALLEDPATTERN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLSTALLEDPATTERN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLSTALLEDPATTERN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLSTALLEDPATTERN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLSTICKSANDWICH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLSTICKSANDWICH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLSTICKSANDWICH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLSTICKSANDWICH_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLTAKURI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLTAKURI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLTAKURI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLTAKURI_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLTASUKIGAP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLTASUKIGAP( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLTASUKIGAP_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLTASUKIGAP_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLTHRUSTING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLTHRUSTING( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLTHRUSTING_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLTHRUSTING_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLTRISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLTRISTAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLTRISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLTRISTAR_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLUNIQUE3RIVER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLUNIQUE3RIVER( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLUNIQUE3RIVER_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLUNIQUE3RIVER_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLUPSIDEGAP2CROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLUPSIDEGAP2CROWS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLUPSIDEGAP2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLUPSIDEGAP2CROWS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CDLXSIDEGAP3METHODS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CDLXSIDEGAP3METHODS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CDLXSIDEGAP3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CDLXSIDEGAP3METHODS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CEIL_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CEIL( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CEIL_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_CEIL_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CMO_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CMO( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CMO_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CMO_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_CORREL_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_CORREL( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal0 */ -/* Generated */ params->in[1].data.inReal, /* inReal1 */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_CORREL_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_CORREL_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_COS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_COS( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_COS_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_COS_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_COSH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_COSH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_COSH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_COSH_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_DEMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_DEMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_DEMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_DEMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_DIV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_DIV( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal0 */ -/* Generated */ params->in[1].data.inReal, /* inReal1 */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_DIV_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_DIV_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_DX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_DX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_DX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_DX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_EMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_EMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_EMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_EMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_EXP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_EXP( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_EXP_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_EXP_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_FLOOR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_FLOOR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_FLOOR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_FLOOR_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_HT_DCPERIOD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_HT_DCPERIOD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_HT_DCPERIOD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_HT_DCPERIOD_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_HT_DCPHASE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_HT_DCPHASE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_HT_DCPHASE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_HT_DCPHASE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_HT_PHASOR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_HT_PHASOR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outInPhase */ -/* Generated */ params->out[1].data.outReal /* outQuadrature */ ); -/* Generated */ } -/* Generated */ unsigned int TA_HT_PHASOR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_HT_PHASOR_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_HT_SINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_HT_SINE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outSine */ -/* Generated */ params->out[1].data.outReal /* outLeadSine */ ); -/* Generated */ } -/* Generated */ unsigned int TA_HT_SINE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_HT_SINE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_HT_TRENDLINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_HT_TRENDLINE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_HT_TRENDLINE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_HT_TRENDLINE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_HT_TRENDMODE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_HT_TRENDMODE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_HT_TRENDMODE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_HT_TRENDMODE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_IMI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_IMI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.open, /* inOpen */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_IMI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_IMI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_KAMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_KAMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_KAMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_KAMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_LINEARREG_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_LINEARREG( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_LINEARREG_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_LINEARREG_ANGLE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_ANGLE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_LINEARREG_ANGLE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_ANGLE_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_LINEARREG_INTERCEPT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_INTERCEPT( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_LINEARREG_INTERCEPT_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_INTERCEPT_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_LINEARREG_SLOPE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_SLOPE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_LINEARREG_SLOPE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_LINEARREG_SLOPE_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_LN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_LN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_LN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_LN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_LOG10_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_LOG10( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_LOG10_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_LOG10_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger, /* optInMAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MA_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger /* optInMAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MACD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MACD( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ params->optIn[2].data.optInInteger, /* optInSignalPeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outMACD */ -/* Generated */ params->out[1].data.outReal, /* outMACDSignal */ -/* Generated */ params->out[2].data.outReal /* outMACDHist */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MACD_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MACD_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ params->optIn[2].data.optInInteger /* optInSignalPeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MACDEXT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MACDEXT( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger, /* optInFastMAType*/ -/* Generated */ params->optIn[2].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInSlowMAType*/ -/* Generated */ params->optIn[4].data.optInInteger, /* optInSignalPeriod*/ -/* Generated */ (TA_MAType)params->optIn[5].data.optInInteger, /* optInSignalMAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outMACD */ -/* Generated */ params->out[1].data.outReal, /* outMACDSignal */ -/* Generated */ params->out[2].data.outReal /* outMACDHist */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MACDEXT_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MACDEXT_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ (TA_MAType)params->optIn[1].data.optInInteger, /* optInFastMAType*/ -/* Generated */ params->optIn[2].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInSlowMAType*/ -/* Generated */ params->optIn[4].data.optInInteger, /* optInSignalPeriod*/ -/* Generated */ (TA_MAType)params->optIn[5].data.optInInteger /* optInSignalMAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MACDFIX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MACDFIX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInSignalPeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outMACD */ -/* Generated */ params->out[1].data.outReal, /* outMACDSignal */ -/* Generated */ params->out[2].data.outReal /* outMACDHist */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MACDFIX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MACDFIX_Lookback(params->optIn[0].data.optInInteger /* optInSignalPeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MAMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MAMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInReal, /* optInFastLimit*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInSlowLimit*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outMAMA */ -/* Generated */ params->out[1].data.outReal /* outFAMA */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MAMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MAMA_Lookback(params->optIn[0].data.optInReal, /* optInFastLimit*/ -/* Generated */ params->optIn[1].data.optInReal /* optInSlowLimit*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MAVP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MAVP( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->in[1].data.inReal, /* inPeriods */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInMinPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInMaxPeriod*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInMAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MAVP_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MAVP_Lookback(params->optIn[0].data.optInInteger, /* optInMinPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInMaxPeriod*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInMAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MAX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MAX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MAX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MAX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MAXINDEX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MAXINDEX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MAXINDEX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MEDPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MEDPRICE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MEDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_MEDPRICE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MFI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MFI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->in[0].data.inPrice.volume, /* inVolume */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MFI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MFI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MIDPOINT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MIDPOINT( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MIDPOINT_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MIDPOINT_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MIDPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MIDPRICE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MIDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MIDPRICE_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MIN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MIN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MIN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MIN_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MININDEX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MININDEX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger /* outInteger */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MININDEX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MININDEX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MINMAX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MINMAX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outMin */ -/* Generated */ params->out[1].data.outReal /* outMax */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MINMAX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MINMAX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MINMAXINDEX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MINMAXINDEX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outInteger, /* outMinIdx */ -/* Generated */ params->out[1].data.outInteger /* outMaxIdx */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MINMAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MINMAXINDEX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MINUS_DI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MINUS_DI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MINUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MINUS_DI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MINUS_DM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MINUS_DM( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MINUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MINUS_DM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MOM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MOM( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MOM_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_MOM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_MULT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_MULT( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal0 */ -/* Generated */ params->in[1].data.inReal, /* inReal1 */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_MULT_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_MULT_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_NATR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_NATR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_NATR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_NATR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_OBV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_OBV( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->in[1].data.inPrice.volume, /* inVolume */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_OBV_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_OBV_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_PLUS_DI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_PLUS_DI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_PLUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_PLUS_DI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_PLUS_DM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_PLUS_DM( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_PLUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_PLUS_DM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_PPO_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_PPO( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInMAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_PPO_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_PPO_Lookback(params->optIn[0].data.optInInteger, /* optInFastPeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowPeriod*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInMAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ROC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ROC( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ROC_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ROC_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ROCP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ROCP( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ROCP_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ROCP_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ROCR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ROCR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ROCR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ROCR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ROCR100_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ROCR100( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ROCR100_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ROCR100_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_RSI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_RSI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_RSI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_RSI_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInReal, /* optInAcceleration*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInMaximum*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_SAR_Lookback(params->optIn[0].data.optInReal, /* optInAcceleration*/ -/* Generated */ params->optIn[1].data.optInReal /* optInMaximum*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SAREXT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SAREXT( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->optIn[0].data.optInReal, /* optInStartValue*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInOffsetOnReverse*/ -/* Generated */ params->optIn[2].data.optInReal, /* optInAccelerationInitLong*/ -/* Generated */ params->optIn[3].data.optInReal, /* optInAccelerationLong*/ -/* Generated */ params->optIn[4].data.optInReal, /* optInAccelerationMaxLong*/ -/* Generated */ params->optIn[5].data.optInReal, /* optInAccelerationInitShort*/ -/* Generated */ params->optIn[6].data.optInReal, /* optInAccelerationShort*/ -/* Generated */ params->optIn[7].data.optInReal, /* optInAccelerationMaxShort*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SAREXT_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_SAREXT_Lookback(params->optIn[0].data.optInReal, /* optInStartValue*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInOffsetOnReverse*/ -/* Generated */ params->optIn[2].data.optInReal, /* optInAccelerationInitLong*/ -/* Generated */ params->optIn[3].data.optInReal, /* optInAccelerationLong*/ -/* Generated */ params->optIn[4].data.optInReal, /* optInAccelerationMaxLong*/ -/* Generated */ params->optIn[5].data.optInReal, /* optInAccelerationInitShort*/ -/* Generated */ params->optIn[6].data.optInReal, /* optInAccelerationShort*/ -/* Generated */ params->optIn[7].data.optInReal /* optInAccelerationMaxShort*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SIN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SIN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SIN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_SIN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SINH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SINH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SINH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_SINH_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_SMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SQRT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SQRT( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SQRT_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_SQRT_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_STDDEV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_STDDEV( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInNbDev*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_STDDEV_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_STDDEV_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal /* optInNbDev*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_STOCH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_STOCH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastK_Period*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowK_Period*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInSlowK_MAType*/ -/* Generated */ params->optIn[3].data.optInInteger, /* optInSlowD_Period*/ -/* Generated */ (TA_MAType)params->optIn[4].data.optInInteger, /* optInSlowD_MAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outSlowK */ -/* Generated */ params->out[1].data.outReal /* outSlowD */ ); -/* Generated */ } -/* Generated */ unsigned int TA_STOCH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_STOCH_Lookback(params->optIn[0].data.optInInteger, /* optInFastK_Period*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInSlowK_Period*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInSlowK_MAType*/ -/* Generated */ params->optIn[3].data.optInInteger, /* optInSlowD_Period*/ -/* Generated */ (TA_MAType)params->optIn[4].data.optInInteger /* optInSlowD_MAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_STOCHF_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_STOCHF( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInFastK_Period*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInFastD_Period*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger, /* optInFastD_MAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outFastK */ -/* Generated */ params->out[1].data.outReal /* outFastD */ ); -/* Generated */ } -/* Generated */ unsigned int TA_STOCHF_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_STOCHF_Lookback(params->optIn[0].data.optInInteger, /* optInFastK_Period*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInFastD_Period*/ -/* Generated */ (TA_MAType)params->optIn[2].data.optInInteger /* optInFastD_MAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_STOCHRSI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_STOCHRSI( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInFastK_Period*/ -/* Generated */ params->optIn[2].data.optInInteger, /* optInFastD_Period*/ -/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger, /* optInFastD_MAType*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal, /* outFastK */ -/* Generated */ params->out[1].data.outReal /* outFastD */ ); -/* Generated */ } -/* Generated */ unsigned int TA_STOCHRSI_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_STOCHRSI_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInFastK_Period*/ -/* Generated */ params->optIn[2].data.optInInteger, /* optInFastD_Period*/ -/* Generated */ (TA_MAType)params->optIn[3].data.optInInteger /* optInFastD_MAType*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SUB_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SUB( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal0 */ -/* Generated */ params->in[1].data.inReal, /* inReal1 */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SUB_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_SUB_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_SUM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_SUM( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_SUM_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_SUM_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_T3_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_T3( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInVFactor*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_T3_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_T3_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal /* optInVFactor*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TAN( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TAN_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_TAN_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TANH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TANH( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TANH_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_TANH_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TEMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TEMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TEMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_TEMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TRANGE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TRANGE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TRANGE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_TRANGE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TRIMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TRIMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TRIMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_TRIMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TRIX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TRIX( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TRIX_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_TRIX_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TSF_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TSF( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TSF_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_TSF_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_TYPPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_TYPPRICE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_TYPPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_TYPPRICE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_ULTOSC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_ULTOSC( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod1*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInTimePeriod2*/ -/* Generated */ params->optIn[2].data.optInInteger, /* optInTimePeriod3*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_ULTOSC_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_ULTOSC_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod1*/ -/* Generated */ params->optIn[1].data.optInInteger, /* optInTimePeriod2*/ -/* Generated */ params->optIn[2].data.optInInteger /* optInTimePeriod3*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_VAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_VAR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal, /* optInNbDev*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_VAR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_VAR_Lookback(params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ params->optIn[1].data.optInReal /* optInNbDev*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_WCLPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_WCLPRICE( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_WCLPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ (void)params; -/* Generated */ return TA_WCLPRICE_Lookback( ); -/* Generated */ } -/* Generated */ TA_RetCode TA_WILLR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_WILLR( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inPrice.high, /* inHigh */ -/* Generated */ params->in[0].data.inPrice.low, /* inLow */ -/* Generated */ params->in[0].data.inPrice.close, /* inClose */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_WILLR_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_WILLR_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } -/* Generated */ TA_RetCode TA_WMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -/* Generated */ { -/* Generated */ return TA_WMA( -/* Generated */ startIdx, -/* Generated */ endIdx, -/* Generated */ params->in[0].data.inReal, /* inReal */ -/* Generated */ params->optIn[0].data.optInInteger, /* optInTimePeriod*/ -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ params->out[0].data.outReal /* outReal */ ); -/* Generated */ } -/* Generated */ unsigned int TA_WMA_FramePPLB( const TA_ParamHolderPriv *params ) -/* Generated */ { -/* Generated */ return TA_WMA_Lookback(params->optIn[0].data.optInInteger /* optInTimePeriod*/ ); -/* Generated */ } - -/***************/ -/* End of File */ -/***************/ diff --git a/src/ta-lib/src/ta_abstract/frames/ta_frame.h b/src/ta-lib/src/ta_abstract/frames/ta_frame.h deleted file mode 100644 index 33b2a5899..000000000 --- a/src/ta-lib/src/ta_abstract/frames/ta_frame.h +++ /dev/null @@ -1,1508 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2007, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef TA_FRAME_H -#define TA_FRAME_H - -/* Note: This file is generated by gencode, do not - * modify directly. - */ - -/* The function define in this file allows to call a TA - * function through the TA_CallFunc mechanism. - */ - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -#ifndef TA_FRAME_PRIV_H - #include "ta_frame_priv.h" -#endif - - -/* Generated */ TA_RetCode TA_ACCBANDS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ACCBANDS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ACOS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ACOS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_AD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_AD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ADD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ADD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ADOSC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ADOSC_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ADX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ADX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ADXR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ADXR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_APO_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_APO_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_AROON_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_AROON_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_AROONOSC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_AROONOSC_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ASIN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ASIN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ATAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ATAN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ATR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ATR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_AVGPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_AVGPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_AVGDEV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_AVGDEV_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_BBANDS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_BBANDS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_BETA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_BETA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_BOP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_BOP_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CCI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CCI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL2CROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL3BLACKCROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL3BLACKCROWS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL3INSIDE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL3INSIDE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL3LINESTRIKE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL3LINESTRIKE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL3OUTSIDE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL3OUTSIDE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL3STARSINSOUTH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL3STARSINSOUTH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDL3WHITESOLDIERS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDL3WHITESOLDIERS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLABANDONEDBABY_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLABANDONEDBABY_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLADVANCEBLOCK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLADVANCEBLOCK_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLBELTHOLD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLBELTHOLD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLBREAKAWAY_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLBREAKAWAY_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLCLOSINGMARUBOZU_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLCLOSINGMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLCONCEALBABYSWALL_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLCONCEALBABYSWALL_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLCOUNTERATTACK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLCOUNTERATTACK_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLDARKCLOUDCOVER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLDARKCLOUDCOVER_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLDOJISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLDRAGONFLYDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLDRAGONFLYDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLENGULFING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLENGULFING_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLEVENINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLEVENINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLEVENINGSTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLEVENINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLGAPSIDESIDEWHITE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLGAPSIDESIDEWHITE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLGRAVESTONEDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLGRAVESTONEDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHAMMER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHANGINGMAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHANGINGMAN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHARAMI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHARAMI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHARAMICROSS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHARAMICROSS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHIGHWAVE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHIGHWAVE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHIKKAKE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHIKKAKE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHIKKAKEMOD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHIKKAKEMOD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLHOMINGPIGEON_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLHOMINGPIGEON_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLIDENTICAL3CROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLIDENTICAL3CROWS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLINNECK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLINNECK_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLINVERTEDHAMMER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLINVERTEDHAMMER_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLKICKING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLKICKING_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLKICKINGBYLENGTH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLKICKINGBYLENGTH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLLADDERBOTTOM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLLADDERBOTTOM_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLLONGLEGGEDDOJI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLLONGLEGGEDDOJI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLLONGLINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLLONGLINE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLMARUBOZU_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLMARUBOZU_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLMATCHINGLOW_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLMATCHINGLOW_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLMATHOLD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLMATHOLD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLMORNINGDOJISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLMORNINGDOJISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLMORNINGSTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLMORNINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLONNECK_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLONNECK_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLPIERCING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLPIERCING_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLRICKSHAWMAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLRICKSHAWMAN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLRISEFALL3METHODS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLRISEFALL3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLSEPARATINGLINES_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLSEPARATINGLINES_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLSHOOTINGSTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLSHOOTINGSTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLSHORTLINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLSHORTLINE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLSPINNINGTOP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLSPINNINGTOP_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLSTALLEDPATTERN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLSTALLEDPATTERN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLSTICKSANDWICH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLSTICKSANDWICH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLTAKURI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLTAKURI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLTASUKIGAP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLTASUKIGAP_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLTHRUSTING_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLTHRUSTING_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLTRISTAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLTRISTAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLUNIQUE3RIVER_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLUNIQUE3RIVER_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLUPSIDEGAP2CROWS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLUPSIDEGAP2CROWS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CDLXSIDEGAP3METHODS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CDLXSIDEGAP3METHODS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CEIL_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CEIL_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CMO_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CMO_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_CORREL_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_CORREL_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_COS_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_COS_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_COSH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_COSH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_DEMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_DEMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_DIV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_DIV_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_DX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_DX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_EMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_EMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_EXP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_EXP_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_FLOOR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_FLOOR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_HT_DCPERIOD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_HT_DCPERIOD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_HT_DCPHASE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_HT_DCPHASE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_HT_PHASOR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_HT_PHASOR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_HT_SINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_HT_SINE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_HT_TRENDLINE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_HT_TRENDLINE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_HT_TRENDMODE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_HT_TRENDMODE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_IMI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_IMI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_KAMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_KAMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_LINEARREG_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_LINEARREG_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_LINEARREG_ANGLE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_LINEARREG_ANGLE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_LINEARREG_INTERCEPT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_LINEARREG_INTERCEPT_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_LINEARREG_SLOPE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_LINEARREG_SLOPE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_LN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_LN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_LOG10_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_LOG10_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MACD_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MACD_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MACDEXT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MACDEXT_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MACDFIX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MACDFIX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MAMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MAMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MAVP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MAVP_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MAX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MAX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MAXINDEX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MEDPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MEDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MFI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MFI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MIDPOINT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MIDPOINT_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MIDPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MIDPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MIN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MIN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MININDEX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MININDEX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MINMAX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MINMAX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MINMAXINDEX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MINMAXINDEX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MINUS_DI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MINUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MINUS_DM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MINUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MOM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MOM_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_MULT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_MULT_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_NATR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_NATR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_OBV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_OBV_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_PLUS_DI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_PLUS_DI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_PLUS_DM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_PLUS_DM_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_PPO_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_PPO_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ROC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ROC_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ROCP_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ROCP_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ROCR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ROCR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ROCR100_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ROCR100_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_RSI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_RSI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SAREXT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SAREXT_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SIN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SIN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SINH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SINH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SQRT_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SQRT_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_STDDEV_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_STDDEV_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_STOCH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_STOCH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_STOCHF_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_STOCHF_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_STOCHRSI_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_STOCHRSI_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SUB_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SUB_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_SUM_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_SUM_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_T3_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_T3_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TAN_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TAN_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TANH_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TANH_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TEMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TEMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TRANGE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TRANGE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TRIMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TRIMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TRIX_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TRIX_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TSF_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TSF_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_TYPPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_TYPPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_ULTOSC_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_ULTOSC_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_VAR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_VAR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_WCLPRICE_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_WCLPRICE_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_WILLR_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_WILLR_FramePPLB( const TA_ParamHolderPriv *params ) -; - -/* Generated */ TA_RetCode TA_WMA_FramePP( const TA_ParamHolderPriv *params, -/* Generated */ int startIdx, -/* Generated */ int endIdx, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement ) -; -/* Generated */ unsigned int TA_WMA_FramePPLB( const TA_ParamHolderPriv *params ) -; - - -#endif - -/***************/ -/* End of File */ -/***************/ diff --git a/src/ta-lib/src/ta_abstract/ta_abstract.c b/src/ta-lib/src/ta_abstract/ta_abstract.c deleted file mode 100644 index 100b18ae7..000000000 --- a/src/ta-lib/src/ta_abstract/ta_abstract.c +++ /dev/null @@ -1,1313 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 020101 MF First version. - * 110302 MF Re-design the interface related to TA_CallFunc for being - * faster and use less memory allocation. - * 022904 MF Add TA_GetLookback - * 031404 MF Some function renaming for consistency and better - * Perl integration. - * 110206 AC Change volume and open interest to double - */ - -/* Description: - * Provide a way to abstract the call of the TA functions. - */ - -/**** Headers ****/ -#include -#include -#include -#include "ta_common.h" -#include "ta_memory.h" -#include "ta_abstract.h" -#include "ta_def_ui.h" -#include "ta_frame_priv.h" - -#include - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ - -/* The interface definition of all functions are accessible - * through one of the following 26 tables. - */ -extern const TA_FuncDef *TA_DEF_TableA, *TA_DEF_TableB, *TA_DEF_TableC, - *TA_DEF_TableD, *TA_DEF_TableE, *TA_DEF_TableF, - *TA_DEF_TableG, *TA_DEF_TableH, *TA_DEF_TableI, - *TA_DEF_TableJ, *TA_DEF_TableK, *TA_DEF_TableL, - *TA_DEF_TableM, *TA_DEF_TableN, *TA_DEF_TableO, - *TA_DEF_TableP, *TA_DEF_TableQ, *TA_DEF_TableR, - *TA_DEF_TableS, *TA_DEF_TableT, *TA_DEF_TableU, - *TA_DEF_TableV, *TA_DEF_TableW, *TA_DEF_TableX, - *TA_DEF_TableY, *TA_DEF_TableZ; - -extern const unsigned int TA_DEF_TableASize, TA_DEF_TableBSize, - TA_DEF_TableCSize, TA_DEF_TableDSize, - TA_DEF_TableESize, TA_DEF_TableFSize, - TA_DEF_TableGSize, TA_DEF_TableHSize, - TA_DEF_TableISize, TA_DEF_TableJSize, - TA_DEF_TableKSize, TA_DEF_TableLSize, - TA_DEF_TableMSize, TA_DEF_TableNSize, - TA_DEF_TableOSize, TA_DEF_TablePSize, - TA_DEF_TableQSize, TA_DEF_TableRSize, - TA_DEF_TableSSize, TA_DEF_TableTSize, - TA_DEF_TableUSize, TA_DEF_TableVSize, - TA_DEF_TableWSize, TA_DEF_TableXSize, - TA_DEF_TableYSize, TA_DEF_TableZSize; - -#ifndef TA_GEN_CODE - /* In gen_code, these value does not exist (they are generated by - * gen_code itself!) - * Consequently, the code, when being used to make the gen_code - * executable, must provide the same functionality without using - * these shortcuts. - */ - extern const TA_FuncDef **TA_PerGroupFuncDef[]; - extern const unsigned int TA_PerGroupSize[]; -#endif - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -#ifndef min - #define min(a, b) (((a) < (b)) ? (a) : (b)) -#endif - -typedef struct -{ - unsigned int magicNumber; -} TA_StringTablePriv; - - -/**** Local functions declarations. ****/ - - -#ifdef TA_GEN_CODE - static TA_RetCode getGroupId( const char *groupString, unsigned int *groupId ); - static TA_RetCode getGroupSize( TA_GroupId groupId, unsigned int *groupSize ); - static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, - unsigned int idx, - const char **stringPtr ); -#else - static TA_RetCode getGroupId( const char *groupString, unsigned int *groupId ); - static TA_RetCode getGroupSize( TA_GroupId groupId, unsigned int *groupSize ); - static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, - unsigned int idx, - const char **stringPtr ); -#endif - -/**** Local variables definitions. ****/ - -static const TA_FuncDef **TA_DEF_Tables[26] = -{ - &TA_DEF_TableA, &TA_DEF_TableB, &TA_DEF_TableC, &TA_DEF_TableD, &TA_DEF_TableE, - &TA_DEF_TableF, &TA_DEF_TableG, &TA_DEF_TableH, &TA_DEF_TableI, &TA_DEF_TableJ, - &TA_DEF_TableK, &TA_DEF_TableL, &TA_DEF_TableM, &TA_DEF_TableN, &TA_DEF_TableO, - &TA_DEF_TableP, &TA_DEF_TableQ, &TA_DEF_TableR, &TA_DEF_TableS, &TA_DEF_TableT, - &TA_DEF_TableU, &TA_DEF_TableV, &TA_DEF_TableW, &TA_DEF_TableX, &TA_DEF_TableY, - &TA_DEF_TableZ -}; - -static const unsigned int *TA_DEF_TablesSize[26] = -{ - &TA_DEF_TableASize, &TA_DEF_TableBSize, &TA_DEF_TableCSize, - &TA_DEF_TableDSize, &TA_DEF_TableESize, &TA_DEF_TableFSize, - &TA_DEF_TableGSize, &TA_DEF_TableHSize, &TA_DEF_TableISize, - &TA_DEF_TableJSize, &TA_DEF_TableKSize, &TA_DEF_TableLSize, - &TA_DEF_TableMSize, &TA_DEF_TableNSize, &TA_DEF_TableOSize, - &TA_DEF_TablePSize, &TA_DEF_TableQSize, &TA_DEF_TableRSize, - &TA_DEF_TableSSize, &TA_DEF_TableTSize, &TA_DEF_TableUSize, - &TA_DEF_TableVSize, &TA_DEF_TableWSize, &TA_DEF_TableXSize, - &TA_DEF_TableYSize, &TA_DEF_TableZSize -}; - -/**** Global functions definitions. ****/ -TA_RetCode TA_GroupTableAlloc( TA_StringTable **table ) -{ - TA_StringTable *stringTable; - TA_StringTablePriv *stringTablePriv; - - if( table == NULL ) - { - return TA_BAD_PARAM; - } - - stringTable = (TA_StringTable *)TA_Malloc( sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); - if( !stringTable ) - { - *table = NULL; - return TA_ALLOC_ERR; - } - - memset( stringTable, 0, sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); - stringTablePriv = (TA_StringTablePriv *)(((char *)stringTable)+sizeof(TA_StringTable)); - stringTablePriv->magicNumber = TA_STRING_TABLE_GROUP_MAGIC_NB; - - stringTable->size = TA_NB_GROUP_ID; - stringTable->string = &TA_GroupString[0]; - stringTable->hiddenData = stringTablePriv; - - /* From this point, TA_FuncTableFree can be safely called. */ - - /* Success. Return the table to the caller. */ - *table = stringTable; - - return TA_SUCCESS; -} - -TA_RetCode TA_GroupTableFree( TA_StringTable *table ) -{ - TA_StringTablePriv *stringTablePriv; - - if( table ) - { - stringTablePriv = (TA_StringTablePriv *)table->hiddenData; - if( !stringTablePriv ) - { - return TA_INTERNAL_ERROR(1); - } - - if( stringTablePriv->magicNumber != TA_STRING_TABLE_GROUP_MAGIC_NB ) - { - return TA_BAD_OBJECT; - } - - TA_Free( table ); - } - - return TA_SUCCESS; -} - -/* Iterate in alphabetical order */ -TA_RetCode TA_ForEachFunc( TA_CallForEachFunc functionToCall, void *opaqueData ) -{ - const TA_FuncDef **funcDefTable; - const TA_FuncDef *funcDef; - const TA_FuncInfo *funcInfo; - unsigned int i, j, funcDefTableSize; - - if( functionToCall == NULL ) - { - return TA_BAD_PARAM; - } - - /* Iterate the tables (each table is for one letter) */ - for( i=0; i < 26; i++ ) - { - funcDefTable = TA_DEF_Tables[i]; - - /* Identify the table size. */ - funcDefTableSize = *TA_DEF_TablesSize[i]; - for( j=0; j < funcDefTableSize; j++ ) - { - funcDef = funcDefTable[j]; - if( !funcDef || !funcDef->funcInfo ) - return TA_INTERNAL_ERROR(3); - - funcInfo = funcDef->funcInfo; - if( !funcInfo ) - return TA_INTERNAL_ERROR(4); - (*functionToCall)( funcInfo, opaqueData ); - } - } - - return TA_SUCCESS; -} - -TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table ) -{ - TA_RetCode retCode; - unsigned int i; - TA_StringTable *stringTable; - unsigned int groupId; /* TA_GroupId */ - unsigned int groupSize; - const char *stringPtr; - TA_StringTablePriv *stringTablePriv; - - if( (group == NULL) || (table == NULL ) ) - { - return TA_BAD_PARAM; - } - - *table = NULL; - stringPtr = NULL; - - /* Get information on the group. */ - retCode = getGroupId( group, &groupId ); - if( retCode != TA_SUCCESS ) - { - return retCode; - } - - retCode = getGroupSize( (TA_GroupId)groupId, &groupSize ); - if( retCode != TA_SUCCESS ) - { - return retCode; - } - - /* Allocate the table. */ - - stringTable = (TA_StringTable *)TA_Malloc( sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); - if( !stringTable ) - { - *table = NULL; - return TA_ALLOC_ERR; - } - - memset( stringTable, 0, sizeof(TA_StringTable) + sizeof(TA_StringTablePriv) ); - stringTablePriv = (TA_StringTablePriv *)(((char *)stringTable)+sizeof(TA_StringTable)); - stringTablePriv->magicNumber = TA_STRING_TABLE_FUNC_MAGIC_NB; - stringTable->hiddenData = stringTablePriv; - - /* From this point, TA_FuncTableFree can be safely called. */ - stringTable->size = groupSize; - if( groupSize != 0 ) - { - stringTable->string = (const char **)TA_Malloc( (stringTable->size) * - sizeof(const char *) ); - - if( stringTable->string == NULL ) - { - *table = NULL; - TA_FuncTableFree( stringTable ); - return TA_ALLOC_ERR; - } - - memset( (void *)stringTable->string, 0, - (stringTable->size) * sizeof(const char *) ); - - for( i=0; i < stringTable->size; i++ ) - { - retCode = getFuncNameByIdx( (TA_GroupId)groupId, i, &stringPtr ); - - if( retCode != TA_SUCCESS ) - { - *table = NULL; - TA_FuncTableFree( stringTable ); - return TA_ALLOC_ERR; - } - - (stringTable->string)[i] = stringPtr; - } - } - - /* Return the table to the caller. */ - *table = stringTable; - - return TA_SUCCESS; -} - -TA_RetCode TA_FuncTableFree( TA_StringTable *table ) -{ - TA_StringTablePriv *stringTablePriv; - - if( table ) - { - stringTablePriv = (TA_StringTablePriv *)table->hiddenData; - if( !stringTablePriv ) - { - return TA_INTERNAL_ERROR(3); - } - - if( stringTablePriv->magicNumber != TA_STRING_TABLE_FUNC_MAGIC_NB ) - { - return TA_BAD_OBJECT; - } - - if( table->string ) - TA_Free( (void *)table->string ); - - TA_Free( table ); - } - - return TA_SUCCESS; -} - -TA_RetCode TA_GetFuncHandle( const char *name, const TA_FuncHandle **handle ) -{ - char firstChar, tmp; - const TA_FuncDef **funcDefTable; - const TA_FuncDef *funcDef; - const TA_FuncInfo *funcInfo; - unsigned int i, funcDefTableSize; - - /* A TA_FuncHandle is internally a TA_FuncDef. Let's find it - * by using the alphabetical tables. - */ - if( (name == NULL) || (handle == NULL) ) - { - return TA_BAD_PARAM; - } - - *handle = NULL; - - firstChar = name[0]; - - if( firstChar == '\0' ) - { - return TA_BAD_PARAM; - } - - tmp = (char)tolower( firstChar ); - - if( (tmp < 'a') || (tmp > 'z') ) - { - return TA_FUNC_NOT_FOUND; - } - - /* Identify the table. */ - tmp -= (char)'a'; - funcDefTable = TA_DEF_Tables[(int)tmp]; - - /* Identify the table size. */ - funcDefTableSize = *TA_DEF_TablesSize[(int)tmp]; - if( funcDefTableSize < 1 ) - { - return TA_FUNC_NOT_FOUND; - } - - /* Iterate all entries of the table and return as soon as found. */ - for( i=0; i < funcDefTableSize; i++ ) - { - funcDef = funcDefTable[i]; - if( !funcDef || !funcDef->funcInfo ) - return TA_INTERNAL_ERROR(3); - - funcInfo = funcDef->funcInfo; - if( !funcInfo ) - return TA_INTERNAL_ERROR(4); - - if( strcmp( funcInfo->name, name ) == 0 ) - { - *handle = (TA_FuncHandle *)funcDef; - return TA_SUCCESS; - } - } - - return TA_FUNC_NOT_FOUND; -} - -TA_RetCode TA_GetFuncInfo( const TA_FuncHandle *handle, - const TA_FuncInfo **funcInfo ) -{ - const TA_FuncDef *funcDef; - - if( !funcInfo || !handle ) - { - return TA_BAD_PARAM; - } - - /* Validate that this is a valid funcHandle. */ - funcDef = (const TA_FuncDef *)handle; - if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) - { - return TA_INVALID_HANDLE; - } - - *funcInfo = funcDef->funcInfo; - if( !funcDef->funcInfo ) - return TA_INVALID_HANDLE; - - return TA_SUCCESS; -} - -TA_RetCode TA_GetInputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_InputParameterInfo **info ) -{ - const TA_FuncDef *funcDef; - const TA_FuncInfo *funcInfo; - const TA_InputParameterInfo **inputTable; - - if( (handle == NULL) || (info == NULL) ) - { - return TA_BAD_PARAM; - } - - *info = NULL; - - /* Validate that this is a valid funcHandle. */ - funcDef = (const TA_FuncDef *)handle; - if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) - { - return TA_INVALID_HANDLE; - } - funcInfo = funcDef->funcInfo; - - if( !funcInfo ) return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbInput ) - { - return TA_BAD_PARAM; - } - - inputTable = (const TA_InputParameterInfo **)funcDef->input; - - if( !inputTable ) - return TA_INTERNAL_ERROR(2); - - *info = inputTable[paramIndex]; - - if( !(*info) ) - return TA_INTERNAL_ERROR(3); - - return TA_SUCCESS; -} - -TA_RetCode TA_GetOptInputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_OptInputParameterInfo **info ) -{ - const TA_FuncDef *funcDef; - const TA_FuncInfo *funcInfo; - const TA_OptInputParameterInfo **inputTable; - - if( (handle == NULL) || (info == NULL) ) - { - return TA_BAD_PARAM; - } - - *info = NULL; - - /* Validate that this is a valid funcHandle. */ - funcDef = (const TA_FuncDef *)handle; - if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) - { - return TA_INVALID_HANDLE; - } - - funcInfo = funcDef->funcInfo; - - if( !funcInfo ) - return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbOptInput ) - { - return TA_BAD_PARAM; - } - - inputTable = (const TA_OptInputParameterInfo **)funcDef->optInput; - - if( !inputTable ) - return TA_INTERNAL_ERROR(3); - - *info = inputTable[paramIndex]; - - if( !(*info) ) - return TA_INTERNAL_ERROR(4); - - return TA_SUCCESS; -} - -TA_RetCode TA_GetOutputParameterInfo( const TA_FuncHandle *handle, - unsigned int paramIndex, - const TA_OutputParameterInfo **info ) -{ - - const TA_FuncDef *funcDef; - const TA_FuncInfo *funcInfo; - const TA_OutputParameterInfo **outputTable; - - if( (handle == NULL) || (info == NULL) ) - { - return TA_BAD_PARAM; - } - - *info = NULL; - - /* Validate that this is a valid funcHandle. */ - funcDef = (const TA_FuncDef *)handle; - if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) - { - return TA_INVALID_HANDLE; - } - - funcInfo = funcDef->funcInfo; - - if( !funcInfo ) - { - return TA_INVALID_HANDLE; - } - - if( paramIndex >= funcInfo->nbOutput ) - { - return TA_BAD_PARAM; - } - - outputTable = (const TA_OutputParameterInfo **)funcDef->output; - - if( !outputTable ) - { - return TA_INTERNAL_ERROR(4); - } - - *info = outputTable[paramIndex]; - - if( !(*info) ) - { - return TA_INTERNAL_ERROR(5); - } - - return TA_SUCCESS; -} - -TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle, - TA_ParamHolder **allocatedParams ) -{ - - TA_FuncDef *funcDef; - unsigned int allocSize, i; - TA_ParamHolderInput *input; - TA_ParamHolderOptInput *optInput; - TA_ParamHolderOutput *output; - - const TA_FuncInfo *funcInfo; - TA_ParamHolder *newParams; - TA_ParamHolderPriv *newParamsPriv; - - const TA_InputParameterInfo **inputInfo; - const TA_OptInputParameterInfo **optInputInfo; - const TA_OutputParameterInfo **outputInfo; - - /* Validate the parameters. */ - if( !handle || !allocatedParams) - { - return TA_BAD_PARAM; - } - - /* Validate that this is a valid funcHandle. */ - funcDef = (TA_FuncDef *)handle; - if( funcDef->magicNumber != TA_FUNC_DEF_MAGIC_NB ) - { - *allocatedParams = NULL; - return TA_INVALID_HANDLE; - } - - /* Get the TA_FuncInfo. */ - funcInfo = funcDef->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - /* Allocate the TA_ParamHolder. */ - newParams = (TA_ParamHolder *)TA_Malloc( sizeof(TA_ParamHolder) + sizeof(TA_ParamHolderPriv)); - if( !newParams ) - { - *allocatedParams = NULL; - return TA_ALLOC_ERR; - } - - memset( newParams, 0, sizeof(TA_ParamHolder) + sizeof(TA_ParamHolderPriv) ); - newParamsPriv = (TA_ParamHolderPriv *)(((char *)newParams)+sizeof(TA_ParamHolder)); - newParamsPriv->magicNumber = TA_PARAM_HOLDER_PRIV_MAGIC_NB; - newParams->hiddenData = newParamsPriv; - - /* From this point, TA_ParamHolderFree can be safely called. */ - - /* Allocate the array of structure holding the info - * for each parameter. - */ - if( funcInfo->nbInput == 0 ) return TA_INTERNAL_ERROR(2); - - allocSize = (funcInfo->nbInput) * sizeof(TA_ParamHolderInput); - input = (TA_ParamHolderInput *)TA_Malloc( allocSize ); - - if( !input ) - { - TA_ParamHolderFree( newParams ); - *allocatedParams = NULL; - return TA_ALLOC_ERR; - } - memset( input, 0, allocSize ); - newParamsPriv->in = input; - - if( funcInfo->nbOptInput == 0 ) - optInput = NULL; - else - { - allocSize = (funcInfo->nbOptInput) * sizeof(TA_ParamHolderOptInput); - optInput = (TA_ParamHolderOptInput *)TA_Malloc( allocSize ); - - if( !optInput ) - { - TA_ParamHolderFree( newParams ); - *allocatedParams = NULL; - return TA_ALLOC_ERR; - } - memset( optInput, 0, allocSize ); - } - newParamsPriv->optIn = optInput; - - allocSize = (funcInfo->nbOutput) * sizeof(TA_ParamHolderOutput); - output = (TA_ParamHolderOutput *)TA_Malloc( allocSize ); - if( !output ) - { - TA_ParamHolderFree( newParams ); - *allocatedParams = NULL; - return TA_ALLOC_ERR; - } - memset( output, 0, allocSize ); - newParamsPriv->out = output; - - newParamsPriv->funcInfo = funcInfo; - - inputInfo = (const TA_InputParameterInfo **)funcDef->input; - optInputInfo = (const TA_OptInputParameterInfo **)funcDef->optInput; - outputInfo = (const TA_OutputParameterInfo **)funcDef->output; - - for( i=0; i < funcInfo->nbInput; i++ ) - { - input[i].inputInfo = inputInfo[i]; - newParamsPriv->inBitmap <<= 1; - newParamsPriv->inBitmap |= 1; - } - - for( i=0; i < funcInfo->nbOptInput; i++ ) - { - optInput[i].optInputInfo = optInputInfo[i]; - if( optInput[i].optInputInfo->type == TA_OptInput_RealRange ) - optInput[i].data.optInReal = optInputInfo[i]->defaultValue; - else - optInput[i].data.optInInteger = (TA_Integer)optInputInfo[i]->defaultValue; - } - - for( i=0; i < funcInfo->nbOutput; i++ ) - { - output[i].outputInfo = outputInfo[i]; - newParamsPriv->outBitmap <<= 1; - newParamsPriv->outBitmap |= 1; - } - - /* Succcess, return the result to the caller. */ - *allocatedParams = newParams; - - return TA_SUCCESS; -} - -TA_RetCode TA_ParamHolderFree( TA_ParamHolder *paramsToFree ) -{ - TA_ParamHolderPriv *paramPriv; - - TA_ParamHolderInput *input; - TA_ParamHolderOptInput *optInput; - TA_ParamHolderOutput *output; - - if( !paramsToFree ) - { - return TA_SUCCESS; - } - - paramPriv = paramsToFree->hiddenData; - - if( !paramPriv ) - { - return TA_INVALID_PARAM_HOLDER; - } - - if( paramPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - optInput = paramPriv->optIn; - if( optInput ) - TA_Free( optInput ); - - input = paramPriv->in; - if( input ) - TA_Free( input ); - - output = paramPriv->out; - if( output ) - TA_Free( output ); - - TA_Free( paramsToFree ); - - return TA_SUCCESS; -} - - -TA_RetCode TA_SetInputParamIntegerPtr( TA_ParamHolder *param, - unsigned int paramIndex, - const TA_Integer *value ) -{ - - TA_ParamHolderPriv *paramHolderPriv; - const TA_InputParameterInfo *paramInfo; - const TA_FuncInfo *funcInfo; - - if( (param == NULL) || (value == NULL) ) - { - return TA_BAD_PARAM; - } - - paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbInput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->in[paramIndex].inputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( paramInfo->type != TA_Input_Integer ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - paramHolderPriv->in[paramIndex].data.inInteger = value; - - /* This parameter is now initialized, clear the corresponding bit. */ - paramHolderPriv->inBitmap &= ~(1<hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbInput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->in[paramIndex].inputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( paramInfo->type != TA_Input_Real ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - paramHolderPriv->in[paramIndex].data.inReal = value; - - /* This parameter is now initialized, clear the corresponding bit. */ - paramHolderPriv->inBitmap &= ~(1<hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - if( paramIndex >= funcInfo->nbInput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->in[paramIndex].inputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( paramInfo->type != TA_Input_Price ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - #define SET_PARAM_INFO(lowerParam,upperParam) \ - { \ - if( paramInfo->flags & TA_IN_PRICE_##upperParam ) \ - { \ - if( lowerParam == NULL ) \ - { \ - return TA_BAD_PARAM; \ - } \ - paramHolderPriv->in[paramIndex].data.inPrice.lowerParam = lowerParam; \ - } \ - } - - SET_PARAM_INFO(open, OPEN ); - SET_PARAM_INFO(high, HIGH ); - SET_PARAM_INFO(low, LOW ); - SET_PARAM_INFO(close, CLOSE ); - SET_PARAM_INFO(volume, VOLUME ); - SET_PARAM_INFO(openInterest, OPENINTEREST ); - - #undef SET_PARAM_INFO - - /* This parameter is now initialized, clear the corresponding bit. */ - paramHolderPriv->inBitmap &= ~(1<hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - if( paramIndex >= funcInfo->nbOptInput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->optIn[paramIndex].optInputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( (paramInfo->type != TA_OptInput_IntegerRange) && - (paramInfo->type != TA_OptInput_IntegerList) ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - paramHolderPriv->optIn[paramIndex].data.optInInteger = value; - - return TA_SUCCESS; -} - -TA_RetCode TA_SetOptInputParamReal( TA_ParamHolder *param, - unsigned int paramIndex, - TA_Real value ) -{ - TA_ParamHolderPriv *paramHolderPriv; - const TA_OptInputParameterInfo *paramInfo; - const TA_FuncInfo *funcInfo; - - if( param == NULL ) - { - return TA_BAD_PARAM; - } - - paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbOptInput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->optIn[paramIndex].optInputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( (paramInfo->type != TA_OptInput_RealRange) && - (paramInfo->type != TA_OptInput_RealList) ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - paramHolderPriv->optIn[paramIndex].data.optInReal = value; - - return TA_SUCCESS; -} - - -/* Setup the parameters indicating where to store the output. */ -TA_RetCode TA_SetOutputParamIntegerPtr( TA_ParamHolder *param, - unsigned int paramIndex, - TA_Integer *out ) -{ - TA_ParamHolderPriv *paramHolderPriv; - const TA_OutputParameterInfo *paramInfo; - const TA_FuncInfo *funcInfo; - - if( (param == NULL) || (out == NULL) ) - { - return TA_BAD_PARAM; - } - - paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbOutput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->out[paramIndex].outputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( paramInfo->type != TA_Output_Integer ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - paramHolderPriv->out[paramIndex].data.outInteger = out; - - /* This parameter is now initialized, clear the corresponding bit. */ - paramHolderPriv->outBitmap &= ~(1<hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Make sure this index really exist. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - if( paramIndex >= funcInfo->nbOutput ) - { - return TA_BAD_PARAM; - } - - /* Verify the type of the parameter. */ - paramInfo = paramHolderPriv->out[paramIndex].outputInfo; - if( !paramInfo ) return TA_INTERNAL_ERROR(2); - if( paramInfo->type != TA_Output_Real ) - { - return TA_INVALID_PARAM_HOLDER_TYPE; - } - - /* keep a copy of the provided parameter. */ - paramHolderPriv->out[paramIndex].data.outReal = out; - - /* This parameter is now initialized, clear the corresponding bit. */ - paramHolderPriv->outBitmap &= ~(1<hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Get the pointer on the lookback function. */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - - funcDef = (const TA_FuncDef *)funcInfo->handle; - if( !funcDef ) return TA_INTERNAL_ERROR(2); - lookbackFunction = funcDef->lookback; - if( !lookbackFunction ) return TA_INTERNAL_ERROR(2); - - /* Perform the function call. */ - *lookback = (*lookbackFunction)( paramHolderPriv ); - - return TA_SUCCESS; -} - -/* Finally, call a TA function with the parameters. */ -TA_RetCode TA_CallFunc( const TA_ParamHolder *param, - TA_Integer startIdx, - TA_Integer endIdx, - TA_Integer *outBegIdx, - TA_Integer *outNbElement ) -{ - TA_RetCode retCode; - const TA_ParamHolderPriv *paramHolderPriv; - - const TA_FuncDef *funcDef; - const TA_FuncInfo *funcInfo; - TA_FrameFunction function; - - if( (param == NULL) || - (outBegIdx == NULL) || - (outNbElement == NULL) ) - { - return TA_BAD_PARAM; - } - - paramHolderPriv = (TA_ParamHolderPriv *)(param->hiddenData); - if( paramHolderPriv->magicNumber != TA_PARAM_HOLDER_PRIV_MAGIC_NB ) - { - return TA_INVALID_PARAM_HOLDER; - } - - /* Check that all parameters are initialize (except the optInput). */ - if( paramHolderPriv->inBitmap != 0 ) - { - return TA_INPUT_NOT_ALL_INITIALIZE; - } - - if( paramHolderPriv->outBitmap != 0 ) - { - return TA_OUTPUT_NOT_ALL_INITIALIZE; - } - - /* Get the pointer on the function */ - funcInfo = paramHolderPriv->funcInfo; - if( !funcInfo ) return TA_INVALID_HANDLE; - funcDef = (const TA_FuncDef *)funcInfo->handle; - if( !funcDef ) return TA_INTERNAL_ERROR(2); - function = funcDef->function; - if( !function ) return TA_INTERNAL_ERROR(2); - - /* Perform the function call. */ - retCode = (*function)( paramHolderPriv, startIdx, endIdx, - outBegIdx, outNbElement ); - return retCode; -} - -/**** Local functions definitions. ****/ -static TA_RetCode getGroupId( const char *groupString, unsigned int *groupId ) -{ - unsigned int i; - - for( i=0; i < TA_NB_GROUP_ID; i++ ) - { - if( strcmp( TA_GroupString[i], groupString ) == 0 ) - { - *groupId = i; - return TA_SUCCESS; - } - } - - return TA_GROUP_NOT_FOUND; -} - -static TA_RetCode getGroupSize( TA_GroupId groupId, unsigned int *groupSize ) -{ - #ifdef TA_GEN_CODE - /* Code used only when compiled with gen_code. */ - - unsigned int i, j; - const TA_FuncDef **funcDefTable; - const TA_FuncDef *funcDef; - unsigned int tableSize; - unsigned int nbFuncFound; - - if( groupId >= TA_NB_GROUP_ID ) return TA_INTERNAL_ERROR(2); - if( !groupSize ) return TA_INTERNAL_ERROR(2); - - nbFuncFound = 0; - for( i=0; i < 26; i++ ) - { - funcDefTable = TA_DEF_Tables[i]; - tableSize = *(TA_DEF_TablesSize[i]); - - for( j=0; j < tableSize; j++ ) - { - funcDef = funcDefTable[j]; - if( funcDef && (funcDef->groupId == groupId) ) - nbFuncFound++; - } - } - - *groupSize = nbFuncFound; - - return TA_SUCCESS; - #else - /* Optimized code in the final library. */ - *groupSize = TA_PerGroupSize[groupId]; - - return TA_SUCCESS; - #endif -} - -#ifdef TA_GEN_CODE - static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, - unsigned int idx, - const char **stringPtr ) -#else - static TA_RetCode getFuncNameByIdx( TA_GroupId groupId, - unsigned int idx, - const char **stringPtr ) -#endif -{ - #ifdef TA_GEN_CODE - /* Code used only when compiled with gen_code. */ - - unsigned int curIdx; - unsigned int i, j, found; - const TA_FuncDef **funcDefTable; - unsigned int tableSize; - const TA_FuncInfo *funcInfo; - - if( !stringPtr ) return TA_INTERNAL_ERROR(2); - - curIdx = 0; - found = 0; - for( i=0; (i < 26) && !found; i++ ) - { - funcDefTable = TA_DEF_Tables[i]; - tableSize = *(TA_DEF_TablesSize[i]); - - for( j=0; (j < tableSize) && !found; j++ ) - { - if( funcDefTable[j]->groupId == groupId ) - { - if( idx == curIdx ) - { - funcInfo = funcDefTable[j]->funcInfo; - if( !funcInfo ) return TA_INTERNAL_ERROR(2); - *stringPtr = funcInfo->name; - found = 1; - } - curIdx++; - } - } - } - - if( found != 1 ) return TA_INTERNAL_ERROR(2); - if( !(*stringPtr) ) return TA_INTERNAL_ERROR(2); - - return TA_SUCCESS; - #else - /* Optimized code in the final library. */ - const TA_FuncDef **funcDefTable; - const TA_FuncInfo *funcInfo; - - funcDefTable = TA_PerGroupFuncDef[groupId]; - funcInfo = funcDefTable[idx]->funcInfo; - *stringPtr = funcInfo->name; - - return TA_SUCCESS; - #endif -} diff --git a/src/ta-lib/src/ta_abstract/ta_def_ui.c b/src/ta-lib/src/ta_abstract/ta_def_ui.c deleted file mode 100644 index a103a9560..000000000 --- a/src/ta-lib/src/ta_abstract/ta_def_ui.c +++ /dev/null @@ -1,573 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 130101 MF First version. - * 111503 MF Add TA_DEF_UI_Input_Price_CV - */ - -/* Description: - * Defines const structures representing how data can be - * input/output from the TA functions. - * These structure are mainly used to build the tables\table.c files. - */ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -const char TA_GroupId_MathOperatorsString[] = "Math Operators"; -const char TA_GroupId_MathTransformString[] = "Math Transform"; -const char TA_GroupId_OverlapStudiesString[] = "Overlap Studies"; -const char TA_GroupId_VolatilityIndicatorsString[] = "Volatility Indicators"; -const char TA_GroupId_MomentumIndicatorsString[] = "Momentum Indicators"; -const char TA_GroupId_CycleIndicatorsString[] = "Cycle Indicators"; -const char TA_GroupId_VolumeIndicatorsString[] = "Volume Indicators"; -const char TA_GroupId_PatternRecognitionString[] = "Pattern Recognition"; -const char TA_GroupId_StatisticString[] = "Statistic Functions"; -const char TA_GroupId_PriceTransformString[] = "Price Transform"; - -const char *TA_GroupString[TA_NB_GROUP_ID] = -{ - &TA_GroupId_MathOperatorsString[0], - &TA_GroupId_MathTransformString[0], - &TA_GroupId_OverlapStudiesString[0], - &TA_GroupId_VolatilityIndicatorsString[0], - &TA_GroupId_MomentumIndicatorsString[0], - &TA_GroupId_CycleIndicatorsString[0], - &TA_GroupId_VolumeIndicatorsString[0], - &TA_GroupId_PatternRecognitionString[0], - &TA_GroupId_StatisticString[0], - &TA_GroupId_PriceTransformString[0] -}; - -/************************************************************* - * Define from here the TA_InputParameterInfo - * These shall be sufficient for all possible TA functions. - *************************************************************/ -const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLCV = - { TA_Input_Price, "inPriceOHLCV", - TA_IN_PRICE_OPEN | - TA_IN_PRICE_HIGH | - TA_IN_PRICE_LOW | - TA_IN_PRICE_CLOSE | - TA_IN_PRICE_VOLUME }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLCV = - { TA_Input_Price, "inPriceHLCV", - TA_IN_PRICE_HIGH | - TA_IN_PRICE_LOW | - TA_IN_PRICE_CLOSE | - TA_IN_PRICE_VOLUME }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLC = - { TA_Input_Price, "inPriceOHLC", - TA_IN_PRICE_OPEN | - TA_IN_PRICE_HIGH | - TA_IN_PRICE_LOW | - TA_IN_PRICE_CLOSE }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLC = - { TA_Input_Price, "inPriceHLC", - TA_IN_PRICE_HIGH | - TA_IN_PRICE_LOW | - TA_IN_PRICE_CLOSE }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_HL = - { TA_Input_Price, "inPriceHL", - TA_IN_PRICE_HIGH | - TA_IN_PRICE_LOW }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_OC = - { TA_Input_Price, "inPriceOC", - TA_IN_PRICE_OPEN | - TA_IN_PRICE_CLOSE }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_CV = - { TA_Input_Price, "inPriceCV", - TA_IN_PRICE_CLOSE | - TA_IN_PRICE_VOLUME }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Price_V = - { TA_Input_Price, "inPriceV", - TA_IN_PRICE_VOLUME }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Real = - { TA_Input_Real, "inReal", 0 }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Periods = - { TA_Input_Real, "inPeriods", 0 }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Real0 = - { TA_Input_Real, "inReal0", 0 }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Real1 = - { TA_Input_Real, "inReal1", 0 }; - -const TA_InputParameterInfo TA_DEF_UI_Input_Integer = - { TA_Input_Integer, "inInteger", 0 }; - - -/************************************************************* - * Define from here the TA_OutputParameterInfo - * These shall be sufficient for most of the TA functions. - *************************************************************/ -const TA_OutputParameterInfo TA_DEF_UI_Output_Real = - { TA_Output_Real, "outReal", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Integer = - { TA_Output_Integer, "outInteger", TA_OUT_LINE }; - -/***************************************************** - * Define from here the TA_Integer ranges - ****************************************************/ - -const TA_IntegerRange TA_DEF_TimePeriod_Positive = -{ - 1, /* min */ - 100000, /* max */ - 1, /* suggested start */ - 200, /* suggested end */ - 1 /* suggested increment */ -}; - -const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum5 = -{ - 5, /* min */ - 100000, /* max */ - 5, /* suggested start */ - 200, /* suggested end */ - 1 /* suggested increment */ -}; - -const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum2 = -{ - 2, /* min */ - 100000, /* max */ - 4, /* suggested start */ - 200, /* suggested end */ - 1 /* suggested increment */ -}; - -const TA_IntegerRange TA_DEF_HorizontalShiftPeriod = -{ - -200, /* min */ - 200, /* max */ - 0, /* suggested start */ - 8, /* suggested end */ - 1 /* suggested increment */ -}; - - -/***************************************************** - * Define from here the TA_Real ranges - ****************************************************/ -const TA_RealRange TA_DEF_VerticalShiftPercent = -{ - -99.0, /* min */ - 99.0, /* max */ - 1, /* precision */ - -10.0, /* suggested start */ - 10.0, /* suggested end */ - 0.5 /* suggested increment */ -}; - -const TA_RealRange TA_DEF_NbDeviation = -{ - TA_REAL_MIN, /* min */ - TA_REAL_MAX, /* max */ - 2, /* precision */ - -2.0, /* suggested start */ - 2.0, /* suggested end */ - 0.2 /* suggested increment */ -}; - -const TA_RealRange TA_DEF_ZeroToOne = -{ - 0.00, /* min */ - 1.00, /* max */ - 2, /* precision */ - 0.01, /* suggested start */ - 1.00, /* suggested end */ - 0.05 /* suggested increment */ -}; - -const TA_RealRange TA_DEF_RealPositive = -{ - 0.00, /* min */ - TA_REAL_MAX, /* max */ - 0, /* precision */ - 0.0, /* suggested start */ - 0.0, /* suggested end */ - 0.0 /* suggested increment */ -}; - -/***************************************************** - * Define from here the TA_OptInputParameterInfo. - ****************************************************/ - -const TA_OptInputParameterInfo TA_DEF_UI_MinPeriod = -{ - TA_OptInput_IntegerRange, /* type */ - "optInMinPeriod", /* paramName */ - 0, /* flags */ - - "Minimum Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 2, /* defaultValue */ - "Value less than minimum will be changed to Minimum period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_MaxPeriod = -{ - TA_OptInput_IntegerRange, /* type */ - "optInMaxPeriod", /* paramName */ - 0, /* flags */ - - "Maximum Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 30, /* defaultValue */ - "Value higher than maximum will be changed to Maximum period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30_MINIMUM2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 30, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_20_MINIMUM2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 20, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_21_MINIMUM2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 21, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 14, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM5 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum5, /* dataSet */ - 14, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10_MINIMUM2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 10, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5_MINIMUM2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 5, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 30, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 14, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 10, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod", /* paramName */ - 0, /* flags */ - - "Time Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 5, /* defaultValue */ - "Number of period", /* hint */ - - NULL /* helpFile */ -}; - - -/* Use for the multiplier of standard deviations. */ -const TA_OptInputParameterInfo TA_DEF_UI_NbDeviation = -{ - TA_OptInput_RealRange, /* type */ - "optInNbDev", /* paramName */ - 0, /* flags */ - - "Deviations", /* displayName */ - (const void *)&TA_DEF_NbDeviation, /* dataSet */ - 1.0, /* defaultValue */ - "Nb of deviations", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_Penetration_30 = -{ - TA_OptInput_RealRange, /* type */ - "optInPenetration", /* paramName */ - 0, /* flags */ - - "Penetration", /* displayName */ - (const void *)&TA_DEF_RealPositive, /* dataSet */ - 0.3, /* defaultValue */ - "Percentage of penetration of a candle within another candle", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_Penetration_50 = -{ - TA_OptInput_RealRange, /* type */ - "optInPenetration", /* paramName */ - 0, /* flags */ - - "Penetration", /* displayName */ - (const void *)&TA_DEF_RealPositive, /* dataSet */ - 0.5, /* defaultValue */ - "Percentage of penetration of a candle within another candle", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_VerticalShift = -{ - TA_OptInput_RealRange, /* type */ - "optInVertShift", /* paramName */ - TA_OPTIN_IS_PERCENT, /* flags */ - - "Vertical Shift", /* displayName */ - (const void *)&TA_DEF_VerticalShiftPercent, /* dataSet */ - 0, /* defaultValue */ - "Positive number shift upwards, negative downwards", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_HorizontalShift = -{ - TA_OptInput_IntegerRange, /* type */ - "optInHorizShift", /* paramName */ - 0, /* flags */ - - "Horizontal Shift", /* displayName */ - (const void *)&TA_DEF_HorizontalShiftPeriod, /* dataSet */ - 0, /* defaultValue */ - "Positive number shift 'n' period to the right, negative shift to the left", /* hint */ - - NULL /* helpFile */ -}; - -/* Define the values available for the MA function. - * - * Many TA function using the MA internally may wish to - * re-use this parameter as one of their own. That way a - * new MA will provide automatically a new way of calculating - * to a multitude of other TA functions. - */ -static const TA_IntegerDataPair TA_MA_TypeDataPair[] = -{ - {0,"SMA"}, - {1,"EMA"}, - {2,"WMA"}, - {3,"DEMA" }, - {4,"TEMA" }, - {5,"TRIMA"}, - {6,"KAMA" }, - {7,"MAMA" }, - {8,"T3"} - /*{...,"Linear Regression"}*/ -}; - -const TA_IntegerList TA_MA_TypeList = -{ - &TA_MA_TypeDataPair[0], - sizeof(TA_MA_TypeDataPair)/sizeof(TA_IntegerDataPair) -}; - -const TA_OptInputParameterInfo TA_DEF_UI_MA_Method = -{ - TA_OptInput_IntegerList, /* type */ - "optInMAType", /* paramName */ - 0, /* flags */ - - "MA Type", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average", /* hint */ - - NULL /* helpFile */ -}; - -/* When a TA function needs two period (often called - * a fast and slow period). - */ -const TA_OptInputParameterInfo TA_DEF_UI_Fast_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInFastPeriod", /* paramName */ - 0, /* flags */ - - "Fast Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 12, /* defaultValue */ - "Number of period for the fast MA", /* hint */ - - NULL /* helpFile */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_Slow_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInSlowPeriod", /* paramName */ - 0, /* flags */ - - "Slow Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 26, /* defaultValue */ - "Number of period for the slow MA", /* hint */ - - NULL /* helpFile */ -}; - diff --git a/src/ta-lib/src/ta_abstract/ta_def_ui.h b/src/ta-lib/src/ta_abstract/ta_def_ui.h deleted file mode 100644 index 38dfd02d0..000000000 --- a/src/ta-lib/src/ta_abstract/ta_def_ui.h +++ /dev/null @@ -1,293 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef TA_DEF_UI_H -#define TA_DEF_UI_H - -/* Offer pre-defined user interface constant. - * - * This allows to avoid to duplicate static data for - * common user interface elements. - */ - -#ifndef TA_ABSTRACT_H - #include "ta_abstract.h" -#endif - -#ifndef TA_FRAME_PRIV_H - #include "ta_frame_priv.h" -#endif - -#if !defined(TA_GEN_CODE) && !defined( TA_FRAME_H ) - #include "ta_frame.h" -#endif - -typedef enum -{ - /* If you modify this enum, make sure you update ta_def_ui.c */ - TA_GroupId_MathOperators, - TA_GroupId_MathTransform, - TA_GroupId_OverlapStudies, - TA_GroupId_VolatilityIndicators, - TA_GroupId_MomentumIndicators, - TA_GroupId_CycleIndicators, - TA_GroupId_VolumeIndicators, - TA_GroupId_PatternRecognition, - TA_GroupId_Statistic, - TA_GroupId_PriceTransform, - TA_NB_GROUP_ID -} TA_GroupId; - -extern const char TA_GroupId_MathOperatorsString[]; -extern const char TA_GroupId_MathTransformString[]; -extern const char TA_GroupId_OverlapStudiesString[]; -extern const char TA_GroupId_VolatilityIndicatorsString[]; -extern const char TA_GroupId_MomentumIndicatorsString[]; -extern const char TA_GroupId_CycleIndicatorsString[]; -extern const char TA_GroupId_VolumeIndicatorsString[]; -extern const char TA_GroupId_PatternRecognitionString[]; -extern const char TA_GroupId_StatisticString[]; -extern const char TA_GroupId_PriceTransformString[]; - -extern const char *TA_GroupString[TA_NB_GROUP_ID]; - -/* Inputs */ -extern const TA_InputParameterInfo TA_DEF_UI_Input_Real; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Real0; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Real1; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Integer; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLCV; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLCV; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLC; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLC; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_HL; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_OC; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_CV; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Price_V; -extern const TA_InputParameterInfo TA_DEF_UI_Input_Periods; - - -/* Outputs. */ -extern const TA_OutputParameterInfo TA_DEF_UI_Output_Real; -extern const TA_OutputParameterInfo TA_DEF_UI_Output_Integer; -extern const TA_OutputParameterInfo TA_DEF_UI_Output_Lines; - -/* Optional Inputs. */ -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5; - -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30_MINIMUM2; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_20_MINIMUM2; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_21_MINIMUM2; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM2; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_MINIMUM5; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_10_MINIMUM2; -extern const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_5_MINIMUM2; - -extern const TA_OptInputParameterInfo TA_DEF_UI_VerticalShift; -extern const TA_OptInputParameterInfo TA_DEF_UI_HorizontalShift; - -extern const TA_OptInputParameterInfo TA_DEF_UI_MA_Method; -extern const TA_OptInputParameterInfo TA_DEF_UI_Fast_Period; -extern const TA_OptInputParameterInfo TA_DEF_UI_Slow_Period; - -extern const TA_OptInputParameterInfo TA_DEF_UI_NbDeviation; - -extern const TA_OptInputParameterInfo TA_DEF_UI_Penetration_30; -extern const TA_OptInputParameterInfo TA_DEF_UI_Penetration_50; - -extern const TA_OptInputParameterInfo TA_DEF_UI_MinPeriod; -extern const TA_OptInputParameterInfo TA_DEF_UI_MaxPeriod; - -/* Re-usable ranges. */ -extern const TA_IntegerRange TA_DEF_TimePeriod_Positive; -extern const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum2; -extern const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum5; - -extern const TA_RealRange TA_DEF_VerticalShiftPercent; -extern const TA_IntegerRange TA_DEF_HorizontalShiftPeriod; -extern const TA_RealRange TA_DEF_NbDeviation; -extern const TA_RealRange TA_DEF_ZeroToOne; -extern const TA_RealRange TA_DEF_RealPositive; - -/* Useful to build your own TA_DEF_UI with the list of - * implemented Moving Average type. - */ -extern const TA_IntegerList TA_MA_TypeList; - -/* An internal structure for coordinating all these const info. - * One TA_FuncDef instance will exist for each TA function. - */ -typedef struct -{ - /* Magic number is used to detect internal error. */ - const unsigned int magicNumber; - - /* The function will belong to this group. */ - const TA_GroupId groupId; - - /* Some more info. */ - const TA_FuncInfo * const funcInfo; - - /* Description of the parameters. */ - const TA_InputParameterInfo * const input; - const TA_OptInputParameterInfo * const optInput; - const TA_OutputParameterInfo * const output; - - /* Entry point of the TA function and its lookback function. */ - const TA_FrameFunction function; - const TA_FrameLookback lookback; -} TA_FuncDef; - -/* The following MACROs are helpers being used in - * the tables\table.c files. - */ -#if !defined( TA_GEN_CODE ) - /* This definition is used when compiling the end-user library. */ - #define DEF_FUNCTION( name, \ - groupId, \ - hint, \ - camelCaseName, \ - flags ) \ - \ - TA_FuncInfo TA_INFO_##name; \ - \ - const TA_FuncDef TA_DEF_##name = \ - { \ - TA_FUNC_DEF_MAGIC_NB, \ - groupId, \ - &TA_INFO_##name, \ - (const TA_InputParameterInfo * const)&TA_##name##_Inputs[0], \ - (const TA_OptInputParameterInfo * const)&TA_##name##_OptInputs[0], \ - (const TA_OutputParameterInfo * const)&TA_##name##_Outputs[0], \ - TA_##name##_FramePP, \ - TA_##name##_FramePPLB \ - }; \ - TA_FuncInfo TA_INFO_##name = \ - { \ - (const char * const)#name, \ - (const char * const)groupId##String, \ - (const char * const)hint, \ - (const char * const)camelCaseName, \ - (const int)flags, \ - (sizeof(TA_##name##_Inputs) / sizeof(TA_InputParameterInfo *)) - 1, \ - (sizeof(TA_##name##_OptInputs)/ sizeof(TA_OptInputParameterInfo *))- 1, \ - (sizeof(TA_##name##_Outputs) / sizeof(TA_OutputParameterInfo *)) - 1, \ - (const TA_FuncHandle * const)&TA_DEF_##name \ - }; -#else - /* This definition is used only when compiling for gencode. - * Because some pointers may not be defined before gencode - * is run at least once, some value are set to NULL. - */ - #define DEF_FUNCTION( name, \ - groupId, \ - hint, \ - camelCaseName, \ - flags ) \ - \ - TA_FuncInfo TA_INFO_##name; \ - \ - const TA_FuncDef TA_DEF_##name = \ - { \ - TA_FUNC_DEF_MAGIC_NB, \ - groupId, \ - &TA_INFO_##name, \ - (const TA_InputParameterInfo * const)&TA_##name##_Inputs[0], \ - (const TA_OptInputParameterInfo * const)&TA_##name##_OptInputs[0], \ - (const TA_OutputParameterInfo * const)&TA_##name##_Outputs[0], \ - NULL, \ - NULL \ - }; \ - TA_FuncInfo TA_INFO_##name = \ - { \ - (const char * const)#name, \ - (const char * const)groupId##String, \ - (const char * const)hint, \ - (const char * const)camelCaseName, \ - (const int)flags, \ - (sizeof(TA_##name##_Inputs) / sizeof(TA_InputParameterInfo *)) - 1, \ - (sizeof(TA_##name##_OptInputs)/ sizeof(TA_OptInputParameterInfo *))- 1, \ - (sizeof(TA_##name##_Outputs) / sizeof(TA_OutputParameterInfo *)) - 1, \ - (const TA_FuncHandle * const)&TA_DEF_##name \ - }; -#endif - -#define ADD_TO_TABLE(name) &TA_DEF_##name - -/* Utility Macro to quickly define Math operator operating on one array - * with no optional parameter. - */ -#define DEF_MATH_UNARY_OPERATOR(NAME,HINT,CAMELCASENAME) \ - static const TA_InputParameterInfo *TA_##NAME##_Inputs[] = \ -{ \ - &TA_DEF_UI_Input_Real, \ - NULL \ -}; \ -static const TA_OutputParameterInfo *TA_##NAME##_Outputs[] = \ -{ \ - &TA_DEF_UI_Output_Real, \ - NULL \ -}; \ - static const TA_OptInputParameterInfo *TA_##NAME##_OptInputs[] = { NULL }; \ -DEF_FUNCTION( NAME, /* name */ \ - TA_GroupId_MathTransform, /* groupId */ \ - HINT, /* hint */ \ - CAMELCASENAME, /* CamelCase name */ \ - 0 /* flags */ \ - ); - -#define DEF_MATH_BINARY_OPERATOR(NAME,HINT,CAMELCASENAME) \ - static const TA_InputParameterInfo *TA_##NAME##_Inputs[] = \ -{ \ - &TA_DEF_UI_Input_Real0, \ - &TA_DEF_UI_Input_Real1, \ - NULL \ -}; \ -static const TA_OutputParameterInfo *TA_##NAME##_Outputs[] = \ -{ \ - &TA_DEF_UI_Output_Real, \ - NULL \ -}; \ - static const TA_OptInputParameterInfo *TA_##NAME##_OptInputs[] = { NULL }; \ -DEF_FUNCTION( NAME, /* name */ \ - TA_GroupId_MathOperators, /* groupId */ \ - HINT, /* hint */ \ - CAMELCASENAME, /* CamelCase name */ \ - 0 /* flags */ \ - ); - -#endif - diff --git a/src/ta-lib/src/ta_abstract/ta_frame_priv.h b/src/ta-lib/src/ta_abstract/ta_frame_priv.h deleted file mode 100644 index c105644fb..000000000 --- a/src/ta-lib/src/ta_abstract/ta_frame_priv.h +++ /dev/null @@ -1,128 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -/* TA_ParamHolderPriv is the private implementation of a TA_ParamHolder. */ - -/* Definition in this header shall be used only internaly by the - * ta_abstract module. - * End-user of the TA-LIB shall never attempt to access these - * structure directly. - */ - -#ifndef TA_FRAME_PRIV_H -#define TA_FRAME_PRIV_H - -#ifndef TA_ABSTRACT_H - #include "ta_abstract.h" -#endif - -#ifndef TA_MAGIC_NB_H - #include "ta_magic_nb.h" -#endif - -typedef struct -{ - const TA_Real *open; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; - const TA_Real *volume; - const TA_Real *openInterest; -} TA_PricePtrs; - -typedef struct -{ - union TA_ParamHolderInputData - { - const TA_Real *inReal; - const TA_Integer *inInteger; - TA_PricePtrs inPrice; - } data; - - const TA_InputParameterInfo *inputInfo; - -} TA_ParamHolderInput; - -typedef struct -{ - union TA_ParamHolderOptInData - { - TA_Integer optInInteger; - TA_Real optInReal; - } data; - - const TA_OptInputParameterInfo *optInputInfo; - -} TA_ParamHolderOptInput; - -typedef struct -{ - union TA_ParamHolderOutputData - { - TA_Real *outReal; - TA_Integer *outInteger; - } data; - - const TA_OutputParameterInfo *outputInfo; -} TA_ParamHolderOutput; - -typedef struct -{ - /* Magic number is used to detect internal error. */ - unsigned int magicNumber; - - TA_ParamHolderInput *in; - TA_ParamHolderOptInput *optIn; - TA_ParamHolderOutput *out; - - /* Indicate which parameter have been initialized. - * The LSB (Less Significant Bit) is the first parameter - * and a bit equal to '1' indicate that the parameter is - * not initialized. - */ - unsigned int inBitmap; - unsigned int outBitmap; - - const TA_FuncInfo *funcInfo; -} TA_ParamHolderPriv; - -typedef TA_RetCode (*TA_FrameFunction)( const TA_ParamHolderPriv *params, - TA_Integer startIdx, - TA_Integer endIdx, - TA_Integer *outBegIdx, - TA_Integer *outNbElement ); - -typedef unsigned int (*TA_FrameLookback)( const TA_ParamHolderPriv *params ); - -#endif diff --git a/src/ta-lib/src/ta_abstract/ta_func_api.c b/src/ta-lib/src/ta_abstract/ta_func_api.c deleted file mode 100644 index 21c5f2a8b..000000000 --- a/src/ta-lib/src/ta_abstract/ta_func_api.c +++ /dev/null @@ -1,9159 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Important: This file is automatically generated by gen_code. - * Any modification will be lost on next execution - * of gen_code. - * - * This file is a binary representation of the func_api.xml file. - */ - -#include "ta_abstract.h" - -static const char TA_FunctionDescriptionXMLArray[] = -{ -0x3C,0x3F,0x78,0x6D,0x6C,0x20,0x76,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x22,0x31,0x2E,0x30,0x22,0x20,0x65 -,0x6E,0x63,0x6F,0x64,0x69,0x6E,0x67,0x3D,0x22,0x75,0x74,0x66,0x2D,0x38,0x22,0x20,0x3F,0x3E,0x0A,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3E,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x43,0x43,0x42,0x41,0x4E,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09 -,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x43,0x43,0x42 -,0x41,0x4E,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x63,0x63 -,0x62,0x61,0x6E,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x42,0x61,0x6E,0x64,0x73 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53 -,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72 -,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 -,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32 -,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x55,0x70,0x70,0x65,0x72,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x55,0x70,0x70,0x65,0x72,0x20,0x4C,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x4D,0x69,0x64,0x64,0x6C,0x65,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x4C,0x6F,0x77,0x65,0x72,0x42 -,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x6F,0x77,0x65,0x72,0x20 -,0x4C,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x43 -,0x4F,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x41,0x43,0x4F,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x41,0x63,0x6F,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72 -,0x69,0x63,0x20,0x41,0x43,0x6F,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61 -,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D -,0x2D,0x20,0x41,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x41,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x43,0x68,0x61,0x69,0x6B,0x69,0x6E,0x20,0x41,0x2F,0x44,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61 -,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x56,0x6F,0x6C,0x75 -,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x44,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x64,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D,0x65 -,0x74,0x69,0x63,0x20,0x41,0x64,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61 -,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 -,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x44,0x4F,0x53,0x43,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x41,0x44,0x4F,0x53,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x64 -,0x4F,0x73,0x63,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x43,0x68,0x61,0x69,0x6B,0x69,0x6E,0x20,0x41,0x2F,0x44,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74 -,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x20 -,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x46,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F -,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53 -,0x6C,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72 -,0x20,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x44,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x64,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x44,0x69,0x72,0x65,0x63,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x20,0x49,0x6E,0x64,0x65,0x78 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20 -,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F -,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66 -,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C -,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C -,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x41,0x44,0x58,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x44,0x58,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x41,0x64,0x78,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x20,0x49,0x6E,0x64,0x65,0x78,0x20,0x52 -,0x61,0x74,0x69,0x6E,0x67,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65 -,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 -,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x50,0x4F,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x50,0x4F,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x70,0x6F,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x62,0x73,0x6F,0x6C,0x75,0x74,0x65,0x20,0x50,0x72,0x69,0x63,0x65 -,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72 -,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x46,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F -,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x32,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x53,0x6C,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F -,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x36,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70 -,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65 -,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x52,0x4F,0x4F,0x4E,0x20,0x2D,0x2D,0x3E,0x0A -,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x52,0x4F -,0x4F,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x72,0x6F,0x6F,0x6E -,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x72,0x6F -,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75 -,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 -,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31 -,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x41,0x72,0x6F,0x6F -,0x6E,0x44,0x6F,0x77,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68 -,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x41,0x72,0x6F,0x6F,0x6E,0x55,0x70,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x52,0x4F,0x4F,0x4E,0x4F,0x53,0x43,0x20,0x2D,0x2D,0x3E,0x0A -,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x52,0x4F -,0x4F,0x4E,0x4F,0x53,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x72 -,0x6F,0x6F,0x6E,0x4F,0x73,0x63,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x41,0x72,0x6F,0x6F,0x6E,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49 -,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 -,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x53,0x49,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x53,0x49,0x4E,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x73,0x69,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67 -,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x41,0x53,0x69,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C -,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x54,0x41,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x54,0x41,0x4E,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x74,0x61,0x6E,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20 -,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x41,0x54,0x61,0x6E,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66 -,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x54,0x52,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x54 -,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x74,0x72,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67 -,0x65,0x20,0x54,0x72,0x75,0x65,0x20,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x61,0x74,0x69,0x6C,0x69,0x74,0x79,0x20,0x49,0x6E,0x64,0x69,0x63,0x61 -,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62 -,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x56,0x47,0x50,0x52,0x49 -,0x43,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x41,0x56,0x47,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x76,0x67,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x50,0x72 -,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65,0x20 -,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F -,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x41,0x56,0x47,0x44,0x45,0x56,0x20,0x2D,0x2D -,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x41 -,0x56,0x47,0x44,0x45,0x56,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x76 -,0x67,0x44,0x65,0x76,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65,0x20,0x54,0x72,0x61,0x6E,0x73 -,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 -,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x42,0x42 -,0x41,0x4E,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x42,0x41,0x4E,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x42,0x62,0x61,0x6E,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x6F,0x6C,0x6C,0x69,0x6E,0x67,0x65,0x72,0x20,0x42,0x61 -,0x6E,0x64,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 -,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F -,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 -,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x73,0x20,0x75,0x70,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6D,0x75,0x6C,0x74,0x69,0x70,0x6C,0x69,0x65,0x72,0x20 -,0x66,0x6F,0x72,0x20,0x75,0x70,0x70,0x65,0x72,0x20,0x62,0x61,0x6E,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E -,0x3E,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x2D,0x32,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x32,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x73,0x20,0x64,0x6F,0x77,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6D,0x75,0x6C,0x74,0x69,0x70,0x6C,0x69,0x65,0x72,0x20,0x66 -,0x6F,0x72,0x20,0x6C,0x6F,0x77,0x65,0x72,0x20,0x62,0x61,0x6E,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E -,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x2D,0x32,0x2E,0x30,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 -,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x32,0x2E,0x30,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76 -,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x55,0x70,0x70,0x65,0x72,0x42 -,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x70,0x70,0x65,0x72,0x20 -,0x4C,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x4D,0x69,0x64,0x64,0x6C,0x65 -,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x4C,0x6F,0x77,0x65,0x72,0x42,0x61,0x6E,0x64,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x6F,0x77,0x65,0x72,0x20,0x4C,0x69,0x6D,0x69,0x74,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x42,0x45,0x54,0x41,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x45 -,0x54,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x42,0x65,0x74,0x61,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x65,0x74,0x61 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63 -,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 -,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C -,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x42,0x4F,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x4F,0x50,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x42,0x6F,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x61,0x6C,0x61,0x6E,0x63,0x65,0x20,0x4F,0x66 -,0x20,0x50,0x6F,0x77,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D -,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x43,0x49,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x43 -,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x63,0x69,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x6F,0x6D,0x6D,0x6F,0x64 -,0x69,0x74,0x79,0x20,0x43,0x68,0x61,0x6E,0x6E,0x65,0x6C,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64 -,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65 -,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x32,0x43,0x52,0x4F,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x32,0x43 -,0x52,0x4F,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x32,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x54,0x77,0x6F,0x20,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 -,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x42,0x4C,0x41,0x43 -,0x4B,0x43,0x52,0x4F,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x42,0x4C,0x41,0x43,0x4B,0x43,0x52,0x4F -,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x42 -,0x6C,0x61,0x63,0x6B,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x42,0x6C,0x61,0x63,0x6B,0x20,0x43,0x72 -,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72 -,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F -,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x49,0x4E,0x53,0x49,0x44,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x49 -,0x4E,0x53,0x49,0x44,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x33,0x49,0x6E,0x73,0x69,0x64,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x49,0x6E,0x73,0x69,0x64,0x65,0x20,0x55,0x70 -,0x2F,0x44,0x6F,0x77,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74 -,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F -,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F -,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x4C,0x49,0x4E,0x45,0x53,0x54,0x52,0x49,0x4B,0x45,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x43,0x44,0x4C,0x33,0x4C,0x49,0x4E,0x45,0x53,0x54,0x52,0x49,0x4B,0x45,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x4C,0x69,0x6E,0x65,0x53,0x74,0x72,0x69 -,0x6B,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54 -,0x68,0x72,0x65,0x65,0x2D,0x4C,0x69,0x6E,0x65,0x20,0x53,0x74,0x72,0x69,0x6B,0x65,0x20,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F -,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E -,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C -,0x33,0x4F,0x55,0x54,0x53,0x49,0x44,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x4F,0x55,0x54,0x53,0x49,0x44 -,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x4F,0x75 -,0x74,0x73,0x69,0x64,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x4F,0x75,0x74,0x73,0x69,0x64,0x65,0x20,0x55,0x70,0x2F,0x44 -,0x6F,0x77,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72 -,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F -,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x53,0x54,0x41,0x52,0x53,0x49,0x4E,0x53,0x4F,0x55,0x54,0x48,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x43,0x44,0x4C,0x33,0x53,0x54,0x41,0x52,0x53,0x49,0x4E,0x53,0x4F,0x55,0x54,0x48,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33,0x53,0x74,0x61,0x72,0x73,0x49 -,0x6E,0x53,0x6F,0x75,0x74,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x53,0x74,0x61,0x72,0x73,0x20,0x49,0x6E,0x20,0x54,0x68 -,0x65,0x20,0x53,0x6F,0x75,0x74,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 -,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x33,0x57,0x48,0x49,0x54,0x45,0x53,0x4F,0x4C,0x44 -,0x49,0x45,0x52,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x33,0x57,0x48,0x49,0x54,0x45,0x53,0x4F,0x4C,0x44,0x49 -,0x45,0x52,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x33 -,0x57,0x68,0x69,0x74,0x65,0x53,0x6F,0x6C,0x64,0x69,0x65,0x72,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x68,0x72,0x65,0x65,0x20,0x41,0x64,0x76,0x61 -,0x6E,0x63,0x69,0x6E,0x67,0x20,0x57,0x68,0x69,0x74,0x65,0x20,0x53,0x6F,0x6C,0x64,0x69,0x65,0x72,0x73 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 -,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x43,0x44,0x4C,0x41,0x42,0x41,0x4E,0x44,0x4F,0x4E,0x45,0x44,0x42,0x41,0x42,0x59,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44 -,0x4C,0x41,0x42,0x41,0x4E,0x44,0x4F,0x4E,0x45,0x44,0x42,0x41,0x42,0x59,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x41,0x62,0x61,0x6E,0x64,0x6F,0x6E,0x65,0x64,0x42 -,0x61,0x62,0x79,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x41,0x62,0x61,0x6E,0x64,0x6F,0x6E,0x65,0x64,0x20,0x42,0x61,0x62,0x79,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 -,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 -,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50 -,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72 -,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69 -,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 -,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73 -,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30 -,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30 -,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x41,0x44,0x56,0x41,0x4E,0x43,0x45,0x42,0x4C,0x4F,0x43,0x4B -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x43,0x44,0x4C,0x41,0x44,0x56,0x41,0x4E,0x43,0x45,0x42,0x4C,0x4F,0x43,0x4B,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x41,0x64,0x76,0x61,0x6E,0x63,0x65 -,0x42,0x6C,0x6F,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x41,0x64,0x76,0x61,0x6E,0x63,0x65,0x20,0x42,0x6C,0x6F,0x63,0x6B,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E -,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C -,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x42,0x45 -,0x4C,0x54,0x48,0x4F,0x4C,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x42,0x45,0x4C,0x54,0x48,0x4F,0x4C,0x44,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x42,0x65,0x6C,0x74,0x48 -,0x6F,0x6C,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x42,0x65,0x6C,0x74,0x2D,0x68,0x6F,0x6C,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C -,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x42,0x52,0x45,0x41,0x4B,0x41,0x57,0x41 -,0x59,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x42,0x52,0x45,0x41,0x4B,0x41,0x57,0x41,0x59,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x42,0x72,0x65,0x61,0x6B,0x61,0x77,0x61,0x79 -,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x42,0x72,0x65 -,0x61,0x6B,0x61,0x77,0x61,0x79,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74 -,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x43,0x4C,0x4F,0x53,0x49,0x4E,0x47,0x4D,0x41,0x52,0x55 -,0x42,0x4F,0x5A,0x55,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x43,0x4C,0x4F,0x53,0x49,0x4E,0x47,0x4D,0x41,0x52,0x55 -,0x42,0x4F,0x5A,0x55,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x43,0x6C,0x6F,0x73,0x69,0x6E,0x67,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x6C,0x6F,0x73,0x69,0x6E,0x67,0x20 -,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50 -,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F -,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x43,0x4F,0x4E,0x43,0x45,0x41,0x4C,0x42,0x41 -,0x42,0x59,0x53,0x57,0x41,0x4C,0x4C,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x43,0x4F,0x4E,0x43,0x45,0x41,0x4C,0x42 -,0x41,0x42,0x59,0x53,0x57,0x41,0x4C,0x4C,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x64,0x6C,0x43,0x6F,0x6E,0x63,0x65,0x61,0x6C,0x42,0x61,0x62,0x79,0x73,0x57,0x61,0x6C,0x6C -,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x6F,0x6E -,0x63,0x65,0x61,0x6C,0x69,0x6E,0x67,0x20,0x42,0x61,0x62,0x79,0x20,0x53,0x77,0x61,0x6C,0x6C,0x6F,0x77 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 -,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x43,0x44,0x4C,0x43,0x4F,0x55,0x4E,0x54,0x45,0x52,0x41,0x54,0x54,0x41,0x43,0x4B,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44 -,0x4C,0x43,0x4F,0x55,0x4E,0x54,0x45,0x52,0x41,0x54,0x54,0x41,0x43,0x4B,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x43,0x6F,0x75,0x6E,0x74,0x65,0x72,0x41,0x74,0x74 -,0x61,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x43,0x6F,0x75,0x6E,0x74,0x65,0x72,0x61,0x74,0x74,0x61,0x63,0x6B,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 -,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x44,0x41,0x52,0x4B -,0x43,0x4C,0x4F,0x55,0x44,0x43,0x4F,0x56,0x45,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x41,0x52,0x4B,0x43 -,0x4C,0x4F,0x55,0x44,0x43,0x4F,0x56,0x45,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x43,0x64,0x6C,0x44,0x61,0x72,0x6B,0x43,0x6C,0x6F,0x75,0x64,0x43,0x6F,0x76,0x65,0x72,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x61,0x72,0x6B -,0x20,0x43,0x6C,0x6F,0x75,0x64,0x20,0x43,0x6F,0x76,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 -,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E -,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65 -,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74 -,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68 -,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F -,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x35,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x44,0x6F,0x6A,0x69,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x6F,0x6A,0x69 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 -,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x4F,0x4A,0x49 -,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x44,0x6F,0x6A,0x69,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x6F,0x6A,0x69,0x20,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 -,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 -,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x44,0x52,0x41 -,0x47,0x4F,0x4E,0x46,0x4C,0x59,0x44,0x4F,0x4A,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x44,0x52,0x41,0x47,0x4F -,0x4E,0x46,0x4C,0x59,0x44,0x4F,0x4A,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x64,0x6C,0x44,0x72,0x61,0x67,0x6F,0x6E,0x66,0x6C,0x79,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x72,0x61,0x67,0x6F,0x6E -,0x66,0x6C,0x79,0x20,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50 -,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F -,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x45,0x4E,0x47,0x55,0x4C,0x46,0x49,0x4E,0x47 -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x43,0x44,0x4C,0x45,0x4E,0x47,0x55,0x4C,0x46,0x49,0x4E,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x45,0x6E,0x67,0x75,0x6C,0x66,0x69,0x6E,0x67,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x45,0x6E,0x67,0x75 -,0x6C,0x66,0x69,0x6E,0x67,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 -,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E -,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E -,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x45,0x76,0x65,0x6E,0x69,0x6E,0x67,0x44,0x6F,0x6A,0x69,0x53,0x74 -,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x45 -,0x76,0x65,0x6E,0x69,0x6E,0x67,0x20,0x44,0x6F,0x6A,0x69,0x20,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67 -,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64 -,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x50,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65 -,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20 -,0x77,0x69,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C -,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 -,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C -,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63 -,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 -,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E,0x49,0x4E,0x47,0x53,0x54,0x41 -,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x45,0x56,0x45,0x4E,0x49,0x4E,0x47,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x45,0x76,0x65,0x6E,0x69,0x6E,0x67 -,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x45,0x76,0x65,0x6E,0x69,0x6E,0x67,0x20,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 -,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65 -,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50 -,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61 -,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74 -,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C -,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69 -,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x47,0x41,0x50,0x53,0x49,0x44,0x45,0x53,0x49,0x44,0x45,0x57,0x48 -,0x49,0x54,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x47,0x41,0x50,0x53,0x49,0x44,0x45,0x53,0x49,0x44,0x45,0x57 -,0x48,0x49,0x54,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x47,0x61,0x70,0x53,0x69,0x64,0x65,0x53,0x69,0x64,0x65,0x57,0x68,0x69,0x74,0x65,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x70,0x2F,0x44,0x6F,0x77,0x6E -,0x2D,0x67,0x61,0x70,0x20,0x73,0x69,0x64,0x65,0x2D,0x62,0x79,0x2D,0x73,0x69,0x64,0x65,0x20,0x77,0x68 -,0x69,0x74,0x65,0x20,0x6C,0x69,0x6E,0x65,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C -,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x47,0x52,0x41,0x56,0x45,0x53,0x54,0x4F -,0x4E,0x45,0x44,0x4F,0x4A,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x47,0x52,0x41,0x56,0x45,0x53,0x54,0x4F,0x4E -,0x45,0x44,0x4F,0x4A,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x47,0x72,0x61,0x76,0x65,0x73,0x74,0x6F,0x6E,0x65,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x47,0x72,0x61,0x76,0x65,0x73,0x74,0x6F -,0x6E,0x65,0x20,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 -,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x4D,0x4D,0x45,0x52,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44 -,0x4C,0x48,0x41,0x4D,0x4D,0x45,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x43,0x64,0x6C,0x48,0x61,0x6D,0x6D,0x65,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x61,0x6D,0x6D,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 -,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x4E,0x47,0x49 -,0x4E,0x47,0x4D,0x41,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x41,0x4E,0x47,0x49,0x4E,0x47,0x4D,0x41,0x4E -,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x48,0x61,0x6E,0x67 -,0x69,0x6E,0x67,0x4D,0x61,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x48,0x61,0x6E,0x67,0x69,0x6E,0x67,0x20,0x4D,0x61,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 -,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 -,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x52 -,0x41,0x4D,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x41,0x52,0x41,0x4D,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x48,0x61,0x72,0x61,0x6D,0x69,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x61,0x72,0x61,0x6D,0x69,0x20 -,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 -,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x41,0x52,0x41,0x4D,0x49,0x43,0x52,0x4F,0x53 -,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x41,0x52,0x41,0x4D,0x49,0x43,0x52,0x4F,0x53,0x53,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x48,0x61,0x72,0x61,0x6D,0x69,0x43 -,0x72,0x6F,0x73,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x48,0x61,0x72,0x61,0x6D,0x69,0x20,0x43,0x72,0x6F,0x73,0x73,0x20,0x50,0x61,0x74,0x74,0x65,0x72 -,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 -,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x43,0x44,0x4C,0x48,0x49,0x47,0x48,0x57,0x41,0x56,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x49,0x47 -,0x48,0x57,0x41,0x56,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x48,0x69,0x67,0x6E,0x57,0x61,0x76,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x67,0x68,0x2D,0x57,0x61,0x76,0x65,0x20,0x43,0x61,0x6E,0x64 -,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E -,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70 -,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67 -,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D -,0x2D,0x20,0x43,0x44,0x4C,0x48,0x49,0x4B,0x4B,0x41,0x4B,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x49,0x4B -,0x4B,0x41,0x4B,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x48,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65 -,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43 -,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43 -,0x44,0x4C,0x48,0x49,0x4B,0x4B,0x41,0x4B,0x45,0x4D,0x4F,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x49,0x4B -,0x4B,0x41,0x4B,0x45,0x4D,0x4F,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x43,0x64,0x6C,0x48,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x4D,0x6F,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x64,0x69,0x66,0x69,0x65,0x64,0x20,0x48 -,0x69,0x6B,0x6B,0x61,0x6B,0x65,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 -,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 -,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x48,0x4F,0x4D -,0x49,0x4E,0x47,0x50,0x49,0x47,0x45,0x4F,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x48,0x4F,0x4D,0x49,0x4E,0x47 -,0x50,0x49,0x47,0x45,0x4F,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43 -,0x64,0x6C,0x48,0x6F,0x6D,0x69,0x6E,0x67,0x50,0x69,0x67,0x65,0x6F,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x6F,0x6D,0x69,0x6E,0x67,0x20,0x50,0x69 -,0x67,0x65,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65 -,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70 -,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67 -,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x49,0x44,0x45,0x4E,0x54,0x49,0x43,0x41,0x4C,0x33,0x43,0x52,0x4F -,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x49,0x44,0x45,0x4E,0x54,0x49,0x43,0x41,0x4C,0x33,0x43,0x52,0x4F -,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x49,0x64 -,0x65,0x6E,0x74,0x69,0x63,0x61,0x6C,0x33,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x64,0x65,0x6E,0x74,0x69,0x63,0x61,0x6C,0x20 -,0x54,0x68,0x72,0x65,0x65,0x20,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F -,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69 -,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x49,0x4E,0x4E,0x45,0x43,0x4B -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x43,0x44,0x4C,0x49,0x4E,0x4E,0x45,0x43,0x4B,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x49,0x6E,0x4E,0x65,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x2D,0x4E,0x65,0x63,0x6B,0x20,0x50,0x61 -,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74 -,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F -,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F -,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x49,0x4E,0x56,0x45,0x52,0x54,0x45,0x44,0x48,0x41,0x4D,0x4D -,0x45,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x49,0x4E,0x56,0x45,0x52,0x54,0x45,0x44,0x48,0x41,0x4D,0x4D,0x45 -,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x49,0x6E,0x76 -,0x65,0x72,0x74,0x65,0x64,0x48,0x61,0x6D,0x6D,0x65,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x76,0x65,0x72,0x74,0x65,0x64,0x20,0x48,0x61,0x6D -,0x6D,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72 -,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F -,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4B,0x49,0x43,0x4B,0x49,0x4E,0x47,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4B,0x49 -,0x43,0x4B,0x49,0x4E,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x4B,0x69,0x63,0x6B,0x69,0x6E,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4B,0x69,0x63,0x6B,0x69,0x6E,0x67,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 -,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4B,0x49,0x43,0x4B,0x49 -,0x4E,0x47,0x42,0x59,0x4C,0x45,0x4E,0x47,0x54,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4B,0x49,0x43,0x4B,0x49 -,0x4E,0x47,0x42,0x59,0x4C,0x45,0x4E,0x47,0x54,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4B,0x69,0x63,0x6B,0x69,0x6E,0x67,0x42,0x79,0x4C,0x65,0x6E,0x67,0x74 -,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4B,0x69 -,0x63,0x6B,0x69,0x6E,0x67,0x20,0x2D,0x20,0x62,0x75,0x6C,0x6C,0x2F,0x62,0x65,0x61,0x72,0x20,0x64,0x65 -,0x74,0x65,0x72,0x6D,0x69,0x6E,0x65,0x64,0x20,0x62,0x79,0x20,0x74,0x68,0x65,0x20,0x6C,0x6F,0x6E,0x67 -,0x65,0x72,0x20,0x6D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F -,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69 -,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4C,0x41,0x44,0x44,0x45,0x52 -,0x42,0x4F,0x54,0x54,0x4F,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4C,0x41,0x44,0x44,0x45,0x52,0x42,0x4F,0x54 -,0x54,0x4F,0x4D,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4C -,0x61,0x64,0x64,0x65,0x72,0x42,0x6F,0x74,0x74,0x6F,0x6D,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x61,0x64,0x64,0x65,0x72,0x20,0x42,0x6F,0x74,0x74,0x6F -,0x6D,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 -,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47,0x4C,0x45,0x47,0x47,0x45,0x44,0x44,0x4F,0x4A,0x49,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47,0x4C,0x45,0x47,0x47,0x45,0x44,0x44,0x4F,0x4A,0x49,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4C,0x6F,0x6E,0x67,0x4C,0x65,0x67 -,0x67,0x65,0x64,0x44,0x6F,0x6A,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x6E,0x67,0x20,0x4C,0x65,0x67,0x67,0x65,0x64,0x20,0x44,0x6F,0x6A,0x69 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 -,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47,0x4C,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4C,0x4F,0x4E,0x47 -,0x4C,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x4C,0x6F,0x6E,0x67,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x6E,0x67,0x20,0x4C,0x69,0x6E,0x65,0x20,0x43,0x61,0x6E,0x64,0x6C -,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 -,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x43,0x44,0x4C,0x4D,0x41,0x52,0x55,0x42,0x4F,0x5A,0x55,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x41,0x52 -,0x55,0x42,0x4F,0x5A,0x55,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x61,0x72,0x75,0x62,0x6F,0x7A,0x75,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 -,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 -,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4D,0x41,0x54 -,0x43,0x48,0x49,0x4E,0x47,0x4C,0x4F,0x57,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x41,0x54,0x43,0x48,0x49,0x4E -,0x47,0x4C,0x4F,0x57,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x4D,0x61,0x74,0x63,0x68,0x69,0x6E,0x67,0x4C,0x6F,0x77,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x61,0x74,0x63,0x68,0x69,0x6E,0x67,0x20,0x4C,0x6F,0x77 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52 -,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x43,0x44,0x4C,0x4D,0x41,0x54,0x48,0x4F,0x4C,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x41,0x54,0x48,0x4F -,0x4C,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4D,0x61 -,0x74,0x48,0x6F,0x6C,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x4D,0x61,0x74,0x20,0x48,0x6F,0x6C,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63 -,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E,0x65,0x74 -,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63 -,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F -,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68,0x69,0x6E -,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E -,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30 -,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30 -,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35 -,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x43,0x44,0x4C,0x4D,0x4F,0x52,0x4E,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x43,0x44,0x4C,0x4D,0x4F,0x52,0x4E,0x49,0x4E,0x47,0x44,0x4F,0x4A,0x49,0x53,0x54,0x41,0x52,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4D,0x6F,0x72,0x6E,0x69 -,0x6E,0x67,0x44,0x6F,0x6A,0x69,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x72,0x6E,0x69,0x6E,0x67,0x20,0x44,0x6F,0x6A,0x69,0x20 -,0x53,0x74,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65 -,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70 -,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67 -,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65 -,0x20,0x6F,0x66,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61 -,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68 -,0x65,0x72,0x20,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30 -,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30 -,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65 -,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30 -,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4D,0x4F -,0x52,0x4E,0x49,0x4E,0x47,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4D,0x4F,0x52,0x4E,0x49,0x4E -,0x47,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x4D,0x6F,0x72,0x6E,0x69,0x6E,0x67,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x72,0x6E,0x69,0x6E,0x67,0x20,0x53,0x74,0x61 -,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20 -,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65 -,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x6F,0x66 -,0x20,0x70,0x65,0x6E,0x65,0x74,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x6F,0x66,0x20,0x61,0x20,0x63,0x61 -,0x6E,0x64,0x6C,0x65,0x20,0x77,0x69,0x74,0x68,0x69,0x6E,0x20,0x61,0x6E,0x6F,0x74,0x68,0x65,0x72,0x20 -,0x63,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 -,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x30,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x4F,0x4E,0x4E,0x45,0x43 -,0x4B,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x4F,0x4E,0x4E,0x45,0x43,0x4B,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x4F,0x6E,0x4E,0x65,0x63,0x6B,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4F,0x6E,0x2D,0x4E,0x65,0x63,0x6B,0x20,0x50 -,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74 -,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x50,0x49,0x45,0x52,0x43,0x49,0x4E,0x47,0x20,0x2D,0x2D -,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43 -,0x44,0x4C,0x50,0x49,0x45,0x52,0x43,0x49,0x4E,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x50,0x69,0x65,0x72,0x63,0x69,0x6E,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x69,0x65,0x72,0x63,0x69,0x6E,0x67,0x20 -,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 -,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x52,0x49,0x43,0x4B,0x53,0x48,0x41,0x57,0x4D,0x41 -,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x52,0x49,0x43,0x4B,0x53,0x48,0x41,0x57,0x4D,0x41,0x4E,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x52,0x69,0x63,0x6B,0x73,0x68,0x61 -,0x77,0x4D,0x61,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x52,0x69,0x63,0x6B,0x73,0x68,0x61,0x77,0x20,0x4D,0x61,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 -,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x52,0x49,0x53,0x45 -,0x46,0x41,0x4C,0x4C,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x52,0x49,0x53 -,0x45,0x46,0x41,0x4C,0x4C,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x52,0x69,0x73,0x65,0x46,0x61,0x6C,0x6C,0x33,0x4D,0x65 -,0x74,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x52,0x69,0x73,0x69,0x6E,0x67,0x2F,0x46,0x61,0x6C,0x6C,0x69,0x6E,0x67,0x20,0x54,0x68,0x72 -,0x65,0x65,0x20,0x4D,0x65,0x74,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63 -,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x45,0x50,0x41,0x52,0x41,0x54 -,0x49,0x4E,0x47,0x4C,0x49,0x4E,0x45,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x45,0x50,0x41,0x52,0x41,0x54 -,0x49,0x4E,0x47,0x4C,0x49,0x4E,0x45,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x64,0x6C,0x53,0x65,0x70,0x65,0x72,0x61,0x74,0x69,0x6E,0x67,0x4C,0x69,0x6E,0x65,0x73,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x65,0x70,0x61 -,0x72,0x61,0x74,0x69,0x6E,0x67,0x20,0x4C,0x69,0x6E,0x65,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 -,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x48,0x4F,0x4F,0x54 -,0x49,0x4E,0x47,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x48,0x4F,0x4F,0x54,0x49,0x4E,0x47 -,0x53,0x54,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x53,0x68,0x6F,0x6F,0x74,0x69,0x6E,0x67,0x53,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x68,0x6F,0x6F,0x74,0x69,0x6E,0x67,0x20,0x53,0x74 -,0x61,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E -,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70 -,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67 -,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D -,0x2D,0x20,0x43,0x44,0x4C,0x53,0x48,0x4F,0x52,0x54,0x4C,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09 -,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53 -,0x48,0x4F,0x52,0x54,0x4C,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x64,0x6C,0x53,0x68,0x6F,0x72,0x74,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x68,0x6F,0x72,0x74,0x20,0x4C,0x69,0x6E,0x65 -,0x20,0x43,0x61,0x6E,0x64,0x6C,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61 -,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73 -,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43 -,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x50,0x49,0x4E,0x4E,0x49,0x4E,0x47,0x54,0x4F -,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x50,0x49,0x4E,0x4E,0x49,0x4E,0x47,0x54,0x4F,0x50,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x53,0x70,0x69,0x6E,0x6E,0x69,0x6E -,0x67,0x54,0x6F,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x53,0x70,0x69,0x6E,0x6E,0x69,0x6E,0x67,0x20,0x54,0x6F,0x70,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 -,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x54,0x41,0x4C -,0x4C,0x45,0x44,0x50,0x41,0x54,0x54,0x45,0x52,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x54,0x41,0x4C,0x4C -,0x45,0x44,0x50,0x41,0x54,0x54,0x45,0x52,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x43,0x64,0x6C,0x53,0x74,0x61,0x6C,0x6C,0x65,0x64,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x61,0x6C -,0x6C,0x65,0x64,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F -,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69 -,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x53,0x54,0x49,0x43,0x4B,0x53 -,0x41,0x4E,0x44,0x57,0x49,0x43,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x53,0x54,0x49,0x43,0x4B,0x53,0x41,0x4E -,0x44,0x57,0x49,0x43,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x53,0x74,0x69,0x63,0x6B,0x53,0x61,0x6E,0x64,0x77,0x69,0x63,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x69,0x63,0x6B,0x20,0x53,0x61,0x6E -,0x64,0x77,0x69,0x63,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74 -,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F -,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F -,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x54,0x41,0x4B,0x55,0x52,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09 -,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54 -,0x41,0x4B,0x55,0x52,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64 -,0x6C,0x54,0x61,0x6B,0x75,0x72,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x54,0x61,0x6B,0x75,0x72,0x69,0x20,0x28,0x44,0x72,0x61,0x67,0x6F,0x6E,0x66,0x6C -,0x79,0x20,0x44,0x6F,0x6A,0x69,0x20,0x77,0x69,0x74,0x68,0x20,0x76,0x65,0x72,0x79,0x20,0x6C,0x6F,0x6E -,0x67,0x20,0x6C,0x6F,0x77,0x65,0x72,0x20,0x73,0x68,0x61,0x64,0x6F,0x77,0x29,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E -,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C -,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x54,0x41 -,0x53,0x55,0x4B,0x49,0x47,0x41,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54,0x41,0x53,0x55,0x4B,0x49,0x47,0x41 -,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x54,0x61,0x73 -,0x75,0x6B,0x69,0x47,0x61,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x54,0x61,0x73,0x75,0x6B,0x69,0x20,0x47,0x61,0x70,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73 -,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x54,0x48,0x52,0x55 -,0x53,0x54,0x49,0x4E,0x47,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54,0x48,0x52,0x55,0x53,0x54,0x49,0x4E,0x47,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x54,0x68,0x72,0x75,0x73 -,0x74,0x69,0x6E,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x54,0x68,0x72,0x75,0x73,0x74,0x69,0x6E,0x67,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63 -,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61 -,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44 -,0x4C,0x54,0x52,0x49,0x53,0x54,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x54,0x52,0x49,0x53,0x54,0x41,0x52 -,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x54,0x72,0x69,0x73 -,0x74,0x61,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x54,0x72,0x69,0x73,0x74,0x61,0x72,0x20,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E -,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C -,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x55,0x4E -,0x49,0x51,0x55,0x45,0x33,0x52,0x49,0x56,0x45,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x55,0x4E,0x49,0x51,0x55 -,0x45,0x33,0x52,0x49,0x56,0x45,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x43,0x64,0x6C,0x55,0x6E,0x69,0x71,0x75,0x65,0x33,0x52,0x69,0x76,0x65,0x72,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x6E,0x69,0x71,0x75,0x65,0x20,0x33 -,0x20,0x52,0x69,0x76,0x65,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74 -,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F -,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C -,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x55,0x50,0x53,0x49,0x44,0x45,0x47,0x41,0x50,0x32,0x43 -,0x52,0x4F,0x57,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x55,0x50,0x53,0x49,0x44,0x45,0x47,0x41,0x50,0x32,0x43 -,0x52,0x4F,0x57,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C -,0x55,0x70,0x73,0x69,0x64,0x65,0x47,0x61,0x70,0x32,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x70,0x73,0x69,0x64,0x65,0x20,0x47 -,0x61,0x70,0x20,0x54,0x77,0x6F,0x20,0x43,0x72,0x6F,0x77,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65,0x73,0x74 -,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x44,0x4C,0x58,0x53,0x49,0x44,0x45 -,0x47,0x41,0x50,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x44,0x4C,0x58,0x53,0x49,0x44 -,0x45,0x47,0x41,0x50,0x33,0x4D,0x45,0x54,0x48,0x4F,0x44,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x64,0x6C,0x58,0x53,0x69,0x64,0x65,0x47,0x61,0x70,0x33,0x4D,0x65,0x74 -,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x55,0x70,0x73,0x69,0x64,0x65,0x2F,0x44,0x6F,0x77,0x6E,0x73,0x69,0x64,0x65,0x20,0x47,0x61,0x70 -,0x20,0x54,0x68,0x72,0x65,0x65,0x20,0x4D,0x65,0x74,0x68,0x6F,0x64,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x50,0x61,0x74,0x74,0x65,0x72,0x6E,0x20,0x52,0x65,0x63,0x6F,0x67,0x6E,0x69 -,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x43,0x61,0x6E,0x64,0x6C,0x65 -,0x73,0x74,0x69,0x63,0x6B,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49 -,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x45,0x49,0x4C,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x43,0x45,0x49,0x4C,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x65,0x69 -,0x6C,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65 -,0x63,0x74,0x6F,0x72,0x20,0x43,0x65,0x69,0x6C,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x43,0x4D,0x4F,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4D,0x4F,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6D,0x6F,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x68,0x61,0x6E,0x64,0x65,0x20,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D -,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72 -,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 -,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x43,0x4F,0x52,0x52,0x45,0x4C,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4F,0x52,0x52,0x45,0x4C,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6F,0x72,0x72,0x65,0x6C,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x61,0x72,0x73,0x6F,0x6E -,0x26,0x61,0x70,0x6F,0x73,0x3B,0x73,0x20,0x43,0x6F,0x72,0x72,0x65,0x6C,0x61,0x74,0x69,0x6F,0x6E,0x20 -,0x43,0x6F,0x65,0x66,0x66,0x69,0x63,0x69,0x65,0x6E,0x74,0x20,0x28,0x72,0x29,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 -,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x4F,0x53,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4F,0x53,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6F,0x73,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F -,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x43,0x6F,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09 -,0x3C,0x21,0x2D,0x2D,0x20,0x43,0x4F,0x53,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x43,0x4F,0x53,0x48,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6F,0x73,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67 -,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x43,0x6F,0x73,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C -,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x44,0x45,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x45,0x4D,0x41,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x6D,0x61,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x45,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 -,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65 -,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D -,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x44,0x49,0x56,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x49,0x56,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x69,0x76,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D -,0x65,0x74,0x69,0x63,0x20,0x44,0x69,0x76,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D -,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E -,0x52,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x44,0x58,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x58 -,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x78,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E -,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E -,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x45,0x4D -,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x45,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x45 -,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x45 -,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76 -,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72 -,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x45,0x58,0x50 -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x45,0x58,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x45,0x78 -,0x70,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65 -,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D,0x65,0x74,0x69,0x63,0x20,0x45,0x78,0x70,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73 -,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x46,0x4C,0x4F,0x4F,0x52,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x46,0x4C,0x4F,0x4F,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x46 -,0x6C,0x6F,0x6F,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x46,0x6C,0x6F,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x44,0x43,0x50,0x45,0x52,0x49,0x4F,0x44,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x48,0x54,0x5F,0x44,0x43,0x50,0x45,0x52,0x49,0x4F,0x44,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x44,0x63,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20 -,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x44,0x6F,0x6D,0x69,0x6E,0x61,0x6E,0x74 -,0x20,0x43,0x79,0x63,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E -,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x44,0x43,0x50,0x48,0x41,0x53,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54,0x5F,0x44,0x43 -,0x50,0x48,0x41,0x53,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74 -,0x44,0x63,0x50,0x68,0x61,0x73,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72 -,0x6D,0x20,0x2D,0x20,0x44,0x6F,0x6D,0x69,0x6E,0x61,0x6E,0x74,0x20,0x43,0x79,0x63,0x6C,0x65,0x20,0x50 -,0x68,0x61,0x73,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65 -,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x50,0x48,0x41 -,0x53,0x4F,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54,0x5F,0x50,0x48,0x41,0x53,0x4F,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x50,0x68,0x61,0x73,0x6F,0x72,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20 -,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x50,0x68,0x61,0x73,0x6F,0x72,0x20,0x43 -,0x6F,0x6D,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x50,0x68,0x61,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x51,0x75,0x61,0x64,0x72,0x61 -,0x74,0x75,0x72,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65 -,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48 -,0x54,0x5F,0x53,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54,0x5F,0x53,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x53,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20,0x54 -,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x53,0x69,0x6E,0x65,0x57,0x61,0x76,0x65,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69 -,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74 -,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x53,0x69,0x6E -,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x4C,0x65,0x61,0x64,0x53,0x69,0x6E,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4C,0x49,0x4E,0x45,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x54 -,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4C,0x49,0x4E,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x48,0x74,0x54,0x72,0x65,0x6E,0x64,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72,0x74,0x20,0x54 -,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x49,0x6E,0x73,0x74,0x61,0x6E,0x74,0x61,0x6E -,0x65,0x6F,0x75,0x73,0x20,0x54,0x72,0x65,0x6E,0x64,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73 -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62 -,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x48,0x54,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4D,0x4F,0x44,0x45,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x48,0x54,0x5F,0x54,0x52,0x45,0x4E,0x44,0x4D,0x4F,0x44,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x74,0x54,0x72,0x65,0x6E,0x64,0x4D,0x6F,0x64,0x65,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x6C,0x62,0x65,0x72 -,0x74,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x20,0x2D,0x20,0x54,0x72,0x65,0x6E,0x64,0x20 -,0x76,0x73,0x20,0x43,0x79,0x63,0x6C,0x65,0x20,0x4D,0x6F,0x64,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x43,0x79,0x63,0x6C,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E -,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x49,0x4D,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x4D,0x49,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x49,0x6D,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x74,0x72,0x61,0x64,0x61,0x79,0x20,0x4D,0x6F,0x6D -,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72 -,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x70,0x65,0x6E,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4B,0x41,0x4D,0x41,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x4B,0x41,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4B,0x61,0x6D -,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4B,0x61 -,0x75,0x66,0x6D,0x61,0x6E,0x20,0x41,0x64,0x61,0x70,0x74,0x69,0x76,0x65,0x20,0x4D,0x6F,0x76,0x69,0x6E -,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69 -,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F -,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 -,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45 -,0x47,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72 -,0x52,0x65,0x67,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x4C,0x69,0x6E,0x65,0x61,0x72,0x20,0x52,0x65,0x67,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65 -,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69 -,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F -,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 -,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x41,0x4E,0x47,0x4C,0x45,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x49 -,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x41,0x4E,0x47,0x4C,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x52,0x65,0x67,0x41,0x6E,0x67,0x6C,0x65 -,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x69,0x6E -,0x65,0x61,0x72,0x20,0x52,0x65,0x67,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x20,0x41,0x6E,0x67,0x6C,0x65 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63 -,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20 -,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 -,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C -,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x49,0x4E,0x54,0x45,0x52,0x43,0x45,0x50,0x54,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x4C,0x49,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x49,0x4E,0x54,0x45,0x52,0x43,0x45,0x50,0x54,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x52,0x65 -,0x67,0x49,0x6E,0x74,0x65,0x72,0x63,0x65,0x70,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x20,0x52,0x65,0x67,0x72,0x65,0x73 -,0x73,0x69,0x6F,0x6E,0x20,0x49,0x6E,0x74,0x65,0x72,0x63,0x65,0x70,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 -,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C,0x49 -,0x4E,0x45,0x41,0x52,0x52,0x45,0x47,0x5F,0x53,0x4C,0x4F,0x50,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x49,0x4E,0x45,0x41 -,0x52,0x52,0x45,0x47,0x5F,0x53,0x4C,0x4F,0x50,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72,0x52,0x65,0x67,0x53,0x6C,0x6F,0x70,0x65,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x69,0x6E,0x65,0x61,0x72 -,0x20,0x52,0x65,0x67,0x72,0x65,0x73,0x73,0x69,0x6F,0x6E,0x20,0x53,0x6C,0x6F,0x70,0x65,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72 -,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C -,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C,0x4E,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x4C,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6E,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72 -,0x20,0x4C,0x6F,0x67,0x20,0x4E,0x61,0x74,0x75,0x72,0x61,0x6C,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4C,0x4F,0x47,0x31,0x30,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x4F,0x47,0x31,0x30,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x67,0x31,0x30,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72 -,0x20,0x4C,0x6F,0x67,0x31,0x30,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74 -,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65 -,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x61,0x76,0x65 -,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C -,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65 -,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x41 -,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20 -,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x43,0x44,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x43,0x44,0x3C,0x2F -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x63,0x64,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 -,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x43,0x6F,0x6E,0x76,0x65,0x72,0x67,0x65,0x6E,0x63,0x65,0x2F,0x44 -,0x69,0x76,0x65,0x72,0x67,0x65,0x6E,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C -,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61 -,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20 -,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x32,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C -,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20 -,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x36,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x69 -,0x67,0x6E,0x61,0x6C,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73 -,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C,0x69,0x6E,0x65,0x20,0x28,0x6E,0x62,0x20,0x6F,0x66,0x20,0x70,0x65 -,0x72,0x69,0x6F,0x64,0x29,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x39,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x53,0x69,0x67,0x6E,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x48,0x69,0x73,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x48,0x69,0x73,0x74,0x6F,0x67,0x72,0x61,0x6D,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x43,0x44,0x45,0x58,0x54,0x20,0x2D,0x2D,0x3E,0x0A,0x09 -,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x43,0x44 -,0x45,0x58,0x54,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x63,0x64 -,0x45,0x78,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x4D,0x41,0x43,0x44,0x20,0x77,0x69,0x74,0x68,0x20,0x63,0x6F,0x6E,0x74,0x72,0x6F,0x6C,0x6C,0x61,0x62 -,0x6C,0x65,0x20,0x4D,0x41,0x20,0x74,0x79,0x70,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C -,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46 -,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72 -,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x32,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46 -,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65 -,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66 -,0x6F,0x72,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 -,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65 -,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 -,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x36,0x3C,0x2F,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20 -,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20 -,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x73 -,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54 -,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x69,0x67,0x6E,0x61,0x6C,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68 -,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C -,0x69,0x6E,0x65,0x20,0x28,0x6E,0x62,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x29,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x39,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x53,0x69,0x67,0x6E,0x61,0x6C,0x20,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76 -,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x73,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C,0x69,0x6E -,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x4D,0x41,0x43,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x6F,0x75,0x74,0x4D,0x41,0x43,0x44,0x53,0x69,0x67,0x6E,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x4D,0x41,0x43,0x44,0x48,0x69,0x73,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x48,0x69,0x73,0x74,0x6F,0x67,0x72,0x61,0x6D,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E -,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D -,0x2D,0x20,0x4D,0x41,0x43,0x44,0x46,0x49,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x43,0x44,0x46,0x49,0x58,0x3C,0x2F -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x63,0x64,0x46,0x69,0x78,0x3C,0x2F -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E -,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x43,0x6F,0x6E,0x76,0x65,0x72,0x67,0x65,0x6E,0x63 -,0x65,0x2F,0x44,0x69,0x76,0x65,0x72,0x67,0x65,0x6E,0x63,0x65,0x20,0x46,0x69,0x78,0x20,0x31,0x32,0x2F -,0x32,0x36,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75 -,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x69,0x67,0x6E,0x61,0x6C,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68 -,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x69,0x67,0x6E,0x61,0x6C,0x20,0x6C -,0x69,0x6E,0x65,0x20,0x28,0x6E,0x62,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x29,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x39,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x41 -,0x43,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x4D,0x41,0x43,0x44,0x53,0x69,0x67,0x6E,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D -,0x41,0x43,0x44,0x48,0x69,0x73,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x48,0x69 -,0x73,0x74,0x6F,0x67,0x72,0x61,0x6D,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x4D,0x41,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x4D,0x61,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x4D,0x45,0x53,0x41,0x20,0x41,0x64,0x61,0x70,0x74,0x69,0x76,0x65,0x20,0x4D,0x6F -,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65 -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x20,0x4C -,0x69,0x6D,0x69,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x55,0x70,0x70,0x65,0x72,0x20 -,0x6C,0x69,0x6D,0x69,0x74,0x20,0x75,0x73,0x65,0x20,0x69,0x6E,0x20,0x74,0x68,0x65,0x20,0x61,0x64,0x61 -,0x70,0x74,0x69,0x76,0x65,0x20,0x61,0x6C,0x67,0x6F,0x72,0x69,0x74,0x68,0x6D,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x39,0x2E,0x39,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32 -,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x38,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20,0x4C,0x69,0x6D,0x69,0x74 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x77,0x65,0x72,0x20,0x6C,0x69,0x6D,0x69 -,0x74,0x20,0x75,0x73,0x65,0x20,0x69,0x6E,0x20,0x74,0x68,0x65,0x20,0x61,0x64,0x61,0x70,0x74,0x69,0x76 -,0x65,0x20,0x61,0x6C,0x67,0x6F,0x72,0x69,0x74,0x68,0x6D,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x39,0x2E,0x39 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50,0x72 -,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x36,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x4D,0x41,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x6F,0x75,0x74,0x46,0x41,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44 -,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x4D,0x41,0x56,0x50,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x41,0x56,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x56 -,0x61,0x72,0x69,0x61,0x62,0x6C,0x65,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x61,0x76,0x65 -,0x72,0x61,0x67,0x65,0x20,0x77,0x69,0x74,0x68,0x20,0x76,0x61,0x72,0x69,0x61,0x62,0x6C,0x65,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72 -,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x50,0x65,0x72,0x69,0x6F,0x64,0x73,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x20,0x50,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x61,0x6C,0x75,0x65,0x20,0x6C,0x65,0x73 -,0x73,0x20,0x74,0x68,0x61,0x6E,0x20,0x6D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x20,0x77,0x69,0x6C,0x6C,0x20 -,0x62,0x65,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x64,0x20,0x74,0x6F,0x20,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32 -,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x61 -,0x6C,0x75,0x65,0x20,0x68,0x69,0x67,0x68,0x65,0x72,0x20,0x74,0x68,0x61,0x6E,0x20,0x6D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x20,0x77,0x69,0x6C,0x6C,0x20,0x62,0x65,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x64,0x20 -,0x74,0x6F,0x20,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72 -,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x58,0x20,0x2D,0x2D -,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D -,0x41,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x61,0x78,0x3C,0x2F -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x48,0x69,0x67,0x68,0x65 -,0x73,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63 -,0x69,0x66,0x69,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x4D,0x61,0x78,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x64,0x65,0x78,0x20,0x6F,0x66,0x20,0x68,0x69,0x67,0x68 -,0x65,0x73,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65 -,0x63,0x69,0x66,0x69,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D -,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75 -,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30 -,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x45,0x44,0x50,0x52,0x49,0x43,0x45,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x4D,0x45,0x44,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x4D,0x65,0x64,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x65,0x64,0x69,0x61,0x6E,0x20,0x50,0x72,0x69,0x63,0x65,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65,0x20,0x54,0x72,0x61,0x6E -,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C -,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x46,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x46,0x49,0x3C,0x2F,0x41,0x62,0x62 -,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43 -,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x66,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x6F,0x6E,0x65,0x79,0x20,0x46,0x6C,0x6F,0x77,0x20,0x49 -,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E -,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x56 -,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D -,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75 -,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34 -,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x44,0x50,0x4F,0x49,0x4E,0x54,0x20,0x2D,0x2D,0x3E,0x0A -,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x44 -,0x50,0x4F,0x49,0x4E,0x54,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69 -,0x64,0x50,0x6F,0x69,0x6E,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x4D,0x69,0x64,0x50,0x6F,0x69,0x6E,0x74,0x20,0x6F,0x76,0x65,0x72,0x20,0x70,0x65,0x72 -,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61 -,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F -,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 -,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x4D,0x49,0x44,0x50,0x52,0x49,0x43,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69 -,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x44,0x50,0x52,0x49,0x43 -,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x64,0x50,0x72,0x69 -,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D -,0x69,0x64,0x70,0x6F,0x69,0x6E,0x74,0x20,0x50,0x72,0x69,0x63,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72 -,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x20,0x2D,0x2D,0x3E,0x0A -,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E -,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x77,0x65,0x73,0x74,0x20 -,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69 -,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 -,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33 -,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x49,0x4E,0x44,0x45,0x58,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49 -,0x4E,0x49,0x4E,0x44,0x45,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D -,0x69,0x6E,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x64,0x65,0x78,0x20,0x6F,0x66,0x20,0x6C,0x6F,0x77,0x65,0x73,0x74,0x20 -,0x76,0x61,0x6C,0x75,0x65,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69 -,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 -,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x4D,0x41,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E,0x4D,0x41 -,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x4D,0x61,0x78 -,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4C,0x6F,0x77 -,0x65,0x73,0x74,0x20,0x61,0x6E,0x64,0x20,0x68,0x69,0x67,0x68,0x65,0x73,0x74,0x20,0x76,0x61,0x6C,0x75 -,0x65,0x73,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63,0x69,0x66,0x69,0x65,0x64,0x20 -,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74 -,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62 -,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x69,0x6E,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x61,0x78,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x4D,0x49,0x4E,0x4D,0x41,0x58,0x49,0x4E,0x44,0x45,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x4D,0x61,0x78,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x49,0x6E,0x64,0x65,0x78,0x65,0x73,0x20 -,0x6F,0x66,0x20,0x6C,0x6F,0x77,0x65,0x73,0x74,0x20,0x61,0x6E,0x64,0x20,0x68,0x69,0x67,0x68,0x65,0x73 -,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x73,0x20,0x6F,0x76,0x65,0x72,0x20,0x61,0x20,0x73,0x70,0x65,0x63 -,0x69,0x66,0x69,0x65,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D -,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x4D,0x69,0x6E,0x49,0x64 -,0x78,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x4D,0x61,0x78,0x49,0x64,0x78,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C -,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49,0x4E,0x55 -,0x53,0x5F,0x44,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E,0x55,0x53,0x5F,0x44,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x44,0x49,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x20,0x44,0x69,0x72 -,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E -,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E -,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69 -,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x49 -,0x4E,0x55,0x53,0x5F,0x44,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x49,0x4E,0x55,0x53,0x5F,0x44,0x4D,0x3C,0x2F,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x44,0x4D,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x69,0x6E,0x75,0x73,0x20,0x44 -,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49 -,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55 -,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67 -,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48 -,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67 -,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x4F -,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x4D,0x4F,0x4D,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D -,0x6F,0x6D,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4D -,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F -,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D -,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4D,0x55,0x4C,0x54,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4D,0x55,0x4C,0x54,0x3C,0x2F,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4D,0x75,0x6C,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x41,0x72,0x69 -,0x74,0x68,0x6D,0x65,0x74,0x69,0x63,0x20,0x4D,0x75,0x6C,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20 -,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4E,0x41 -,0x54,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x4E,0x41,0x54,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x4E,0x61,0x74,0x72,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x4E,0x6F,0x72,0x6D,0x61,0x6C,0x69,0x7A,0x65,0x64,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65 -,0x20,0x54,0x72,0x75,0x65,0x20,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x56,0x6F,0x6C,0x61,0x74,0x69,0x6C,0x69,0x74,0x79,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74 -,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C -,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x4F,0x42,0x56,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x4F,0x42 -,0x56,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x62,0x76,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4F,0x6E,0x20,0x42,0x61,0x6C -,0x61,0x6E,0x63,0x65,0x20,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C -,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75,0x6D,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x50,0x4C,0x55,0x53,0x5F,0x44,0x49,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x50,0x4C,0x55,0x53,0x5F,0x44,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x50,0x6C,0x75,0x73,0x44,0x49,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x50,0x6C,0x75,0x73,0x20,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73 -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65 -,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x50,0x4C,0x55,0x53,0x5F,0x44,0x4D,0x20,0x2D,0x2D -,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x50 -,0x4C,0x55,0x53,0x5F,0x44,0x4D,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x50 -,0x6C,0x75,0x73,0x44,0x4D,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x50,0x6C,0x75,0x73,0x20,0x44,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x20,0x4D -,0x6F,0x76,0x65,0x6D,0x65,0x6E,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F -,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69 -,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D -,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x50,0x50,0x4F,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x50,0x4F,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x50,0x70,0x6F,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x61,0x67,0x65,0x20,0x50,0x72 -,0x69,0x63,0x65,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61 -,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64 -,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x66,0x61,0x73,0x74,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x31,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64 -,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x73,0x6C,0x6F,0x77,0x20,0x4D,0x41,0x3C,0x2F,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x32,0x36,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61 -,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x4F -,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x52,0x6F,0x63,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x61,0x74,0x65,0x20,0x6F -,0x66,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x20,0x3A,0x20,0x28,0x28,0x70,0x72,0x69,0x63,0x65,0x2F,0x70 -,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x29,0x2D,0x31,0x29,0x2A,0x31,0x30,0x30,0x3C,0x2F,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69 -,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69 -,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x50,0x20 -,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x52,0x4F,0x43,0x50,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x52,0x6F -,0x63,0x50,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52 -,0x61,0x74,0x65,0x20,0x6F,0x66,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x20,0x50,0x65,0x72,0x63,0x65,0x6E -,0x74,0x61,0x67,0x65,0x3A,0x20,0x28,0x70,0x72,0x69,0x63,0x65,0x2D,0x70,0x72,0x65,0x76,0x50,0x72,0x69 -,0x63,0x65,0x29,0x2F,0x70,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74 -,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x52,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x4F -,0x43,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x52,0x6F,0x63,0x52,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x61,0x74,0x65 -,0x20,0x6F,0x66,0x20,0x63,0x68,0x61,0x6E,0x67,0x65,0x20,0x72,0x61,0x74,0x69,0x6F,0x3A,0x20,0x28,0x70 -,0x72,0x69,0x63,0x65,0x2F,0x70,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x29,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63 -,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52,0x4F,0x43,0x52,0x31,0x30 -,0x30,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x52,0x4F,0x43,0x52,0x31,0x30,0x30,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x52,0x6F,0x63,0x52,0x31,0x30,0x30,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x52,0x61,0x74,0x65,0x20,0x6F,0x66,0x20,0x63,0x68,0x61,0x6E,0x67 -,0x65,0x20,0x72,0x61,0x74,0x69,0x6F,0x20,0x31,0x30,0x30,0x20,0x73,0x63,0x61,0x6C,0x65,0x3A,0x20,0x28 -,0x70,0x72,0x69,0x63,0x65,0x2F,0x70,0x72,0x65,0x76,0x50,0x72,0x69,0x63,0x65,0x29,0x2A,0x31,0x30,0x30 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20 -,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20 -,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 -,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x52 -,0x53,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x52,0x53,0x49,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x52,0x73,0x69,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x52,0x65,0x6C,0x61,0x74,0x69,0x76,0x65,0x20,0x53,0x74,0x72,0x65,0x6E,0x67,0x74,0x68,0x20,0x49,0x6E -,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74 -,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69 -,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x41,0x52,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x53,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x61,0x72,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x50,0x61,0x72,0x61 -,0x62,0x6F,0x6C,0x69,0x63,0x20,0x53,0x41,0x52,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67 -,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46 -,0x61,0x63,0x74,0x6F,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C -,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x75,0x73,0x65,0x64,0x20 -,0x75,0x70,0x20,0x74,0x6F,0x20,0x74,0x68,0x65,0x20,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x76,0x61 -,0x6C,0x75,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30 -,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33 -,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72 -,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 -,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41 -,0x46,0x20,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41 -,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x76,0x61,0x6C,0x75,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F -,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 -,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x34,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 -,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x41,0x52,0x45,0x58,0x54 -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x53,0x41,0x52,0x45,0x58,0x54,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x53,0x61,0x72,0x45,0x78,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x50,0x61,0x72,0x61,0x62,0x6F,0x6C,0x69,0x63,0x20,0x53,0x41,0x52,0x20,0x2D,0x20 -,0x45,0x78,0x74,0x65,0x6E,0x64,0x65,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F -,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x61,0x72,0x74,0x20,0x56,0x61,0x6C,0x75,0x65,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x61,0x72,0x74,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x61,0x6E -,0x64,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x20,0x30,0x20,0x66,0x6F,0x72,0x20,0x41 -,0x75,0x74,0x6F,0x2C,0x20,0x26,0x67,0x74,0x3B,0x30,0x20,0x66,0x6F,0x72,0x20,0x4C,0x6F,0x6E,0x67,0x2C -,0x20,0x26,0x6C,0x74,0x3B,0x30,0x20,0x66,0x6F,0x72,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C,0x2F,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C -,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69 -,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x30,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x30,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4F,0x66,0x66,0x73,0x65,0x74 -,0x20,0x6F,0x6E,0x20,0x52,0x65,0x76,0x65,0x72,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x50,0x65,0x72,0x63,0x65,0x6E,0x74,0x20,0x6F,0x66,0x66,0x73,0x65,0x74,0x20,0x61,0x64,0x64,0x65 -,0x64,0x2F,0x72,0x65,0x6D,0x6F,0x76,0x65,0x64,0x20,0x74,0x6F,0x20,0x69,0x6E,0x69,0x74,0x69,0x61,0x6C -,0x20,0x73,0x74,0x6F,0x70,0x20,0x6F,0x6E,0x20,0x73,0x68,0x6F,0x72,0x74,0x2F,0x6C,0x6F,0x6E,0x67,0x20 -,0x72,0x65,0x76,0x65,0x72,0x73,0x61,0x6C,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63 -,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x2E,0x35,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 -,0x65,0x2B,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x41,0x46,0x20,0x49,0x6E,0x69,0x74,0x20,0x4C,0x6F,0x6E,0x67,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46 -,0x61,0x63,0x74,0x6F,0x72,0x20,0x69,0x6E,0x69,0x74,0x69,0x61,0x6C,0x20,0x76,0x61,0x6C,0x75,0x65,0x20 -,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x4C,0x6F,0x6E,0x67,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69 -,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 -,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37 -,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65 -,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 -,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x2E,0x39,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x46 -,0x20,0x4C,0x6F,0x6E,0x67,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C -,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x66,0x6F,0x72,0x20,0x74 -,0x68,0x65,0x20,0x4C,0x6F,0x6E,0x67,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F -,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30 -,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x46,0x20,0x4D,0x61,0x78,0x20 -,0x4C,0x6F,0x6E,0x67,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65 -,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x6D,0x61,0x78,0x69,0x6D,0x75 -,0x6D,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x4C,0x6F,0x6E,0x67 -,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52 -,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E -,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72 -,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x34,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41,0x46,0x20,0x49,0x6E,0x69,0x74,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F -,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20,0x69,0x6E,0x69,0x74,0x69,0x61,0x6C,0x20,0x76,0x61,0x6C -,0x75,0x65,0x20,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x53,0x68,0x6F,0x72,0x74,0x20,0x64,0x69,0x72 -,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30 -,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30 -,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x2E,0x39,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D -,0x32,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x41,0x46,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x20 -,0x66,0x6F,0x72,0x20,0x74,0x68,0x65,0x20,0x53,0x68,0x6F,0x72,0x74,0x20,0x64,0x69,0x72,0x65,0x63,0x74 -,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30 -,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33 -,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72 -,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 -,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F -,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x41 -,0x46,0x20,0x4D,0x61,0x78,0x20,0x53,0x68,0x6F,0x72,0x74,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x41,0x63,0x63,0x65,0x6C,0x65,0x72,0x61,0x74,0x69,0x6F,0x6E,0x20,0x46,0x61,0x63,0x74,0x6F,0x72 -,0x20,0x6D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x20,0x76,0x61,0x6C,0x75,0x65,0x20,0x66,0x6F,0x72,0x20,0x74 -,0x68,0x65,0x20,0x53,0x68,0x6F,0x72,0x74,0x20,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C -,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69 -,0x6F,0x6E,0x3E,0x34,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x32,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x34,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C -,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x53,0x49,0x4E,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x49,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x53,0x69,0x6E,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69 -,0x63,0x20,0x53,0x69,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68 -,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C -,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20 -,0x53,0x49,0x4E,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x49,0x4E,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x53,0x69,0x6E,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65 -,0x74,0x72,0x69,0x63,0x20,0x53,0x69,0x6E,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x53,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x69,0x6D,0x70,0x6C,0x65,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 -,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65 -,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65 -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D -,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61 -,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C -,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A -,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x51,0x52,0x54,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x51,0x52,0x54,0x3C,0x2F,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x71,0x72,0x74,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72,0x20,0x53,0x71,0x75 -,0x61,0x72,0x65,0x20,0x52,0x6F,0x6F,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D -,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E -,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21 -,0x2D,0x2D,0x20,0x53,0x54,0x44,0x44,0x45,0x56,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x54,0x44,0x44,0x45,0x56,0x3C,0x2F,0x41 -,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x64,0x44,0x65,0x76,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x61,0x6E,0x64,0x61,0x72 -,0x64,0x20,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x4E,0x62,0x20,0x6F,0x66,0x20,0x64,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x73,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B -,0x33,0x37,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C -,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63 -,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x2D,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x53,0x54,0x4F,0x43,0x48,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61 -,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x54,0x4F,0x43,0x48,0x3C,0x2F,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x6F,0x63,0x68,0x3C,0x2F,0x43,0x61,0x6D,0x65 -,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x6F,0x63,0x68,0x61,0x73,0x74,0x69 -,0x63,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D -,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61 -,0x73,0x74,0x2D,0x4B,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x54,0x69,0x6D,0x65,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x62,0x75,0x69 -,0x6C,0x64,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x4B,0x20,0x6C,0x69,0x6E -,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x4B,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20 -,0x66,0x6F,0x72,0x20,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x53,0x6C,0x6F,0x77,0x2D -,0x4B,0x20,0x6C,0x69,0x6E,0x65,0x2E,0x20,0x55,0x73,0x75,0x61,0x6C,0x6C,0x79,0x20,0x73,0x65,0x74,0x20 -,0x74,0x6F,0x20,0x33,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65 -,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45 -,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x4B,0x20,0x4D,0x41,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76 -,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x53,0x6C,0x6F,0x77 -,0x2D,0x4B,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x44,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20 -,0x66,0x6F,0x72,0x20,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x53,0x6C,0x6F,0x77,0x2D -,0x44,0x20,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 -,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x6C,0x6F,0x77,0x2D,0x44,0x20,0x4D -,0x41,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D -,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x53,0x6C -,0x6F,0x77,0x2D,0x44,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70 -,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x6F,0x75,0x74,0x53,0x6C,0x6F,0x77,0x4B,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44 -,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x53,0x6C,0x6F,0x77,0x44 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x44,0x61,0x73,0x68,0x65,0x64,0x20,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x54,0x4F,0x43,0x48 -,0x46,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x53,0x54,0x4F,0x43,0x48,0x46,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x53,0x74,0x6F,0x63,0x68,0x46,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x6F,0x63,0x68,0x61,0x73,0x74,0x69,0x63,0x20,0x46,0x61,0x73,0x74 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20 -,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73 -,0x74,0x2D,0x4B,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x54,0x69,0x6D,0x65,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x62,0x75,0x69,0x6C -,0x64,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x4B,0x20,0x6C,0x69,0x6E,0x65 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20,0x66 -,0x6F,0x72,0x20,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x44 -,0x20,0x6C,0x69,0x6E,0x65,0x2E,0x20,0x55,0x73,0x75,0x61,0x6C,0x6C,0x79,0x20,0x73,0x65,0x74,0x20,0x74 -,0x6F,0x20,0x33,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x4D,0x41,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63 -,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69 -,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x46,0x61,0x73,0x74,0x2D -,0x44,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74 -,0x46,0x61,0x73,0x74,0x4B,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x46,0x61,0x73,0x74,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x54 -,0x4F,0x43,0x48,0x52,0x53,0x49,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69 -,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65 -,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x54,0x4F,0x43,0x48,0x52,0x53,0x49,0x3C,0x2F,0x41,0x62 -,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C -,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x74,0x6F,0x63,0x68,0x52,0x73,0x69,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x74,0x6F,0x63,0x68,0x61 -,0x73,0x74,0x69,0x63,0x20,0x52,0x65,0x6C,0x61,0x74,0x69,0x76,0x65,0x20,0x53,0x74,0x72,0x65,0x6E,0x67 -,0x74,0x68,0x20,0x49,0x6E,0x64,0x65,0x78,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D -,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20,0x50,0x65,0x72 -,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65 -,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66 -,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74 -,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C -,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72 -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75 -,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x4B -,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x69,0x6D -,0x65,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x20,0x66,0x6F,0x72,0x20,0x62,0x75,0x69,0x6C,0x64,0x69,0x6E -,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x4B,0x20,0x6C,0x69,0x6E,0x65,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30 -,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49 -,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x69,0x6E,0x67,0x20,0x66,0x6F,0x72,0x20 -,0x6D,0x61,0x6B,0x69,0x6E,0x67,0x20,0x74,0x68,0x65,0x20,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x6C,0x69 -,0x6E,0x65,0x2E,0x20,0x55,0x73,0x75,0x61,0x6C,0x6C,0x79,0x20,0x73,0x65,0x74,0x20,0x74,0x6F,0x20,0x33 -,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65 -,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x33,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x46,0x61,0x73,0x74,0x2D,0x44,0x20,0x4D,0x41,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x65,0x20,0x6F,0x66,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20 -,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x66,0x6F,0x72,0x20,0x46,0x61,0x73,0x74,0x2D,0x44,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4D,0x41,0x20,0x54,0x79,0x70,0x65,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75 -,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79 -,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x46,0x61,0x73 -,0x74,0x4B,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x46,0x61,0x73,0x74,0x44,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x55,0x42,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x53,0x55,0x42,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x75,0x62,0x3C -,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74 -,0x6F,0x72,0x20,0x41,0x72,0x69,0x74,0x68,0x6D,0x65,0x74,0x69,0x63,0x20,0x53,0x75,0x62,0x74,0x72,0x61 -,0x63,0x74,0x69,0x6F,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68 -,0x20,0x4F,0x70,0x65,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 -,0x6C,0x30,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C -,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x31,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x53,0x55,0x4D,0x20,0x2D,0x2D,0x3E,0x0A,0x09 -,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x55,0x4D,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x75,0x6D,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x53,0x75,0x6D,0x6D,0x61,0x74,0x69,0x6F -,0x6E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x4F,0x70,0x65 -,0x72,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69 -,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69 -,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74 -,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C -,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72 -,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69 -,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x33,0x20,0x2D,0x2D -,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54 -,0x33,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x33,0x3C,0x2F,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x72,0x69,0x70,0x6C,0x65,0x20 -,0x45,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41 -,0x76,0x65,0x72,0x61,0x67,0x65,0x20,0x28,0x54,0x33,0x29,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49 -,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47 -,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x55,0x6E,0x73,0x74,0x61,0x62,0x6C,0x65,0x20 -,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69 -,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65 -,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72 -,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x56,0x6F,0x6C,0x75 -,0x6D,0x65,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56 -,0x6F,0x6C,0x75,0x6D,0x65,0x20,0x46,0x61,0x63,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x30,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x2E -,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50 -,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 -,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x35,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 -,0x2D,0x32,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x37,0x2E,0x30,0x30,0x30 -,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x41,0x4E,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x41 -,0x4E,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x61,0x6E,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63,0x74,0x6F,0x72 -,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x54,0x61,0x6E,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72,0x61,0x6E,0x73,0x66 -,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F -,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x41,0x4E,0x48,0x20,0x2D,0x2D -,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54 -,0x41,0x4E,0x48,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x61,0x6E,0x68 -,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x65,0x63 -,0x74,0x6F,0x72,0x20,0x54,0x72,0x69,0x67,0x6F,0x6E,0x6F,0x6D,0x65,0x74,0x72,0x69,0x63,0x20,0x54,0x61 -,0x6E,0x68,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x61,0x74,0x68,0x20,0x54,0x72 -,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41 -,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x45,0x4D -,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E -,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x54,0x45,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x54,0x65,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x54,0x72,0x69,0x70,0x6C,0x65,0x20,0x45,0x78,0x70,0x6F,0x6E,0x65,0x6E,0x74,0x69,0x61,0x6C,0x20 -,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72 -,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F -,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73 -,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x52,0x41,0x4E,0x47,0x45 -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x54,0x52,0x41,0x4E,0x47,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x54,0x72,0x75,0x65,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x72,0x75,0x65,0x20,0x52,0x61,0x6E,0x67,0x65,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x56,0x6F,0x6C,0x61,0x74,0x69,0x6C,0x69,0x74,0x79,0x20,0x49 -,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A -,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61 -,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C -,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F -,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A -,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x52,0x49,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46 -,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x52,0x49,0x4D,0x41,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x72,0x69,0x6D,0x61,0x3C,0x2F,0x43 -,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x72,0x69,0x61,0x6E,0x67 -,0x75,0x6C,0x61,0x72,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C -,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09 -,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74 -,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C -,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54 -,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61 -,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69 -,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64 -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20 -,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65 -,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F -,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74 -,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61 -,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61 -,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54 -,0x52,0x49,0x58,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46 -,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61 -,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x52,0x49,0x58,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x54,0x72,0x69,0x78,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x31,0x2D,0x64,0x61,0x79,0x20,0x52,0x61,0x74,0x65,0x2D,0x4F,0x66,0x2D,0x43,0x68,0x61 -,0x6E,0x67,0x65,0x20,0x28,0x52,0x4F,0x43,0x29,0x20,0x6F,0x66,0x20,0x61,0x20,0x54,0x72,0x69,0x70,0x6C -,0x65,0x20,0x53,0x6D,0x6F,0x6F,0x74,0x68,0x20,0x45,0x4D,0x41,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F -,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75 -,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C -,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F -,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E -,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75 -,0x65,0x3E,0x33,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52 -,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x53,0x46,0x20,0x2D,0x2D,0x3E,0x0A,0x09 -,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x53,0x46,0x3C -,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61 -,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x73,0x66,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x69,0x6D,0x65,0x20,0x53,0x65,0x72 -,0x69,0x65,0x73,0x20,0x46,0x6F,0x72,0x65,0x63,0x61,0x73,0x74,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C -,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F -,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73 -,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72 -,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64 -,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E -,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E -,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C -,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61 -,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72 -,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C -,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75 -,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x54,0x59,0x50,0x50 -,0x52,0x49,0x43,0x45,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x59,0x50,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61 -,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x79,0x70,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D -,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74 -,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x54,0x79,0x70,0x69,0x63,0x61,0x6C,0x20 -,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63 -,0x65,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64 -,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67 -,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F -,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61 -,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F -,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E -,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E -,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x55,0x4C,0x54,0x4F,0x53,0x43 -,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F -,0x6E,0x3E,0x55,0x4C,0x54,0x4F,0x53,0x43,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65 -,0x3E,0x55,0x6C,0x74,0x4F,0x73,0x63,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x55,0x6C,0x74,0x69,0x6D,0x61,0x74,0x65,0x20,0x4F,0x73,0x63,0x69,0x6C,0x6C,0x61 -,0x74,0x6F,0x72,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74 -,0x75,0x6D,0x20,0x49,0x6E,0x64,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70 -,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69 -,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54 -,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64 -,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F -,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E -,0x46,0x69,0x72,0x73,0x74,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x62,0x61,0x72,0x73,0x20,0x66,0x6F,0x72 -,0x20,0x31,0x73,0x74,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x2E,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44 -,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65 -,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30 -,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x37,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x53,0x65 -,0x63,0x6F,0x6E,0x64,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E -,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x62,0x61,0x72,0x73,0x20,0x66,0x72,0x6F,0x20 -,0x32,0x6E,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73 -,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D -,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D -,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30 -,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E -,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44,0x65 -,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67 -,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x68,0x69 -,0x72,0x64,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x62,0x61,0x72,0x73,0x20,0x66,0x6F,0x72,0x20,0x33,0x72 -,0x64,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E -,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61 -,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31 -,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78 -,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61 -,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74 -,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x32,0x38,0x3C,0x2F,0x44,0x65,0x66,0x61 -,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F -,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62 -,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D -,0x20,0x56,0x41,0x52,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C -,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69 -,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x41,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D -,0x65,0x3E,0x56,0x61,0x72,0x69,0x61,0x6E,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73 -,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x56,0x61,0x72,0x69,0x61,0x6E,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72 -,0x6F,0x75,0x70,0x49,0x64,0x3E,0x53,0x74,0x61,0x74,0x69,0x73,0x74,0x69,0x63,0x20,0x46,0x75,0x6E,0x63 -,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E -,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A -,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49 -,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F -,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F -,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D -,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30 -,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31 -,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F -,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56 -,0x61,0x6C,0x75,0x65,0x3E,0x35,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E -,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x44,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x73,0x3C,0x2F,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x62,0x20,0x6F,0x66,0x20,0x64,0x65,0x76,0x69,0x61,0x74,0x69 -,0x6F,0x6E,0x73,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F -,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x3C -,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x2D,0x33,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x33,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65 -,0x2B,0x33,0x37,0x3C,0x2F,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x50,0x72,0x65,0x63,0x69,0x73,0x69,0x6F,0x6E,0x3E,0x32,0x3C,0x2F,0x50,0x72,0x65,0x63,0x69,0x73,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53 -,0x74,0x61,0x72,0x74,0x3E,0x2D,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30 -,0x30,0x30,0x65,0x2B,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72 -,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x32,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2D,0x31,0x3C,0x2F,0x53 -,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66 -,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x2E,0x30,0x30,0x30,0x30,0x30,0x30,0x65,0x2B -,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x57,0x43,0x4C,0x50,0x52,0x49,0x43,0x45,0x20,0x2D,0x2D,0x3E -,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x57,0x43 -,0x4C,0x50,0x52,0x49,0x43,0x45,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E -,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x57 -,0x63,0x6C,0x50,0x72,0x69,0x63,0x65,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74 -,0x69,0x6F,0x6E,0x3E,0x57,0x65,0x69,0x67,0x68,0x74,0x65,0x64,0x20,0x43,0x6C,0x6F,0x73,0x65,0x20,0x50 -,0x72,0x69,0x63,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x50,0x72,0x69,0x63,0x65 -,0x20,0x54,0x72,0x61,0x6E,0x73,0x66,0x6F,0x72,0x6D,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E -,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E -,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x46 -,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71 -,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75 -,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65 -,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74 -,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72 -,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79 -,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75 -,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C -,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65 -,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74 -,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C,0x21,0x2D,0x2D,0x20,0x57,0x49,0x4C,0x4C,0x52,0x20,0x2D -,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69 -,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x57,0x49,0x4C,0x4C,0x52,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E -,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x57,0x69 -,0x6C,0x6C,0x52,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E,0x61,0x6D,0x65,0x3E,0x0A -,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E -,0x57,0x69,0x6C,0x6C,0x69,0x61,0x6D,0x73,0x26,0x61,0x70,0x6F,0x73,0x3B,0x20,0x25,0x52,0x3C,0x2F,0x53 -,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C -,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4D,0x6F,0x6D,0x65,0x6E,0x74,0x75,0x6D,0x20,0x49,0x6E,0x64 -,0x69,0x63,0x61,0x74,0x6F,0x72,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70 -,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x48,0x69,0x67,0x68,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75 -,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D -,0x65,0x3E,0x4C,0x6F,0x77,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52,0x65 -,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x43,0x6C -,0x6F,0x73,0x65,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65 -,0x3E,0x43,0x6C,0x6F,0x73,0x65,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x52 -,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74 -,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61 -,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69,0x6D,0x65,0x20,0x50 -,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x53,0x68 -,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E,0x75,0x6D,0x62,0x65 -,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65 -,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65 -,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69,0x6E,0x69,0x6D,0x75 -,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x4D,0x61,0x78,0x69 -,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64 -,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73 -,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67 -,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67 -,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x31,0x30,0x30,0x30 -,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x31,0x34,0x3C,0x2F,0x44 -,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x70 -,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E -,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70,0x75,0x74,0x41 -,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44 -,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61 -,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x09 -,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C,0x2F,0x46,0x69,0x6E -,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x0A,0x0A,0x09,0x3C -,0x21,0x2D,0x2D,0x20,0x57,0x4D,0x41,0x20,0x2D,0x2D,0x3E,0x0A,0x09,0x3C,0x46,0x69,0x6E,0x61,0x6E,0x63 -,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x41,0x62,0x62,0x72 -,0x65,0x76,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x57,0x4D,0x41,0x3C,0x2F,0x41,0x62,0x62,0x72,0x65,0x76 -,0x69,0x61,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65 -,0x4E,0x61,0x6D,0x65,0x3E,0x57,0x6D,0x61,0x3C,0x2F,0x43,0x61,0x6D,0x65,0x6C,0x43,0x61,0x73,0x65,0x4E -,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70 -,0x74,0x69,0x6F,0x6E,0x3E,0x57,0x65,0x69,0x67,0x68,0x74,0x65,0x64,0x20,0x4D,0x6F,0x76,0x69,0x6E,0x67 -,0x20,0x41,0x76,0x65,0x72,0x61,0x67,0x65,0x3C,0x2F,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72 -,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x3C,0x47,0x72,0x6F,0x75,0x70,0x49,0x64,0x3E,0x4F -,0x76,0x65,0x72,0x6C,0x61,0x70,0x20,0x53,0x74,0x75,0x64,0x69,0x65,0x73,0x3C,0x2F,0x47,0x72,0x6F,0x75 -,0x70,0x49,0x64,0x3E,0x0A,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x46 -,0x6C,0x61,0x67,0x3E,0x4F,0x76,0x65,0x72,0x6C,0x61,0x70,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x3E,0x0A,0x09 -,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65 -,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65 -,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65 -,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E -,0x61,0x6D,0x65,0x3E,0x69,0x6E,0x52,0x65,0x61,0x6C,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09 -,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75 -,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x52,0x65,0x71,0x75,0x69,0x72,0x65,0x64,0x49,0x6E -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x70,0x74 -,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E -,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72 -,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x54,0x69 -,0x6D,0x65,0x20,0x50,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x09,0x3C,0x53,0x68,0x6F,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x4E -,0x75,0x6D,0x62,0x65,0x72,0x20,0x6F,0x66,0x20,0x70,0x65,0x72,0x69,0x6F,0x64,0x3C,0x2F,0x53,0x68,0x6F -,0x72,0x74,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6F,0x6E,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C -,0x54,0x79,0x70,0x65,0x3E,0x49,0x6E,0x74,0x65,0x67,0x65,0x72,0x3C,0x2F,0x54,0x79,0x70,0x65,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x3C,0x52,0x61,0x6E,0x67,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x4D,0x69 -,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x32,0x3C,0x2F,0x4D,0x69,0x6E,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09 -,0x09,0x09,0x09,0x3C,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F -,0x4D,0x61,0x78,0x69,0x6D,0x75,0x6D,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C,0x53,0x75,0x67,0x67,0x65 -,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75 -,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x72,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09,0x3C -,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x31,0x30,0x30,0x30,0x30,0x30,0x3C -,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x45,0x6E,0x64,0x3E,0x0A,0x09,0x09,0x09,0x09,0x09 -,0x3C,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E -,0x31,0x30,0x30,0x30,0x30,0x30,0x3C,0x2F,0x53,0x75,0x67,0x67,0x65,0x73,0x74,0x65,0x64,0x49,0x6E,0x63 -,0x72,0x65,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x52,0x61,0x6E,0x67,0x65,0x3E -,0x0A,0x09,0x09,0x09,0x09,0x3C,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x33 -,0x30,0x3C,0x2F,0x44,0x65,0x66,0x61,0x75,0x6C,0x74,0x56,0x61,0x6C,0x75,0x65,0x3E,0x0A,0x09,0x09,0x09 -,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D -,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C,0x2F,0x4F,0x70,0x74,0x69,0x6F,0x6E,0x61,0x6C,0x49,0x6E,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x3C,0x4F,0x75,0x74,0x70 -,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C,0x4F,0x75,0x74 -,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x54,0x79 -,0x70,0x65,0x3E,0x44,0x6F,0x75,0x62,0x6C,0x65,0x20,0x41,0x72,0x72,0x61,0x79,0x3C,0x2F,0x54,0x79,0x70 -,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x4E,0x61,0x6D,0x65,0x3E,0x6F,0x75,0x74,0x52,0x65,0x61,0x6C -,0x3C,0x2F,0x4E,0x61,0x6D,0x65,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A -,0x09,0x09,0x09,0x09,0x09,0x3C,0x46,0x6C,0x61,0x67,0x3E,0x4C,0x69,0x6E,0x65,0x3C,0x2F,0x46,0x6C,0x61 -,0x67,0x3E,0x0A,0x09,0x09,0x09,0x09,0x3C,0x2F,0x46,0x6C,0x61,0x67,0x73,0x3E,0x0A,0x09,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x3E,0x0A,0x09,0x09,0x3C -,0x2F,0x4F,0x75,0x74,0x70,0x75,0x74,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x3E,0x0A,0x09,0x3C -,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F,0x6E,0x3E,0x0A -,0x0A,0x0A,0x3C,0x2F,0x46,0x69,0x6E,0x61,0x6E,0x63,0x69,0x61,0x6C,0x46,0x75,0x6E,0x63,0x74,0x69,0x6F -,0x6E,0x73,0x3E,0x0A}; - -const char *TA_FunctionDescriptionXML() -{ - return TA_FunctionDescriptionXMLArray; -} - -/***************/ -/* End of File */ -/***************/ diff --git a/src/ta-lib/src/ta_abstract/ta_group_idx.c b/src/ta-lib/src/ta_abstract/ta_group_idx.c deleted file mode 100644 index 73268133f..000000000 --- a/src/ta-lib/src/ta_abstract/ta_group_idx.c +++ /dev/null @@ -1,453 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2007, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Important: This file is automatically generated by gen_code. - * Any modification will be lost on next execution - * of gen_code. - * - * The goal of this file is to build the following global - * constant: - * TA_PerGroupFuncDef - * TA_PerGroupSize - * TA_TotalNbFunction - * - * These constant allows mainly to speed optimize functionality related to - * sequential access to TA_DefFunc by TA_GroupId (see ta_abstract.c) - */ -#include -#include "ta_def_ui.h" -#include "ta_abstract.h" - -extern const TA_FuncDef TA_DEF_ACCBANDS; -extern const TA_FuncDef TA_DEF_ACOS; -extern const TA_FuncDef TA_DEF_AD; -extern const TA_FuncDef TA_DEF_ADD; -extern const TA_FuncDef TA_DEF_ADOSC; -extern const TA_FuncDef TA_DEF_ADX; -extern const TA_FuncDef TA_DEF_ADXR; -extern const TA_FuncDef TA_DEF_APO; -extern const TA_FuncDef TA_DEF_AROON; -extern const TA_FuncDef TA_DEF_AROONOSC; -extern const TA_FuncDef TA_DEF_ASIN; -extern const TA_FuncDef TA_DEF_ATAN; -extern const TA_FuncDef TA_DEF_ATR; -extern const TA_FuncDef TA_DEF_AVGPRICE; -extern const TA_FuncDef TA_DEF_AVGDEV; -extern const TA_FuncDef TA_DEF_BBANDS; -extern const TA_FuncDef TA_DEF_BETA; -extern const TA_FuncDef TA_DEF_BOP; -extern const TA_FuncDef TA_DEF_CCI; -extern const TA_FuncDef TA_DEF_CDL2CROWS; -extern const TA_FuncDef TA_DEF_CDL3BLACKCROWS; -extern const TA_FuncDef TA_DEF_CDL3INSIDE; -extern const TA_FuncDef TA_DEF_CDL3LINESTRIKE; -extern const TA_FuncDef TA_DEF_CDL3OUTSIDE; -extern const TA_FuncDef TA_DEF_CDL3STARSINSOUTH; -extern const TA_FuncDef TA_DEF_CDL3WHITESOLDIERS; -extern const TA_FuncDef TA_DEF_CDLABANDONEDBABY; -extern const TA_FuncDef TA_DEF_CDLADVANCEBLOCK; -extern const TA_FuncDef TA_DEF_CDLBELTHOLD; -extern const TA_FuncDef TA_DEF_CDLBREAKAWAY; -extern const TA_FuncDef TA_DEF_CDLCLOSINGMARUBOZU; -extern const TA_FuncDef TA_DEF_CDLCONCEALBABYSWALL; -extern const TA_FuncDef TA_DEF_CDLCOUNTERATTACK; -extern const TA_FuncDef TA_DEF_CDLDARKCLOUDCOVER; -extern const TA_FuncDef TA_DEF_CDLDOJI; -extern const TA_FuncDef TA_DEF_CDLDOJISTAR; -extern const TA_FuncDef TA_DEF_CDLDRAGONFLYDOJI; -extern const TA_FuncDef TA_DEF_CDLENGULFING; -extern const TA_FuncDef TA_DEF_CDLEVENINGDOJISTAR; -extern const TA_FuncDef TA_DEF_CDLEVENINGSTAR; -extern const TA_FuncDef TA_DEF_CDLGAPSIDESIDEWHITE; -extern const TA_FuncDef TA_DEF_CDLGRAVESTONEDOJI; -extern const TA_FuncDef TA_DEF_CDLHAMMER; -extern const TA_FuncDef TA_DEF_CDLHANGINGMAN; -extern const TA_FuncDef TA_DEF_CDLHARAMI; -extern const TA_FuncDef TA_DEF_CDLHARAMICROSS; -extern const TA_FuncDef TA_DEF_CDLHIGHWAVE; -extern const TA_FuncDef TA_DEF_CDLHIKKAKE; -extern const TA_FuncDef TA_DEF_CDLHIKKAKEMOD; -extern const TA_FuncDef TA_DEF_CDLHOMINGPIGEON; -extern const TA_FuncDef TA_DEF_CDLIDENTICAL3CROWS; -extern const TA_FuncDef TA_DEF_CDLINNECK; -extern const TA_FuncDef TA_DEF_CDLINVERTEDHAMMER; -extern const TA_FuncDef TA_DEF_CDLKICKING; -extern const TA_FuncDef TA_DEF_CDLKICKINGBYLENGTH; -extern const TA_FuncDef TA_DEF_CDLLADDERBOTTOM; -extern const TA_FuncDef TA_DEF_CDLLONGLEGGEDDOJI; -extern const TA_FuncDef TA_DEF_CDLLONGLINE; -extern const TA_FuncDef TA_DEF_CDLMARUBOZU; -extern const TA_FuncDef TA_DEF_CDLMATCHINGLOW; -extern const TA_FuncDef TA_DEF_CDLMATHOLD; -extern const TA_FuncDef TA_DEF_CDLMORNINGDOJISTAR; -extern const TA_FuncDef TA_DEF_CDLMORNINGSTAR; -extern const TA_FuncDef TA_DEF_CDLONNECK; -extern const TA_FuncDef TA_DEF_CDLPIERCING; -extern const TA_FuncDef TA_DEF_CDLRICKSHAWMAN; -extern const TA_FuncDef TA_DEF_CDLRISEFALL3METHODS; -extern const TA_FuncDef TA_DEF_CDLSEPARATINGLINES; -extern const TA_FuncDef TA_DEF_CDLSHOOTINGSTAR; -extern const TA_FuncDef TA_DEF_CDLSHORTLINE; -extern const TA_FuncDef TA_DEF_CDLSPINNINGTOP; -extern const TA_FuncDef TA_DEF_CDLSTALLEDPATTERN; -extern const TA_FuncDef TA_DEF_CDLSTICKSANDWICH; -extern const TA_FuncDef TA_DEF_CDLTAKURI; -extern const TA_FuncDef TA_DEF_CDLTASUKIGAP; -extern const TA_FuncDef TA_DEF_CDLTHRUSTING; -extern const TA_FuncDef TA_DEF_CDLTRISTAR; -extern const TA_FuncDef TA_DEF_CDLUNIQUE3RIVER; -extern const TA_FuncDef TA_DEF_CDLUPSIDEGAP2CROWS; -extern const TA_FuncDef TA_DEF_CDLXSIDEGAP3METHODS; -extern const TA_FuncDef TA_DEF_CEIL; -extern const TA_FuncDef TA_DEF_CMO; -extern const TA_FuncDef TA_DEF_CORREL; -extern const TA_FuncDef TA_DEF_COS; -extern const TA_FuncDef TA_DEF_COSH; -extern const TA_FuncDef TA_DEF_DEMA; -extern const TA_FuncDef TA_DEF_DIV; -extern const TA_FuncDef TA_DEF_DX; -extern const TA_FuncDef TA_DEF_EMA; -extern const TA_FuncDef TA_DEF_EXP; -extern const TA_FuncDef TA_DEF_FLOOR; -extern const TA_FuncDef TA_DEF_HT_DCPERIOD; -extern const TA_FuncDef TA_DEF_HT_DCPHASE; -extern const TA_FuncDef TA_DEF_HT_PHASOR; -extern const TA_FuncDef TA_DEF_HT_SINE; -extern const TA_FuncDef TA_DEF_HT_TRENDLINE; -extern const TA_FuncDef TA_DEF_HT_TRENDMODE; -extern const TA_FuncDef TA_DEF_IMI; -extern const TA_FuncDef TA_DEF_KAMA; -extern const TA_FuncDef TA_DEF_LINEARREG; -extern const TA_FuncDef TA_DEF_LINEARREG_ANGLE; -extern const TA_FuncDef TA_DEF_LINEARREG_INTERCEPT; -extern const TA_FuncDef TA_DEF_LINEARREG_SLOPE; -extern const TA_FuncDef TA_DEF_LN; -extern const TA_FuncDef TA_DEF_LOG10; -extern const TA_FuncDef TA_DEF_MA; -extern const TA_FuncDef TA_DEF_MACD; -extern const TA_FuncDef TA_DEF_MACDEXT; -extern const TA_FuncDef TA_DEF_MACDFIX; -extern const TA_FuncDef TA_DEF_MAMA; -extern const TA_FuncDef TA_DEF_MAVP; -extern const TA_FuncDef TA_DEF_MAX; -extern const TA_FuncDef TA_DEF_MAXINDEX; -extern const TA_FuncDef TA_DEF_MEDPRICE; -extern const TA_FuncDef TA_DEF_MFI; -extern const TA_FuncDef TA_DEF_MIDPOINT; -extern const TA_FuncDef TA_DEF_MIDPRICE; -extern const TA_FuncDef TA_DEF_MIN; -extern const TA_FuncDef TA_DEF_MININDEX; -extern const TA_FuncDef TA_DEF_MINMAX; -extern const TA_FuncDef TA_DEF_MINMAXINDEX; -extern const TA_FuncDef TA_DEF_MINUS_DI; -extern const TA_FuncDef TA_DEF_MINUS_DM; -extern const TA_FuncDef TA_DEF_MOM; -extern const TA_FuncDef TA_DEF_MULT; -extern const TA_FuncDef TA_DEF_NATR; -extern const TA_FuncDef TA_DEF_OBV; -extern const TA_FuncDef TA_DEF_PLUS_DI; -extern const TA_FuncDef TA_DEF_PLUS_DM; -extern const TA_FuncDef TA_DEF_PPO; -extern const TA_FuncDef TA_DEF_ROC; -extern const TA_FuncDef TA_DEF_ROCP; -extern const TA_FuncDef TA_DEF_ROCR; -extern const TA_FuncDef TA_DEF_ROCR100; -extern const TA_FuncDef TA_DEF_RSI; -extern const TA_FuncDef TA_DEF_SAR; -extern const TA_FuncDef TA_DEF_SAREXT; -extern const TA_FuncDef TA_DEF_SIN; -extern const TA_FuncDef TA_DEF_SINH; -extern const TA_FuncDef TA_DEF_SMA; -extern const TA_FuncDef TA_DEF_SQRT; -extern const TA_FuncDef TA_DEF_STDDEV; -extern const TA_FuncDef TA_DEF_STOCH; -extern const TA_FuncDef TA_DEF_STOCHF; -extern const TA_FuncDef TA_DEF_STOCHRSI; -extern const TA_FuncDef TA_DEF_SUB; -extern const TA_FuncDef TA_DEF_SUM; -extern const TA_FuncDef TA_DEF_T3; -extern const TA_FuncDef TA_DEF_TAN; -extern const TA_FuncDef TA_DEF_TANH; -extern const TA_FuncDef TA_DEF_TEMA; -extern const TA_FuncDef TA_DEF_TRANGE; -extern const TA_FuncDef TA_DEF_TRIMA; -extern const TA_FuncDef TA_DEF_TRIX; -extern const TA_FuncDef TA_DEF_TSF; -extern const TA_FuncDef TA_DEF_TYPPRICE; -extern const TA_FuncDef TA_DEF_ULTOSC; -extern const TA_FuncDef TA_DEF_VAR; -extern const TA_FuncDef TA_DEF_WCLPRICE; -extern const TA_FuncDef TA_DEF_WILLR; -extern const TA_FuncDef TA_DEF_WMA; - -const TA_FuncDef *TA_PerGroupFunc_0[] = { -&TA_DEF_ADD, -&TA_DEF_DIV, -&TA_DEF_MAX, -&TA_DEF_MAXINDEX, -&TA_DEF_MIN, -&TA_DEF_MININDEX, -&TA_DEF_MINMAX, -&TA_DEF_MINMAXINDEX, -&TA_DEF_MULT, -&TA_DEF_SUB, -&TA_DEF_SUM, -NULL }; -#define SIZE_GROUP_0 ((sizeof(TA_PerGroupFunc_0)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_1[] = { -&TA_DEF_ACOS, -&TA_DEF_ASIN, -&TA_DEF_ATAN, -&TA_DEF_CEIL, -&TA_DEF_COS, -&TA_DEF_COSH, -&TA_DEF_EXP, -&TA_DEF_FLOOR, -&TA_DEF_LN, -&TA_DEF_LOG10, -&TA_DEF_SIN, -&TA_DEF_SINH, -&TA_DEF_SQRT, -&TA_DEF_TAN, -&TA_DEF_TANH, -NULL }; -#define SIZE_GROUP_1 ((sizeof(TA_PerGroupFunc_1)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_2[] = { -&TA_DEF_ACCBANDS, -&TA_DEF_BBANDS, -&TA_DEF_DEMA, -&TA_DEF_EMA, -&TA_DEF_HT_TRENDLINE, -&TA_DEF_KAMA, -&TA_DEF_MA, -&TA_DEF_MAMA, -&TA_DEF_MAVP, -&TA_DEF_MIDPOINT, -&TA_DEF_MIDPRICE, -&TA_DEF_SAR, -&TA_DEF_SAREXT, -&TA_DEF_SMA, -&TA_DEF_T3, -&TA_DEF_TEMA, -&TA_DEF_TRIMA, -&TA_DEF_WMA, -NULL }; -#define SIZE_GROUP_2 ((sizeof(TA_PerGroupFunc_2)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_3[] = { -&TA_DEF_ATR, -&TA_DEF_NATR, -&TA_DEF_TRANGE, -NULL }; -#define SIZE_GROUP_3 ((sizeof(TA_PerGroupFunc_3)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_4[] = { -&TA_DEF_ADX, -&TA_DEF_ADXR, -&TA_DEF_APO, -&TA_DEF_AROON, -&TA_DEF_AROONOSC, -&TA_DEF_BOP, -&TA_DEF_CCI, -&TA_DEF_CMO, -&TA_DEF_DX, -&TA_DEF_IMI, -&TA_DEF_MACD, -&TA_DEF_MACDEXT, -&TA_DEF_MACDFIX, -&TA_DEF_MFI, -&TA_DEF_MINUS_DI, -&TA_DEF_MINUS_DM, -&TA_DEF_MOM, -&TA_DEF_PLUS_DI, -&TA_DEF_PLUS_DM, -&TA_DEF_PPO, -&TA_DEF_ROC, -&TA_DEF_ROCP, -&TA_DEF_ROCR, -&TA_DEF_ROCR100, -&TA_DEF_RSI, -&TA_DEF_STOCH, -&TA_DEF_STOCHF, -&TA_DEF_STOCHRSI, -&TA_DEF_TRIX, -&TA_DEF_ULTOSC, -&TA_DEF_WILLR, -NULL }; -#define SIZE_GROUP_4 ((sizeof(TA_PerGroupFunc_4)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_5[] = { -&TA_DEF_HT_DCPERIOD, -&TA_DEF_HT_DCPHASE, -&TA_DEF_HT_PHASOR, -&TA_DEF_HT_SINE, -&TA_DEF_HT_TRENDMODE, -NULL }; -#define SIZE_GROUP_5 ((sizeof(TA_PerGroupFunc_5)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_6[] = { -&TA_DEF_AD, -&TA_DEF_ADOSC, -&TA_DEF_OBV, -NULL }; -#define SIZE_GROUP_6 ((sizeof(TA_PerGroupFunc_6)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_7[] = { -&TA_DEF_CDL2CROWS, -&TA_DEF_CDL3BLACKCROWS, -&TA_DEF_CDL3INSIDE, -&TA_DEF_CDL3LINESTRIKE, -&TA_DEF_CDL3OUTSIDE, -&TA_DEF_CDL3STARSINSOUTH, -&TA_DEF_CDL3WHITESOLDIERS, -&TA_DEF_CDLABANDONEDBABY, -&TA_DEF_CDLADVANCEBLOCK, -&TA_DEF_CDLBELTHOLD, -&TA_DEF_CDLBREAKAWAY, -&TA_DEF_CDLCLOSINGMARUBOZU, -&TA_DEF_CDLCONCEALBABYSWALL, -&TA_DEF_CDLCOUNTERATTACK, -&TA_DEF_CDLDARKCLOUDCOVER, -&TA_DEF_CDLDOJI, -&TA_DEF_CDLDOJISTAR, -&TA_DEF_CDLDRAGONFLYDOJI, -&TA_DEF_CDLENGULFING, -&TA_DEF_CDLEVENINGDOJISTAR, -&TA_DEF_CDLEVENINGSTAR, -&TA_DEF_CDLGAPSIDESIDEWHITE, -&TA_DEF_CDLGRAVESTONEDOJI, -&TA_DEF_CDLHAMMER, -&TA_DEF_CDLHANGINGMAN, -&TA_DEF_CDLHARAMI, -&TA_DEF_CDLHARAMICROSS, -&TA_DEF_CDLHIGHWAVE, -&TA_DEF_CDLHIKKAKE, -&TA_DEF_CDLHIKKAKEMOD, -&TA_DEF_CDLHOMINGPIGEON, -&TA_DEF_CDLIDENTICAL3CROWS, -&TA_DEF_CDLINNECK, -&TA_DEF_CDLINVERTEDHAMMER, -&TA_DEF_CDLKICKING, -&TA_DEF_CDLKICKINGBYLENGTH, -&TA_DEF_CDLLADDERBOTTOM, -&TA_DEF_CDLLONGLEGGEDDOJI, -&TA_DEF_CDLLONGLINE, -&TA_DEF_CDLMARUBOZU, -&TA_DEF_CDLMATCHINGLOW, -&TA_DEF_CDLMATHOLD, -&TA_DEF_CDLMORNINGDOJISTAR, -&TA_DEF_CDLMORNINGSTAR, -&TA_DEF_CDLONNECK, -&TA_DEF_CDLPIERCING, -&TA_DEF_CDLRICKSHAWMAN, -&TA_DEF_CDLRISEFALL3METHODS, -&TA_DEF_CDLSEPARATINGLINES, -&TA_DEF_CDLSHOOTINGSTAR, -&TA_DEF_CDLSHORTLINE, -&TA_DEF_CDLSPINNINGTOP, -&TA_DEF_CDLSTALLEDPATTERN, -&TA_DEF_CDLSTICKSANDWICH, -&TA_DEF_CDLTAKURI, -&TA_DEF_CDLTASUKIGAP, -&TA_DEF_CDLTHRUSTING, -&TA_DEF_CDLTRISTAR, -&TA_DEF_CDLUNIQUE3RIVER, -&TA_DEF_CDLUPSIDEGAP2CROWS, -&TA_DEF_CDLXSIDEGAP3METHODS, -NULL }; -#define SIZE_GROUP_7 ((sizeof(TA_PerGroupFunc_7)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_8[] = { -&TA_DEF_BETA, -&TA_DEF_CORREL, -&TA_DEF_LINEARREG, -&TA_DEF_LINEARREG_ANGLE, -&TA_DEF_LINEARREG_INTERCEPT, -&TA_DEF_LINEARREG_SLOPE, -&TA_DEF_STDDEV, -&TA_DEF_TSF, -&TA_DEF_VAR, -NULL }; -#define SIZE_GROUP_8 ((sizeof(TA_PerGroupFunc_8)/sizeof(const TA_FuncDef *))-1) - -const TA_FuncDef *TA_PerGroupFunc_9[] = { -&TA_DEF_AVGPRICE, -&TA_DEF_AVGDEV, -&TA_DEF_MEDPRICE, -&TA_DEF_TYPPRICE, -&TA_DEF_WCLPRICE, -NULL }; -#define SIZE_GROUP_9 ((sizeof(TA_PerGroupFunc_9)/sizeof(const TA_FuncDef *))-1) -/* Generated */ const TA_FuncDef **TA_PerGroupFuncDef[10] = { -&TA_PerGroupFunc_0[0], -&TA_PerGroupFunc_1[0], -&TA_PerGroupFunc_2[0], -&TA_PerGroupFunc_3[0], -&TA_PerGroupFunc_4[0], -&TA_PerGroupFunc_5[0], -&TA_PerGroupFunc_6[0], -&TA_PerGroupFunc_7[0], -&TA_PerGroupFunc_8[0], -&TA_PerGroupFunc_9[0] -/* Generated */ }; - -/* Generated */ const unsigned int TA_PerGroupSize[10] = { -SIZE_GROUP_0, -SIZE_GROUP_1, -SIZE_GROUP_2, -SIZE_GROUP_3, -SIZE_GROUP_4, -SIZE_GROUP_5, -SIZE_GROUP_6, -SIZE_GROUP_7, -SIZE_GROUP_8, -SIZE_GROUP_9 -/* Generated */ }; - -/* Generated */ const unsigned int TA_TotalNbFunction = -SIZE_GROUP_0+ -SIZE_GROUP_1+ -SIZE_GROUP_2+ -SIZE_GROUP_3+ -SIZE_GROUP_4+ -SIZE_GROUP_5+ -SIZE_GROUP_6+ -SIZE_GROUP_7+ -SIZE_GROUP_8+ -SIZE_GROUP_9; - -/***************/ -/* End of File */ -/***************/ diff --git a/src/ta-lib/src/ta_abstract/ta_java_defs.h b/src/ta-lib/src/ta_abstract/ta_java_defs.h deleted file mode 100644 index f93bab0fb..000000000 --- a/src/ta-lib/src/ta_abstract/ta_java_defs.h +++ /dev/null @@ -1,366 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* DO NOT MODIFY this file. - * This file is automatically generated by gen_code. - * - * If you are not re-generating the java code (which is most - * likely the case), just ignore this file. - */ - -#define TA_ACCBANDS_Lookback accbandsLookback -#define TA_ACCBANDS accbands -#define TA_ACOS_Lookback acosLookback -#define TA_ACOS acos -#define TA_AD_Lookback adLookback -#define TA_AD ad -#define TA_ADD_Lookback addLookback -#define TA_ADD add -#define TA_ADOSC_Lookback adOscLookback -#define TA_ADOSC adOsc -#define TA_ADX_Lookback adxLookback -#define TA_ADX adx -#define TA_ADXR_Lookback adxrLookback -#define TA_ADXR adxr -#define TA_APO_Lookback apoLookback -#define TA_APO apo -#define TA_AROON_Lookback aroonLookback -#define TA_AROON aroon -#define TA_AROONOSC_Lookback aroonOscLookback -#define TA_AROONOSC aroonOsc -#define TA_ASIN_Lookback asinLookback -#define TA_ASIN asin -#define TA_ATAN_Lookback atanLookback -#define TA_ATAN atan -#define TA_ATR_Lookback atrLookback -#define TA_ATR atr -#define TA_AVGPRICE_Lookback avgPriceLookback -#define TA_AVGPRICE avgPrice -#define TA_AVGDEV_Lookback avgDevLookback -#define TA_AVGDEV avgDev -#define TA_BBANDS_Lookback bbandsLookback -#define TA_BBANDS bbands -#define TA_BETA_Lookback betaLookback -#define TA_BETA beta -#define TA_BOP_Lookback bopLookback -#define TA_BOP bop -#define TA_CCI_Lookback cciLookback -#define TA_CCI cci -#define TA_CDL2CROWS_Lookback cdl2CrowsLookback -#define TA_CDL2CROWS cdl2Crows -#define TA_CDL3BLACKCROWS_Lookback cdl3BlackCrowsLookback -#define TA_CDL3BLACKCROWS cdl3BlackCrows -#define TA_CDL3INSIDE_Lookback cdl3InsideLookback -#define TA_CDL3INSIDE cdl3Inside -#define TA_CDL3LINESTRIKE_Lookback cdl3LineStrikeLookback -#define TA_CDL3LINESTRIKE cdl3LineStrike -#define TA_CDL3OUTSIDE_Lookback cdl3OutsideLookback -#define TA_CDL3OUTSIDE cdl3Outside -#define TA_CDL3STARSINSOUTH_Lookback cdl3StarsInSouthLookback -#define TA_CDL3STARSINSOUTH cdl3StarsInSouth -#define TA_CDL3WHITESOLDIERS_Lookback cdl3WhiteSoldiersLookback -#define TA_CDL3WHITESOLDIERS cdl3WhiteSoldiers -#define TA_CDLABANDONEDBABY_Lookback cdlAbandonedBabyLookback -#define TA_CDLABANDONEDBABY cdlAbandonedBaby -#define TA_CDLADVANCEBLOCK_Lookback cdlAdvanceBlockLookback -#define TA_CDLADVANCEBLOCK cdlAdvanceBlock -#define TA_CDLBELTHOLD_Lookback cdlBeltHoldLookback -#define TA_CDLBELTHOLD cdlBeltHold -#define TA_CDLBREAKAWAY_Lookback cdlBreakawayLookback -#define TA_CDLBREAKAWAY cdlBreakaway -#define TA_CDLCLOSINGMARUBOZU_Lookback cdlClosingMarubozuLookback -#define TA_CDLCLOSINGMARUBOZU cdlClosingMarubozu -#define TA_CDLCONCEALBABYSWALL_Lookback cdlConcealBabysWallLookback -#define TA_CDLCONCEALBABYSWALL cdlConcealBabysWall -#define TA_CDLCOUNTERATTACK_Lookback cdlCounterAttackLookback -#define TA_CDLCOUNTERATTACK cdlCounterAttack -#define TA_CDLDARKCLOUDCOVER_Lookback cdlDarkCloudCoverLookback -#define TA_CDLDARKCLOUDCOVER cdlDarkCloudCover -#define TA_CDLDOJI_Lookback cdlDojiLookback -#define TA_CDLDOJI cdlDoji -#define TA_CDLDOJISTAR_Lookback cdlDojiStarLookback -#define TA_CDLDOJISTAR cdlDojiStar -#define TA_CDLDRAGONFLYDOJI_Lookback cdlDragonflyDojiLookback -#define TA_CDLDRAGONFLYDOJI cdlDragonflyDoji -#define TA_CDLENGULFING_Lookback cdlEngulfingLookback -#define TA_CDLENGULFING cdlEngulfing -#define TA_CDLEVENINGDOJISTAR_Lookback cdlEveningDojiStarLookback -#define TA_CDLEVENINGDOJISTAR cdlEveningDojiStar -#define TA_CDLEVENINGSTAR_Lookback cdlEveningStarLookback -#define TA_CDLEVENINGSTAR cdlEveningStar -#define TA_CDLGAPSIDESIDEWHITE_Lookback cdlGapSideSideWhiteLookback -#define TA_CDLGAPSIDESIDEWHITE cdlGapSideSideWhite -#define TA_CDLGRAVESTONEDOJI_Lookback cdlGravestoneDojiLookback -#define TA_CDLGRAVESTONEDOJI cdlGravestoneDoji -#define TA_CDLHAMMER_Lookback cdlHammerLookback -#define TA_CDLHAMMER cdlHammer -#define TA_CDLHANGINGMAN_Lookback cdlHangingManLookback -#define TA_CDLHANGINGMAN cdlHangingMan -#define TA_CDLHARAMI_Lookback cdlHaramiLookback -#define TA_CDLHARAMI cdlHarami -#define TA_CDLHARAMICROSS_Lookback cdlHaramiCrossLookback -#define TA_CDLHARAMICROSS cdlHaramiCross -#define TA_CDLHIGHWAVE_Lookback cdlHignWaveLookback -#define TA_CDLHIGHWAVE cdlHignWave -#define TA_CDLHIKKAKE_Lookback cdlHikkakeLookback -#define TA_CDLHIKKAKE cdlHikkake -#define TA_CDLHIKKAKEMOD_Lookback cdlHikkakeModLookback -#define TA_CDLHIKKAKEMOD cdlHikkakeMod -#define TA_CDLHOMINGPIGEON_Lookback cdlHomingPigeonLookback -#define TA_CDLHOMINGPIGEON cdlHomingPigeon -#define TA_CDLIDENTICAL3CROWS_Lookback cdlIdentical3CrowsLookback -#define TA_CDLIDENTICAL3CROWS cdlIdentical3Crows -#define TA_CDLINNECK_Lookback cdlInNeckLookback -#define TA_CDLINNECK cdlInNeck -#define TA_CDLINVERTEDHAMMER_Lookback cdlInvertedHammerLookback -#define TA_CDLINVERTEDHAMMER cdlInvertedHammer -#define TA_CDLKICKING_Lookback cdlKickingLookback -#define TA_CDLKICKING cdlKicking -#define TA_CDLKICKINGBYLENGTH_Lookback cdlKickingByLengthLookback -#define TA_CDLKICKINGBYLENGTH cdlKickingByLength -#define TA_CDLLADDERBOTTOM_Lookback cdlLadderBottomLookback -#define TA_CDLLADDERBOTTOM cdlLadderBottom -#define TA_CDLLONGLEGGEDDOJI_Lookback cdlLongLeggedDojiLookback -#define TA_CDLLONGLEGGEDDOJI cdlLongLeggedDoji -#define TA_CDLLONGLINE_Lookback cdlLongLineLookback -#define TA_CDLLONGLINE cdlLongLine -#define TA_CDLMARUBOZU_Lookback cdlMarubozuLookback -#define TA_CDLMARUBOZU cdlMarubozu -#define TA_CDLMATCHINGLOW_Lookback cdlMatchingLowLookback -#define TA_CDLMATCHINGLOW cdlMatchingLow -#define TA_CDLMATHOLD_Lookback cdlMatHoldLookback -#define TA_CDLMATHOLD cdlMatHold -#define TA_CDLMORNINGDOJISTAR_Lookback cdlMorningDojiStarLookback -#define TA_CDLMORNINGDOJISTAR cdlMorningDojiStar -#define TA_CDLMORNINGSTAR_Lookback cdlMorningStarLookback -#define TA_CDLMORNINGSTAR cdlMorningStar -#define TA_CDLONNECK_Lookback cdlOnNeckLookback -#define TA_CDLONNECK cdlOnNeck -#define TA_CDLPIERCING_Lookback cdlPiercingLookback -#define TA_CDLPIERCING cdlPiercing -#define TA_CDLRICKSHAWMAN_Lookback cdlRickshawManLookback -#define TA_CDLRICKSHAWMAN cdlRickshawMan -#define TA_CDLRISEFALL3METHODS_Lookback cdlRiseFall3MethodsLookback -#define TA_CDLRISEFALL3METHODS cdlRiseFall3Methods -#define TA_CDLSEPARATINGLINES_Lookback cdlSeperatingLinesLookback -#define TA_CDLSEPARATINGLINES cdlSeperatingLines -#define TA_CDLSHOOTINGSTAR_Lookback cdlShootingStarLookback -#define TA_CDLSHOOTINGSTAR cdlShootingStar -#define TA_CDLSHORTLINE_Lookback cdlShortLineLookback -#define TA_CDLSHORTLINE cdlShortLine -#define TA_CDLSPINNINGTOP_Lookback cdlSpinningTopLookback -#define TA_CDLSPINNINGTOP cdlSpinningTop -#define TA_CDLSTALLEDPATTERN_Lookback cdlStalledPatternLookback -#define TA_CDLSTALLEDPATTERN cdlStalledPattern -#define TA_CDLSTICKSANDWICH_Lookback cdlStickSandwichLookback -#define TA_CDLSTICKSANDWICH cdlStickSandwich -#define TA_CDLTAKURI_Lookback cdlTakuriLookback -#define TA_CDLTAKURI cdlTakuri -#define TA_CDLTASUKIGAP_Lookback cdlTasukiGapLookback -#define TA_CDLTASUKIGAP cdlTasukiGap -#define TA_CDLTHRUSTING_Lookback cdlThrustingLookback -#define TA_CDLTHRUSTING cdlThrusting -#define TA_CDLTRISTAR_Lookback cdlTristarLookback -#define TA_CDLTRISTAR cdlTristar -#define TA_CDLUNIQUE3RIVER_Lookback cdlUnique3RiverLookback -#define TA_CDLUNIQUE3RIVER cdlUnique3River -#define TA_CDLUPSIDEGAP2CROWS_Lookback cdlUpsideGap2CrowsLookback -#define TA_CDLUPSIDEGAP2CROWS cdlUpsideGap2Crows -#define TA_CDLXSIDEGAP3METHODS_Lookback cdlXSideGap3MethodsLookback -#define TA_CDLXSIDEGAP3METHODS cdlXSideGap3Methods -#define TA_CEIL_Lookback ceilLookback -#define TA_CEIL ceil -#define TA_CMO_Lookback cmoLookback -#define TA_CMO cmo -#define TA_CORREL_Lookback correlLookback -#define TA_CORREL correl -#define TA_COS_Lookback cosLookback -#define TA_COS cos -#define TA_COSH_Lookback coshLookback -#define TA_COSH cosh -#define TA_DEMA_Lookback demaLookback -#define TA_DEMA dema -#define TA_DIV_Lookback divLookback -#define TA_DIV div -#define TA_DX_Lookback dxLookback -#define TA_DX dx -#define TA_EMA_Lookback emaLookback -#define TA_EMA ema -#define TA_EXP_Lookback expLookback -#define TA_EXP exp -#define TA_FLOOR_Lookback floorLookback -#define TA_FLOOR floor -#define TA_HT_DCPERIOD_Lookback htDcPeriodLookback -#define TA_HT_DCPERIOD htDcPeriod -#define TA_HT_DCPHASE_Lookback htDcPhaseLookback -#define TA_HT_DCPHASE htDcPhase -#define TA_HT_PHASOR_Lookback htPhasorLookback -#define TA_HT_PHASOR htPhasor -#define TA_HT_SINE_Lookback htSineLookback -#define TA_HT_SINE htSine -#define TA_HT_TRENDLINE_Lookback htTrendlineLookback -#define TA_HT_TRENDLINE htTrendline -#define TA_HT_TRENDMODE_Lookback htTrendModeLookback -#define TA_HT_TRENDMODE htTrendMode -#define TA_IMI_Lookback imiLookback -#define TA_IMI imi -#define TA_KAMA_Lookback kamaLookback -#define TA_KAMA kama -#define TA_LINEARREG_Lookback linearRegLookback -#define TA_LINEARREG linearReg -#define TA_LINEARREG_ANGLE_Lookback linearRegAngleLookback -#define TA_LINEARREG_ANGLE linearRegAngle -#define TA_LINEARREG_INTERCEPT_Lookback linearRegInterceptLookback -#define TA_LINEARREG_INTERCEPT linearRegIntercept -#define TA_LINEARREG_SLOPE_Lookback linearRegSlopeLookback -#define TA_LINEARREG_SLOPE linearRegSlope -#define TA_LN_Lookback lnLookback -#define TA_LN ln -#define TA_LOG10_Lookback log10Lookback -#define TA_LOG10 log10 -#define TA_MA_Lookback movingAverageLookback -#define TA_MA movingAverage -#define TA_MACD_Lookback macdLookback -#define TA_MACD macd -#define TA_MACDEXT_Lookback macdExtLookback -#define TA_MACDEXT macdExt -#define TA_MACDFIX_Lookback macdFixLookback -#define TA_MACDFIX macdFix -#define TA_MAMA_Lookback mamaLookback -#define TA_MAMA mama -#define TA_MAVP_Lookback movingAverageVariablePeriodLookback -#define TA_MAVP movingAverageVariablePeriod -#define TA_MAX_Lookback maxLookback -#define TA_MAX max -#define TA_MAXINDEX_Lookback maxIndexLookback -#define TA_MAXINDEX maxIndex -#define TA_MEDPRICE_Lookback medPriceLookback -#define TA_MEDPRICE medPrice -#define TA_MFI_Lookback mfiLookback -#define TA_MFI mfi -#define TA_MIDPOINT_Lookback midPointLookback -#define TA_MIDPOINT midPoint -#define TA_MIDPRICE_Lookback midPriceLookback -#define TA_MIDPRICE midPrice -#define TA_MIN_Lookback minLookback -#define TA_MIN min -#define TA_MININDEX_Lookback minIndexLookback -#define TA_MININDEX minIndex -#define TA_MINMAX_Lookback minMaxLookback -#define TA_MINMAX minMax -#define TA_MINMAXINDEX_Lookback minMaxIndexLookback -#define TA_MINMAXINDEX minMaxIndex -#define TA_MINUS_DI_Lookback minusDILookback -#define TA_MINUS_DI minusDI -#define TA_MINUS_DM_Lookback minusDMLookback -#define TA_MINUS_DM minusDM -#define TA_MOM_Lookback momLookback -#define TA_MOM mom -#define TA_MULT_Lookback multLookback -#define TA_MULT mult -#define TA_NATR_Lookback natrLookback -#define TA_NATR natr -#define TA_OBV_Lookback obvLookback -#define TA_OBV obv -#define TA_PLUS_DI_Lookback plusDILookback -#define TA_PLUS_DI plusDI -#define TA_PLUS_DM_Lookback plusDMLookback -#define TA_PLUS_DM plusDM -#define TA_PPO_Lookback ppoLookback -#define TA_PPO ppo -#define TA_ROC_Lookback rocLookback -#define TA_ROC roc -#define TA_ROCP_Lookback rocPLookback -#define TA_ROCP rocP -#define TA_ROCR_Lookback rocRLookback -#define TA_ROCR rocR -#define TA_ROCR100_Lookback rocR100Lookback -#define TA_ROCR100 rocR100 -#define TA_RSI_Lookback rsiLookback -#define TA_RSI rsi -#define TA_SAR_Lookback sarLookback -#define TA_SAR sar -#define TA_SAREXT_Lookback sarExtLookback -#define TA_SAREXT sarExt -#define TA_SIN_Lookback sinLookback -#define TA_SIN sin -#define TA_SINH_Lookback sinhLookback -#define TA_SINH sinh -#define TA_SMA_Lookback smaLookback -#define TA_SMA sma -#define TA_SQRT_Lookback sqrtLookback -#define TA_SQRT sqrt -#define TA_STDDEV_Lookback stdDevLookback -#define TA_STDDEV stdDev -#define TA_STOCH_Lookback stochLookback -#define TA_STOCH stoch -#define TA_STOCHF_Lookback stochFLookback -#define TA_STOCHF stochF -#define TA_STOCHRSI_Lookback stochRsiLookback -#define TA_STOCHRSI stochRsi -#define TA_SUB_Lookback subLookback -#define TA_SUB sub -#define TA_SUM_Lookback sumLookback -#define TA_SUM sum -#define TA_T3_Lookback t3Lookback -#define TA_T3 t3 -#define TA_TAN_Lookback tanLookback -#define TA_TAN tan -#define TA_TANH_Lookback tanhLookback -#define TA_TANH tanh -#define TA_TEMA_Lookback temaLookback -#define TA_TEMA tema -#define TA_TRANGE_Lookback trueRangeLookback -#define TA_TRANGE trueRange -#define TA_TRIMA_Lookback trimaLookback -#define TA_TRIMA trima -#define TA_TRIX_Lookback trixLookback -#define TA_TRIX trix -#define TA_TSF_Lookback tsfLookback -#define TA_TSF tsf -#define TA_TYPPRICE_Lookback typPriceLookback -#define TA_TYPPRICE typPrice -#define TA_ULTOSC_Lookback ultOscLookback -#define TA_ULTOSC ultOsc -#define TA_VAR_Lookback varianceLookback -#define TA_VAR variance -#define TA_WCLPRICE_Lookback wclPriceLookback -#define TA_WCLPRICE wclPrice -#define TA_WILLR_Lookback willRLookback -#define TA_WILLR willR -#define TA_WMA_Lookback wmaLookback -#define TA_WMA wma - -/*************** - * End of File * - ***************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_a.c b/src/ta-lib/src/ta_abstract/tables/table_a.c deleted file mode 100644 index f85115c98..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_a.c +++ /dev/null @@ -1,441 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'A' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* ACCBANDS BEGIN */ - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_ACCBANDS_Middle = - { TA_Output_Real, "outRealMiddleBand", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_ACCBANDS_Upper = - { TA_Output_Real, "outRealUpperBand", TA_OUT_UPPER_LIMIT }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_ACCBANDS_Lower = - { TA_Output_Real, "outRealLowerBand", TA_OUT_LOWER_LIMIT }; - -static const TA_InputParameterInfo *TA_ACCBANDS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_ACCBANDS_Outputs[] = -{ - &TA_DEF_UI_Output_Real_ACCBANDS_Upper, - &TA_DEF_UI_Output_Real_ACCBANDS_Middle, - &TA_DEF_UI_Output_Real_ACCBANDS_Lower, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ACCBANDS_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_20_MINIMUM2, - NULL -}; - -DEF_FUNCTION( ACCBANDS, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Acceleration Bands", /* hint */ - "Accbands", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* ACCBANDS END */ - - -/* ACOS BEGIN */ -DEF_MATH_UNARY_OPERATOR( ACOS, "Vector Trigonometric ACos", "Acos" ) -/* ACOS END */ - -/* AD BEGIN */ -static const TA_InputParameterInfo *TA_AD_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLCV, - NULL -}; - -static const TA_OutputParameterInfo *TA_AD_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_AD_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( AD, /* name */ - TA_GroupId_VolumeIndicators, /* groupId */ - "Chaikin A/D Line", /* hint */ - "Ad", /* CamelCase name */ - 0 /* flags */ - ); -/* AD END */ - -/* ADD BEGIN */ -DEF_MATH_BINARY_OPERATOR( ADD, "Vector Arithmetic Add", "Add" ) -/* ADD END */ - -/* ADOSC BEGIN */ -static const TA_OptInputParameterInfo TA_DEF_UI_FastADOSC_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInFastPeriod", /* paramName */ - 0, /* flags */ - - "Fast Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 3, /* defaultValue */ - "Number of period for the fast MA", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_SlowADOSC_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInSlowPeriod", /* paramName */ - 0, /* flags */ - - "Slow Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */ - 10, /* defaultValue */ - "Number of period for the slow MA", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_InputParameterInfo *TA_ADOSC_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLCV, - NULL -}; - -static const TA_OutputParameterInfo *TA_ADOSC_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ADOSC_OptInputs[] = -{ - &TA_DEF_UI_FastADOSC_Period, - &TA_DEF_UI_SlowADOSC_Period, - NULL -}; - -DEF_FUNCTION( ADOSC, /* name */ - TA_GroupId_VolumeIndicators, /* groupId */ - "Chaikin A/D Oscillator", /* hint */ - "AdOsc", /* CamelCase name */ - 0 /* flags */ - ); -/* ADOSC END */ - -/* ADX BEGIN */ -static const TA_InputParameterInfo *TA_ADX_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_ADX_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ADX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( ADX, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Average Directional Movement Index", /* hint */ - "Adx", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* ADX END */ - -/* ADXR BEGIN */ -static const TA_InputParameterInfo *TA_ADXR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_ADXR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ADXR_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( ADXR, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Average Directional Movement Index Rating", /* hint */ - "Adxr", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* ADXR END */ - -/* APO BEGIN */ -static const TA_InputParameterInfo *TA_APO_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_APO_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_APO_OptInputs[] = -{ &TA_DEF_UI_Fast_Period, - &TA_DEF_UI_Slow_Period, - &TA_DEF_UI_MA_Method, - NULL -}; - -DEF_FUNCTION( APO, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Absolute Price Oscillator", /* hint */ - "Apo", /* CamelCase name */ - 0 /* flags */ - ); -/* APO END */ - -/* AROON BEGIN */ -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_AroonUp = - { TA_Output_Real, "outAroonDown", TA_OUT_DASH_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_AroonDown = - { TA_Output_Real, "outAroonUp", TA_OUT_LINE }; - -static const TA_InputParameterInfo *TA_AROON_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_AROON_Outputs[] = -{ - &TA_DEF_UI_Output_Real_AroonUp, - &TA_DEF_UI_Output_Real_AroonDown, - NULL -}; - -static const TA_OptInputParameterInfo *TA_AROON_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( AROON, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Aroon", /* hint */ - "Aroon", /* CamelCase name */ - 0 /* flags */ - ); - -/* AROON END */ - -/* AROONOSC BEGIN */ -static const TA_InputParameterInfo *TA_AROONOSC_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_AROONOSC_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_AROONOSC_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( AROONOSC, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Aroon Oscillator", /* hint */ - "AroonOsc", /* CamelCase name */ - 0 /* flags */ - ); - -/* AROONOSC END */ - -/* ASIN BEGIN */ -DEF_MATH_UNARY_OPERATOR( ASIN, "Vector Trigonometric ASin", "Asin" ) -/* ASIN END */ - -/* ATAN BEGIN */ -DEF_MATH_UNARY_OPERATOR( ATAN, "Vector Trigonometric ATan", "Atan" ) -/* ATAN END */ - -/* ATR BEGIN */ -static const TA_InputParameterInfo *TA_ATR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_ATR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ATR_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14, - NULL -}; - -DEF_FUNCTION( ATR, /* name */ - TA_GroupId_VolatilityIndicators, /* groupId */ - "Average True Range", /* hint */ - "Atr", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* ATR END */ - -/* AVGPRICE BEGIN */ -static const TA_InputParameterInfo *TA_AVGPRICE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_AVGPRICE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_AVGPRICE_OptInputs[] = { NULL }; - -DEF_FUNCTION( AVGPRICE, /* name */ - TA_GroupId_PriceTransform, /* groupId */ - "Average Price", /* hint */ - "AvgPrice", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* AVGPRICE END */ - -/* AVGDEV BEGIN */ -static const TA_InputParameterInfo *TA_AVGDEV_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_AVGDEV_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_AVGDEV_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( AVGDEV, /* name */ - TA_GroupId_PriceTransform, /* groupId*/ - "Average Deviation", /* hint */ - "AvgDev", /* CamelCase name*/ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* AVGDEV END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableA[] = -{ - ADD_TO_TABLE(ACCBANDS), - ADD_TO_TABLE(ACOS), - ADD_TO_TABLE(AD), - ADD_TO_TABLE(ADD), - ADD_TO_TABLE(ADOSC), - ADD_TO_TABLE(ADX), - ADD_TO_TABLE(ADXR), - ADD_TO_TABLE(APO), - ADD_TO_TABLE(AROON), - ADD_TO_TABLE(AROONOSC), - ADD_TO_TABLE(ASIN), - ADD_TO_TABLE(ATAN), - ADD_TO_TABLE(ATR), - ADD_TO_TABLE(AVGPRICE), - ADD_TO_TABLE(AVGDEV), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableASize = - ((sizeof(TA_DEF_TableA)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_b.c b/src/ta-lib/src/ta_abstract/tables/table_b.c deleted file mode 100644 index e0fdc4bec..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_b.c +++ /dev/null @@ -1,196 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'B' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* BBANDS BEGIN */ - -/* Nb Deviation up/down is used for bollinger bands. */ -const TA_OptInputParameterInfo TA_DEF_UI_NbDeviationUp = -{ - TA_OptInput_RealRange, /* type */ - "optInNbDevUp", /* paramName */ - 0, /* flags */ - - "Deviations up", /* displayName */ - (const void *)&TA_DEF_NbDeviation, /* dataSet */ - 2.0, /* defaultValue */ - "Deviation multiplier for upper band", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_NbDeviationDn = -{ - TA_OptInput_RealRange, /* type */ - "optInNbDevDn", /* paramName */ - 0, /* flags */ - - "Deviations down", /* displayName */ - (const void *)&TA_DEF_NbDeviation, /* dataSet */ - 2.0, /* defaultValue */ - "Deviation multiplier for lower band", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_BBANDS_Middle = - { TA_Output_Real, "outRealMiddleBand", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_BBANDS_Upper = - { TA_Output_Real, "outRealUpperBand", TA_OUT_UPPER_LIMIT }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_BBANDS_Lower = - { TA_Output_Real, "outRealLowerBand", TA_OUT_LOWER_LIMIT }; - -static const TA_InputParameterInfo *TA_BBANDS_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_BBANDS_Outputs[] = -{ - &TA_DEF_UI_Output_Real_BBANDS_Upper, - &TA_DEF_UI_Output_Real_BBANDS_Middle, - &TA_DEF_UI_Output_Real_BBANDS_Lower, - NULL -}; - -static const TA_OptInputParameterInfo *TA_BBANDS_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_5_MINIMUM2, - &TA_DEF_UI_NbDeviationUp, - &TA_DEF_UI_NbDeviationDn, - &TA_DEF_UI_MA_Method, - NULL -}; - -DEF_FUNCTION( BBANDS, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Bollinger Bands", /* hint */ - "Bbands", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* BBANDS END */ - - -/* BOP BEGIN */ -static const TA_InputParameterInfo *TA_BOP_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_BOP_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_BOP_OptInputs[] = { NULL }; - -DEF_FUNCTION( BOP, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Balance Of Power", /* hint */ - "Bop", /* CamelCase name */ - 0 /* flags */ - ); -/* BOP END */ - -/* BETA BEGIN */ -static const TA_InputParameterInfo *TA_BETA_Inputs[] = -{ - &TA_DEF_UI_Input_Real0, - &TA_DEF_UI_Input_Real1, - NULL -}; - -static const TA_OutputParameterInfo *TA_BETA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_BETA_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_5, - NULL -}; - -DEF_FUNCTION( BETA, /* name */ - TA_GroupId_Statistic, /* groupId */ - "Beta", /* hint */ - "Beta", /* CamelCase name */ - 0 /* flags */ - ); -/* BETA END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableB[] = -{ - ADD_TO_TABLE(BBANDS), - ADD_TO_TABLE(BETA), - ADD_TO_TABLE(BOP), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableBSize = - ((sizeof(TA_DEF_TableB)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_c.c b/src/ta-lib/src/ta_abstract/tables/table_c.c deleted file mode 100644 index 717f56a1b..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_c.c +++ /dev/null @@ -1,1885 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'C' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* CCI BEGIN */ -static const TA_InputParameterInfo *TA_CCI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CCI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CCI_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( CCI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Commodity Channel Index", /* hint */ - "Cci", /* CamelCase name */ - 0 /* flags */ ); - -/* CCI END */ - -/* CDL2CROWS BEGIN */ -static const TA_InputParameterInfo *TA_CDL2CROWS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL2CROWS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL2CROWS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL2CROWS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Two Crows", /* hint */ - "Cdl2Crows", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL2CROWS END */ - -/* CDL3BLACKCROWS BEGIN */ -static const TA_InputParameterInfo *TA_CDL3BLACKCROWS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL3BLACKCROWS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL3BLACKCROWS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL3BLACKCROWS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Three Black Crows", /* hint */ - "Cdl3BlackCrows", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL3BLACKCROWS END */ - -/* CDL3INSIDE BEGIN */ -static const TA_InputParameterInfo *TA_CDL3INSIDE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL3INSIDE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL3INSIDE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL3INSIDE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Three Inside Up/Down", /* hint */ - "Cdl3Inside", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL3INSIDE END */ - -/* CDL3LINESTRIKE BEGIN */ -static const TA_InputParameterInfo *TA_CDL3LINESTRIKE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL3LINESTRIKE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL3LINESTRIKE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL3LINESTRIKE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Three-Line Strike ", /* hint */ - "Cdl3LineStrike", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL3LINESTRIKE END */ - -/* CDL3OUTSIDE BEGIN */ -static const TA_InputParameterInfo *TA_CDL3OUTSIDE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL3OUTSIDE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL3OUTSIDE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL3OUTSIDE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Three Outside Up/Down", /* hint */ - "Cdl3Outside", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL3OUTSIDE END */ - -/* CDL3STARSINSOUTH BEGIN */ -static const TA_InputParameterInfo *TA_CDL3STARSINSOUTH_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL3STARSINSOUTH_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL3STARSINSOUTH_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL3STARSINSOUTH, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Three Stars In The South", /* hint */ - "Cdl3StarsInSouth", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL3STARSINSOUTH END */ - -/* CDL3WHITESOLDIERS BEGIN */ -static const TA_InputParameterInfo *TA_CDL3WHITESOLDIERS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDL3WHITESOLDIERS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDL3WHITESOLDIERS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDL3WHITESOLDIERS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Three Advancing White Soldiers", /* hint */ - "Cdl3WhiteSoldiers", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDL3WHITESOLDIERS END */ - -/* CDLABANDONEDBABY BEGIN */ -static const TA_InputParameterInfo *TA_CDLABANDONEDBABY_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLABANDONEDBABY_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLABANDONEDBABY_OptInputs[] = -{ - &TA_DEF_UI_Penetration_30, - NULL -}; - -DEF_FUNCTION( CDLABANDONEDBABY, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Abandoned Baby", /* hint */ - "CdlAbandonedBaby", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLABANDONEDBABY END */ - -/* CDLADVANCEBLOCK BEGIN */ -static const TA_InputParameterInfo *TA_CDLADVANCEBLOCK_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLADVANCEBLOCK_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLADVANCEBLOCK_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLADVANCEBLOCK, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Advance Block", /* hint */ - "CdlAdvanceBlock", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLADVANCEBLOCK END */ - -/* CDLBELTHOLD BEGIN */ -static const TA_InputParameterInfo *TA_CDLBELTHOLD_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLBELTHOLD_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLBELTHOLD_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLBELTHOLD, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Belt-hold", /* hint */ - "CdlBeltHold", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLBELTHOLD END */ - -/* CDLBREAKAWAY BEGIN */ -static const TA_InputParameterInfo *TA_CDLBREAKAWAY_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLBREAKAWAY_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLBREAKAWAY_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLBREAKAWAY, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Breakaway", /* hint */ - "CdlBreakaway", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLBREAKAWAY END */ - -/* CDLCLOSINGMARUBOZU BEGIN */ -static const TA_InputParameterInfo *TA_CDLCLOSINGMARUBOZU_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLCLOSINGMARUBOZU_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLCLOSINGMARUBOZU_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLCLOSINGMARUBOZU, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Closing Marubozu", /* hint */ - "CdlClosingMarubozu", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLCLOSINGMARUBOZU END */ - -/* CDLCONCEALBABYSWALL BEGIN */ -static const TA_InputParameterInfo *TA_CDLCONCEALBABYSWALL_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLCONCEALBABYSWALL_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLCONCEALBABYSWALL_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLCONCEALBABYSWALL, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Concealing Baby Swallow", /* hint */ - "CdlConcealBabysWall", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLCONCEALBABYSWALL END */ - -/* CDLCOUNTERATTACK BEGIN */ -static const TA_InputParameterInfo *TA_CDLCOUNTERATTACK_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLCOUNTERATTACK_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLCOUNTERATTACK_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLCOUNTERATTACK, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Counterattack", /* hint */ - "CdlCounterAttack", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLCOUNTERATTACK END */ - -/* CDLDARKCLOUDCOVER BEGIN */ -static const TA_InputParameterInfo *TA_CDLDARKCLOUDCOVER_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLDARKCLOUDCOVER_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLDARKCLOUDCOVER_OptInputs[] = -{ - &TA_DEF_UI_Penetration_50, - NULL -}; - -DEF_FUNCTION( CDLDARKCLOUDCOVER, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Dark Cloud Cover", /* hint */ - "CdlDarkCloudCover", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLDARKCLOUDCOVER END */ - -/* CDLDOJI BEGIN */ -static const TA_InputParameterInfo *TA_CDLDOJI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLDOJI_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLDOJI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLDOJI, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Doji", /* hint */ - "CdlDoji", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLDOJI END */ - -/* CDLDOJISTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLDOJISTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLDOJISTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLDOJISTAR_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLDOJISTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Doji Star", /* hint */ - "CdlDojiStar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLDOJISTAR END */ - -/* CDLDRAGONFLYDOJI BEGIN */ -static const TA_InputParameterInfo *TA_CDLDRAGONFLYDOJI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLDRAGONFLYDOJI_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLDRAGONFLYDOJI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLDRAGONFLYDOJI, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Dragonfly Doji", /* hint */ - "CdlDragonflyDoji", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLDRAGONFLYDOJI END */ - -/* CDLENGULFING BEGIN */ -static const TA_InputParameterInfo *TA_CDLENGULFING_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLENGULFING_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLENGULFING_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLENGULFING, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Engulfing Pattern", /* hint */ - "CdlEngulfing", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLENGULFING END */ - -/* CDLEVENINGDOJISTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLEVENINGDOJISTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLEVENINGDOJISTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLEVENINGDOJISTAR_OptInputs[] = -{ - &TA_DEF_UI_Penetration_30, - NULL -}; - -DEF_FUNCTION( CDLEVENINGDOJISTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Evening Doji Star", /* hint */ - "CdlEveningDojiStar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLEVENINGDOJISTAR END */ - -/* CDLEVENINGSTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLEVENINGSTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLEVENINGSTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLEVENINGSTAR_OptInputs[] = -{ - &TA_DEF_UI_Penetration_30, - NULL -}; - -DEF_FUNCTION( CDLEVENINGSTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Evening Star", /* hint */ - "CdlEveningStar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLEVENINGSTAR END */ - -/* CDLEVENINGDOJISTAR END */ - -/* CDLGAPSIDESIDEWHITE BEGIN */ -static const TA_InputParameterInfo *TA_CDLGAPSIDESIDEWHITE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLGAPSIDESIDEWHITE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLGAPSIDESIDEWHITE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLGAPSIDESIDEWHITE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Up/Down-gap side-by-side white lines", /* hint */ - "CdlGapSideSideWhite", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLGAPSIDESIDEWHITE END */ - -/* CDLGRAVESTONEDOJI BEGIN */ -static const TA_InputParameterInfo *TA_CDLGRAVESTONEDOJI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLGRAVESTONEDOJI_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLGRAVESTONEDOJI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLGRAVESTONEDOJI, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Gravestone Doji", /* hint */ - "CdlGravestoneDoji", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLGRAVESTONEDOJI END */ - -/* CDLHAMMER BEGIN */ -static const TA_InputParameterInfo *TA_CDLHAMMER_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHAMMER_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHAMMER_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHAMMER, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Hammer", /* hint */ - "CdlHammer", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHAMMER END */ - -/* CDLHANGINGMAN BEGIN */ -static const TA_InputParameterInfo *TA_CDLHANGINGMAN_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHANGINGMAN_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHANGINGMAN_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHANGINGMAN, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Hanging Man", /* hint */ - "CdlHangingMan", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHANGINGMAN END */ - -/* CDLHARAMI BEGIN */ -static const TA_InputParameterInfo *TA_CDLHARAMI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHARAMI_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHARAMI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHARAMI, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Harami Pattern", /* hint */ - "CdlHarami", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHARAMI END */ - -/* CDLHARAMICROSS BEGIN */ -static const TA_InputParameterInfo *TA_CDLHARAMICROSS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHARAMICROSS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHARAMICROSS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHARAMICROSS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Harami Cross Pattern", /* hint */ - "CdlHaramiCross", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHARAMICROSS END */ - -/* CDLHIGHWAVE BEGIN */ -static const TA_InputParameterInfo *TA_CDLHIGHWAVE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHIGHWAVE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHIGHWAVE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHIGHWAVE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "High-Wave Candle", /* hint */ - "CdlHignWave", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHIGHWAVE END */ - -/* CDLHIKKAKE BEGIN */ -static const TA_InputParameterInfo *TA_CDLHIKKAKE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHIKKAKE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHIKKAKE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHIKKAKE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Hikkake Pattern", /* hint */ - "CdlHikkake", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHIKKAKE END */ - -/* CDLHIKKAKEMOD BEGIN */ -static const TA_InputParameterInfo *TA_CDLHIKKAKEMOD_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHIKKAKEMOD_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHIKKAKEMOD_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHIKKAKEMOD, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Modified Hikkake Pattern", /* hint */ - "CdlHikkakeMod", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHIKKAKEMOD END */ - -/* CDLHOMINGPIGEON BEGIN */ -static const TA_InputParameterInfo *TA_CDLHOMINGPIGEON_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLHOMINGPIGEON_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLHOMINGPIGEON_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLHOMINGPIGEON, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Homing Pigeon", /* hint */ - "CdlHomingPigeon", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLHOMINGPIGEON END */ - -/* CDLIDENTICAL3CROWS BEGIN */ -static const TA_InputParameterInfo *TA_CDLIDENTICAL3CROWS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLIDENTICAL3CROWS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLIDENTICAL3CROWS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLIDENTICAL3CROWS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Identical Three Crows", /* hint */ - "CdlIdentical3Crows", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLIDENTICAL3CROWS END */ - -/* CDLINNECK BEGIN */ -static const TA_InputParameterInfo *TA_CDLINNECK_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLINNECK_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLINNECK_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLINNECK, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "In-Neck Pattern", /* hint */ - "CdlInNeck", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLINNECK END */ - -/* CDLINVERTEDHAMMER BEGIN */ -static const TA_InputParameterInfo *TA_CDLINVERTEDHAMMER_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLINVERTEDHAMMER_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLINVERTEDHAMMER_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLINVERTEDHAMMER, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Inverted Hammer", /* hint */ - "CdlInvertedHammer", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLINVERTEDHAMMER END */ - -/* CDLKICKING BEGIN */ -static const TA_InputParameterInfo *TA_CDLKICKING_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLKICKING_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLKICKING_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLKICKING, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Kicking", /* hint */ - "CdlKicking", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLKICKING END */ - -/* CDLKICKINGBYLENGTH BEGIN */ -static const TA_InputParameterInfo *TA_CDLKICKINGBYLENGTH_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLKICKINGBYLENGTH_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLKICKINGBYLENGTH_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLKICKINGBYLENGTH, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Kicking - bull/bear determined by the longer marubozu", /* hint */ - "CdlKickingByLength", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLKICKINGBYLENGTH END */ - -/* CDLLADDERBOTTOM BEGIN */ -static const TA_InputParameterInfo *TA_CDLLADDERBOTTOM_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLLADDERBOTTOM_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLLADDERBOTTOM_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLLADDERBOTTOM, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Ladder Bottom", /* hint */ - "CdlLadderBottom", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLLADDERBOTTOM END */ - -/* CDLLONGLEGGEDDOJI BEGIN */ -static const TA_InputParameterInfo *TA_CDLLONGLEGGEDDOJI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLLONGLEGGEDDOJI_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLLONGLEGGEDDOJI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLLONGLEGGEDDOJI, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Long Legged Doji", /* hint */ - "CdlLongLeggedDoji", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLLONGLEGGEDDOJI END */ - -/* CDLLONGLINE BEGIN */ -static const TA_InputParameterInfo *TA_CDLLONGLINE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLLONGLINE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLLONGLINE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLLONGLINE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Long Line Candle", /* hint */ - "CdlLongLine", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLLONGLINE END */ - -/* CDLMARUBOZU BEGIN */ -static const TA_InputParameterInfo *TA_CDLMARUBOZU_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLMARUBOZU_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLMARUBOZU_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLMARUBOZU, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Marubozu", /* hint */ - "CdlMarubozu", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLMARUBOZU END */ - -/* CDLMATCHINGLOW BEGIN */ -static const TA_InputParameterInfo *TA_CDLMATCHINGLOW_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLMATCHINGLOW_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLMATCHINGLOW_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLMATCHINGLOW, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Matching Low", /* hint */ - "CdlMatchingLow", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLMATCHINGLOW END */ - -/* CDLMATHOLD BEGIN */ -static const TA_InputParameterInfo *TA_CDLMATHOLD_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLMATHOLD_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLMATHOLD_OptInputs[] = -{ - &TA_DEF_UI_Penetration_50, - NULL -}; - -DEF_FUNCTION( CDLMATHOLD, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Mat Hold", /* hint */ - "CdlMatHold", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLMATHOLD END */ - -/* CDLMORNINGDOJISTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLMORNINGDOJISTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLMORNINGDOJISTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLMORNINGDOJISTAR_OptInputs[] = -{ - &TA_DEF_UI_Penetration_30, - NULL -}; - -DEF_FUNCTION( CDLMORNINGDOJISTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Morning Doji Star", /* hint */ - "CdlMorningDojiStar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLMORNINGDOJISTAR END */ - -/* CDLMORNINGSTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLMORNINGSTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLMORNINGSTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLMORNINGSTAR_OptInputs[] = -{ - &TA_DEF_UI_Penetration_30, - NULL -}; - -DEF_FUNCTION( CDLMORNINGSTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Morning Star", /* hint */ - "CdlMorningStar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLMORNINGSTAR END */ - -/* CDLONNECK BEGIN */ -static const TA_InputParameterInfo *TA_CDLONNECK_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLONNECK_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLONNECK_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLONNECK, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "On-Neck Pattern", /* hint */ - "CdlOnNeck", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLONNECK END */ - -/* CDLPIERCING BEGIN */ -static const TA_InputParameterInfo *TA_CDLPIERCING_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLPIERCING_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLPIERCING_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLPIERCING, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Piercing Pattern", /* hint */ - "CdlPiercing", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLPIERCING END */ - -/* CDLRICKSHAWMAN BEGIN */ -static const TA_InputParameterInfo *TA_CDLRICKSHAWMAN_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLRICKSHAWMAN_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLRICKSHAWMAN_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLRICKSHAWMAN, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Rickshaw Man", /* hint */ - "CdlRickshawMan", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLRICKSHAWMAN END */ - -/* CDLRISEFALL3METHODS BEGIN */ -static const TA_InputParameterInfo *TA_CDLRISEFALL3METHODS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLRISEFALL3METHODS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLRISEFALL3METHODS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLRISEFALL3METHODS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Rising/Falling Three Methods", /* hint */ - "CdlRiseFall3Methods", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLRISEFALL3METHODS END */ - -/* CDLSEPARATINGLINES BEGIN */ -static const TA_InputParameterInfo *TA_CDLSEPARATINGLINES_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLSEPARATINGLINES_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLSEPARATINGLINES_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLSEPARATINGLINES, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Separating Lines", /* hint */ - "CdlSeperatingLines", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLSEPARATINGLINES END */ - -/* CDLSHOOTINGSTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLSHOOTINGSTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLSHOOTINGSTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLSHOOTINGSTAR_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLSHOOTINGSTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Shooting Star", /* hint */ - "CdlShootingStar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLSHOOTINGSTAR END */ - -/* CDLSHORTLINE BEGIN */ -static const TA_InputParameterInfo *TA_CDLSHORTLINE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLSHORTLINE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLSHORTLINE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLSHORTLINE, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Short Line Candle", /* hint */ - "CdlShortLine", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLSHORTLINE END */ - -/* CDLSPINNINGTOP BEGIN */ -static const TA_InputParameterInfo *TA_CDLSPINNINGTOP_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLSPINNINGTOP_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLSPINNINGTOP_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLSPINNINGTOP, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Spinning Top", /* hint */ - "CdlSpinningTop", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLSPINNINGTOP END */ - -/* CDLSTALLEDPATTERN BEGIN */ -static const TA_InputParameterInfo *TA_CDLSTALLEDPATTERN_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLSTALLEDPATTERN_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLSTALLEDPATTERN_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLSTALLEDPATTERN, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Stalled Pattern", /* hint */ - "CdlStalledPattern", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLSTALLEDPATTERN END */ - -/* CDLSTICKSANDWICH BEGIN */ -static const TA_InputParameterInfo *TA_CDLSTICKSANDWICH_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLSTICKSANDWICH_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLSTICKSANDWICH_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLSTICKSANDWICH, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Stick Sandwich", /* hint */ - "CdlStickSandwich", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLSTICKSANDWICH END */ - -/* CDLTAKURI BEGIN */ -static const TA_InputParameterInfo *TA_CDLTAKURI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLTAKURI_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLTAKURI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLTAKURI, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Takuri (Dragonfly Doji with very long lower shadow)", /* hint */ - "CdlTakuri", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLTAKURI END */ - -/* CDLTASUKIGAP BEGIN */ -static const TA_InputParameterInfo *TA_CDLTASUKIGAP_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLTASUKIGAP_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLTASUKIGAP_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLTASUKIGAP, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Tasuki Gap", /* hint */ - "CdlTasukiGap", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLTASUKIGAP END */ - -/* CDLTHRUSTING BEGIN */ -static const TA_InputParameterInfo *TA_CDLTHRUSTING_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLTHRUSTING_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLTHRUSTING_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLTHRUSTING, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Thrusting Pattern", /* hint */ - "CdlThrusting", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLTHRUSTING END */ - -/* CDLTRISTAR BEGIN */ -static const TA_InputParameterInfo *TA_CDLTRISTAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLTRISTAR_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLTRISTAR_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLTRISTAR, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Tristar Pattern", /* hint */ - "CdlTristar", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLTRISTAR END */ - -/* CDLUNIQUE3RIVER BEGIN */ -static const TA_InputParameterInfo *TA_CDLUNIQUE3RIVER_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLUNIQUE3RIVER_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLUNIQUE3RIVER_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLUNIQUE3RIVER, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Unique 3 River", /* hint */ - "CdlUnique3River", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLUNIQUE3RIVER END */ - -/* CDLUPSIDEGAP2CROWS BEGIN */ -static const TA_InputParameterInfo *TA_CDLUPSIDEGAP2CROWS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLUPSIDEGAP2CROWS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLUPSIDEGAP2CROWS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLUPSIDEGAP2CROWS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Upside Gap Two Crows", /* hint */ - "CdlUpsideGap2Crows", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLUPSIDEGAP2CROWS END */ - -/* CDLXSIDEGAP3METHODS BEGIN */ -static const TA_InputParameterInfo *TA_CDLXSIDEGAP3METHODS_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OHLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_CDLXSIDEGAP3METHODS_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CDLXSIDEGAP3METHODS_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( CDLXSIDEGAP3METHODS, /* name */ - TA_GroupId_PatternRecognition, /* groupId */ - "Upside/Downside Gap Three Methods", /* hint */ - "CdlXSideGap3Methods", /* CamelCase name */ - TA_FUNC_FLG_CANDLESTICK /* flags */ - ); - -/* CDLXSIDEGAP3METHODS END */ - -/* CEIL BEGIN */ -DEF_MATH_UNARY_OPERATOR( CEIL, "Vector Ceil", "Ceil" ) -/* CEIL END */ - -/* CMO BEGIN */ -static const TA_InputParameterInfo *TA_CMO_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_CMO_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CMO_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( CMO, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Chande Momentum Oscillator", /* hint */ - "Cmo", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* CMO END */ - -/* CORREL BEGIN */ -static const TA_InputParameterInfo *TA_CORREL_Inputs[] = -{ - &TA_DEF_UI_Input_Real0, - &TA_DEF_UI_Input_Real1, - NULL -}; - -static const TA_OutputParameterInfo *TA_CORREL_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_CORREL_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30, - NULL -}; - -DEF_FUNCTION( CORREL, /* name */ - TA_GroupId_Statistic, /* groupId */ - "Pearson's Correlation Coefficient (r)", /* hint */ - "Correl", /* CamelCase name */ - 0 /* flags */ - ); -/* CORREL END */ - -/* COS BEGIN */ -DEF_MATH_UNARY_OPERATOR( COS, "Vector Trigonometric Cos", "Cos" ) -/* COS END */ - -/* COSH BEGIN */ -DEF_MATH_UNARY_OPERATOR( COSH, "Vector Trigonometric Cosh", "Cosh" ) -/* COSH END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableC[] = -{ - ADD_TO_TABLE(CCI), - ADD_TO_TABLE(CDL2CROWS), - ADD_TO_TABLE(CDL3BLACKCROWS), - ADD_TO_TABLE(CDL3INSIDE), - ADD_TO_TABLE(CDL3LINESTRIKE), - ADD_TO_TABLE(CDL3OUTSIDE), - ADD_TO_TABLE(CDL3STARSINSOUTH), - ADD_TO_TABLE(CDL3WHITESOLDIERS), - ADD_TO_TABLE(CDLABANDONEDBABY), - ADD_TO_TABLE(CDLADVANCEBLOCK), - ADD_TO_TABLE(CDLBELTHOLD), - ADD_TO_TABLE(CDLBREAKAWAY), - ADD_TO_TABLE(CDLCLOSINGMARUBOZU), - ADD_TO_TABLE(CDLCONCEALBABYSWALL), - ADD_TO_TABLE(CDLCOUNTERATTACK), - ADD_TO_TABLE(CDLDARKCLOUDCOVER), - ADD_TO_TABLE(CDLDOJI), - ADD_TO_TABLE(CDLDOJISTAR), - ADD_TO_TABLE(CDLDRAGONFLYDOJI), - ADD_TO_TABLE(CDLENGULFING), - ADD_TO_TABLE(CDLEVENINGDOJISTAR), - ADD_TO_TABLE(CDLEVENINGSTAR), - ADD_TO_TABLE(CDLGAPSIDESIDEWHITE), - ADD_TO_TABLE(CDLGRAVESTONEDOJI), - ADD_TO_TABLE(CDLHAMMER), - ADD_TO_TABLE(CDLHANGINGMAN), - ADD_TO_TABLE(CDLHARAMI), - ADD_TO_TABLE(CDLHARAMICROSS), - ADD_TO_TABLE(CDLHIGHWAVE), - ADD_TO_TABLE(CDLHIKKAKE), - ADD_TO_TABLE(CDLHIKKAKEMOD), - ADD_TO_TABLE(CDLHOMINGPIGEON), - ADD_TO_TABLE(CDLIDENTICAL3CROWS), - ADD_TO_TABLE(CDLINNECK), - ADD_TO_TABLE(CDLINVERTEDHAMMER), - ADD_TO_TABLE(CDLKICKING), - ADD_TO_TABLE(CDLKICKINGBYLENGTH), - ADD_TO_TABLE(CDLLADDERBOTTOM), - ADD_TO_TABLE(CDLLONGLEGGEDDOJI), - ADD_TO_TABLE(CDLLONGLINE), - ADD_TO_TABLE(CDLMARUBOZU), - ADD_TO_TABLE(CDLMATCHINGLOW), - ADD_TO_TABLE(CDLMATHOLD), - ADD_TO_TABLE(CDLMORNINGDOJISTAR), - ADD_TO_TABLE(CDLMORNINGSTAR), - ADD_TO_TABLE(CDLONNECK), - ADD_TO_TABLE(CDLPIERCING), - ADD_TO_TABLE(CDLRICKSHAWMAN), - ADD_TO_TABLE(CDLRISEFALL3METHODS), - ADD_TO_TABLE(CDLSEPARATINGLINES), - ADD_TO_TABLE(CDLSHOOTINGSTAR), - ADD_TO_TABLE(CDLSHORTLINE), - ADD_TO_TABLE(CDLSPINNINGTOP), - ADD_TO_TABLE(CDLSTALLEDPATTERN), - ADD_TO_TABLE(CDLSTICKSANDWICH), - ADD_TO_TABLE(CDLTAKURI), - ADD_TO_TABLE(CDLTASUKIGAP), - ADD_TO_TABLE(CDLTHRUSTING), - ADD_TO_TABLE(CDLTRISTAR), - ADD_TO_TABLE(CDLUNIQUE3RIVER), - ADD_TO_TABLE(CDLUPSIDEGAP2CROWS), - ADD_TO_TABLE(CDLXSIDEGAP3METHODS), - ADD_TO_TABLE(CEIL), - ADD_TO_TABLE(CMO), - ADD_TO_TABLE(CORREL), - ADD_TO_TABLE(COS), - ADD_TO_TABLE(COSH), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableCSize = - ((sizeof(TA_DEF_TableC)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_d.c b/src/ta-lib/src/ta_abstract/tables/table_d.c deleted file mode 100644 index cb0ebb8f2..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_d.c +++ /dev/null @@ -1,129 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'D' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* DEMA BEGIN */ -static const TA_InputParameterInfo *TA_DEMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_DEMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_DEMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( DEMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Double Exponential Moving Average", /* hint */ - "Dema", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* DEMA END */ - -/* DIV BEGIN */ -DEF_MATH_BINARY_OPERATOR( DIV, "Vector Arithmetic Div", "Div" ) -/* DIV END */ - -/* DX BEGIN */ -static const TA_InputParameterInfo *TA_DX_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_DX_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_DX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( DX, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Directional Movement Index", /* hint */ - "Dx", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* DX END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableD[] = -{ - ADD_TO_TABLE(DEMA), - ADD_TO_TABLE(DIV), - ADD_TO_TABLE(DX), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableDSize = - ((sizeof(TA_DEF_TableD)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_e.c b/src/ta-lib/src/ta_abstract/tables/table_e.c deleted file mode 100644 index f7b87190f..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_e.c +++ /dev/null @@ -1,102 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'E' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* EMA BEGIN */ -static const TA_InputParameterInfo *TA_EMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_EMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_EMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( EMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Exponential Moving Average", /* hint */ - "Ema", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP|TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* EMA END */ - -/* EXP BEGIN */ -DEF_MATH_UNARY_OPERATOR( EXP, "Vector Arithmetic Exp", "Exp" ) -/* EXP END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableE[] = -{ - ADD_TO_TABLE(EMA), - ADD_TO_TABLE(EXP), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableESize = - ((sizeof(TA_DEF_TableE)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_f.c b/src/ta-lib/src/ta_abstract/tables/table_f.c deleted file mode 100644 index 5f949e14e..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_f.c +++ /dev/null @@ -1,76 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'F' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* Floor BEGIN */ -DEF_MATH_UNARY_OPERATOR( FLOOR, "Vector Floor", "Floor" ) -/* Floor END */ - - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableF[] = -{ - ADD_TO_TABLE(FLOOR), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableFSize = - ((sizeof(TA_DEF_TableF)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_g.c b/src/ta-lib/src/ta_abstract/tables/table_g.c deleted file mode 100644 index dc4be37e2..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_g.c +++ /dev/null @@ -1,72 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'G' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* None */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableG[] = -{ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableGSize = - ((sizeof(TA_DEF_TableG)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_h.c b/src/ta-lib/src/ta_abstract/tables/table_h.c deleted file mode 100644 index f8490921c..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_h.c +++ /dev/null @@ -1,246 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'H' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* HT_DCPERIOD */ -static const TA_InputParameterInfo *TA_HT_DCPERIOD_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_HT_DCPERIOD_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_HT_DCPERIOD_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( HT_DCPERIOD, /* name */ - TA_GroupId_CycleIndicators, /* groupId */ - "Hilbert Transform - Dominant Cycle Period", /* hint */ - "HtDcPeriod", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* HT_DCPERIOD END */ - -/* HT_DCPHASE */ -static const TA_InputParameterInfo *TA_HT_DCPHASE_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_HT_DCPHASE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_HT_DCPHASE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( HT_DCPHASE, /* name */ - TA_GroupId_CycleIndicators, /* groupId */ - "Hilbert Transform - Dominant Cycle Phase", /* hint */ - "HtDcPhase", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* HT_DCPHASE END */ - -/* HT_PHASOR */ -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_InPhase = - { TA_Output_Real, "outInPhase", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Quadrature = - { TA_Output_Real, "outQuadrature", TA_OUT_DASH_LINE }; - -static const TA_InputParameterInfo *TA_HT_PHASOR_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_HT_PHASOR_Outputs[] = -{ - &TA_DEF_UI_Output_Real_InPhase, - &TA_DEF_UI_Output_Real_Quadrature, - NULL -}; - -static const TA_OptInputParameterInfo *TA_HT_PHASOR_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( HT_PHASOR, /* name */ - TA_GroupId_CycleIndicators, /* groupId */ - "Hilbert Transform - Phasor Components", /* hint */ - "HtPhasor", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* HT_PHASOR END */ - -/* HT_SINE */ -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Sine = - { TA_Output_Real, "outSine", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_LeadSine = - { TA_Output_Real, "outLeadSine", TA_OUT_DASH_LINE }; - -static const TA_InputParameterInfo *TA_HT_SINE_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_HT_SINE_Outputs[] = -{ - &TA_DEF_UI_Output_Real_Sine, - &TA_DEF_UI_Output_Real_LeadSine, - NULL -}; - -static const TA_OptInputParameterInfo *TA_HT_SINE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( HT_SINE, /* name */ - TA_GroupId_CycleIndicators, /* groupId */ - "Hilbert Transform - SineWave", /* hint */ - "HtSine", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* HT_SINE END */ - -/* HT_TRENDLINE */ -static const TA_InputParameterInfo *TA_HT_TRENDLINE_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_HT_TRENDLINE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_HT_TRENDLINE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( HT_TRENDLINE, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Hilbert Transform - Instantaneous Trendline", /* hint */ - "HtTrendline", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER|TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* HT_TRENDLINE END */ - -/* HT_TRENDMODE */ -static const TA_InputParameterInfo *TA_HT_TRENDMODE_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_HT_TRENDMODE_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_HT_TRENDMODE_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( HT_TRENDMODE, /* name */ - TA_GroupId_CycleIndicators, /* groupId */ - "Hilbert Transform - Trend vs Cycle Mode", /* hint */ - "HtTrendMode", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* HT_TRENDMODE END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableH[] = -{ - ADD_TO_TABLE(HT_DCPERIOD), - ADD_TO_TABLE(HT_DCPHASE), - ADD_TO_TABLE(HT_PHASOR), - ADD_TO_TABLE(HT_SINE), - ADD_TO_TABLE(HT_TRENDLINE), - ADD_TO_TABLE(HT_TRENDMODE), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableHSize = - ((sizeof(TA_DEF_TableH)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_i.c b/src/ta-lib/src/ta_abstract/tables/table_i.c deleted file mode 100644 index 11f32e842..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_i.c +++ /dev/null @@ -1,99 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'I' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* IMI BEGIN */ -static const TA_InputParameterInfo *TA_IMI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_OC, - NULL -}; - -static const TA_OutputParameterInfo *TA_IMI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_IMI_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( IMI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Intraday Momentum Index", /* hint */ - "Imi", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); - -/* IMI END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableI[] = -{ - ADD_TO_TABLE(IMI), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableISize = - ((sizeof(TA_DEF_TableI)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_j.c b/src/ta-lib/src/ta_abstract/tables/table_j.c deleted file mode 100644 index e185726b2..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_j.c +++ /dev/null @@ -1,72 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'J' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* None */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableJ[] = -{ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableJSize = - ((sizeof(TA_DEF_TableJ)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_k.c b/src/ta-lib/src/ta_abstract/tables/table_k.c deleted file mode 100644 index 79d39e35c..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_k.c +++ /dev/null @@ -1,98 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'K' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* KAMA BEGIN */ -static const TA_InputParameterInfo *TA_KAMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_KAMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_KAMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( KAMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Kaufman Adaptive Moving Average", /* hint */ - "Kama", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP|TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* KAMA END */ - - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableK[] = -{ - ADD_TO_TABLE(KAMA), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableKSize = - ((sizeof(TA_DEF_TableK)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_l.c b/src/ta-lib/src/ta_abstract/tables/table_l.c deleted file mode 100644 index e64c3a7e6..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_l.c +++ /dev/null @@ -1,188 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'L' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* LINEARREG BEGIN */ -static const TA_InputParameterInfo *TA_LINEARREG_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_LINEARREG_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_LINEARREG_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( LINEARREG, /* name */ - TA_GroupId_Statistic,/* groupId */ - "Linear Regression", /* hint */ - "LinearReg", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* LINEARREG END */ - -/* LINEARREG_SLOPE BEGIN */ -static const TA_InputParameterInfo *TA_LINEARREG_SLOPE_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_LINEARREG_SLOPE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_LINEARREG_SLOPE_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( LINEARREG_SLOPE, /* name */ - TA_GroupId_Statistic,/* groupId */ - "Linear Regression Slope", /* hint */ - "LinearRegSlope", /* CamelCase name */ - 0 /* flags */ - ); -/* LINEARREG_SLOPE END */ - -/* LINEARREG_ANGLE BEGIN */ -static const TA_InputParameterInfo *TA_LINEARREG_ANGLE_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_LINEARREG_ANGLE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_LINEARREG_ANGLE_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( LINEARREG_ANGLE, /* name */ - TA_GroupId_Statistic,/* groupId */ - "Linear Regression Angle", /* hint */ - "LinearRegAngle", /* CamelCase name */ - 0 /* flags */ - ); -/* LINEARREG_ANGLE END */ - -/* LINEARREG_INTERCEPT BEGIN */ -static const TA_InputParameterInfo *TA_LINEARREG_INTERCEPT_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_LINEARREG_INTERCEPT_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_LINEARREG_INTERCEPT_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( LINEARREG_INTERCEPT, /* name */ - TA_GroupId_Statistic,/* groupId */ - "Linear Regression Intercept", /* hint */ - "LinearRegIntercept", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* LINEARREG_INTERCEPT END */ - -/* LN BEGIN */ -DEF_MATH_UNARY_OPERATOR( LN, "Vector Log Natural", "Ln" ) -/* LN END */ - -/* LOG10 BEGIN */ -DEF_MATH_UNARY_OPERATOR( LOG10, "Vector Log10", "Log10" ) -/* LOG10 END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableL[] = -{ - ADD_TO_TABLE(LINEARREG), - ADD_TO_TABLE(LINEARREG_ANGLE), - ADD_TO_TABLE(LINEARREG_INTERCEPT), - ADD_TO_TABLE(LINEARREG_SLOPE), - ADD_TO_TABLE(LN), - ADD_TO_TABLE(LOG10), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableLSize = - ((sizeof(TA_DEF_TableL)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_m.c b/src/ta-lib/src/ta_abstract/tables/table_m.c deleted file mode 100644 index 7e832418c..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_m.c +++ /dev/null @@ -1,739 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'M' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -const TA_OptInputParameterInfo TA_DEF_UI_Signal_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInSignalPeriod", /* paramName */ - 0, /* flags */ - - "Signal Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 9, /* defaultValue */ - "Smoothing for the signal line (nb of period)", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_Slow_MA_Type = -{ - TA_OptInput_IntegerList, /* type */ - "optInSlowMAType", /* paramName */ - 0, /* flags */ - - "Slow MA", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average for slow MA", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_Fast_MA_Type = -{ - TA_OptInput_IntegerList, /* type */ - "optInFastMAType", /* paramName */ - 0, /* flags */ - - "Fast MA", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average for fast MA", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_Signal_MA_Type = -{ - TA_OptInput_IntegerList, /* type */ - "optInSignalMAType", /* paramName */ - 0, /* flags */ - "Signal MA", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average for signal line", /* hint */ - - NULL /* CamelCase name */ -}; - -/* MA BEGIN */ -static const TA_InputParameterInfo *TA_MA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30, - &TA_DEF_UI_MA_Method, - NULL -}; - -DEF_FUNCTION( MA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Moving average", /* hint */ - "MovingAverage", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MA END */ - -/* MACD BEGIN */ -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MACD = - { TA_Output_Real, "outMACD", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MACDSignal = - { TA_Output_Real, "outMACDSignal", TA_OUT_DASH_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MACDHist = - { TA_Output_Real, "outMACDHist", TA_OUT_HISTO }; - -static const TA_InputParameterInfo *TA_MACD_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MACD_Outputs[] = -{ - &TA_DEF_UI_Output_Real_MACD, - &TA_DEF_UI_Output_Real_MACDSignal, - &TA_DEF_UI_Output_Real_MACDHist, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MACD_OptInputs[] = -{ &TA_DEF_UI_Fast_Period, - &TA_DEF_UI_Slow_Period, - &TA_DEF_UI_Signal_Period, - NULL -}; - -DEF_FUNCTION( MACD, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Moving Average Convergence/Divergence", /* hint */ - "Macd", /* CamelCase name */ - 0 /* flags */ - ); -/* MACD END */ - -/* MACDEXT BEGIN */ -static const TA_InputParameterInfo *TA_MACDEXT_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MACDEXT_Outputs[] = -{ - &TA_DEF_UI_Output_Real_MACD, - &TA_DEF_UI_Output_Real_MACDSignal, - &TA_DEF_UI_Output_Real_MACDHist, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MACDEXT_OptInputs[] = -{ &TA_DEF_UI_Fast_Period, - &TA_DEF_UI_Fast_MA_Type, - &TA_DEF_UI_Slow_Period, - &TA_DEF_UI_Slow_MA_Type, - &TA_DEF_UI_Signal_Period, - &TA_DEF_UI_Signal_MA_Type, - NULL -}; - -DEF_FUNCTION( MACDEXT, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "MACD with controllable MA type", /* hint */ - "MacdExt", /* CamelCase name */ - 0 /* flags */ - ); -/* MACDEXT END */ - -/* MACDFIX BEGIN */ -static const TA_InputParameterInfo *TA_MACDFIX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MACDFIX_Outputs[] = -{ - &TA_DEF_UI_Output_Real_MACD, - &TA_DEF_UI_Output_Real_MACDSignal, - &TA_DEF_UI_Output_Real_MACDHist, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MACDFIX_OptInputs[] = -{ &TA_DEF_UI_Signal_Period, - NULL -}; - -DEF_FUNCTION( MACDFIX, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Moving Average Convergence/Divergence Fix 12/26", /* hint */ - "MacdFix", /* CamelCase name */ - 0 /* flags */ - ); -/* MACDFIX END */ - -/* MAMA BEGIN */ -const TA_RealRange TA_DEF_MAMA_FastLimit = -{ - 0.01, /* min */ - 0.99, /* max */ - 2, /* precision */ - 0.21, /* suggested start */ - 0.80, /* suggested end */ - 0.01 /* suggested increment */ -}; - -const TA_RealRange TA_DEF_MAMA_SlowLimit = -{ - 0.01, /* min */ - 0.99, /* max */ - 2, /* precision */ - 0.01, /* suggested start */ - 0.60, /* suggested end */ - 0.01 /* suggested increment */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_MAMA_FastLimit = -{ - TA_OptInput_RealRange, /* type */ - "optInFastLimit", /* paramName */ - 0, /* flags */ - "Fast Limit", /* displayName */ - (const void *)&TA_DEF_MAMA_FastLimit, /* dataSet */ - 0.5, /* defaultValue */ - "Upper limit use in the adaptive algorithm", /* hint */ - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_MAMA_SlowLimit = -{ - TA_OptInput_RealRange, /* type */ - "optInSlowLimit", /* paramName */ - 0, /* flags */ - - "Slow Limit", /* displayName */ - (const void *)&TA_DEF_MAMA_SlowLimit, /* dataSet */ - 0.05, /* defaultValue */ - "Lower limit use in the adaptive algorithm", /* hint */ - NULL /* CamelCase name */ -}; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_MAMA = - { TA_Output_Real, "outMAMA", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_FAMA = - { TA_Output_Real, "outFAMA", TA_OUT_DASH_LINE }; - -static const TA_InputParameterInfo *TA_MAMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MAMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real_MAMA, - &TA_DEF_UI_Output_Real_FAMA, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MAMA_OptInputs[] = -{ &TA_DEF_UI_MAMA_FastLimit, - &TA_DEF_UI_MAMA_SlowLimit, - NULL -}; - -DEF_FUNCTION( MAMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "MESA Adaptive Moving Average", /* hint */ - "Mama", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER|TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MAMA END */ - -/* MAVP BEGIN */ -static const TA_InputParameterInfo *TA_MAVP_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - &TA_DEF_UI_Input_Periods, - NULL -}; - -static const TA_OutputParameterInfo *TA_MAVP_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MAVP_OptInputs[] = -{ - &TA_DEF_UI_MinPeriod, - &TA_DEF_UI_MaxPeriod, - &TA_DEF_UI_MA_Method, - NULL -}; - -DEF_FUNCTION( MAVP, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Moving average with variable period", /* hint */ - "MovingAverageVariablePeriod", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MAVP END */ - -/* MAX BEGIN */ -static const TA_InputParameterInfo *TA_MAX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MAX_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MAX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MAX, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Highest value over a specified period", /* hint */ - "Max", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MAX END */ - -/* MAXINDEX BEGIN */ -static const TA_InputParameterInfo *TA_MAXINDEX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MAXINDEX_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MAXINDEX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MAXINDEX, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Index of highest value over a specified period", /* hint */ - "MaxIndex", /* CamelCase name */ - 0 /* flags */ - ); -/* MAXINDEX END */ - -/* MEDPRICE BEGIN */ -static const TA_InputParameterInfo *TA_MEDPRICE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_MEDPRICE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MEDPRICE_OptInputs[] = { NULL }; - -DEF_FUNCTION( MEDPRICE, /* name */ - TA_GroupId_PriceTransform, /* groupId */ - "Median Price", /* hint */ - "MedPrice", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); - -/* MEDPRICE END */ - -/* MFI BEGIN */ -static const TA_InputParameterInfo *TA_MFI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLCV, - NULL -}; - -static const TA_OutputParameterInfo *TA_MFI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MFI_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MFI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Money Flow Index", /* hint */ - "Mfi", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* MFI END */ - -/* MIDPRICE BEGIN */ -static const TA_InputParameterInfo *TA_MIDPRICE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_MIDPRICE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MIDPRICE_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MIDPRICE, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Midpoint Price over period",/* hint */ - "MidPrice", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); - -/* MIDPRICE END */ - -/* MIDPOINT BEGIN */ -static const TA_InputParameterInfo *TA_MIDPOINT_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MIDPOINT_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MIDPOINT_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MIDPOINT, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "MidPoint over period", /* hint */ - "MidPoint", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MIDPOINT END */ - -/* MIN BEGIN */ -static const TA_InputParameterInfo *TA_MIN_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MIN_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MIN_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MIN, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Lowest value over a specified period", /* hint */ - "Min", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MIN END */ - -/* MININDEX BEGIN */ -static const TA_InputParameterInfo *TA_MININDEX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MININDEX_Outputs[] = -{ - &TA_DEF_UI_Output_Integer, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MININDEX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MININDEX, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Index of lowest value over a specified period", /* hint */ - "MinIndex", /* CamelCase name */ - 0 /* flags */ - ); -/* MININDEX END */ - -/* MINMAX BEGIN */ -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Min = - { TA_Output_Real, "outMin", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Real_Max = - { TA_Output_Real, "outMax", TA_OUT_LINE }; - -static const TA_InputParameterInfo *TA_MINMAX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MINMAX_Outputs[] = -{ - &TA_DEF_UI_Output_Real_Min, - &TA_DEF_UI_Output_Real_Max, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MINMAX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MINMAX, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Lowest and highest values over a specified period", /* hint */ - "MinMax", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* MINMAX END */ - -/* MINMAXINDEX BEGIN */ -const TA_OutputParameterInfo TA_DEF_UI_Output_Integer_MinIdx = - { TA_Output_Integer, "outMinIdx", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_Integer_MaxIdx = - { TA_Output_Integer, "outMaxIdx", TA_OUT_LINE }; - -static const TA_InputParameterInfo *TA_MINMAXINDEX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MINMAXINDEX_Outputs[] = -{ - &TA_DEF_UI_Output_Integer_MinIdx, - &TA_DEF_UI_Output_Integer_MaxIdx, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MINMAXINDEX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( MINMAXINDEX, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Indexes of lowest and highest values over a specified period", /* hint */ - "MinMaxIndex", /* CamelCase name */ - 0 /* flags */ - ); -/* MINMAXINDEX END */ - -/* MINUS_DI BEGIN */ -static const TA_InputParameterInfo *TA_MINUS_DI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_MINUS_DI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MINUS_DI_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14, - NULL -}; - -DEF_FUNCTION( MINUS_DI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Minus Directional Indicator", /* hint */ - "MinusDI", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); - -/* MINUS_DI END */ - -/* MINUS_DM BEGIN */ -static const TA_InputParameterInfo *TA_MINUS_DM_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_MINUS_DM_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MINUS_DM_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14, - NULL -}; - -DEF_FUNCTION( MINUS_DM, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Minus Directional Movement", /* hint */ - "MinusDM", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); - -/* MINUS_DM END */ - -/* MOM BEGIN */ -static const TA_InputParameterInfo *TA_MOM_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_MOM_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_MOM_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_10, - NULL -}; - -DEF_FUNCTION( MOM, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Momentum", /* hint */ - "Mom", /* CamelCase name */ - 0 /* flags */ - ); -/* MOM END */ - -/* MULT BEGIN */ -DEF_MATH_BINARY_OPERATOR( MULT, "Vector Arithmetic Mult", "Mult" ) -/* MULT END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableM[] = -{ - ADD_TO_TABLE(MA), - ADD_TO_TABLE(MACD), - ADD_TO_TABLE(MACDEXT), - ADD_TO_TABLE(MACDFIX), - ADD_TO_TABLE(MAMA), - ADD_TO_TABLE(MAVP), - ADD_TO_TABLE(MAX), - ADD_TO_TABLE(MAXINDEX), - ADD_TO_TABLE(MEDPRICE), - ADD_TO_TABLE(MFI), - ADD_TO_TABLE(MIDPOINT), - ADD_TO_TABLE(MIDPRICE), - ADD_TO_TABLE(MIN), - ADD_TO_TABLE(MININDEX), - ADD_TO_TABLE(MINMAX), - ADD_TO_TABLE(MINMAXINDEX), - ADD_TO_TABLE(MINUS_DI), - ADD_TO_TABLE(MINUS_DM), - ADD_TO_TABLE(MOM), - ADD_TO_TABLE(MULT), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableMSize = - ((sizeof(TA_DEF_TableM)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_n.c b/src/ta-lib/src/ta_abstract/tables/table_n.c deleted file mode 100644 index 0f0b7a2e8..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_n.c +++ /dev/null @@ -1,127 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'N' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* NATR BEGIN */ -static const TA_InputParameterInfo *TA_NATR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_NATR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_NATR_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14, - NULL -}; - -DEF_FUNCTION( NATR, /* name */ - TA_GroupId_VolatilityIndicators, /* groupId */ - "Normalized Average True Range", /* hint */ - "Natr", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* NATR END */ - -#if 0 -Will be implemented later -/* NVI BEGIN */ -static const TA_InputParameterInfo *TA_NVI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_CV, - NULL -}; - -static const TA_OutputParameterInfo *TA_NVI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_NVI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( NVI, /* name */ - TA_GroupId_VolumeIndicators, /* groupId */ - "Negative Volume Index", /* hint */ - "Nvi", /* CamelCase name */ - 0 /* flags */ - ); - -/* NVI END */ -#endif - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableN[] = -{ - ADD_TO_TABLE(NATR), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableNSize = - ((sizeof(TA_DEF_TableN)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_o.c b/src/ta-lib/src/ta_abstract/tables/table_o.c deleted file mode 100644 index c1000316f..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_o.c +++ /dev/null @@ -1,96 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'O' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* OBV BEGIN */ -static const TA_InputParameterInfo *TA_OBV_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - &TA_DEF_UI_Input_Price_V, - NULL -}; - -static const TA_OutputParameterInfo *TA_OBV_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_OBV_OptInputs[] = -{ NULL }; - -DEF_FUNCTION( OBV, /* name */ - TA_GroupId_VolumeIndicators, /* groupId */ - "On Balance Volume", /* hint */ - "Obv", /* CamelCase name */ - 0 /* flags */ - ); -/* OBV END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableO[] = -{ - ADD_TO_TABLE(OBV), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableOSize = - ((sizeof(TA_DEF_TableO)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_p.c b/src/ta-lib/src/ta_abstract/tables/table_p.c deleted file mode 100644 index e5bbc2252..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_p.c +++ /dev/null @@ -1,186 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'P' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* PLUS_DI BEGIN */ -static const TA_InputParameterInfo *TA_PLUS_DI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_PLUS_DI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_PLUS_DI_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14, - NULL -}; - -DEF_FUNCTION( PLUS_DI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Plus Directional Indicator", /* hint */ - "PlusDI", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); - -/* PLUS_DI END */ - -/* PLUS_DM BEGIN */ -static const TA_InputParameterInfo *TA_PLUS_DM_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_PLUS_DM_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_PLUS_DM_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14, - NULL -}; - -DEF_FUNCTION( PLUS_DM, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Plus Directional Movement", /* hint */ - "PlusDM", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); - -/* PLUS_DM END */ - -/* PPO BEGIN */ -static const TA_InputParameterInfo *TA_PPO_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_PPO_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_PPO_OptInputs[] = -{ &TA_DEF_UI_Fast_Period, - &TA_DEF_UI_Slow_Period, - &TA_DEF_UI_MA_Method, - NULL -}; - -DEF_FUNCTION( PPO, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Percentage Price Oscillator", /* hint */ - "Ppo", /* CamelCase name */ - 0 /* flags */ - ); -/* PPO END */ - -#if 0 -Will be implemented later -/* PVI BEGIN */ -static const TA_InputParameterInfo *TA_PVI_Inputs[] = -{ - &TA_DEF_UI_Input_Price_CV, - NULL -}; - -static const TA_OutputParameterInfo *TA_PVI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_PVI_OptInputs[] = -{ - NULL -}; - -DEF_FUNCTION( PVI, /* name */ - TA_GroupId_VolumeIndicators, /* groupId */ - "Positive Volume Index", /* hint */ - "Pvi", /* CamelCase name */ - 0 /* flags */ - ); - -/* PVI END */ -#endif - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableP[] = -{ - ADD_TO_TABLE(PLUS_DI), - ADD_TO_TABLE(PLUS_DM), - ADD_TO_TABLE(PPO), - /* ADD_TO_TABLE(PVI),*/ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TablePSize = - ((sizeof(TA_DEF_TableP)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_q.c b/src/ta-lib/src/ta_abstract/tables/table_q.c deleted file mode 100644 index 29de52ab6..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_q.c +++ /dev/null @@ -1,72 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'Q' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* None */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableQ[] = -{ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableQSize = - ((sizeof(TA_DEF_TableQ)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_r.c b/src/ta-lib/src/ta_abstract/tables/table_r.c deleted file mode 100644 index 732e320c0..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_r.c +++ /dev/null @@ -1,206 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'R' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* ROC BEGIN */ -static const TA_InputParameterInfo *TA_ROC_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_ROC_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ROC_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_10, - NULL -}; - -DEF_FUNCTION( ROC, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Rate of change : ((price/prevPrice)-1)*100", /* hint */ - "Roc", /* CamelCase name */ - 0 /* flags */ - ); -/* ROC END */ - -/* ROCP BEGIN */ -static const TA_InputParameterInfo *TA_ROCP_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_ROCP_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ROCP_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_10, - NULL -}; - -DEF_FUNCTION( ROCP, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Rate of change Percentage: (price-prevPrice)/prevPrice", /* hint */ - "RocP", /* CamelCase name */ - 0 /* flags */ - ); -/* ROCP END */ - -/* ROCR BEGIN */ -static const TA_InputParameterInfo *TA_ROCR_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_ROCR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ROCR_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_10, - NULL -}; - -DEF_FUNCTION( ROCR, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Rate of change ratio: (price/prevPrice)", /* hint */ - "RocR", /* CamelCase name */ - 0 /* flags */ - ); -/* ROCR END */ - -/* ROCR100 BEGIN */ -static const TA_InputParameterInfo *TA_ROCR100_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_ROCR100_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ROCR100_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_10, - NULL -}; - -DEF_FUNCTION( ROCR100, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Rate of change ratio 100 scale: (price/prevPrice)*100", /* hint */ - "RocR100", /* CamelCase name */ - 0 /* flags */ - ); -/* ROCR100 END */ - -/* RSI BEGIN */ -static const TA_InputParameterInfo *TA_RSI_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_RSI_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_RSI_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( RSI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Relative Strength Index", /* hint */ - "Rsi", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* RSI END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableR[] = -{ - ADD_TO_TABLE(ROC), - ADD_TO_TABLE(ROCP), - ADD_TO_TABLE(ROCR), - ADD_TO_TABLE(ROCR100), - ADD_TO_TABLE(RSI), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableRSize = - ((sizeof(TA_DEF_TableR)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_s.c b/src/ta-lib/src/ta_abstract/tables/table_s.c deleted file mode 100644 index 37423e701..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_s.c +++ /dev/null @@ -1,630 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'S' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* SAR BEGIN */ -static const TA_RealRange TA_DEF_AccelerationFactor = -{ - 0.0, /* min */ - TA_REAL_MAX, /* max */ - 4, /* precision */ - 0.01, /* suggested start */ - 0.20, /* suggested end */ - 0.01 /* suggested increment */ -}; - -static const TA_RealRange TA_DEF_AccelerationMax = -{ - 0.0, /* min */ - TA_REAL_MAX, /* max */ - 4, /* precision */ - 0.20, /* suggested start */ - 0.40, /* suggested end */ - 0.01 /* suggested increment */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationFactor = -{ - TA_OptInput_RealRange, /* type */ - "optInAcceleration", /* paramName */ - 0, /* flags */ - - "Acceleration Factor", /* displayName */ - (const void *)&TA_DEF_AccelerationFactor, /* dataSet */ - 0.02, /* defaultValue */ - "Acceleration Factor used up to the Maximum value", /* hint */ - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationMaximum = -{ - TA_OptInput_RealRange, /* type */ - "optInMaximum", /* paramName */ - 0, /* flags */ - - "AF Maximum", /* displayName */ - (const void *)&TA_DEF_AccelerationMax, /* dataSet */ - 0.20, /* defaultValue */ - "Acceleration Factor Maximum value", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_InputParameterInfo *TA_SAR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_SAR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_SAR_OptInputs[] = -{ &TA_DEF_UI_D_AccelerationFactor, - &TA_DEF_UI_D_AccelerationMaximum, - NULL -}; - -DEF_FUNCTION( SAR, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Parabolic SAR", /* hint */ - "Sar", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); - -/* SAR END */ - -/* SAREXT BEGIN */ -static const TA_RealRange TA_DEF_AccelerationInit = -{ - 0.0, /* min */ - TA_REAL_MAX, /* max */ - 4, /* precision */ - 0.01, /* suggested start */ - 0.19, /* suggested end */ - 0.01 /* suggested increment */ -}; - -static const TA_RealRange TA_DEF_SARStartValue = -{ - TA_REAL_MIN, /* min */ - TA_REAL_MAX, /* max */ - 4, /* precision */ - 0, /* suggested start */ - 0, /* suggested end */ - 0 /* suggested increment */ -}; - -static const TA_RealRange TA_DEF_SAROffsetOnReverse = -{ - 0.0, /* min */ - TA_REAL_MAX, /* max */ - 4, /* precision */ - 0.01, /* suggested start */ - 0.15, /* suggested end */ - 0.01 /* suggested increment */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_StartValue = -{ - TA_OptInput_RealRange, /* type */ - "optInStartValue", /* paramName */ - 0, /* flags */ - - "Start Value", /* displayName */ - (const void *)&TA_DEF_SARStartValue, /* dataSet */ - 0.0, /* defaultValue */ - "Start value and direction. 0 for Auto, >0 for Long, <0 for Short", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_OffsetOnReverse = -{ - TA_OptInput_RealRange, /* type */ - "optInOffsetOnReverse", /* paramName */ - 0, /* flags */ - - "Offset on Reverse", /* displayName */ - (const void *)&TA_DEF_SAROffsetOnReverse, /* dataSet */ - 0.0, /* defaultValue */ - "Percent offset added/removed to initial stop on short/long reversal", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationInitLong = -{ - TA_OptInput_RealRange, /* type */ - "optInAccelerationInitLong", /* paramName */ - 0, /* flags */ - - "AF Init Long", /* displayName */ - (const void *)&TA_DEF_AccelerationInit, /* dataSet */ - 0.02, /* defaultValue */ - "Acceleration Factor initial value for the Long direction", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationLong = -{ - TA_OptInput_RealRange, /* type */ - "optInAccelerationLong", /* paramName */ - 0, /* flags */ - - "AF Long", /* displayName */ - (const void *)&TA_DEF_AccelerationFactor, /* dataSet */ - 0.02, /* defaultValue */ - "Acceleration Factor for the Long direction", /* hint */ - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationMaxLong = -{ - TA_OptInput_RealRange, /* type */ - "optInAccelerationMaxLong", /* paramName */ - 0, /* flags */ - - "AF Max Long", /* displayName */ - (const void *)&TA_DEF_AccelerationMax, /* dataSet */ - 0.20, /* defaultValue */ - "Acceleration Factor maximum value for the Long direction", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationInitShort = -{ - TA_OptInput_RealRange, /* type */ - "optInAccelerationInitShort", /* paramName */ - 0, /* flags */ - - "AF Init Short", /* displayName */ - (const void *)&TA_DEF_AccelerationInit, /* dataSet */ - 0.02, /* defaultValue */ - "Acceleration Factor initial value for the Short direction", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationShort = -{ - TA_OptInput_RealRange, /* type */ - "optInAccelerationShort", /* paramName */ - 0, /* flags */ - - "AF Short", /* displayName */ - (const void *)&TA_DEF_AccelerationFactor, /* dataSet */ - 0.02, /* defaultValue */ - "Acceleration Factor for the Short direction", /* hint */ - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_D_AccelerationMaxShort = -{ - TA_OptInput_RealRange, /* type */ - "optInAccelerationMaxShort", /* paramName */ - 0, /* flags */ - - "AF Max Short", /* displayName */ - (const void *)&TA_DEF_AccelerationMax, /* dataSet */ - 0.20, /* defaultValue */ - "Acceleration Factor maximum value for the Short direction", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_InputParameterInfo *TA_SAREXT_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HL, - NULL -}; - -static const TA_OutputParameterInfo *TA_SAREXT_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_SAREXT_OptInputs[] = -{ &TA_DEF_UI_D_StartValue, - &TA_DEF_UI_D_OffsetOnReverse, - &TA_DEF_UI_D_AccelerationInitLong, - &TA_DEF_UI_D_AccelerationLong, - &TA_DEF_UI_D_AccelerationMaxLong, - &TA_DEF_UI_D_AccelerationInitShort, - &TA_DEF_UI_D_AccelerationShort, - &TA_DEF_UI_D_AccelerationMaxShort, - NULL -}; - -DEF_FUNCTION( SAREXT, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Parabolic SAR - Extended", /* hint */ - "SarExt", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); - -/* SAREXT END */ - - -/* SIN BEGIN */ -DEF_MATH_UNARY_OPERATOR( SIN, "Vector Trigonometric Sin", "Sin" ) -/* SIN END */ - -/* SINH BEGIN */ -DEF_MATH_UNARY_OPERATOR( SINH, "Vector Trigonometric Sinh", "Sinh" ) -/* SINH END */ - -/* SMA BEGIN */ -static const TA_InputParameterInfo *TA_SMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_SMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_SMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( SMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Simple Moving Average", /* hint */ - "Sma", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); - -/* SMA END */ - -/* SQRT BEGIN */ -DEF_MATH_UNARY_OPERATOR( SQRT, "Vector Square Root", "Sqrt" ) -/* SQRT END */ - -/* SUB BEGIN */ -DEF_MATH_BINARY_OPERATOR( SUB, "Vector Arithmetic Subtraction", "Sub" ) -/* SUB END */ - -/* SUM BEGIN */ -static const TA_InputParameterInfo *TA_SUM_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_SUM_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_SUM_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( SUM, /* name */ - TA_GroupId_MathOperators, /* groupId */ - "Summation", /* hint */ - "Sum", /* CamelCase name */ - 0 /* flags */ - ); -/* SUM END */ - -/* STDDEV BEGIN */ -static const TA_InputParameterInfo *TA_STDDEV_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_STDDEV_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_STDDEV_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_5_MINIMUM2, - &TA_DEF_UI_NbDeviation, - NULL -}; - -DEF_FUNCTION( STDDEV, /* name */ - TA_GroupId_Statistic, /* groupId */ - "Standard Deviation", /* hint */ - "StdDev", /* CamelCase name */ - 0 /* flags */ - ); -/* STDDEV END */ - -/* STOCH BEGIN */ -static const TA_OptInputParameterInfo TA_DEF_UI_FastK_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInFastK_Period", /* paramName */ - 0, /* flags */ - - "Fast-K Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 5, /* defaultValue */ - "Time period for building the Fast-K line", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_SlowK_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInSlowK_Period", /* paramName */ - 0, /* flags */ - - "Slow-K Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 3, /* defaultValue */ - "Smoothing for making the Slow-K line. Usually set to 3", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_OptInputParameterInfo TA_DEF_UI_SlowD_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInSlowD_Period", /* paramName */ - 0, /* flags */ - - "Slow-D Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 3, /* defaultValue */ - "Smoothing for making the Slow-D line", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_SlowK_MAType = -{ - TA_OptInput_IntegerList, /* type */ - "optInSlowK_MAType", /* paramName */ - 0, /* flags */ - - "Slow-K MA", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average for Slow-K", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_SlowD_MAType = -{ - TA_OptInput_IntegerList, /* type */ - "optInSlowD_MAType", /* paramName */ - 0, /* flags */ - - "Slow-D MA", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average for Slow-D", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OutputParameterInfo TA_DEF_UI_Output_SlowK = - { TA_Output_Real, "outSlowK", TA_OUT_DASH_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_SlowD = - { TA_Output_Real, "outSlowD", TA_OUT_DASH_LINE }; - -static const TA_InputParameterInfo *TA_STOCH_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_STOCH_Outputs[] = -{ - &TA_DEF_UI_Output_SlowK, - &TA_DEF_UI_Output_SlowD, - NULL -}; - -static const TA_OptInputParameterInfo *TA_STOCH_OptInputs[] = -{ &TA_DEF_UI_FastK_Period, - &TA_DEF_UI_SlowK_Period, - &TA_DEF_UI_SlowK_MAType, - &TA_DEF_UI_SlowD_Period, - &TA_DEF_UI_SlowD_MAType, - NULL -}; - -DEF_FUNCTION( STOCH, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Stochastic", /* hint */ - "Stoch", /* CamelCase name */ - 0 /* flags */ - ); -/* STOCH END */ - -/* STOCHF BEGIN */ -static const TA_OptInputParameterInfo TA_DEF_UI_FastD_Period = -{ - TA_OptInput_IntegerRange, /* type */ - "optInFastD_Period", /* paramName */ - 0, /* flags */ - - "Fast-D Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 3, /* defaultValue */ - "Smoothing for making the Fast-D line. Usually set to 3", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_FastD_MAType = -{ - TA_OptInput_IntegerList, /* type */ - "optInFastD_MAType", /* paramName */ - 0, /* flags */ - - "Fast-D MA", /* displayName */ - (const void *)&TA_MA_TypeList, /* dataSet */ - 0, /* defaultValue = simple average */ - "Type of Moving Average for Fast-D", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OutputParameterInfo TA_DEF_UI_Output_FastK = - { TA_Output_Real, "outFastK", TA_OUT_LINE }; - -const TA_OutputParameterInfo TA_DEF_UI_Output_FastD = - { TA_Output_Real, "outFastD", TA_OUT_LINE }; - -static const TA_InputParameterInfo *TA_STOCHF_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_STOCHF_Outputs[] = -{ - &TA_DEF_UI_Output_FastK, - &TA_DEF_UI_Output_FastD, - NULL -}; - -static const TA_OptInputParameterInfo *TA_STOCHF_OptInputs[] = -{ &TA_DEF_UI_FastK_Period, - &TA_DEF_UI_FastD_Period, - &TA_DEF_UI_FastD_MAType, - NULL -}; - -DEF_FUNCTION( STOCHF, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Stochastic Fast", /* hint */ - "StochF", /* CamelCase name */ - 0 /* flags */ - ); -/* STOCHF END */ - -/* STOCHRSI BEGIN */ -static const TA_InputParameterInfo *TA_STOCHRSI_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_STOCHRSI_Outputs[] = -{ - &TA_DEF_UI_Output_FastK, - &TA_DEF_UI_Output_FastD, - NULL -}; - -static const TA_OptInputParameterInfo *TA_STOCHRSI_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_14_MINIMUM2, - &TA_DEF_UI_FastK_Period, - &TA_DEF_UI_FastD_Period, - &TA_DEF_UI_FastD_MAType, - NULL -}; - -DEF_FUNCTION( STOCHRSI, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Stochastic Relative Strength Index", /* hint */ - "StochRsi", /* CamelCase name */ - TA_FUNC_FLG_UNST_PER /* flags */ - ); - -/* STOCHRSI END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableS[] = -{ - ADD_TO_TABLE(SAR), - ADD_TO_TABLE(SAREXT), - ADD_TO_TABLE(SIN), - ADD_TO_TABLE(SINH), - ADD_TO_TABLE(SMA), - ADD_TO_TABLE(SQRT), - ADD_TO_TABLE(STDDEV), - ADD_TO_TABLE(STOCH), - ADD_TO_TABLE(STOCHF), - ADD_TO_TABLE(STOCHRSI), - ADD_TO_TABLE(SUB), - ADD_TO_TABLE(SUM), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableSSize = - ((sizeof(TA_DEF_TableS)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_t.c b/src/ta-lib/src/ta_abstract/tables/table_t.c deleted file mode 100644 index 44f0b9701..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_t.c +++ /dev/null @@ -1,277 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'T' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* T3 BEGIN */ -static const TA_OptInputParameterInfo TA_DEF_UI_VFactor = -{ - TA_OptInput_RealRange, /* type */ - "optInVFactor", /* paramName */ - 0, /* flags */ - - "Volume Factor", /* displayName */ - (const void *)&TA_DEF_ZeroToOne, /* dataSet */ - 0.7, /* defaultValue */ - "Volume Factor", /* hint */ - NULL /* CamelCase name */ -}; - -static const TA_InputParameterInfo *TA_T3_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_T3_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_T3_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_5_MINIMUM2, - &TA_DEF_UI_VFactor, - NULL -}; - -DEF_FUNCTION( T3, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Triple Exponential Moving Average (T3)", /* hint */ - "T3", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP|TA_FUNC_FLG_UNST_PER /* flags */ - ); -/* T3 END */ - -/* TAN BEGIN */ -DEF_MATH_UNARY_OPERATOR( TAN, "Vector Trigonometric Tan", "Tan" ) -/* TAN END */ - -/* TANH BEGIN */ -DEF_MATH_UNARY_OPERATOR( TANH, "Vector Trigonometric Tanh", "Tanh" ) -/* TANH END */ - -/* TEMA BEGIN */ -static const TA_InputParameterInfo *TA_TEMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_TEMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_TEMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( TEMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Triple Exponential Moving Average", /* hint */ - "Tema", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* TEMA END */ - -/* TRANGE BEGIN */ -static const TA_InputParameterInfo *TA_TRANGE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_TRANGE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_TRANGE_OptInputs[] = { NULL }; - -DEF_FUNCTION( TRANGE, /* name */ - TA_GroupId_VolatilityIndicators, /* groupId */ - "True Range", /* hint */ - "TrueRange", /* CamelCase name */ - 0 /* flags */ - ); -/* TRANGE END */ - -/* TRIMA BEGIN */ -static const TA_InputParameterInfo *TA_TRIMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_TRIMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_TRIMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( TRIMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Triangular Moving Average", /* hint */ - "Trima", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* TRIMA END */ - -/* TRIX BEGIN */ -static const TA_InputParameterInfo *TA_TRIX_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_TRIX_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_TRIX_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30, - NULL -}; - -DEF_FUNCTION( TRIX, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "1-day Rate-Of-Change (ROC) of a Triple Smooth EMA", /* hint */ - "Trix", /* CamelCase name */ - 0 /* flags */ - ); -/* TRIX END */ - -/* TSF BEGIN */ -static const TA_InputParameterInfo *TA_TSF_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_TSF_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_TSF_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( TSF, /* name */ - TA_GroupId_Statistic, /* groupId */ - "Time Series Forecast",/* hint */ - "Tsf", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* TSF END */ - -/* TYPPRICE BEGIN */ -static const TA_InputParameterInfo *TA_TYPPRICE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_TYPPRICE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_TYPPRICE_OptInputs[] = { NULL }; - -DEF_FUNCTION( TYPPRICE, /* name */ - TA_GroupId_PriceTransform, /* groupId */ - "Typical Price", /* hint */ - "TypPrice", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* TYPPRICE END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableT[] = -{ - ADD_TO_TABLE(T3), - ADD_TO_TABLE(TAN), - ADD_TO_TABLE(TANH), - ADD_TO_TABLE(TEMA), - ADD_TO_TABLE(TRANGE), - ADD_TO_TABLE(TRIMA), - ADD_TO_TABLE(TRIX), - ADD_TO_TABLE(TSF), - ADD_TO_TABLE(TYPPRICE), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableTSize = - ((sizeof(TA_DEF_TableT)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_u.c b/src/ta-lib/src/ta_abstract/tables/table_u.c deleted file mode 100644 index 06147a037..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_u.c +++ /dev/null @@ -1,142 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'U' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* ULTOSC BEGIN */ -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_7_PER1 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod1", /* paramName */ - 0, /* flags */ - - "First Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 7, /* defaultValue */ - "Number of bars for 1st period.", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_14_PER2 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod2", /* paramName */ - 0, /* flags */ - - "Second Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 14, /* defaultValue */ - "Number of bars fro 2nd period", /* hint */ - - NULL /* CamelCase name */ -}; - -const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_28_PER3 = -{ - TA_OptInput_IntegerRange, /* type */ - "optInTimePeriod3", /* paramName */ - 0, /* flags */ - - "Third Period", /* displayName */ - (const void *)&TA_DEF_TimePeriod_Positive, /* dataSet */ - 28, /* defaultValue */ - "Number of bars for 3rd period", /* hint */ - - NULL /* CamelCase name */ -}; - -static const TA_InputParameterInfo *TA_ULTOSC_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_ULTOSC_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_ULTOSC_OptInputs[] = -{ - &TA_DEF_UI_TimePeriod_7_PER1, - &TA_DEF_UI_TimePeriod_14_PER2, - &TA_DEF_UI_TimePeriod_28_PER3, - NULL -}; - -DEF_FUNCTION( ULTOSC, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Ultimate Oscillator", /* hint */ - "UltOsc", /* CamelCase name */ - 0 /* flags */ - ); -/* ULTOSC END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableU[] = -{ - ADD_TO_TABLE(ULTOSC), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableUSize = - ((sizeof(TA_DEF_TableU)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_v.c b/src/ta-lib/src/ta_abstract/tables/table_v.c deleted file mode 100644 index 9865afce4..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_v.c +++ /dev/null @@ -1,98 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'V' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* VAR BEGIN */ -static const TA_InputParameterInfo *TA_VAR_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_VAR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_VAR_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_5, - &TA_DEF_UI_NbDeviation, - NULL -}; - -DEF_FUNCTION( VAR, /* name */ - TA_GroupId_Statistic, /* groupId */ - "Variance", /* hint */ - "Variance", /* CamelCase name */ - 0 /* flags */ - ); -/* VAR END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableV[] = -{ - ADD_TO_TABLE(VAR), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableVSize = - ((sizeof(TA_DEF_TableV)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_w.c b/src/ta-lib/src/ta_abstract/tables/table_w.c deleted file mode 100644 index 8875f8ce6..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_w.c +++ /dev/null @@ -1,149 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'W' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* WCL BEGIN */ -static const TA_InputParameterInfo *TA_WCLPRICE_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_WCLPRICE_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_WCLPRICE_OptInputs[] = { NULL }; - -DEF_FUNCTION( WCLPRICE, /* name */ - TA_GroupId_PriceTransform, /* groupId */ - "Weighted Close Price", /* hint */ - "WclPrice", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); -/* WCL END */ - -/* WILLR BEGIN */ -static const TA_InputParameterInfo *TA_WILLR_Inputs[] = -{ - &TA_DEF_UI_Input_Price_HLC, - NULL -}; - -static const TA_OutputParameterInfo *TA_WILLR_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_WILLR_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_14_MINIMUM2, - NULL -}; - -DEF_FUNCTION( WILLR, /* name */ - TA_GroupId_MomentumIndicators, /* groupId */ - "Williams' %R", /* hint */ - "WillR", /* CamelCase name */ - 0 /* flags */ - ); -/* WILLR END */ - -/* WMA BEGIN */ -static const TA_InputParameterInfo *TA_WMA_Inputs[] = -{ - &TA_DEF_UI_Input_Real, - NULL -}; - -static const TA_OutputParameterInfo *TA_WMA_Outputs[] = -{ - &TA_DEF_UI_Output_Real, - NULL -}; - -static const TA_OptInputParameterInfo *TA_WMA_OptInputs[] = -{ &TA_DEF_UI_TimePeriod_30_MINIMUM2, - NULL -}; - -DEF_FUNCTION( WMA, /* name */ - TA_GroupId_OverlapStudies, /* groupId */ - "Weighted Moving Average", /* hint */ - "Wma", /* CamelCase name */ - TA_FUNC_FLG_OVERLAP /* flags */ - ); - -/* WMA END */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableW[] = -{ - ADD_TO_TABLE(WCLPRICE), - ADD_TO_TABLE(WILLR), - ADD_TO_TABLE(WMA), - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableWSize = - ((sizeof(TA_DEF_TableW)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_x.c b/src/ta-lib/src/ta_abstract/tables/table_x.c deleted file mode 100644 index 136dded8b..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_x.c +++ /dev/null @@ -1,72 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'X' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* None */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableX[] = -{ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableXSize = - ((sizeof(TA_DEF_TableX)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_y.c b/src/ta-lib/src/ta_abstract/tables/table_y.c deleted file mode 100644 index f80eca692..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_y.c +++ /dev/null @@ -1,72 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'Y' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* None */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableY[] = -{ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableYSize = - ((sizeof(TA_DEF_TableY)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_abstract/tables/table_z.c b/src/ta-lib/src/ta_abstract/tables/table_z.c deleted file mode 100644 index 1586082b1..000000000 --- a/src/ta-lib/src/ta_abstract/tables/table_z.c +++ /dev/null @@ -1,72 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/********************************************************************* - * This file contains only TA functions starting with the letter 'Z' * - *********************************************************************/ -#include -#include "ta_abstract.h" -#include "ta_def_ui.h" - -/* Follow the 3 steps defined below for adding a new TA Function to this - * file. - */ - -/**************************************************************************** - * Step 1 - Define here the interface to your TA functions with - * the macro DEF_FUNCTION. - * - ****************************************************************************/ - -/* None */ - -/**************************************************************************** - * Step 2 - Add your TA function to the table. - * Keep in alphabetical order. Must be NULL terminated. - ****************************************************************************/ -const TA_FuncDef *TA_DEF_TableZ[] = -{ - NULL -}; - - -/* Do not modify the following line. */ -const unsigned int TA_DEF_TableZSize = - ((sizeof(TA_DEF_TableZ)/sizeof(TA_FuncDef *))-1); - - -/**************************************************************************** - * Step 3 - Make sure "gen_code" is executed for generating all other - * source files derived from this one. - * You can then re-compile the library as usual and you are done! - ****************************************************************************/ diff --git a/src/ta-lib/src/ta_common/Makefile.am b/src/ta-lib/src/ta_common/Makefile.am deleted file mode 100644 index 509a8c6dd..000000000 --- a/src/ta-lib/src/ta_common/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ - -noinst_LTLIBRARIES = libta_common.la -AM_CPPFLAGS = -I../ta_common/ - -libta_common_la_SOURCES = ta_global.c \ - ta_retcode.c \ - ta_version.c - -libta_commondir=$(includedir)/ta-lib/ -libta_common_HEADERS = ../../include/ta_defs.h \ - ../../include/ta_libc.h \ - ../../include/ta_common.h - diff --git a/src/ta-lib/src/ta_common/ta_global.c b/src/ta-lib/src/ta_common/ta_global.c deleted file mode 100644 index 53965cfb8..000000000 --- a/src/ta-lib/src/ta_common/ta_global.c +++ /dev/null @@ -1,178 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 082004 AC Add TA_SetCandleSettings, TA_RestoreCandleDefaultSettings - * and call to TA_RestoreCandleDefaultSettings in TA_Initialize - * 041106 MF Add prefix to theGlobals to avoid clash with other libs. - * 040707 MF Change global initialization to eliminate Mac OS X link error. - */ - -/* Description: - * Provides initialization / shutdown functionality for all modules. - */ - -/**** Headers ****/ -#include -#include -#include - -#include "ta_common.h" -#include "ta_magic_nb.h" -#include "ta_global.h" -#include "ta_func.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ - -/* The entry point for all globals */ -TA_LibcPriv ta_theGlobals = {0,{{0,0,0}},0,0,0,0,(TA_Compatibility)0,{0},{{(TA_CandleSettingType)0,(TA_RangeType)0,0,0}}}; - -TA_LibcPriv *TA_Globals = &ta_theGlobals; - -/**** Local declarations. ****/ -/* None */ - -/**** Local functions declarations. ****/ -/* None */ - -/**** Local variables definitions. ****/ -/* None */ - -/**** Global functions definitions. ****/ -TA_RetCode TA_Initialize( void ) -{ - /* Initialize the "global variable" used to manage the global - * variables of all other modules... - */ - memset( TA_Globals, 0, sizeof( TA_LibcPriv ) ); - TA_Globals->magicNb = TA_LIBC_PRIV_MAGIC_NB; - - /*** At this point, TA_Shutdown can be called to clean-up. ***/ - - /* Set the default value to global variables */ - TA_RestoreCandleDefaultSettings( TA_AllCandleSettings ); - - return TA_SUCCESS; -} - -TA_RetCode TA_Shutdown( void ) -{ - if( TA_Globals->magicNb != TA_LIBC_PRIV_MAGIC_NB ) - return TA_LIB_NOT_INITIALIZE; - - /* Initialize to all zero to make sure we invalidate that object. */ - memset( TA_Globals, 0, sizeof( TA_LibcPriv ) ); - - return TA_SUCCESS; -} - -TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, - TA_RangeType rangeType, - int avgPeriod, - double factor ) -{ - /*printf("setcdlset:%d ",settingType);*/ - if( settingType >= TA_AllCandleSettings ) - return TA_BAD_PARAM; - TA_Globals->candleSettings[settingType].settingType = settingType; - TA_Globals->candleSettings[settingType].rangeType = rangeType; - TA_Globals->candleSettings[settingType].avgPeriod = avgPeriod; - TA_Globals->candleSettings[settingType].factor = factor; - /*printf("cdlset: %d %d %d %f\n",TA_Globals->candleSettings[settingType].settingType,TA_Globals->candleSettings[settingType].rangeType, - TA_Globals->candleSettings[settingType].avgPeriod,TA_Globals->candleSettings[settingType].factor);*/ - return TA_SUCCESS; -} - -TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType ) -{ - const TA_CandleSetting TA_CandleDefaultSettings[] = { - /* real body is long when it's longer than the average of the 10 previous candles' real body */ - { TA_BodyLong, TA_RangeType_RealBody, 10, 1.0 }, - /* real body is very long when it's longer than 3 times the average of the 10 previous candles' real body */ - { TA_BodyVeryLong, TA_RangeType_RealBody, 10, 3.0 }, - /* real body is short when it's shorter than the average of the 10 previous candles' real bodies */ - { TA_BodyShort, TA_RangeType_RealBody, 10, 1.0 }, - /* real body is like doji's body when it's shorter than 10% the average of the 10 previous candles' high-low range */ - { TA_BodyDoji, TA_RangeType_HighLow, 10, 0.1 }, - /* shadow is long when it's longer than the real body */ - { TA_ShadowLong, TA_RangeType_RealBody, 0, 1.0 }, - /* shadow is very long when it's longer than 2 times the real body */ - { TA_ShadowVeryLong, TA_RangeType_RealBody, 0, 2.0 }, - /* shadow is short when it's shorter than half the average of the 10 previous candles' sum of shadows */ - { TA_ShadowShort, TA_RangeType_Shadows, 10, 1.0 }, - /* shadow is very short when it's shorter than 10% the average of the 10 previous candles' high-low range */ - { TA_ShadowVeryShort, TA_RangeType_HighLow, 10, 0.1 }, - /* when measuring distance between parts of candles or width of gaps */ - /* "near" means "<= 20% of the average of the 5 previous candles' high-low range" */ - { TA_Near, TA_RangeType_HighLow, 5, 0.2 }, - /* when measuring distance between parts of candles or width of gaps */ - /* "far" means ">= 60% of the average of the 5 previous candles' high-low range" */ - { TA_Far, TA_RangeType_HighLow, 5, 0.6 }, - /* when measuring distance between parts of candles or width of gaps */ - /* "equal" means "<= 5% of the average of the 5 previous candles' high-low range" */ - { TA_Equal, TA_RangeType_HighLow, 5, 0.05 } - }; - - int i; - if( settingType > TA_AllCandleSettings ) - return TA_BAD_PARAM; - if( settingType == TA_AllCandleSettings ) - for( i = 0; i < TA_AllCandleSettings; ++i ) - TA_Globals->candleSettings[i] = TA_CandleDefaultSettings[i]; - else - TA_Globals->candleSettings[settingType] = TA_CandleDefaultSettings[settingType]; - return TA_SUCCESS; -} - -/**** Local functions definitions. ****/ -/* None */ - - diff --git a/src/ta-lib/src/ta_common/ta_global.h b/src/ta-lib/src/ta_common/ta_global.h deleted file mode 100644 index 3cdfcf653..000000000 --- a/src/ta-lib/src/ta_common/ta_global.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef TA_GLOBAL_H -#define TA_GLOBAL_H - -#ifndef TA_COMMON_H - #include "ta_common.h" -#endif - -#ifndef TA_FUNC_H - #include "ta_func.h" -#endif - -/* TA_CandleSetting is the one setting struct */ -typedef struct { - TA_CandleSettingType settingType; - TA_RangeType rangeType; - int avgPeriod; - double factor; -} TA_CandleSetting; - -/* This interface is used exclusively INTERNALY to the TA-LIB. - * There is nothing for the end-user here ;-> - */ - -/* Provides functionality for managing global ressource - * throughout the TA-LIB. - * - * Since not all module are used/link in the application, - * the ta_common simply provides the mechanism for the module - * to optionnaly "register" its initialization/shutdown - * function. - * - * A function shall access its global variable by calling - * TA_GetGlobal. This function will appropriatly call the - * initialization function if its global are not yet initialized. - * - * The call of the init and shutdown function are guaranteed - * to be multithread protected. It is also guarantee that - * these function will always get called in alternance (in - * other word, following an initialization only a shutdown - * can get called). - */ - -typedef enum -{ - /* Module will be shutdown in the order specified here. */ - - TA_ABSTRACTION_GLOBAL_ID, - TA_FUNC_GLOBAL_ID, - TA_MEMORY_GLOBAL_ID, /* Must be last. */ - TA_NB_GLOBAL_ID -} TA_GlobalModuleId; - -typedef TA_RetCode (*TA_GlobalInitFunc) ( void **globalToAlloc ); -typedef TA_RetCode (*TA_GlobalShutdownFunc)( void *globalAllocated ); - -typedef struct -{ - const TA_GlobalModuleId id; - const TA_GlobalInitFunc init; - const TA_GlobalShutdownFunc shutdown; -} TA_GlobalControl; - -TA_RetCode TA_GetGlobal( const TA_GlobalControl * const control, - void **global ); - -/* Occasionaly, code tracing must be disable. - * Example: - * - The memory module needs to know if the tracing is - * still enabled or not when freeing memory on shutdown. - * - We do not want to recursively trace while the tracing - * function themselves gets called ;-> - */ -int TA_IsTraceEnabled( void ); -void TA_TraceEnable ( void ); -void TA_TraceDisable ( void ); - -/* If enabled by the user, use a local drive - * for configuration and/or temporary file. - * TA-LIB must NEVER assume such local drive - * is available. - */ -const char *TA_GetLocalCachePath( void ); - -typedef struct -{ - unsigned int initialize; - const TA_GlobalControl * control; - void *global; -} TA_ModuleControl; - -/* This is the hidden implementation of TA_Libc. */ -typedef struct -{ - unsigned int magicNb; /* Unique identifier of this object. */ - TA_ModuleControl moduleControl[TA_NB_GLOBAL_ID]; - - unsigned int traceEnabled; - unsigned int stdioEnabled; - FILE *stdioFile; - - const char *localCachePath; - - /* For handling the compatibility with other software */ - TA_Compatibility compatibility; - - /* For handling the unstable period of some TA function. */ - unsigned int unstablePeriod[TA_FUNC_UNST_ALL]; - - /* For handling the candlestick global settings */ - TA_CandleSetting candleSettings[TA_AllCandleSettings]; - -} TA_LibcPriv; - -/* The following global is used all over the place - * and is the entry point for all other globals. - */ -extern TA_LibcPriv *TA_Globals; - -#endif diff --git a/src/ta-lib/src/ta_common/ta_magic_nb.h b/src/ta-lib/src/ta_common/ta_magic_nb.h deleted file mode 100644 index 72ac109f4..000000000 --- a/src/ta-lib/src/ta_common/ta_magic_nb.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef TA_MAGIC_NB_H -#define TA_MAGIC_NB_H - -/* Many allocated structures contains a magic number. - * - * These numbers are used solely to make sure that when a pointer is - * provided, it is really pointing on the expected type of data. - * It helps also for the detection of memory corruption. - * This mechanism is simple, but add a non-negligeable level of - * reliability at a very low cost (speed/memory wise). - */ -#define TA_FUNC_DEF_MAGIC_NB 0xA201B201 -#define TA_PARAM_HOLDER_PRIV_MAGIC_NB 0xA202B202 -#define TA_LIBC_PRIV_MAGIC_NB 0xA203B203 -#define TA_UDBASE_MAGIC_NB 0xA204B204 -#define TA_CATEGORY_TABLE_MAGIC_NB 0xA205B205 -#define TA_SYMBOL_TABLE_MAGIC_NB 0xA206B206 -#define TA_WEBPAGE_MAGIC_NB 0xA207B207 -#define TA_STREAM_MAGIC_NB 0xA208B208 -#define TA_STREAM_ACCESS_MAGIC_NB 0xA209B209 -#define TA_YAHOO_IDX_MAGIC_NB 0xA20AB20A -#define TA_STRING_TABLE_GROUP_MAGIC_NB 0xA20BB20B -#define TA_STRING_TABLE_FUNC_MAGIC_NB 0xA20CB20C -#define TA_MARKET_PAGE_MAGIC_NB 0xA20DB20D -#define TA_TRADELOGPRIV_MAGIC_NB 0xA20EB20E -#define TA_PMPRIV_MAGIC_NB 0xA20FB20F -#define TA_PMREPORT_MAGIC_NB 0xA210B210 -#define TA_TRADEREPORT_MAGIC_NB 0xA211B211 -#define TA_HISTORY_MAGIC_NB 0xA212B212 - -#endif diff --git a/src/ta-lib/src/ta_common/ta_memory.h b/src/ta-lib/src/ta_common/ta_memory.h deleted file mode 100644 index 4a5de0278..000000000 --- a/src/ta-lib/src/ta_common/ta_memory.h +++ /dev/null @@ -1,362 +0,0 @@ -#ifndef TA_MEMORY_H -#define TA_MEMORY_H - -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) - #ifndef TA_COMMON_H - #include "ta_common.h" - #endif - - #include - - /* Interface macros */ - #define TA_Malloc(a) malloc(a) - #define TA_Realloc(a,b) realloc((a),(b)) - #define TA_Free(a) free(a) - - #define FREE_IF_NOT_NULL(x) { if((x)!=NULL) {TA_Free((void *)(x)); (x)=NULL;} } - -#endif /* !defined(_MANAGED) && !defined( _JAVA ) && !defined( _RUST )*/ - - -/* ARRAY : Macros to manipulate arrays of value type. - * - * Using temporary array of double and integer are often needed for the - * TA functions. - * - * These macros allow basic operations to alloc/copy/free array of value type. - * - * These macros works in plain old C/C++, managed C++.and Java. - * - * (Use ARRAY_REF and ARRAY_INT_REF for double/integer arrays). - */ -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) - #define ARRAY_VTYPE_REF(type,name) SubArray^ name - #define ARRAY_VTYPE_LOCAL(type,name,size) SubArray^ name = gcnew SubArrayFrom1D(gcnew cli::array(size),0) - #define ARRAY_VTYPE_ALLOC(type,name,size) name = gcnew SubArrayFrom1D(gcnew cli::array(size),0) - #define ARRAY_VTYPE_COPY(type,dest,src,size) SubArray::Copy( src, 0, dest, 0, size ) - #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) SubArray::Copy( src, srcIdx, dest, destIdx, size ) - #define ARRAY_VTYPE_FREE(type,name) - #define ARRAY_VTYPE_FREE_COND(type,cond,name) -#elif defined( _MANAGED ) - #define ARRAY_VTYPE_REF(type,name) cli::array^ name - #define ARRAY_VTYPE_LOCAL(type,name,size) cli::array^ name = gcnew cli::array(size) - #define ARRAY_VTYPE_ALLOC(type,name,size) name = gcnew cli::array(size) - #define ARRAY_VTYPE_COPY(type,dest,src,size) cli::array::Copy( src, 0, dest, 0, size ) - #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) cli::array::Copy( src, srcIdx, dest, destIdx, size ) - #define ARRAY_VTYPE_FREE(type,name) - #define ARRAY_VTYPE_FREE_COND(type,cond,name) -#elif defined( _JAVA ) || defined( _RUST ) - #define ARRAY_VTYPE_REF(type,name) type []name - #define ARRAY_VTYPE_LOCAL(type,name,size) type []name = new type[size] - #define ARRAY_VTYPE_ALLOC(type,name,size) name = new type[size] - #define ARRAY_VTYPE_COPY(type,dest,src,size) System.arraycopy(src,0,dest,0,size) - #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) System.arraycopy(src,srcIdx,dest,destIdx,size) - #define ARRAY_VTYPE_FREE(type,name) - #define ARRAY_VTYPE_FREE_COND(type,cond,name) -#else - #define ARRAY_VTYPE_REF(type,name) type *name - #define ARRAY_VTYPE_LOCAL(type,name,size) type name[size] - #define ARRAY_VTYPE_ALLOC(type,name,size) name = (type *)TA_Malloc( sizeof(type)*(size)) - #define ARRAY_VTYPE_COPY(type,dest,src,size) memcpy(dest,src,sizeof(type)*(size)) - #define ARRAY_VTYPE_MEMMOVE(type,dest,destIdx,src,srcIdx,size) memmove( &dest[destIdx], &src[srcIdx], (size)*sizeof(type) ) - #define ARRAY_VTYPE_FREE(type,name) TA_Free(name) - #define ARRAY_VTYPE_FREE_COND(type,cond,name) if( cond ){ TA_Free(name); } -#endif - -/* ARRAY : Macros to manipulate arrays of double. */ -#define ARRAY_REF(name) ARRAY_VTYPE_REF(double,name) -#define ARRAY_LOCAL(name,size) ARRAY_VTYPE_LOCAL(double,name,size) -#define ARRAY_ALLOC(name,size) ARRAY_VTYPE_ALLOC(double,name,size) -#define ARRAY_COPY(dest,src,size) ARRAY_VTYPE_COPY(double,dest,src,size) -#define ARRAY_MEMMOVE(dest,destIdx,src,srcIdx,size) ARRAY_VTYPE_MEMMOVE(double,dest,destIdx,src,srcIdx,size) -#define ARRAY_FREE(name) ARRAY_VTYPE_FREE(double,name) -#define ARRAY_FREE_COND(cond,name) ARRAY_VTYPE_FREE_COND(double,cond,name) - -/* ARRAY : Macros to manipulate arrays of integer. */ -#define ARRAY_INT_REF(name) ARRAY_VTYPE_REF(int,name) -#define ARRAY_INT_LOCAL(name,size) ARRAY_VTYPE_LOCAL(int,name,size) -#define ARRAY_INT_ALLOC(name,size) ARRAY_VTYPE_ALLOC(int,name,size) -#define ARRAY_INT_COPY(dest,src,size) ARRAY_VTYPE_COPY(int,dest,src,size) -#define ARRAY_INT_MEMMOVE(dest,destIdx,src,srcIdx,size) ARRAY_VTYPE_MEMMOVE(int,dest,destIdx,src,srcIdx,size) -#define ARRAY_INT_FREE(name) ARRAY_VTYPE_FREE(int,name) -#define ARRAY_INT_FREE_COND(cond,name) ARRAY_VTYPE_FREE_COND(int,cond,name) - -/* ARRAY: Macros to manipulate arrays of mix type. - * This is just a loop doing an element by element copy. - */ -#define ARRAY_MEMMOVEMIX_VAR int mmmixi, mmmixdestIdx, mmmixsrcIdx -#define ARRAY_MEMMOVEMIX(dest,destIdx,src,srcIdx,size) { \ - for( mmmixi=0, mmmixdestIdx=destIdx, mmmixsrcIdx=srcIdx; \ - mmmixi < size; \ - mmmixi++, mmmixdestIdx++, mmmixsrcIdx++ ) \ - { \ - dest[mmmixdestIdx] = src[mmmixsrcIdx]; \ - } \ - } - -/* Access to "Globals" - * - * The globals here just means that these variables are accessible from - * all technical analysis functions. - * - * Depending of the language/platform, the globals might be in reality - * a private member variable of an object... - */ -#if defined( _MANAGED ) - #define TA_GLOBALS_UNSTABLE_PERIOD(x,y) (Globals->unstablePeriod[(int)(FuncUnstId::y)]) - #define TA_GLOBALS_COMPATIBILITY (Globals->compatibility) -#elif defined( _JAVA ) || defined( _RUST) - #define TA_GLOBALS_UNSTABLE_PERIOD(x,y) (this.unstablePeriod[FuncUnstId.y.ordinal()]) - #define TA_GLOBALS_COMPATIBILITY (this.compatibility) -#else - #define TA_GLOBALS_UNSTABLE_PERIOD(x,y) (TA_Globals->unstablePeriod[x]) - #define TA_GLOBALS_COMPATIBILITY (TA_Globals->compatibility) -#endif - - - -/* CIRCBUF : Circular Buffer Macros. - * - * The CIRCBUF is like a FIFO buffer (First In - First Out), except - * that the rate of data coming out is the same as the rate of - * data coming in (for simplification and speed optimization). - * In other word, when you add one new value, you must also consume - * one value (if not consume, the value is lost). - * - * The CIRCBUF size is unlimited, so it will automatically allocate and - * de-allocate memory as needed. In C/C++. when small enough, CIRCBUF will - * instead use a buffer "allocated" on the stack (automatic variable). - * - * Multiple CIRCBUF can be used within the same function. To make that - * possible the first parameter of the MACRO is an "Id" that can be - * any string. - * - * The macros offer the advantage to work in C/C++ and managed C++. - * - * CIRCBUF_PROLOG(Id,Type,Size); - * Will declare all the needed variables. 2 variables are - * important: - * 1) 'Id' will be a ptr of the specified Type. - * 2) 'Id'_Idx indicates from where to consume and - * to add the data. - * - * Important: You must consume the oldest data before - * setting the new data! - * - * The Size must be reasonable since it might "allocate" - * an array of this size on the stack (each element are 'Type'). - * - * CIRCBUF_CONSTRUCT(Id,Type,Size); - * Must be called prior to use the remaining macros. Must be - * followed by CIRCBUF_DESTROY when leaving the function. - * The Size here can be large. If the static Size specified - * with CIRCBUF_PROLOG is not sufficient, this MACRO will - * allocate a new buffer from the Heap. - * - * CIRCBUF_DESTROY(Id,Size); - * Must be call prior to leave the function. - * - * CIRCBUF_NEXT(Id); - * Move forward the indexes. - * - * Example: - * TA_RetCode MyFunc( int size ) - * { - * CIRCBUF_PROLOG(MyBuf,int,4); - * int i, value; - * ... - * CIRCBUF_CONSTRUCT(MyBuf,int,size); - * ... - * // 1st Loop: Fill MyBuf with initial values - * // (must be done). - * value = 0; - * for( i=0; i < size; i++ ) - * { - * // Set the data - * MyBuf[MyBuf_Idx] = value++; - * CIRCBUF_NEXT(MyBuf); - * } - * - * // 2nd Loop: Get and Add subsequent values - * // in MyBuf (optional) - * for( i=0; i < 3; i++ ) - * { - * // Consume the data (must be done first) - * printf( "%d ", MyBuf[MyBuf_Idx] ); - * - * // Set the new data (must be done second) - * MyBuf[MyBuf_Idx] = value++; - * - * // Move the index forward - * CIRCBUF_NEXT(MyBuf); - * } - * - * // 3rd Loop: Empty MyBuf (optional) - * for( i=0; i < size; i++ ) - * { - * printf( "%d ", MyBuf[MyBuf_Idx] ); - * CIRCBUF_NEXT(MyBuf); - * } - * - * CIRCBUF_DESTROY(MyBuf); - * return TA_SUCCESS; - * } - * - * - * A call to MyFunc(5) will output: - * 0 1 2 3 4 5 6 7 - * - * The value 0 to 4 are added by the 1st loop. - * The value 5 to 7 are added by the 2nd loop. - * - * The value 0 to 2 are displayed by the 2nd loop. - * The value 3 to 7 are displayed by the 3rd loop. - * - * Because the size 5 is greater than the - * value provided in CIRCBUF_PROLOG, a buffer will - * be dynamically allocated (and freed). - */ -#if defined( _MANAGED ) - -#define CIRCBUF_PROLOG(Id,Type,Size) int Id##_Idx = 0; \ - cli::array^ Id; \ - int maxIdx_##Id = (Size-1) - -/* Use this macro instead if the Type is a class or a struct. */ -#define CIRCBUF_PROLOG_CLASS(Id,Type,Size) int Id##_Idx = 0; \ - cli::array^ Id; \ - int maxIdx_##Id = (Size-1) - -#define CIRCBUF_INIT(Id,Type,Size) \ - { \ - if( Size <= 0 ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - Id = gcnew cli::array(Size); \ - if( !Id ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - maxIdx_##Id = (Size-1); \ - } - -#define CIRCBUF_INIT_CLASS(Id,Type,Size) \ - { \ - if( Size <= 0 ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - Id = gcnew cli::array(Size); \ - for( int _##Id##_index=0; _##Id##_indexLength; _##Id##_index++) \ - { \ - Id[_##Id##_index]=gcnew Type(); \ - } \ - if( !Id ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - maxIdx_##Id = (Size-1); \ - } - -#define CIRCBUF_INIT_LOCAL_ONLY(Id,Type) \ - { \ - Id = gcnew cli::array(maxIdx_##Id+1); \ - if( !Id ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - } - -#define CIRCBUF_DESTROY(Id) - -/* Use this macro to access the member when type is a class or a struct. */ -#define CIRCBUF_REF(x) (x)-> - -#elif defined(_JAVA) || defined (_RUST) - -#define CIRCBUF_PROLOG(Id,Type,Size) int Id##_Idx = 0; \ - Type []Id; \ - int maxIdx_##Id = (Size-1) - -/* Use this macro instead if the Type is a class or a struct. */ -#define CIRCBUF_PROLOG_CLASS(Id,Type,Size) int Id##_Idx = 0; \ - Type []Id; \ - int maxIdx_##Id = (Size-1) - -#define CIRCBUF_INIT(Id,Type,Size) \ - { \ - if( Size <= 0 ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - Id = new Type[Size]; \ - maxIdx_##Id = (Size-1); \ - } - -#define CIRCBUF_INIT_CLASS(Id,Type,Size) \ - { \ - if( Size <= 0 ) \ - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); \ - Id = new Type[Size]; \ - for( int _##Id##_index=0; _##Id##_index (int)(sizeof(local_##Id)/sizeof(Type)) ) \ - { \ - Id = TA_Malloc( sizeof(Type)*Size ); \ - if( !Id ) \ - return TA_ALLOC_ERR; \ - } \ - else \ - Id = &local_##Id[0]; \ - maxIdx_##Id = (Size-1); \ - Id##_Idx = 0; \ - } - -#define CIRCBUF_INIT_CLASS(Id,Type,Size) CIRCBUF_INIT(Id,Type,Size) - -#define CIRCBUF_INIT_LOCAL_ONLY(Id,Type) \ - { \ - Id = &local_##Id[0]; \ - maxIdx_##Id = (int)(sizeof(local_##Id)/sizeof(Type))-1; \ - Id##_Idx = 0; \ - } - -#define CIRCBUF_DESTROY(Id) \ - { \ - if( Id != &local_##Id[0] ) \ - TA_Free( Id ); \ - } - -/* Use this macro to access the member when Type is a class or a struct. */ -#define CIRCBUF_REF(x) (x). - -#endif - -#define CIRCBUF_NEXT(Id) \ - { \ - Id##_Idx++; \ - if( Id##_Idx > maxIdx_##Id ) \ - Id##_Idx = 0; \ - } - - -#endif - diff --git a/src/ta-lib/src/ta_common/ta_pragma.h b/src/ta-lib/src/ta_common/ta_pragma.h deleted file mode 100644 index 9b35c7314..000000000 --- a/src/ta-lib/src/ta_common/ta_pragma.h +++ /dev/null @@ -1,87 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * CM Craig Miller (c-miller@users.sourceforge.net) - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011707 CM First version. - */ - -/* Description: - * - * Visual Studio 2005 has extended the C Run-Time Library by including "secure" - * runtime functions and deprecating the previous function prototypes. Since - * we need to use the previous prototypes to maintain compatibility with other - * platform compilers we are going to disable the deprecation warnings when - * compiling with Visual Studio 2005. - * - * Note: this header must be the first inclusion referenced by the code file - * needing these settings!!!!! - * - */ - -#ifndef TA_PRAGMA_H -#define TA_PRAGMA_H - -#if (_MSC_VER >= 1400) // VC8+ nmake and VS2005 - - #ifndef _CRT_SECURE_NO_DEPRECATE //turn off MS 'safe' CRT library routines - #define _CRT_SECURE_NO_DEPRECATE 1 - #endif - -// There are additional macros that may be needed in the future, so we'll list them here - //#ifndef _CRT_SECURE_NO_WARNINGS //turn off MS 'safe' CRT library routines - // #define _CRT_SECURE_NO_WARNINGS 1 - //#endif - // - //#ifndef _SCL_SECURE_NO_DEPRECATE //turn off MS 'safe' C++RT library routines - // #define _SCL_SECURE_NO_DEPRECATE 1 - //#endif - //#ifndef _SCL_SECURE_NO_WARNINGS - // #define _SCL_SECURE_NO_WARNINGS 1 - //#endif - // - //#ifndef _CRT_NONSTDC_NO_DEPRECATE //turn off MS POSIX replacements library routines - // #define _CRT_NONSTDC_NO_DEPRECATE 1 - //#endif - -#endif // VC8+ - -#endif //TA_PRAGMA_H diff --git a/src/ta-lib/src/ta_common/ta_retcode.c b/src/ta-lib/src/ta_common/ta_retcode.c deleted file mode 100644 index f5600cec1..000000000 --- a/src/ta-lib/src/ta_common/ta_retcode.c +++ /dev/null @@ -1,109 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Important: This file is automatically generated by the utility gen_code. - * Any modification will be lost on next execution of gen_code. - * - * The goal of this file is to provide the functionality TA_SetRetCodeInfo. - * - * This function is a convenient way for the user to translate a TA_RetCode into - * a human readable string. - */ -#include - -typedef struct -{ - TA_RetCode retCode; - const char * const enumStr; - const char * const infoStr; -} TA_InternalRetCodeInfo; - -static TA_InternalRetCodeInfo retCodeInfoTable[] = { - {(TA_RetCode)0,"TA_SUCCESS","No error"}, - {(TA_RetCode)1,"TA_LIB_NOT_INITIALIZE","TA_Initialize was not sucessfully called"}, - {(TA_RetCode)2,"TA_BAD_PARAM","A parameter is out of range"}, - {(TA_RetCode)3,"TA_ALLOC_ERR","Possibly out-of-memory"}, - {(TA_RetCode)4,"TA_GROUP_NOT_FOUND","No Info"}, - {(TA_RetCode)5,"TA_FUNC_NOT_FOUND","No Info"}, - {(TA_RetCode)6,"TA_INVALID_HANDLE","No Info"}, - {(TA_RetCode)7,"TA_INVALID_PARAM_HOLDER","No Info"}, - {(TA_RetCode)8,"TA_INVALID_PARAM_HOLDER_TYPE","No Info"}, - {(TA_RetCode)9,"TA_INVALID_PARAM_FUNCTION","No Info"}, - {(TA_RetCode)10,"TA_INPUT_NOT_ALL_INITIALIZE","No Info"}, - {(TA_RetCode)11,"TA_OUTPUT_NOT_ALL_INITIALIZE","No Info"}, - {(TA_RetCode)12,"TA_OUT_OF_RANGE_START_INDEX","No Info"}, - {(TA_RetCode)13,"TA_OUT_OF_RANGE_END_INDEX","No Info"}, - {(TA_RetCode)14,"TA_INVALID_LIST_TYPE","No Info"}, - {(TA_RetCode)15,"TA_BAD_OBJECT","No Info"}, - {(TA_RetCode)16,"TA_NOT_SUPPORTED","No Info"}, - {(TA_RetCode)5000,"TA_INTERNAL_ERROR","No Info"}, - {(TA_RetCode)0xFFFF,"TA_UNKNOWN_ERR","Unknown Error"} -}; - -#define NB_RET_CODE_INFO (sizeof(retCodeInfoTable)/sizeof(TA_InternalRetCodeInfo)) - -void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo ) -{ - unsigned int i; - - /* Trap internal error code */ - if( (theRetCode >= 5000) && (theRetCode <= 5999) ) - { - retCodeInfo->enumStr = "TA_INTERNAL_ERROR"; - retCodeInfo->infoStr = "Unexpected Internal Error - Contact TA-Lib.org"; - return; - } - - /* Check among all the error code defined in ta_common.h */ - for( i=0; i < (NB_RET_CODE_INFO-1); i++ ) - { - if( theRetCode == retCodeInfoTable[i].retCode ) - { - /* Error code found. */ - retCodeInfo->enumStr = retCodeInfoTable[i].enumStr; - retCodeInfo->infoStr = retCodeInfoTable[i].infoStr; - return; - } - } - - /* Error code not found. */ - - /* "TA_UNKNOWN_ERR" is ALWAYS the last entry in the table. */ - retCodeInfo->enumStr = retCodeInfoTable[i].enumStr; - retCodeInfo->infoStr = retCodeInfoTable[i].infoStr; -} - -/***************/ -/* End of File */ -/***************/ - diff --git a/src/ta-lib/src/ta_common/ta_version.c b/src/ta-lib/src/ta_common/ta_version.c deleted file mode 100644 index 4b724226a..000000000 --- a/src/ta-lib/src/ta_common/ta_version.c +++ /dev/null @@ -1,97 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -/* Package versioning. - * - * Must match the VERSION file in the TA-Lib repos root dir. - * - */ -#define MAJOR "0" -#define MINOR "6" -#define PATCH "4" - -/* Deprecated: Use PATCH instead. */ -#define BUILD PATCH - -/* Nothing to modify below this line. */ - -#define TA_VERSION_DT "(" __DATE__ " " __TIME__ ")" - -const char *TA_GetVersionString( void ) -{ - return MAJOR "." MINOR "." PATCH " " TA_VERSION_DT; -} - -const char *TA_GetVersionMajor( void ) -{ - return MAJOR; -} - -const char *TA_GetVersionMinor( void ) -{ - return MINOR; -} - -const char *TA_GetVersionPatch( void ) -{ - return PATCH; -} - -const char *TA_GetVersionBuild( void ) -{ - /* Deprecated: No further support for Build versioning. - * Package versioning are now only MAJOR.MINOR.PATCH - */ - return PATCH; -} - -const char *TA_GetVersionExtra( void ) -{ - /* Deprecated: No further support for Extra versioning. - * Package versioning are now only MAJOR.MINOR.PATCH - */ - return ""; -} - -const char *TA_GetVersionDate( void ) -{ - return __DATE__; -} - -const char *TA_GetVersionTime( void ) -{ - return __TIME__; -} diff --git a/src/ta-lib/src/ta_func/Makefile.am b/src/ta-lib/src/ta_func/Makefile.am deleted file mode 100644 index ac88553d8..000000000 --- a/src/ta-lib/src/ta_func/Makefile.am +++ /dev/null @@ -1,171 +0,0 @@ - -noinst_LTLIBRARIES = libta_func.la -AM_CPPFLAGS = -I../ta_common/ - -libta_func_la_SOURCES = ta_utility.c \ - ta_ACCBANDS.c \ - ta_ACOS.c \ - ta_AD.c \ - ta_ADD.c \ - ta_ADOSC.c \ - ta_ADX.c \ - ta_ADXR.c \ - ta_APO.c \ - ta_AROON.c \ - ta_AROONOSC.c \ - ta_ASIN.c \ - ta_ATAN.c \ - ta_ATR.c \ - ta_AVGPRICE.c \ - ta_AVGDEV.c \ - ta_BBANDS.c \ - ta_BETA.c \ - ta_BOP.c \ - ta_CCI.c \ - ta_CDL2CROWS.c \ - ta_CDL3BLACKCROWS.c \ - ta_CDL3INSIDE.c \ - ta_CDL3LINESTRIKE.c \ - ta_CDL3OUTSIDE.c \ - ta_CDL3STARSINSOUTH.c \ - ta_CDL3WHITESOLDIERS.c \ - ta_CDLABANDONEDBABY.c \ - ta_CDLADVANCEBLOCK.c \ - ta_CDLBELTHOLD.c \ - ta_CDLBREAKAWAY.c \ - ta_CDLCLOSINGMARUBOZU.c \ - ta_CDLCONCEALBABYSWALL.c \ - ta_CDLCOUNTERATTACK.c \ - ta_CDLDARKCLOUDCOVER.c \ - ta_CDLDOJI.c \ - ta_CDLDOJISTAR.c \ - ta_CDLDRAGONFLYDOJI.c \ - ta_CDLENGULFING.c \ - ta_CDLEVENINGDOJISTAR.c \ - ta_CDLEVENINGSTAR.c \ - ta_CDLGAPSIDESIDEWHITE.c \ - ta_CDLGRAVESTONEDOJI.c \ - ta_CDLHAMMER.c \ - ta_CDLHANGINGMAN.c \ - ta_CDLHARAMI.c \ - ta_CDLHARAMICROSS.c \ - ta_CDLHIGHWAVE.c \ - ta_CDLHIKKAKE.c \ - ta_CDLHIKKAKEMOD.c \ - ta_CDLHOMINGPIGEON.c \ - ta_CDLIDENTICAL3CROWS.c \ - ta_CDLINNECK.c \ - ta_CDLINVERTEDHAMMER.c \ - ta_CDLKICKING.c \ - ta_CDLKICKINGBYLENGTH.c \ - ta_CDLLADDERBOTTOM.c \ - ta_CDLLONGLEGGEDDOJI.c \ - ta_CDLLONGLINE.c \ - ta_CDLMARUBOZU.c \ - ta_CDLMATCHINGLOW.c \ - ta_CDLMATHOLD.c \ - ta_CDLMORNINGDOJISTAR.c \ - ta_CDLMORNINGSTAR.c \ - ta_CDLONNECK.c \ - ta_CDLPIERCING.c \ - ta_CDLRICKSHAWMAN.c \ - ta_CDLRISEFALL3METHODS.c \ - ta_CDLSEPARATINGLINES.c \ - ta_CDLSHOOTINGSTAR.c \ - ta_CDLSHORTLINE.c \ - ta_CDLSPINNINGTOP.c \ - ta_CDLSTALLEDPATTERN.c \ - ta_CDLSTICKSANDWICH.c \ - ta_CDLTAKURI.c \ - ta_CDLTASUKIGAP.c \ - ta_CDLTHRUSTING.c \ - ta_CDLTRISTAR.c \ - ta_CDLUNIQUE3RIVER.c \ - ta_CDLUPSIDEGAP2CROWS.c \ - ta_CDLXSIDEGAP3METHODS.c \ - ta_CEIL.c \ - ta_CMO.c \ - ta_CORREL.c \ - ta_COS.c \ - ta_COSH.c \ - ta_DEMA.c \ - ta_DIV.c \ - ta_DX.c \ - ta_EMA.c \ - ta_EXP.c \ - ta_FLOOR.c \ - ta_HT_DCPERIOD.c \ - ta_HT_DCPHASE.c \ - ta_HT_PHASOR.c \ - ta_HT_SINE.c \ - ta_HT_TRENDLINE.c \ - ta_HT_TRENDMODE.c \ - ta_IMI.c \ - ta_KAMA.c \ - ta_LINEARREG.c \ - ta_LINEARREG_ANGLE.c \ - ta_LINEARREG_INTERCEPT.c \ - ta_LINEARREG_SLOPE.c \ - ta_LN.c \ - ta_LOG10.c \ - ta_MA.c \ - ta_MACD.c \ - ta_MACDEXT.c \ - ta_MACDFIX.c \ - ta_MAMA.c \ - ta_MAVP.c \ - ta_MAX.c \ - ta_MAXINDEX.c \ - ta_MEDPRICE.c \ - ta_MFI.c \ - ta_MIDPOINT.c \ - ta_MIDPRICE.c \ - ta_MIN.c \ - ta_MININDEX.c \ - ta_MINMAX.c \ - ta_MINMAXINDEX.c \ - ta_MINUS_DI.c \ - ta_MINUS_DM.c \ - ta_MOM.c \ - ta_MULT.c \ - ta_NATR.c \ - ta_OBV.c \ - ta_PLUS_DI.c \ - ta_PLUS_DM.c \ - ta_PPO.c \ - ta_ROC.c \ - ta_ROCP.c \ - ta_ROCR.c \ - ta_ROCR100.c \ - ta_RSI.c \ - ta_SAR.c \ - ta_SAREXT.c \ - ta_SIN.c \ - ta_SINH.c \ - ta_SMA.c \ - ta_SQRT.c \ - ta_STDDEV.c \ - ta_STOCH.c \ - ta_STOCHF.c \ - ta_STOCHRSI.c \ - ta_SUB.c \ - ta_SUM.c \ - ta_T3.c \ - ta_TAN.c \ - ta_TANH.c \ - ta_TEMA.c \ - ta_TRANGE.c \ - ta_TRIMA.c \ - ta_TRIX.c \ - ta_TSF.c \ - ta_TYPPRICE.c \ - ta_ULTOSC.c \ - ta_VAR.c \ - ta_WCLPRICE.c \ - ta_WILLR.c \ - ta_WMA.c - -libta_funcdir=$(includedir)/ta-lib/ -libta_func_HEADERS = ../../include/ta_defs.h \ - ../../include/ta_libc.h \ - ../../include/ta_func.h diff --git a/src/ta-lib/src/ta_func/ta_ACCBANDS.c b/src/ta-lib/src/ta_func/ta_ACCBANDS.c deleted file mode 100644 index 97c4e1cbf..000000000 --- a/src/ta-lib/src/ta_func/ta_ACCBANDS.c +++ /dev/null @@ -1,518 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * RM Robert Meier - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120307 RM Initial Version - * 120907 MF Handling of a few limit cases - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AccbandsLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int accbandsLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ACCBANDS_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 20; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return LOOKBACK_CALL(SMA)( optInTimePeriod ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ACCBANDS - Acceleration Bands - * - * Input = High, Low, Close - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outRealUpperBand, -/* Generated */ SubArray^ outRealMiddleBand, -/* Generated */ SubArray^ outRealLowerBand ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outRealUpperBand, -/* Generated */ cli::array^ outRealMiddleBand, -/* Generated */ cli::array^ outRealLowerBand ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode accbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ACCBANDS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ENUM_DECLARATION(RetCode) retCode; - ARRAY_REF( tempBuffer1 ); - ARRAY_REF( tempBuffer2 ); - VALUE_HANDLE_INT(outBegIdxDummy); - VALUE_HANDLE_INT(outNbElementDummy); - int i, j, outputSize, bufferSize, lookbackTotal; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 20; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outRealUpperBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outRealMiddleBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outRealLowerBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = LOOKBACK_CALL(SMA)( optInTimePeriod ); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Buffer will contains also the lookback required for SMA - * to satisfy the caller requested startIdx/endIdx. - */ - outputSize = endIdx-startIdx+1; - bufferSize = outputSize+lookbackTotal; - ARRAY_ALLOC(tempBuffer1, bufferSize ); - #if !defined(_JAVA) - if( !tempBuffer1 ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - ARRAY_ALLOC(tempBuffer2, bufferSize ); - #if !defined(_JAVA) - if( !tempBuffer2 ) - { - ARRAY_FREE(tempBuffer1); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - /* Calculate the upper/lower band at the same time (no SMA yet). - * Must start calculation back enough to cover the lookback - * required later for the SMA. - */ - for(j=0, i=startIdx-lookbackTotal; i<=endIdx; i++, j++) - { - tempReal = inHigh[i]+inLow[i]; - if( !TA_IS_ZERO(tempReal) ) - { - tempReal = 4*(inHigh[i]-inLow[i])/tempReal; - tempBuffer1[j] = inHigh[i]*(1+tempReal); - tempBuffer2[j] = inLow[i]*(1-tempReal); - } - else - { - tempBuffer1[j] = inHigh[i]; - tempBuffer2[j] = inLow[i]; - } - } - - /* Calculate the middle band, which is a moving average of the close. */ - retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inClose, - optInTimePeriod, - VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), outRealMiddleBand ); - - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) - { - ARRAY_FREE( tempBuffer1 ); - ARRAY_FREE( tempBuffer2 ); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Now let's take the SMA for the upper band. */ - retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer1, - optInTimePeriod, - VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), - outRealUpperBand ); - - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) - { - ARRAY_FREE( tempBuffer1 ); - ARRAY_FREE( tempBuffer2 ); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Now let's take the SMA for the lower band. */ - retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer2, - optInTimePeriod, - VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), - outRealLowerBand ); - - ARRAY_FREE( tempBuffer1 ); - ARRAY_FREE( tempBuffer2 ); - - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outputSize; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outRealUpperBand, -/* Generated */ SubArray^ outRealMiddleBand, -/* Generated */ SubArray^ outRealLowerBand ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Accbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outRealUpperBand, -/* Generated */ cli::array^ outRealMiddleBand, -/* Generated */ cli::array^ outRealLowerBand ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode accbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ACCBANDS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ ARRAY_REF( tempBuffer1 ); -/* Generated */ ARRAY_REF( tempBuffer2 ); -/* Generated */ VALUE_HANDLE_INT(outBegIdxDummy); -/* Generated */ VALUE_HANDLE_INT(outNbElementDummy); -/* Generated */ int i, j, outputSize, bufferSize, lookbackTotal; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 20; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outRealUpperBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outRealMiddleBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outRealLowerBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(SMA)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outputSize = endIdx-startIdx+1; -/* Generated */ bufferSize = outputSize+lookbackTotal; -/* Generated */ ARRAY_ALLOC(tempBuffer1, bufferSize ); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !tempBuffer1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC(tempBuffer2, bufferSize ); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !tempBuffer2 ) -/* Generated */ { -/* Generated */ ARRAY_FREE(tempBuffer1); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ for(j=0, i=startIdx-lookbackTotal; i<=endIdx; i++, j++) -/* Generated */ { -/* Generated */ tempReal = inHigh[i]+inLow[i]; -/* Generated */ if( !TA_IS_ZERO(tempReal) ) -/* Generated */ { -/* Generated */ tempReal = 4*(inHigh[i]-inLow[i])/tempReal; -/* Generated */ tempBuffer1[j] = inHigh[i]*(1+tempReal); -/* Generated */ tempBuffer2[j] = inLow[i]*(1-tempReal); -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ tempBuffer1[j] = inHigh[i]; -/* Generated */ tempBuffer2[j] = inLow[i]; -/* Generated */ } -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inClose, -/* Generated */ optInTimePeriod, -/* Generated */ VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), outRealMiddleBand ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempBuffer1 ); -/* Generated */ ARRAY_FREE( tempBuffer2 ); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer1, -/* Generated */ optInTimePeriod, -/* Generated */ VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), -/* Generated */ outRealUpperBand ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempBuffer1 ); -/* Generated */ ARRAY_FREE( tempBuffer2 ); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(SMA)( 0, bufferSize-1, tempBuffer2, -/* Generated */ optInTimePeriod, -/* Generated */ VALUE_HANDLE_OUT(outBegIdxDummy), VALUE_HANDLE_OUT(outNbElementDummy), -/* Generated */ outRealLowerBand ); -/* Generated */ ARRAY_FREE( tempBuffer1 ); -/* Generated */ ARRAY_FREE( tempBuffer2 ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_GET(outNbElementDummy) != outputSize) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outputSize; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ACOS.c b/src/ta-lib/src/ta_func/ta_ACOS.c deleted file mode 100644 index dd74936cf..000000000 --- a/src/ta-lib/src/ta_func/ta_ACOS.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AcosLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int acosLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ACOS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ACOS - Vector Trigonometric ACos - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode acos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ACOS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_acos(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Acos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode acos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ACOS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_acos(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_AD.c b/src/ta-lib/src/ta_func/ta_AD.c deleted file mode 100644 index bb9a2ac95..000000000 --- a/src/ta-lib/src/ta_func/ta_AD.c +++ /dev/null @@ -1,327 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JD jdoyle - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 111705 MF,JD Fix#1359452 for handling properly start/end range. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AdLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int adLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_AD_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* This function have no lookback needed. */ - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_AD - Chaikin A/D Line - * - * Input = High, Low, Close, Volume - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ SubArray^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ cli::array^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ad( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double inVolume[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_AD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ const double inVolume[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int nbBar, currentBar, outIdx; - - double high, low, close, tmp; - double ad; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Note: Results from this function might vary slightly - * from Metastock outputs. The reason being that - * Metastock use float instead of double and this - * cause a different floating-point precision to - * be used. - * - * For most function, this is not an apparent difference - * but for function using large cummulative values (like - * this AD function), minor imprecision adds up and becomes - * significative. - * - * For better precision, TA-Lib use double in all its - * its calculations. - */ - - /* Default return values */ - nbBar = endIdx-startIdx+1; - VALUE_HANDLE_DEREF(outNBElement) = nbBar; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - currentBar = startIdx; - outIdx = 0; - ad = 0.0; - - while( nbBar != 0 ) - { - high = inHigh[currentBar]; - low = inLow[currentBar]; - tmp = high-low; - close = inClose[currentBar]; - - if( tmp > 0.0 ) - ad += (((close-low)-(high-close))/tmp)*((double)inVolume[currentBar]); - - outReal[outIdx++] = ad; - - currentBar++; - nbBar--; - } - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ SubArray^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ad( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ cli::array^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ad( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ float inVolume[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_AD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ const float inVolume[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int nbBar, currentBar, outIdx; -/* Generated */ double high, low, close, tmp; -/* Generated */ double ad; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbBar = endIdx-startIdx+1; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = nbBar; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ currentBar = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ ad = 0.0; -/* Generated */ while( nbBar != 0 ) -/* Generated */ { -/* Generated */ high = inHigh[currentBar]; -/* Generated */ low = inLow[currentBar]; -/* Generated */ tmp = high-low; -/* Generated */ close = inClose[currentBar]; -/* Generated */ if( tmp > 0.0 ) -/* Generated */ ad += (((close-low)-(high-close))/tmp)*((double)inVolume[currentBar]); -/* Generated */ outReal[outIdx++] = ad; -/* Generated */ currentBar++; -/* Generated */ nbBar--; -/* Generated */ } -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ diff --git a/src/ta-lib/src/ta_func/ta_ADD.c b/src/ta-lib/src/ta_func/ta_ADD.c deleted file mode 100644 index b08f36d5b..000000000 --- a/src/ta-lib/src/ta_func/ta_ADD.c +++ /dev/null @@ -1,260 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AddLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int addLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ADD_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ADD - Vector Arithmetic Add - * - * Input = double, double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Add( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Add( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode add( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal0[], -/* Generated */ double inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ADD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal0[], -/* Generated */ const double inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = inReal0[i]+inReal1[i]; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Add( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Add( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode add( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal0[], -/* Generated */ float inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ADD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal0[], -/* Generated */ const float inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = inReal0[i]+inReal1[i]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ADOSC.c b/src/ta-lib/src/ta_func/ta_ADOSC.c deleted file mode 100644 index 1dd8bad3d..000000000 --- a/src/ta-lib/src/ta_func/ta_ADOSC.c +++ /dev/null @@ -1,495 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AdOscLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int adOscLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ADOSC_Lookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int slowestPeriod; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 3; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 10; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Use the slowest EMA period to evaluate the total lookback. */ - if( optInFastPeriod < optInSlowPeriod ) - slowestPeriod = optInSlowPeriod; - else - slowestPeriod = optInFastPeriod; - - /* Adjust startIdx to account for the lookback period. */ - return LOOKBACK_CALL(EMA)( slowestPeriod ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ADOSC - Chaikin A/D Oscillator - * - * Input = High, Low, Close, Volume - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ SubArray^ inVolume, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ cli::array^ inVolume, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode adOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double inVolume[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ADOSC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ const double inVolume[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int today, outIdx, lookbackTotal; - int slowestPeriod; - double high, low, close, tmp; - - double slowEMA, slowk, one_minus_slowk; - double fastEMA, fastk, one_minus_fastk; - double ad; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 3; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 10; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Implementation Note: - * The fastEMA varaible is not neceseraly the - * fastest EMA. - * In the same way, slowEMA is not neceseraly the - * slowest EMA. - * - * The ADOSC is always the (fastEMA - slowEMA) regardless - * of the period specified. In other word: - * - * ADOSC(3,10) = EMA(3,AD) - EMA(10,AD) - * - * while - * - * ADOSC(10,3) = EMA(10,AD)- EMA(3,AD) - * - * In the first case the EMA(3) is truly a faster EMA, - * while in the second case, the EMA(10) is still call - * fastEMA in the algorithm, even if it is in fact slower. - * - * This gives more flexibility to the user if they want to - * experiment with unusual parameter settings. - */ - - /* Identify the slowest period. - * This infomration is used soleley to bootstrap - * the algorithm (skip the lookback period). - */ - if( optInFastPeriod < optInSlowPeriod ) - slowestPeriod = optInSlowPeriod; - else - slowestPeriod = optInFastPeriod; - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(EMA)( slowestPeriod ); - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - today = startIdx-lookbackTotal; - - /* The following variables and macro are used to - * calculate the "ad". - */ - ad = 0.0; - #define CALCULATE_AD \ - { \ - high = inHigh[today]; \ - low = inLow[today]; \ - tmp = high-low; \ - close = inClose[today]; \ - if( tmp > 0.0 ) \ - ad += (((close-low)-(high-close))/tmp)*((double)inVolume[today]); \ - today++; \ - } - - /* Constants for EMA */ - fastk = PER_TO_K( optInFastPeriod ); - one_minus_fastk = 1.0 - fastk; - - slowk = PER_TO_K( optInSlowPeriod ); - one_minus_slowk = 1.0 - slowk; - - /* Initialize the two EMA - * - * Use the same range of initialization inputs for - * both EMA and simply seed with the first A/D value. - * - * Note: Metastock do the same. - */ - CALCULATE_AD; - fastEMA = ad; - slowEMA = ad; - - /* Initialize the EMA and skip the unstable period. */ - while( today < startIdx ) - { - CALCULATE_AD; - fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); - slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); - } - - /* Perform the calculation for the requested range */ - outIdx = 0; - while( today <= endIdx ) - { - CALCULATE_AD; - fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); - slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); - - outReal[outIdx++] = fastEMA - slowEMA; - } - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ SubArray^ inVolume, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AdOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ cli::array^ inVolume, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode adOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ float inVolume[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ADOSC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ const float inVolume[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, outIdx, lookbackTotal; -/* Generated */ int slowestPeriod; -/* Generated */ double high, low, close, tmp; -/* Generated */ double slowEMA, slowk, one_minus_slowk; -/* Generated */ double fastEMA, fastk, one_minus_fastk; -/* Generated */ double ad; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 3; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 10; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( optInFastPeriod < optInSlowPeriod ) -/* Generated */ slowestPeriod = optInSlowPeriod; -/* Generated */ else -/* Generated */ slowestPeriod = optInFastPeriod; -/* Generated */ lookbackTotal = LOOKBACK_CALL(EMA)( slowestPeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ today = startIdx-lookbackTotal; -/* Generated */ ad = 0.0; -/* Generated */ #define CALCULATE_AD \ -/* Generated */ { \ -/* Generated */ high = inHigh[today]; \ -/* Generated */ low = inLow[today]; \ -/* Generated */ tmp = high-low; \ -/* Generated */ close = inClose[today]; \ -/* Generated */ if( tmp > 0.0 ) \ -/* Generated */ ad += (((close-low)-(high-close))/tmp)*((double)inVolume[today]); \ -/* Generated */ today++; \ -/* Generated */ } -/* Generated */ fastk = PER_TO_K( optInFastPeriod ); -/* Generated */ one_minus_fastk = 1.0 - fastk; -/* Generated */ slowk = PER_TO_K( optInSlowPeriod ); -/* Generated */ one_minus_slowk = 1.0 - slowk; -/* Generated */ CALCULATE_AD; -/* Generated */ fastEMA = ad; -/* Generated */ slowEMA = ad; -/* Generated */ while( today < startIdx ) -/* Generated */ { -/* Generated */ CALCULATE_AD; -/* Generated */ fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); -/* Generated */ slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ CALCULATE_AD; -/* Generated */ fastEMA = (fastk*ad)+(one_minus_fastk*fastEMA); -/* Generated */ slowEMA = (slowk*ad)+(one_minus_slowk*slowEMA); -/* Generated */ outReal[outIdx++] = fastEMA - slowEMA; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ADX.c b/src/ta-lib/src/ta_func/ta_ADX.c deleted file mode 100644 index 0f50877e6..000000000 --- a/src/ta-lib/src/ta_func/ta_ADX.c +++ /dev/null @@ -1,798 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * MIF Mirek Fontan (mira@fontan.cz) - * GC guycom@users.sourceforge.net - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. - * 062704 MF Fix #965557. Div by zero bug reported by MIF. - * 082206 MF Fix #1544555. Div by zero bug reported by GC. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AdxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int adxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ADX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return (2 * optInTimePeriod) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx) - 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ADX - Average Directional Movement Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode adx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ADX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int today, lookbackTotal, outIdx; - double prevHigh, prevLow, prevClose; - double prevMinusDM, prevPlusDM, prevTR; - double tempReal, tempReal2, diffP, diffM; - double minusDI, plusDI, sumDX, prevADX; - - int i; - - #define TRUE_RANGE(TH,TL,YC,OUT) {\ - OUT = TH-TL; \ - tempReal2 = std_fabs(TH-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - tempReal2 = std_fabs(TL-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - } - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* - * The DM1 (one period) is base on the largest part of - * today's range that is outside of yesterdays range. - * - * The following 7 cases explain how the +DM and -DM are - * calculated on one period: - * - * Case 1: Case 2: - * C| A| - * | | C| - * | +DM1 = (C-A) B| | +DM1 = 0 - * | -DM1 = 0 | -DM1 = (B-D) - * A| | D| - * | D| - * B| - * - * Case 3: Case 4: - * C| C| - * | A| | - * | +DM1 = (C-A) | | +DM1 = 0 - * | -DM1 = 0 B| | -DM1 = (B-D) - * A| | | - * | | D| - * B| | - * D| - * - * Case 5: Case 6: - * A| A| C| - * | C| +DM1 = 0 | | +DM1 = 0 - * | | -DM1 = 0 | | -DM1 = 0 - * | D| | | - * B| B| D| - * - * - * Case 7: - * - * C| - * A| | - * | | +DM=0 - * B| | -DM=0 - * D| - * - * In case 3 and 4, the rule is that the smallest delta between - * (C-A) and (B-D) determine which of +DM or -DM is zero. - * - * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are - * zero. - * - * The rules remain the same when A=B and C=D (when the highs - * equal the lows). - * - * When calculating the DM over a period > 1, the one-period DM - * for the desired period are initialy sum. In other word, - * for a -DM14, sum the -DM1 for the first 14 days (that's - * 13 values because there is no DM for the first day!) - * Subsequent DM are calculated using the Wilder's - * smoothing approach: - * - * Previous -DM14 - * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 - * 14 - * - * (Same thing for +DM14) - * - * Calculation of a -DI14 is as follow: - * - * -DM14 - * -DI14 = -------- - * TR14 - * - * (Same thing for +DI14) - * - * Calculation of the TR14 is: - * - * Previous TR14 - * Today's TR14 = Previous TR14 - -------------- + Today's TR1 - * 14 - * - * The first TR14 is the summation of the first 14 TR1. See the - * TA_TRANGE function on how to calculate the true range. - * - * Calculation of the DX14 is: - * - * diffDI = ABS( (-DI14) - (+DI14) ) - * sumDI = (-DI14) + (+DI14) - * - * DX14 = 100 * (diffDI / sumDI) - * - * Calculation of the first ADX: - * - * ADX14 = SUM of the first 14 DX - * - * Calculation of subsequent ADX: - * - * ((Previous ADX14)*(14-1))+ Today's DX - * ADX14 = ------------------------------------- - * 14 - * - * Reference: - * New Concepts In Technical Trading Systems, J. Welles Wilder Jr - */ - - /* Original implementation from Wilder's book was doing some integer - * rounding in its calculations. - * - * This was understandable in the context that at the time the book - * was written, most user were doing the calculation by hand. - * - * For a computer, rounding is unnecessary (and even problematic when inputs - * are close to 1). - * - * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, - * you can comment out the following #undef/#define and rebuild the library. - */ - #undef round_pos - #define round_pos(x) (x) - - lookbackTotal = (2*optInTimePeriod) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx) - 1; - - /* Adjust startIdx to account for the lookback period. */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Indicate where the next output should be put - * in the outReal. - */ - outIdx = 0; - - /* Process the initial DM and TR */ - VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; - - prevMinusDM = 0.0; - prevPlusDM = 0.0; - prevTR = 0.0; - today = startIdx - lookbackTotal; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - prevClose = inClose[today]; - i = optInTimePeriod-1; - while( i-- > 0 ) - { - /* Calculate the prevMinusDM and prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR += tempReal; - prevClose = inClose[today]; - } - - /* Add up all the initial DX. */ - sumDX = 0.0; - i = optInTimePeriod; - while( i-- > 0 ) - { - /* Calculate the prevMinusDM and prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - prevMinusDM -= prevMinusDM/optInTimePeriod; - prevPlusDM -= prevPlusDM/optInTimePeriod; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - - /* Calculate the DX. The value is rounded (see Wilder book). */ - if( !TA_IS_ZERO(prevTR) ) - { - minusDI = round_pos(100.0*(prevMinusDM/prevTR)); - plusDI = round_pos(100.0*(prevPlusDM/prevTR)); - /* This loop is just to accumulate the initial DX */ - tempReal = minusDI+plusDI; - if( !TA_IS_ZERO(tempReal) ) - sumDX += round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); - } - } - - /* Calculate the first ADX */ - prevADX = round_pos( sumDX / optInTimePeriod ); - - /* Skip the unstable period */ - i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx); - while( i-- > 0 ) - { - /* Calculate the prevMinusDM and prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - prevMinusDM -= prevMinusDM/optInTimePeriod; - prevPlusDM -= prevPlusDM/optInTimePeriod; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - - if( !TA_IS_ZERO(prevTR) ) - { - /* Calculate the DX. The value is rounded (see Wilder book). */ - minusDI = round_pos(100.0*(prevMinusDM/prevTR)); - plusDI = round_pos(100.0*(prevPlusDM/prevTR)); - tempReal = minusDI+plusDI; - if( !TA_IS_ZERO(tempReal) ) - { - tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); - /* Calculate the ADX */ - prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); - } - } - } - - /* Output the first ADX */ - outReal[0] = prevADX; - outIdx = 1; - - /* Calculate and output subsequent ADX */ - while( today < endIdx ) - { - /* Calculate the prevMinusDM and prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - prevMinusDM -= prevMinusDM/optInTimePeriod; - prevPlusDM -= prevPlusDM/optInTimePeriod; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - - if( !TA_IS_ZERO(prevTR) ) - { - /* Calculate the DX. The value is rounded (see Wilder book). */ - minusDI = round_pos(100.0*(prevMinusDM/prevTR)); - plusDI = round_pos(100.0*(prevPlusDM/prevTR)); - tempReal = minusDI+plusDI; - if( !TA_IS_ZERO(tempReal) ) - { - tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); - /* Calculate the ADX */ - prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); - } - } - - /* Output the ADX */ - outReal[outIdx++] = prevADX; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Adx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode adx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ADX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, lookbackTotal, outIdx; -/* Generated */ double prevHigh, prevLow, prevClose; -/* Generated */ double prevMinusDM, prevPlusDM, prevTR; -/* Generated */ double tempReal, tempReal2, diffP, diffM; -/* Generated */ double minusDI, plusDI, sumDX, prevADX; -/* Generated */ int i; -/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ -/* Generated */ OUT = TH-TL; \ -/* Generated */ tempReal2 = std_fabs(TH-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ tempReal2 = std_fabs(TL-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ } -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ #undef round_pos -/* Generated */ #define round_pos(x) (x) -/* Generated */ lookbackTotal = (2*optInTimePeriod) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx) - 1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; -/* Generated */ prevMinusDM = 0.0; -/* Generated */ prevPlusDM = 0.0; -/* Generated */ prevTR = 0.0; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ prevClose = inClose[today]; -/* Generated */ i = optInTimePeriod-1; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR += tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ sumDX = 0.0; -/* Generated */ i = optInTimePeriod; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; -/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ { -/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ tempReal = minusDI+plusDI; -/* Generated */ if( !TA_IS_ZERO(tempReal) ) -/* Generated */ sumDX += round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); -/* Generated */ } -/* Generated */ } -/* Generated */ prevADX = round_pos( sumDX / optInTimePeriod ); -/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ADX,Adx); -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; -/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ { -/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ tempReal = minusDI+plusDI; -/* Generated */ if( !TA_IS_ZERO(tempReal) ) -/* Generated */ { -/* Generated */ tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); -/* Generated */ prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ outReal[0] = prevADX; -/* Generated */ outIdx = 1; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; -/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ { -/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ tempReal = minusDI+plusDI; -/* Generated */ if( !TA_IS_ZERO(tempReal) ) -/* Generated */ { -/* Generated */ tempReal = round_pos(100.0*(std_fabs(minusDI-plusDI)/tempReal)); -/* Generated */ prevADX = round_pos(((prevADX*(optInTimePeriod-1))+tempReal)/optInTimePeriod); -/* Generated */ } -/* Generated */ } -/* Generated */ outReal[outIdx++] = prevADX; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ADXR.c b/src/ta-lib/src/ta_func/ta_ADXR.c deleted file mode 100644 index 84e15e328..000000000 --- a/src/ta-lib/src/ta_func/ta_ADXR.c +++ /dev/null @@ -1,387 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AdxrLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int adxrLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ADXR_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - if( optInTimePeriod > 1 ) - return optInTimePeriod + LOOKBACK_CALL(ADX)( optInTimePeriod) - 1; - else - return 3; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ADXR - Average Directional Movement Index Rating - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode adxr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ADXR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ARRAY_REF( adx ); - int adxrLookback, i, j, outIdx, nbElement; - ENUM_DECLARATION(RetCode) retCode; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Original implementation from Wilder's book was doing some integer - * rounding in its calculations. - * - * This was understandable in the context that at the time the book - * was written, most user were doing the calculation by hand. - * - * For a computer, rounding is unnecessary (and even problematic when inputs - * are close to 1). - * - * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, - * you can comment out the following #undef/#define and rebuild the library. - */ - #undef round_pos - #define round_pos(x) (x) - - /* Move up the start index if there is not - * enough initial data. - * Always one price bar gets consumed. - */ - adxrLookback = LOOKBACK_CALL(ADXR)( optInTimePeriod ); - - if( startIdx < adxrLookback ) - startIdx = adxrLookback; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - ARRAY_ALLOC( adx, endIdx-startIdx+optInTimePeriod ); - #if !defined( _JAVA ) - if( !adx ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - - retCode = FUNCTION_CALL(ADX)( startIdx-(optInTimePeriod-1), endIdx, - inHigh, inLow, inClose, - optInTimePeriod, outBegIdx, outNBElement, adx ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - ARRAY_FREE( adx ); - return retCode; - } - - i = optInTimePeriod-1; - j = 0; - outIdx = 0; - nbElement = endIdx-startIdx+2; - while( --nbElement != 0 ) - outReal[outIdx++] = round_pos( (adx[i++]+adx[j++])/2.0 ); - - ARRAY_FREE( adx ); - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Adxr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode adxr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ADXR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF( adx ); -/* Generated */ int adxrLookback, i, j, outIdx, nbElement; -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ #undef round_pos -/* Generated */ #define round_pos(x) (x) -/* Generated */ adxrLookback = LOOKBACK_CALL(ADXR)( optInTimePeriod ); -/* Generated */ if( startIdx < adxrLookback ) -/* Generated */ startIdx = adxrLookback; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ARRAY_ALLOC( adx, endIdx-startIdx+optInTimePeriod ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !adx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL(ADX)( startIdx-(optInTimePeriod-1), endIdx, -/* Generated */ inHigh, inLow, inClose, -/* Generated */ optInTimePeriod, outBegIdx, outNBElement, adx ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( adx ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ i = optInTimePeriod-1; -/* Generated */ j = 0; -/* Generated */ outIdx = 0; -/* Generated */ nbElement = endIdx-startIdx+2; -/* Generated */ while( --nbElement != 0 ) -/* Generated */ outReal[outIdx++] = round_pos( (adx[i++]+adx[j++])/2.0 ); -/* Generated */ ARRAY_FREE( adx ); -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_APO.c b/src/ta-lib/src/ta_func/ta_APO.c deleted file mode 100644 index 6064088f5..000000000 --- a/src/ta-lib/src/ta_func/ta_APO.c +++ /dev/null @@ -1,619 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AA Andrew Atkinson - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 062804 MF Resolve div by zero bug on limit case. - * 020605 AA Fix #1117666 Lookback & out-of-bound bug. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::ApoLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int apoLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_APO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* The slow MA is the key factor determining the lookback period. */ - return LOOKBACK_CALL(MA)( max(optInSlowPeriod,optInFastPeriod), optInMAType ); -} - - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_APO - Absolute Price Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInMAType: - * Type of Moving Average - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode apo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_APO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_REF(tempBuffer); - ENUM_DECLARATION(RetCode) retCode; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Allocate an intermediate buffer. */ - ARRAY_ALLOC(tempBuffer, (endIdx-startIdx+1) ); - #if !defined(_JAVA) - if( !tempBuffer ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - - retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, - inReal, - optInFastPeriod, - optInSlowPeriod, - optInMAType, - outBegIdx, - outNBElement, - outReal, - tempBuffer, - 0 /* No percentage. */ ); - - ARRAY_FREE( tempBuffer ); - - return retCode; -} - -/* Internal price oscillator function. - * - * A buffer must be provided for intermediate processing. - */ -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - // No INT fucntion -#else - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) - enum class Core::RetCode Core::TA_INT_PO( int startIdx, - int endIdx, - SubArray^ inReal, - int optInFastPeriod, - int optInSlowPeriod, - MAType optInMethod_2, - [Out]int% outBegIdx, - [Out]int% outNBElement, - SubArray^ outReal, - SubArray^ tempBuffer, - int doPercentageOutput ) - -#elif defined( _MANAGED ) - enum class Core::RetCode Core::TA_INT_PO( int startIdx, - int endIdx, - cli::array^ inReal, - int optInFastPeriod, - int optInSlowPeriod, - MAType optInMethod_2, - [Out]int% outBegIdx, - [Out]int% outNBElement, - cli::array^ outReal, - cli::array^ tempBuffer, - int doPercentageOutput ) -#elif defined( _JAVA ) -RetCode TA_INT_PO( int startIdx, - int endIdx, - INPUT_TYPE inReal[], - int optInFastPeriod, - int optInSlowPeriod, - MAType optInMethod_2, - MInteger outBegIdx, - MInteger outNBElement, - double outReal[], - double tempBuffer[], - int doPercentageOutput ) - -#else -TA_RetCode TA_PREFIX(INT_PO)( int startIdx, - int endIdx, - const INPUT_TYPE *inReal, - int optInFastPeriod, - int optInSlowPeriod, - TA_MAType optInMethod_2, - int *outBegIdx, - int *outNBElement, - double *outReal, - double *tempBuffer, - int doPercentageOutput ) -#endif -{ - ENUM_DECLARATION(RetCode) retCode; - - double tempReal; - int tempInteger; - VALUE_HANDLE_INT(outBegIdx1); - VALUE_HANDLE_INT(outNbElement1); - VALUE_HANDLE_INT(outBegIdx2); - VALUE_HANDLE_INT(outNbElement2); - - int i, j; - - /* Make sure slow is really slower than - * the fast period! if not, swap... - */ - if( optInSlowPeriod < optInFastPeriod ) - { - /* swap */ - tempInteger = optInSlowPeriod; - optInSlowPeriod = optInFastPeriod; - optInFastPeriod = tempInteger; - } - - /* Calculate the fast MA into the tempBuffer. */ - retCode = FUNCTION_CALL(MA)( startIdx, endIdx, - inReal, - optInFastPeriod, - optInMethod_2, - VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), - tempBuffer ); - - if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - /* Calculate the slow MA into the output. */ - retCode = FUNCTION_CALL(MA)( startIdx, endIdx, - inReal, - optInSlowPeriod, - optInMethod_2, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), - outReal ); - - if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - tempInteger = VALUE_HANDLE_GET(outBegIdx1) - VALUE_HANDLE_GET(outBegIdx2); - if( doPercentageOutput != 0 ) - { - /* Calculate ((fast MA)-(slow MA))/(slow MA) in the output. */ - for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) - { - tempReal = outReal[i]; - if( !TA_IS_ZERO(tempReal) ) - outReal[i] = ((tempBuffer[j]-tempReal)/tempReal)*100.0; - else - outReal[i] = 0.0; - } - } - else - { - /* Calculate (fast MA)-(slow MA) in the output. */ - for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) - outReal[i] = tempBuffer[j]-outReal[i]; - } - - VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(outBegIdx1); - VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement1); - } - } - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - } - - return retCode; -} -#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Apo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode apo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_APO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(tempBuffer); -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC(tempBuffer, (endIdx-startIdx+1) ); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !tempBuffer ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, -/* Generated */ inReal, -/* Generated */ optInFastPeriod, -/* Generated */ optInSlowPeriod, -/* Generated */ optInMAType, -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ outReal, -/* Generated */ tempBuffer, -/* Generated */ 0 ); -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ // No INT fucntion -/* Generated */ #else -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TA_INT_PO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ MAType optInMethod_2, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal, -/* Generated */ SubArray^ tempBuffer, -/* Generated */ int doPercentageOutput ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TA_INT_PO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ MAType optInMethod_2, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal, -/* Generated */ cli::array^ tempBuffer, -/* Generated */ int doPercentageOutput ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ RetCode TA_INT_PO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ INPUT_TYPE inReal[], -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ MAType optInMethod_2, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[], -/* Generated */ double tempBuffer[], -/* Generated */ int doPercentageOutput ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_PREFIX(INT_PO)( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const INPUT_TYPE *inReal, -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ TA_MAType optInMethod_2, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double *outReal, -/* Generated */ double *tempBuffer, -/* Generated */ int doPercentageOutput ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ double tempReal; -/* Generated */ int tempInteger; -/* Generated */ VALUE_HANDLE_INT(outBegIdx1); -/* Generated */ VALUE_HANDLE_INT(outNbElement1); -/* Generated */ VALUE_HANDLE_INT(outBegIdx2); -/* Generated */ VALUE_HANDLE_INT(outNbElement2); -/* Generated */ int i, j; -/* Generated */ if( optInSlowPeriod < optInFastPeriod ) -/* Generated */ { -/* Generated */ tempInteger = optInSlowPeriod; -/* Generated */ optInSlowPeriod = optInFastPeriod; -/* Generated */ optInFastPeriod = tempInteger; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, -/* Generated */ inReal, -/* Generated */ optInFastPeriod, -/* Generated */ optInMethod_2, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), -/* Generated */ tempBuffer ); -/* Generated */ if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, -/* Generated */ inReal, -/* Generated */ optInSlowPeriod, -/* Generated */ optInMethod_2, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ outReal ); -/* Generated */ if( retCode == ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ tempInteger = VALUE_HANDLE_GET(outBegIdx1) - VALUE_HANDLE_GET(outBegIdx2); -/* Generated */ if( doPercentageOutput != 0 ) -/* Generated */ { -/* Generated */ for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) -/* Generated */ { -/* Generated */ tempReal = outReal[i]; -/* Generated */ if( !TA_IS_ZERO(tempReal) ) -/* Generated */ outReal[i] = ((tempBuffer[j]-tempReal)/tempReal)*100.0; -/* Generated */ else -/* Generated */ outReal[i] = 0.0; -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ for( i=0,j=tempInteger; i < VALUE_HANDLE_GET(outNbElement1); i++, j++ ) -/* Generated */ outReal[i] = tempBuffer[j]-outReal[i]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(outBegIdx1); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement1); -/* Generated */ } -/* Generated */ } -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ } -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_AROON.c b/src/ta-lib/src/ta_func/ta_AROON.c deleted file mode 100644 index a7d10c4ff..000000000 --- a/src/ta-lib/src/ta_func/ta_AROON.c +++ /dev/null @@ -1,463 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 050703 MF Fix algorithm base on Adrian Michel bug report #748163 - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AroonLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int aroonLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_AROON_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_AROON - Aroon - * - * Input = High, Low - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outAroonDown, -/* Generated */ SubArray^ outAroonUp ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outAroonDown, -/* Generated */ cli::array^ outAroonUp ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode aroon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outAroonDown[], -/* Generated */ double outAroonUp[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_AROON( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outAroonDown[], -/* Generated */ double outAroonUp[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double lowest, highest, tmp, factor; - int outIdx; - int trailingIdx, lowestIdx, highestIdx, today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outAroonDown ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outAroonUp ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* This function is using a speed optimized algorithm - * for the min/max logic. - * - * You might want to first look at how TA_MIN/TA_MAX works - * and this function will become easier to understand. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-optInTimePeriod; - lowestIdx = -1; - highestIdx = -1; - lowest = 0.0; - highest = 0.0; - factor = (double)100.0/(double)optInTimePeriod; - - while( today <= endIdx ) - { - /* Keep track of the lowestIdx */ - tmp = inLow[today]; - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inLow[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inLow[i]; - if( tmp <= lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - } - - /* Keep track of the highestIdx */ - tmp = inHigh[today]; - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inHigh[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inHigh[i]; - if( tmp >= highest ) - { - highestIdx = i; - highest = tmp; - } - } - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - } - - /* Note: Do not forget that input and output buffer can be the same, - * so writing to the output is the last thing being done here. - */ - outAroonUp[outIdx] = factor*(optInTimePeriod-(today-highestIdx)); - outAroonDown[outIdx] = factor*(optInTimePeriod-(today-lowestIdx)); - - outIdx++; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outAroonDown, -/* Generated */ SubArray^ outAroonUp ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Aroon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outAroonDown, -/* Generated */ cli::array^ outAroonUp ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode aroon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outAroonDown[], -/* Generated */ double outAroonUp[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_AROON( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outAroonDown[], -/* Generated */ double outAroonUp[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, highest, tmp, factor; -/* Generated */ int outIdx; -/* Generated */ int trailingIdx, lowestIdx, highestIdx, today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outAroonDown ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outAroonUp ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-optInTimePeriod; -/* Generated */ lowestIdx = -1; -/* Generated */ highestIdx = -1; -/* Generated */ lowest = 0.0; -/* Generated */ highest = 0.0; -/* Generated */ factor = (double)100.0/(double)optInTimePeriod; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inLow[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inLow[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inLow[i]; -/* Generated */ if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ tmp = inHigh[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inHigh[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inHigh[i]; -/* Generated */ if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ outAroonUp[outIdx] = factor*(optInTimePeriod-(today-highestIdx)); -/* Generated */ outAroonDown[outIdx] = factor*(optInTimePeriod-(today-lowestIdx)); -/* Generated */ outIdx++; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_AROONOSC.c b/src/ta-lib/src/ta_func/ta_AROONOSC.c deleted file mode 100644 index fb2bd752d..000000000 --- a/src/ta-lib/src/ta_func/ta_AROONOSC.c +++ /dev/null @@ -1,468 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 050703 MF Fix algorithm base on Adrian Michel bug report #748163 - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AroonOscLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int aroonOscLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_AROONOSC_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_AROONOSC - Aroon Oscillator - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode aroonOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_AROONOSC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double lowest, highest, tmp, factor, aroon; - int outIdx; - int trailingIdx, lowestIdx, highestIdx, today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* This code is almost identical to the TA_AROON function - * except that instead of outputing ArroonUp and AroonDown - * individually, an oscillator is build from both. - * - * AroonOsc = AroonUp- AroonDown; - * - */ - - /* This function is using a speed optimized algorithm - * for the min/max logic. - * - * You might want to first look at how TA_MIN/TA_MAX works - * and this function will become easier to understand. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-optInTimePeriod; - lowestIdx = -1; - highestIdx = -1; - lowest = 0.0; - highest = 0.0; - factor = (double)100.0/(double)optInTimePeriod; - - while( today <= endIdx ) - { - /* Keep track of the lowestIdx */ - tmp = inLow[today]; - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inLow[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inLow[i]; - if( tmp <= lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - } - - /* Keep track of the highestIdx */ - tmp = inHigh[today]; - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inHigh[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inHigh[i]; - if( tmp >= highest ) - { - highestIdx = i; - highest = tmp; - } - } - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - } - - /* The oscillator is the following: - * AroonUp = factor*(optInTimePeriod-(today-highestIdx)); - * AroonDown = factor*(optInTimePeriod-(today-lowestIdx)); - * AroonOsc = AroonUp-AroonDown; - * - * An arithmetic simplification give us: - * Aroon = factor*(highestIdx-lowestIdx) - */ - aroon = factor*(highestIdx-lowestIdx); - - /* Note: Do not forget that input and output buffer can be the same, - * so writing to the output is the last thing being done here. - */ - outReal[outIdx] = aroon; - - outIdx++; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AroonOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode aroonOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_AROONOSC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, highest, tmp, factor, aroon; -/* Generated */ int outIdx; -/* Generated */ int trailingIdx, lowestIdx, highestIdx, today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-optInTimePeriod; -/* Generated */ lowestIdx = -1; -/* Generated */ highestIdx = -1; -/* Generated */ lowest = 0.0; -/* Generated */ highest = 0.0; -/* Generated */ factor = (double)100.0/(double)optInTimePeriod; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inLow[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inLow[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inLow[i]; -/* Generated */ if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ tmp = inHigh[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inHigh[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inHigh[i]; -/* Generated */ if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ aroon = factor*(highestIdx-lowestIdx); -/* Generated */ outReal[outIdx] = aroon; -/* Generated */ outIdx++; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ASIN.c b/src/ta-lib/src/ta_func/ta_ASIN.c deleted file mode 100644 index 19b528325..000000000 --- a/src/ta-lib/src/ta_func/ta_ASIN.c +++ /dev/null @@ -1,249 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AsinLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int asinLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ASIN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ASIN - Vector Trigonometric ASin - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode asin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ASIN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_asin(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Asin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode asin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ASIN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_asin(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ATAN.c b/src/ta-lib/src/ta_func/ta_ATAN.c deleted file mode 100644 index 1e2abe22b..000000000 --- a/src/ta-lib/src/ta_func/ta_ATAN.c +++ /dev/null @@ -1,251 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AtanLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int atanLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ATAN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ATAN - Vector Trigonometric ATan - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode atan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ATAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Default return values */ - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_atan(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Atan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode atan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ATAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_atan(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ATR.c b/src/ta-lib/src/ta_func/ta_ATR.c deleted file mode 100644 index 178d8afe8..000000000 --- a/src/ta-lib/src/ta_func/ta_ATR.c +++ /dev/null @@ -1,466 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AtrLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int atrLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ATR_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* The ATR lookback is the sum of: - * 1 + (optInTimePeriod - 1) - * - * Where 1 is for the True Range, and - * (optInTimePeriod-1) is for the simple - * moving average. - */ - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ATR,Atr); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ATR - Average True Range - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode atr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ATR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ENUM_DECLARATION(RetCode) retCode; - int outIdx, today, lookbackTotal; - int nbATR; - VALUE_HANDLE_INT(outBegIdx1); - VALUE_HANDLE_INT(outNbElement1); - - double prevATR; - ARRAY_REF( tempBuffer ); - ARRAY_LOCAL(prevATRTemp,1); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Average True Range is the greatest of the following: - * - * val1 = distance from today's high to today's low. - * val2 = distance from yesterday's close to today's high. - * val3 = distance from yesterday's close to today's low. - * - * These value are averaged for the specified period using - * Wilder method. This method have an unstable period comparable - * to and Exponential Moving Average (EMA). - */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(ATR)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - /* Trap the case where no smoothing is needed. */ - if( optInTimePeriod <= 1 ) - { - /* No smoothing needed. Just do a TRANGE. */ - return FUNCTION_CALL(TRANGE)( startIdx, endIdx, - inHigh, inLow, inClose, - outBegIdx, outNBElement, outReal ); - } - - /* Allocate an intermediate buffer for TRANGE. */ - ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); - - /* Do TRANGE in the intermediate buffer. */ - retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, - inHigh, inLow, inClose, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), - tempBuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - ARRAY_FREE( tempBuffer ); - return retCode; - } - - /* First value of the ATR is a simple Average of - * the TRANGE output for the specified period. - */ - retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, - optInTimePeriod-1, - tempBuffer, optInTimePeriod, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), - prevATRTemp ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - ARRAY_FREE( tempBuffer ); - return retCode; - } - prevATR = prevATRTemp[0]; - - /* Subsequent value are smoothed using the - * previous ATR value (Wilder's approach). - * 1) Multiply the previous ATR by 'period-1'. - * 2) Add today TR value. - * 3) Divide by 'period'. - */ - today = optInTimePeriod; - outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ATR,Atr); - /* Skip the unstable period. */ - while( outIdx != 0 ) - { - prevATR *= optInTimePeriod - 1; - prevATR += tempBuffer[today++]; - prevATR /= optInTimePeriod; - outIdx--; - } - - /* Now start to write the final ATR in the caller - * provided outReal. - */ - outIdx = 1; - outReal[0] = prevATR; - - /* Now do the number of requested ATR. */ - nbATR = (endIdx - startIdx)+1; - - while( --nbATR != 0 ) - { - prevATR *= optInTimePeriod - 1; - prevATR += tempBuffer[today++]; - prevATR /= optInTimePeriod; - outReal[outIdx++] = prevATR; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - ARRAY_FREE( tempBuffer ); - - return retCode; -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Atr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode atr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ATR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int outIdx, today, lookbackTotal; -/* Generated */ int nbATR; -/* Generated */ VALUE_HANDLE_INT(outBegIdx1); -/* Generated */ VALUE_HANDLE_INT(outNbElement1); -/* Generated */ double prevATR; -/* Generated */ ARRAY_REF( tempBuffer ); -/* Generated */ ARRAY_LOCAL(prevATRTemp,1); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackTotal = LOOKBACK_CALL(ATR)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ if( optInTimePeriod <= 1 ) -/* Generated */ { -/* Generated */ return FUNCTION_CALL(TRANGE)( startIdx, endIdx, -/* Generated */ inHigh, inLow, inClose, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ } -/* Generated */ ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); -/* Generated */ retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, -/* Generated */ inHigh, inLow, inClose, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ tempBuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, -/* Generated */ optInTimePeriod-1, -/* Generated */ tempBuffer, optInTimePeriod, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ prevATRTemp ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ prevATR = prevATRTemp[0]; -/* Generated */ today = optInTimePeriod; -/* Generated */ outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_ATR,Atr); -/* Generated */ while( outIdx != 0 ) -/* Generated */ { -/* Generated */ prevATR *= optInTimePeriod - 1; -/* Generated */ prevATR += tempBuffer[today++]; -/* Generated */ prevATR /= optInTimePeriod; -/* Generated */ outIdx--; -/* Generated */ } -/* Generated */ outIdx = 1; -/* Generated */ outReal[0] = prevATR; -/* Generated */ nbATR = (endIdx - startIdx)+1; -/* Generated */ while( --nbATR != 0 ) -/* Generated */ { -/* Generated */ prevATR *= optInTimePeriod - 1; -/* Generated */ prevATR += tempBuffer[today++]; -/* Generated */ prevATR /= optInTimePeriod; -/* Generated */ outReal[outIdx++] = prevATR; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_AVGDEV.c b/src/ta-lib/src/ta_func/ta_AVGDEV.c deleted file mode 100644 index c6f50a925..000000000 --- a/src/ta-lib/src/ta_func/ta_AVGDEV.c +++ /dev/null @@ -1,331 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AB Anatoliy Belsky - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090812 AB Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AvgDevLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int avgDevLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_AVGDEV_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_AVGDEV - Average Deviation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode avgDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_AVGDEV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int today, outIdx, lookback; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - lookback = optInTimePeriod - 1; - - if (startIdx < lookback) { - startIdx = lookback; - } - today = startIdx; - - /* Make sure there is still something to evaluate. */ - if( today > endIdx ) { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Process the initial DM and TR */ - VALUE_HANDLE_DEREF(outBegIdx) = today; - - outIdx = 0; - - while (today <= endIdx) { - double todaySum, todayDev; - int i; - - todaySum = 0.0; - for (i = 0; i < optInTimePeriod; i++) { - todaySum += inReal[today-i]; - } - - todayDev = 0.0; - for (i = 0; i < optInTimePeriod; i++) { - todayDev += std_fabs(inReal[today-i] - todaySum/optInTimePeriod); - } - outReal[outIdx] = todayDev/optInTimePeriod; - - outIdx++; - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AvgDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode avgDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_AVGDEV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, outIdx, lookback; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookback = optInTimePeriod - 1; -/* Generated */ if (startIdx < lookback) { -/* Generated */ startIdx = lookback; -/* Generated */ } -/* Generated */ today = startIdx; -/* Generated */ if( today > endIdx ) { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today; -/* Generated */ outIdx = 0; -/* Generated */ while (today <= endIdx) { -/* Generated */ double todaySum, todayDev; -/* Generated */ int i; -/* Generated */ todaySum = 0.0; -/* Generated */ for (i = 0; i < optInTimePeriod; i++) { -/* Generated */ todaySum += inReal[today-i]; -/* Generated */ } -/* Generated */ todayDev = 0.0; -/* Generated */ for (i = 0; i < optInTimePeriod; i++) { -/* Generated */ todayDev += std_fabs(inReal[today-i] - todaySum/optInTimePeriod); -/* Generated */ } -/* Generated */ outReal[outIdx] = todayDev/optInTimePeriod; -/* Generated */ outIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_AVGPRICE.c b/src/ta-lib/src/ta_func/ta_AVGPRICE.c deleted file mode 100644 index cff8c0b0b..000000000 --- a/src/ta-lib/src/ta_func/ta_AVGPRICE.c +++ /dev/null @@ -1,291 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 112605 MF Fix outBegIdx when startIdx != 0 - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::AvgPriceLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int avgPriceLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_AVGPRICE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* This function have no lookback needed. */ - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_AVGPRICE - Average Price - * - * Input = Open, High, Low, Close - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode avgPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_AVGPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Average price = (High + Low + Open + Close) / 4 */ - - outIdx = 0; - - for( i=startIdx; i <= endIdx; i++ ) - { - outReal[outIdx++] = ( inHigh [i] + - inLow [i] + - inClose[i] + - inOpen [i]) / 4; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::AvgPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode avgPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_AVGPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ outIdx = 0; -/* Generated */ for( i=startIdx; i <= endIdx; i++ ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = ( inHigh [i] + -/* Generated */ inLow [i] + -/* Generated */ inClose[i] + -/* Generated */ inOpen [i]) / 4; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_BBANDS.c b/src/ta-lib/src/ta_func/ta_BBANDS.c deleted file mode 100644 index 7f5be22f2..000000000 --- a/src/ta-lib/src/ta_func/ta_BBANDS.c +++ /dev/null @@ -1,659 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JV Jesus Viver <324122@cienz.unizar.es> - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 010503 MF Fix to always use SMA for the STDDEV (Thanks to JV). - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::BbandsLookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int bbandsLookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_BBANDS_Lookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ TA_MAType optInMAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInNbDevUp == TA_REAL_DEFAULT ) -/* Generated */ optInNbDevUp = 2.000000e+0; -/* Generated */ else if( (optInNbDevUp < -3.000000e+37) ||/* Generated */ (optInNbDevUp > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInNbDevDn == TA_REAL_DEFAULT ) -/* Generated */ optInNbDevDn = 2.000000e+0; -/* Generated */ else if( (optInNbDevDn < -3.000000e+37) ||/* Generated */ (optInNbDevDn > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInNbDevUp); - UNUSED_VARIABLE(optInNbDevDn); - - /* The lookback is driven by the middle band moving average. */ - return LOOKBACK_CALL(MA)( optInTimePeriod, optInMAType ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_BBANDS - Bollinger Bands - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInNbDevUp:(From TA_REAL_MIN to TA_REAL_MAX) - * Deviation multiplier for upper band - * - * optInNbDevDn:(From TA_REAL_MIN to TA_REAL_MAX) - * Deviation multiplier for lower band - * - * optInMAType: - * Type of Moving Average - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outRealUpperBand, -/* Generated */ SubArray^ outRealMiddleBand, -/* Generated */ SubArray^ outRealLowerBand ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outRealUpperBand, -/* Generated */ cli::array^ outRealMiddleBand, -/* Generated */ cli::array^ outRealLowerBand ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode bbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_BBANDS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ENUM_DECLARATION(RetCode) retCode; - int i; - double tempReal, tempReal2; - ARRAY_REF(tempBuffer1); - ARRAY_REF(tempBuffer2); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInNbDevUp == TA_REAL_DEFAULT ) -/* Generated */ optInNbDevUp = 2.000000e+0; -/* Generated */ else if( (optInNbDevUp < -3.000000e+37) ||/* Generated */ (optInNbDevUp > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInNbDevDn == TA_REAL_DEFAULT ) -/* Generated */ optInNbDevDn = 2.000000e+0; -/* Generated */ else if( (optInNbDevDn < -3.000000e+37) ||/* Generated */ (optInNbDevDn > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outRealUpperBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outRealMiddleBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outRealLowerBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify TWO temporary buffer among the outputs. - * - * These temporary buffers allows to perform the - * calculation without any memory allocation. - * - * Whenever possible, make the tempBuffer1 be the - * middle band output. This will save one copy operation. - */ - #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) - tempBuffer1 = outRealMiddleBand; - tempBuffer2 = outRealLowerBand; - #else - if( inReal == outRealUpperBand ) - { - tempBuffer1 = outRealMiddleBand; - tempBuffer2 = outRealLowerBand; - } - else if( inReal == outRealLowerBand ) - { - tempBuffer1 = outRealMiddleBand; - tempBuffer2 = outRealUpperBand; - } - else if( inReal == outRealMiddleBand ) - { - tempBuffer1 = outRealLowerBand; - tempBuffer2 = outRealUpperBand; - } - else - { - tempBuffer1 = outRealMiddleBand; - tempBuffer2 = outRealUpperBand; - } - /* Check that the caller is not doing tricky things. - * (like using the input buffer in two output!) - */ - if( (tempBuffer1 == inReal) || (tempBuffer2 == inReal) ) - return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); - #endif - - - /* Calculate the middle band, which is a moving average. - * The other two bands will simply add/substract the - * standard deviation from this middle band. - */ - retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, - optInTimePeriod, optInMAType, - outBegIdx, outNBElement, tempBuffer1 ); - - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Calculate the standard deviation into tempBuffer2. */ - if( optInMAType == ENUM_VALUE(MAType,TA_MAType_SMA,Sma) ) - { - /* A small speed optimization by re-using the - * already calculated SMA. - */ - FUNCTION_CALL(INT_stddev_using_precalc_ma)( inReal, tempBuffer1, - (int)VALUE_HANDLE_DEREF(outBegIdx), (int)VALUE_HANDLE_DEREF(outNBElement), - optInTimePeriod, tempBuffer2 ); - } - else - { - /* Calculate the Standard Deviation */ - retCode = FUNCTION_CALL(STDDEV)( (int)VALUE_HANDLE_DEREF(outBegIdx), endIdx, inReal, - optInTimePeriod, 1.0, - outBegIdx, outNBElement, tempBuffer2 ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - } - - /* Copy the MA calculation into the middle band ouput, unless - * the calculation was done into it already! - */ - #if !defined(USE_SINGLE_PRECISION_INPUT) - if( tempBuffer1 != outRealMiddleBand ) - { - ARRAY_COPY( outRealMiddleBand, tempBuffer1, VALUE_HANDLE_DEREF(outNBElement) ); - } - #endif - - /* Now do a tight loop to calculate the upper/lower band at - * the same time. - * - * All the following 5 loops are doing the same, except there - * is an attempt to speed optimize by eliminating uneeded - * multiplication. - */ - if( optInNbDevUp == optInNbDevDn ) - { - if( optInNbDevUp == 1.0 ) - { - /* No standard deviation multiplier needed. */ - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = tempBuffer2[i]; - tempReal2 = outRealMiddleBand[i]; - outRealUpperBand[i] = tempReal2 + tempReal; - outRealLowerBand[i] = tempReal2 - tempReal; - } - } - else - { - /* Upper/lower band use the same standard deviation multiplier. */ - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = tempBuffer2[i] * optInNbDevUp; - tempReal2 = outRealMiddleBand[i]; - outRealUpperBand[i] = tempReal2 + tempReal; - outRealLowerBand[i] = tempReal2 - tempReal; - } - } - } - else if( optInNbDevUp == 1.0 ) - { - /* Only lower band has a standard deviation multiplier. */ - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = tempBuffer2[i]; - tempReal2 = outRealMiddleBand[i]; - outRealUpperBand[i] = tempReal2 + tempReal; - outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); - } - } - else if( optInNbDevDn == 1.0 ) - { - /* Only upper band has a standard deviation multiplier. */ - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = tempBuffer2[i]; - tempReal2 = outRealMiddleBand[i]; - outRealLowerBand[i] = tempReal2 - tempReal; - outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); - } - } - else - { - /* Upper/lower band have distinctive standard deviation multiplier. */ - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = tempBuffer2[i]; - tempReal2 = outRealMiddleBand[i]; - outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); - outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); - } - } - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outRealUpperBand, -/* Generated */ SubArray^ outRealMiddleBand, -/* Generated */ SubArray^ outRealLowerBand ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Bbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outRealUpperBand, -/* Generated */ cli::array^ outRealMiddleBand, -/* Generated */ cli::array^ outRealLowerBand ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode bbands( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_BBANDS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDevUp, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInNbDevDn, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outRealUpperBand[], -/* Generated */ double outRealMiddleBand[], -/* Generated */ double outRealLowerBand[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int i; -/* Generated */ double tempReal, tempReal2; -/* Generated */ ARRAY_REF(tempBuffer1); -/* Generated */ ARRAY_REF(tempBuffer2); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInNbDevUp == TA_REAL_DEFAULT ) -/* Generated */ optInNbDevUp = 2.000000e+0; -/* Generated */ else if( (optInNbDevUp < -3.000000e+37) || (optInNbDevUp > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInNbDevDn == TA_REAL_DEFAULT ) -/* Generated */ optInNbDevDn = 2.000000e+0; -/* Generated */ else if( (optInNbDevDn < -3.000000e+37) || (optInNbDevDn > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outRealUpperBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outRealMiddleBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outRealLowerBand ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) -/* Generated */ tempBuffer1 = outRealMiddleBand; -/* Generated */ tempBuffer2 = outRealLowerBand; -/* Generated */ #else -/* Generated */ if( inReal == outRealUpperBand ) -/* Generated */ { -/* Generated */ tempBuffer1 = outRealMiddleBand; -/* Generated */ tempBuffer2 = outRealLowerBand; -/* Generated */ } -/* Generated */ else if( inReal == outRealLowerBand ) -/* Generated */ { -/* Generated */ tempBuffer1 = outRealMiddleBand; -/* Generated */ tempBuffer2 = outRealUpperBand; -/* Generated */ } -/* Generated */ else if( inReal == outRealMiddleBand ) -/* Generated */ { -/* Generated */ tempBuffer1 = outRealLowerBand; -/* Generated */ tempBuffer2 = outRealUpperBand; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ tempBuffer1 = outRealMiddleBand; -/* Generated */ tempBuffer2 = outRealUpperBand; -/* Generated */ } -/* Generated */ if( (tempBuffer1 == inReal) || (tempBuffer2 == inReal) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, -/* Generated */ optInTimePeriod, optInMAType, -/* Generated */ outBegIdx, outNBElement, tempBuffer1 ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ if( optInMAType == ENUM_VALUE(MAType,TA_MAType_SMA,Sma) ) -/* Generated */ { -/* Generated */ FUNCTION_CALL(INT_stddev_using_precalc_ma)( inReal, tempBuffer1, -/* Generated */ (int)VALUE_HANDLE_DEREF(outBegIdx), (int)VALUE_HANDLE_DEREF(outNBElement), -/* Generated */ optInTimePeriod, tempBuffer2 ); -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ retCode = FUNCTION_CALL(STDDEV)( (int)VALUE_HANDLE_DEREF(outBegIdx), endIdx, inReal, -/* Generated */ optInTimePeriod, 1.0, -/* Generated */ outBegIdx, outNBElement, tempBuffer2 ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ } -/* Generated */ #if !defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ if( tempBuffer1 != outRealMiddleBand ) -/* Generated */ { -/* Generated */ ARRAY_COPY( outRealMiddleBand, tempBuffer1, VALUE_HANDLE_DEREF(outNBElement) ); -/* Generated */ } -/* Generated */ #endif -/* Generated */ if( optInNbDevUp == optInNbDevDn ) -/* Generated */ { -/* Generated */ if( optInNbDevUp == 1.0 ) -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = tempBuffer2[i]; -/* Generated */ tempReal2 = outRealMiddleBand[i]; -/* Generated */ outRealUpperBand[i] = tempReal2 + tempReal; -/* Generated */ outRealLowerBand[i] = tempReal2 - tempReal; -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = tempBuffer2[i] * optInNbDevUp; -/* Generated */ tempReal2 = outRealMiddleBand[i]; -/* Generated */ outRealUpperBand[i] = tempReal2 + tempReal; -/* Generated */ outRealLowerBand[i] = tempReal2 - tempReal; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( optInNbDevUp == 1.0 ) -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = tempBuffer2[i]; -/* Generated */ tempReal2 = outRealMiddleBand[i]; -/* Generated */ outRealUpperBand[i] = tempReal2 + tempReal; -/* Generated */ outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); -/* Generated */ } -/* Generated */ } -/* Generated */ else if( optInNbDevDn == 1.0 ) -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = tempBuffer2[i]; -/* Generated */ tempReal2 = outRealMiddleBand[i]; -/* Generated */ outRealLowerBand[i] = tempReal2 - tempReal; -/* Generated */ outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = tempBuffer2[i]; -/* Generated */ tempReal2 = outRealMiddleBand[i]; -/* Generated */ outRealUpperBand[i] = tempReal2 + (tempReal * optInNbDevUp); -/* Generated */ outRealLowerBand[i] = tempReal2 - (tempReal * optInNbDevDn); -/* Generated */ } -/* Generated */ } -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_BETA.c b/src/ta-lib/src/ta_func/ta_BETA.c deleted file mode 100644 index 1aae13091..000000000 --- a/src/ta-lib/src/ta_func/ta_BETA.c +++ /dev/null @@ -1,496 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MW Michael Williamson - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 122006 MW Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::BetaLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int betaLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_BETA_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_BETA - Beta - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode beta( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal0[], -/* Generated */ double inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_BETA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal0[], -/* Generated */ const double inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - double S_xx = 0.0f; /* sum of x * x */ - double S_xy = 0.0f; /* sum of x * y */ - double S_x = 0.0f; /* sum of x */ - double S_y = 0.0f; /* sum of y */ - double last_price_x = 0.0f; /* the last price read from inReal0 */ - double last_price_y = 0.0f; /* the last price read from inReal1 */ - double trailing_last_price_x = 0.0f; /* same as last_price_x except used to remove elements from the trailing summation */ - double trailing_last_price_y = 0.0f; /* same as last_price_y except used to remove elements from the trailing summation */ - double tmp_real = 0.0f; /* temporary variable */ - double x; /* the 'x' value, which is the last change between values in inReal0 */ - double y; /* the 'y' value, which is the last change between values in inReal1 */ - double n = 0.0f; - int i, outIdx; - int trailingIdx, nbInitialElementNeeded; - - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /** DESCRIPTION OF ALGORITHM: - * The Beta 'algorithm' is a measure of a stocks volatility vs from index. The stock prices - * are given in inReal0 and the index prices are give in inReal1. The size of these vectors - * should be equal. The algorithm is to calculate the change between prices in both vectors - * and then 'plot' these changes are points in the Euclidean plane. The x value of the point - * is market return and the y value is the security return. The beta value is the slope of a - * linear regression through these points. A beta of 1 is simple the line y=x, so the stock - * varies percisely with the market. A beta of less than one means the stock varies less than - * the market and a beta of more than one means the stock varies more than market. A related - * value is the Alpha value (see TA_ALPHA) which is the Y-intercept of the same linear regression. - */ - - /* Validate the calculation method type and - * identify the minimum number of input - * consume before the first value is output.. - */ - nbInitialElementNeeded = optInTimePeriod; - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Consume first input. */ - trailingIdx = startIdx-nbInitialElementNeeded; - last_price_x = trailing_last_price_x = inReal0[trailingIdx]; - last_price_y = trailing_last_price_y = inReal1[trailingIdx]; - - /* Process remaining of lookback until ready to output the first value. */ - i = ++trailingIdx; - - while( i < startIdx ) - { - tmp_real = inReal0[i]; - if( !TA_IS_ZERO(last_price_x) ) - x = (tmp_real-last_price_x)/last_price_x; - else - x = 0.0; - last_price_x = tmp_real; - - tmp_real = inReal1[i++]; - if( !TA_IS_ZERO(last_price_y) ) - y = (tmp_real-last_price_y)/last_price_y; - else - y = 0.0; - last_price_y = tmp_real; - - S_xx += x*x; - S_xy += x*y; - S_x += x; - S_y += y; - } - - - outIdx = 0; /* First output always start at index zero */ - n = (double)optInTimePeriod; - do - { - tmp_real = inReal0[i]; - if( !TA_IS_ZERO(last_price_x) ) - x = (tmp_real-last_price_x)/last_price_x; - else - x = 0.0; - last_price_x = tmp_real; - - tmp_real = inReal1[i++]; - if( !TA_IS_ZERO(last_price_y) ) - y = (tmp_real-last_price_y)/last_price_y; - else - y = 0.0; - last_price_y = tmp_real; - - S_xx += x*x; - S_xy += x*y; - S_x += x; - S_y += y; - - /* Always read the trailing before writing the output because the input and output - * buffer can be the same. - */ - tmp_real = inReal0[trailingIdx]; - if( !TA_IS_ZERO(trailing_last_price_x) ) - x = (tmp_real-trailing_last_price_x)/trailing_last_price_x; - else - x = 0.0; - trailing_last_price_x = tmp_real; - - tmp_real = inReal1[trailingIdx++]; - if( !TA_IS_ZERO(trailing_last_price_y) ) - y = (tmp_real-trailing_last_price_y)/trailing_last_price_y; - else - y = 0.0; - trailing_last_price_y = tmp_real; - - /* Write the output */ - tmp_real = (n * S_xx) - (S_x * S_x); - if( !TA_IS_ZERO(tmp_real) ) - outReal[outIdx++] = ((n * S_xy) - (S_x * S_y)) / tmp_real; - else - outReal[outIdx++] = 0.0; - - /* Remove the calculation starting with the trailingIdx. */ - S_xx -= x*x; - S_xy -= x*y; - S_x -= x; - S_y -= y; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Beta( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode beta( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal0[], -/* Generated */ float inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_BETA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal0[], -/* Generated */ const float inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double S_xx = 0.0f; -/* Generated */ double S_xy = 0.0f; -/* Generated */ double S_x = 0.0f; -/* Generated */ double S_y = 0.0f; -/* Generated */ double last_price_x = 0.0f; -/* Generated */ double last_price_y = 0.0f; -/* Generated */ double trailing_last_price_x = 0.0f; -/* Generated */ double trailing_last_price_y = 0.0f; -/* Generated */ double tmp_real = 0.0f; -/* Generated */ double x; -/* Generated */ double y; -/* Generated */ double n = 0.0f; -/* Generated */ int i, outIdx; -/* Generated */ int trailingIdx, nbInitialElementNeeded; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = optInTimePeriod; -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ last_price_x = trailing_last_price_x = inReal0[trailingIdx]; -/* Generated */ last_price_y = trailing_last_price_y = inReal1[trailingIdx]; -/* Generated */ i = ++trailingIdx; -/* Generated */ while( i < startIdx ) -/* Generated */ { -/* Generated */ tmp_real = inReal0[i]; -/* Generated */ if( !TA_IS_ZERO(last_price_x) ) -/* Generated */ x = (tmp_real-last_price_x)/last_price_x; -/* Generated */ else -/* Generated */ x = 0.0; -/* Generated */ last_price_x = tmp_real; -/* Generated */ tmp_real = inReal1[i++]; -/* Generated */ if( !TA_IS_ZERO(last_price_y) ) -/* Generated */ y = (tmp_real-last_price_y)/last_price_y; -/* Generated */ else -/* Generated */ y = 0.0; -/* Generated */ last_price_y = tmp_real; -/* Generated */ S_xx += x*x; -/* Generated */ S_xy += x*y; -/* Generated */ S_x += x; -/* Generated */ S_y += y; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ n = (double)optInTimePeriod; -/* Generated */ do -/* Generated */ { -/* Generated */ tmp_real = inReal0[i]; -/* Generated */ if( !TA_IS_ZERO(last_price_x) ) -/* Generated */ x = (tmp_real-last_price_x)/last_price_x; -/* Generated */ else -/* Generated */ x = 0.0; -/* Generated */ last_price_x = tmp_real; -/* Generated */ tmp_real = inReal1[i++]; -/* Generated */ if( !TA_IS_ZERO(last_price_y) ) -/* Generated */ y = (tmp_real-last_price_y)/last_price_y; -/* Generated */ else -/* Generated */ y = 0.0; -/* Generated */ last_price_y = tmp_real; -/* Generated */ S_xx += x*x; -/* Generated */ S_xy += x*y; -/* Generated */ S_x += x; -/* Generated */ S_y += y; -/* Generated */ tmp_real = inReal0[trailingIdx]; -/* Generated */ if( !TA_IS_ZERO(trailing_last_price_x) ) -/* Generated */ x = (tmp_real-trailing_last_price_x)/trailing_last_price_x; -/* Generated */ else -/* Generated */ x = 0.0; -/* Generated */ trailing_last_price_x = tmp_real; -/* Generated */ tmp_real = inReal1[trailingIdx++]; -/* Generated */ if( !TA_IS_ZERO(trailing_last_price_y) ) -/* Generated */ y = (tmp_real-trailing_last_price_y)/trailing_last_price_y; -/* Generated */ else -/* Generated */ y = 0.0; -/* Generated */ trailing_last_price_y = tmp_real; -/* Generated */ tmp_real = (n * S_xx) - (S_x * S_x); -/* Generated */ if( !TA_IS_ZERO(tmp_real) ) -/* Generated */ outReal[outIdx++] = ((n * S_xy) - (S_x * S_y)) / tmp_real; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ S_xx -= x*x; -/* Generated */ S_xy -= x*y; -/* Generated */ S_x -= x; -/* Generated */ S_y -= y; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_BOP.c b/src/ta-lib/src/ta_func/ta_BOP.c deleted file mode 100644 index bda80a9b8..000000000 --- a/src/ta-lib/src/ta_func/ta_BOP.c +++ /dev/null @@ -1,292 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112605 MF Initial coding. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::BopLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int bopLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_BOP_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_BOP - Balance Of Power - * - * Input = Open, High, Low, Close - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode bop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_BOP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx, i; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* BOP = (Close - Open)/(High - Low) */ - - outIdx = 0; - - for( i=startIdx; i <= endIdx; i++ ) - { - tempReal = inHigh[i]-inLow[i]; - if( TA_IS_ZERO_OR_NEG(tempReal) ) - outReal[outIdx++] = 0.0; - else - outReal[outIdx++] = (inClose[i] - inOpen[i])/tempReal; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Bop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode bop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_BOP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ outIdx = 0; -/* Generated */ for( i=startIdx; i <= endIdx; i++ ) -/* Generated */ { -/* Generated */ tempReal = inHigh[i]-inLow[i]; -/* Generated */ if( TA_IS_ZERO_OR_NEG(tempReal) ) -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = (inClose[i] - inOpen[i])/tempReal; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CCI.c b/src/ta-lib/src/ta_func/ta_CCI.c deleted file mode 100644 index 5b8753cbd..000000000 --- a/src/ta-lib/src/ta_func/ta_CCI.c +++ /dev/null @@ -1,429 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 031202 MF Template creation. - * 052603 MF Port to managed C++. Change to use CIRCBUF macros. - * 061704 MF Lower limit for period to 2, and correct algorithm - * to avoid cummulative error when value are close to - * the floating point epsilon. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CciLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cciLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CCI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CCI - Commodity Channel Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cci( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CCI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - - /* insert local variable here */ - double tempReal, tempReal2, theAverage, lastValue; - int i, j, outIdx, lookbackTotal; - - /* This ptr will points on a circular buffer of - * at least "optInTimePeriod" element. - */ - CIRCBUF_PROLOG(circBuffer,double,30); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Allocate a circular buffer equal to the requested - * period. - */ - CIRCBUF_INIT( circBuffer, double, optInTimePeriod ); - - /* Do the MA calculation using tight loops. */ - - /* Add-up the initial period, except for the last value. - * Fill up the circular buffer at the same time. - */ - i=startIdx-lookbackTotal; - if( optInTimePeriod > 1 ) - { - while( i < startIdx ) - { - circBuffer[circBuffer_Idx] = (inHigh[i]+inLow[i]+inClose[i])/3; - i++; - CIRCBUF_NEXT(circBuffer); - } - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the inReal and - * outReal to be the same buffer. - */ - outIdx = 0; - do - { - lastValue = (inHigh[i]+inLow[i]+inClose[i])/3; - circBuffer[circBuffer_Idx] = lastValue; - - /* Calculate the average for the whole period. */ - theAverage = 0; - for( j=0; j < optInTimePeriod; j++ ) - theAverage += circBuffer[j]; - theAverage /= optInTimePeriod; - - /* Do the summation of the ABS(TypePrice-average) - * for the whole period. - */ - tempReal2 = 0; - for( j=0; j < optInTimePeriod; j++ ) - tempReal2 += std_fabs(circBuffer[j]-theAverage); - - /* And finally, the CCI... */ - tempReal = lastValue-theAverage; - - if( (tempReal != 0.0) && (tempReal2 != 0.0) ) - { - outReal[outIdx++] = tempReal/(0.015*(tempReal2/optInTimePeriod)); - } - else - outReal[outIdx++] = 0.0; - - /* Move forward the circular buffer indexes. */ - CIRCBUF_NEXT(circBuffer); - - i++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Free the circular buffer if it was dynamically allocated. */ - CIRCBUF_DESTROY(circBuffer); - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cci( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cci( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CCI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double tempReal, tempReal2, theAverage, lastValue; -/* Generated */ int i, j, outIdx, lookbackTotal; -/* Generated */ CIRCBUF_PROLOG(circBuffer,double,30); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = (optInTimePeriod-1); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ CIRCBUF_INIT( circBuffer, double, optInTimePeriod ); -/* Generated */ i=startIdx-lookbackTotal; -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ { -/* Generated */ while( i < startIdx ) -/* Generated */ { -/* Generated */ circBuffer[circBuffer_Idx] = (inHigh[i]+inLow[i]+inClose[i])/3; -/* Generated */ i++; -/* Generated */ CIRCBUF_NEXT(circBuffer); -/* Generated */ } -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ lastValue = (inHigh[i]+inLow[i]+inClose[i])/3; -/* Generated */ circBuffer[circBuffer_Idx] = lastValue; -/* Generated */ theAverage = 0; -/* Generated */ for( j=0; j < optInTimePeriod; j++ ) -/* Generated */ theAverage += circBuffer[j]; -/* Generated */ theAverage /= optInTimePeriod; -/* Generated */ tempReal2 = 0; -/* Generated */ for( j=0; j < optInTimePeriod; j++ ) -/* Generated */ tempReal2 += std_fabs(circBuffer[j]-theAverage); -/* Generated */ tempReal = lastValue-theAverage; -/* Generated */ if( (tempReal != 0.0) && (tempReal2 != 0.0) ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = tempReal/(0.015*(tempReal2/optInTimePeriod)); -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ CIRCBUF_NEXT(circBuffer); -/* Generated */ i++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ CIRCBUF_DESTROY(circBuffer); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL2CROWS.c b/src/ta-lib/src/ta_func/ta_CDL2CROWS.c deleted file mode 100644 index 521c13e56..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL2CROWS.c +++ /dev/null @@ -1,369 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl2CrowsLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl2CrowsLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL2CROWS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(BodyLong) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL2CROWS - Two Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL2CROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal; - int i, outIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL2CROWS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white candle - * - second candle: black real body - * - gap between the first and the second candle's real bodies - * - third candle: black candle that opens within the second real body and closes within the first real body - * The meaning of "long" is specified with TA_SetCandleSettings - * outInteger is negative (-1 to -100): two crows is always bearish; - * the user should consider that two crows is significant when it appears in an uptrend, while this function - * does not consider the trend - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white - TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long - TA_CANDLECOLOR(i-1) == -1 && // 2nd: black - TA_REALBODYGAPUP(i-1,i-2) && // gapping up - TA_CANDLECOLOR(i) == -1 && // 3rd: black - inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // opening within 2nd rb - inClose[i] > inOpen[i-2] && inClose[i] < inClose[i-2] // closing within 1st rb - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - i++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL2CROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL2CROWS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white -/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd: black -/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd: black -/* Generated */ inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // opening within 2nd rb -/* Generated */ inClose[i] > inOpen[i-2] && inClose[i] < inClose[i-2] // closing within 1st rb -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c b/src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c deleted file mode 100644 index a4e1ff5b2..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL3BLACKCROWS.c +++ /dev/null @@ -1,397 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 103004 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl3BlackCrowsLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl3BlackCrowsLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL3BLACKCROWS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(ShadowVeryShort) + 3; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL3BLACKCROWS - Three Black Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3BlackCrows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL3BLACKCROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); - int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL3BLACKCROWS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal[2] = 0; - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortPeriodTotal[0] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three consecutive and declining black candlesticks - * - each candle must have no or very short lower shadow - * - each candle after the first must open within the prior candle's real body - * - the first candle's close should be under the prior white candle's high - * The meaning of "very short" is specified with TA_SetCandleSettings - * outInteger is negative (-1 to -100): three black crows is always bearish; - * the user should consider that 3 black crows is significant when it appears after a mature advance or at high levels, - * while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-3) == 1 && // white - TA_CANDLECOLOR(i-2) == -1 && // 1st black - TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && - // very short lower shadow - TA_CANDLECOLOR(i-1) == -1 && // 2nd black - TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - // very short lower shadow - TA_CANDLECOLOR(i) == -1 && // 3rd black - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - // very short lower shadow - inOpen[i-1] < inOpen[i-2] && inOpen[i-1] > inClose[i-2] && // 2nd black opens within 1st black's rb - inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // 3rd black opens within 2nd black's rb - inHigh[i-3] > inClose[i-2] && // 1st black closes under prior candle's high - inClose[i-2] > inClose[i-1] && // three declining - inClose[i-1] > inClose[i] // three declining - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 2; totIdx >= 0; --totIdx) - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - i++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3BlackCrows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3BlackCrows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL3BLACKCROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); -/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3BLACKCROWS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-3) == 1 && // white -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // 1st black -/* Generated */ TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && -/* Generated */ // very short lower shadow -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd black -/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ // very short lower shadow -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ // very short lower shadow -/* Generated */ inOpen[i-1] < inOpen[i-2] && inOpen[i-1] > inClose[i-2] && // 2nd black opens within 1st black's rb -/* Generated */ inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // 3rd black opens within 2nd black's rb -/* Generated */ inHigh[i-3] > inClose[i-2] && // 1st black closes under prior candle's high -/* Generated */ inClose[i-2] > inClose[i-1] && // three declining -/* Generated */ inClose[i-1] > inClose[i] // three declining -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL3INSIDE.c b/src/ta-lib/src/ta_func/ta_CDL3INSIDE.c deleted file mode 100644 index ab8a06f9c..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL3INSIDE.c +++ /dev/null @@ -1,388 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl3InsideLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl3InsideLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL3INSIDE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL3INSIDE - Three Inside Up/Down - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3Inside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL3INSIDE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL3INSIDE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx-1 ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white (black) real body - * - second candle: short real body totally engulfed by the first - * - third candle: black (white) candle that closes lower (higher) than the first candle's open - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) for the three inside up or negative (-1 to -100) for the three inside down; - * the user should consider that a three inside up is significant when it appears in a downtrend and a three inside - * down is significant when it appears in an uptrend, while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short - max( inClose[i-1], inOpen[i-1] ) < max( inClose[i-2], inOpen[i-2] ) && // engulfed by 1st - min( inClose[i-1], inOpen[i-1] ) > min( inClose[i-2], inOpen[i-2] ) && - ( ( TA_CANDLECOLOR(i-2) == 1 && TA_CANDLECOLOR(i) == -1 && inClose[i] < inOpen[i-2] ) // 3rd: opposite to 1st - || // and closing out - ( TA_CANDLECOLOR(i-2) == -1 && TA_CANDLECOLOR(i) == 1 && inClose[i] > inOpen[i-2] ) - ) - ) - outInteger[outIdx++] = -TA_CANDLECOLOR(i-2) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3Inside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3Inside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL3INSIDE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3INSIDE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short -/* Generated */ max( inClose[i-1], inOpen[i-1] ) < max( inClose[i-2], inOpen[i-2] ) && // engulfed by 1st -/* Generated */ min( inClose[i-1], inOpen[i-1] ) > min( inClose[i-2], inOpen[i-2] ) && -/* Generated */ ( ( TA_CANDLECOLOR(i-2) == 1 && TA_CANDLECOLOR(i) == -1 && inClose[i] < inOpen[i-2] ) // 3rd: opposite to 1st -/* Generated */ || // and closing out -/* Generated */ ( TA_CANDLECOLOR(i-2) == -1 && TA_CANDLECOLOR(i) == 1 && inClose[i] > inOpen[i-2] ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-2) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c b/src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c deleted file mode 100644 index 695a80333..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL3LINESTRIKE.c +++ /dev/null @@ -1,410 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl3LineStrikeLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl3LineStrikeLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL3LINESTRIKE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(Near) + 3; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL3LINESTRIKE - Three-Line Strike - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3LineStrike( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL3LINESTRIKE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(NearPeriodTotal,4); - int i, outIdx, totIdx, NearTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL3LINESTRIKE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - NearPeriodTotal[3] = 0; - NearPeriodTotal[2] = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal[3] += TA_CANDLERANGE( Near, i-3 ); - NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three white soldiers (three black crows): three white (black) candlesticks with consecutively higher (lower) closes, - * each opening within or near the previous real body - * - fourth candle: black (white) candle that opens above (below) prior candle's close and closes below (above) - * the first candle's open - * The meaning of "near" is specified with TA_SetCandleSettings; - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that 3-line strike is significant when it appears in a trend in the same direction of - * the first three candles, while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && // three with same color - TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && - TA_CANDLECOLOR(i) == -TA_CANDLECOLOR(i-1) && // 4th opposite color - // 2nd opens within/near 1st rb - inOpen[i-2] >= min( inOpen[i-3], inClose[i-3] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && - inOpen[i-2] <= max( inOpen[i-3], inClose[i-3] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && - // 3rd opens within/near 2nd rb - inOpen[i-1] >= min( inOpen[i-2], inClose[i-2] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && - inOpen[i-1] <= max( inOpen[i-2], inClose[i-2] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && - ( - ( // if three white - TA_CANDLECOLOR(i-1) == 1 && - inClose[i-1] > inClose[i-2] && inClose[i-2] > inClose[i-3] && // consecutive higher closes - inOpen[i] > inClose[i-1] && // 4th opens above prior close - inClose[i] < inOpen[i-3] // 4th closes below 1st open - ) || - ( // if three black - TA_CANDLECOLOR(i-1) == -1 && - inClose[i-1] < inClose[i-2] && inClose[i-2] < inClose[i-3] && // consecutive lower closes - inOpen[i] < inClose[i-1] && // 4th opens below prior close - inClose[i] > inOpen[i-3] // 4th closes above 1st open - ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 3; totIdx >= 2; --totIdx) - NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) - - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); - i++; - NearTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3LineStrike( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3LineStrike( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL3LINESTRIKE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(NearPeriodTotal,4); -/* Generated */ int i, outIdx, totIdx, NearTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3LINESTRIKE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ NearPeriodTotal[3] = 0; -/* Generated */ NearPeriodTotal[2] = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal[3] += TA_CANDLERANGE( Near, i-3 ); -/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && // three with same color -/* Generated */ TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && -/* Generated */ TA_CANDLECOLOR(i) == -TA_CANDLECOLOR(i-1) && // 4th opposite color -/* Generated */ // 2nd opens within/near 1st rb -/* Generated */ inOpen[i-2] >= min( inOpen[i-3], inClose[i-3] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && -/* Generated */ inOpen[i-2] <= max( inOpen[i-3], inClose[i-3] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[3], i-3 ) && -/* Generated */ // 3rd opens within/near 2nd rb -/* Generated */ inOpen[i-1] >= min( inOpen[i-2], inClose[i-2] ) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && -/* Generated */ inOpen[i-1] <= max( inOpen[i-2], inClose[i-2] ) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && -/* Generated */ ( -/* Generated */ ( // if three white -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && -/* Generated */ inClose[i-1] > inClose[i-2] && inClose[i-2] > inClose[i-3] && // consecutive higher closes -/* Generated */ inOpen[i] > inClose[i-1] && // 4th opens above prior close -/* Generated */ inClose[i] < inOpen[i-3] // 4th closes below 1st open -/* Generated */ ) || -/* Generated */ ( // if three black -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && -/* Generated */ inClose[i-1] < inClose[i-2] && inClose[i-2] < inClose[i-3] && // consecutive lower closes -/* Generated */ inOpen[i] < inClose[i-1] && // 4th opens below prior close -/* Generated */ inClose[i] > inOpen[i-3] // 4th closes above 1st open -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 3; totIdx >= 2; --totIdx) -/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ NearTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c b/src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c deleted file mode 100644 index 61a2f52a1..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL3OUTSIDE.c +++ /dev/null @@ -1,351 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl3OutsideLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl3OutsideLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL3OUTSIDE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return 3; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL3OUTSIDE - Three Outside Up/Down - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3Outside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL3OUTSIDE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int i, outIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL3OUTSIDE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first: black (white) real body - * - second: white (black) real body that engulfs the prior real body - * - third: candle that closes higher (lower) than the second candle - * outInteger is positive (1 to 100) for the three outside up or negative (-1 to -100) for the three outside down; - * the user should consider that a three outside up must appear in a downtrend and three outside down must appear - * in an uptrend, while this function does not consider it - */ - outIdx = 0; - do - { - if( ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLECOLOR(i-2) == -1 && // white engulfs black - inClose[i-1] > inOpen[i-2] && inOpen[i-1] < inClose[i-2] && - inClose[i] > inClose[i-1] // third candle higher - ) - || - ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLECOLOR(i-2) == 1 && // black engulfs white - inOpen[i-1] > inClose[i-2] && inClose[i-1] < inOpen[i-2] && - inClose[i] < inClose[i-1] // third candle lower - ) - ) - { - outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; - } - else - outInteger[outIdx++] = 0; - i++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3Outside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3Outside( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL3OUTSIDE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i, outIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3OUTSIDE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLECOLOR(i-2) == -1 && // white engulfs black -/* Generated */ inClose[i-1] > inOpen[i-2] && inOpen[i-1] < inClose[i-2] && -/* Generated */ inClose[i] > inClose[i-1] // third candle higher -/* Generated */ ) -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLECOLOR(i-2) == 1 && // black engulfs white -/* Generated */ inOpen[i-1] > inClose[i-2] && inClose[i-1] < inOpen[i-2] && -/* Generated */ inClose[i] < inClose[i-1] // third candle lower -/* Generated */ ) -/* Generated */ ) -/* Generated */ { -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; -/* Generated */ } -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ i++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c b/src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c deleted file mode 100644 index a3a59d7fe..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL3STARSINSOUTH.c +++ /dev/null @@ -1,465 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 022705 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl3StarsInSouthLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl3StarsInSouthLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL3STARSINSOUTH_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(ShadowLong) ), - max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(BodyShort) ) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL3STARSINSOUTH - Three Stars In The South - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3StarsInSouth( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL3STARSINSOUTH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal, BodyShortPeriodTotal, ShadowLongPeriodTotal; - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); - int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, - lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL3STARSINSOUTH)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortPeriodTotal[0] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - BodyShortPeriodTotal = 0; - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle with long lower shadow - * - second candle: smaller black candle that opens higher than prior close but within prior candle's range - * and trades lower than prior close but not lower than prior low and closes off of its low (it has a shadow) - * - third candle: small black marubozu (or candle with very short shadows) engulfed by prior candle's range - * The meanings of "long body", "short body", "very short shadow" are specified with TA_SetCandleSettings; - * outInteger is positive (1 to 100): 3 stars in the south is always bullish; - * the user should consider that 3 stars in the south is significant when it appears in downtrend, while this function - * does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == -1 && // 1st black - TA_CANDLECOLOR(i-1) == -1 && // 2nd black - TA_CANDLECOLOR(i) == -1 && // 3rd black - // 1st: long - TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && - // with long lower shadow - TA_LOWERSHADOW(i-2) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i-2 ) && - TA_REALBODY(i-1) < TA_REALBODY(i-2) && // 2nd: smaller candle - inOpen[i-1] > inClose[i-2] && inOpen[i-1] <= inHigh[i-2] && // that opens higher but within 1st range - inLow[i-1] < inClose[i-2] && // and trades lower than 1st close - inLow[i-1] >= inLow[i-2] && // but not lower than 1st low - // and has a lower shadow - TA_LOWERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - // 3rd: small marubozu - TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - inLow[i] > inLow[i-1] && inHigh[i] < inHigh[i-1] // engulfed by prior candle's range - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ) - - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-2 ); - for (totIdx = 1; totIdx >= 0; --totIdx) - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - ShadowLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3StarsInSouth( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3StarsInSouth( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL3STARSINSOUTH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal, BodyShortPeriodTotal, ShadowLongPeriodTotal; -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); -/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, -/* Generated */ lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3STARSINSOUTH)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == -1 && // 1st black -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd black -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black -/* Generated */ // 1st: long -/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && -/* Generated */ // with long lower shadow -/* Generated */ TA_LOWERSHADOW(i-2) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i-2 ) && -/* Generated */ TA_REALBODY(i-1) < TA_REALBODY(i-2) && // 2nd: smaller candle -/* Generated */ inOpen[i-1] > inClose[i-2] && inOpen[i-1] <= inHigh[i-2] && // that opens higher but within 1st range -/* Generated */ inLow[i-1] < inClose[i-2] && // and trades lower than 1st close -/* Generated */ inLow[i-1] >= inLow[i-2] && // but not lower than 1st low -/* Generated */ // and has a lower shadow -/* Generated */ TA_LOWERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ // 3rd: small marubozu -/* Generated */ TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ inLow[i] > inLow[i-1] && inHigh[i] < inHigh[i-1] // engulfed by prior candle's range -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i-2 ) -/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-2 ); -/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c b/src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c deleted file mode 100644 index 11ae6f618..000000000 --- a/src/ta-lib/src/ta_func/ta_CDL3WHITESOLDIERS.c +++ /dev/null @@ -1,489 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120404 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Cdl3WhiteSoldiersLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdl3WhiteSoldiersLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDL3WHITESOLDIERS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyShort) ), - max( TA_CANDLEAVGPERIOD(Far), TA_CANDLEAVGPERIOD(Near) ) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDL3WHITESOLDIERS - Three Advancing White Soldiers - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3WhiteSoldiers( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDL3WHITESOLDIERS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); - ARRAY_LOCAL(NearPeriodTotal,3); - ARRAY_LOCAL(FarPeriodTotal,3); - double BodyShortPeriodTotal; - int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, FarTrailingIdx, BodyShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDL3WHITESOLDIERS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal[2] = 0; - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortPeriodTotal[0] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - NearPeriodTotal[2] = 0; - NearPeriodTotal[1] = 0; - NearPeriodTotal[0] = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - FarPeriodTotal[2] = 0; - FarPeriodTotal[1] = 0; - FarPeriodTotal[0] = 0; - FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); - BodyShortPeriodTotal = 0; - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); - NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); - i++; - } - i = FarTrailingIdx; - while( i < startIdx ) { - FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); - FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three white candlesticks with consecutively higher closes - * - Greg Morris wants them to be long, Steve Nison doesn't; anyway they should not be short - * - each candle opens within or near the previous white real body - * - each candle must have no or very short upper shadow - * - to differentiate this pattern from advance block, each candle must not be far shorter than the prior candle - * The meanings of "not short", "very short shadow", "far" and "near" are specified with TA_SetCandleSettings; - * here the 3 candles must be not short, if you want them to be long use TA_SetCandleSettings on BodyShort; - * outInteger is positive (1 to 100): advancing 3 white soldiers is always bullish; - * the user should consider that 3 white soldiers is significant when it appears in downtrend, while this function - * does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == 1 && // 1st white - TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && - // very short upper shadow - TA_CANDLECOLOR(i-1) == 1 && // 2nd white - TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - // very short upper shadow - TA_CANDLECOLOR(i) == 1 && // 3rd white - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - // very short upper shadow - inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes - inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body - inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && - inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body - inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && - TA_REALBODY(i-1) > TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && - // 2nd not far shorter than 1st - TA_REALBODY(i) > TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) && - // 3rd not far shorter than 2nd - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // not short real body - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 2; totIdx >= 0; --totIdx) - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - for (totIdx = 2; totIdx >= 1; --totIdx) { - FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) - - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); - NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) - - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); - } - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - ShadowVeryShortTrailingIdx++; - NearTrailingIdx++; - FarTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cdl3WhiteSoldiers( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdl3WhiteSoldiers( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDL3WHITESOLDIERS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); -/* Generated */ ARRAY_LOCAL(NearPeriodTotal,3); -/* Generated */ ARRAY_LOCAL(FarPeriodTotal,3); -/* Generated */ double BodyShortPeriodTotal; -/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, FarTrailingIdx, BodyShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDL3WHITESOLDIERS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ NearPeriodTotal[2] = 0; -/* Generated */ NearPeriodTotal[1] = 0; -/* Generated */ NearPeriodTotal[0] = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ FarPeriodTotal[2] = 0; -/* Generated */ FarPeriodTotal[1] = 0; -/* Generated */ FarPeriodTotal[0] = 0; -/* Generated */ FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); -/* Generated */ NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = FarTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); -/* Generated */ FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st white -/* Generated */ TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && -/* Generated */ // very short upper shadow -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd white -/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ // very short upper shadow -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ // very short upper shadow -/* Generated */ inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes -/* Generated */ inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body -/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && -/* Generated */ inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body -/* Generated */ inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && -/* Generated */ TA_REALBODY(i-1) > TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && -/* Generated */ // 2nd not far shorter than 1st -/* Generated */ TA_REALBODY(i) > TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) && -/* Generated */ // 3rd not far shorter than 2nd -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // not short real body -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) { -/* Generated */ FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); -/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); -/* Generated */ } -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ NearTrailingIdx++; -/* Generated */ FarTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c b/src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c deleted file mode 100644 index e480e0807..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLABANDONEDBABY.c +++ /dev/null @@ -1,473 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 102304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlAbandonedBabyLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlAbandonedBabyLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLABANDONEDBABY_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - - return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ), - TA_CANDLEAVGPERIOD(BodyShort) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLABANDONEDBABY - Abandoned Baby - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlAbandonedBaby( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLABANDONEDBABY( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLABANDONEDBABY)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyDojiPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyDojiTrailingIdx; - while( i < startIdx-1 ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white (black) real body - * - second candle: doji - * - third candle: black (white) real body that moves well within the first candle's real body - * - upside (downside) gap between the first candle and the doji (the shadows of the two candles don't touch) - * - downside (upside) gap between the doji and the third candle (the shadows of the two candles don't touch) - * The meaning of "doji" and "long" is specified with TA_SetCandleSettings - * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should - * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want - * it to be relatively long - * outInteger is positive (1 to 100) when it's an abandoned baby bottom or negative (-1 to -100) when it's - * an abandoned baby top; the user should consider that an abandoned baby is significant when it appears in - * an uptrend or downtrend, while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short - ( ( TA_CANDLECOLOR(i-2) == 1 && // 1st white - TA_CANDLECOLOR(i) == -1 && // 3rd black - inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb - TA_CANDLEGAPUP(i-1,i-2) && // upside gap between 1st and 2nd - TA_CANDLEGAPDOWN(i,i-1) // downside gap between 2nd and 3rd - ) - || - ( - TA_CANDLECOLOR(i-2) == -1 && // 1st black - TA_CANDLECOLOR(i) == 1 && // 3rd white - inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb - TA_CANDLEGAPDOWN(i-1,i-2) && // downside gap between 1st and 2nd - TA_CANDLEGAPUP(i,i-1) // upside gap between 2nd and 3rd - ) - ) - ) - { - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - } - else - { - outInteger[outIdx++] = 0; - } - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyDojiTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlAbandonedBaby( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlAbandonedBaby( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLABANDONEDBABY( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLABANDONEDBABY)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short -/* Generated */ ( ( TA_CANDLECOLOR(i-2) == 1 && // 1st white -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black -/* Generated */ inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb -/* Generated */ TA_CANDLEGAPUP(i-1,i-2) && // upside gap between 1st and 2nd -/* Generated */ TA_CANDLEGAPDOWN(i,i-1) // downside gap between 2nd and 3rd -/* Generated */ ) -/* Generated */ || -/* Generated */ ( -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // 1st black -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white -/* Generated */ inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration && // 3rd closes well within 1st rb -/* Generated */ TA_CANDLEGAPDOWN(i-1,i-2) && // downside gap between 1st and 2nd -/* Generated */ TA_CANDLEGAPUP(i,i-1) // upside gap between 2nd and 3rd -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ { -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ } -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c b/src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c deleted file mode 100644 index f5cfa968e..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLADVANCEBLOCK.c +++ /dev/null @@ -1,561 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120404 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlAdvanceBlockLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlAdvanceBlockLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLADVANCEBLOCK_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( max( TA_CANDLEAVGPERIOD(ShadowLong), TA_CANDLEAVGPERIOD(ShadowShort) ), - max( TA_CANDLEAVGPERIOD(Far), TA_CANDLEAVGPERIOD(Near) ) ), - TA_CANDLEAVGPERIOD(BodyLong) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLADVANCEBLOCK - Advance Block - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlAdvanceBlock( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLADVANCEBLOCK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowShortPeriodTotal,3); - ARRAY_LOCAL(ShadowLongPeriodTotal,2); - ARRAY_LOCAL(NearPeriodTotal,3); - ARRAY_LOCAL(FarPeriodTotal,3); - double BodyLongPeriodTotal; - int i, outIdx, totIdx, BodyLongTrailingIdx, ShadowShortTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, - FarTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLADVANCEBLOCK)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowShortPeriodTotal[2] = 0; - ShadowShortPeriodTotal[1] = 0; - ShadowShortPeriodTotal[0] = 0; - ShadowShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); - ShadowLongPeriodTotal[1] = 0; - ShadowLongPeriodTotal[0] = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - NearPeriodTotal[2] = 0; - NearPeriodTotal[1] = 0; - NearPeriodTotal[0] = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - FarPeriodTotal[2] = 0; - FarPeriodTotal[1] = 0; - FarPeriodTotal[0] = 0; - FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = ShadowShortTrailingIdx; - while( i < startIdx ) { - ShadowShortPeriodTotal[2] += TA_CANDLERANGE( ShadowShort, i-2 ); - ShadowShortPeriodTotal[1] += TA_CANDLERANGE( ShadowShort, i-1 ); - ShadowShortPeriodTotal[0] += TA_CANDLERANGE( ShadowShort, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal[1] += TA_CANDLERANGE( ShadowLong, i-1 ); - ShadowLongPeriodTotal[0] += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); - NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); - i++; - } - i = FarTrailingIdx; - while( i < startIdx ) { - FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); - FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three white candlesticks with consecutively higher closes - * - each candle opens within or near the previous white real body - * - first candle: long white with no or very short upper shadow (a short shadow is accepted too for more flexibility) - * - second and third candles, or only third candle, show signs of weakening: progressively smaller white real bodies - * and/or relatively long upper shadows; see below for specific conditions - * The meanings of "long body", "short shadow", "far" and "near" are specified with TA_SetCandleSettings; - * outInteger is negative (-1 to -100): advance block is always bearish; - * the user should consider that advance block is significant when it appears in uptrend, while this function - * does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == 1 && // 1st white - TA_CANDLECOLOR(i-1) == 1 && // 2nd white - TA_CANDLECOLOR(i) == 1 && // 3rd white - inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes - inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body - inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && - inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body - inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && - TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long real body - TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[2], i-2 ) && - // 1st: short upper shadow - ( - // ( 2 far smaller than 1 && 3 not longer than 2 ) - // advance blocked with the 2nd, 3rd must not carry on the advance - ( - TA_REALBODY(i-1) < TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && - TA_REALBODY(i) < TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) - ) || - // 3 far smaller than 2 - // advance blocked with the 3rd - ( - TA_REALBODY(i) < TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) - ) || - // ( 3 smaller than 2 && 2 smaller than 1 && (3 or 2 not short upper shadow) ) - // advance blocked with progressively smaller real bodies and some upper shadows - ( - TA_REALBODY(i) < TA_REALBODY(i-1) && - TA_REALBODY(i-1) < TA_REALBODY(i-2) && - ( - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[0], i ) || - TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[1], i-1 ) - ) - ) || - // ( 3 smaller than 2 && 3 long upper shadow ) - // advance blocked with 3rd candle's long upper shadow and smaller body - ( - TA_REALBODY(i) < TA_REALBODY(i-1) && - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal[0], i ) - ) - ) - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 2; totIdx >= 0; --totIdx) - ShadowShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowShort, i-totIdx ) - - TA_CANDLERANGE( ShadowShort, ShadowShortTrailingIdx-totIdx ); - for (totIdx = 1; totIdx >= 0; --totIdx) - ShadowLongPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowLong, i-totIdx ) - - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-totIdx ); - for (totIdx = 2; totIdx >= 1; --totIdx) { - FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) - - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); - NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) - - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); - } - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); - i++; - ShadowShortTrailingIdx++; - ShadowLongTrailingIdx++; - NearTrailingIdx++; - FarTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlAdvanceBlock( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlAdvanceBlock( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLADVANCEBLOCK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowShortPeriodTotal,3); -/* Generated */ ARRAY_LOCAL(ShadowLongPeriodTotal,2); -/* Generated */ ARRAY_LOCAL(NearPeriodTotal,3); -/* Generated */ ARRAY_LOCAL(FarPeriodTotal,3); -/* Generated */ double BodyLongPeriodTotal; -/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, ShadowShortTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, -/* Generated */ FarTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLADVANCEBLOCK)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowShortPeriodTotal[2] = 0; -/* Generated */ ShadowShortPeriodTotal[1] = 0; -/* Generated */ ShadowShortPeriodTotal[0] = 0; -/* Generated */ ShadowShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); -/* Generated */ ShadowLongPeriodTotal[1] = 0; -/* Generated */ ShadowLongPeriodTotal[0] = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ NearPeriodTotal[2] = 0; -/* Generated */ NearPeriodTotal[1] = 0; -/* Generated */ NearPeriodTotal[0] = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ FarPeriodTotal[2] = 0; -/* Generated */ FarPeriodTotal[1] = 0; -/* Generated */ FarPeriodTotal[0] = 0; -/* Generated */ FarTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Far); -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = ShadowShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowShortPeriodTotal[2] += TA_CANDLERANGE( ShadowShort, i-2 ); -/* Generated */ ShadowShortPeriodTotal[1] += TA_CANDLERANGE( ShadowShort, i-1 ); -/* Generated */ ShadowShortPeriodTotal[0] += TA_CANDLERANGE( ShadowShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal[1] += TA_CANDLERANGE( ShadowLong, i-1 ); -/* Generated */ ShadowLongPeriodTotal[0] += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); -/* Generated */ NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = FarTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ FarPeriodTotal[2] += TA_CANDLERANGE( Far, i-2 ); -/* Generated */ FarPeriodTotal[1] += TA_CANDLERANGE( Far, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st white -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd white -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white -/* Generated */ inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes -/* Generated */ inOpen[i-1] > inOpen[i-2] && // 2nd opens within/near 1st real body -/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && -/* Generated */ inOpen[i] > inOpen[i-1] && // 3rd opens within/near 2nd real body -/* Generated */ inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) && -/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long real body -/* Generated */ TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[2], i-2 ) && -/* Generated */ // 1st: short upper shadow -/* Generated */ ( -/* Generated */ // ( 2 far smaller than 1 && 3 not longer than 2 ) -/* Generated */ // advance blocked with the 2nd, 3rd must not carry on the advance -/* Generated */ ( -/* Generated */ TA_REALBODY(i-1) < TA_REALBODY(i-2) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[2], i-2 ) && -/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) -/* Generated */ ) || -/* Generated */ // 3 far smaller than 2 -/* Generated */ // advance blocked with the 3rd -/* Generated */ ( -/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Far, FarPeriodTotal[1], i-1 ) -/* Generated */ ) || -/* Generated */ // ( 3 smaller than 2 && 2 smaller than 1 && (3 or 2 not short upper shadow) ) -/* Generated */ // advance blocked with progressively smaller real bodies and some upper shadows -/* Generated */ ( -/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) && -/* Generated */ TA_REALBODY(i-1) < TA_REALBODY(i-2) && -/* Generated */ ( -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[0], i ) || -/* Generated */ TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowShort, ShadowShortPeriodTotal[1], i-1 ) -/* Generated */ ) -/* Generated */ ) || -/* Generated */ // ( 3 smaller than 2 && 3 long upper shadow ) -/* Generated */ // advance blocked with 3rd candle's long upper shadow and smaller body -/* Generated */ ( -/* Generated */ TA_REALBODY(i) < TA_REALBODY(i-1) && -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal[0], i ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) -/* Generated */ ShadowShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowShort, ShadowShortTrailingIdx-totIdx ); -/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) -/* Generated */ ShadowLongPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowLong, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx-totIdx ); -/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) { -/* Generated */ FarPeriodTotal[totIdx] += TA_CANDLERANGE( Far, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Far, FarTrailingIdx-totIdx ); -/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-2 ); -/* Generated */ i++; -/* Generated */ ShadowShortTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ NearTrailingIdx++; -/* Generated */ FarTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c b/src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c deleted file mode 100644 index 0cab9d84e..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLBELTHOLD.c +++ /dev/null @@ -1,389 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlBeltHoldLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlBeltHoldLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLBELTHOLD_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLBELTHOLD - Belt-hold - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlBeltHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLBELTHOLD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLBELTHOLD)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - long white (black) real body - * - no or very short lower (upper) shadow - * The meaning of "long" and "very short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body - ( - ( // white body and very short lower shadow - TA_CANDLECOLOR(i) == 1 && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) || - ( // black body and very short upper shadow - TA_CANDLECOLOR(i) == -1 && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) - ) ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlBeltHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlBeltHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLBELTHOLD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLBELTHOLD)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body -/* Generated */ ( -/* Generated */ ( // white body and very short lower shadow -/* Generated */ TA_CANDLECOLOR(i) == 1 && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) || -/* Generated */ ( // black body and very short upper shadow -/* Generated */ TA_CANDLECOLOR(i) == -1 && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) -/* Generated */ ) ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c b/src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c deleted file mode 100644 index ec0a783e1..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLBREAKAWAY.c +++ /dev/null @@ -1,396 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlBreakawayLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlBreakawayLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLBREAKAWAY_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(BodyLong) + 4; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLBREAKAWAY - Breakaway - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlBreakaway( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLBREAKAWAY( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal; - int i, outIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLBREAKAWAY)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black (white) - * - second candle: black (white) day whose body gaps down (up) - * - third candle: black or white day with lower (higher) high and lower (higher) low than prior candle's - * - fourth candle: black (white) day with lower (higher) high and lower (higher) low than prior candle's - * - fifth candle: white (black) day that closes inside the gap, erasing the prior 3 days - * The meaning of "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that breakaway is significant in a trend opposite to the last candle, while this - * function does not consider it - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-4 ) && // 1st long - TA_CANDLECOLOR(i-4) == TA_CANDLECOLOR(i-3) && // 1st, 2nd, 4th same color, 5th opposite - TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-1) && - TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && - ( - ( TA_CANDLECOLOR(i-4) == -1 && // when 1st is black: - TA_REALBODYGAPDOWN(i-3,i-4) && // 2nd gaps down - inHigh[i-2] < inHigh[i-3] && inLow[i-2] < inLow[i-3] && // 3rd has lower high and low than 2nd - inHigh[i-1] < inHigh[i-2] && inLow[i-1] < inLow[i-2] && // 4th has lower high and low than 3rd - inClose[i] > inOpen[i-3] && inClose[i] < inClose[i-4] // 5th closes inside the gap - ) - || - ( TA_CANDLECOLOR(i-4) == 1 && // when 1st is white: - TA_REALBODYGAPUP(i-3,i-4) && // 2nd gaps up - inHigh[i-2] > inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 3rd has higher high and low than 2nd - inHigh[i-1] > inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 4th has higher high and low than 3rd - inClose[i] < inOpen[i-3] && inClose[i] > inClose[i-4] // 5th closes inside the gap - ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); - i++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlBreakaway( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlBreakaway( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLBREAKAWAY( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLBREAKAWAY)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-4 ) && // 1st long -/* Generated */ TA_CANDLECOLOR(i-4) == TA_CANDLECOLOR(i-3) && // 1st, 2nd, 4th same color, 5th opposite -/* Generated */ TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-1) && -/* Generated */ TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && -/* Generated */ ( -/* Generated */ ( TA_CANDLECOLOR(i-4) == -1 && // when 1st is black: -/* Generated */ TA_REALBODYGAPDOWN(i-3,i-4) && // 2nd gaps down -/* Generated */ inHigh[i-2] < inHigh[i-3] && inLow[i-2] < inLow[i-3] && // 3rd has lower high and low than 2nd -/* Generated */ inHigh[i-1] < inHigh[i-2] && inLow[i-1] < inLow[i-2] && // 4th has lower high and low than 3rd -/* Generated */ inClose[i] > inOpen[i-3] && inClose[i] < inClose[i-4] // 5th closes inside the gap -/* Generated */ ) -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i-4) == 1 && // when 1st is white: -/* Generated */ TA_REALBODYGAPUP(i-3,i-4) && // 2nd gaps up -/* Generated */ inHigh[i-2] > inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 3rd has higher high and low than 2nd -/* Generated */ inHigh[i-1] > inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 4th has higher high and low than 3rd -/* Generated */ inClose[i] < inOpen[i-3] && inClose[i] > inClose[i-4] // 5th closes inside the gap -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-4 ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c b/src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c deleted file mode 100644 index 0d4c3aef0..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLCLOSINGMARUBOZU.c +++ /dev/null @@ -1,390 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 022005 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlClosingMarubozuLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlClosingMarubozuLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLCLOSINGMARUBOZU_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLCLOSINGMARUBOZU - Closing Marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlClosingMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLCLOSINGMARUBOZU( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLCLOSINGMARUBOZU)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - long white (black) real body - * - no or very short upper (lower) shadow - * The meaning of "long" and "very short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body - ( - ( // white body and very short lower shadow - TA_CANDLECOLOR(i) == 1 && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) || - ( // black body and very short upper shadow - TA_CANDLECOLOR(i) == -1 && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) - ) ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlClosingMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlClosingMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLCLOSINGMARUBOZU( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLCLOSINGMARUBOZU)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // long body -/* Generated */ ( -/* Generated */ ( // white body and very short lower shadow -/* Generated */ TA_CANDLECOLOR(i) == 1 && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) || -/* Generated */ ( // black body and very short upper shadow -/* Generated */ TA_CANDLECOLOR(i) == -1 && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) -/* Generated */ ) ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c b/src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c deleted file mode 100644 index cebabf9ab..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLCONCEALBABYSWALL.c +++ /dev/null @@ -1,399 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 022705 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlConcealBabysWallLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlConcealBabysWallLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLCONCEALBABYSWALL_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(ShadowVeryShort) + 3; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLCONCEALBABYSWALL - Concealing Baby Swallow - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlConcealBabysWall( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLCONCEALBABYSWALL( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,4); - int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLCONCEALBABYSWALL)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal[3] = 0; - ShadowVeryShortPeriodTotal[2] = 0; - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[3] += TA_CANDLERANGE( ShadowVeryShort, i-3 ); - ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: black marubozu (very short shadows) - * - second candle: black marubozu (very short shadows) - * - third candle: black candle that opens gapping down but has an upper shadow that extends into the prior body - * - fourth candle: black candle that completely engulfs the third candle, including the shadows - * The meanings of "very short shadow" are specified with TA_SetCandleSettings; - * outInteger is positive (1 to 100): concealing baby swallow is always bullish; - * the user should consider that concealing baby swallow is significant when it appears in downtrend, while - * this function does not consider it - */ - outIdx = 0; - - do - { - if( TA_CANDLECOLOR(i-3) == -1 && // 1st black - TA_CANDLECOLOR(i-2) == -1 && // 2nd black - TA_CANDLECOLOR(i-1) == -1 && // 3rd black - TA_CANDLECOLOR(i) == -1 && // 4th black - // 1st: marubozu - TA_LOWERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && - TA_UPPERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && - // 2nd: marubozu - TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && - TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && - TA_REALBODYGAPDOWN(i-1,i-2) && // 3rd: opens gapping down - // and HAS an upper shadow - TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - inHigh[i-1] > inClose[i-2] && // that extends into the prior body - inHigh[i] > inHigh[i-1] && inLow[i] < inLow[i-1] // 4th: engulfs the 3rd including the shadows - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 3; totIdx >= 1; --totIdx) - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - i++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlConcealBabysWall( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlConcealBabysWall( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLCONCEALBABYSWALL( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,4); -/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLCONCEALBABYSWALL)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal[3] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[3] += TA_CANDLERANGE( ShadowVeryShort, i-3 ); -/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-3) == -1 && // 1st black -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // 2nd black -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 3rd black -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 4th black -/* Generated */ // 1st: marubozu -/* Generated */ TA_LOWERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && -/* Generated */ TA_UPPERSHADOW(i-3) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[3], i-3 ) && -/* Generated */ // 2nd: marubozu -/* Generated */ TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && -/* Generated */ TA_UPPERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && -/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // 3rd: opens gapping down -/* Generated */ // and HAS an upper shadow -/* Generated */ TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ inHigh[i-1] > inClose[i-2] && // that extends into the prior body -/* Generated */ inHigh[i] > inHigh[i-1] && inLow[i] < inLow[i-1] // 4th: engulfs the 3rd including the shadows -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 3; totIdx >= 1; --totIdx) -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c b/src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c deleted file mode 100644 index 39cdc6cec..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLCOUNTERATTACK.c +++ /dev/null @@ -1,392 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlCounterAttackLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlCounterAttackLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLCOUNTERATTACK_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLCOUNTERATTACK - Counterattack - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlCounterAttack( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLCOUNTERATTACK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double EqualPeriodTotal; - ARRAY_LOCAL(BodyLongPeriodTotal,2); - int i, outIdx, totIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLCOUNTERATTACK)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - BodyLongPeriodTotal[1] = 0; - BodyLongPeriodTotal[0] = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); - BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black (white) - * - second candle: long white (black) with close equal to the prior close - * The meaning of "equal" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that counterattack is significant in a trend, while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 1st long - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // 2nd long - inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // equal closes - inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - for (totIdx = 1; totIdx >= 0; --totIdx) - BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); - i++; - EqualTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlCounterAttack( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlCounterAttack( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLCOUNTERATTACK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double EqualPeriodTotal; -/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); -/* Generated */ int i, outIdx, totIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLCOUNTERATTACK)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ BodyLongPeriodTotal[1] = 0; -/* Generated */ BodyLongPeriodTotal[0] = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 1st long -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // 2nd long -/* Generated */ inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // equal closes -/* Generated */ inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) -/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c b/src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c deleted file mode 100644 index 1c07e9696..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLDARKCLOUDCOVER.c +++ /dev/null @@ -1,398 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120904 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlDarkCloudCoverLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlDarkCloudCoverLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLDARKCLOUDCOVER_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 5.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - - return TA_CANDLEAVGPERIOD(BodyLong) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLDARKCLOUDCOVER - Dark Cloud Cover - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDarkCloudCover( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLDARKCLOUDCOVER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal; - int i, outIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 5.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLDARKCLOUDCOVER)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white candle - * - second candle: black candle that opens above previous day high and closes within previous day real body; - * Greg Morris wants the close to be below the midpoint of the previous real body - * The meaning of "long" is specified with TA_SetCandleSettings, the penetration of the first real body is specified - * with optInPenetration - * outInteger is negative (-1 to -100): dark cloud cover is always bearish - * the user should consider that a dark cloud cover is significant when it appears in an uptrend, while - * this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == 1 && // 1st: white - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long - TA_CANDLECOLOR(i) == -1 && // 2nd: black - inOpen[i] > inHigh[i-1] && // open above prior high - inClose[i] > inOpen[i-1] && // close within prior body - inClose[i] < inClose[i-1] - TA_REALBODY(i-1) * optInPenetration - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); - i++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDarkCloudCover( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDarkCloudCover( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLDARKCLOUDCOVER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 5.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDARKCLOUDCOVER)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == 1 && // 1st: white -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 2nd: black -/* Generated */ inOpen[i] > inHigh[i-1] && // open above prior high -/* Generated */ inClose[i] > inOpen[i-1] && // close within prior body -/* Generated */ inClose[i] < inClose[i-1] - TA_REALBODY(i-1) * optInPenetration -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLDOJI.c b/src/ta-lib/src/ta_func/ta_CDLDOJI.c deleted file mode 100644 index 0541dd913..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLDOJI.c +++ /dev/null @@ -1,350 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlDojiLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlDojiLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLDOJI_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(BodyDoji); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLDOJI - Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLDOJI)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyDojiPeriodTotal = 0; - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * - * Must have: - * - open quite equal to close - * How much can be the maximum distance between open and close is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100) but this does not mean it is bullish: doji shows uncertainty and it is - * neither bullish nor bearish when considered alone - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - i++; - BodyDojiTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDOJI)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c b/src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c deleted file mode 100644 index 4942ac94e..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLDOJISTAR.c +++ /dev/null @@ -1,382 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 100204 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlDojiStarLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlDojiStarLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLDOJISTAR_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLDOJISTAR - Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLDOJISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLDOJISTAR)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyDojiPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - - i = BodyLongTrailingIdx; - while( i < startIdx-1 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long real body - * - second candle: star (open gapping up in an uptrend or down in a downtrend) with a doji - * The meaning of "doji" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * it's defined bullish when the long candle is white and the star gaps up, bearish when the long candle - * is black and the star gaps down; the user should consider that a doji star is bullish when it appears - * in an uptrend and it's bearish when it appears in a downtrend, so to determine the bullishness or - * bearishness of the pattern the trend must be analyzed - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long real body - TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // 2nd: doji - ( ( TA_CANDLECOLOR(i-1) == 1 && TA_REALBODYGAPUP(i,i-1) ) // that gaps up if 1st is white - || - ( TA_CANDLECOLOR(i-1) == -1 && TA_REALBODYGAPDOWN(i,i-1) ) // or down if 1st is black - ) ) - outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyDojiTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLDOJISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDOJISTAR)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long real body -/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // 2nd: doji -/* Generated */ ( ( TA_CANDLECOLOR(i-1) == 1 && TA_REALBODYGAPUP(i,i-1) ) // that gaps up if 1st is white -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_REALBODYGAPDOWN(i,i-1) ) // or down if 1st is black -/* Generated */ ) ) -/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c b/src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c deleted file mode 100644 index 97108d22a..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLDRAGONFLYDOJI.c +++ /dev/null @@ -1,379 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlDragonflyDojiLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlDragonflyDojiLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLDRAGONFLYDOJI_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLDRAGONFLYDOJI - Dragonfly Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDragonflyDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLDRAGONFLYDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLDRAGONFLYDOJI)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyDojiPeriodTotal = 0; - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * - * Must have: - * - doji body - * - open and close at the high of the day = no or very short upper shadow - * - lower shadow (to distinguish from other dojis, here lower shadow should not be very short) - * The meaning of "doji" and "very short" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100) but this does not mean it is bullish: dragonfly doji must be considered - * relatively to the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && - TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyDojiTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlDragonflyDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlDragonflyDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLDRAGONFLYDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLDRAGONFLYDOJI)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLENGULFING.c b/src/ta-lib/src/ta_func/ta_CDLENGULFING.c deleted file mode 100644 index f5038ccc5..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLENGULFING.c +++ /dev/null @@ -1,361 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 102404 AC Creation - * 040309 AC Increased flexibility to allow real bodies matching - * on one end (Greg Morris - "Candlestick charting explained") - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlEngulfingLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlEngulfingLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLENGULFING_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLENGULFING - Engulfing Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlEngulfing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLENGULFING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int i, outIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLENGULFING)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first: black (white) real body - * - second: white (black) real body that engulfs the prior real body - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish: - * - 100 is returned when the second candle's real body begins before and ends after the first candle's real body - * - 80 is returned when the two real bodies match on one end (Greg Morris contemplate this case in his book - * "Candlestick charting explained") - * The user should consider that an engulfing must appear in a downtrend if bullish or in an uptrend if bearish, - * while this function does not consider it - */ - outIdx = 0; - do - { - if( ( TA_CANDLECOLOR(i) == 1 && TA_CANDLECOLOR(i-1) == -1 && // white engulfs black - ( ( inClose[i] >= inOpen[i-1] && inOpen[i] < inClose[i-1] ) || - ( inClose[i] > inOpen[i-1] && inOpen[i] <= inClose[i-1] ) - ) - ) - || - ( TA_CANDLECOLOR(i) == -1 && TA_CANDLECOLOR(i-1) == 1 && // black engulfs white - ( ( inOpen[i] >= inClose[i-1] && inClose[i] < inOpen[i-1] ) || - ( inOpen[i] > inClose[i-1] && inClose[i] <= inOpen[i-1] ) - ) - ) - ) - if( inOpen[i] != inClose[i-1] && inClose[i] != inOpen[i-1] ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 80; - else - outInteger[outIdx++] = 0; - i++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlEngulfing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlEngulfing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLENGULFING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i, outIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLENGULFING)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( ( TA_CANDLECOLOR(i) == 1 && TA_CANDLECOLOR(i-1) == -1 && // white engulfs black -/* Generated */ ( ( inClose[i] >= inOpen[i-1] && inOpen[i] < inClose[i-1] ) || -/* Generated */ ( inClose[i] > inOpen[i-1] && inOpen[i] <= inClose[i-1] ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i) == -1 && TA_CANDLECOLOR(i-1) == 1 && // black engulfs white -/* Generated */ ( ( inOpen[i] >= inClose[i-1] && inClose[i] < inOpen[i-1] ) || -/* Generated */ ( inOpen[i] > inClose[i-1] && inClose[i] <= inOpen[i-1] ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ if( inOpen[i] != inClose[i-1] && inClose[i] != inOpen[i-1] ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 80; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ i++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c b/src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c deleted file mode 100644 index 1ae268993..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLEVENINGDOJISTAR.c +++ /dev/null @@ -1,441 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 100304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlEveningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlEveningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLEVENINGDOJISTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - - return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ), - TA_CANDLEAVGPERIOD(BodyShort) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLEVENINGDOJISTAR - Evening Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlEveningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLEVENINGDOJISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLEVENINGDOJISTAR)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyDojiPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyDojiTrailingIdx; - while( i < startIdx-1 ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white real body - * - second candle: doji gapping up - * - third candle: black real body that moves well within the first candle's real body - * The meaning of "doji" and "long" is specified with TA_SetCandleSettings - * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should - * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want - * it to be relatively long - * outInteger is negative (-1 to -100): evening star is always bearish; - * the user should consider that an evening star is significant when it appears in an uptrend, - * while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_CANDLECOLOR(i-2) == 1 && // white - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji - TA_REALBODYGAPUP(i-1,i-2) && // gapping up - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short - TA_CANDLECOLOR(i) == -1 && // black real body - inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyDojiTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlEveningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlEveningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLEVENINGDOJISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLEVENINGDOJISTAR)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_CANDLECOLOR(i-2) == 1 && // white -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji -/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short -/* Generated */ TA_CANDLECOLOR(i) == -1 && // black real body -/* Generated */ inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c b/src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c deleted file mode 100644 index f5cb0c8b8..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLEVENINGSTAR.c +++ /dev/null @@ -1,427 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 100304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlEveningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlEveningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLEVENINGSTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLEVENINGSTAR - Evening Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlEveningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLEVENINGSTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLEVENINGSTAR)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyShortPeriodTotal2 = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx-1 ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white real body - * - second candle: star (short real body gapping up) - * - third candle: black real body that moves well within the first candle's real body - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should - * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want - * it to be relatively long - * outInteger is negative (-1 to -100): evening star is always bearish; - * the user should consider that an evening star is significant when it appears in an uptrend, - * while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_CANDLECOLOR(i-2) == 1 && // white - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short - TA_REALBODYGAPUP(i-1,i-2) && // gapping up - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short - TA_CANDLECOLOR(i) == -1 && // black real body - inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlEveningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlEveningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLEVENINGSTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLEVENINGSTAR)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal2 = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_CANDLECOLOR(i-2) == 1 && // white -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short -/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short -/* Generated */ TA_CANDLECOLOR(i) == -1 && // black real body -/* Generated */ inClose[i] < inClose[i-2] - TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c b/src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c deleted file mode 100644 index 1319ef27b..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLGAPSIDESIDEWHITE.c +++ /dev/null @@ -1,398 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 020605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlGapSideSideWhiteLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlGapSideSideWhiteLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLGAPSIDESIDEWHITE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(Near), TA_CANDLEAVGPERIOD(Equal) ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLGAPSIDESIDEWHITE - Up/Down-gap side-by-side white lines - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlGapSideSideWhite( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLGAPSIDESIDEWHITE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double NearPeriodTotal, EqualPeriodTotal; - int i, outIdx, NearTrailingIdx, EqualTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLGAPSIDESIDEWHITE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - NearPeriodTotal = 0; - EqualPeriodTotal = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); - i++; - } - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - upside or downside gap (between the bodies) - * - first candle after the window: white candlestick - * - second candle after the window: white candlestick with similar size (near the same) and about the same - * open (equal) of the previous candle - * - the second candle does not close the window - * The meaning of "near" and "equal" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) or negative (-1 to -100): the user should consider that upside - * or downside gap side-by-side white lines is significant when it appears in a trend, while this function - * does not consider the trend - */ - outIdx = 0; - do - { - if( - ( // upside or downside gap between the 1st candle and both the next 2 candles - ( TA_REALBODYGAPUP(i-1,i-2) && TA_REALBODYGAPUP(i,i-2) ) - || - ( TA_REALBODYGAPDOWN(i-1,i-2) && TA_REALBODYGAPDOWN(i,i-2) ) - ) && - TA_CANDLECOLOR(i-1) == 1 && // 2nd: white - TA_CANDLECOLOR(i) == 1 && // 3rd: white - TA_REALBODY(i) >= TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && // same size 2 and 3 - TA_REALBODY(i) <= TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && - inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open 2 and 3 - inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) - ) - outInteger[outIdx++] = ( TA_REALBODYGAPUP(i-1,i-2) ? 100 : -100 ); - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - i++; - NearTrailingIdx++; - EqualTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlGapSideSideWhite( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlGapSideSideWhite( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLGAPSIDESIDEWHITE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double NearPeriodTotal, EqualPeriodTotal; -/* Generated */ int i, outIdx, NearTrailingIdx, EqualTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLGAPSIDESIDEWHITE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ NearPeriodTotal = 0; -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( -/* Generated */ ( // upside or downside gap between the 1st candle and both the next 2 candles -/* Generated */ ( TA_REALBODYGAPUP(i-1,i-2) && TA_REALBODYGAPUP(i,i-2) ) -/* Generated */ || -/* Generated */ ( TA_REALBODYGAPDOWN(i-1,i-2) && TA_REALBODYGAPDOWN(i,i-2) ) -/* Generated */ ) && -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd: white -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd: white -/* Generated */ TA_REALBODY(i) >= TA_REALBODY(i-1) - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && // same size 2 and 3 -/* Generated */ TA_REALBODY(i) <= TA_REALBODY(i-1) + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) && -/* Generated */ inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open 2 and 3 -/* Generated */ inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = ( TA_REALBODYGAPUP(i-1,i-2) ? 100 : -100 ); -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ NearTrailingIdx++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c b/src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c deleted file mode 100644 index 4d29a7c57..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLGRAVESTONEDOJI.c +++ /dev/null @@ -1,378 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlGravestoneDojiLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlGravestoneDojiLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLGRAVESTONEDOJI_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLGRAVESTONEDOJI - Gravestone Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlGravestoneDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLGRAVESTONEDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLGRAVESTONEDOJI)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyDojiPeriodTotal = 0; - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * - * Must have: - * - doji body - * - open and close at the low of the day = no or very short lower shadow - * - upper shadow (to distinguish from other dojis, here upper shadow should not be very short) - * The meaning of "doji" and "very short" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100) but this does not mean it is bullish: gravestone doji must be considered - * relatively to the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyDojiTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlGravestoneDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlGravestoneDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLGRAVESTONEDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLGRAVESTONEDOJI)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHAMMER.c b/src/ta-lib/src/ta_func/ta_CDLHAMMER.c deleted file mode 100644 index 47e8a0ddc..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHAMMER.c +++ /dev/null @@ -1,427 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 102304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHammerLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHammerLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHAMMER_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), - TA_CANDLEAVGPERIOD(ShadowVeryShort) ), - TA_CANDLEAVGPERIOD(Near) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHAMMER - Hammer - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHAMMER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHAMMER)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - NearPeriodTotal = 0; - NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = NearTrailingIdx; - while( i < startIdx-1 ) { - NearPeriodTotal += TA_CANDLERANGE( Near, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - small real body - * - long lower shadow - * - no, or very short, upper shadow - * - body below or near the lows of the previous candle - * The meaning of "short", "long" and "near the lows" is specified with TA_SetCandleSettings; - * outInteger is positive (1 to 100): hammer is always bullish; - * the user should consider that a hammer must appear in a downtrend, while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb - TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow - min( inClose[i], inOpen[i] ) <= inLow[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's lows - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - - TA_CANDLERANGE( Near, NearTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - NearTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHAMMER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHAMMER)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ NearPeriodTotal = 0; -/* Generated */ NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb -/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow -/* Generated */ min( inClose[i], inOpen[i] ) <= inLow[i-1] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's lows -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) -/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) -/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ NearTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c b/src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c deleted file mode 100644 index 7575754f5..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHANGINGMAN.c +++ /dev/null @@ -1,427 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 102304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHangingManLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHangingManLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHANGINGMAN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), - TA_CANDLEAVGPERIOD(ShadowVeryShort) ), - TA_CANDLEAVGPERIOD(Near) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHANGINGMAN - Hanging Man - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHangingMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHANGINGMAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHANGINGMAN)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - NearPeriodTotal = 0; - NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = NearTrailingIdx; - while( i < startIdx-1 ) { - NearPeriodTotal += TA_CANDLERANGE( Near, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - small real body - * - long lower shadow - * - no, or very short, upper shadow - * - body above or near the highs of the previous candle - * The meaning of "short", "long" and "near the highs" is specified with TA_SetCandleSettings; - * outInteger is negative (-1 to -100): hanging man is always bearish; - * the user should consider that a hanging man must appear in an uptrend, while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb - TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow - min( inClose[i], inOpen[i] ) >= inHigh[i-1] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's highs - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - - TA_CANDLERANGE( Near, NearTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - NearTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHangingMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHangingMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHANGINGMAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal, NearPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHANGINGMAN)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ NearPeriodTotal = 0; -/* Generated */ NearTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb -/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long lower shadow -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short upper shadow -/* Generated */ min( inClose[i], inOpen[i] ) >= inHigh[i-1] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) // rb near the prior candle's highs -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) -/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) -/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ NearTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHARAMI.c b/src/ta-lib/src/ta_func/ta_CDLHARAMI.c deleted file mode 100644 index e3127373d..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHARAMI.c +++ /dev/null @@ -1,401 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 102404 AC Creation - * 040309 AC Increased flexibility to allow real bodies matching - * on one end (Greg Morris - "Candlestick charting explained") - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHaramiLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHaramiLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHARAMI_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHARAMI - Harami Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHarami( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHARAMI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHARAMI)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-1 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white (black) real body - * - second candle: short real body totally engulfed by the first - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish: - * - 100 is returned when the first candle's real body begins before and ends after the second candle's real body - * - 80 is returned when the two real bodies match on one end (Greg Morris contemplate this case in his book - * "Candlestick charting explained") - * The user should consider that a harami is significant when it appears in a downtrend if bullish or - * in an uptrend when bearish, while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long - TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // 2nd: short - ) - if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st - min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) - ) - outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; - else - if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st - min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; - ) // engulfing guaranteed by "long" and "short") - outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; - else - outInteger[outIdx++] = 0; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHarami( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHarami( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHARAMI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHARAMI)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long -/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) // 2nd: short -/* Generated */ ) -/* Generated */ if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st -/* Generated */ min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; -/* Generated */ else -/* Generated */ if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st -/* Generated */ min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; -/* Generated */ ) // engulfing guaranteed by "long" and "short") -/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c b/src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c deleted file mode 100644 index 2418864a3..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHARAMICROSS.c +++ /dev/null @@ -1,396 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 102404 AC Creation - * 040309 AC Increased flexibility to allow real bodies matching - * on one end (Greg Morris - "Candlestick charting explained") - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHaramiCrossLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHaramiCrossLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHARAMICROSS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHARAMICROSS - Harami Cross Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHaramiCross( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHARAMICROSS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHARAMICROSS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyDojiPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - - i = BodyLongTrailingIdx; - while( i < startIdx-1 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white (black) real body - * - second candle: doji totally engulfed by the first - * The meaning of "doji" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that a harami cross is significant when it appears in a downtrend if bullish or - * in an uptrend when bearish, while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long - TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) // 2nd: doji - if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st - min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) - ) - outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; - else - if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st - min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; - ) // engulfing guaranteed by "long" and "doji") - outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; - else - outInteger[outIdx++] = 0; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyDojiTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHaramiCross( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHaramiCross( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHARAMICROSS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHARAMICROSS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st: long -/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) ) // 2nd: doji -/* Generated */ if ( max( inClose[i], inOpen[i] ) < max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st -/* Generated */ min( inClose[i], inOpen[i] ) > min( inClose[i-1], inOpen[i-1] ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 100; -/* Generated */ else -/* Generated */ if ( max( inClose[i], inOpen[i] ) <= max( inClose[i-1], inOpen[i-1] ) && // 2nd is engulfed by 1st -/* Generated */ min( inClose[i], inOpen[i] ) >= min( inClose[i-1], inOpen[i-1] ) // (one end of real body can match; -/* Generated */ ) // engulfing guaranteed by "long" and "doji") -/* Generated */ outInteger[outIdx++] = -TA_CANDLECOLOR(i-1) * 80; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c b/src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c deleted file mode 100644 index aa9807bf0..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHIGHWAVE.c +++ /dev/null @@ -1,372 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 072404 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHignWaveLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHignWaveLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHIGHWAVE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowVeryLong) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHIGHWAVE - High-Wave Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHignWave( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHIGHWAVE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHIGHWAVE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowPeriodTotal = 0; - ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowTrailingIdx; - while( i < startIdx ) { - ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - short real body - * - very long upper and lower shadow - * The meaning of "short" and "very long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white or negative (-1 to -100) when black; - * it does not mean bullish or bearish - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) && - TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) - TA_CANDLERANGE( ShadowVeryLong, ShadowTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHignWave( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHignWave( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHIGHWAVE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHIGHWAVE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowPeriodTotal = 0; -/* Generated */ ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowPeriodTotal, i ) ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) - TA_CANDLERANGE( ShadowVeryLong, ShadowTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c b/src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c deleted file mode 100644 index 0f8a466b5..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHIKKAKE.c +++ /dev/null @@ -1,412 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120305 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHikkakeLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHikkakeLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHIKKAKE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return 5; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHIKKAKE - Hikkake Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHikkake( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHIKKAKE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int i, outIdx, lookbackTotal, patternIdx, patternResult; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHIKKAKE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - patternIdx = 0; - patternResult = 0; - - i = startIdx - 3; - while( i < startIdx ) { - /* copy here the pattern recognition code below */ - if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low - ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low - || - ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low - ) - ) { - patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); - patternIdx = i; - } else - /* search for confirmation if hikkake was no more than 3 bars ago */ - if( i <= patternIdx+3 && - ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd - || - ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd - ) - ) - patternIdx = 0; - i++; - } - - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first and second candle: inside bar (2nd has lower high and higher low than 1st) - * - third candle: lower high and lower low than 2nd (higher high and higher low than 2nd) - * outInteger[hikkakebar] is positive (1 to 100) or negative (-1 to -100) meaning bullish or bearish hikkake - * Confirmation could come in the next 3 days with: - * - a day that closes higher than the high (lower than the low) of the 2nd candle - * outInteger[confirmationbar] is equal to 100 + the bullish hikkake result or -100 - the bearish hikkake result - * Note: if confirmation and a new hikkake come at the same bar, only the new hikkake is reported (the new hikkake - * overwrites the confirmation of the old hikkake) - */ - outIdx = 0; - do - { - if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low - ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low - || - ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low - ) - ) { - patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); - patternIdx = i; - outInteger[outIdx++] = patternResult; - } else - /* search for confirmation if hikkake was no more than 3 bars ago */ - if( i <= patternIdx+3 && - ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd - || - ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd - ) - ) { - outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); - patternIdx = 0; - } else - outInteger[outIdx++] = 0; - i++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHikkake( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHikkake( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHIKKAKE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i, outIdx, lookbackTotal, patternIdx, patternResult; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHIKKAKE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ patternIdx = 0; -/* Generated */ patternResult = 0; -/* Generated */ i = startIdx - 3; -/* Generated */ while( i < startIdx ) { -/* Generated */ if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low -/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low -/* Generated */ || -/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low -/* Generated */ ) -/* Generated */ ) { -/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); -/* Generated */ patternIdx = i; -/* Generated */ } else -/* Generated */ if( i <= patternIdx+3 && -/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd -/* Generated */ || -/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd -/* Generated */ ) -/* Generated */ ) -/* Generated */ patternIdx = 0; -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 1st + 2nd: lower high and higher low -/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] ) // (bull) 3rd: lower high and lower low -/* Generated */ || -/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] ) // (bear) 3rd: higher high and higher low -/* Generated */ ) -/* Generated */ ) { -/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); -/* Generated */ patternIdx = i; -/* Generated */ outInteger[outIdx++] = patternResult; -/* Generated */ } else -/* Generated */ if( i <= patternIdx+3 && -/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 2nd -/* Generated */ || -/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 2nd -/* Generated */ ) -/* Generated */ ) { -/* Generated */ outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); -/* Generated */ patternIdx = 0; -/* Generated */ } else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ i++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c b/src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c deleted file mode 100644 index dbb552f5e..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHIKKAKEMOD.c +++ /dev/null @@ -1,470 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 122605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHikkakeModLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHikkakeModLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHIKKAKEMOD_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( 1, TA_CANDLEAVGPERIOD(Near) ) + 5; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHIKKAKEMOD - Modified Hikkake Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHikkakeMod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHIKKAKEMOD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double NearPeriodTotal; - int i, outIdx, NearTrailingIdx, lookbackTotal, patternIdx, patternResult; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHIKKAKEMOD)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - NearPeriodTotal = 0; - NearTrailingIdx = startIdx - 3 - TA_CANDLEAVGPERIOD(Near); - i = NearTrailingIdx; - while( i < startIdx - 3 ) { - NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ); - i++; - } - - patternIdx = 0; - patternResult = 0; - - i = startIdx - 3; - while( i < startIdx ) { - /* copy here the pattern recognition code below */ - if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st - inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd - ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low - inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) - // (bull) 2nd: close near the low - ) - || - ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low - inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) - // (bull) 2nd: close near the top - ) - ) - ) { - patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); - patternIdx = i; - } else - /* search for confirmation if modified hikkake was no more than 3 bars ago */ - if( i <= patternIdx+3 && - ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd - || - ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd - ) - ) - patternIdx = 0; - NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); - NearTrailingIdx++; - i++; - } - - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle - * - second candle: candle with range less than first candle and close near the bottom (near the top) - * - third candle: lower high and higher low than 2nd - * - fourth candle: lower high and lower low (higher high and higher low) than 3rd - * outInteger[hikkake bar] is positive (1 to 100) or negative (-1 to -100) meaning bullish or bearish hikkake - * Confirmation could come in the next 3 days with: - * - a day that closes higher than the high (lower than the low) of the 3rd candle - * outInteger[confirmationbar] is equal to 100 + the bullish hikkake result or -100 - the bearish hikkake result - * Note: if confirmation and a new hikkake come at the same bar, only the new hikkake is reported (the new hikkake - * overwrites the confirmation of the old hikkake); - * the user should consider that modified hikkake is a reversal pattern, while hikkake could be both a reversal - * or a continuation pattern, so bullish (bearish) modified hikkake is significant when appearing in a downtrend - * (uptrend) - */ - outIdx = 0; - do - { - if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st - inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd - ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low - inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) - // (bull) 2nd: close near the low - ) - || - ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low - inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) - // (bull) 2nd: close near the top - ) - ) - ) { - patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); - patternIdx = i; - outInteger[outIdx++] = patternResult; - } else - /* search for confirmation if modified hikkake was no more than 3 bars ago */ - if( i <= patternIdx+3 && - ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd - || - ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd - ) - ) { - outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); - patternIdx = 0; - } else - outInteger[outIdx++] = 0; - NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); - NearTrailingIdx++; - i++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHikkakeMod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHikkakeMod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHIKKAKEMOD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double NearPeriodTotal; -/* Generated */ int i, outIdx, NearTrailingIdx, lookbackTotal, patternIdx, patternResult; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHIKKAKEMOD)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ NearPeriodTotal = 0; -/* Generated */ NearTrailingIdx = startIdx - 3 - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx - 3 ) { -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ patternIdx = 0; -/* Generated */ patternResult = 0; -/* Generated */ i = startIdx - 3; -/* Generated */ while( i < startIdx ) { -/* Generated */ if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st -/* Generated */ inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd -/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low -/* Generated */ inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) -/* Generated */ // (bull) 2nd: close near the low -/* Generated */ ) -/* Generated */ || -/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low -/* Generated */ inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) -/* Generated */ // (bull) 2nd: close near the top -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) { -/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); -/* Generated */ patternIdx = i; -/* Generated */ } else -/* Generated */ if( i <= patternIdx+3 && -/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd -/* Generated */ || -/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd -/* Generated */ ) -/* Generated */ ) -/* Generated */ patternIdx = 0; -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); -/* Generated */ NearTrailingIdx++; -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( inHigh[i-2] < inHigh[i-3] && inLow[i-2] > inLow[i-3] && // 2nd: lower high and higher low than 1st -/* Generated */ inHigh[i-1] < inHigh[i-2] && inLow[i-1] > inLow[i-2] && // 3rd: lower high and higher low than 2nd -/* Generated */ ( ( inHigh[i] < inHigh[i-1] && inLow[i] < inLow[i-1] && // (bull) 4th: lower high and lower low -/* Generated */ inClose[i-2] <= inLow[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) -/* Generated */ // (bull) 2nd: close near the low -/* Generated */ ) -/* Generated */ || -/* Generated */ ( inHigh[i] > inHigh[i-1] && inLow[i] > inLow[i-1] && // (bear) 4th: higher high and higher low -/* Generated */ inClose[i-2] >= inHigh[i-2] - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-2 ) -/* Generated */ // (bull) 2nd: close near the top -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) { -/* Generated */ patternResult = 100 * ( inHigh[i] < inHigh[i-1] ? 1 : -1 ); -/* Generated */ patternIdx = i; -/* Generated */ outInteger[outIdx++] = patternResult; -/* Generated */ } else -/* Generated */ if( i <= patternIdx+3 && -/* Generated */ ( ( patternResult > 0 && inClose[i] > inHigh[patternIdx-1] ) // close higher than the high of 3rd -/* Generated */ || -/* Generated */ ( patternResult < 0 && inClose[i] < inLow[patternIdx-1] ) // close lower than the low of 3rd -/* Generated */ ) -/* Generated */ ) { -/* Generated */ outInteger[outIdx++] = patternResult + 100 * ( patternResult > 0 ? 1 : -1 ); -/* Generated */ patternIdx = 0; -/* Generated */ } else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-2 ) - TA_CANDLERANGE( Near, NearTrailingIdx-2 ); -/* Generated */ NearTrailingIdx++; -/* Generated */ i++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c b/src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c deleted file mode 100644 index 5b6f316e8..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLHOMINGPIGEON.c +++ /dev/null @@ -1,384 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 032005 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlHomingPigeonLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlHomingPigeonLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLHOMINGPIGEON_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLHOMINGPIGEON - Homing Pigeon - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHomingPigeon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLHOMINGPIGEON( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLHOMINGPIGEON)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle - * - second candle: short black real body completely inside the previous day's body - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100): homing pigeon is always bullish; - * the user should consider that homing pigeon is significant when it appears in a downtrend, - * while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -1 && // 1st black - TA_CANDLECOLOR(i) == -1 && // 2nd black - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st long - TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 2nd short - inOpen[i] < inOpen[i-1] && // 2nd engulfed by 1st - inClose[i] > inClose[i-1] - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlHomingPigeon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlHomingPigeon( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLHOMINGPIGEON( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLHOMINGPIGEON)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st black -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 2nd black -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // 1st long -/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 2nd short -/* Generated */ inOpen[i] < inOpen[i-1] && // 2nd engulfed by 1st -/* Generated */ inClose[i] > inClose[i-1] -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c b/src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c deleted file mode 100644 index be741a891..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLIDENTICAL3CROWS.c +++ /dev/null @@ -1,433 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 103104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlIdentical3CrowsLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlIdentical3CrowsLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLIDENTICAL3CROWS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(Equal) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLIDENTICAL3CROWS - Identical Three Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlIdentical3Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLIDENTICAL3CROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); - ARRAY_LOCAL(EqualPeriodTotal,3); - int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, EqualTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLIDENTICAL3CROWS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal[2] = 0; - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortPeriodTotal[0] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - EqualPeriodTotal[2] = 0; - EqualPeriodTotal[1] = 0; - EqualPeriodTotal[0] = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal[2] += TA_CANDLERANGE( Equal, i-2 ); - EqualPeriodTotal[1] += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three consecutive and declining black candlesticks - * - each candle must have no or very short lower shadow - * - each candle after the first must open at or very close to the prior candle's close - * The meaning of "very short" is specified with TA_SetCandleSettings; - * the meaning of "very close" is specified with TA_SetCandleSettings (Equal); - * outInteger is negative (-1 to -100): identical three crows is always bearish; - * the user should consider that identical 3 crows is significant when it appears after a mature advance or at high levels, - * while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == -1 && // 1st black - // very short lower shadow - TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && - TA_CANDLECOLOR(i-1) == -1 && // 2nd black - // very short lower shadow - TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - TA_CANDLECOLOR(i) == -1 && // 3rd black - // very short lower shadow - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - inClose[i-2] > inClose[i-1] && // three declining - inClose[i-1] > inClose[i] && - // 2nd black opens very close to 1st close - inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && - inOpen[i-1] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && - // 3rd black opens very close to 2nd close - inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) && - inOpen[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 2; totIdx >= 0; --totIdx) - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - for (totIdx = 2; totIdx >= 1; --totIdx) - EqualPeriodTotal[totIdx] += TA_CANDLERANGE( Equal, i-totIdx ) - - TA_CANDLERANGE( Equal, EqualTrailingIdx-totIdx ); - i++; - ShadowVeryShortTrailingIdx++; - EqualTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlIdentical3Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlIdentical3Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLIDENTICAL3CROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,3); -/* Generated */ ARRAY_LOCAL(EqualPeriodTotal,3); -/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, EqualTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLIDENTICAL3CROWS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal[2] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ EqualPeriodTotal[2] = 0; -/* Generated */ EqualPeriodTotal[1] = 0; -/* Generated */ EqualPeriodTotal[0] = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[2] += TA_CANDLERANGE( ShadowVeryShort, i-2 ); -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal[2] += TA_CANDLERANGE( Equal, i-2 ); -/* Generated */ EqualPeriodTotal[1] += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == -1 && // 1st black -/* Generated */ // very short lower shadow -/* Generated */ TA_LOWERSHADOW(i-2) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[2], i-2 ) && -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd black -/* Generated */ // very short lower shadow -/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd black -/* Generated */ // very short lower shadow -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ inClose[i-2] > inClose[i-1] && // three declining -/* Generated */ inClose[i-1] > inClose[i] && -/* Generated */ // 2nd black opens very close to 1st close -/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && -/* Generated */ inOpen[i-1] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[2], i-2 ) && -/* Generated */ // 3rd black opens very close to 2nd close -/* Generated */ inOpen[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) && -/* Generated */ inOpen[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal[1], i-1 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 2; totIdx >= 0; --totIdx) -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) -/* Generated */ EqualPeriodTotal[totIdx] += TA_CANDLERANGE( Equal, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Equal, EqualTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLINNECK.c b/src/ta-lib/src/ta_func/ta_CDLINNECK.c deleted file mode 100644 index a4f706e99..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLINNECK.c +++ /dev/null @@ -1,387 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlInNeckLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlInNeckLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLINNECK_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLINNECK - In-Neck Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlInNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLINNECK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double EqualPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLINNECK)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle - * - second candle: white candle with open below previous day low and close slightly into previous day body - * The meaning of "equal" is specified with TA_SetCandleSettings - * outInteger is negative (-1 to -100): in-neck is always bearish - * the user should consider that in-neck is significant when it appears in a downtrend, while this function - * does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long - TA_CANDLECOLOR(i) == 1 && // 2nd: white - inOpen[i] < inLow[i-1] && // open below prior low - inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close slightly into prior body - inClose[i] >= inClose[i-1] - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); - i++; - EqualTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlInNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlInNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLINNECK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double EqualPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLINNECK)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white -/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low -/* Generated */ inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close slightly into prior body -/* Generated */ inClose[i] >= inClose[i-1] -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c b/src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c deleted file mode 100644 index 176591460..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLINVERTEDHAMMER.c +++ /dev/null @@ -1,403 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 103004 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlInvertedHammerLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlInvertedHammerLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLINVERTEDHAMMER_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), - TA_CANDLEAVGPERIOD(ShadowVeryShort) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLINVERTEDHAMMER - Inverted Hammer - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlInvertedHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLINVERTEDHAMMER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLINVERTEDHAMMER)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - small real body - * - long upper shadow - * - no, or very short, lower shadow - * - gap down - * The meaning of "short", "very short" and "long" is specified with TA_SetCandleSettings; - * outInteger is positive (1 to 100): inverted hammer is always bullish; - * the user should consider that an inverted hammer must appear in a downtrend, while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow - TA_REALBODYGAPDOWN(i, i-1) ) // gap down - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlInvertedHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlInvertedHammer( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLINVERTEDHAMMER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLINVERTEDHAMMER)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow -/* Generated */ TA_REALBODYGAPDOWN(i, i-1) ) // gap down -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) -/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLKICKING.c b/src/ta-lib/src/ta_func/ta_CDLKICKING.c deleted file mode 100644 index 08330ddf8..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLKICKING.c +++ /dev/null @@ -1,420 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010705 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlKickingLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlKickingLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLKICKING_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyLong) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLKICKING - Kicking - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlKicking( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLKICKING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); - ARRAY_LOCAL(BodyLongPeriodTotal,2); - int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLKICKING)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortPeriodTotal[0] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - BodyLongPeriodTotal[1] = 0; - BodyLongPeriodTotal[0] = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); - BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: marubozu - * - second candle: opposite color marubozu - * - gap between the two candles: upside gap if black then white, downside gap if white then black - * The meaning of "long body" and "very short shadow" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles - // 1st marubozu - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && - TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - // 2nd marubozu - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - // gap - ( - ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) - || - ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 1; totIdx >= 0; --totIdx) { - BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - } - i++; - ShadowVeryShortTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlKicking( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlKicking( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLKICKING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); -/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); -/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLKICKING)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ BodyLongPeriodTotal[1] = 0; -/* Generated */ BodyLongPeriodTotal[0] = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles -/* Generated */ // 1st marubozu -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && -/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ // 2nd marubozu -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ // gap -/* Generated */ ( -/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) { -/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ } -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c b/src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c deleted file mode 100644 index b2aa9bc96..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLKICKINGBYLENGTH.c +++ /dev/null @@ -1,421 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlKickingByLengthLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlKickingByLengthLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLKICKINGBYLENGTH_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyLong) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLKICKINGBYLENGTH - Kicking - bull/bear determined by the longer marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlKickingByLength( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLKICKINGBYLENGTH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); - ARRAY_LOCAL(BodyLongPeriodTotal,2); - int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLKICKINGBYLENGTH)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal[1] = 0; - ShadowVeryShortPeriodTotal[0] = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - BodyLongPeriodTotal[1] = 0; - BodyLongPeriodTotal[0] = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); - BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: marubozu - * - second candle: opposite color marubozu - * - gap between the two candles: upside gap if black then white, downside gap if white then black - * The meaning of "long body" and "very short shadow" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; the longer of the two - * marubozu determines the bullishness or bearishness of this pattern - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles - // 1st marubozu - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && - TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && - // 2nd marubozu - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && - // gap - ( - ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) - || - ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR( ( TA_REALBODY(i) > TA_REALBODY(i-1) ? i : i-1 ) ) * 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 1; totIdx >= 0; --totIdx) { - BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); - ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); - } - i++; - ShadowVeryShortTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlKickingByLength( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlKickingByLength( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLKICKINGBYLENGTH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(ShadowVeryShortPeriodTotal,2); -/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); -/* Generated */ int i, outIdx, totIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLKICKINGBYLENGTH)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal[1] = 0; -/* Generated */ ShadowVeryShortPeriodTotal[0] = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ BodyLongPeriodTotal[1] = 0; -/* Generated */ BodyLongPeriodTotal[0] = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal[1] += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ ShadowVeryShortPeriodTotal[0] += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles -/* Generated */ // 1st marubozu -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && -/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ TA_LOWERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[1], i-1 ) && -/* Generated */ // 2nd marubozu -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal[0], i ) && -/* Generated */ // gap -/* Generated */ ( -/* Generated */ ( TA_CANDLECOLOR(i-1) == -1 && TA_CANDLEGAPUP(i,i-1) ) -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i-1) == 1 && TA_CANDLEGAPDOWN(i,i-1) ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR( ( TA_REALBODY(i) > TA_REALBODY(i-1) ? i : i-1 ) ) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) { -/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); -/* Generated */ ShadowVeryShortPeriodTotal[totIdx] += TA_CANDLERANGE( ShadowVeryShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-totIdx ); -/* Generated */ } -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c b/src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c deleted file mode 100644 index e623114f5..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLLADDERBOTTOM.c +++ /dev/null @@ -1,375 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 032005 AC Creation - * 041305 MF Minor modification for a compiler warning - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlLadderBottomLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlLadderBottomLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLLADDERBOTTOM_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(ShadowVeryShort) + 4; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLLADDERBOTTOM - Ladder Bottom - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlLadderBottom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLLADDERBOTTOM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double ShadowVeryShortPeriodTotal; - int i, outIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLLADDERBOTTOM)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three black candlesticks with consecutively lower opens and closes - * - fourth candle: black candle with an upper shadow (it's supposed to be not very short) - * - fifth candle: white candle that opens above prior candle's body and closes above prior candle's high - * The meaning of "very short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100): ladder bottom is always bullish; - * the user should consider that ladder bottom is significant when it appears in a downtrend, - * while this function does not consider it - */ - outIdx = 0; - do - { - if( - TA_CANDLECOLOR(i-4) == -1 && TA_CANDLECOLOR(i-3) == -1 && TA_CANDLECOLOR(i-2) == -1 && // 3 black candlesticks - inOpen[i-4] > inOpen[i-3] && inOpen[i-3] > inOpen[i-2] && // with consecutively lower opens - inClose[i-4] > inClose[i-3] && inClose[i-3] > inClose[i-2] && // and closes - TA_CANDLECOLOR(i-1) == -1 && // 4th: black with an upper shadow - TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && - TA_CANDLECOLOR(i) == 1 && // 5th: white - inOpen[i] > inOpen[i-1] && // that opens above prior candle's body - inClose[i] > inHigh[i-1] // and closes above prior candle's high - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); - i++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlLadderBottom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlLadderBottom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLLADDERBOTTOM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLLADDERBOTTOM)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( -/* Generated */ TA_CANDLECOLOR(i-4) == -1 && TA_CANDLECOLOR(i-3) == -1 && TA_CANDLECOLOR(i-2) == -1 && // 3 black candlesticks -/* Generated */ inOpen[i-4] > inOpen[i-3] && inOpen[i-3] > inOpen[i-2] && // with consecutively lower opens -/* Generated */ inClose[i-4] > inClose[i-3] && inClose[i-3] > inClose[i-2] && // and closes -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 4th: black with an upper shadow -/* Generated */ TA_UPPERSHADOW(i-1) > TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 5th: white -/* Generated */ inOpen[i] > inOpen[i-1] && // that opens above prior candle's body -/* Generated */ inClose[i] > inHigh[i-1] // and closes above prior candle's high -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c b/src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c deleted file mode 100644 index 11f856e2c..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLLONGLEGGEDDOJI.c +++ /dev/null @@ -1,378 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlLongLeggedDojiLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlLongLeggedDojiLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLLONGLEGGEDDOJI_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowLong) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLLONGLEGGEDDOJI - Long Legged Doji - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlLongLeggedDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLLONGLEGGEDDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, ShadowLongPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLLONGLEGGEDDOJI)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyDojiPeriodTotal = 0; - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * - * Must have: - * - doji body - * - one or two long shadows - * The meaning of "doji" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100) but this does not mean it is bullish: long legged doji shows uncertainty - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && - ( TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) - || - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) - ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); - i++; - BodyDojiTrailingIdx++; - ShadowLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlLongLeggedDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlLongLeggedDoji( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLLONGLEGGEDDOJI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, ShadowLongPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLLONGLEGGEDDOJI)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && -/* Generated */ ( TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) -/* Generated */ || -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLLONGLINE.c b/src/ta-lib/src/ta_func/ta_CDLLONGLINE.c deleted file mode 100644 index ea1a0c552..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLLONGLINE.c +++ /dev/null @@ -1,372 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 071704 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlLongLineLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlLongLineLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLLONGLINE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLLONGLINE - Long Line Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlLongLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLLONGLINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLLONGLINE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - ShadowPeriodTotal = 0; - ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = ShadowTrailingIdx; - while( i < startIdx ) { - ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - long real body - * - short upper and lower shadow - * The meaning of "long" and "short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) - */ - outIdx = 0; - - do - { - if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal, i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyTrailingIdx ); - ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlLongLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlLongLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLLONGLINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLLONGLINE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ ShadowPeriodTotal = 0; -/* Generated */ ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyTrailingIdx ); -/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c b/src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c deleted file mode 100644 index d733f90d3..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLMARUBOZU.c +++ /dev/null @@ -1,373 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlMarubozuLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlMarubozuLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLMARUBOZU_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(ShadowVeryShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLMARUBOZU - Marubozu - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLMARUBOZU( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLMARUBOZU)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - long real body - * - no or very short upper and lower shadow - * The meaning of "long" and "very short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white (bullish), negative (-1 to -100) when black (bearish) - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMarubozu( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLMARUBOZU( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyLongPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMARUBOZU)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c b/src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c deleted file mode 100644 index 39a6a1a93..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLMATCHINGLOW.c +++ /dev/null @@ -1,359 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 032605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlMatchingLowLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlMatchingLowLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLMATCHINGLOW_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(Equal) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLMATCHINGLOW - Matching Low - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMatchingLow( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLMATCHINGLOW( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double EqualPeriodTotal; - int i, outIdx, EqualTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLMATCHINGLOW)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: black candle - * - second candle: black candle with the close equal to the previous close - * The meaning of "equal" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100): matching low is always bullish; - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -1 && // first black - TA_CANDLECOLOR(i) == -1 && // second black - inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // 1st and 2nd same close - inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - i++; - EqualTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMatchingLow( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMatchingLow( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLMATCHINGLOW( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double EqualPeriodTotal; -/* Generated */ int i, outIdx, EqualTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMATCHINGLOW)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // first black -/* Generated */ TA_CANDLECOLOR(i) == -1 && // second black -/* Generated */ inClose[i] <= inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // 1st and 2nd same close -/* Generated */ inClose[i] >= inClose[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLMATHOLD.c b/src/ta-lib/src/ta_func/ta_CDLMATHOLD.c deleted file mode 100644 index a979fc28b..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLMATHOLD.c +++ /dev/null @@ -1,470 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 022005 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlMatHoldLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlMatHoldLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLMATHOLD_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 5.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 4; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLMATHOLD - Mat Hold - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMatHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLMATHOLD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(BodyPeriodTotal,5); - int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 5.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLMATHOLD)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal[4] = 0; - BodyPeriodTotal[3] = 0; - BodyPeriodTotal[2] = 0; - BodyPeriodTotal[1] = 0; - BodyPeriodTotal[0] = 0; - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); - BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); - BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white candle - * - upside gap between the first and the second bodies - * - second candle: small black candle - * - third and fourth candles: falling small real body candlesticks (commonly black) that hold within the long - * white candle's body and are higher than the reaction days of the rising three methods - * - fifth candle: white candle that opens above the previous small candle's close and closes higher than the - * high of the highest reaction day - * The meaning of "short" and "long" is specified with TA_SetCandleSettings; - * "hold within" means "a part of the real body must be within"; - * optInPenetration is the maximum percentage of the first white body the reaction days can penetrate (it is - * to specify how much the reaction days should be "higher than the reaction days of the rising three methods") - * outInteger is positive (1 to 100): mat hold is always bullish - */ - outIdx = 0; - do - { - if( // 1st long, then 3 small - TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && - TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && - TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && - TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && - // white, black, 2 black or white, white - TA_CANDLECOLOR(i-4) == 1 && - TA_CANDLECOLOR(i-3) == -1 && - TA_CANDLECOLOR(i) == 1 && - // upside gap 1st to 2nd - TA_REALBODYGAPUP(i-3,i-4) && - // 3rd to 4th hold within 1st: a part of the real body must be within 1st real body - min(inOpen[i-2], inClose[i-2]) < inClose[i-4] && - min(inOpen[i-1], inClose[i-1]) < inClose[i-4] && - // reaction days penetrate first body less than optInPenetration percent - min(inOpen[i-2], inClose[i-2]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && - min(inOpen[i-1], inClose[i-1]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && - // 2nd to 4th are falling - max(inClose[i-2], inOpen[i-2]) < inOpen[i-3] && - max(inClose[i-1], inOpen[i-1]) < max(inClose[i-2], inOpen[i-2]) && - // 5th opens above the prior close - inOpen[i] > inClose[i-1] && - // 5th closes above the highest high of the reaction days - inClose[i] > max(max(inHigh[i-3], inHigh[i-2]), inHigh[i-1]) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); - for (totIdx = 3; totIdx >= 1; --totIdx) - BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) - - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); - i++; - BodyShortTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMatHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMatHold( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLMATHOLD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(BodyPeriodTotal,5); -/* Generated */ int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 5.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMATHOLD)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal[4] = 0; -/* Generated */ BodyPeriodTotal[3] = 0; -/* Generated */ BodyPeriodTotal[2] = 0; -/* Generated */ BodyPeriodTotal[1] = 0; -/* Generated */ BodyPeriodTotal[0] = 0; -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); -/* Generated */ BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); -/* Generated */ BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( // 1st long, then 3 small -/* Generated */ TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && -/* Generated */ TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && -/* Generated */ TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && -/* Generated */ TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && -/* Generated */ // white, black, 2 black or white, white -/* Generated */ TA_CANDLECOLOR(i-4) == 1 && -/* Generated */ TA_CANDLECOLOR(i-3) == -1 && -/* Generated */ TA_CANDLECOLOR(i) == 1 && -/* Generated */ // upside gap 1st to 2nd -/* Generated */ TA_REALBODYGAPUP(i-3,i-4) && -/* Generated */ // 3rd to 4th hold within 1st: a part of the real body must be within 1st real body -/* Generated */ min(inOpen[i-2], inClose[i-2]) < inClose[i-4] && -/* Generated */ min(inOpen[i-1], inClose[i-1]) < inClose[i-4] && -/* Generated */ // reaction days penetrate first body less than optInPenetration percent -/* Generated */ min(inOpen[i-2], inClose[i-2]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && -/* Generated */ min(inOpen[i-1], inClose[i-1]) > inClose[i-4] - TA_REALBODY(i-4) * optInPenetration && -/* Generated */ // 2nd to 4th are falling -/* Generated */ max(inClose[i-2], inOpen[i-2]) < inOpen[i-3] && -/* Generated */ max(inClose[i-1], inOpen[i-1]) < max(inClose[i-2], inOpen[i-2]) && -/* Generated */ // 5th opens above the prior close -/* Generated */ inOpen[i] > inClose[i-1] && -/* Generated */ // 5th closes above the highest high of the reaction days -/* Generated */ inClose[i] > max(max(inHigh[i-3], inHigh[i-2]), inHigh[i-1]) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); -/* Generated */ for (totIdx = 3; totIdx >= 1; --totIdx) -/* Generated */ BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c b/src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c deleted file mode 100644 index f08d7021d..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLMORNINGDOJISTAR.c +++ /dev/null @@ -1,439 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 100304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlMorningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlMorningDojiStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLMORNINGDOJISTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(BodyLong) ), - TA_CANDLEAVGPERIOD(BodyShort) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLMORNINGDOJISTAR - Morning Doji Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMorningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLMORNINGDOJISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLMORNINGDOJISTAR)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyDojiPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyDojiTrailingIdx; - while( i < startIdx-1 ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black real body - * - second candle: doji gapping down - * - third candle: white real body that moves well within the first candle's real body - * The meaning of "doji" and "long" is specified with TA_SetCandleSettings - * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should - * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want - * it to be relatively long - * outInteger is positive (1 to 100): morning doji star is always bullish; - * the user should consider that a morning star is significant when it appears in a downtrend, - * while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_CANDLECOLOR(i-2) == -1 && // black - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji - TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short - TA_CANDLECOLOR(i) == 1 && // white real body - inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyDojiTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMorningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMorningDojiStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLMORNINGDOJISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMORNINGDOJISTAR)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyDojiTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // black -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i-1 ) && // 2nd: doji -/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: longer than short -/* Generated */ TA_CANDLECOLOR(i) == 1 && // white real body -/* Generated */ inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i-1 ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c b/src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c deleted file mode 100644 index 1af6db709..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLMORNINGSTAR.c +++ /dev/null @@ -1,425 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 100304 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlMorningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlMorningStarLookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLMORNINGSTAR_Lookback( double optInPenetration ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInPenetration); - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLMORNINGSTAR - Morning Star - * - * Input = Open, High, Low, Close - * Output = int - * - * Optional Parameters - * ------------------- - * optInPenetration:(From 0 to TA_REAL_MAX) - * Percentage of penetration of a candle within another candle - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMorningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLMORNINGSTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) ||/* Generated */ (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLMORNINGSTAR)(optInPenetration); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyShortPeriodTotal2 = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx-1 ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black real body - * - second candle: star (Short real body gapping down) - * - third candle: white real body that moves well within the first candle's real body - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * The meaning of "moves well within" is specified with optInPenetration and "moves" should mean the real body should - * not be short ("short" is specified with TA_SetCandleSettings) - Greg Morris wants it to be long, someone else want - * it to be relatively long - * outInteger is positive (1 to 100): morning star is always bullish; - * the user should consider that a morning star is significant when it appears in a downtrend, - * while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_CANDLECOLOR(i-2) == -1 && // black - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short - TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short - TA_CANDLECOLOR(i) == 1 && // black real body - inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlMorningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlMorningStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLMORNINGSTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ double optInPenetration, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal, BodyShortPeriodTotal2; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInPenetration == TA_REAL_DEFAULT ) -/* Generated */ optInPenetration = 3.000000e-1; -/* Generated */ else if( (optInPenetration < 0.000000e+0) || (optInPenetration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLMORNINGSTAR)(optInPenetration); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal2 = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i+1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // black -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // 2nd: short -/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // gapping down -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal2, i ) && // 3rd: longer than short -/* Generated */ TA_CANDLECOLOR(i) == 1 && // black real body -/* Generated */ inClose[i] > inClose[i-2] + TA_REALBODY(i-2) * optInPenetration // closing well within 1st rb -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ BodyShortPeriodTotal2 += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx+1 ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLONNECK.c b/src/ta-lib/src/ta_func/ta_CDLONNECK.c deleted file mode 100644 index 13c350d53..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLONNECK.c +++ /dev/null @@ -1,386 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlOnNeckLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlOnNeckLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLONNECK_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLONNECK - On-Neck Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlOnNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLONNECK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double EqualPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLONNECK)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle - * - second candle: white candle with open below previous day low and close equal to previous day low - * The meaning of "equal" is specified with TA_SetCandleSettings - * outInteger is negative (-1 to -100): on-neck is always bearish - * the user should consider that on-neck is significant when it appears in a downtrend, while this function - * does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long - TA_CANDLECOLOR(i) == 1 && // 2nd: white - inOpen[i] < inLow[i-1] && // open below prior low - inClose[i] <= inLow[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close equal to prior low - inClose[i] >= inLow[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); - i++; - EqualTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlOnNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlOnNeck( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLONNECK( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double EqualPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLONNECK)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white -/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low -/* Generated */ inClose[i] <= inLow[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close equal to prior low -/* Generated */ inClose[i] >= inLow[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLPIERCING.c b/src/ta-lib/src/ta_func/ta_CDLPIERCING.c deleted file mode 100644 index 03aeb486e..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLPIERCING.c +++ /dev/null @@ -1,377 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120904 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlPiercingLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlPiercingLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLPIERCING_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(BodyLong) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLPIERCING - Piercing Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlPiercing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLPIERCING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(BodyLongPeriodTotal,2); - int i, outIdx, totIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLPIERCING)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal[1] = 0; - BodyLongPeriodTotal[0] = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); - BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle - * - second candle: long white candle with open below previous day low and close at least at 50% of previous day - * real body - * The meaning of "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100): piercing pattern is always bullish - * the user should consider that a piercing pattern is significant when it appears in a downtrend, while - * this function does not consider it - */ - outIdx = 0; - - do - { - if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // long - TA_CANDLECOLOR(i) == 1 && // 2nd: white - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // long - inOpen[i] < inLow[i-1] && // open below prior low - inClose[i] < inOpen[i-1] && // close within prior body - inClose[i] > inClose[i-1] + TA_REALBODY(i-1) * 0.5 // above midpoint - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 1; totIdx >= 0; --totIdx) - BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); - i++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlPiercing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlPiercing( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLPIERCING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,2); -/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLPIERCING)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal[1] = 0; -/* Generated */ BodyLongPeriodTotal[0] = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ BodyLongPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // long -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[0], i ) && // long -/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low -/* Generated */ inClose[i] < inOpen[i-1] && // close within prior body -/* Generated */ inClose[i] > inClose[i-1] + TA_REALBODY(i-1) * 0.5 // above midpoint -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 1; totIdx >= 0; --totIdx) -/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c b/src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c deleted file mode 100644 index 5d6a0a004..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLRICKSHAWMAN.c +++ /dev/null @@ -1,411 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlRickshawManLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlRickshawManLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLRICKSHAWMAN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowLong) ), - TA_CANDLEAVGPERIOD(Near) - ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLRICKSHAWMAN - Rickshaw Man - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlRickshawMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLRICKSHAWMAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, ShadowLongPeriodTotal, NearPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLRICKSHAWMAN)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyDojiPeriodTotal = 0; - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - NearPeriodTotal = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal += TA_CANDLERANGE( Near, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * - * Must have: - * - doji body - * - two long shadows - * - body near the midpoint of the high-low range - * The meaning of "doji" and "near" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100) but this does not mean it is bullish: rickshaw man shows uncertainty - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // doji - TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow - ( // body near midpoint - min( inOpen[i], inClose[i] ) - <= inLow[i] + TA_HIGHLOWRANGE(i) / 2 + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) - && - max( inOpen[i], inClose[i] ) - >= inLow[i] + TA_HIGHLOWRANGE(i) / 2 - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) - ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); - NearPeriodTotal += TA_CANDLERANGE( Near, i ) - TA_CANDLERANGE( Near, NearTrailingIdx ); - - i++; - BodyDojiTrailingIdx++; - ShadowLongTrailingIdx++; - NearTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlRickshawMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlRickshawMan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLRICKSHAWMAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, ShadowLongPeriodTotal, NearPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowLongTrailingIdx, NearTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLRICKSHAWMAN)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ NearPeriodTotal = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && // doji -/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long shadow -/* Generated */ ( // body near midpoint -/* Generated */ min( inOpen[i], inClose[i] ) -/* Generated */ <= inLow[i] + TA_HIGHLOWRANGE(i) / 2 + TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) -/* Generated */ && -/* Generated */ max( inOpen[i], inClose[i] ) -/* Generated */ >= inLow[i] + TA_HIGHLOWRANGE(i) / 2 - TA_CANDLEAVERAGE( Near, NearPeriodTotal, i ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i ) - TA_CANDLERANGE( Near, NearTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ NearTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c b/src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c deleted file mode 100644 index da82e4b40..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLRISEFALL3METHODS.c +++ /dev/null @@ -1,437 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 020605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlRiseFall3MethodsLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlRiseFall3MethodsLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLRISEFALL3METHODS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 4; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLRISEFALL3METHODS - Rising/Falling Three Methods - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlRiseFall3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLRISEFALL3METHODS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(BodyPeriodTotal,5); - int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLRISEFALL3METHODS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal[4] = 0; - BodyPeriodTotal[3] = 0; - BodyPeriodTotal[2] = 0; - BodyPeriodTotal[1] = 0; - BodyPeriodTotal[0] = 0; - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); - BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); - BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); - BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long white (black) candlestick - * - then: group of falling (rising) small real body candlesticks (commonly black (white)) that hold within - * the prior long candle's range: ideally they should be three but two or more than three are ok too - * - final candle: long white (black) candle that opens above (below) the previous small candle's close - * and closes above (below) the first long candle's close - * The meaning of "short" and "long" is specified with TA_SetCandleSettings; here only patterns with 3 small candles - * are considered; - * outInteger is positive (1 to 100) or negative (-1 to -100) - */ - outIdx = 0; - - do - { - if( // 1st long, then 3 small, 5th long - TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && - TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && - TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && - TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[0], i ) && - // white, 3 black, white || black, 3 white, black - TA_CANDLECOLOR(i-4) == -TA_CANDLECOLOR(i-3) && - TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && - TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && - TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && - // 2nd to 4th hold within 1st: a part of the real body must be within 1st range - min(inOpen[i-3], inClose[i-3]) < inHigh[i-4] && max(inOpen[i-3], inClose[i-3]) > inLow[i-4] && - min(inOpen[i-2], inClose[i-2]) < inHigh[i-4] && max(inOpen[i-2], inClose[i-2]) > inLow[i-4] && - min(inOpen[i-1], inClose[i-1]) < inHigh[i-4] && max(inOpen[i-1], inClose[i-1]) > inLow[i-4] && - // 2nd to 4th are falling (rising) - inClose[i-2] * TA_CANDLECOLOR(i-4) < inClose[i-3] * TA_CANDLECOLOR(i-4) && - inClose[i-1] * TA_CANDLECOLOR(i-4) < inClose[i-2] * TA_CANDLECOLOR(i-4) && - // 5th opens above (below) the prior close - inOpen[i] * TA_CANDLECOLOR(i-4) > inClose[i-1] * TA_CANDLECOLOR(i-4) && - // 5th closes above (below) the 1st close - inClose[i] * TA_CANDLECOLOR(i-4) > inClose[i-4] * TA_CANDLECOLOR(i-4) - ) - outInteger[outIdx++] = 100 * TA_CANDLECOLOR(i-4); - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); - for (totIdx = 3; totIdx >= 1; --totIdx) - BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) - - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); - BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - - i++; - BodyShortTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlRiseFall3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlRiseFall3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLRISEFALL3METHODS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(BodyPeriodTotal,5); -/* Generated */ int i, outIdx, totIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLRISEFALL3METHODS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal[4] = 0; -/* Generated */ BodyPeriodTotal[3] = 0; -/* Generated */ BodyPeriodTotal[2] = 0; -/* Generated */ BodyPeriodTotal[1] = 0; -/* Generated */ BodyPeriodTotal[0] = 0; -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal[3] += TA_CANDLERANGE( BodyShort, i-3 ); -/* Generated */ BodyPeriodTotal[2] += TA_CANDLERANGE( BodyShort, i-2 ); -/* Generated */ BodyPeriodTotal[1] += TA_CANDLERANGE( BodyShort, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ); -/* Generated */ BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( // 1st long, then 3 small, 5th long -/* Generated */ TA_REALBODY(i-4) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[4], i-4 ) && -/* Generated */ TA_REALBODY(i-3) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[3], i-3 ) && -/* Generated */ TA_REALBODY(i-2) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[2], i-2 ) && -/* Generated */ TA_REALBODY(i-1) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal[1], i-1 ) && -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyPeriodTotal[0], i ) && -/* Generated */ // white, 3 black, white || black, 3 white, black -/* Generated */ TA_CANDLECOLOR(i-4) == -TA_CANDLECOLOR(i-3) && -/* Generated */ TA_CANDLECOLOR(i-3) == TA_CANDLECOLOR(i-2) && -/* Generated */ TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && -/* Generated */ TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && -/* Generated */ // 2nd to 4th hold within 1st: a part of the real body must be within 1st range -/* Generated */ min(inOpen[i-3], inClose[i-3]) < inHigh[i-4] && max(inOpen[i-3], inClose[i-3]) > inLow[i-4] && -/* Generated */ min(inOpen[i-2], inClose[i-2]) < inHigh[i-4] && max(inOpen[i-2], inClose[i-2]) > inLow[i-4] && -/* Generated */ min(inOpen[i-1], inClose[i-1]) < inHigh[i-4] && max(inOpen[i-1], inClose[i-1]) > inLow[i-4] && -/* Generated */ // 2nd to 4th are falling (rising) -/* Generated */ inClose[i-2] * TA_CANDLECOLOR(i-4) < inClose[i-3] * TA_CANDLECOLOR(i-4) && -/* Generated */ inClose[i-1] * TA_CANDLECOLOR(i-4) < inClose[i-2] * TA_CANDLECOLOR(i-4) && -/* Generated */ // 5th opens above (below) the prior close -/* Generated */ inOpen[i] * TA_CANDLECOLOR(i-4) > inClose[i-1] * TA_CANDLECOLOR(i-4) && -/* Generated */ // 5th closes above (below) the 1st close -/* Generated */ inClose[i] * TA_CANDLECOLOR(i-4) > inClose[i-4] * TA_CANDLECOLOR(i-4) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100 * TA_CANDLECOLOR(i-4); -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal[4] += TA_CANDLERANGE( BodyLong, i-4 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-4 ); -/* Generated */ for (totIdx = 3; totIdx >= 1; --totIdx) -/* Generated */ BodyPeriodTotal[totIdx] += TA_CANDLERANGE( BodyShort, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx-totIdx ); -/* Generated */ BodyPeriodTotal[0] += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c b/src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c deleted file mode 100644 index 46bb3274e..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLSEPARATINGLINES.c +++ /dev/null @@ -1,419 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlSeperatingLinesLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlSeperatingLinesLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLSEPARATINGLINES_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(BodyLong) ), - TA_CANDLEAVGPERIOD(Equal) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLSEPARATINGLINES - Separating Lines - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlSeperatingLines( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLSEPARATINGLINES( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double ShadowVeryShortPeriodTotal, BodyLongPeriodTotal, EqualPeriodTotal; - int i, outIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, EqualTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLSEPARATINGLINES)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: black (white) candle - * - second candle: bullish (bearish) belt hold with the same open as the prior candle - * The meaning of "long body" and "very short shadow" of the belt hold is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that separating lines is significant when coming in a trend and the belt hold has - * the same direction of the trend, while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles - inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open - inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && - TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // belt hold: long body - ( - ( TA_CANDLECOLOR(i) == 1 && // with no lower shadow if bullish - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) - || - ( TA_CANDLECOLOR(i) == -1 && // with no upper shadow if bearish - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) - ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - i++; - ShadowVeryShortTrailingIdx++; - BodyLongTrailingIdx++; - EqualTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlSeperatingLines( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlSeperatingLines( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLSEPARATINGLINES( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double ShadowVeryShortPeriodTotal, BodyLongPeriodTotal, EqualPeriodTotal; -/* Generated */ int i, outIdx, ShadowVeryShortTrailingIdx, BodyLongTrailingIdx, EqualTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSEPARATINGLINES)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // opposite candles -/* Generated */ inOpen[i] <= inOpen[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // same open -/* Generated */ inOpen[i] >= inOpen[i-1] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && -/* Generated */ TA_REALBODY(i) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i ) && // belt hold: long body -/* Generated */ ( -/* Generated */ ( TA_CANDLECOLOR(i) == 1 && // with no lower shadow if bullish -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) -/* Generated */ || -/* Generated */ ( TA_CANDLECOLOR(i) == -1 && // with no upper shadow if bearish -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c b/src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c deleted file mode 100644 index ec4aad160..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLSHOOTINGSTAR.c +++ /dev/null @@ -1,403 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 103004 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlShootingStarLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlShootingStarLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLSHOOTINGSTAR_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowLong) ), - TA_CANDLEAVGPERIOD(ShadowVeryShort) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLSHOOTINGSTAR - Shooting Star - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlShootingStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLSHOOTINGSTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLSHOOTINGSTAR)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowLongPeriodTotal = 0; - ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowLongTrailingIdx; - while( i < startIdx ) { - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - small real body - * - long upper shadow - * - no, or very short, lower shadow - * - gap up from prior real body - * The meaning of "short", "very short" and "long" is specified with TA_SetCandleSettings; - * outInteger is negative (-1 to -100): shooting star is always bearish; - * the user should consider that a shooting star must appear in an uptrend, while this function does not consider it - */ - outIdx = 0; - - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb - TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow - TA_REALBODYGAPUP(i, i-1) ) // gap up - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) - - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowLongTrailingIdx++; - ShadowVeryShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlShootingStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlShootingStar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLSHOOTINGSTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowLongPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowLongTrailingIdx, ShadowVeryShortTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSHOOTINGSTAR)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowLongPeriodTotal = 0; -/* Generated */ ShadowLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowLong); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && // small rb -/* Generated */ TA_UPPERSHADOW(i) > TA_CANDLEAVERAGE( ShadowLong, ShadowLongPeriodTotal, i ) && // long upper shadow -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && // very short lower shadow -/* Generated */ TA_REALBODYGAPUP(i, i-1) ) // gap up -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) -/* Generated */ - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ ShadowLongPeriodTotal += TA_CANDLERANGE( ShadowLong, i ) -/* Generated */ - TA_CANDLERANGE( ShadowLong, ShadowLongTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowLongTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c b/src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c deleted file mode 100644 index 99b8e66a5..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLSHORTLINE.c +++ /dev/null @@ -1,372 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 072404 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlShortLineLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlShortLineLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLSHORTLINE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(ShadowShort) ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLSHORTLINE - Short Line Candle - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlShortLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLSHORTLINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal, ShadowPeriodTotal; - int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLSHORTLINE)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowPeriodTotal = 0; - ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowTrailingIdx; - while( i < startIdx ) { - ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - short real body - * - short upper and lower shadow - * The meaning of "short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white, negative (-1 to -100) when black; - * it does not mean bullish or bearish - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && - TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); - i++; - BodyTrailingIdx++; - ShadowTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlShortLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlShortLine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLSHORTLINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal, ShadowPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, ShadowTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSHORTLINE)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowPeriodTotal = 0; -/* Generated */ ShadowTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowShort); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) < TA_CANDLEAVERAGE( ShadowShort, ShadowPeriodTotal, i ) ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ ShadowPeriodTotal += TA_CANDLERANGE( ShadowShort, i ) - TA_CANDLERANGE( ShadowShort, ShadowTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ ShadowTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c b/src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c deleted file mode 100644 index 7c134b57d..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLSPINNINGTOP.c +++ /dev/null @@ -1,356 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 071804 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlSpinningTopLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlSpinningTopLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLSPINNINGTOP_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(BodyShort); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLSPINNINGTOP - Spinning Top - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlSpinningTop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLSPINNINGTOP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal; - int i, outIdx, BodyTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLSPINNINGTOP)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyTrailingIdx; - while( i < startIdx ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - small real body - * - shadows longer than the real body - * The meaning of "short" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when white or negative (-1 to -100) when black; - * it does not mean bullish or bearish - */ - outIdx = 0; - do - { - if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && - TA_UPPERSHADOW(i) > TA_REALBODY(i) && - TA_LOWERSHADOW(i) > TA_REALBODY(i) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); - i++; - BodyTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlSpinningTop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlSpinningTop( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLSPINNINGTOP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSPINNINGTOP)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) > TA_REALBODY(i) && -/* Generated */ TA_LOWERSHADOW(i) > TA_REALBODY(i) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c b/src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c deleted file mode 100644 index dd560402a..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLSTALLEDPATTERN.c +++ /dev/null @@ -1,469 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120804 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlStalledPatternLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlStalledPatternLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLSTALLEDPATTERN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(BodyLong), TA_CANDLEAVGPERIOD(BodyShort) ), - max( TA_CANDLEAVGPERIOD(ShadowVeryShort), TA_CANDLEAVGPERIOD(Near) ) - ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLSTALLEDPATTERN - Stalled Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlStalledPattern( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLSTALLEDPATTERN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_LOCAL(BodyLongPeriodTotal,3); - ARRAY_LOCAL(NearPeriodTotal,3); - double BodyShortPeriodTotal, ShadowVeryShortPeriodTotal; - int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, - lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLSTALLEDPATTERN)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal[2] = 0; - BodyLongPeriodTotal[1] = 0; - BodyLongPeriodTotal[0] = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortPeriodTotal = 0; - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - NearPeriodTotal[2] = 0; - NearPeriodTotal[1] = 0; - NearPeriodTotal[0] = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal[2] += TA_CANDLERANGE( BodyLong, i-2 ); - BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); - i++; - } - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); - NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - three white candlesticks with consecutively higher closes - * - first candle: long white - * - second candle: long white with no or very short upper shadow opening within or near the previous white real body - * and closing higher than the prior candle - * - third candle: small white that gaps away or "rides on the shoulder" of the prior long real body (= it's at - * the upper end of the prior real body) - * The meanings of "long", "very short", "short", "near" are specified with TA_SetCandleSettings; - * outInteger is negative (-1 to -100): stalled pattern is always bearish; - * the user should consider that stalled pattern is significant when it appears in uptrend, while this function - * does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == 1 && // 1st white - TA_CANDLECOLOR(i-1) == 1 && // 2nd white - TA_CANDLECOLOR(i) == 1 && // 3rd white - inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes - TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[2], i-2 ) && // 1st: long real body - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 2nd: long real body - // very short upper shadow - TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && - // opens within/near 1st real body - inOpen[i-1] > inOpen[i-2] && - inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && - TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: small real body - // rides on the shoulder of 2nd real body - inOpen[i] >= inClose[i-1] - TA_REALBODY(i) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - for (totIdx = 2; totIdx >= 1; --totIdx) { - BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); - NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) - - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); - } - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - ShadowVeryShortTrailingIdx++; - NearTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlStalledPattern( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlStalledPattern( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLSTALLEDPATTERN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_LOCAL(BodyLongPeriodTotal,3); -/* Generated */ ARRAY_LOCAL(NearPeriodTotal,3); -/* Generated */ double BodyShortPeriodTotal, ShadowVeryShortPeriodTotal; -/* Generated */ int i, outIdx, totIdx, BodyLongTrailingIdx, BodyShortTrailingIdx, ShadowVeryShortTrailingIdx, NearTrailingIdx, -/* Generated */ lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSTALLEDPATTERN)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal[2] = 0; -/* Generated */ BodyLongPeriodTotal[1] = 0; -/* Generated */ BodyLongPeriodTotal[0] = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ NearPeriodTotal[2] = 0; -/* Generated */ NearPeriodTotal[1] = 0; -/* Generated */ NearPeriodTotal[0] = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal[2] += TA_CANDLERANGE( BodyLong, i-2 ); -/* Generated */ BodyLongPeriodTotal[1] += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal[2] += TA_CANDLERANGE( Near, i-2 ); -/* Generated */ NearPeriodTotal[1] += TA_CANDLERANGE( Near, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st white -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 2nd white -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 3rd white -/* Generated */ inClose[i] > inClose[i-1] && inClose[i-1] > inClose[i-2] && // consecutive higher closes -/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[2], i-2 ) && // 1st: long real body -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal[1], i-1 ) && // 2nd: long real body -/* Generated */ // very short upper shadow -/* Generated */ TA_UPPERSHADOW(i-1) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i-1 ) && -/* Generated */ // opens within/near 1st real body -/* Generated */ inOpen[i-1] > inOpen[i-2] && -/* Generated */ inOpen[i-1] <= inClose[i-2] + TA_CANDLEAVERAGE( Near, NearPeriodTotal[2], i-2 ) && -/* Generated */ TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: small real body -/* Generated */ // rides on the shoulder of 2nd real body -/* Generated */ inOpen[i] >= inClose[i-1] - TA_REALBODY(i) - TA_CANDLEAVERAGE( Near, NearPeriodTotal[1], i-1 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ for (totIdx = 2; totIdx >= 1; --totIdx) { -/* Generated */ BodyLongPeriodTotal[totIdx] += TA_CANDLERANGE( BodyLong, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-totIdx ); -/* Generated */ NearPeriodTotal[totIdx] += TA_CANDLERANGE( Near, i-totIdx ) -/* Generated */ - TA_CANDLERANGE( Near, NearTrailingIdx-totIdx ); -/* Generated */ } -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i-1 ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ NearTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c b/src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c deleted file mode 100644 index d397dfd7f..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLSTICKSANDWICH.c +++ /dev/null @@ -1,365 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 032005 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlStickSandwichLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlStickSandwichLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLSTICKSANDWICH_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(Equal) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLSTICKSANDWICH - Stick Sandwich - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlStickSandwich( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLSTICKSANDWICH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double EqualPeriodTotal; - int i, outIdx, EqualTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLSTICKSANDWICH)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: black candle - * - second candle: white candle that trades only above the prior close (low > prior close) - * - third candle: black candle with the close equal to the first candle's close - * The meaning of "equal" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100): stick sandwich is always bullish; - * the user should consider that stick sandwich is significant when coming in a downtrend, - * while this function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == -1 && // first black - TA_CANDLECOLOR(i-1) == 1 && // second white - TA_CANDLECOLOR(i) == -1 && // third black - inLow[i-1] > inClose[i-2] && // 2nd low > prior close - inClose[i] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) && // 1st and 3rd same close - inClose[i] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-2 ); - i++; - EqualTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlStickSandwich( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlStickSandwich( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLSTICKSANDWICH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double EqualPeriodTotal; -/* Generated */ int i, outIdx, EqualTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLSTICKSANDWICH)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == -1 && // first black -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // second white -/* Generated */ TA_CANDLECOLOR(i) == -1 && // third black -/* Generated */ inLow[i-1] > inClose[i-2] && // 2nd low > prior close -/* Generated */ inClose[i] <= inClose[i-2] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) && // 1st and 3rd same close -/* Generated */ inClose[i] >= inClose[i-2] - TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-2 ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-2 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-2 ); -/* Generated */ i++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ diff --git a/src/ta-lib/src/ta_func/ta_CDLTAKURI.c b/src/ta-lib/src/ta_func/ta_CDLTAKURI.c deleted file mode 100644 index c6cd6ba2d..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLTAKURI.c +++ /dev/null @@ -1,401 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011505 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlTakuriLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlTakuriLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLTAKURI_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( max( TA_CANDLEAVGPERIOD(BodyDoji), TA_CANDLEAVGPERIOD(ShadowVeryShort) ), - TA_CANDLEAVGPERIOD(ShadowVeryLong) - ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLTAKURI - Takuri (Dragonfly Doji with very long lower shadow) - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlTakuri( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLTAKURI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal, ShadowVeryLongPeriodTotal; - int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, ShadowVeryLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLTAKURI)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyDojiPeriodTotal = 0; - BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); - ShadowVeryShortPeriodTotal = 0; - ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); - ShadowVeryLongPeriodTotal = 0; - ShadowVeryLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); - - i = BodyDojiTrailingIdx; - while( i < startIdx ) { - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - i = ShadowVeryShortTrailingIdx; - while( i < startIdx ) { - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); - i++; - } - i = ShadowVeryLongTrailingIdx; - while( i < startIdx ) { - ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * - * Must have: - * - doji body - * - open and close at the high of the day = no or very short upper shadow - * - very long lower shadow - * The meaning of "doji", "very short" and "very long" is specified with TA_SetCandleSettings - * outInteger is always positive (1 to 100) but this does not mean it is bullish: takuri must be considered - * relatively to the trend - */ - outIdx = 0; - - do - { - if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && - TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && - TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowVeryLongPeriodTotal, i ) - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); - ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) - - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); - ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) - - TA_CANDLERANGE( ShadowVeryLong, ShadowVeryLongTrailingIdx ); - i++; - BodyDojiTrailingIdx++; - ShadowVeryShortTrailingIdx++; - ShadowVeryLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlTakuri( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlTakuri( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLTAKURI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyDojiPeriodTotal, ShadowVeryShortPeriodTotal, ShadowVeryLongPeriodTotal; -/* Generated */ int i, outIdx, BodyDojiTrailingIdx, ShadowVeryShortTrailingIdx, ShadowVeryLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTAKURI)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyDojiPeriodTotal = 0; -/* Generated */ BodyDojiTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ ShadowVeryShortPeriodTotal = 0; -/* Generated */ ShadowVeryShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryShort); -/* Generated */ ShadowVeryLongPeriodTotal = 0; -/* Generated */ ShadowVeryLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(ShadowVeryLong); -/* Generated */ i = BodyDojiTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = ShadowVeryLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyDojiPeriodTotal, i ) && -/* Generated */ TA_UPPERSHADOW(i) < TA_CANDLEAVERAGE( ShadowVeryShort, ShadowVeryShortPeriodTotal, i ) && -/* Generated */ TA_LOWERSHADOW(i) > TA_CANDLEAVERAGE( ShadowVeryLong, ShadowVeryLongPeriodTotal, i ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyDojiPeriodTotal += TA_CANDLERANGE( BodyDoji, i ) - TA_CANDLERANGE( BodyDoji, BodyDojiTrailingIdx ); -/* Generated */ ShadowVeryShortPeriodTotal += TA_CANDLERANGE( ShadowVeryShort, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryShort, ShadowVeryShortTrailingIdx ); -/* Generated */ ShadowVeryLongPeriodTotal += TA_CANDLERANGE( ShadowVeryLong, i ) -/* Generated */ - TA_CANDLERANGE( ShadowVeryLong, ShadowVeryLongTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyDojiTrailingIdx++; -/* Generated */ ShadowVeryShortTrailingIdx++; -/* Generated */ ShadowVeryLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c b/src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c deleted file mode 100644 index 9b9a9f1c2..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLTASUKIGAP.c +++ /dev/null @@ -1,398 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlTasukiGapLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlTasukiGapLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLTASUKIGAP_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(Near) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLTASUKIGAP - Tasuki Gap - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlTasukiGap( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLTASUKIGAP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double NearPeriodTotal; - int i, outIdx, NearTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLTASUKIGAP)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - NearPeriodTotal = 0; - NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); - - i = NearTrailingIdx; - while( i < startIdx ) { - NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - upside (downside) gap - * - first candle after the window: white (black) candlestick - * - second candle: black (white) candlestick that opens within the previous real body and closes under (above) - * the previous real body inside the gap - * - the size of two real bodies should be near the same - * The meaning of "near" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that tasuki gap is significant when it appears in a trend, while this function does - * not consider it - */ - outIdx = 0; - do - { - if( - ( - TA_REALBODYGAPUP(i-1,i-2) && // upside gap - TA_CANDLECOLOR(i-1) == 1 && // 1st: white - TA_CANDLECOLOR(i) == -1 && // 2nd: black - inOpen[i] < inClose[i-1] && inOpen[i] > inOpen[i-1] && // that opens within the white rb - inClose[i] < inOpen[i-1] && // and closes under the white rb - inClose[i] > max(inClose[i-2], inOpen[i-2]) && // inside the gap - // size of 2 rb near the same - std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) - ) || - ( - TA_REALBODYGAPDOWN(i-1,i-2) && // downside gap - TA_CANDLECOLOR(i-1) == -1 && // 1st: black - TA_CANDLECOLOR(i) == 1 && // 2nd: white - inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // that opens within the black rb - inClose[i] > inOpen[i-1] && // and closes above the black rb - inClose[i] < min(inClose[i-2], inOpen[i-2]) && // inside the gap - // size of 2 rb near the same - std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); - i++; - NearTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlTasukiGap( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlTasukiGap( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLTASUKIGAP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double NearPeriodTotal; -/* Generated */ int i, outIdx, NearTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTASUKIGAP)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ NearPeriodTotal = 0; -/* Generated */ NearTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Near); -/* Generated */ i = NearTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( -/* Generated */ ( -/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // upside gap -/* Generated */ TA_CANDLECOLOR(i-1) == 1 && // 1st: white -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 2nd: black -/* Generated */ inOpen[i] < inClose[i-1] && inOpen[i] > inOpen[i-1] && // that opens within the white rb -/* Generated */ inClose[i] < inOpen[i-1] && // and closes under the white rb -/* Generated */ inClose[i] > max(inClose[i-2], inOpen[i-2]) && // inside the gap -/* Generated */ // size of 2 rb near the same -/* Generated */ std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) -/* Generated */ ) || -/* Generated */ ( -/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) && // downside gap -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 1st: black -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white -/* Generated */ inOpen[i] < inOpen[i-1] && inOpen[i] > inClose[i-1] && // that opens within the black rb -/* Generated */ inClose[i] > inOpen[i-1] && // and closes above the black rb -/* Generated */ inClose[i] < min(inClose[i-2], inOpen[i-2]) && // inside the gap -/* Generated */ // size of 2 rb near the same -/* Generated */ std_fabs(TA_REALBODY(i-1) - TA_REALBODY(i)) < TA_CANDLEAVERAGE( Near, NearPeriodTotal, i-1 ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-1) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ NearPeriodTotal += TA_CANDLERANGE( Near, i-1 ) - TA_CANDLERANGE( Near, NearTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ NearTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c b/src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c deleted file mode 100644 index 89dccae5f..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLTHRUSTING.c +++ /dev/null @@ -1,388 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 121204 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlThrustingLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlThrustingLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLTHRUSTING_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(Equal), TA_CANDLEAVGPERIOD(BodyLong) - ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLTHRUSTING - Thrusting Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlThrusting( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLTHRUSTING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double EqualPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLTHRUSTING)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - EqualPeriodTotal = 0; - EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); - BodyLongPeriodTotal = 0; - BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); - - i = EqualTrailingIdx; - while( i < startIdx ) { - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); - i++; - } - i = BodyLongTrailingIdx; - while( i < startIdx ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle - * - second candle: white candle with open below previous day low and close into previous day body under the midpoint; - * to differentiate it from in-neck the close should not be equal to the black candle's close - * The meaning of "equal" is specified with TA_SetCandleSettings - * outInteger is negative (-1 to -100): thrusting pattern is always bearish - * the user should consider that the thrusting pattern is significant when it appears in a downtrend and it could be - * even bullish "when coming in an uptrend or occurring twice within several days" (Steve Nison says), while this - * function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black - TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long - TA_CANDLECOLOR(i) == 1 && // 2nd: white - inOpen[i] < inLow[i-1] && // open below prior low - inClose[i] > inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close into prior body - inClose[i] <= inClose[i-1] + TA_REALBODY(i-1) * 0.5 // under the midpoint - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) - - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); - i++; - EqualTrailingIdx++; - BodyLongTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlThrusting( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlThrusting( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLTHRUSTING( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double EqualPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, EqualTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTHRUSTING)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ EqualPeriodTotal = 0; -/* Generated */ EqualTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(Equal); -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ i = EqualTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-1) == -1 && // 1st: black -/* Generated */ TA_REALBODY(i-1) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-1 ) && // long -/* Generated */ TA_CANDLECOLOR(i) == 1 && // 2nd: white -/* Generated */ inOpen[i] < inLow[i-1] && // open below prior low -/* Generated */ inClose[i] > inClose[i-1] + TA_CANDLEAVERAGE( Equal, EqualPeriodTotal, i-1 ) && // close into prior body -/* Generated */ inClose[i] <= inClose[i-1] + TA_REALBODY(i-1) * 0.5 // under the midpoint -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ EqualPeriodTotal += TA_CANDLERANGE( Equal, i-1 ) - TA_CANDLERANGE( Equal, EqualTrailingIdx-1 ); -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-1 ) -/* Generated */ - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx-1 ); -/* Generated */ i++; -/* Generated */ EqualTrailingIdx++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLTRISTAR.c b/src/ta-lib/src/ta_func/ta_CDLTRISTAR.c deleted file mode 100644 index d09037a1b..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLTRISTAR.c +++ /dev/null @@ -1,379 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * CSB Christopher Barnhouse - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 100204 AC Creation - * 051005 CSB,AC Fix #1199526 for out-of-bound write in output. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlTristarLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlTristarLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLTRISTAR_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return TA_CANDLEAVGPERIOD(BodyDoji) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLTRISTAR - Tristar Pattern - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlTristar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLTRISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyPeriodTotal; - int i, outIdx, BodyTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLTRISTAR)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyPeriodTotal = 0; - BodyTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyDoji); - - i = BodyTrailingIdx; - while( i < startIdx-2 ) { - BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); - i++; - } - - /* Proceed with the calculation for the requested range. - * Must have: - * - 3 consecutive doji days - * - the second doji is a star - * The meaning of "doji" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish - */ - i = startIdx; - outIdx = 0; - do - { - if( TA_REALBODY(i-2) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 1st: doji - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 2nd: doji - TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) ) { // 3rd: doji - outInteger[outIdx] = 0; - if ( TA_REALBODYGAPUP(i-1,i-2) // 2nd gaps up - && - max(inOpen[i],inClose[i]) < max(inOpen[i-1],inClose[i-1]) // 3rd is not higher than 2nd - ) - outInteger[outIdx] = -100; - if ( TA_REALBODYGAPDOWN(i-1,i-2) // 2nd gaps down - && - min(inOpen[i],inClose[i]) > min(inOpen[i-1],inClose[i-1]) // 3rd is not lower than 2nd - ) - outInteger[outIdx] = +100; - outIdx++; - } - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i-2 ) - TA_CANDLERANGE( BodyDoji, BodyTrailingIdx ); - i++; - BodyTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlTristar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlTristar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLTRISTAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyPeriodTotal; -/* Generated */ int i, outIdx, BodyTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLTRISTAR)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyPeriodTotal = 0; -/* Generated */ BodyTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyDoji); -/* Generated */ i = BodyTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 1st: doji -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) && // 2nd: doji -/* Generated */ TA_REALBODY(i) <= TA_CANDLEAVERAGE( BodyDoji, BodyPeriodTotal, i-2 ) ) { // 3rd: doji -/* Generated */ outInteger[outIdx] = 0; -/* Generated */ if ( TA_REALBODYGAPUP(i-1,i-2) // 2nd gaps up -/* Generated */ && -/* Generated */ max(inOpen[i],inClose[i]) < max(inOpen[i-1],inClose[i-1]) // 3rd is not higher than 2nd -/* Generated */ ) -/* Generated */ outInteger[outIdx] = -100; -/* Generated */ if ( TA_REALBODYGAPDOWN(i-1,i-2) // 2nd gaps down -/* Generated */ && -/* Generated */ min(inOpen[i],inClose[i]) > min(inOpen[i-1],inClose[i-1]) // 3rd is not lower than 2nd -/* Generated */ ) -/* Generated */ outInteger[outIdx] = +100; -/* Generated */ outIdx++; -/* Generated */ } -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyPeriodTotal += TA_CANDLERANGE( BodyDoji, i-2 ) - TA_CANDLERANGE( BodyDoji, BodyTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c b/src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c deleted file mode 100644 index 21c0e46ee..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLUNIQUE3RIVER.c +++ /dev/null @@ -1,388 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 022005 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlUnique3RiverLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlUnique3RiverLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLUNIQUE3RIVER_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLUNIQUE3RIVER - Unique 3 River - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlUnique3River( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLUNIQUE3RIVER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLUNIQUE3RIVER)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: long black candle - * - second candle: black harami candle with a lower low than the first candle's low - * - third candle: small white candle with open not lower than the second candle's low, better if its open and - * close are under the second candle's close - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * outInteger is positive (1 to 100): unique 3 river is always bullish and should appear in a downtrend - * to be significant, while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long - TA_CANDLECOLOR(i-2) == -1 && // black - TA_CANDLECOLOR(i-1) == -1 && // 2nd: black - inClose[i-1] > inClose[i-2] && inOpen[i-1] <= inOpen[i-2] && // harami - inLow[i-1] < inLow[i-2] && // lower low - TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: short - TA_CANDLECOLOR(i) == 1 && // white - inOpen[i] > inLow[i-1] // open not lower - ) - outInteger[outIdx++] = 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlUnique3River( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlUnique3River( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLUNIQUE3RIVER( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLUNIQUE3RIVER)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // 1st: long -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // black -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd: black -/* Generated */ inClose[i-1] > inClose[i-2] && inOpen[i-1] <= inOpen[i-2] && // harami -/* Generated */ inLow[i-1] < inLow[i-2] && // lower low -/* Generated */ TA_REALBODY(i) < TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i ) && // 3rd: short -/* Generated */ TA_CANDLECOLOR(i) == 1 && // white -/* Generated */ inOpen[i] > inLow[i-1] // open not lower -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c b/src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c deleted file mode 100644 index cee2ada15..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLUPSIDEGAP2CROWS.c +++ /dev/null @@ -1,390 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 110104 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlUpsideGap2CrowsLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlUpsideGap2CrowsLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLUPSIDEGAP2CROWS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return max( TA_CANDLEAVGPERIOD(BodyShort), TA_CANDLEAVGPERIOD(BodyLong) ) + 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLUPSIDEGAP2CROWS - Upside Gap Two Crows - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlUpsideGap2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLUPSIDEGAP2CROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double BodyShortPeriodTotal, BodyLongPeriodTotal; - int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLUPSIDEGAP2CROWS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - BodyLongPeriodTotal = 0; - BodyShortPeriodTotal = 0; - BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); - BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); - - i = BodyLongTrailingIdx; - while( i < startIdx-2 ) { - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); - i++; - } - i = BodyShortTrailingIdx; - while( i < startIdx-1 ) { - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); - i++; - } - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: white candle, usually long - * - second candle: small black real body - * - gap between the first and the second candle's real bodies - * - third candle: black candle with a real body that engulfs the preceding candle - * and closes above the white candle's close - * The meaning of "short" and "long" is specified with TA_SetCandleSettings - * outInteger is negative (-1 to -100): upside gap two crows is always bearish; - * the user should consider that an upside gap two crows is significant when it appears in an uptrend, - * while this function does not consider the trend - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white - TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long - TA_CANDLECOLOR(i-1) == -1 && // 2nd: black - TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // short - TA_REALBODYGAPUP(i-1,i-2) && // gapping up - TA_CANDLECOLOR(i) == -1 && // 3rd: black - inOpen[i] > inOpen[i-1] && inClose[i] < inClose[i-1] && // 3rd: engulfing prior rb - inClose[i] > inClose[i-2] // closing above 1st - ) - outInteger[outIdx++] = -100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); - BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); - i++; - BodyLongTrailingIdx++; - BodyShortTrailingIdx++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlUpsideGap2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlUpsideGap2Crows( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLUPSIDEGAP2CROWS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double BodyShortPeriodTotal, BodyLongPeriodTotal; -/* Generated */ int i, outIdx, BodyShortTrailingIdx, BodyLongTrailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLUPSIDEGAP2CROWS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ BodyLongPeriodTotal = 0; -/* Generated */ BodyShortPeriodTotal = 0; -/* Generated */ BodyLongTrailingIdx = startIdx -2 - TA_CANDLEAVGPERIOD(BodyLong); -/* Generated */ BodyShortTrailingIdx = startIdx -1 - TA_CANDLEAVGPERIOD(BodyShort); -/* Generated */ i = BodyLongTrailingIdx; -/* Generated */ while( i < startIdx-2 ) { -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = BodyShortTrailingIdx; -/* Generated */ while( i < startIdx-1 ) { -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i ); -/* Generated */ i++; -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == 1 && // 1st: white -/* Generated */ TA_REALBODY(i-2) > TA_CANDLEAVERAGE( BodyLong, BodyLongPeriodTotal, i-2 ) && // long -/* Generated */ TA_CANDLECOLOR(i-1) == -1 && // 2nd: black -/* Generated */ TA_REALBODY(i-1) <= TA_CANDLEAVERAGE( BodyShort, BodyShortPeriodTotal, i-1 ) && // short -/* Generated */ TA_REALBODYGAPUP(i-1,i-2) && // gapping up -/* Generated */ TA_CANDLECOLOR(i) == -1 && // 3rd: black -/* Generated */ inOpen[i] > inOpen[i-1] && inClose[i] < inClose[i-1] && // 3rd: engulfing prior rb -/* Generated */ inClose[i] > inClose[i-2] // closing above 1st -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = -100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ BodyLongPeriodTotal += TA_CANDLERANGE( BodyLong, i-2 ) - TA_CANDLERANGE( BodyLong, BodyLongTrailingIdx ); -/* Generated */ BodyShortPeriodTotal += TA_CANDLERANGE( BodyShort, i-1 ) - TA_CANDLERANGE( BodyShort, BodyShortTrailingIdx ); -/* Generated */ i++; -/* Generated */ BodyLongTrailingIdx++; -/* Generated */ BodyShortTrailingIdx++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c b/src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c deleted file mode 100644 index c8ad84fc2..000000000 --- a/src/ta-lib/src/ta_func/ta_CDLXSIDEGAP3METHODS.c +++ /dev/null @@ -1,363 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011605 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CdlXSideGap3MethodsLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cdlXSideGap3MethodsLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CDLXSIDEGAP3METHODS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CDLXSIDEGAP3METHODS - Upside/Downside Gap Three Methods - * - * Input = Open, High, Low, Close - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlXSideGap3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CDLXSIDEGAP3METHODS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int i, outIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - - lookbackTotal = LOOKBACK_CALL(CDLXSIDEGAP3METHODS)(); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - i = startIdx; - - /* Proceed with the calculation for the requested range. - * Must have: - * - first candle: white (black) candle - * - second candle: white (black) candle - * - upside (downside) gap between the first and the second real bodies - * - third candle: black (white) candle that opens within the second real body and closes within the first real body - * outInteger is positive (1 to 100) when bullish or negative (-1 to -100) when bearish; - * the user should consider that up/downside gap 3 methods is significant when it appears in a trend, while this - * function does not consider it - */ - outIdx = 0; - do - { - if( TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && // 1st and 2nd of same color - TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // 3rd opposite color - inOpen[i] < max(inClose[i-1], inOpen[i-1]) && // 3rd opens within 2nd rb - inOpen[i] > min(inClose[i-1], inOpen[i-1]) && - inClose[i] < max(inClose[i-2], inOpen[i-2]) && // 3rd closes within 1st rb - inClose[i] > min(inClose[i-2], inOpen[i-2]) && - ( ( - TA_CANDLECOLOR(i-2) == 1 && // when 1st is white - TA_REALBODYGAPUP(i-1,i-2) // upside gap - ) || - ( - TA_CANDLECOLOR(i-2) == -1 && // when 1st is black - TA_REALBODYGAPDOWN(i-1,i-2) // downside gap - ) - ) - ) - outInteger[outIdx++] = TA_CANDLECOLOR(i-2) * 100; - else - outInteger[outIdx++] = 0; - /* add the current range and subtract the first range: this is done after the pattern recognition - * when avgPeriod is not 0, that means "compare with the previous candles" (it excludes the current candle) - */ - i++; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::CdlXSideGap3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cdlXSideGap3Methods( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CDLXSIDEGAP3METHODS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i, outIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(CDLXSIDEGAP3METHODS)(); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ i = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ if( TA_CANDLECOLOR(i-2) == TA_CANDLECOLOR(i-1) && // 1st and 2nd of same color -/* Generated */ TA_CANDLECOLOR(i-1) == -TA_CANDLECOLOR(i) && // 3rd opposite color -/* Generated */ inOpen[i] < max(inClose[i-1], inOpen[i-1]) && // 3rd opens within 2nd rb -/* Generated */ inOpen[i] > min(inClose[i-1], inOpen[i-1]) && -/* Generated */ inClose[i] < max(inClose[i-2], inOpen[i-2]) && // 3rd closes within 1st rb -/* Generated */ inClose[i] > min(inClose[i-2], inOpen[i-2]) && -/* Generated */ ( ( -/* Generated */ TA_CANDLECOLOR(i-2) == 1 && // when 1st is white -/* Generated */ TA_REALBODYGAPUP(i-1,i-2) // upside gap -/* Generated */ ) || -/* Generated */ ( -/* Generated */ TA_CANDLECOLOR(i-2) == -1 && // when 1st is black -/* Generated */ TA_REALBODYGAPDOWN(i-1,i-2) // downside gap -/* Generated */ ) -/* Generated */ ) -/* Generated */ ) -/* Generated */ outInteger[outIdx++] = TA_CANDLECOLOR(i-2) * 100; -/* Generated */ else -/* Generated */ outInteger[outIdx++] = 0; -/* Generated */ i++; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CEIL.c b/src/ta-lib/src/ta_func/ta_CEIL.c deleted file mode 100644 index 7d02fa5be..000000000 --- a/src/ta-lib/src/ta_func/ta_CEIL.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CeilLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int ceilLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CEIL_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CEIL - Vector Ceil - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ceil( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CEIL( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_ceil(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ceil( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ceil( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CEIL( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_ceil(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CMO.c b/src/ta-lib/src/ta_func/ta_CMO.c deleted file mode 100644 index 1bccab6a3..000000000 --- a/src/ta-lib/src/ta_func/ta_CMO.c +++ /dev/null @@ -1,613 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * BT Barry Tsung - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112605 MF Initial version. - * 021806 MF,BT Fix #1434450 reported by BT. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CmoLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cmoLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CMO_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - retValue = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_CMO,Cmo); - if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock) ) - retValue--; - - return retValue; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CMO - Chande Momentum Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cmo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CMO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - - int today, lookbackTotal, unstablePeriod, i; - double prevGain, prevLoss, prevValue, savePrevValue; - double tempValue1, tempValue2, tempValue3, tempValue4; - - #if defined( USE_SINGLE_PRECISION_INPUT ) - ARRAY_MEMMOVEMIX_VAR; - #endif - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* CMO calculation is mostly identical to RSI. - * - * The only difference is in the last step of calculation: - * - * RSI = gain / (gain+loss) - * CMO = (gain-loss) / (gain+loss) - * - * See the RSI function for potentially some more info - * on this algo. - */ - - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(CMO)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - outIdx = 0; /* Index into the output. */ - - /* Trap special case where the period is '1'. - * In that case, just copy the input into the - * output for the requested range (as-is !) - */ - if( optInTimePeriod == 1 ) - { - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - i = (endIdx-startIdx)+1; - VALUE_HANDLE_DEREF(outNBElement) = i; - #if defined( USE_SINGLE_PRECISION_INPUT ) - ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); - #else - ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); - #endif - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Accumulate Wilder's "Average Gain" and "Average Loss" - * among the initial period. - */ - today = startIdx-lookbackTotal; - prevValue = inReal[today]; - - unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_CMO,Cmo); - - /* If there is no unstable period, - * calculate the 'additional' initial - * price bar who is particuliar to - * metastock. - * If there is an unstable period, - * no need to calculate since this - * first value will be surely skip. - */ - if( (unstablePeriod == 0) && - (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) - { - /* Preserve prevValue because it may get - * overwritten by the output. - *(because output ptr could be the same as input ptr). - */ - savePrevValue = prevValue; - - /* No unstable period, so must calculate first output - * particular to Metastock. - * (Metastock re-use the first price bar, so there - * is no loss/gain at first. Beats me why they - * are doing all this). - */ - prevGain = 0.0; - prevLoss = 0.0; - for( i=optInTimePeriod; i > 0; i-- ) - { - tempValue1 = inReal[today++]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - } - - - tempValue1 = prevLoss/optInTimePeriod; - tempValue2 = prevGain/optInTimePeriod; - tempValue3 = tempValue2-tempValue1; - tempValue4 = tempValue1+tempValue2; - - /* Write the output. */ - if( !TA_IS_ZERO(tempValue4) ) - outReal[outIdx++] = 100*(tempValue3/tempValue4); - else - outReal[outIdx++] = 0.0; - - /* Are we done? */ - if( today > endIdx ) - { - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Start over for the next price bar. */ - today -= optInTimePeriod; - prevValue = savePrevValue; - } - - - /* Remaining of the processing is identical - * for both Classic calculation and Metastock. - */ - prevGain = 0.0; - prevLoss = 0.0; - today++; - for( i=optInTimePeriod; i > 0; i-- ) - { - tempValue1 = inReal[today++]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - } - - - /* Subsequent prevLoss and prevGain are smoothed - * using the previous values (Wilder's approach). - * 1) Multiply the previous by 'period-1'. - * 2) Add today value. - * 3) Divide by 'period'. - */ - prevLoss /= optInTimePeriod; - prevGain /= optInTimePeriod; - - /* Often documentation present the RSI calculation as follow: - * RSI = 100 - (100 / 1 + (prevGain/prevLoss)) - * - * The following is equivalent: - * RSI = 100 * (prevGain/(prevGain+prevLoss)) - * - * The second equation is used here for speed optimization. - */ - if( today > startIdx ) - { - tempValue1 = prevGain+prevLoss; - if( !TA_IS_ZERO(tempValue1) ) - outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); - else - outReal[outIdx++] = 0.0; - } - else - { - /* Skip the unstable period. Do the processing - * but do not write it in the output. - */ - while( today < startIdx ) - { - tempValue1 = inReal[today]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - - prevLoss *= (optInTimePeriod-1); - prevGain *= (optInTimePeriod-1); - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - - prevLoss /= optInTimePeriod; - prevGain /= optInTimePeriod; - - today++; - } - } - - /* Unstable period skipped... now continue - * processing if needed. - */ - while( today <= endIdx ) - { - tempValue1 = inReal[today++]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - - prevLoss *= (optInTimePeriod-1); - prevGain *= (optInTimePeriod-1); - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - - prevLoss /= optInTimePeriod; - prevGain /= optInTimePeriod; - tempValue1 = prevGain+prevLoss; - if( !TA_IS_ZERO(tempValue1) ) - outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); - else - outReal[outIdx++] = 0.0; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cmo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cmo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CMO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal, unstablePeriod, i; -/* Generated */ double prevGain, prevLoss, prevValue, savePrevValue; -/* Generated */ double tempValue1, tempValue2, tempValue3, tempValue4; -/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ ARRAY_MEMMOVEMIX_VAR; -/* Generated */ #endif -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackTotal = LOOKBACK_CALL(CMO)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ outIdx = 0; -/* Generated */ if( optInTimePeriod == 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ i = (endIdx-startIdx)+1; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = i; -/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); -/* Generated */ #else -/* Generated */ ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); -/* Generated */ #endif -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ today = startIdx-lookbackTotal; -/* Generated */ prevValue = inReal[today]; -/* Generated */ unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_CMO,Cmo); -/* Generated */ if( (unstablePeriod == 0) && -/* Generated */ (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) -/* Generated */ { -/* Generated */ savePrevValue = prevValue; -/* Generated */ prevGain = 0.0; -/* Generated */ prevLoss = 0.0; -/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today++]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ } -/* Generated */ tempValue1 = prevLoss/optInTimePeriod; -/* Generated */ tempValue2 = prevGain/optInTimePeriod; -/* Generated */ tempValue3 = tempValue2-tempValue1; -/* Generated */ tempValue4 = tempValue1+tempValue2; -/* Generated */ if( !TA_IS_ZERO(tempValue4) ) -/* Generated */ outReal[outIdx++] = 100*(tempValue3/tempValue4); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ if( today > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ today -= optInTimePeriod; -/* Generated */ prevValue = savePrevValue; -/* Generated */ } -/* Generated */ prevGain = 0.0; -/* Generated */ prevLoss = 0.0; -/* Generated */ today++; -/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today++]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ } -/* Generated */ prevLoss /= optInTimePeriod; -/* Generated */ prevGain /= optInTimePeriod; -/* Generated */ if( today > startIdx ) -/* Generated */ { -/* Generated */ tempValue1 = prevGain+prevLoss; -/* Generated */ if( !TA_IS_ZERO(tempValue1) ) -/* Generated */ outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ while( today < startIdx ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ prevLoss *= (optInTimePeriod-1); -/* Generated */ prevGain *= (optInTimePeriod-1); -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ prevLoss /= optInTimePeriod; -/* Generated */ prevGain /= optInTimePeriod; -/* Generated */ today++; -/* Generated */ } -/* Generated */ } -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today++]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ prevLoss *= (optInTimePeriod-1); -/* Generated */ prevGain *= (optInTimePeriod-1); -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ prevLoss /= optInTimePeriod; -/* Generated */ prevGain /= optInTimePeriod; -/* Generated */ tempValue1 = prevGain+prevLoss; -/* Generated */ if( !TA_IS_ZERO(tempValue1) ) -/* Generated */ outReal[outIdx++] = 100.0*((prevGain-prevLoss)/tempValue1); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_CORREL.c b/src/ta-lib/src/ta_func/ta_CORREL.c deleted file mode 100644 index c5a42139f..000000000 --- a/src/ta-lib/src/ta_func/ta_CORREL.c +++ /dev/null @@ -1,416 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 101003 MF Initial Coding - * 062804 MF Resolve div by zero bug on limit case. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CorrelLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int correlLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_CORREL_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_CORREL - Pearson's Correlation Coefficient (r) - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode correl( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal0[], -/* Generated */ double inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_CORREL( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal0[], -/* Generated */ const double inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double sumXY, sumX, sumY, sumX2, sumY2, x, y, trailingX, trailingY; - double tempReal; - int lookbackTotal, today, trailingIdx, outIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Move up the start index if there is not - * enough initial data. - */ - lookbackTotal = optInTimePeriod-1; - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - trailingIdx = startIdx - lookbackTotal; - - /* Calculate the initial values. */ - sumXY = sumX = sumY = sumX2 = sumY2 = 0.0; - for( today=trailingIdx; today <= startIdx; today++ ) - { - x = inReal0[today]; - sumX += x; - sumX2 += x*x; - - y = inReal1[today]; - sumXY += x*y; - sumY += y; - sumY2 += y*y; - } - - /* Write the first output. - * Save first the trailing values since the input - * and output might be the same array, - */ - trailingX = inReal0[trailingIdx]; - trailingY = inReal1[trailingIdx++]; - tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); - if( !TA_IS_ZERO_OR_NEG(tempReal) ) - outReal[0] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); - else - outReal[0] = 0.0; - - /* Tight loop to do subsequent values. */ - outIdx = 1; - while( today <= endIdx ) - { - /* Remove trailing values */ - sumX -= trailingX; - sumX2 -= trailingX*trailingX; - - sumXY -= trailingX*trailingY; - sumY -= trailingY; - sumY2 -= trailingY*trailingY; - - /* Add new values */ - x = inReal0[today]; - sumX += x; - sumX2 += x*x; - - y = inReal1[today++]; - sumXY += x*y; - sumY += y; - sumY2 += y*y; - - /* Output new coefficient. - * Save first the trailing values since the input - * and output might be the same array, - */ - trailingX = inReal0[trailingIdx]; - trailingY = inReal1[trailingIdx++]; - tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); - if( !TA_IS_ZERO_OR_NEG(tempReal) ) - outReal[outIdx++] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); - else - outReal[outIdx++] = 0.0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Correl( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode correl( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal0[], -/* Generated */ float inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_CORREL( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal0[], -/* Generated */ const float inReal1[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double sumXY, sumX, sumY, sumX2, sumY2, x, y, trailingX, trailingY; -/* Generated */ double tempReal; -/* Generated */ int lookbackTotal, today, trailingIdx, outIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = optInTimePeriod-1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingIdx = startIdx - lookbackTotal; -/* Generated */ sumXY = sumX = sumY = sumX2 = sumY2 = 0.0; -/* Generated */ for( today=trailingIdx; today <= startIdx; today++ ) -/* Generated */ { -/* Generated */ x = inReal0[today]; -/* Generated */ sumX += x; -/* Generated */ sumX2 += x*x; -/* Generated */ y = inReal1[today]; -/* Generated */ sumXY += x*y; -/* Generated */ sumY += y; -/* Generated */ sumY2 += y*y; -/* Generated */ } -/* Generated */ trailingX = inReal0[trailingIdx]; -/* Generated */ trailingY = inReal1[trailingIdx++]; -/* Generated */ tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); -/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) -/* Generated */ outReal[0] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ outIdx = 1; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ sumX -= trailingX; -/* Generated */ sumX2 -= trailingX*trailingX; -/* Generated */ sumXY -= trailingX*trailingY; -/* Generated */ sumY -= trailingY; -/* Generated */ sumY2 -= trailingY*trailingY; -/* Generated */ x = inReal0[today]; -/* Generated */ sumX += x; -/* Generated */ sumX2 += x*x; -/* Generated */ y = inReal1[today++]; -/* Generated */ sumXY += x*y; -/* Generated */ sumY += y; -/* Generated */ sumY2 += y*y; -/* Generated */ trailingX = inReal0[trailingIdx]; -/* Generated */ trailingY = inReal1[trailingIdx++]; -/* Generated */ tempReal = (sumX2-((sumX*sumX)/optInTimePeriod)) * (sumY2-((sumY*sumY)/optInTimePeriod)); -/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) -/* Generated */ outReal[outIdx++] = (sumXY-((sumX*sumY)/optInTimePeriod)) / std_sqrt(tempReal); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_COS.c b/src/ta-lib/src/ta_func/ta_COS.c deleted file mode 100644 index bf2cb44d5..000000000 --- a/src/ta-lib/src/ta_func/ta_COS.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CosLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int cosLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_COS_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_COS - Vector Trigonometric Cos - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_COS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_cos(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cos( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_COS( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_cos(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_COSH.c b/src/ta-lib/src/ta_func/ta_COSH.c deleted file mode 100644 index a158fa2d2..000000000 --- a/src/ta-lib/src/ta_func/ta_COSH.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::CoshLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int coshLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_COSH_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_COSH - Vector Trigonometric Cosh - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cosh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_COSH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_cosh(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Cosh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode cosh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_COSH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_cosh(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_DEMA.c b/src/ta-lib/src/ta_func/ta_DEMA.c deleted file mode 100644 index 631a84593..000000000 --- a/src/ta-lib/src/ta_func/ta_DEMA.c +++ /dev/null @@ -1,498 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010102 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::DemaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int demaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_DEMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Get lookback for one EMA. - * Multiply by two (because double smoothing). - */ - return LOOKBACK_CALL(EMA)( optInTimePeriod ) * 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_DEMA - Double Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode dema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_DEMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_REF(firstEMA); - ARRAY_REF(secondEMA); - double k; - VALUE_HANDLE_INT(firstEMABegIdx); - VALUE_HANDLE_INT(firstEMANbElement); - VALUE_HANDLE_INT(secondEMABegIdx); - VALUE_HANDLE_INT(secondEMANbElement); - int tempInt, outIdx, firstEMAIdx, lookbackTotal, lookbackEMA; - ENUM_DECLARATION(RetCode) retCode; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* For an explanation of this function, please read - * - * Stocks & Commodities V. 12:1 (11-19): - * Smoothing Data With Faster Moving Averages - * Stocks & Commodities V. 12:2 (72-80): - * Smoothing Data With Less Lag - * - * Both magazine articles written by Patrick G. Mulloy - * - * Essentially, a DEMA of time serie 't' is: - * EMA2 = EMA(EMA(t,period),period) - * DEMA = 2*EMA(t,period)- EMA2 - * - * DEMA offers a moving average with less lags then the - * traditional EMA. - * - * Do not confuse a DEMA with the EMA2. Both are called - * "Double EMA" in the litterature, but EMA2 is a simple - * EMA of an EMA, while DEMA is a compostie of a single - * EMA with EMA2. - * - * TEMA is very similar (and from the same author). - */ - - /* Will change only on success. */ - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - - /* Adjust startIdx to account for the lookback period. */ - lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); - lookbackTotal = lookbackEMA * 2; - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - /* Allocate a temporary buffer for the firstEMA. - * - * When possible, re-use the outputBuffer for temp - * calculation. - */ - #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) - tempInt = lookbackTotal+(endIdx-startIdx)+1; - ARRAY_ALLOC(firstEMA, tempInt ); - #if !defined( _JAVA ) - if( !firstEMA ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - #else - if( inReal == outReal ) - firstEMA = outReal; - else - { - tempInt = lookbackTotal+(endIdx-startIdx)+1; - ARRAY_ALLOC(firstEMA, tempInt ); - #if !defined( _JAVA ) - if( !firstEMA ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - } - #endif - - /* Calculate the first EMA */ - k = PER_TO_K(optInTimePeriod); - retCode = FUNCTION_CALL(INT_EMA)( startIdx-lookbackEMA, endIdx, inReal, - optInTimePeriod, k, - VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), - firstEMA ); - - /* Verify for failure or if not enough data after - * calculating the first EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) - { - ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); - return retCode; - } - - /* Allocate a temporary buffer for storing the EMA of the EMA. */ - ARRAY_ALLOC(secondEMA, VALUE_HANDLE_GET(firstEMANbElement)); - - #if !defined( _JAVA ) - if( !secondEMA ) - { - ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, - optInTimePeriod, k, - VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), - secondEMA ); - - /* Return empty output on failure or if not enough data after - * calculating the second EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) - { - #if defined(USE_SINGLE_PRECISION_INPUT) - ARRAY_FREE( firstEMA ); - #else - ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); - #endif - ARRAY_FREE( secondEMA ); - return retCode; - } - - /* Iterate through the second EMA and write the DEMA into - * the output. - */ - firstEMAIdx = VALUE_HANDLE_GET(secondEMABegIdx); - outIdx = 0; - while( outIdx < VALUE_HANDLE_GET(secondEMANbElement) ) - { - outReal[outIdx] = (2.0*firstEMA[firstEMAIdx++]) - secondEMA[outIdx]; - outIdx++; - } - - #if defined(USE_SINGLE_PRECISION_INPUT) - ARRAY_FREE( firstEMA ); - #else - ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); - #endif - ARRAY_FREE( secondEMA ); - - /* Succeed. Indicate where the output starts relative to - * the caller input. - */ - VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(firstEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Dema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode dema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_DEMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(firstEMA); -/* Generated */ ARRAY_REF(secondEMA); -/* Generated */ double k; -/* Generated */ VALUE_HANDLE_INT(firstEMABegIdx); -/* Generated */ VALUE_HANDLE_INT(firstEMANbElement); -/* Generated */ VALUE_HANDLE_INT(secondEMABegIdx); -/* Generated */ VALUE_HANDLE_INT(secondEMANbElement); -/* Generated */ int tempInt, outIdx, firstEMAIdx, lookbackTotal, lookbackEMA; -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); -/* Generated */ lookbackTotal = lookbackEMA * 2; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) -/* Generated */ tempInt = lookbackTotal+(endIdx-startIdx)+1; -/* Generated */ ARRAY_ALLOC(firstEMA, tempInt ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !firstEMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ #else -/* Generated */ if( inReal == outReal ) -/* Generated */ firstEMA = outReal; -/* Generated */ else -/* Generated */ { -/* Generated */ tempInt = lookbackTotal+(endIdx-startIdx)+1; -/* Generated */ ARRAY_ALLOC(firstEMA, tempInt ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !firstEMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ } -/* Generated */ #endif -/* Generated */ k = PER_TO_K(optInTimePeriod); -/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( startIdx-lookbackEMA, endIdx, inReal, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), -/* Generated */ firstEMA ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) -/* Generated */ { -/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ ARRAY_ALLOC(secondEMA, VALUE_HANDLE_GET(firstEMANbElement)); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !secondEMA ) -/* Generated */ { -/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), -/* Generated */ secondEMA ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success)) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) -/* Generated */ { -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ #else -/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); -/* Generated */ #endif -/* Generated */ ARRAY_FREE( secondEMA ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ firstEMAIdx = VALUE_HANDLE_GET(secondEMABegIdx); -/* Generated */ outIdx = 0; -/* Generated */ while( outIdx < VALUE_HANDLE_GET(secondEMANbElement) ) -/* Generated */ { -/* Generated */ outReal[outIdx] = (2.0*firstEMA[firstEMAIdx++]) - secondEMA[outIdx]; -/* Generated */ outIdx++; -/* Generated */ } -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ #else -/* Generated */ ARRAY_FREE_COND( firstEMA != outReal, firstEMA ); -/* Generated */ #endif -/* Generated */ ARRAY_FREE( secondEMA ); -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = VALUE_HANDLE_GET(firstEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_DIV.c b/src/ta-lib/src/ta_func/ta_DIV.c deleted file mode 100644 index 3cb94df36..000000000 --- a/src/ta-lib/src/ta_func/ta_DIV.c +++ /dev/null @@ -1,260 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::DivLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int divLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_DIV_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_DIV - Vector Arithmetic Div - * - * Input = double, double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Div( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Div( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode div( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal0[], -/* Generated */ double inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_DIV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal0[], -/* Generated */ const double inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = inReal0[i]/inReal1[i]; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Div( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Div( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode div( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal0[], -/* Generated */ float inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_DIV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal0[], -/* Generated */ const float inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = inReal0[i]/inReal1[i]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_DX.c b/src/ta-lib/src/ta_func/ta_DX.c deleted file mode 100644 index 21cc14a00..000000000 --- a/src/ta-lib/src/ta_func/ta_DX.c +++ /dev/null @@ -1,705 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * MIF Mirek Fontan (mira@fontan.cz) - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. - * 062704 MF Fix #965557. Div by zero bug reported by MIF. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::DxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int dxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_DX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - if( optInTimePeriod > 1 ) - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx); - else - return 2; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_DX - Directional Movement Index - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode dx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_DX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int today, lookbackTotal, outIdx; - double prevHigh, prevLow, prevClose; - double prevMinusDM, prevPlusDM, prevTR; - double tempReal, tempReal2, diffP, diffM; - double minusDI, plusDI; - - int i; - - #define TRUE_RANGE(TH,TL,YC,OUT) {\ - OUT = TH-TL; \ - tempReal2 = std_fabs(TH-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - tempReal2 = std_fabs(TL-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - } - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* - * The DM1 (one period) is base on the largest part of - * today's range that is outside of yesterdays range. - * - * The following 7 cases explain how the +DM and -DM are - * calculated on one period: - * - * Case 1: Case 2: - * C| A| - * | | C| - * | +DM1 = (C-A) B| | +DM1 = 0 - * | -DM1 = 0 | -DM1 = (B-D) - * A| | D| - * | D| - * B| - * - * Case 3: Case 4: - * C| C| - * | A| | - * | +DM1 = (C-A) | | +DM1 = 0 - * | -DM1 = 0 B| | -DM1 = (B-D) - * A| | | - * | | D| - * B| | - * D| - * - * Case 5: Case 6: - * A| A| C| - * | C| +DM1 = 0 | | +DM1 = 0 - * | | -DM1 = 0 | | -DM1 = 0 - * | D| | | - * B| B| D| - * - * - * Case 7: - * - * C| - * A| | - * | | +DM=0 - * B| | -DM=0 - * D| - * - * In case 3 and 4, the rule is that the smallest delta between - * (C-A) and (B-D) determine which of +DM or -DM is zero. - * - * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are - * zero. - * - * The rules remain the same when A=B and C=D (when the highs - * equal the lows). - * - * When calculating the DM over a period > 1, the one-period DM - * for the desired period are initialy sum. In other word, - * for a -DM14, sum the -DM1 for the first 14 days (that's - * 13 values because there is no DM for the first day!) - * Subsequent DM are calculated using the Wilder's - * smoothing approach: - * - * Previous -DM14 - * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 - * 14 - * - * Calculation of a -DI14 is as follow: - * - * -DM14 - * -DI14 = -------- - * TR14 - * - * Calculation of the TR14 is: - * - * Previous TR14 - * Today's TR14 = Previous TR14 - -------------- + Today's TR1 - * 14 - * - * The first TR14 is the summation of the first 14 TR1. See the - * TA_TRANGE function on how to calculate the true range. - * - * Calculation of the DX14 is: - * - * diffDI = ABS( (-DI14) - (+DI14) ) - * sumDI = (-DI14) + (+DI14) - * - * DX14 = 100 * (diffDI / sumDI) - * - * Reference: - * New Concepts In Technical Trading Systems, J. Welles Wilder Jr - */ - - /* Original implementation from Wilder's book was doing some integer - * rounding in its calculations. - * - * This was understandable in the context that at the time the book - * was written, most user were doing the calculation by hand. - * - * For a computer, rounding is unnecessary (and even problematic when inputs - * are close to 1). - * - * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, - * you can comment out the following #undef/#define and rebuild the library. - */ - #undef round_pos - #define round_pos(x) (x) - - if( optInTimePeriod > 1 ) - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx); - else - lookbackTotal = 2; - - /* Adjust startIdx to account for the lookback period. */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Indicate where the next output should be put - * in the outReal. - */ - outIdx = 0; - - /* Process the initial DM and TR */ - VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; - - prevMinusDM = 0.0; - prevPlusDM = 0.0; - prevTR = 0.0; - today = startIdx - lookbackTotal; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - prevClose = inClose[today]; - i = optInTimePeriod-1; - while( i-- > 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR += tempReal; - prevClose = inClose[today]; - } - - /* Skip the unstable period. Note that this loop must be executed - * at least ONCE to calculate the first DI. - */ - i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx) + 1; - while( i-- != 0 ) - { - /* Calculate the prevMinusDM and prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - prevMinusDM -= prevMinusDM/optInTimePeriod; - prevPlusDM -= prevPlusDM/optInTimePeriod; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - } - - /* Write the first DX output */ - if( !TA_IS_ZERO(prevTR) ) - { - minusDI = round_pos(100.0*(prevMinusDM/prevTR)); - plusDI = round_pos(100.0*(prevPlusDM/prevTR)); - tempReal = minusDI+plusDI; - if( !TA_IS_ZERO(tempReal) ) - outReal[0] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); - else - outReal[0] = 0.0; - } - else - outReal[0] = 0.0; - outIdx = 1; - - while( today < endIdx ) - { - /* Calculate the prevMinusDM and prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - prevMinusDM -= prevMinusDM/optInTimePeriod; - prevPlusDM -= prevPlusDM/optInTimePeriod; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - else if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - - /* Calculate the DX. The value is rounded (see Wilder book). */ - if( !TA_IS_ZERO(prevTR)) - { - minusDI = round_pos(100.0*(prevMinusDM/prevTR)); - plusDI = round_pos(100.0*(prevPlusDM/prevTR)); - /* This loop is just to accumulate the initial DX */ - tempReal = minusDI+plusDI; - if( !TA_IS_ZERO(tempReal)) - outReal[outIdx] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); - else - outReal[outIdx] = outReal[outIdx-1]; - } - else - outReal[outIdx] = outReal[outIdx-1]; - outIdx++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Dx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode dx( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_DX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, lookbackTotal, outIdx; -/* Generated */ double prevHigh, prevLow, prevClose; -/* Generated */ double prevMinusDM, prevPlusDM, prevTR; -/* Generated */ double tempReal, tempReal2, diffP, diffM; -/* Generated */ double minusDI, plusDI; -/* Generated */ int i; -/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ -/* Generated */ OUT = TH-TL; \ -/* Generated */ tempReal2 = std_fabs(TH-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ tempReal2 = std_fabs(TL-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ } -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ #undef round_pos -/* Generated */ #define round_pos(x) (x) -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx); -/* Generated */ else -/* Generated */ lookbackTotal = 2; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; -/* Generated */ prevMinusDM = 0.0; -/* Generated */ prevPlusDM = 0.0; -/* Generated */ prevTR = 0.0; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ prevClose = inClose[today]; -/* Generated */ i = optInTimePeriod-1; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR += tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_DX,Dx) + 1; -/* Generated */ while( i-- != 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; -/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ { -/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ tempReal = minusDI+plusDI; -/* Generated */ if( !TA_IS_ZERO(tempReal) ) -/* Generated */ outReal[0] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ outIdx = 1; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ prevMinusDM -= prevMinusDM/optInTimePeriod; -/* Generated */ prevPlusDM -= prevPlusDM/optInTimePeriod; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ else if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(prevTR)) -/* Generated */ { -/* Generated */ minusDI = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ plusDI = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ tempReal = minusDI+plusDI; -/* Generated */ if( !TA_IS_ZERO(tempReal)) -/* Generated */ outReal[outIdx] = round_pos( 100.0 * (std_fabs(minusDI-plusDI)/tempReal) ); -/* Generated */ else -/* Generated */ outReal[outIdx] = outReal[outIdx-1]; -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[outIdx] = outReal[outIdx-1]; -/* Generated */ outIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_EMA.c b/src/ta-lib/src/ta_func/ta_EMA.c deleted file mode 100644 index 0f6ff7b79..000000000 --- a/src/ta-lib/src/ta_func/ta_EMA.c +++ /dev/null @@ -1,512 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::EmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int emaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_EMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod - 1 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_EMA,Ema); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_EMA - Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_EMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Simply call the internal implementation of the EMA. */ - return FUNCTION_CALL(INT_EMA)( startIdx, endIdx, inReal, - optInTimePeriod, - PER_TO_K( optInTimePeriod ), - outBegIdx, outNBElement, outReal ); -} - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - // No INT function -#else -/* Internal implementation can be called from any other TA function. - * - * Faster because there is no parameter check, but it is a double - * edge sword. - * - * The optInK_1 and optInTimePeriod are usually tightly coupled: - * - * optInK_1 = 2 / (optInTimePeriod + 1). - * - * These values are going to be related by this equation 99.9% of the - * time... but there is some exception, this is why both must be provided. - * - * The macro PER_TO_K is equivalent to the above formula. - */ -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) - enum class Core::RetCode Core::TA_INT_EMA( int startIdx, - int endIdx, - SubArray^ inReal, - int optInTimePeriod, - double optInK_1, - [Out]int% outBegIdx, - [Out]int% outNBElement, - SubArray^ outReal ) -#elif defined( _MANAGED ) - enum class Core::RetCode Core::TA_INT_EMA( int startIdx, - int endIdx, - cli::array^ inReal, - int optInTimePeriod, - double optInK_1, - [Out]int% outBegIdx, - [Out]int% outNBElement, - cli::array^ outReal ) -#elif defined( _JAVA ) -public RetCode TA_INT_EMA( int startIdx, - int endIdx, - INPUT_TYPE []inReal, - int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - double optInK_1, /* Ratio for calculation of EMA. */ - MInteger outBegIdx, - MInteger outNBElement, - double []outReal ) - -#else -TA_RetCode TA_PREFIX(INT_EMA)( int startIdx, - int endIdx, - const INPUT_TYPE *inReal, - int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - double optInK_1, /* Ratio for calculation of EMA. */ - int *outBegIdx, - int *outNBElement, - double *outReal ) -#endif -{ - double tempReal, prevMA; - int i, today, outIdx, lookbackTotal; - - /* Ususally, optInK_1 = 2 / (optInTimePeriod + 1), - * but sometime there is exception. This - * is why both value are parameters. - */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = LOOKBACK_CALL(EMA)( optInTimePeriod ); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Do the EMA calculation using tight loops. */ - - /* The first EMA is calculated differently. It - * then become the seed for subsequent EMA. - * - * The algorithm for this seed vary widely. - * Only 3 are implemented here: - * - * TA_MA_CLASSIC: - * Use a simple MA of the first 'period'. - * This is the approach most widely documented. - * - * TA_MA_METASTOCK: - * Use first price bar value as a seed - * from the begining of all the available - * data. - * - * TA_MA_TRADESTATION: - * Use 4th price bar as a seed, except when - * period is 1 who use 2th price bar or something - * like that... (not an obvious one...). - */ - if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_DEFAULT,Default) ) - { - today = startIdx-lookbackTotal; - i = optInTimePeriod; - tempReal = 0.0; - while( i-- > 0 ) - tempReal += inReal[today++]; - - prevMA = tempReal / optInTimePeriod; - } - else - { - prevMA = inReal[0]; - today = 1; - - /* !!! Tradestation not supported yet. - case TA_MA_TRADESTATION: - prevMA = inReal[startIdx-1]; - if( optInTimePeriod == 1 ) - VALUE_HANDLE_DEREF(outBegIdx)_0 = 1; - else - VALUE_HANDLE_DEREF(outBegIdx)_0 = 3; - */ - } - - /* At this point, prevMA is the first EMA (the seed for - * the rest). - * 'today' keep track of where the processing is within the - * input. - */ - - /* Skip the unstable period. Do the processing - * but do not write it in the output. - */ - while( today <= startIdx ) - prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; - - /* Write the first value. */ - outReal[0] = prevMA; - outIdx = 1; - - /* Calculate the remaining range. */ - while( today <= endIdx ) - { - prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; - outReal[outIdx++] = prevMA; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} -#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_EMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ return FUNCTION_CALL(INT_EMA)( startIdx, endIdx, inReal, -/* Generated */ optInTimePeriod, -/* Generated */ PER_TO_K( optInTimePeriod ), -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ } -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ // No INT function -/* Generated */ #else -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TA_INT_EMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ double optInK_1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TA_INT_EMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ double optInK_1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode TA_INT_EMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ INPUT_TYPE []inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ double optInK_1, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double []outReal ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_PREFIX(INT_EMA)( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const INPUT_TYPE *inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ double optInK_1, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double *outReal ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double tempReal, prevMA; -/* Generated */ int i, today, outIdx, lookbackTotal; -/* Generated */ lookbackTotal = LOOKBACK_CALL(EMA)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_DEFAULT,Default) ) -/* Generated */ { -/* Generated */ today = startIdx-lookbackTotal; -/* Generated */ i = optInTimePeriod; -/* Generated */ tempReal = 0.0; -/* Generated */ while( i-- > 0 ) -/* Generated */ tempReal += inReal[today++]; -/* Generated */ prevMA = tempReal / optInTimePeriod; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevMA = inReal[0]; -/* Generated */ today = 1; -/* Generated */ } -/* Generated */ while( today <= startIdx ) -/* Generated */ prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; -/* Generated */ outReal[0] = prevMA; -/* Generated */ outIdx = 1; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ prevMA = ((inReal[today++]-prevMA)*optInK_1) + prevMA; -/* Generated */ outReal[outIdx++] = prevMA; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_EXP.c b/src/ta-lib/src/ta_func/ta_EXP.c deleted file mode 100644 index ab4572153..000000000 --- a/src/ta-lib/src/ta_func/ta_EXP.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::ExpLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int expLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_EXP_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_EXP - Vector Arithmetic Exp - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode exp( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_EXP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_exp(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Exp( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode exp( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_EXP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_exp(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_FLOOR.c b/src/ta-lib/src/ta_func/ta_FLOOR.c deleted file mode 100644 index d85b4fc92..000000000 --- a/src/ta-lib/src/ta_func/ta_FLOOR.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::FloorLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int floorLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_FLOOR_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_FLOOR - Vector Floor - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode floor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_FLOOR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_floor(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Floor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode floor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_FLOOR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_floor(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c b/src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c deleted file mode 100644 index 9b97d9d78..000000000 --- a/src/ta-lib/src/ta_func/ta_HT_DCPERIOD.c +++ /dev/null @@ -1,571 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::HtDcPeriodLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int htDcPeriodLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_HT_DCPERIOD_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* See TA_MAMA_Lookback for an explanation of these */ - return 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPERIOD,HtDcPeriod); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_HT_DCPERIOD - Hilbert Transform - Dominant Cycle Period - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htDcPeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_HT_DCPERIOD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg; - - double todayValue, smoothPeriod; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Constant */ - rad2Deg = 180.0 / (4.0 * std_atan(1)); - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPERIOD,HtDcPeriod); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 9; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - smoothPeriod = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "even" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - smoothPeriod = (0.33*period)+(0.67*smoothPeriod); - - if( today >= startIdx ) - { - outReal[outIdx++] = smoothPeriod; - } - - /* Ooof... let's do the next price bar now! */ - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtDcPeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htDcPeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_HT_DCPERIOD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg; -/* Generated */ double todayValue, smoothPeriod; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ rad2Deg = 180.0 / (4.0 * std_atan(1)); -/* Generated */ lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPERIOD,HtDcPeriod); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 9; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ smoothPeriod = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = smoothPeriod; -/* Generated */ } -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_HT_DCPHASE.c b/src/ta-lib/src/ta_func/ta_HT_DCPHASE.c deleted file mode 100644 index f4657ac18..000000000 --- a/src/ta-lib/src/ta_func/ta_HT_DCPHASE.c +++ /dev/null @@ -1,689 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::HtDcPhaseLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int htDcPhaseLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_HT_DCPHASE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* 31 input are skip - * +32 output are skip to account for misc lookback - * --- - * 63 Total Lookback - * - * 31 is for being compatible with Tradestation. - * See TA_MAMA_Lookback for an explanation of the "32". - */ - return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPHASE,HtDcPhase); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_HT_DCPHASE - Hilbert Transform - Dominant Cycle Phase - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htDcPhase( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_HT_DCPHASE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg, constDeg2RadBy360; - - double todayValue, smoothPeriod; - - /* Varaible used to keep track of the previous - * smooth price. In the case of this algorithm, - * we will never need more than 50 values. - */ - #define SMOOTH_PRICE_SIZE 50 - CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); - int idx; - - /* Variable used to calculate the dominant cycle phase */ - int DCPeriodInt; - double DCPhase, DCPeriod, imagPart, realPart; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); - - /* Constant */ - tempReal = std_atan(1); - rad2Deg = 45.0/tempReal; - constDeg2RadBy360 = tempReal*8.0; - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPHASE,HtDcPhase); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 34; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - smoothPeriod = 0.0; - - for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) - smoothPrice[i] = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - DCPhase = 0.0; - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - /* Remember the smoothedValue into the smoothPrice - * circular buffer. - */ - smoothPrice[smoothPrice_Idx] = smoothedValue; - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "even" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - smoothPeriod = (0.33*period)+(0.67*smoothPeriod); - - /* Compute Dominant Cycle Phase */ - DCPeriod = smoothPeriod+0.5; - DCPeriodInt = (int)DCPeriod; - realPart = 0.0; - imagPart = 0.0; - - /* idx is used to iterate for up to 50 of the last - * value of smoothPrice. - */ - idx = smoothPrice_Idx; - for( i=0; i < DCPeriodInt; i++ ) - { - tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; - tempReal2 = smoothPrice[idx]; - realPart += std_sin(tempReal)*tempReal2; - imagPart += std_cos(tempReal)*tempReal2; - if( idx == 0 ) - idx = SMOOTH_PRICE_SIZE-1; - else - idx--; - } - - tempReal = std_fabs(imagPart); - if( tempReal > 0.0 ) - DCPhase = std_atan(realPart/imagPart)*rad2Deg; - else if( tempReal <= 0.01 ) - { - if( realPart < 0.0 ) - DCPhase -= 90.0; - else if( realPart > 0.0 ) - DCPhase += 90.0; - } - DCPhase += 90.0; - - /* Compensate for one bar lag of the weighted moving average */ - DCPhase += 360.0 / smoothPeriod; - if( imagPart < 0.0 ) - DCPhase += 180.0; - if( DCPhase > 315.0 ) - DCPhase -= 360.0; - - if( today >= startIdx ) - { - outReal[outIdx++] = DCPhase; - } - - /* Ooof... let's do the next price bar now! */ - CIRCBUF_NEXT(smoothPrice); - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtDcPhase( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htDcPhase( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_HT_DCPHASE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg, constDeg2RadBy360; -/* Generated */ double todayValue, smoothPeriod; -/* Generated */ #define SMOOTH_PRICE_SIZE 50 -/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); -/* Generated */ int idx; -/* Generated */ int DCPeriodInt; -/* Generated */ double DCPhase, DCPeriod, imagPart, realPart; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); -/* Generated */ tempReal = std_atan(1); -/* Generated */ rad2Deg = 45.0/tempReal; -/* Generated */ constDeg2RadBy360 = tempReal*8.0; -/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_DCPHASE,HtDcPhase); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 34; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ smoothPeriod = 0.0; -/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) -/* Generated */ smoothPrice[i] = 0.0; -/* Generated */ DCPhase = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); -/* Generated */ DCPeriod = smoothPeriod+0.5; -/* Generated */ DCPeriodInt = (int)DCPeriod; -/* Generated */ realPart = 0.0; -/* Generated */ imagPart = 0.0; -/* Generated */ idx = smoothPrice_Idx; -/* Generated */ for( i=0; i < DCPeriodInt; i++ ) -/* Generated */ { -/* Generated */ tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; -/* Generated */ tempReal2 = smoothPrice[idx]; -/* Generated */ realPart += std_sin(tempReal)*tempReal2; -/* Generated */ imagPart += std_cos(tempReal)*tempReal2; -/* Generated */ if( idx == 0 ) -/* Generated */ idx = SMOOTH_PRICE_SIZE-1; -/* Generated */ else -/* Generated */ idx--; -/* Generated */ } -/* Generated */ tempReal = std_fabs(imagPart); -/* Generated */ if( tempReal > 0.0 ) -/* Generated */ DCPhase = std_atan(realPart/imagPart)*rad2Deg; -/* Generated */ else if( tempReal <= 0.01 ) -/* Generated */ { -/* Generated */ if( realPart < 0.0 ) -/* Generated */ DCPhase -= 90.0; -/* Generated */ else if( realPart > 0.0 ) -/* Generated */ DCPhase += 90.0; -/* Generated */ } -/* Generated */ DCPhase += 90.0; -/* Generated */ DCPhase += 360.0 / smoothPeriod; -/* Generated */ if( imagPart < 0.0 ) -/* Generated */ DCPhase += 180.0; -/* Generated */ if( DCPhase > 315.0 ) -/* Generated */ DCPhase -= 360.0; -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = DCPhase; -/* Generated */ } -/* Generated */ CIRCBUF_NEXT(smoothPrice); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_HT_PHASOR.c b/src/ta-lib/src/ta_func/ta_HT_PHASOR.c deleted file mode 100644 index 637b73eb5..000000000 --- a/src/ta-lib/src/ta_func/ta_HT_PHASOR.c +++ /dev/null @@ -1,592 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::HtPhasorLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int htPhasorLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_HT_PHASOR_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* See TA_MAMA_Lookback for an explanation of these */ - return 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_PHASOR,HtPhasor); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_HT_PHASOR - Hilbert Transform - Phasor Components - * - * Input = double - * Output = double, double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInPhase, -/* Generated */ SubArray^ outQuadrature ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInPhase, -/* Generated */ cli::array^ outQuadrature ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htPhasor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outInPhase[], -/* Generated */ double outQuadrature[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_HT_PHASOR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outInPhase[], -/* Generated */ double outQuadrature[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg; - - double todayValue; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInPhase ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outQuadrature ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Constant */ - rad2Deg = 180.0 / (4.0 * std_atan(1)); - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_PHASOR,HtPhasor); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 9; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - if( today >= startIdx ) - { - outQuadrature[outIdx] = Q1; - outInPhase[outIdx++] = I1ForEvenPrev3; - } - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - if( today >= startIdx ) - { - outQuadrature[outIdx] = Q1; - outInPhase[outIdx++] = I1ForOddPrev3; - } - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "even" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - /* Ooof... let's do the next price bar now! */ - today++; - } - - /* Default return values */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInPhase, -/* Generated */ SubArray^ outQuadrature ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtPhasor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInPhase, -/* Generated */ cli::array^ outQuadrature ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htPhasor( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outInPhase[], -/* Generated */ double outQuadrature[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_HT_PHASOR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outInPhase[], -/* Generated */ double outQuadrature[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg; -/* Generated */ double todayValue; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInPhase ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outQuadrature ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ rad2Deg = 180.0 / (4.0 * std_atan(1)); -/* Generated */ lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_PHASOR,HtPhasor); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 9; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outQuadrature[outIdx] = Q1; -/* Generated */ outInPhase[outIdx++] = I1ForEvenPrev3; -/* Generated */ } -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outQuadrature[outIdx] = Q1; -/* Generated */ outInPhase[outIdx++] = I1ForOddPrev3; -/* Generated */ } -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_HT_SINE.c b/src/ta-lib/src/ta_func/ta_HT_SINE.c deleted file mode 100644 index 4b25daec8..000000000 --- a/src/ta-lib/src/ta_func/ta_HT_SINE.c +++ /dev/null @@ -1,706 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::HtSineLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int htSineLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_HT_SINE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* 31 input are skip - * +32 output are skip to account for misc lookback - * --- - * 63 Total Lookback - * - * 31 is for being compatible with Tradestation. - * See TA_MAMA_Lookback for an explanation of the "32". - */ - return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_SINE,HtSine); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_HT_SINE - Hilbert Transform - SineWave - * - * Input = double - * Output = double, double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outSine, -/* Generated */ SubArray^ outLeadSine ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outSine, -/* Generated */ cli::array^ outLeadSine ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htSine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outSine[], -/* Generated */ double outLeadSine[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_HT_SINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outSine[], -/* Generated */ double outLeadSine[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg, deg2Rad, constDeg2RadBy360; - - double todayValue, smoothPeriod; - - /* Varaible used to keep track of the previous - * smooth price. In the case of this algorithm, - * we will never need more than 50 values. - */ - #define SMOOTH_PRICE_SIZE 50 - CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); - int idx; - - /* Variable used to calculate the dominant cycle phase */ - int DCPeriodInt; - double DCPhase, DCPeriod, imagPart, realPart; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outSine ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outLeadSine ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); - - /* The following could be replaced by constant eventually. */ - tempReal = std_atan(1); - rad2Deg = 45.0/tempReal; - deg2Rad = 1.0/rad2Deg; - constDeg2RadBy360 = tempReal*8.0; - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_SINE,HtSine); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 34; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - smoothPeriod = 0.0; - - for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) - smoothPrice[i] = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - DCPhase = 0.0; - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - /* Remember the smoothedValue into the smoothPrice - * circular buffer. - */ - smoothPrice[smoothPrice_Idx] = smoothedValue; - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "even" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - smoothPeriod = (0.33*period)+(0.67*smoothPeriod); - - /* Compute Dominant Cycle Phase */ - DCPeriod = smoothPeriod+0.5; - DCPeriodInt = (int)DCPeriod; - realPart = 0.0; - imagPart = 0.0; - - /* idx is used to iterate for up to 50 of the last - * value of smoothPrice. - */ - idx = smoothPrice_Idx; - for( i=0; i < DCPeriodInt; i++ ) - { - tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; - tempReal2 = smoothPrice[idx]; - realPart += std_sin(tempReal)*tempReal2; - imagPart += std_cos(tempReal)*tempReal2; - if( idx == 0 ) - idx = SMOOTH_PRICE_SIZE-1; - else - idx--; - } - - tempReal = std_fabs(imagPart); - if( tempReal > 0.0 ) - DCPhase = std_atan(realPart/imagPart)*rad2Deg; - else if( tempReal <= 0.01 ) - { - if( realPart < 0.0 ) - DCPhase -= 90.0; - else if( realPart > 0.0 ) - DCPhase += 90.0; - } - DCPhase += 90.0; - - /* Compensate for one bar lag of the weighted moving average */ - DCPhase += 360.0 / smoothPeriod; - if( imagPart < 0.0 ) - DCPhase += 180.0; - if( DCPhase > 315.0 ) - DCPhase -= 360.0; - - if( today >= startIdx ) - { - outSine[outIdx] = std_sin(DCPhase*deg2Rad); - outLeadSine[outIdx++] = std_sin((DCPhase+45)*deg2Rad); - } - - /* Ooof... let's do the next price bar now! */ - CIRCBUF_NEXT(smoothPrice); - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outSine, -/* Generated */ SubArray^ outLeadSine ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtSine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outSine, -/* Generated */ cli::array^ outLeadSine ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htSine( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outSine[], -/* Generated */ double outLeadSine[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_HT_SINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outSine[], -/* Generated */ double outLeadSine[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg, deg2Rad, constDeg2RadBy360; -/* Generated */ double todayValue, smoothPeriod; -/* Generated */ #define SMOOTH_PRICE_SIZE 50 -/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); -/* Generated */ int idx; -/* Generated */ int DCPeriodInt; -/* Generated */ double DCPhase, DCPeriod, imagPart, realPart; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outSine ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outLeadSine ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); -/* Generated */ tempReal = std_atan(1); -/* Generated */ rad2Deg = 45.0/tempReal; -/* Generated */ deg2Rad = 1.0/rad2Deg; -/* Generated */ constDeg2RadBy360 = tempReal*8.0; -/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_SINE,HtSine); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 34; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ smoothPeriod = 0.0; -/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) -/* Generated */ smoothPrice[i] = 0.0; -/* Generated */ DCPhase = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); -/* Generated */ DCPeriod = smoothPeriod+0.5; -/* Generated */ DCPeriodInt = (int)DCPeriod; -/* Generated */ realPart = 0.0; -/* Generated */ imagPart = 0.0; -/* Generated */ idx = smoothPrice_Idx; -/* Generated */ for( i=0; i < DCPeriodInt; i++ ) -/* Generated */ { -/* Generated */ tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; -/* Generated */ tempReal2 = smoothPrice[idx]; -/* Generated */ realPart += std_sin(tempReal)*tempReal2; -/* Generated */ imagPart += std_cos(tempReal)*tempReal2; -/* Generated */ if( idx == 0 ) -/* Generated */ idx = SMOOTH_PRICE_SIZE-1; -/* Generated */ else -/* Generated */ idx--; -/* Generated */ } -/* Generated */ tempReal = std_fabs(imagPart); -/* Generated */ if( tempReal > 0.0 ) -/* Generated */ DCPhase = std_atan(realPart/imagPart)*rad2Deg; -/* Generated */ else if( tempReal <= 0.01 ) -/* Generated */ { -/* Generated */ if( realPart < 0.0 ) -/* Generated */ DCPhase -= 90.0; -/* Generated */ else if( realPart > 0.0 ) -/* Generated */ DCPhase += 90.0; -/* Generated */ } -/* Generated */ DCPhase += 90.0; -/* Generated */ DCPhase += 360.0 / smoothPeriod; -/* Generated */ if( imagPart < 0.0 ) -/* Generated */ DCPhase += 180.0; -/* Generated */ if( DCPhase > 315.0 ) -/* Generated */ DCPhase -= 360.0; -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outSine[outIdx] = std_sin(DCPhase*deg2Rad); -/* Generated */ outLeadSine[outIdx++] = std_sin((DCPhase+45)*deg2Rad); -/* Generated */ } -/* Generated */ CIRCBUF_NEXT(smoothPrice); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c b/src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c deleted file mode 100644 index 7119eb580..000000000 --- a/src/ta-lib/src/ta_func/ta_HT_TRENDLINE.c +++ /dev/null @@ -1,651 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::HtTrendlineLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int htTrendlineLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_HT_TRENDLINE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* 31 input are skip - * +32 output are skip to account for misc lookback - * --- - * 63 Total Lookback - * - * 31 is for being compatible with Tradestation. - * See TA_MAMA_Lookback for an explanation of the "32". - */ - return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDLINE,HtTrendline); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_HT_TRENDLINE - Hilbert Transform - Instantaneous Trendline - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htTrendline( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_HT_TRENDLINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variable to keep track of the last 3 ITrend */ - double iTrend1, iTrend2, iTrend3; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg; - - double todayValue, smoothPeriod; - - /* Variable used to keep track of the previous - * smooth price. In the case of this algorithm, - * we will never need more than 50 values. - */ - #define SMOOTH_PRICE_SIZE 50 - CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); - int idx; - - /* Variable used to calculate the dominant cycle phase */ - int DCPeriodInt; - double DCPeriod; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); - - iTrend1 = iTrend2 = iTrend3 = 0.0; - - /* Constant */ - tempReal = std_atan(1); - rad2Deg = 45.0/tempReal; - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDLINE,HtTrendline); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 34; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - smoothPeriod = 0.0; - - for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) - smoothPrice[i] = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - /* Remember the smoothedValue into the smoothPrice - * circular buffer. - */ - smoothPrice[smoothPrice_Idx] = smoothedValue; - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "even" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - smoothPeriod = (0.33*period)+(0.67*smoothPeriod); - - /* Compute Trendline */ - DCPeriod = smoothPeriod+0.5; - DCPeriodInt = (int)DCPeriod; - - /* idx is used to iterate for up to 50 of the last - * value of smoothPrice. - */ - idx = today; - tempReal = 0.0; - for( i=0; i < DCPeriodInt; i++ ) - tempReal += inReal[idx--]; - - if( DCPeriodInt > 0 ) - tempReal = tempReal/(double)DCPeriodInt; - - tempReal2 = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; - iTrend3 = iTrend2; - iTrend2 = iTrend1; - iTrend1 = tempReal; - - if( today >= startIdx ) - { - outReal[outIdx++] = tempReal2; - } - - /* Ooof... let's do the next price bar now! */ - CIRCBUF_NEXT(smoothPrice); - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtTrendline( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htTrendline( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_HT_TRENDLINE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ double iTrend1, iTrend2, iTrend3; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg; -/* Generated */ double todayValue, smoothPeriod; -/* Generated */ #define SMOOTH_PRICE_SIZE 50 -/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); -/* Generated */ int idx; -/* Generated */ int DCPeriodInt; -/* Generated */ double DCPeriod; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); -/* Generated */ iTrend1 = iTrend2 = iTrend3 = 0.0; -/* Generated */ tempReal = std_atan(1); -/* Generated */ rad2Deg = 45.0/tempReal; -/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDLINE,HtTrendline); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 34; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ smoothPeriod = 0.0; -/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) -/* Generated */ smoothPrice[i] = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); -/* Generated */ DCPeriod = smoothPeriod+0.5; -/* Generated */ DCPeriodInt = (int)DCPeriod; -/* Generated */ idx = today; -/* Generated */ tempReal = 0.0; -/* Generated */ for( i=0; i < DCPeriodInt; i++ ) -/* Generated */ tempReal += inReal[idx--]; -/* Generated */ if( DCPeriodInt > 0 ) -/* Generated */ tempReal = tempReal/(double)DCPeriodInt; -/* Generated */ tempReal2 = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; -/* Generated */ iTrend3 = iTrend2; -/* Generated */ iTrend2 = iTrend1; -/* Generated */ iTrend1 = tempReal; -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = tempReal2; -/* Generated */ } -/* Generated */ CIRCBUF_NEXT(smoothPrice); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c b/src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c deleted file mode 100644 index 8073e7448..000000000 --- a/src/ta-lib/src/ta_func/ta_HT_TRENDMODE.c +++ /dev/null @@ -1,804 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::HtTrendModeLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int htTrendModeLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_HT_TRENDMODE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* 31 input are skip - * +32 output are skip to account for misc lookback - * --- - * 63 Total Lookback - * - * 31 is for being compatible with Tradestation. - * See TA_MAMA_Lookback for an explanation of the "32". - */ - return 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDMODE,HtTrendMode); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_HT_TRENDMODE - Hilbert Transform - Trend vs Cycle Mode - * - * Input = double - * Output = int - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htTrendMode( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_HT_TRENDMODE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variable to keep track of the last 3 ITrend */ - double iTrend1, iTrend2, iTrend3; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg, deg2Rad, constDeg2RadBy360; - - double todayValue, smoothPeriod; - - /* Variable used to keep track of the previous - * smooth price. In the case of this algorithm, - * we will never need more than 50 values. - */ - #define SMOOTH_PRICE_SIZE 50 - CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); - int idx; - - /* Variable used to calculate the dominant cycle phase */ - int DCPeriodInt; - double DCPhase, DCPeriod, imagPart, realPart; - - /* Variable used to calculate the trend mode */ - int daysInTrend, trend; - double prevDCPhase, trendline; - double prevSine, prevLeadSine, sine, leadSine; - - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); - - iTrend1 = iTrend2 = iTrend3 = 0.0; - daysInTrend = 0; - prevDCPhase = DCPhase = 0.0; - prevSine = sine = 0.0; - prevLeadSine = leadSine = 0.0; - - /* The following could be replaced by constant eventually. */ - tempReal = std_atan(1); - rad2Deg = 45.0/tempReal; - deg2Rad = 1.0/rad2Deg; - constDeg2RadBy360 = tempReal*8.0; - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDMODE,HtTrendMode); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 34; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - smoothPeriod = 0.0; - - for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) - smoothPrice[i] = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - DCPhase = 0.0; - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - /* Remember the smoothedValue into the smoothPrice - * circular buffer. - */ - smoothPrice[smoothPrice_Idx] = smoothedValue; - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "even" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - smoothPeriod = (0.33*period)+(0.67*smoothPeriod); - - /* Compute Dominant Cycle Phase */ - prevDCPhase = DCPhase; - DCPeriod = smoothPeriod+0.5; - DCPeriodInt = (int)DCPeriod; - realPart = 0.0; - imagPart = 0.0; - - /* idx is used to iterate for up to 50 of the last - * value of smoothPrice. - */ - idx = smoothPrice_Idx; - for( i=0; i < DCPeriodInt; i++ ) - { - tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; - tempReal2 = smoothPrice[idx]; - realPart += std_sin(tempReal)*tempReal2; - imagPart += std_cos(tempReal)*tempReal2; - if( idx == 0 ) - idx = SMOOTH_PRICE_SIZE-1; - else - idx--; - } - - tempReal = std_fabs(imagPart); - if( tempReal > 0.0 ) - DCPhase = std_atan(realPart/imagPart)*rad2Deg; - else if( tempReal <= 0.01 ) - { - if( realPart < 0.0 ) - DCPhase -= 90.0; - else if( realPart > 0.0 ) - DCPhase += 90.0; - } - DCPhase += 90.0; - - /* Compensate for one bar lag of the weighted moving average */ - DCPhase += 360.0 / smoothPeriod; - if( imagPart < 0.0 ) - DCPhase += 180.0; - if( DCPhase > 315.0 ) - DCPhase -= 360.0; - - prevSine = sine; - prevLeadSine = leadSine; - sine = std_sin(DCPhase*deg2Rad); - leadSine = std_sin((DCPhase+45)*deg2Rad); - - /* Compute Trendline */ - DCPeriod = smoothPeriod+0.5; - DCPeriodInt = (int)DCPeriod; - - /* idx is used to iterate for up to 50 of the last - * value of smoothPrice. - */ - idx = today; - tempReal = 0.0; - for( i=0; i < DCPeriodInt; i++ ) - tempReal += inReal[idx--]; - - if( DCPeriodInt > 0 ) - tempReal = tempReal/(double)DCPeriodInt; - - trendline = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; - iTrend3 = iTrend2; - iTrend2 = iTrend1; - iTrend1 = tempReal; - - /* Compute the trend Mode , and assume trend by default */ - trend = 1; - - /* Measure days in trend from last crossing of the SineWave Indicator lines */ - if( ((sine > leadSine) && (prevSine <= prevLeadSine)) || - ((sine < leadSine) && (prevSine >= prevLeadSine)) ) - { - daysInTrend = 0; - trend = 0; - } - - daysInTrend++; - - if( daysInTrend < (0.5*smoothPeriod) ) - trend = 0; - - tempReal = DCPhase - prevDCPhase; - if( (smoothPeriod != 0.0) && - ((tempReal > (0.67*360.0/smoothPeriod)) && (tempReal < (1.5*360.0/smoothPeriod))) ) - { - trend = 0; - } - - tempReal = smoothPrice[smoothPrice_Idx]; - if( (trendline != 0.0) && (std_fabs( (tempReal - trendline)/trendline ) >= 0.015) ) - trend = 1; - - if( today >= startIdx ) - { - outInteger[outIdx++] = trend; - } - - /* Ooof... let's do the next price bar now! */ - CIRCBUF_NEXT(smoothPrice); - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::HtTrendMode( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode htTrendMode( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_HT_TRENDMODE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ double iTrend1, iTrend2, iTrend3; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg, deg2Rad, constDeg2RadBy360; -/* Generated */ double todayValue, smoothPeriod; -/* Generated */ #define SMOOTH_PRICE_SIZE 50 -/* Generated */ CIRCBUF_PROLOG(smoothPrice,double,SMOOTH_PRICE_SIZE); -/* Generated */ int idx; -/* Generated */ int DCPeriodInt; -/* Generated */ double DCPhase, DCPeriod, imagPart, realPart; -/* Generated */ int daysInTrend, trend; -/* Generated */ double prevDCPhase, trendline; -/* Generated */ double prevSine, prevLeadSine, sine, leadSine; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ CIRCBUF_INIT_LOCAL_ONLY(smoothPrice,double); -/* Generated */ iTrend1 = iTrend2 = iTrend3 = 0.0; -/* Generated */ daysInTrend = 0; -/* Generated */ prevDCPhase = DCPhase = 0.0; -/* Generated */ prevSine = sine = 0.0; -/* Generated */ prevLeadSine = leadSine = 0.0; -/* Generated */ tempReal = std_atan(1); -/* Generated */ rad2Deg = 45.0/tempReal; -/* Generated */ deg2Rad = 1.0/rad2Deg; -/* Generated */ constDeg2RadBy360 = tempReal*8.0; -/* Generated */ lookbackTotal = 63 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_HT_TRENDMODE,HtTrendMode); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 34; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ smoothPeriod = 0.0; -/* Generated */ for( i=0; i < SMOOTH_PRICE_SIZE; i++ ) -/* Generated */ smoothPrice[i] = 0.0; -/* Generated */ DCPhase = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ smoothPrice[smoothPrice_Idx] = smoothedValue; -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ smoothPeriod = (0.33*period)+(0.67*smoothPeriod); -/* Generated */ prevDCPhase = DCPhase; -/* Generated */ DCPeriod = smoothPeriod+0.5; -/* Generated */ DCPeriodInt = (int)DCPeriod; -/* Generated */ realPart = 0.0; -/* Generated */ imagPart = 0.0; -/* Generated */ idx = smoothPrice_Idx; -/* Generated */ for( i=0; i < DCPeriodInt; i++ ) -/* Generated */ { -/* Generated */ tempReal = ((double)i*constDeg2RadBy360)/(double)DCPeriodInt; -/* Generated */ tempReal2 = smoothPrice[idx]; -/* Generated */ realPart += std_sin(tempReal)*tempReal2; -/* Generated */ imagPart += std_cos(tempReal)*tempReal2; -/* Generated */ if( idx == 0 ) -/* Generated */ idx = SMOOTH_PRICE_SIZE-1; -/* Generated */ else -/* Generated */ idx--; -/* Generated */ } -/* Generated */ tempReal = std_fabs(imagPart); -/* Generated */ if( tempReal > 0.0 ) -/* Generated */ DCPhase = std_atan(realPart/imagPart)*rad2Deg; -/* Generated */ else if( tempReal <= 0.01 ) -/* Generated */ { -/* Generated */ if( realPart < 0.0 ) -/* Generated */ DCPhase -= 90.0; -/* Generated */ else if( realPart > 0.0 ) -/* Generated */ DCPhase += 90.0; -/* Generated */ } -/* Generated */ DCPhase += 90.0; -/* Generated */ DCPhase += 360.0 / smoothPeriod; -/* Generated */ if( imagPart < 0.0 ) -/* Generated */ DCPhase += 180.0; -/* Generated */ if( DCPhase > 315.0 ) -/* Generated */ DCPhase -= 360.0; -/* Generated */ prevSine = sine; -/* Generated */ prevLeadSine = leadSine; -/* Generated */ sine = std_sin(DCPhase*deg2Rad); -/* Generated */ leadSine = std_sin((DCPhase+45)*deg2Rad); -/* Generated */ DCPeriod = smoothPeriod+0.5; -/* Generated */ DCPeriodInt = (int)DCPeriod; -/* Generated */ idx = today; -/* Generated */ tempReal = 0.0; -/* Generated */ for( i=0; i < DCPeriodInt; i++ ) -/* Generated */ tempReal += inReal[idx--]; -/* Generated */ if( DCPeriodInt > 0 ) -/* Generated */ tempReal = tempReal/(double)DCPeriodInt; -/* Generated */ trendline = (4.0*tempReal + 3.0*iTrend1 + 2.0*iTrend2 + iTrend3) / 10.0; -/* Generated */ iTrend3 = iTrend2; -/* Generated */ iTrend2 = iTrend1; -/* Generated */ iTrend1 = tempReal; -/* Generated */ trend = 1; -/* Generated */ if( ((sine > leadSine) && (prevSine <= prevLeadSine)) || -/* Generated */ ((sine < leadSine) && (prevSine >= prevLeadSine)) ) -/* Generated */ { -/* Generated */ daysInTrend = 0; -/* Generated */ trend = 0; -/* Generated */ } -/* Generated */ daysInTrend++; -/* Generated */ if( daysInTrend < (0.5*smoothPeriod) ) -/* Generated */ trend = 0; -/* Generated */ tempReal = DCPhase - prevDCPhase; -/* Generated */ if( (smoothPeriod != 0.0) && -/* Generated */ ((tempReal > (0.67*360.0/smoothPeriod)) && (tempReal < (1.5*360.0/smoothPeriod))) ) -/* Generated */ { -/* Generated */ trend = 0; -/* Generated */ } -/* Generated */ tempReal = smoothPrice[smoothPrice_Idx]; -/* Generated */ if( (trendline != 0.0) && (std_fabs( (tempReal - trendline)/trendline ) >= 0.015) ) -/* Generated */ trend = 1; -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outInteger[outIdx++] = trend; -/* Generated */ } -/* Generated */ CIRCBUF_NEXT(smoothPrice); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_IMI.c b/src/ta-lib/src/ta_func/ta_IMI.c deleted file mode 100644 index ac46af99d..000000000 --- a/src/ta-lib/src/ta_func/ta_IMI.c +++ /dev/null @@ -1,340 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AB Anatoliy Belsky - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 181012 AB Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::ImiLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int imiLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_IMI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_IMI, Imi) - 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_IMI - Intraday Momentum Index - * - * Input = Open, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode imi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inOpen[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_IMI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inOpen[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int lookback, outIdx = 0; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inOpen||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - lookback = LOOKBACK_CALL(IMI)( optInTimePeriod ); - - if(startIdx < lookback) - startIdx = lookback; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - while (startIdx <= endIdx) { - double upsum = .0, downsum = .0; - int i; - - for (i = startIdx - lookback; i <= startIdx; i++) { - double close = inClose[i]; - double open = inOpen[i]; - - if (close > open) { - upsum += (close - open); - } else { - downsum += (open - close); - } - - outReal[outIdx] = 100.0*(upsum/(upsum + downsum)); - } - - startIdx++; - outIdx++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inOpen, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Imi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inOpen, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode imi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inOpen[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_IMI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inOpen[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int lookback, outIdx = 0; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inOpen||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookback = LOOKBACK_CALL(IMI)( optInTimePeriod ); -/* Generated */ if(startIdx < lookback) -/* Generated */ startIdx = lookback; -/* Generated */ if( startIdx > endIdx ) { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ while (startIdx <= endIdx) { -/* Generated */ double upsum = .0, downsum = .0; -/* Generated */ int i; -/* Generated */ for (i = startIdx - lookback; i <= startIdx; i++) { -/* Generated */ double close = inClose[i]; -/* Generated */ double open = inOpen[i]; -/* Generated */ if (close > open) { -/* Generated */ upsum += (close - open); -/* Generated */ } else { -/* Generated */ downsum += (open - close); -/* Generated */ } -/* Generated */ outReal[outIdx] = 100.0*(upsum/(upsum + downsum)); -/* Generated */ } -/* Generated */ startIdx++; -/* Generated */ outIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_KAMA.c b/src/ta-lib/src/ta_func/ta_KAMA.c deleted file mode 100644 index d5e119696..000000000 --- a/src/ta-lib/src/ta_func/ta_KAMA.c +++ /dev/null @@ -1,508 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 062704 MF Fix limit case to avoid divid by zero (or by - * a value close to zero induce by the imprecision - * of floating points). - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::KamaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int kamaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_KAMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_KAMA,Kama); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_KAMA - Kaufman Adaptive Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode kama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_KAMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - CONSTANT_DOUBLE(constMax) = 2.0/(30.0+1.0); - CONSTANT_DOUBLE(constDiff) = 2.0/(2.0+1.0) - constMax; - - double tempReal, tempReal2; - double sumROC1, periodROC, prevKAMA; - int i, today, outIdx, lookbackTotal; - int trailingIdx; - double trailingValue; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Default return values */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_KAMA,Kama); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Initialize the variables by going through - * the lookback period. - */ - sumROC1 = 0.0; - today = startIdx-lookbackTotal; - trailingIdx = today; - i = optInTimePeriod; - while( i-- > 0 ) - { - tempReal = inReal[today++]; - tempReal -= inReal[today]; - sumROC1 += std_fabs(tempReal); - } - - /* At this point sumROC1 represent the - * summation of the 1-day price difference - * over the (optInTimePeriod-1) - */ - - /* Calculate the first KAMA */ - - /* The yesterday price is used here as the previous KAMA. */ - prevKAMA = inReal[today-1]; - - tempReal = inReal[today]; - tempReal2 = inReal[trailingIdx++]; - periodROC = tempReal-tempReal2; - - /* Save the trailing value. Do this because inReal - * and outReal can be pointers to the same buffer. - */ - trailingValue = tempReal2; - - /* Calculate the efficiency ratio */ - if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1)) - tempReal = 1.0; - else - tempReal = std_fabs(periodROC/sumROC1); - - /* Calculate the smoothing constant */ - tempReal = (tempReal*constDiff)+constMax; - tempReal *= tempReal; - - /* Calculate the KAMA like an EMA, using the - * smoothing constant as the adaptive factor. - */ - prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; - - /* 'today' keep track of where the processing is within the - * input. - */ - - /* Skip the unstable period. Do the whole processing - * needed for KAMA, but do not write it in the output. - */ - while( today <= startIdx ) - { - tempReal = inReal[today]; - tempReal2 = inReal[trailingIdx++]; - periodROC = tempReal-tempReal2; - - /* Adjust sumROC1: - * - Remove trailing ROC1 - * - Add new ROC1 - */ - sumROC1 -= std_fabs(trailingValue-tempReal2); - sumROC1 += std_fabs(tempReal-inReal[today-1]); - - /* Save the trailing value. Do this because inReal - * and outReal can be pointers to the same buffer. - */ - trailingValue = tempReal2; - - /* Calculate the efficiency ratio */ - if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) - tempReal = 1.0; - else - tempReal = std_fabs(periodROC/sumROC1); - - /* Calculate the smoothing constant */ - tempReal = (tempReal*constDiff)+constMax; - tempReal *= tempReal; - - /* Calculate the KAMA like an EMA, using the - * smoothing constant as the adaptive factor. - */ - prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; - } - - /* Write the first value. */ - outReal[0] = prevKAMA; - outIdx = 1; - VALUE_HANDLE_DEREF(outBegIdx) = today-1; - - /* Do the KAMA calculation for the requested range. */ - while( today <= endIdx ) - { - tempReal = inReal[today]; - tempReal2 = inReal[trailingIdx++]; - periodROC = tempReal-tempReal2; - - /* Adjust sumROC1: - * - Remove trailing ROC1 - * - Add new ROC1 - */ - sumROC1 -= std_fabs(trailingValue-tempReal2); - sumROC1 += std_fabs(tempReal-inReal[today-1]); - - /* Save the trailing value. Do this because inReal - * and outReal can be pointers to the same buffer. - */ - trailingValue = tempReal2; - - /* Calculate the efficiency ratio */ - if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) - tempReal = 1.0; - else - tempReal = std_fabs(periodROC / sumROC1); - - /* Calculate the smoothing constant */ - tempReal = (tempReal*constDiff)+constMax; - tempReal *= tempReal; - - /* Calculate the KAMA like an EMA, using the - * smoothing constant as the adaptive factor. - */ - prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; - outReal[outIdx++] = prevKAMA; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Kama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode kama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_KAMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ CONSTANT_DOUBLE(constMax) = 2.0/(30.0+1.0); -/* Generated */ CONSTANT_DOUBLE(constDiff) = 2.0/(2.0+1.0) - constMax; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double sumROC1, periodROC, prevKAMA; -/* Generated */ int i, today, outIdx, lookbackTotal; -/* Generated */ int trailingIdx; -/* Generated */ double trailingValue; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_KAMA,Kama); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ sumROC1 = 0.0; -/* Generated */ today = startIdx-lookbackTotal; -/* Generated */ trailingIdx = today; -/* Generated */ i = optInTimePeriod; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ tempReal -= inReal[today]; -/* Generated */ sumROC1 += std_fabs(tempReal); -/* Generated */ } -/* Generated */ prevKAMA = inReal[today-1]; -/* Generated */ tempReal = inReal[today]; -/* Generated */ tempReal2 = inReal[trailingIdx++]; -/* Generated */ periodROC = tempReal-tempReal2; -/* Generated */ trailingValue = tempReal2; -/* Generated */ if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1)) -/* Generated */ tempReal = 1.0; -/* Generated */ else -/* Generated */ tempReal = std_fabs(periodROC/sumROC1); -/* Generated */ tempReal = (tempReal*constDiff)+constMax; -/* Generated */ tempReal *= tempReal; -/* Generated */ prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; -/* Generated */ while( today <= startIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[today]; -/* Generated */ tempReal2 = inReal[trailingIdx++]; -/* Generated */ periodROC = tempReal-tempReal2; -/* Generated */ sumROC1 -= std_fabs(trailingValue-tempReal2); -/* Generated */ sumROC1 += std_fabs(tempReal-inReal[today-1]); -/* Generated */ trailingValue = tempReal2; -/* Generated */ if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) -/* Generated */ tempReal = 1.0; -/* Generated */ else -/* Generated */ tempReal = std_fabs(periodROC/sumROC1); -/* Generated */ tempReal = (tempReal*constDiff)+constMax; -/* Generated */ tempReal *= tempReal; -/* Generated */ prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; -/* Generated */ } -/* Generated */ outReal[0] = prevKAMA; -/* Generated */ outIdx = 1; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today-1; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[today]; -/* Generated */ tempReal2 = inReal[trailingIdx++]; -/* Generated */ periodROC = tempReal-tempReal2; -/* Generated */ sumROC1 -= std_fabs(trailingValue-tempReal2); -/* Generated */ sumROC1 += std_fabs(tempReal-inReal[today-1]); -/* Generated */ trailingValue = tempReal2; -/* Generated */ if( (sumROC1 <= periodROC) || TA_IS_ZERO(sumROC1) ) -/* Generated */ tempReal = 1.0; -/* Generated */ else -/* Generated */ tempReal = std_fabs(periodROC / sumROC1); -/* Generated */ tempReal = (tempReal*constDiff)+constMax; -/* Generated */ tempReal *= tempReal; -/* Generated */ prevKAMA = ((inReal[today++]-prevKAMA)*tempReal) + prevKAMA; -/* Generated */ outReal[outIdx++] = prevKAMA; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG.c b/src/ta-lib/src/ta_func/ta_LINEARREG.c deleted file mode 100644 index fad36c666..000000000 --- a/src/ta-lib/src/ta_func/ta_LINEARREG.c +++ /dev/null @@ -1,365 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * JP John Price - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 070203 JP Initial. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::LinearRegLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int linearRegLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_LINEARREG_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_LINEARREG - Linear Regression - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearReg( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - - int today, lookbackTotal; - double SumX, SumXY, SumY, SumXSqr, Divisor; - - double m, b; - int i; - - double tempValue1; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Linear Regression is a concept also known as the - * "least squares method" or "best fit." Linear - * Regression attempts to fit a straight line between - * several data points in such a way that distance - * between each data point and the line is minimized. - * - * For each point, a straight line over the specified - * previous bar period is determined in terms - * of y = b + m*x: - * - * TA_LINEARREG : Returns b+m*(period-1) - * TA_LINEARREG_SLOPE : Returns 'm' - * TA_LINEARREG_ANGLE : Returns 'm' in degree. - * TA_LINEARREG_INTERCEPT: Returns 'b' - * TA_TSF : Returns b+m*(period) - */ - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(LINEARREG)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; /* Index into the output. */ - today = startIdx; - - SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; - SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; - Divisor = SumX * SumX - optInTimePeriod * SumXSqr; - - while( today <= endIdx ) - { - SumXY = 0; - SumY = 0; - for( i = optInTimePeriod; i-- != 0; ) - { - SumY += tempValue1 = inReal[today - i]; - SumXY += (double)i * tempValue1; - } - m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; - b = ( SumY - m * SumX ) / (double)optInTimePeriod; - outReal[outIdx++] = b + m * (double)(optInTimePeriod-1); - today++; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearReg( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearReg( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_LINEARREG( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal; -/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; -/* Generated */ double m, b; -/* Generated */ int i; -/* Generated */ double tempValue1; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; -/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; -/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ SumXY = 0; -/* Generated */ SumY = 0; -/* Generated */ for( i = optInTimePeriod; i-- != 0; ) -/* Generated */ { -/* Generated */ SumY += tempValue1 = inReal[today - i]; -/* Generated */ SumXY += (double)i * tempValue1; -/* Generated */ } -/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; -/* Generated */ b = ( SumY - m * SumX ) / (double)optInTimePeriod; -/* Generated */ outReal[outIdx++] = b + m * (double)(optInTimePeriod-1); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c b/src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c deleted file mode 100644 index 3a67a5e7f..000000000 --- a/src/ta-lib/src/ta_func/ta_LINEARREG_ANGLE.c +++ /dev/null @@ -1,365 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * JP John Price - * MF Mario Fortier - * AM Adrian Michel - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 070203 JP Initial. - * 072106 MF,AM Fix #1526632. Add missing atan(). - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::LinearRegAngleLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int linearRegAngleLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_LINEARREG_ANGLE_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_LINEARREG_ANGLE - Linear Regression Angle - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearRegAngle( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG_ANGLE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - - int today, lookbackTotal; - double SumX, SumXY, SumY, SumXSqr, Divisor; - - double m; - - int i; - - double tempValue1; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Linear Regression is a concept also known as the - * "least squares method" or "best fit." Linear - * Regression attempts to fit a straight line between - * several data points in such a way that distance - * between each data point and the line is minimized. - * - * For each point, a straight line over the specified - * previous bar period is determined in terms - * of y = b + m*x: - * - * TA_LINEARREG : Returns b+m*(period-1) - * TA_LINEARREG_SLOPE : Returns 'm' - * TA_LINEARREG_ANGLE : Returns 'm' in degree. - * TA_LINEARREG_INTERCEPT: Returns 'b' - * TA_TSF : Returns b+m*(period) - */ - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(LINEARREG_ANGLE)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; /* Index into the output. */ - today = startIdx; - - SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; - SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; - Divisor = SumX * SumX - optInTimePeriod * SumXSqr; - - while( today <= endIdx ) - { - SumXY = 0; - SumY = 0; - for( i = optInTimePeriod; i-- != 0; ) - { - SumY += tempValue1 = inReal[today - i]; - SumXY += (double)i * tempValue1; - } - m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; - outReal[outIdx++] = std_atan(m) * ( 180.0 / PI ); - today++; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearRegAngle( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearRegAngle( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_LINEARREG_ANGLE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal; -/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; -/* Generated */ double m; -/* Generated */ int i; -/* Generated */ double tempValue1; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG_ANGLE)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; -/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; -/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ SumXY = 0; -/* Generated */ SumY = 0; -/* Generated */ for( i = optInTimePeriod; i-- != 0; ) -/* Generated */ { -/* Generated */ SumY += tempValue1 = inReal[today - i]; -/* Generated */ SumXY += (double)i * tempValue1; -/* Generated */ } -/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; -/* Generated */ outReal[outIdx++] = std_atan(m) * ( 180.0 / PI ); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c b/src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c deleted file mode 100644 index 6ab89ab86..000000000 --- a/src/ta-lib/src/ta_func/ta_LINEARREG_INTERCEPT.c +++ /dev/null @@ -1,363 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * JP John Price - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 070203 JP Initial. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::LinearRegInterceptLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int linearRegInterceptLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_LINEARREG_INTERCEPT_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_LINEARREG_INTERCEPT - Linear Regression Intercept - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearRegIntercept( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG_INTERCEPT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - - int today, lookbackTotal; - double SumX, SumXY, SumY, SumXSqr, Divisor; - - double m; - int i; - - double tempValue1; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Linear Regression is a concept also known as the - * "least squares method" or "best fit." Linear - * Regression attempts to fit a straight line between - * several data points in such a way that distance - * between each data point and the line is minimized. - * - * For each point, a straight line over the specified - * previous bar period is determined in terms - * of y = b + m*x: - * - * TA_LINEARREG : Returns b+m*(period-1) - * TA_LINEARREG_SLOPE : Returns 'm' - * TA_LINEARREG_ANGLE : Returns 'm' in degree. - * TA_LINEARREG_INTERCEPT: Returns 'b' - * TA_TSF : Returns b+m*(period) - */ - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(LINEARREG_INTERCEPT)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; /* Index into the output. */ - today = startIdx; - - SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; - SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; - Divisor = SumX * SumX - optInTimePeriod * SumXSqr; - - while( today <= endIdx ) - { - SumXY = 0; - SumY = 0; - for( i = optInTimePeriod; i-- != 0; ) - { - SumY += tempValue1 = inReal[today - i]; - SumXY += (double)i * tempValue1; - } - m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; - outReal[outIdx++] = ( SumY - m * SumX ) / (double)optInTimePeriod; - today++; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearRegIntercept( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearRegIntercept( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_LINEARREG_INTERCEPT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal; -/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; -/* Generated */ double m; -/* Generated */ int i; -/* Generated */ double tempValue1; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG_INTERCEPT)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; -/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; -/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ SumXY = 0; -/* Generated */ SumY = 0; -/* Generated */ for( i = optInTimePeriod; i-- != 0; ) -/* Generated */ { -/* Generated */ SumY += tempValue1 = inReal[today - i]; -/* Generated */ SumXY += (double)i * tempValue1; -/* Generated */ } -/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; -/* Generated */ outReal[outIdx++] = ( SumY - m * SumX ) / (double)optInTimePeriod; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c b/src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c deleted file mode 100644 index 6f8da6ff1..000000000 --- a/src/ta-lib/src/ta_func/ta_LINEARREG_SLOPE.c +++ /dev/null @@ -1,359 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * JP John Price - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 070203 JP Initial. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::LinearRegSlopeLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int linearRegSlopeLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_LINEARREG_SLOPE_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_LINEARREG_SLOPE - Linear Regression Slope - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearRegSlope( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_LINEARREG_SLOPE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - - int today, lookbackTotal; - double SumX, SumXY, SumY, SumXSqr, Divisor; - - int i; - - double tempValue1; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Linear Regression is a concept also known as the - * "least squares method" or "best fit." Linear - * Regression attempts to fit a straight line between - * several data points in such a way that distance - * between each data point and the line is minimized. - * - * For each point, a straight line over the specified - * previous bar period is determined in terms - * of y = b + m*x: - * - * TA_LINEARREG : Returns b+m*(period-1) - * TA_LINEARREG_SLOPE : Returns 'm' - * TA_LINEARREG_ANGLE : Returns 'm' in degree. - * TA_LINEARREG_INTERCEPT: Returns 'b' - * TA_TSF : Returns b+m*(period) - */ - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(LINEARREG_SLOPE)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; /* Index into the output. */ - today = startIdx; - - SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; - SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; - Divisor = SumX * SumX - optInTimePeriod * SumXSqr; - - while( today <= endIdx ) - { - SumXY = 0; - SumY = 0; - for( i = optInTimePeriod; i-- != 0; ) - { - SumY += tempValue1 = inReal[today - i]; - SumXY += (double)i * tempValue1; - } - outReal[outIdx++] = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; - today++; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::LinearRegSlope( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode linearRegSlope( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_LINEARREG_SLOPE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal; -/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; -/* Generated */ int i; -/* Generated */ double tempValue1; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(LINEARREG_SLOPE)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; -/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; -/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ SumXY = 0; -/* Generated */ SumY = 0; -/* Generated */ for( i = optInTimePeriod; i-- != 0; ) -/* Generated */ { -/* Generated */ SumY += tempValue1 = inReal[today - i]; -/* Generated */ SumXY += (double)i * tempValue1; -/* Generated */ } -/* Generated */ outReal[outIdx++] = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_LN.c b/src/ta-lib/src/ta_func/ta_LN.c deleted file mode 100644 index 854c03e77..000000000 --- a/src/ta-lib/src/ta_func/ta_LN.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::LnLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int lnLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_LN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_LN - Vector Log Natural - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ln( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_LN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_log(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ln( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ln( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_LN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_log(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_LOG10.c b/src/ta-lib/src/ta_func/ta_LOG10.c deleted file mode 100644 index 877abaa14..000000000 --- a/src/ta-lib/src/ta_func/ta_LOG10.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::Log10Lookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int log10Lookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_LOG10_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_LOG10 - Vector Log10 - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode log10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_LOG10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_log10(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Log10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode log10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_LOG10( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_log10(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MA.c b/src/ta-lib/src/ta_func/ta_MA.c deleted file mode 100644 index f55bfb5b4..000000000 --- a/src/ta-lib/src/ta_func/ta_MA.c +++ /dev/null @@ -1,488 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 022203 MF Add MAMA - * 040503 MF Add T3 - * 052603 MF Adapt code to compile with .NET Managed C++ - * 111603 MF Allow period of 1. Just copy input into output. - * 060907 MF Use TA_SMA/TA_EMA instead of internal implementation. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MovingAverageLookback( int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int movingAverageLookback( int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MA_Lookback( int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInMAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - if( optInTimePeriod <= 1 ) - return 0; - - switch( optInMAType ) - { - case ENUM_CASE(MAType, TA_MAType_SMA, Sma ): - retValue = LOOKBACK_CALL(SMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_EMA, Ema): - retValue = LOOKBACK_CALL(EMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_WMA, Wma): - retValue = LOOKBACK_CALL(WMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_DEMA, Dema): - retValue = LOOKBACK_CALL(DEMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_TEMA, Tema ): - retValue = LOOKBACK_CALL(TEMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_TRIMA, Trima ): - retValue = LOOKBACK_CALL(TRIMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_KAMA, Kama ): - retValue = LOOKBACK_CALL(KAMA)( optInTimePeriod ); - break; - - case ENUM_CASE(MAType, TA_MAType_MAMA, Mama ): - retValue = LOOKBACK_CALL(MAMA)( 0.5, 0.05 ); - break; - - case ENUM_CASE(MAType, TA_MAType_T3, T3): - retValue = LOOKBACK_CALL(T3)( optInTimePeriod, 0.7 ); - break; - - default: - retValue = 0; - } - - return retValue; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MA - Moving average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * optInMAType: - * Type of Moving Average - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode movingAverage( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_REF(dummyBuffer); - ENUM_DECLARATION(RetCode) retCode; - - int nbElement; - int outIdx, todayIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - if( optInTimePeriod == 1 ) - { - nbElement = endIdx-startIdx+1; - VALUE_HANDLE_DEREF(outNBElement) = nbElement; - for( todayIdx=startIdx, outIdx=0; outIdx < nbElement; outIdx++, todayIdx++ ) - outReal[outIdx] = inReal[todayIdx]; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - /* Simply forward the job to the corresponding TA function. */ - switch( optInMAType ) - { - case ENUM_CASE(MAType, TA_MAType_SMA, Sma): - retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_EMA, Ema): - retCode = FUNCTION_CALL(EMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_WMA, Wma): - retCode = FUNCTION_CALL(WMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_DEMA, Dema): - retCode = FUNCTION_CALL(DEMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_TEMA, Tema): - retCode = FUNCTION_CALL(TEMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_TRIMA, Trima): - retCode = FUNCTION_CALL(TRIMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_KAMA, Kama): - retCode = FUNCTION_CALL(KAMA)( startIdx, endIdx, inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - break; - - case ENUM_CASE(MAType, TA_MAType_MAMA, Mama): - /* The optInTimePeriod is ignored and the FAMA output of the MAMA - * is ignored. - */ - ARRAY_ALLOC(dummyBuffer, (endIdx-startIdx+1) ); - - #if !defined( _JAVA ) - if( !dummyBuffer ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - - retCode = FUNCTION_CALL(MAMA)( startIdx, endIdx, inReal, 0.5, 0.05, - outBegIdx, outNBElement, - outReal, dummyBuffer ); - - ARRAY_FREE( dummyBuffer ); - break; - - case ENUM_CASE(MAType, TA_MAType_T3, T3 ): - retCode = FUNCTION_CALL(T3)( startIdx, endIdx, inReal, - optInTimePeriod, 0.7, - outBegIdx, outNBElement, outReal ); - break; - - default: - retCode = ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); - break; - } - - return retCode; -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MovingAverage( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode movingAverage( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(dummyBuffer); -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int nbElement; -/* Generated */ int outIdx, todayIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( optInTimePeriod == 1 ) -/* Generated */ { -/* Generated */ nbElement = endIdx-startIdx+1; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = nbElement; -/* Generated */ for( todayIdx=startIdx, outIdx=0; outIdx < nbElement; outIdx++, todayIdx++ ) -/* Generated */ outReal[outIdx] = inReal[todayIdx]; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ switch( optInMAType ) -/* Generated */ { -/* Generated */ case ENUM_CASE(MAType, TA_MAType_SMA, Sma): -/* Generated */ retCode = FUNCTION_CALL(SMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_EMA, Ema): -/* Generated */ retCode = FUNCTION_CALL(EMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_WMA, Wma): -/* Generated */ retCode = FUNCTION_CALL(WMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_DEMA, Dema): -/* Generated */ retCode = FUNCTION_CALL(DEMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_TEMA, Tema): -/* Generated */ retCode = FUNCTION_CALL(TEMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_TRIMA, Trima): -/* Generated */ retCode = FUNCTION_CALL(TRIMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_KAMA, Kama): -/* Generated */ retCode = FUNCTION_CALL(KAMA)( startIdx, endIdx, inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_MAMA, Mama): -/* Generated */ ARRAY_ALLOC(dummyBuffer, (endIdx-startIdx+1) ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !dummyBuffer ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL(MAMA)( startIdx, endIdx, inReal, 0.5, 0.05, -/* Generated */ outBegIdx, outNBElement, -/* Generated */ outReal, dummyBuffer ); -/* Generated */ ARRAY_FREE( dummyBuffer ); -/* Generated */ break; -/* Generated */ case ENUM_CASE(MAType, TA_MAType_T3, T3 ): -/* Generated */ retCode = FUNCTION_CALL(T3)( startIdx, endIdx, inReal, -/* Generated */ optInTimePeriod, 0.7, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ break; -/* Generated */ default: -/* Generated */ retCode = ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ break; -/* Generated */ } -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MACD.c b/src/ta-lib/src/ta_func/ta_MACD.c deleted file mode 100644 index 3a4145b71..000000000 --- a/src/ta-lib/src/ta_func/ta_MACD.c +++ /dev/null @@ -1,806 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JPP JP Pienaar (j.pienaar@mci.co.za) - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 080403 JPP Fix #767653 for logic when swapping periods. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MacdLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int macdLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MACD_Lookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int tempInteger; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInSignalPeriod. */ -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* The lookback is driven by the signal line output. - * - * (must also account for the initial data consume - * by the slow period). - */ - - /* Make sure slow is really slower than - * the fast period! if not, swap... - */ - if( optInSlowPeriod < optInFastPeriod ) - { - /* swap */ - tempInteger = optInSlowPeriod; - optInSlowPeriod = optInFastPeriod; - optInFastPeriod = tempInteger; - } - - return LOOKBACK_CALL(EMA)( optInSlowPeriod ) - + LOOKBACK_CALL(EMA)( optInSignalPeriod ); -} - - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MACD - Moving Average Convergence/Divergence - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode macd( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MACD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInSignalPeriod. */ -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMACD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMACDSignal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMACDHist ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, - optInFastPeriod, - optInSlowPeriod, - optInSignalPeriod, - outBegIdx, - outNBElement, - outMACD, - outMACDSignal, - outMACDHist ); -} - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - // No INT function -#else - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) - enum class Core::RetCode Core::TA_INT_MACD( int startIdx, - int endIdx, - SubArray^ inReal, - int optInFastPeriod, /* 0 is fix 12 */ - int optInSlowPeriod, /* 0 is fix 26 */ - int optInSignalPeriod_2, - [Out]int% outBegIdx, - [Out]int% outNBElement, - SubArray^ outMACD, - SubArray^ outMACDSignal, - SubArray^ outMACDHist ) -#elif defined( _MANAGED ) - enum class Core::RetCode Core::TA_INT_MACD( int startIdx, - int endIdx, - cli::array^ inReal, - int optInFastPeriod, /* 0 is fix 12 */ - int optInSlowPeriod, /* 0 is fix 26 */ - int optInSignalPeriod_2, - [Out]int% outBegIdx, - [Out]int% outNBElement, - cli::array^ outMACD, - cli::array^ outMACDSignal, - cli::array^ outMACDHist ) -#elif defined( _JAVA ) -RetCode TA_INT_MACD( int startIdx, - int endIdx, - INPUT_TYPE inReal[], - int optInFastPeriod, /* 0 is fix 12 */ - int optInSlowPeriod, /* 0 is fix 26 */ - int optInSignalPeriod_2, - MInteger outBegIdx, - MInteger outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ) - -#else -TA_RetCode TA_PREFIX(INT_MACD)( int startIdx, - int endIdx, - const INPUT_TYPE inReal[], - int optInFastPeriod, /* 0 is fix 12 */ - int optInSlowPeriod, /* 0 is fix 26 */ - int optInSignalPeriod_2, - int *outBegIdx, - int *outNBElement, - double outMACD[], - double outMACDSignal[], - double outMACDHist[] ) -#endif -{ - ARRAY_REF(slowEMABuffer); - ARRAY_REF(fastEMABuffer); - double k1, k2; - ENUM_DECLARATION(RetCode) retCode; - int tempInteger; - VALUE_HANDLE_INT(outBegIdx1); - VALUE_HANDLE_INT(outNbElement1); - VALUE_HANDLE_INT(outBegIdx2); - VALUE_HANDLE_INT(outNbElement2); - int lookbackTotal, lookbackSignal; - int i; - - /* !!! A lot of speed optimization could be done - * !!! with this function. - * !!! - * !!! A better approach would be to use TA_INT_EMA - * !!! just to get the seeding values for the - * !!! fast and slow EMA. Then process the difference - * !!! in an allocated buffer until enough data is - * !!! available for the first signal value. - * !!! From that point all the processing can - * !!! be done in a tight loop. - * !!! - * !!! That approach will have the following - * !!! advantage: - * !!! 1) One mem allocation needed instead of two. - * !!! 2) The mem allocation size will be only the - * !!! signal lookback period instead of the - * !!! whole range of data. - * !!! 3) Processing will be done in a tight loop. - * !!! allowing to avoid a lot of memory store-load - * !!! operation. - * !!! 4) The memcpy at the end will be eliminated! - * !!! - * !!! If only I had time.... - */ - - /* Make sure slow is really slower than - * the fast period! if not, swap... - */ - if( optInSlowPeriod < optInFastPeriod ) - { - /* swap */ - tempInteger = optInSlowPeriod; - optInSlowPeriod = optInFastPeriod; - optInFastPeriod = tempInteger; - } - - /* Catch special case for fix 26/12 MACD. */ - if( optInSlowPeriod != 0 ) - k1 = PER_TO_K(optInSlowPeriod); - else - { - optInSlowPeriod = 26; - k1 = (double)0.075; /* Fix 26 */ - } - - if( optInFastPeriod != 0 ) - k2 = PER_TO_K(optInFastPeriod); - else - { - optInFastPeriod = 12; - k2 = (double)0.15; /* Fix 12 */ - } - - lookbackSignal = LOOKBACK_CALL(EMA)( optInSignalPeriod_2 ); - - /* Move up the start index if there is not - * enough initial data. - */ - lookbackTotal = lookbackSignal; - lookbackTotal += LOOKBACK_CALL(EMA)( optInSlowPeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Allocate intermediate buffer for fast/slow EMA. */ - tempInteger = (endIdx-startIdx)+1+lookbackSignal; - ARRAY_ALLOC( fastEMABuffer, tempInteger ); - #if !defined( _JAVA ) - if( !fastEMABuffer ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - ARRAY_ALLOC( slowEMABuffer, tempInteger ); - #if !defined( _JAVA ) - if( !slowEMABuffer ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastEMABuffer ); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - /* Calculate the slow EMA. - * - * Move back the startIdx to get enough data - * for the signal period. That way, once the - * signal calculation is done, all the output - * will start at the requested 'startIdx'. - */ - tempInteger = startIdx-lookbackSignal; - retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, - inReal, optInSlowPeriod, k1, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), slowEMABuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastEMABuffer ); - ARRAY_FREE( slowEMABuffer ); - return retCode; - } - - /* Calculate the fast EMA. */ - retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, - inReal, optInFastPeriod, k2, - VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), fastEMABuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastEMABuffer ); - ARRAY_FREE( slowEMABuffer ); - return retCode; - } - - /* Parano tests. Will be removed eventually. */ - if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || - (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || - (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || - (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastEMABuffer ); - ARRAY_FREE( slowEMABuffer ); - return TA_INTERNAL_ERROR(119); - } - - /* Calculate (fast EMA) - (slow EMA). */ - for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) - fastEMABuffer[i] = fastEMABuffer[i] - slowEMABuffer[i]; - - - /* Copy the result into the output for the caller. */ - ARRAY_MEMMOVE( outMACD, 0, fastEMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); - - /* Calculate the signal/trigger line. */ - retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, - fastEMABuffer, optInSignalPeriod_2, PER_TO_K(optInSignalPeriod_2), - VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); - - - ARRAY_FREE( fastEMABuffer ); - ARRAY_FREE( slowEMABuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Calculate the histogram. */ - for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) - outMACDHist[i] = outMACD[i]-outMACDSignal[i]; - - - /* All done! Indicate the output limits and return success. */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} -#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Macd( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode macd( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MACD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMACD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMACDSignal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMACDHist ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, -/* Generated */ optInFastPeriod, -/* Generated */ optInSlowPeriod, -/* Generated */ optInSignalPeriod, -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ outMACD, -/* Generated */ outMACDSignal, -/* Generated */ outMACDHist ); -/* Generated */ } -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ // No INT function -/* Generated */ #else -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TA_INT_MACD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ int optInSignalPeriod_2, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TA_INT_MACD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ int optInSignalPeriod_2, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ RetCode TA_INT_MACD( int startIdx, -/* Generated */ int endIdx, -/* Generated */ INPUT_TYPE inReal[], -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ int optInSignalPeriod_2, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_PREFIX(INT_MACD)( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const INPUT_TYPE inReal[], -/* Generated */ int optInFastPeriod, -/* Generated */ int optInSlowPeriod, -/* Generated */ int optInSignalPeriod_2, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(slowEMABuffer); -/* Generated */ ARRAY_REF(fastEMABuffer); -/* Generated */ double k1, k2; -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int tempInteger; -/* Generated */ VALUE_HANDLE_INT(outBegIdx1); -/* Generated */ VALUE_HANDLE_INT(outNbElement1); -/* Generated */ VALUE_HANDLE_INT(outBegIdx2); -/* Generated */ VALUE_HANDLE_INT(outNbElement2); -/* Generated */ int lookbackTotal, lookbackSignal; -/* Generated */ int i; -/* Generated */ if( optInSlowPeriod < optInFastPeriod ) -/* Generated */ { -/* Generated */ tempInteger = optInSlowPeriod; -/* Generated */ optInSlowPeriod = optInFastPeriod; -/* Generated */ optInFastPeriod = tempInteger; -/* Generated */ } -/* Generated */ if( optInSlowPeriod != 0 ) -/* Generated */ k1 = PER_TO_K(optInSlowPeriod); -/* Generated */ else -/* Generated */ { -/* Generated */ optInSlowPeriod = 26; -/* Generated */ k1 = (double)0.075; -/* Generated */ } -/* Generated */ if( optInFastPeriod != 0 ) -/* Generated */ k2 = PER_TO_K(optInFastPeriod); -/* Generated */ else -/* Generated */ { -/* Generated */ optInFastPeriod = 12; -/* Generated */ k2 = (double)0.15; -/* Generated */ } -/* Generated */ lookbackSignal = LOOKBACK_CALL(EMA)( optInSignalPeriod_2 ); -/* Generated */ lookbackTotal = lookbackSignal; -/* Generated */ lookbackTotal += LOOKBACK_CALL(EMA)( optInSlowPeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ tempInteger = (endIdx-startIdx)+1+lookbackSignal; -/* Generated */ ARRAY_ALLOC( fastEMABuffer, tempInteger ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !fastEMABuffer ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC( slowEMABuffer, tempInteger ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !slowEMABuffer ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastEMABuffer ); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ tempInteger = startIdx-lookbackSignal; -/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, -/* Generated */ inReal, optInSlowPeriod, k1, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), slowEMABuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastEMABuffer ); -/* Generated */ ARRAY_FREE( slowEMABuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( tempInteger, endIdx, -/* Generated */ inReal, optInFastPeriod, k2, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), fastEMABuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastEMABuffer ); -/* Generated */ ARRAY_FREE( slowEMABuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || -/* Generated */ (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || -/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || -/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastEMABuffer ); -/* Generated */ ARRAY_FREE( slowEMABuffer ); -/* Generated */ return TA_INTERNAL_ERROR(119); -/* Generated */ } -/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) -/* Generated */ fastEMABuffer[i] = fastEMABuffer[i] - slowEMABuffer[i]; -/* Generated */ ARRAY_MEMMOVE( outMACD, 0, fastEMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, -/* Generated */ fastEMABuffer, optInSignalPeriod_2, PER_TO_K(optInSignalPeriod_2), -/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); -/* Generated */ ARRAY_FREE( fastEMABuffer ); -/* Generated */ ARRAY_FREE( slowEMABuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) -/* Generated */ outMACDHist[i] = outMACD[i]-outMACDSignal[i]; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MACDEXT.c b/src/ta-lib/src/ta_func/ta_MACDEXT.c deleted file mode 100644 index d4415ef9d..000000000 --- a/src/ta-lib/src/ta_func/ta_MACDEXT.c +++ /dev/null @@ -1,721 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MacdExtLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int macdExtLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MACDEXT_Lookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSignalMAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int tempInteger, lookbackLargest; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastMAType < 0) || ((int)optInFastMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowMAType < 0) || ((int)optInSlowMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSignalPeriod. */ -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSignalMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSignalMAType < 0) || ((int)optInSignalMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Find the MA with the largest lookback */ - lookbackLargest = LOOKBACK_CALL(MA)( optInFastPeriod, optInFastMAType ); - tempInteger = LOOKBACK_CALL(MA)( optInSlowPeriod, optInSlowMAType ); - if( tempInteger > lookbackLargest ) - lookbackLargest = tempInteger; - - /* Add to the largest MA lookback the signal line lookback */ - return lookbackLargest + LOOKBACK_CALL(MA)( optInSignalPeriod, optInSignalMAType ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MACDEXT - MACD with controllable MA type - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInFastMAType: - * Type of Moving Average for fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInSlowMAType: - * Type of Moving Average for slow MA - * - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * optInSignalMAType: - * Type of Moving Average for signal line - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode macdExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MACDEXT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSignalMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ARRAY_REF( slowMABuffer ); - ARRAY_REF( fastMABuffer ); - ENUM_DECLARATION(RetCode) retCode; - int tempInteger; - VALUE_HANDLE_INT(outBegIdx1); - VALUE_HANDLE_INT(outNbElement1); - VALUE_HANDLE_INT(outBegIdx2); - VALUE_HANDLE_INT(outNbElement2); - int lookbackTotal, lookbackSignal, lookbackLargest; - int i; - ENUM_DECLARATION(MAType) tempMAType; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastMAType < 0) || ((int)optInFastMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowMAType < 0) || ((int)optInSlowMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSignalPeriod. */ -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSignalMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSignalMAType < 0) || ((int)optInSignalMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMACD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMACDSignal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMACDHist ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Make sure slow is really slower than - * the fast period! if not, swap... - */ - if( optInSlowPeriod < optInFastPeriod ) - { - /* swap period */ - tempInteger = optInSlowPeriod; - optInSlowPeriod = optInFastPeriod; - optInFastPeriod = tempInteger; - /* swap type */ - tempMAType = optInSlowMAType; - optInSlowMAType = optInFastMAType; - optInFastMAType = tempMAType; - } - - /* Find the MA with the largest lookback */ - lookbackLargest = LOOKBACK_CALL(MA)( optInFastPeriod, optInFastMAType ); - tempInteger = LOOKBACK_CALL(MA)( optInSlowPeriod, optInSlowMAType ); - if( tempInteger > lookbackLargest ) - lookbackLargest = tempInteger; - - /* Add the lookback needed for the signal line */ - lookbackSignal = LOOKBACK_CALL(MA)( optInSignalPeriod, optInSignalMAType ); - lookbackTotal = lookbackSignal+lookbackLargest; - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Allocate intermediate buffer for fast/slow MA. */ - tempInteger = (endIdx-startIdx)+1+lookbackSignal; - ARRAY_ALLOC( fastMABuffer, tempInteger ); - #if !defined( _JAVA ) - if( !fastMABuffer ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - ARRAY_ALLOC( slowMABuffer, tempInteger ); - #if !defined( _JAVA ) - if( !slowMABuffer ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastMABuffer ); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - /* Calculate the slow MA. - * - * Move back the startIdx to get enough data - * for the signal period. That way, once the - * signal calculation is done, all the output - * will start at the requested 'startIdx'. - */ - tempInteger = startIdx-lookbackSignal; - retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, - inReal, optInSlowPeriod, optInSlowMAType, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), - slowMABuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastMABuffer ); - ARRAY_FREE( slowMABuffer ); - return retCode; - } - - /* Calculate the fast MA. */ - retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, - inReal, optInFastPeriod, optInFastMAType, - VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), - fastMABuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastMABuffer ); - ARRAY_FREE( slowMABuffer ); - return retCode; - } - - /* Parano tests. Will be removed eventually. */ - if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || - (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || - (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || - (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - ARRAY_FREE( fastMABuffer ); - ARRAY_FREE( slowMABuffer ); - return TA_INTERNAL_ERROR(119); - } - - /* Calculate (fast MA) - (slow MA). */ - for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) - fastMABuffer[i] = fastMABuffer[i] - slowMABuffer[i]; - - /* Copy the result into the output for the caller. */ - ARRAY_MEMMOVE( outMACD, 0, fastMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); - - /* Calculate the signal/trigger line. */ - retCode = FUNCTION_CALL_DOUBLE(MA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, - fastMABuffer, optInSignalPeriod, optInSignalMAType, - VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); - - ARRAY_FREE( fastMABuffer ); - ARRAY_FREE( slowMABuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Calculate the histogram. */ - for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) - outMACDHist[i] = outMACD[i]-outMACDSignal[i]; - - /* All done! Indicate the output limits and return success. */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MacdExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode macdExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MAType optInSignalMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MACDEXT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInFastMAType, -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInSlowMAType, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSignalMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF( slowMABuffer ); -/* Generated */ ARRAY_REF( fastMABuffer ); -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int tempInteger; -/* Generated */ VALUE_HANDLE_INT(outBegIdx1); -/* Generated */ VALUE_HANDLE_INT(outNbElement1); -/* Generated */ VALUE_HANDLE_INT(outBegIdx2); -/* Generated */ VALUE_HANDLE_INT(outNbElement2); -/* Generated */ int lookbackTotal, lookbackSignal, lookbackLargest; -/* Generated */ int i; -/* Generated */ ENUM_DECLARATION(MAType) tempMAType; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastMAType < 0) || ((int)optInFastMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowMAType < 0) || ((int)optInSlowMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSignalMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSignalMAType < 0) || ((int)optInSignalMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMACD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMACDSignal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMACDHist ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( optInSlowPeriod < optInFastPeriod ) -/* Generated */ { -/* Generated */ tempInteger = optInSlowPeriod; -/* Generated */ optInSlowPeriod = optInFastPeriod; -/* Generated */ optInFastPeriod = tempInteger; -/* Generated */ tempMAType = optInSlowMAType; -/* Generated */ optInSlowMAType = optInFastMAType; -/* Generated */ optInFastMAType = tempMAType; -/* Generated */ } -/* Generated */ lookbackLargest = LOOKBACK_CALL(MA)( optInFastPeriod, optInFastMAType ); -/* Generated */ tempInteger = LOOKBACK_CALL(MA)( optInSlowPeriod, optInSlowMAType ); -/* Generated */ if( tempInteger > lookbackLargest ) -/* Generated */ lookbackLargest = tempInteger; -/* Generated */ lookbackSignal = LOOKBACK_CALL(MA)( optInSignalPeriod, optInSignalMAType ); -/* Generated */ lookbackTotal = lookbackSignal+lookbackLargest; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ tempInteger = (endIdx-startIdx)+1+lookbackSignal; -/* Generated */ ARRAY_ALLOC( fastMABuffer, tempInteger ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !fastMABuffer ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC( slowMABuffer, tempInteger ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !slowMABuffer ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastMABuffer ); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ tempInteger = startIdx-lookbackSignal; -/* Generated */ retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, -/* Generated */ inReal, optInSlowPeriod, optInSlowMAType, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ slowMABuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastMABuffer ); -/* Generated */ ARRAY_FREE( slowMABuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL(MA)( tempInteger, endIdx, -/* Generated */ inReal, optInFastPeriod, optInFastMAType, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), -/* Generated */ fastMABuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastMABuffer ); -/* Generated */ ARRAY_FREE( slowMABuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ if( (VALUE_HANDLE_GET(outBegIdx1) != tempInteger) || -/* Generated */ (VALUE_HANDLE_GET(outBegIdx2) != tempInteger) || -/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != VALUE_HANDLE_GET(outNbElement2)) || -/* Generated */ (VALUE_HANDLE_GET(outNbElement1) != (endIdx-startIdx)+1+lookbackSignal) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ ARRAY_FREE( fastMABuffer ); -/* Generated */ ARRAY_FREE( slowMABuffer ); -/* Generated */ return TA_INTERNAL_ERROR(119); -/* Generated */ } -/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement1); i++ ) -/* Generated */ fastMABuffer[i] = fastMABuffer[i] - slowMABuffer[i]; -/* Generated */ ARRAY_MEMMOVE( outMACD, 0, fastMABuffer, lookbackSignal, (endIdx-startIdx)+1 ); -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, VALUE_HANDLE_GET(outNbElement1)-1, -/* Generated */ fastMABuffer, optInSignalPeriod, optInSignalMAType, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), VALUE_HANDLE_OUT(outNbElement2), outMACDSignal ); -/* Generated */ ARRAY_FREE( fastMABuffer ); -/* Generated */ ARRAY_FREE( slowMABuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ for( i=0; i < VALUE_HANDLE_GET(outNbElement2); i++ ) -/* Generated */ outMACDHist[i] = outMACD[i]-outMACDSignal[i]; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = VALUE_HANDLE_GET(outNbElement2); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MACDFIX.c b/src/ta-lib/src/ta_func/ta_MACDFIX.c deleted file mode 100644 index eb3d518ba..000000000 --- a/src/ta-lib/src/ta_func/ta_MACDFIX.c +++ /dev/null @@ -1,314 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MacdFixLookback( int optInSignalPeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int macdFixLookback( int optInSignalPeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MACDFIX_Lookback( int optInSignalPeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInSignalPeriod. */ -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* The lookback is driven by the signal line output. - * - * (must also account for the initial data consume - * by the fix 26 period EMA). - */ - return LOOKBACK_CALL(EMA)( 26 ) - + LOOKBACK_CALL(EMA)( optInSignalPeriod ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MACDFIX - Moving Average Convergence/Divergence Fix 12/26 - * - * Input = double - * Output = double, double, double - * - * Optional Parameters - * ------------------- - * optInSignalPeriod:(From 1 to 100000) - * Smoothing for the signal line (nb of period) - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode macdFix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MACDFIX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSignalPeriod. */ -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMACD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMACDSignal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMACDHist ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, - 0, /* 0 indicate fix 12 == 0.15 for optInFastPeriod */ - 0, /* 0 indicate fix 26 == 0.075 for optInSlowPeriod */ - optInSignalPeriod, - outBegIdx, - outNBElement, - outMACD, - outMACDSignal, - outMACDHist ); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMACD, -/* Generated */ SubArray^ outMACDSignal, -/* Generated */ SubArray^ outMACDHist ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MacdFix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMACD, -/* Generated */ cli::array^ outMACDSignal, -/* Generated */ cli::array^ outMACDHist ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode macdFix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MACDFIX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInSignalPeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMACD[], -/* Generated */ double outMACDSignal[], -/* Generated */ double outMACDHist[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInSignalPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSignalPeriod = 9; -/* Generated */ else if( ((int)optInSignalPeriod < 1) || ((int)optInSignalPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMACD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMACDSignal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMACDHist ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ return FUNCTION_CALL(INT_MACD)( startIdx, endIdx, inReal, -/* Generated */ 0, -/* Generated */ 0, -/* Generated */ optInSignalPeriod, -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ outMACD, -/* Generated */ outMACDSignal, -/* Generated */ outMACDHist ); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MAMA.c b/src/ta-lib/src/ta_func/ta_MAMA.c deleted file mode 100644 index 921593518..000000000 --- a/src/ta-lib/src/ta_func/ta_MAMA.c +++ /dev/null @@ -1,727 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 023003 MF Initial Coding of MAMA. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MamaLookback( double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit ) /* From 0.01 to 0.99 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int mamaLookback( double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit ) /* From 0.01 to 0.99 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MAMA_Lookback( double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit ) /* From 0.01 to 0.99 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInFastLimit == TA_REAL_DEFAULT ) -/* Generated */ optInFastLimit = 5.000000e-1; -/* Generated */ else if( (optInFastLimit < 1.000000e-2) ||/* Generated */ (optInFastLimit > 9.900000e-1) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInSlowLimit == TA_REAL_DEFAULT ) -/* Generated */ optInSlowLimit = 5.000000e-2; -/* Generated */ else if( (optInSlowLimit < 1.000000e-2) ||/* Generated */ (optInSlowLimit > 9.900000e-1) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* The two parameters are not a factor to determine - * the lookback, but are still requested for - * consistency with all other Lookback functions. - */ - UNUSED_VARIABLE(optInFastLimit); - UNUSED_VARIABLE(optInSlowLimit); - - /* Lookback is a fix amount + the unstable period. - * - * - * The fix lookback is 32 and is establish as follow: - * - * 12 price bar to be compatible with the implementation - * of TradeStation found in John Ehlers book. - * 6 price bars for the Detrender - * 6 price bars for Q1 - * 3 price bars for jI - * 3 price bars for jQ - * 1 price bar for Re/Im - * 1 price bar for the Delta Phase - * ------- - * 32 Total - */ - - return 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MAMA,Mama); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MAMA - MESA Adaptive Moving Average - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastLimit:(From 0.01 to 0.99) - * Upper limit use in the adaptive algorithm - * - * optInSlowLimit:(From 0.01 to 0.99) - * Lower limit use in the adaptive algorithm - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMAMA, -/* Generated */ SubArray^ outFAMA ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMAMA, -/* Generated */ cli::array^ outFAMA ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMAMA[], -/* Generated */ double outFAMA[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MAMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMAMA[], -/* Generated */ double outFAMA[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int outIdx, i; - int lookbackTotal, today; - double tempReal, tempReal2; - - double adjustedPrevPeriod, period; - - /* Variable used for the price smoother (a weighted moving average). */ - int trailingWMAIdx; - double periodWMASum, periodWMASub, trailingWMAValue; - double smoothedValue; - - /* Variables used for the Hilbert Transormation */ - CONSTANT_DOUBLE(a) = 0.0962; - CONSTANT_DOUBLE(b) = 0.5769; - double hilbertTempReal; - int hilbertIdx; - - HILBERT_VARIABLES( detrender ); - HILBERT_VARIABLES( Q1 ); - HILBERT_VARIABLES( jI ); - HILBERT_VARIABLES( jQ ); - - double Q2, I2, prevQ2, prevI2, Re, Im; - - double I1ForOddPrev2, I1ForOddPrev3; - double I1ForEvenPrev2, I1ForEvenPrev3; - - double rad2Deg; - - double mama,fama,todayValue,prevPhase; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInFastLimit == TA_REAL_DEFAULT ) -/* Generated */ optInFastLimit = 5.000000e-1; -/* Generated */ else if( (optInFastLimit < 1.000000e-2) ||/* Generated */ (optInFastLimit > 9.900000e-1) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInSlowLimit == TA_REAL_DEFAULT ) -/* Generated */ optInSlowLimit = 5.000000e-2; -/* Generated */ else if( (optInSlowLimit < 1.000000e-2) ||/* Generated */ (optInSlowLimit > 9.900000e-1) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMAMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outFAMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Constant */ - rad2Deg = 180.0 / (4.0 * std_atan(1)); - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MAMA,Mama); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - /* Initialize the price smoother, which is simply a weighted - * moving average of the price. - * To understand this algorithm, I strongly suggest to understand - * first how TA_WMA is done. - */ - trailingWMAIdx = startIdx - lookbackTotal; - today = trailingWMAIdx; - - /* Initialization is same as WMA, except loop is unrolled - * for speed optimization. - */ - tempReal = inReal[today++]; - periodWMASub = tempReal; - periodWMASum = tempReal; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*2.0; - tempReal = inReal[today++]; - periodWMASub += tempReal; - periodWMASum += tempReal*3.0; - - trailingWMAValue = 0.0; - - /* Subsequent WMA value are evaluated by using - * the DO_PRICE_WMA macro. - */ - #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ - periodWMASub += varNewPrice; \ - periodWMASub -= trailingWMAValue; \ - periodWMASum += varNewPrice*4.0; \ - trailingWMAValue = inReal[trailingWMAIdx++]; \ - varToStoreSmoothedValue = periodWMASum*0.1; \ - periodWMASum -= periodWMASub; \ - } - - i = 9; - do - { - tempReal = inReal[today++]; - DO_PRICE_WMA(tempReal,smoothedValue); - } while( --i != 0); - - /* Initialize the circular buffers used by the hilbert - * transform logic. - * A buffer is used for odd day and another for even days. - * This minimize the number of memory access and floating point - * operations needed (note also that by using static circular buffer, - * no large dynamic memory allocation is needed for storing - * intermediate calculation!). - */ - hilbertIdx = 0; - - INIT_HILBERT_VARIABLES(detrender); - INIT_HILBERT_VARIABLES(Q1); - INIT_HILBERT_VARIABLES(jI); - INIT_HILBERT_VARIABLES(jQ); - - period = 0.0; - outIdx = 0; - - prevI2 = prevQ2 = 0.0; - Re = Im = 0.0; - mama = fama = 0.0; - I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; - I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; - - prevPhase = 0.0; - - /* The code is speed optimized and is most likely very - * hard to follow if you do not already know well the - * original algorithm. - * To understadn better, it is strongly suggested to look - * first at the Excel implementation in "test_MAMA.xls" included - * in this package. - */ - while( today <= endIdx ) - { - adjustedPrevPeriod = (0.075*period)+0.54; - - todayValue = inReal[today]; - DO_PRICE_WMA(todayValue,smoothedValue); - - if( (today%2) == 0 ) - { - /* Do the Hilbert Transforms for even price bar */ - DO_HILBERT_EVEN(detrender,smoothedValue); - DO_HILBERT_EVEN(Q1,detrender); - DO_HILBERT_EVEN(jI,I1ForEvenPrev3); - DO_HILBERT_EVEN(jQ,Q1); - if( ++hilbertIdx == 3 ) - hilbertIdx = 0; - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); - - /* The variable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForOddPrev3 = I1ForOddPrev2; - I1ForOddPrev2 = detrender; - - /* Put Alpha in tempReal2 */ - if( I1ForEvenPrev3 != 0.0 ) - tempReal2 = (std_atan(Q1/I1ForEvenPrev3)*rad2Deg); - else - tempReal2 = 0.0; - } - else - { - /* Do the Hilbert Transforms for odd price bar */ - DO_HILBERT_ODD(detrender,smoothedValue); - DO_HILBERT_ODD(Q1,detrender); - DO_HILBERT_ODD(jI,I1ForOddPrev3); - DO_HILBERT_ODD(jQ,Q1); - - Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); - I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); - - /* The varaiable I1 is the detrender delayed for - * 3 price bars. - * - * Save the current detrender value for being - * used by the "odd" logic later. - */ - I1ForEvenPrev3 = I1ForEvenPrev2; - I1ForEvenPrev2 = detrender; - - /* Put Alpha in tempReal2 */ - if( I1ForOddPrev3 != 0.0 ) - tempReal2 = (std_atan(Q1/I1ForOddPrev3)*rad2Deg); - else - tempReal2 = 0.0; - } - - /* Put Delta Phase into tempReal */ - tempReal = prevPhase - tempReal2; - prevPhase = tempReal2; - if( tempReal < 1.0 ) - tempReal = 1.0; - - /* Put Alpha into tempReal */ - if( tempReal > 1.0 ) - { - tempReal = optInFastLimit/tempReal; - if( tempReal < optInSlowLimit ) - tempReal = optInSlowLimit; - } - else - { - tempReal = optInFastLimit; - } - - /* Calculate MAMA, FAMA */ - mama = (tempReal*todayValue)+((1-tempReal)*mama); - tempReal *= 0.5; - fama = (tempReal*mama)+((1-tempReal)*fama); - if( today >= startIdx ) - { - outMAMA[outIdx] = mama; - outFAMA[outIdx++] = fama; - } - - /* Adjust the period for next price bar */ - Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); - Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); - prevQ2 = Q2; - prevI2 = I2; - tempReal = period; - if( (Im != 0.0) && (Re != 0.0) ) - period = 360.0 / (std_atan(Im/Re)*rad2Deg); - tempReal2 = 1.5*tempReal; - if( period > tempReal2) - period = tempReal2; - tempReal2 = 0.67*tempReal; - if( period < tempReal2 ) - period = tempReal2; - if( period < 6 ) - period = 6; - else if( period > 50 ) - period = 50; - period = (0.2*period) + (0.8 * tempReal); - - /* Ooof... let's do the next price bar now! */ - today++; - } - - /* Default return values */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMAMA, -/* Generated */ SubArray^ outFAMA ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMAMA, -/* Generated */ cli::array^ outFAMA ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mama( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMAMA[], -/* Generated */ double outFAMA[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MAMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ double optInFastLimit, /* From 0.01 to 0.99 */ -/* Generated */ double optInSlowLimit, /* From 0.01 to 0.99 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMAMA[], -/* Generated */ double outFAMA[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ int lookbackTotal, today; -/* Generated */ double tempReal, tempReal2; -/* Generated */ double adjustedPrevPeriod, period; -/* Generated */ int trailingWMAIdx; -/* Generated */ double periodWMASum, periodWMASub, trailingWMAValue; -/* Generated */ double smoothedValue; -/* Generated */ CONSTANT_DOUBLE(a) = 0.0962; -/* Generated */ CONSTANT_DOUBLE(b) = 0.5769; -/* Generated */ double hilbertTempReal; -/* Generated */ int hilbertIdx; -/* Generated */ HILBERT_VARIABLES( detrender ); -/* Generated */ HILBERT_VARIABLES( Q1 ); -/* Generated */ HILBERT_VARIABLES( jI ); -/* Generated */ HILBERT_VARIABLES( jQ ); -/* Generated */ double Q2, I2, prevQ2, prevI2, Re, Im; -/* Generated */ double I1ForOddPrev2, I1ForOddPrev3; -/* Generated */ double I1ForEvenPrev2, I1ForEvenPrev3; -/* Generated */ double rad2Deg; -/* Generated */ double mama,fama,todayValue,prevPhase; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInFastLimit == TA_REAL_DEFAULT ) -/* Generated */ optInFastLimit = 5.000000e-1; -/* Generated */ else if( (optInFastLimit < 1.000000e-2) || (optInFastLimit > 9.900000e-1) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInSlowLimit == TA_REAL_DEFAULT ) -/* Generated */ optInSlowLimit = 5.000000e-2; -/* Generated */ else if( (optInSlowLimit < 1.000000e-2) || (optInSlowLimit > 9.900000e-1) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMAMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outFAMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ rad2Deg = 180.0 / (4.0 * std_atan(1)); -/* Generated */ lookbackTotal = 32 + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MAMA,Mama); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ trailingWMAIdx = startIdx - lookbackTotal; -/* Generated */ today = trailingWMAIdx; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub = tempReal; -/* Generated */ periodWMASum = tempReal; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*2.0; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ periodWMASub += tempReal; -/* Generated */ periodWMASum += tempReal*3.0; -/* Generated */ trailingWMAValue = 0.0; -/* Generated */ #define DO_PRICE_WMA(varNewPrice,varToStoreSmoothedValue) { \ -/* Generated */ periodWMASub += varNewPrice; \ -/* Generated */ periodWMASub -= trailingWMAValue; \ -/* Generated */ periodWMASum += varNewPrice*4.0; \ -/* Generated */ trailingWMAValue = inReal[trailingWMAIdx++]; \ -/* Generated */ varToStoreSmoothedValue = periodWMASum*0.1; \ -/* Generated */ periodWMASum -= periodWMASub; \ -/* Generated */ } -/* Generated */ i = 9; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[today++]; -/* Generated */ DO_PRICE_WMA(tempReal,smoothedValue); -/* Generated */ } while( --i != 0); -/* Generated */ hilbertIdx = 0; -/* Generated */ INIT_HILBERT_VARIABLES(detrender); -/* Generated */ INIT_HILBERT_VARIABLES(Q1); -/* Generated */ INIT_HILBERT_VARIABLES(jI); -/* Generated */ INIT_HILBERT_VARIABLES(jQ); -/* Generated */ period = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ prevI2 = prevQ2 = 0.0; -/* Generated */ Re = Im = 0.0; -/* Generated */ mama = fama = 0.0; -/* Generated */ I1ForOddPrev3 = I1ForEvenPrev3 = 0.0; -/* Generated */ I1ForOddPrev2 = I1ForEvenPrev2 = 0.0; -/* Generated */ prevPhase = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ adjustedPrevPeriod = (0.075*period)+0.54; -/* Generated */ todayValue = inReal[today]; -/* Generated */ DO_PRICE_WMA(todayValue,smoothedValue); -/* Generated */ if( (today%2) == 0 ) -/* Generated */ { -/* Generated */ DO_HILBERT_EVEN(detrender,smoothedValue); -/* Generated */ DO_HILBERT_EVEN(Q1,detrender); -/* Generated */ DO_HILBERT_EVEN(jI,I1ForEvenPrev3); -/* Generated */ DO_HILBERT_EVEN(jQ,Q1); -/* Generated */ if( ++hilbertIdx == 3 ) -/* Generated */ hilbertIdx = 0; -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForEvenPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForOddPrev3 = I1ForOddPrev2; -/* Generated */ I1ForOddPrev2 = detrender; -/* Generated */ if( I1ForEvenPrev3 != 0.0 ) -/* Generated */ tempReal2 = (std_atan(Q1/I1ForEvenPrev3)*rad2Deg); -/* Generated */ else -/* Generated */ tempReal2 = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ DO_HILBERT_ODD(detrender,smoothedValue); -/* Generated */ DO_HILBERT_ODD(Q1,detrender); -/* Generated */ DO_HILBERT_ODD(jI,I1ForOddPrev3); -/* Generated */ DO_HILBERT_ODD(jQ,Q1); -/* Generated */ Q2 = (0.2*(Q1 + jI)) + (0.8*prevQ2); -/* Generated */ I2 = (0.2*(I1ForOddPrev3 - jQ)) + (0.8*prevI2); -/* Generated */ I1ForEvenPrev3 = I1ForEvenPrev2; -/* Generated */ I1ForEvenPrev2 = detrender; -/* Generated */ if( I1ForOddPrev3 != 0.0 ) -/* Generated */ tempReal2 = (std_atan(Q1/I1ForOddPrev3)*rad2Deg); -/* Generated */ else -/* Generated */ tempReal2 = 0.0; -/* Generated */ } -/* Generated */ tempReal = prevPhase - tempReal2; -/* Generated */ prevPhase = tempReal2; -/* Generated */ if( tempReal < 1.0 ) -/* Generated */ tempReal = 1.0; -/* Generated */ if( tempReal > 1.0 ) -/* Generated */ { -/* Generated */ tempReal = optInFastLimit/tempReal; -/* Generated */ if( tempReal < optInSlowLimit ) -/* Generated */ tempReal = optInSlowLimit; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ tempReal = optInFastLimit; -/* Generated */ } -/* Generated */ mama = (tempReal*todayValue)+((1-tempReal)*mama); -/* Generated */ tempReal *= 0.5; -/* Generated */ fama = (tempReal*mama)+((1-tempReal)*fama); -/* Generated */ if( today >= startIdx ) -/* Generated */ { -/* Generated */ outMAMA[outIdx] = mama; -/* Generated */ outFAMA[outIdx++] = fama; -/* Generated */ } -/* Generated */ Re = (0.2*((I2*prevI2)+(Q2*prevQ2)))+(0.8*Re); -/* Generated */ Im = (0.2*((I2*prevQ2)-(Q2*prevI2)))+(0.8*Im); -/* Generated */ prevQ2 = Q2; -/* Generated */ prevI2 = I2; -/* Generated */ tempReal = period; -/* Generated */ if( (Im != 0.0) && (Re != 0.0) ) -/* Generated */ period = 360.0 / (std_atan(Im/Re)*rad2Deg); -/* Generated */ tempReal2 = 1.5*tempReal; -/* Generated */ if( period > tempReal2) -/* Generated */ period = tempReal2; -/* Generated */ tempReal2 = 0.67*tempReal; -/* Generated */ if( period < tempReal2 ) -/* Generated */ period = tempReal2; -/* Generated */ if( period < 6 ) -/* Generated */ period = 6; -/* Generated */ else if( period > 50 ) -/* Generated */ period = 50; -/* Generated */ period = (0.2*period) + (0.8 * tempReal); -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MAVP.c b/src/ta-lib/src/ta_func/ta_MAVP.c deleted file mode 100644 index 0674d551f..000000000 --- a/src/ta-lib/src/ta_func/ta_MAVP.c +++ /dev/null @@ -1,506 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 021807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MovingAverageVariablePeriodLookback( int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int movingAverageVariablePeriodLookback( int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MAVP_Lookback( int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInMinPeriod. */ -/* Generated */ if( (int)optInMinPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInMinPeriod = 2; -/* Generated */ else if( ((int)optInMinPeriod < 2) || ((int)optInMinPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInMaxPeriod. */ -/* Generated */ if( (int)optInMaxPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInMaxPeriod = 30; -/* Generated */ else if( ((int)optInMaxPeriod < 2) || ((int)optInMaxPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - return LOOKBACK_CALL(MA)(optInMaxPeriod, optInMAType); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MAVP - Moving average with variable period - * - * Input = double, double - * Output = double - * - * Optional Parameters - * ------------------- - * optInMinPeriod:(From 2 to 100000) - * Value less than minimum will be changed to Minimum period - * - * optInMaxPeriod:(From 2 to 100000) - * Value higher than maximum will be changed to Maximum period - * - * optInMAType: - * Type of Moving Average - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ SubArray^ inPeriods, -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ cli::array^ inPeriods, -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode movingAverageVariablePeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ double inPeriods[], -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MAVP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ const double inPeriods[], -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int i, j, lookbackTotal, outputSize, tempInt, curPeriod; - ARRAY_INT_REF(localPeriodArray); - ARRAY_REF(localOutputArray); - VALUE_HANDLE_INT(localBegIdx); - VALUE_HANDLE_INT(localNbElement); - ENUM_DECLARATION(RetCode) retCode; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inPeriods ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInMinPeriod. */ -/* Generated */ if( (int)optInMinPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInMinPeriod = 2; -/* Generated */ else if( ((int)optInMinPeriod < 2) || ((int)optInMinPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInMaxPeriod. */ -/* Generated */ if( (int)optInMaxPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInMaxPeriod = 30; -/* Generated */ else if( ((int)optInMaxPeriod < 2) || ((int)optInMaxPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = LOOKBACK_CALL(MA)(optInMaxPeriod,optInMAType); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate exact output size */ - if( lookbackTotal > startIdx ) - tempInt = lookbackTotal; - else - tempInt = startIdx; - if( tempInt > endIdx ) - { - /* No output */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - outputSize = endIdx - tempInt + 1; - - /* Allocate intermediate local buffer. */ - ARRAY_ALLOC(localOutputArray,outputSize); - ARRAY_INT_ALLOC(localPeriodArray,outputSize); - - /* Copy caller array of period into local buffer. - * At the same time, truncate to min/max. - */ - for( i=0; i < outputSize; i++ ) - { - tempInt = (int)(inPeriods[startIdx+i]); - if( tempInt < optInMinPeriod ) - tempInt = optInMinPeriod; - else if( tempInt > optInMaxPeriod ) - tempInt = optInMaxPeriod; - localPeriodArray[i] = tempInt; - } - - /* Process each element of the input. - * For each possible period value, the MA is calculated - * only once. - * The outReal is then fill up for all element with - * the same period. - * A local flag (value 0) is set in localPeriodArray - * to avoid doing a second time the same calculation. - */ - for( i=0; i < outputSize; i++ ) - { - curPeriod = localPeriodArray[i]; - if( curPeriod != 0 ) - { - /* TODO: This portion of the function can be slightly speed - * optimized by making the function without unstable period - * start their calculation at 'startIdx+i' instead of startIdx. - */ - - /* Calculation of the MA required. */ - retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, - curPeriod, optInMAType, - VALUE_HANDLE_OUT(localBegIdx),VALUE_HANDLE_OUT(localNbElement),localOutputArray ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - ARRAY_FREE(localOutputArray); - ARRAY_INT_FREE(localPeriodArray); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - outReal[i] = localOutputArray[i]; - for( j=i+1; j < outputSize; j++ ) - { - if( localPeriodArray[j] == curPeriod ) - { - localPeriodArray[j] = 0; /* Flag to avoid recalculation */ - outReal[j] = localOutputArray[j]; - } - } - } - } - - ARRAY_FREE(localOutputArray); - ARRAY_INT_FREE(localPeriodArray); - - /* Done. Inform the caller of the success. */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outputSize; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ SubArray^ inPeriods, -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MovingAverageVariablePeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ cli::array^ inPeriods, -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode movingAverageVariablePeriod( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ float inPeriods[], -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MAVP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ const float inPeriods[], -/* Generated */ int optInMinPeriod, /* From 2 to 100000 */ -/* Generated */ int optInMaxPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i, j, lookbackTotal, outputSize, tempInt, curPeriod; -/* Generated */ ARRAY_INT_REF(localPeriodArray); -/* Generated */ ARRAY_REF(localOutputArray); -/* Generated */ VALUE_HANDLE_INT(localBegIdx); -/* Generated */ VALUE_HANDLE_INT(localNbElement); -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inPeriods ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInMinPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInMinPeriod = 2; -/* Generated */ else if( ((int)optInMinPeriod < 2) || ((int)optInMinPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInMaxPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInMaxPeriod = 30; -/* Generated */ else if( ((int)optInMaxPeriod < 2) || ((int)optInMaxPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(MA)(optInMaxPeriod,optInMAType); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ if( lookbackTotal > startIdx ) -/* Generated */ tempInt = lookbackTotal; -/* Generated */ else -/* Generated */ tempInt = startIdx; -/* Generated */ if( tempInt > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outputSize = endIdx - tempInt + 1; -/* Generated */ ARRAY_ALLOC(localOutputArray,outputSize); -/* Generated */ ARRAY_INT_ALLOC(localPeriodArray,outputSize); -/* Generated */ for( i=0; i < outputSize; i++ ) -/* Generated */ { -/* Generated */ tempInt = (int)(inPeriods[startIdx+i]); -/* Generated */ if( tempInt < optInMinPeriod ) -/* Generated */ tempInt = optInMinPeriod; -/* Generated */ else if( tempInt > optInMaxPeriod ) -/* Generated */ tempInt = optInMaxPeriod; -/* Generated */ localPeriodArray[i] = tempInt; -/* Generated */ } -/* Generated */ for( i=0; i < outputSize; i++ ) -/* Generated */ { -/* Generated */ curPeriod = localPeriodArray[i]; -/* Generated */ if( curPeriod != 0 ) -/* Generated */ { -/* Generated */ retCode = FUNCTION_CALL(MA)( startIdx, endIdx, inReal, -/* Generated */ curPeriod, optInMAType, -/* Generated */ VALUE_HANDLE_OUT(localBegIdx),VALUE_HANDLE_OUT(localNbElement),localOutputArray ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ ARRAY_FREE(localOutputArray); -/* Generated */ ARRAY_INT_FREE(localPeriodArray); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ outReal[i] = localOutputArray[i]; -/* Generated */ for( j=i+1; j < outputSize; j++ ) -/* Generated */ { -/* Generated */ if( localPeriodArray[j] == curPeriod ) -/* Generated */ { -/* Generated */ localPeriodArray[j] = 0; -/* Generated */ outReal[j] = localOutputArray[j]; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ ARRAY_FREE(localOutputArray); -/* Generated */ ARRAY_INT_FREE(localPeriodArray); -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outputSize; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MAX.c b/src/ta-lib/src/ta_func/ta_MAX.c deleted file mode 100644 index 21c8811ed..000000000 --- a/src/ta-lib/src/ta_func/ta_MAX.c +++ /dev/null @@ -1,384 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JV Jesus Viver <324122@cienz.unizar.es> - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 101902 JV Speed optimization of the algorithm - * 102202 MF Speed optimize a bit further - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MaxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int maxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MAX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MAX - Highest value over a specified period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Max( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Max( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #undef max -/* Generated */ public RetCode max( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MAX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double highest, tmp; - int outIdx, nbInitialElementNeeded; - int trailingIdx, today, i, highestIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - highestIdx = -1; - highest = 0.0; - - while( today <= endIdx ) - { - tmp = inReal[today]; - - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inReal[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inReal[i]; - if( tmp > highest ) - { - highestIdx = i; - highest = tmp; - } - } - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - } - - outReal[outIdx++] = highest; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Max( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Max( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode max( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MAX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double highest, tmp; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, today, i, highestIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ highestIdx = -1; -/* Generated */ highest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inReal[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inReal[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inReal[i]; -/* Generated */ if( tmp > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ outReal[outIdx++] = highest; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MAXINDEX.c b/src/ta-lib/src/ta_func/ta_MAXINDEX.c deleted file mode 100644 index 9c264b290..000000000 --- a/src/ta-lib/src/ta_func/ta_MAXINDEX.c +++ /dev/null @@ -1,379 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120806 AC Creation (equal to MAX but outputs index) - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MaxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int maxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MAXINDEX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MAXINDEX - Index of highest value over a specified period - * - * Input = double - * Output = int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode maxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MAXINDEX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double highest, tmp; - int outIdx, nbInitialElementNeeded; - int trailingIdx, today, i, highestIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - highestIdx = -1; - highest = 0.0; - - while( today <= endIdx ) - { - tmp = inReal[today]; - - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inReal[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inReal[i]; - if( tmp > highest ) - { - highestIdx = i; - highest = tmp; - } - } - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - } - - outInteger[outIdx++] = highestIdx; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode maxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MAXINDEX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double highest, tmp; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, today, i, highestIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ highestIdx = -1; -/* Generated */ highest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inReal[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inReal[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inReal[i]; -/* Generated */ if( tmp > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ outInteger[outIdx++] = highestIdx; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MEDPRICE.c b/src/ta-lib/src/ta_func/ta_MEDPRICE.c deleted file mode 100644 index 94786204b..000000000 --- a/src/ta-lib/src/ta_func/ta_MEDPRICE.c +++ /dev/null @@ -1,275 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 112605 MF Fix outBegIdx when startIdx != 0 - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MedPriceLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int medPriceLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MEDPRICE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* This function have no lookback needed. */ - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MEDPRICE - Median Price - * - * Input = High, Low - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode medPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MEDPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int outIdx, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* MEDPRICE = (High + Low ) / 2 - * This is the high and low of the same price bar. - * - * See MIDPRICE to use instead the highest high and lowest - * low over multiple price bar. - */ - - outIdx = 0; - - for( i=startIdx; i <= endIdx; i++ ) - { - outReal[outIdx++] = (inHigh[i]+inLow[i])/2.0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MedPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode medPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MEDPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ outIdx = 0; -/* Generated */ for( i=startIdx; i <= endIdx; i++ ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = (inHigh[i]+inLow[i])/2.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MFI.c b/src/ta-lib/src/ta_func/ta_MFI.c deleted file mode 100644 index 045dfa858..000000000 --- a/src/ta-lib/src/ta_func/ta_MFI.c +++ /dev/null @@ -1,586 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * BT BobTrader (TADoc.org forum user). - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 062704 MF Prevent divide by zero. - * 121705 MF Java port related changes. - * 060907 MF,BT Fix #1727704. MFI logic bug when no price movement - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MfiLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int mfiLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MFI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MFI,Mfi); -} - -#if defined( _MANAGED ) - ref class MoneyFlow - { - public: - double positive; - double negative; - }; -#elif defined( _JAVA ) - // See MoneyFlow.java for the definition. -#else - typedef struct - { - double positive; - double negative; - } MoneyFlow; -#endif - - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MFI - Money Flow Index - * - * Input = High, Low, Close, Volume - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ SubArray^ inVolume, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ cli::array^ inVolume, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mfi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ double inVolume[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MFI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ const double inVolume[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double posSumMF, negSumMF, prevValue; - double tempValue1, tempValue2; - int lookbackTotal, outIdx, i, today; - - CIRCBUF_PROLOG_CLASS( mflow, MoneyFlow, 50 ); /* Id, Type, Static Size */ - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - CIRCBUF_INIT_CLASS( mflow, MoneyFlow, optInTimePeriod ); - - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MFI,Mfi); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - CIRCBUF_DESTROY(mflow); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; /* Index into the output. */ - - /* Accumulate the positive and negative money flow - * among the initial period. - */ - today = startIdx-lookbackTotal; - prevValue = (inHigh[today]+inLow[today]+inClose[today])/3.0; - - posSumMF = 0.0; - negSumMF = 0.0; - today++; - for( i=optInTimePeriod; i > 0; i-- ) - { - tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - tempValue1 *= inVolume[today++]; - if( tempValue2 < 0 ) - { - CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; - negSumMF += tempValue1; - CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; - } - else if( tempValue2 > 0 ) - { - CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; - posSumMF += tempValue1; - CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; - } - else - { - CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; - CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; - } - - CIRCBUF_NEXT(mflow); - } - - /* The following two equations are equivalent: - * MFI = 100 - (100 / 1 + (posSumMF/negSumMF)) - * MFI = 100 * (posSumMF/(posSumMF+negSumMF)) - * The second equation is used here for speed optimization. - */ - if( today > startIdx ) - { - tempValue1 = posSumMF+negSumMF; - if( tempValue1 < 1.0 ) - outReal[outIdx++] = 0.0; - else - outReal[outIdx++] = 100.0*(posSumMF/tempValue1); - } - else - { - /* Skip the unstable period. Do the processing - * but do not write it in the output. - */ - while( today < startIdx ) - { - posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; - negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; - - tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - tempValue1 *= inVolume[today++]; - if( tempValue2 < 0 ) - { - CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; - negSumMF += tempValue1; - CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; - } - else if( tempValue2 > 0 ) - { - CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; - posSumMF += tempValue1; - CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; - } - else - { - CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; - CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; - } - - CIRCBUF_NEXT(mflow); - } - } - - /* Unstable period skipped... now continue - * processing if needed. - */ - while( today <= endIdx ) - { - posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; - negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; - - tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - tempValue1 *= inVolume[today++]; - if( tempValue2 < 0 ) - { - CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; - negSumMF += tempValue1; - CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; - } - else if( tempValue2 > 0 ) - { - CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; - posSumMF += tempValue1; - CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; - } - else - { - CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; - CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; - } - - tempValue1 = posSumMF+negSumMF; - if( tempValue1 < 1.0 ) - outReal[outIdx++] = 0.0; - else - outReal[outIdx++] = 100.0*(posSumMF/tempValue1); - - CIRCBUF_NEXT(mflow); - } - - CIRCBUF_DESTROY(mflow); - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ SubArray^ inVolume, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mfi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ cli::array^ inVolume, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mfi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ float inVolume[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MFI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ const float inVolume[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double posSumMF, negSumMF, prevValue; -/* Generated */ double tempValue1, tempValue2; -/* Generated */ int lookbackTotal, outIdx, i, today; -/* Generated */ CIRCBUF_PROLOG_CLASS( mflow, MoneyFlow, 50 ); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose||!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ CIRCBUF_INIT_CLASS( mflow, MoneyFlow, optInTimePeriod ); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MFI,Mfi); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ CIRCBUF_DESTROY(mflow); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx-lookbackTotal; -/* Generated */ prevValue = (inHigh[today]+inLow[today]+inClose[today])/3.0; -/* Generated */ posSumMF = 0.0; -/* Generated */ negSumMF = 0.0; -/* Generated */ today++; -/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) -/* Generated */ { -/* Generated */ tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ tempValue1 *= inVolume[today++]; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; -/* Generated */ negSumMF += tempValue1; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; -/* Generated */ } -/* Generated */ else if( tempValue2 > 0 ) -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; -/* Generated */ posSumMF += tempValue1; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; -/* Generated */ } -/* Generated */ CIRCBUF_NEXT(mflow); -/* Generated */ } -/* Generated */ if( today > startIdx ) -/* Generated */ { -/* Generated */ tempValue1 = posSumMF+negSumMF; -/* Generated */ if( tempValue1 < 1.0 ) -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 100.0*(posSumMF/tempValue1); -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ while( today < startIdx ) -/* Generated */ { -/* Generated */ posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; -/* Generated */ negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; -/* Generated */ tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ tempValue1 *= inVolume[today++]; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; -/* Generated */ negSumMF += tempValue1; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; -/* Generated */ } -/* Generated */ else if( tempValue2 > 0 ) -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; -/* Generated */ posSumMF += tempValue1; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; -/* Generated */ } -/* Generated */ CIRCBUF_NEXT(mflow); -/* Generated */ } -/* Generated */ } -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ posSumMF -= CIRCBUF_REF(mflow[mflow_Idx])positive; -/* Generated */ negSumMF -= CIRCBUF_REF(mflow[mflow_Idx])negative; -/* Generated */ tempValue1 = (inHigh[today]+inLow[today]+inClose[today])/3.0; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ tempValue1 *= inVolume[today++]; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = tempValue1; -/* Generated */ negSumMF += tempValue1; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; -/* Generated */ } -/* Generated */ else if( tempValue2 > 0 ) -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = tempValue1; -/* Generated */ posSumMF += tempValue1; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])positive = 0.0; -/* Generated */ CIRCBUF_REF(mflow[mflow_Idx])negative = 0.0; -/* Generated */ } -/* Generated */ tempValue1 = posSumMF+negSumMF; -/* Generated */ if( tempValue1 < 1.0 ) -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 100.0*(posSumMF/tempValue1); -/* Generated */ CIRCBUF_NEXT(mflow); -/* Generated */ } -/* Generated */ CIRCBUF_DESTROY(mflow); -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MIDPOINT.c b/src/ta-lib/src/ta_func/ta_MIDPOINT.c deleted file mode 100644 index 8f7ef7e81..000000000 --- a/src/ta-lib/src/ta_func/ta_MIDPOINT.c +++ /dev/null @@ -1,356 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MidPointLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int midPointLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MIDPOINT_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MIDPOINT - MidPoint over period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode midPoint( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MIDPOINT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - double lowest, highest, tmp; - int outIdx, nbInitialElementNeeded; - int trailingIdx, today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Find the highest and lowest value of a timeserie - * over the period. - * MIDPOINT = (Highest Value + Lowest Value)/2 - * - * See MIDPRICE if the input is a price bar with a - * high and low timeserie. - */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - - while( today <= endIdx ) - { - lowest = inReal[trailingIdx++]; - highest = lowest; - for( i=trailingIdx; i <= today; i++ ) - { - tmp = inReal[i]; - if( tmp < lowest ) lowest= tmp; - else if( tmp > highest) highest = tmp; - } - - outReal[outIdx++] = (highest+lowest)/2.0; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MidPoint( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode midPoint( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MIDPOINT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, highest, tmp; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ lowest = inReal[trailingIdx++]; -/* Generated */ highest = lowest; -/* Generated */ for( i=trailingIdx; i <= today; i++ ) -/* Generated */ { -/* Generated */ tmp = inReal[i]; -/* Generated */ if( tmp < lowest ) lowest= tmp; -/* Generated */ else if( tmp > highest) highest = tmp; -/* Generated */ } -/* Generated */ outReal[outIdx++] = (highest+lowest)/2.0; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MIDPRICE.c b/src/ta-lib/src/ta_func/ta_MIDPRICE.c deleted file mode 100644 index 0c25fba3b..000000000 --- a/src/ta-lib/src/ta_func/ta_MIDPRICE.c +++ /dev/null @@ -1,369 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MidPriceLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int midPriceLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MIDPRICE_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MIDPRICE - Midpoint Price over period - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode midPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MIDPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double lowest, highest, tmp; - int outIdx, nbInitialElementNeeded; - int trailingIdx, today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* MIDPRICE = (Highest High + Lowest Low)/2 - * - * This function is equivalent to MEDPRICE when the - * period is 1. - */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - - while( today <= endIdx ) - { - lowest = inLow[trailingIdx]; - highest = inHigh[trailingIdx]; - trailingIdx++; - for( i=trailingIdx; i <= today; i++ ) - { - tmp = inLow[i]; - if( tmp < lowest ) lowest= tmp; - tmp = inHigh[i]; - if( tmp > highest) highest = tmp; - } - - outReal[outIdx++] = (highest+lowest)/2.0; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MidPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode midPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MIDPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, highest, tmp; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ lowest = inLow[trailingIdx]; -/* Generated */ highest = inHigh[trailingIdx]; -/* Generated */ trailingIdx++; -/* Generated */ for( i=trailingIdx; i <= today; i++ ) -/* Generated */ { -/* Generated */ tmp = inLow[i]; -/* Generated */ if( tmp < lowest ) lowest= tmp; -/* Generated */ tmp = inHigh[i]; -/* Generated */ if( tmp > highest) highest = tmp; -/* Generated */ } -/* Generated */ outReal[outIdx++] = (highest+lowest)/2.0; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MIN.c b/src/ta-lib/src/ta_func/ta_MIN.c deleted file mode 100644 index cdf5c4404..000000000 --- a/src/ta-lib/src/ta_func/ta_MIN.c +++ /dev/null @@ -1,384 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JV Jesus Viver <324122@cienz.unizar.es> - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 101902 JV Speed optimization of the algorithm - * 102202 MF Speed optimize a bit further - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MinLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int minLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MIN_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MIN - Lowest value over a specified period - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Min( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Min( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #undef min -/* Generated */ public RetCode min( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MIN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double lowest, tmp; - int outIdx, nbInitialElementNeeded; - int trailingIdx, lowestIdx, today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - lowestIdx = -1; - lowest = 0.0; - - while( today <= endIdx ) - { - tmp = inReal[today]; - - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inReal[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inReal[i]; - if( tmp < lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - } - - outReal[outIdx++] = lowest; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Min( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Min( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode min( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MIN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, tmp; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, lowestIdx, today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ lowestIdx = -1; -/* Generated */ lowest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inReal[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inReal[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inReal[i]; -/* Generated */ if( tmp < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ outReal[outIdx++] = lowest; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MININDEX.c b/src/ta-lib/src/ta_func/ta_MININDEX.c deleted file mode 100644 index 5b5858bc2..000000000 --- a/src/ta-lib/src/ta_func/ta_MININDEX.c +++ /dev/null @@ -1,379 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120806 AC Creation (equal to MIN but outputs index) - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MinIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int minIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MININDEX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MININDEX - Index of lowest value over a specified period - * - * Input = double - * Output = int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MININDEX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double lowest, tmp; - int outIdx, nbInitialElementNeeded; - int trailingIdx, lowestIdx, today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - lowestIdx = -1; - lowest = 0.0; - - while( today <= endIdx ) - { - tmp = inReal[today]; - - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inReal[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inReal[i]; - if( tmp < lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - } - - outInteger[outIdx++] = lowestIdx; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outInteger ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outInteger ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MININDEX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outInteger[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, tmp; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, lowestIdx, today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outInteger ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ lowestIdx = -1; -/* Generated */ lowest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inReal[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inReal[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inReal[i]; -/* Generated */ if( tmp < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ outInteger[outIdx++] = lowestIdx; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MINMAX.c b/src/ta-lib/src/ta_func/ta_MINMAX.c deleted file mode 100644 index 15a5642ac..000000000 --- a/src/ta-lib/src/ta_func/ta_MINMAX.c +++ /dev/null @@ -1,441 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120906 AC Creation - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MinMaxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int minMaxLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MINMAX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MINMAX - Lowest and highest values over a specified period - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMin, -/* Generated */ SubArray^ outMax ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMin, -/* Generated */ cli::array^ outMax ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minMax( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMin[], -/* Generated */ double outMax[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MINMAX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMin[], -/* Generated */ double outMax[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double highest, lowest, tmpHigh, tmpLow; - int outIdx, nbInitialElementNeeded; - int trailingIdx, today, i, highestIdx, lowestIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMin ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMax ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - highestIdx = -1; - highest = 0.0; - lowestIdx = -1; - lowest = 0.0; - - while( today <= endIdx ) - { - tmpLow = tmpHigh = inReal[today]; - - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inReal[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmpHigh = inReal[i]; - if( tmpHigh > highest ) - { - highestIdx = i; - highest = tmpHigh; - } - } - } - else if( tmpHigh >= highest ) - { - highestIdx = today; - highest = tmpHigh; - } - - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inReal[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmpLow = inReal[i]; - if( tmpLow < lowest ) - { - lowestIdx = i; - lowest = tmpLow; - } - } - } - else if( tmpLow <= lowest ) - { - lowestIdx = today; - lowest = tmpLow; - } - - outMax[outIdx] = highest; - outMin[outIdx] = lowest; - outIdx++; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMin, -/* Generated */ SubArray^ outMax ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinMax( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMin, -/* Generated */ cli::array^ outMax ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minMax( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outMin[], -/* Generated */ double outMax[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MINMAX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outMin[], -/* Generated */ double outMax[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double highest, lowest, tmpHigh, tmpLow; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, today, i, highestIdx, lowestIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMin ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMax ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ highestIdx = -1; -/* Generated */ highest = 0.0; -/* Generated */ lowestIdx = -1; -/* Generated */ lowest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmpLow = tmpHigh = inReal[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inReal[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmpHigh = inReal[i]; -/* Generated */ if( tmpHigh > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmpHigh; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmpHigh >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmpHigh; -/* Generated */ } -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inReal[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmpLow = inReal[i]; -/* Generated */ if( tmpLow < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmpLow; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmpLow <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmpLow; -/* Generated */ } -/* Generated */ outMax[outIdx] = highest; -/* Generated */ outMin[outIdx] = lowest; -/* Generated */ outIdx++; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MINMAXINDEX.c b/src/ta-lib/src/ta_func/ta_MINMAXINDEX.c deleted file mode 100644 index 878ab1a66..000000000 --- a/src/ta-lib/src/ta_func/ta_MINMAXINDEX.c +++ /dev/null @@ -1,441 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AC Angelo Ciceri - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120906 AC Creation (equal to MINMAX but outputs index) - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MinMaxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int minMaxIndexLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MINMAXINDEX_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MINMAXINDEX - Indexes of lowest and highest values over a specified period - * - * Input = double - * Output = int, int - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMinIdx, -/* Generated */ SubArray^ outMaxIdx ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMinIdx, -/* Generated */ cli::array^ outMaxIdx ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minMaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outMinIdx[], -/* Generated */ int outMaxIdx[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MINMAXINDEX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outMinIdx[], -/* Generated */ int outMaxIdx[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double highest, lowest, tmpHigh, tmpLow; - int outIdx, nbInitialElementNeeded; - int trailingIdx, today, i, highestIdx, lowestIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMinIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outMaxIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - highestIdx = -1; - highest = 0.0; - lowestIdx = -1; - lowest = 0.0; - - while( today <= endIdx ) - { - tmpLow = tmpHigh = inReal[today]; - - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inReal[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmpHigh = inReal[i]; - if( tmpHigh > highest ) - { - highestIdx = i; - highest = tmpHigh; - } - } - } - else if( tmpHigh >= highest ) - { - highestIdx = today; - highest = tmpHigh; - } - - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inReal[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmpLow = inReal[i]; - if( tmpLow < lowest ) - { - lowestIdx = i; - lowest = tmpLow; - } - } - } - else if( tmpLow <= lowest ) - { - lowestIdx = today; - lowest = tmpLow; - } - - outMaxIdx[outIdx] = highestIdx; - outMinIdx[outIdx] = lowestIdx; - outIdx++; - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outMinIdx, -/* Generated */ SubArray^ outMaxIdx ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinMaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outMinIdx, -/* Generated */ cli::array^ outMaxIdx ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minMaxIndex( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ int outMinIdx[], -/* Generated */ int outMaxIdx[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MINMAXINDEX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ int outMinIdx[], -/* Generated */ int outMaxIdx[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double highest, lowest, tmpHigh, tmpLow; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, today, i, highestIdx, lowestIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outMinIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outMaxIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ highestIdx = -1; -/* Generated */ highest = 0.0; -/* Generated */ lowestIdx = -1; -/* Generated */ lowest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmpLow = tmpHigh = inReal[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inReal[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmpHigh = inReal[i]; -/* Generated */ if( tmpHigh > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmpHigh; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmpHigh >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmpHigh; -/* Generated */ } -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inReal[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmpLow = inReal[i]; -/* Generated */ if( tmpLow < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmpLow; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ else if( tmpLow <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmpLow; -/* Generated */ } -/* Generated */ outMaxIdx[outIdx] = highestIdx; -/* Generated */ outMinIdx[outIdx] = lowestIdx; -/* Generated */ outIdx++; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MINUS_DI.c b/src/ta-lib/src/ta_func/ta_MINUS_DI.c deleted file mode 100644 index 7ad9471a7..000000000 --- a/src/ta-lib/src/ta_func/ta_MINUS_DI.c +++ /dev/null @@ -1,716 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * MIF Mirek Fontan (mira@fontan.cz) - * CF Christo Fogelberg - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. - * 062704 MF Fix #965557. Div by zero bug reported by MIF. - * 122204 MF,CF Fix #1090231. Issues when period is 1. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MinusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int minusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MINUS_DI_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - if( optInTimePeriod > 1 ) - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI); - else - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MINUS_DI - Minus Directional Indicator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MINUS_DI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int today, lookbackTotal, outIdx; - double prevHigh, prevLow, prevClose; - double prevMinusDM, prevTR; - double tempReal, tempReal2, diffP, diffM; - - int i; - - #define TRUE_RANGE(TH,TL,YC,OUT) {\ - OUT = TH-TL; \ - tempReal2 = std_fabs(TH-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - tempReal2 = std_fabs(TL-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - } - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* - * The DM1 (one period) is base on the largest part of - * today's range that is outside of yesterdays range. - * - * The following 7 cases explain how the +DM and -DM are - * calculated on one period: - * - * Case 1: Case 2: - * C| A| - * | | C| - * | +DM1 = (C-A) B| | +DM1 = 0 - * | -DM1 = 0 | -DM1 = (B-D) - * A| | D| - * | D| - * B| - * - * Case 3: Case 4: - * C| C| - * | A| | - * | +DM1 = (C-A) | | +DM1 = 0 - * | -DM1 = 0 B| | -DM1 = (B-D) - * A| | | - * | | D| - * B| | - * D| - * - * Case 5: Case 6: - * A| A| C| - * | C| +DM1 = 0 | | +DM1 = 0 - * | | -DM1 = 0 | | -DM1 = 0 - * | D| | | - * B| B| D| - * - * - * Case 7: - * - * C| - * A| | - * | | +DM1=0 - * B| | -DM1=0 - * D| - * - * In case 3 and 4, the rule is that the smallest delta between - * (C-A) and (B-D) determine which of +DM or -DM is zero. - * - * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are - * zero. - * - * The rules remain the same when A=B and C=D (when the highs - * equal the lows). - * - * When calculating the DM over a period > 1, the one-period DM - * for the desired period are initialy sum. In other word, - * for a -DM14, sum the -DM1 for the first 14 days (that's - * 13 values because there is no DM for the first day!) - * Subsequent DM are calculated using the Wilder's - * smoothing approach: - * - * Previous -DM14 - * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 - * 14 - * - * Calculation of a -DI14 is as follow: - * - * -DM14 - * -DI14 = -------- - * TR14 - * - * Calculation of the TR14 is: - * - * Previous TR14 - * Today's TR14 = Previous TR14 - -------------- + Today's TR1 - * 14 - * - * The first TR14 is the summation of the first 14 TR1. See the - * TA_TRANGE function on how to calculate the true range. - * - * Reference: - * New Concepts In Technical Trading Systems, J. Welles Wilder Jr - */ - - /* Original implementation from Wilder's book was doing some integer - * rounding in its calculations. - * - * This was understandable in the context that at the time the book - * was written, most user were doing the calculation by hand. - * - * For a computer, rounding is unnecessary (and even problematic when inputs - * are close to 1). - * - * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, - * you can comment out the following #undef/#define and rebuild the library. - */ - #undef round_pos - #define round_pos(x) (x) - - if( optInTimePeriod > 1 ) - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI); - else - lookbackTotal = 1; - - /* Adjust startIdx to account for the lookback period. */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Indicate where the next output should be put - * in the outReal. - */ - outIdx = 0; - - /* Trap the case where no smoothing is needed. */ - if( optInTimePeriod <= 1 ) - { - /* No smoothing needed. Just do the following: - * for each price bar. - * -DM1 - * -DI1 = ---- - * TR1 - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - today = startIdx-1; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - prevClose = inClose[today]; - while( today < endIdx ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - if( TA_IS_ZERO(tempReal) ) - outReal[outIdx++] = (double)0.0; - else - outReal[outIdx++] = diffM/tempReal; - } - else - outReal[outIdx++] = (double)0.0; - prevClose = inClose[today]; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Process the initial DM and TR */ - VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; - - prevMinusDM = 0.0; - prevTR = 0.0; - today = startIdx - lookbackTotal; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - prevClose = inClose[today]; - i = optInTimePeriod-1; - while( i-- > 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR += tempReal; - prevClose = inClose[today]; - } - - /* Process subsequent DI */ - - /* Skip the unstable period. Note that this loop must be executed - * at least ONCE to calculate the first DI. - */ - i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI) + 1; - while( i-- != 0 ) - { - /* Calculate the prevMinusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; - } - else - { - /* Case 1,3,5 and 7 */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - } - - - /* Now start to write the output in - * the caller provided outReal. - */ - if( !TA_IS_ZERO(prevTR) ) - outReal[0] = round_pos(100.0*(prevMinusDM/prevTR)); - else - outReal[0] = 0.0; - outIdx = 1; - - while( today < endIdx ) - { - /* Calculate the prevMinusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; - } - else - { - /* Case 1,3,5 and 7 */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - - /* Calculate the DI. The value is rounded (see Wilder book). */ - if( !TA_IS_ZERO(prevTR) ) - outReal[outIdx++] = round_pos(100.0*(prevMinusDM/prevTR)); - else - outReal[outIdx++] = 0.0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MINUS_DI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, lookbackTotal, outIdx; -/* Generated */ double prevHigh, prevLow, prevClose; -/* Generated */ double prevMinusDM, prevTR; -/* Generated */ double tempReal, tempReal2, diffP, diffM; -/* Generated */ int i; -/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ -/* Generated */ OUT = TH-TL; \ -/* Generated */ tempReal2 = std_fabs(TH-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ tempReal2 = std_fabs(TL-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ } -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ #undef round_pos -/* Generated */ #define round_pos(x) (x) -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI); -/* Generated */ else -/* Generated */ lookbackTotal = 1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ if( optInTimePeriod <= 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ today = startIdx-1; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ prevClose = inClose[today]; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ if( TA_IS_ZERO(tempReal) ) -/* Generated */ outReal[outIdx++] = (double)0.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = diffM/tempReal; -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[outIdx++] = (double)0.0; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; -/* Generated */ prevMinusDM = 0.0; -/* Generated */ prevTR = 0.0; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ prevClose = inClose[today]; -/* Generated */ i = optInTimePeriod-1; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR += tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DI,MinusDI) + 1; -/* Generated */ while( i-- != 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ outReal[0] = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ outIdx = 1; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ outReal[outIdx++] = round_pos(100.0*(prevMinusDM/prevTR)); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MINUS_DM.c b/src/ta-lib/src/ta_func/ta_MINUS_DM.c deleted file mode 100644 index 9f1246647..000000000 --- a/src/ta-lib/src/ta_func/ta_MINUS_DM.c +++ /dev/null @@ -1,591 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MinusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int minusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MINUS_DM_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - if( optInTimePeriod > 1 ) - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM) - 1; - else - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MINUS_DM - Minus Directional Movement - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MINUS_DM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int today, lookbackTotal, outIdx; - double prevHigh, prevLow, tempReal; - double prevMinusDM; - double diffP, diffM; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* - * The DM1 (one period) is base on the largest part of - * today's range that is outside of yesterdays range. - * - * The following 7 cases explain how the +DM and -DM are - * calculated on one period: - * - * Case 1: Case 2: - * C| A| - * | | C| - * | +DM1 = (C-A) B| | +DM1 = 0 - * | -DM1 = 0 | -DM1 = (B-D) - * A| | D| - * | D| - * B| - * - * Case 3: Case 4: - * C| C| - * | A| | - * | +DM1 = (C-A) | | +DM1 = 0 - * | -DM1 = 0 B| | -DM1 = (B-D) - * A| | | - * | | D| - * B| | - * D| - * - * Case 5: Case 6: - * A| A| C| - * | C| +DM1 = 0 | | +DM1 = 0 - * | | -DM1 = 0 | | -DM1 = 0 - * | D| | | - * B| B| D| - * - * - * Case 7: - * - * C| - * A| | - * | | +DM=0 - * B| | -DM=0 - * D| - * - * In case 3 and 4, the rule is that the smallest delta between - * (C-A) and (B-D) determine which of +DM or -DM is zero. - * - * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are - * zero. - * - * The rules remain the same when A=B and C=D (when the highs - * equal the lows). - * - * When calculating the DM over a period > 1, the one-period DM - * for the desired period are initialy sum. In other word, - * for a -DM14, sum the -DM1 for the first 14 days (that's - * 13 values because there is no DM for the first day!) - * Subsequent DM are calculated using the Wilder's - * smoothing approach: - * - * Previous -DM14 - * Today's -DM14 = Previous -DM14 - -------------- + Today's -DM1 - * 14 - * - * Reference: - * New Concepts In Technical Trading Systems, J. Welles Wilder Jr - */ - - if( optInTimePeriod > 1 ) - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM) - 1; - else - lookbackTotal = 1; - - /* Adjust startIdx to account for the lookback period. */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Indicate where the next output should be put - * in the outReal. - */ - outIdx = 0; - - /* Trap the case where no smoothing is needed. */ - if( optInTimePeriod <= 1 ) - { - /* No smoothing needed. Just do a simple DM1 - * for each price bar. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - today = startIdx-1; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - while( today < endIdx ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - outReal[outIdx++] = diffM; - } - else - outReal[outIdx++] = 0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Process the initial DM */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - prevMinusDM = 0.0; - today = startIdx - lookbackTotal; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - i = optInTimePeriod-1; - while( i-- > 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM += diffM; - } - } - - /* Process subsequent DM */ - - /* Skip the unstable period. */ - i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM); - while( i-- != 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; - } - else - { - /* Case 1,3,5 and 7 */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); - } - } - - /* Now start to write the output in - * the caller provided outReal. - */ - outReal[0] = prevMinusDM; - outIdx = 1; - - while( today < endIdx ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - if( (diffM > 0) && (diffP < diffM) ) - { - /* Case 2 and 4: +DM=0,-DM=diffM */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; - } - else - { - /* Case 1,3,5 and 7 */ - prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); - } - - outReal[outIdx++] = prevMinusDM; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::MinusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode minusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MINUS_DM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, lookbackTotal, outIdx; -/* Generated */ double prevHigh, prevLow, tempReal; -/* Generated */ double prevMinusDM; -/* Generated */ double diffP, diffM; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM) - 1; -/* Generated */ else -/* Generated */ lookbackTotal = 1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ if( optInTimePeriod <= 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ today = startIdx-1; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = diffM; -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ prevMinusDM = 0.0; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ i = optInTimePeriod-1; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM += diffM; -/* Generated */ } -/* Generated */ } -/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_MINUS_DM,MinusDM); -/* Generated */ while( i-- != 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ } -/* Generated */ outReal[0] = prevMinusDM; -/* Generated */ outIdx = 1; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffM > 0) && (diffP < diffM) ) -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod) + diffM; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevMinusDM = prevMinusDM - (prevMinusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ outReal[outIdx++] = prevMinusDM; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MOM.c b/src/ta-lib/src/ta_func/ta_MOM.c deleted file mode 100644 index be18da98c..000000000 --- a/src/ta-lib/src/ta_func/ta_MOM.c +++ /dev/null @@ -1,346 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MomLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int momLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MOM_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return optInTimePeriod; - -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MOM - Momentum - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MOM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - - int inIdx, outIdx, trailingIdx; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* The interpretation of the rate of change varies widely depending - * which software and/or books you are refering to. - * - * The following is the table of Rate-Of-Change implemented in TA-LIB: - * MOM = (price - prevPrice) [Momentum] - * ROC = ((price/prevPrice)-1)*100 [Rate of change] - * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] - * ROCR = (price/prevPrice) [Rate of change ratio] - * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] - * - * Here are the equivalent function in other software: - * TA-Lib | Tradestation | Metastock - * ================================================= - * MOM | Momentum | ROC (Point) - * ROC | ROC | ROC (Percent) - * ROCP | PercentChange | - - * ROCR | - | - - * ROCR100 | - | MO - * - * The MOM function is the only one who is not normalized, and thus - * should be avoided for comparing different time serie of prices. - * - * ROC and ROCP are centered at zero and can have positive and negative - * value. Here are some equivalence: - * ROC = ROCP/100 - * = ((price-prevPrice)/prevPrice)/100 - * = ((price/prevPrice)-1)*100 - * - * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are - * always positive values. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate Momentum: - * Just substract the value from 'period' ago from - * current value. - */ - outIdx = 0; - inIdx = startIdx; - trailingIdx = startIdx - optInTimePeriod; - - while( inIdx <= endIdx ) - outReal[outIdx++] = inReal[inIdx++] - inReal[trailingIdx++]; - - /* Set output limits. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mom( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MOM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int inIdx, outIdx, trailingIdx; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ inIdx = startIdx; -/* Generated */ trailingIdx = startIdx - optInTimePeriod; -/* Generated */ while( inIdx <= endIdx ) -/* Generated */ outReal[outIdx++] = inReal[inIdx++] - inReal[trailingIdx++]; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_MULT.c b/src/ta-lib/src/ta_func/ta_MULT.c deleted file mode 100644 index 2faf298a9..000000000 --- a/src/ta-lib/src/ta_func/ta_MULT.c +++ /dev/null @@ -1,260 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::MultLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int multLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_MULT_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_MULT - Vector Arithmetic Mult - * - * Input = double, double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mult( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal0[], -/* Generated */ double inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_MULT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal0[], -/* Generated */ const double inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = inReal0[i]*inReal1[i]; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Mult( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode mult( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal0[], -/* Generated */ float inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_MULT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal0[], -/* Generated */ const float inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = inReal0[i]*inReal1[i]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_NATR.c b/src/ta-lib/src/ta_func/ta_NATR.c deleted file mode 100644 index 603fcce08..000000000 --- a/src/ta-lib/src/ta_func/ta_NATR.c +++ /dev/null @@ -1,499 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 060306 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::NatrLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int natrLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_NATR_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* The ATR lookback is the sum of: - * 1 + (optInTimePeriod - 1) - * - * Where 1 is for the True Range, and - * (optInTimePeriod-1) is for the simple - * moving average. - */ - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_NATR,Natr); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_NATR - Normalized Average True Range - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode natr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_NATR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ENUM_DECLARATION(RetCode) retCode; - int outIdx, today, lookbackTotal; - int nbATR; - VALUE_HANDLE_INT(outBegIdx1); - VALUE_HANDLE_INT(outNbElement1); - - double prevATR, tempValue; - ARRAY_REF( tempBuffer ); - ARRAY_LOCAL(prevATRTemp,1); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* This function is very similar as ATR, except - * it is being normalized as follow: - * - * NATR = (ATR(period) / Close) * 100 - * - * - * Normalization make the ATR function more relevant - * in the folllowing scenario: - * - Long term analysis where the price changes drastically. - * - Cross-market or cross-security ATR comparison. - * - * More Info: - * Technical Analysis of Stock & Commodities (TASC) - * May 2006 by John Forman - */ - - /* Average True Range is the greatest of the following: - * - * val1 = distance from today's high to today's low. - * val2 = distance from yesterday's close to today's high. - * val3 = distance from yesterday's close to today's low. - * - * These value are averaged for the specified period using - * Wilder method. This method have an unstable period comparable - * to an Exponential Moving Average (EMA). - */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(NATR)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - /* Trap the case where no smoothing is needed. */ - if( optInTimePeriod <= 1 ) - { - /* No smoothing needed. Just do a TRANGE. */ - return FUNCTION_CALL(TRANGE)( startIdx, endIdx, - inHigh, inLow, inClose, - outBegIdx, outNBElement, outReal ); - } - - /* Allocate an intermediate buffer for TRANGE. */ - ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); - - /* Do TRANGE in the intermediate buffer. */ - retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, - inHigh, inLow, inClose, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), - tempBuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - ARRAY_FREE( tempBuffer ); - return retCode; - } - - /* First value of the ATR is a simple Average of - * the TRANGE output for the specified period. - */ - retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, - optInTimePeriod-1, - tempBuffer, optInTimePeriod, - VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), - prevATRTemp ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - ARRAY_FREE( tempBuffer ); - return retCode; - } - prevATR = prevATRTemp[0]; - - /* Subsequent value are smoothed using the - * previous ATR value (Wilder's approach). - * 1) Multiply the previous ATR by 'period-1'. - * 2) Add today TR value. - * 3) Divide by 'period'. - */ - today = optInTimePeriod; - outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_NATR,Natr); - /* Skip the unstable period. */ - while( outIdx != 0 ) - { - prevATR *= optInTimePeriod - 1; - prevATR += tempBuffer[today++]; - prevATR /= optInTimePeriod; - outIdx--; - } - - /* Now start to write the final ATR in the caller - * provided outReal. - */ - outIdx = 1; - tempValue = inClose[today]; - if( !TA_IS_ZERO(tempValue) ) - outReal[0] = (prevATR/tempValue)*100.0; - else - outReal[0] = 0.0; - - /* Now do the number of requested ATR. */ - nbATR = (endIdx - startIdx)+1; - - while( --nbATR != 0 ) - { - prevATR *= optInTimePeriod - 1; - prevATR += tempBuffer[today++]; - prevATR /= optInTimePeriod; - tempValue = inClose[today]; - if( !TA_IS_ZERO(tempValue) ) - outReal[outIdx] = (prevATR/tempValue)*100.0; - else - outReal[0] = 0.0; - outIdx++; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - ARRAY_FREE( tempBuffer ); - - return retCode; -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Natr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode natr( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_NATR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int outIdx, today, lookbackTotal; -/* Generated */ int nbATR; -/* Generated */ VALUE_HANDLE_INT(outBegIdx1); -/* Generated */ VALUE_HANDLE_INT(outNbElement1); -/* Generated */ double prevATR, tempValue; -/* Generated */ ARRAY_REF( tempBuffer ); -/* Generated */ ARRAY_LOCAL(prevATRTemp,1); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackTotal = LOOKBACK_CALL(NATR)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ if( optInTimePeriod <= 1 ) -/* Generated */ { -/* Generated */ return FUNCTION_CALL(TRANGE)( startIdx, endIdx, -/* Generated */ inHigh, inLow, inClose, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ } -/* Generated */ ARRAY_ALLOC(tempBuffer, lookbackTotal+(endIdx-startIdx)+1 ); -/* Generated */ retCode = FUNCTION_CALL(TRANGE)( (startIdx-lookbackTotal+1), endIdx, -/* Generated */ inHigh, inLow, inClose, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ tempBuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_SMA)( optInTimePeriod-1, -/* Generated */ optInTimePeriod-1, -/* Generated */ tempBuffer, optInTimePeriod, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ prevATRTemp ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ prevATR = prevATRTemp[0]; -/* Generated */ today = optInTimePeriod; -/* Generated */ outIdx = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_NATR,Natr); -/* Generated */ while( outIdx != 0 ) -/* Generated */ { -/* Generated */ prevATR *= optInTimePeriod - 1; -/* Generated */ prevATR += tempBuffer[today++]; -/* Generated */ prevATR /= optInTimePeriod; -/* Generated */ outIdx--; -/* Generated */ } -/* Generated */ outIdx = 1; -/* Generated */ tempValue = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(tempValue) ) -/* Generated */ outReal[0] = (prevATR/tempValue)*100.0; -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ nbATR = (endIdx - startIdx)+1; -/* Generated */ while( --nbATR != 0 ) -/* Generated */ { -/* Generated */ prevATR *= optInTimePeriod - 1; -/* Generated */ prevATR += tempBuffer[today++]; -/* Generated */ prevATR /= optInTimePeriod; -/* Generated */ tempValue = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(tempValue) ) -/* Generated */ outReal[outIdx] = (prevATR/tempValue)*100.0; -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ outIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_OBV.c b/src/ta-lib/src/ta_func/ta_OBV.c deleted file mode 100644 index e62c56a3a..000000000 --- a/src/ta-lib/src/ta_func/ta_OBV.c +++ /dev/null @@ -1,291 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 110206 AC Change volume and open interest to double - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::ObvLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int obvLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_OBV_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* This function have no lookback needed. */ - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_OBV - On Balance Volume - * - * Input = double, Volume - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ SubArray^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ cli::array^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode obv( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ double inVolume[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_OBV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ const double inVolume[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int i; - int outIdx; - double prevReal, tempReal, prevOBV; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - prevOBV = inVolume[startIdx]; - prevReal = inReal[startIdx]; - outIdx = 0; - - for(i=startIdx; i <= endIdx; i++ ) - { - tempReal = inReal[i]; - if( tempReal > prevReal ) - prevOBV += inVolume[i]; - else if( tempReal < prevReal ) - prevOBV -= inVolume[i]; - - outReal[outIdx++] = prevOBV; - prevReal = tempReal; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ SubArray^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Obv( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ cli::array^ inVolume, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode obv( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ float inVolume[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_OBV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ const float inVolume[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i; -/* Generated */ int outIdx; -/* Generated */ double prevReal, tempReal, prevOBV; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if(!inVolume) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ prevOBV = inVolume[startIdx]; -/* Generated */ prevReal = inReal[startIdx]; -/* Generated */ outIdx = 0; -/* Generated */ for(i=startIdx; i <= endIdx; i++ ) -/* Generated */ { -/* Generated */ tempReal = inReal[i]; -/* Generated */ if( tempReal > prevReal ) -/* Generated */ prevOBV += inVolume[i]; -/* Generated */ else if( tempReal < prevReal ) -/* Generated */ prevOBV -= inVolume[i]; -/* Generated */ outReal[outIdx++] = prevOBV; -/* Generated */ prevReal = tempReal; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_PLUS_DI.c b/src/ta-lib/src/ta_func/ta_PLUS_DI.c deleted file mode 100644 index bd5a21025..000000000 --- a/src/ta-lib/src/ta_func/ta_PLUS_DI.c +++ /dev/null @@ -1,716 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AM Adrian Michel - * MIF Mirek Fontan (mira@fontan.cz) - * CF Christo Fogelberg - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 082303 MF Fix #792298. Remove rounding. Bug reported by AM. - * 062704 MF Fix #965557. Div by zero bug reported by MIF. - * 122204 MF,CF Fix #1090231. Issues when period is 1. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::PlusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int plusDILookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_PLUS_DI_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - if( optInTimePeriod > 1 ) - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI); - else - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_PLUS_DI - Plus Directional Indicator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode plusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_PLUS_DI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int today, lookbackTotal, outIdx; - double prevHigh, prevLow, prevClose; - double prevPlusDM, prevTR; - double tempReal, tempReal2, diffP, diffM; - - int i; - - #define TRUE_RANGE(TH,TL,YC,OUT) {\ - OUT = TH-TL; \ - tempReal2 = std_fabs(TH-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - tempReal2 = std_fabs(TL-YC); \ - if( tempReal2 > OUT ) \ - OUT = tempReal2; \ - } - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - /* - * The DM1 (one period) is base on the largest part of - * today's range that is outside of yesterdays range. - * - * The following 7 cases explain how the +DM and -DM are - * calculated on one period: - * - * Case 1: Case 2: - * C| A| - * | | C| - * | +DM1 = (C-A) B| | +DM1 = 0 - * | -DM1 = 0 | -DM1 = (B-D) - * A| | D| - * | D| - * B| - * - * Case 3: Case 4: - * C| C| - * | A| | - * | +DM1 = (C-A) | | +DM1 = 0 - * | -DM1 = 0 B| | -DM1 = (B-D) - * A| | | - * | | D| - * B| | - * D| - * - * Case 5: Case 6: - * A| A| C| - * | C| +DM1 = 0 | | +DM1 = 0 - * | | -DM1 = 0 | | -DM1 = 0 - * | D| | | - * B| B| D| - * - * - * Case 7: - * - * C| - * A| | - * | | +DM1=0 - * B| | -DM1=0 - * D| - * - * In case 3 and 4, the rule is that the smallest delta between - * (C-A) and (B-D) determine which of +DM or -DM is zero. - * - * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are - * zero. - * - * The rules remain the same when A=B and C=D (when the highs - * equal the lows). - * - * When calculating the DM over a period > 1, the one-period DM - * for the desired period are initialy sum. In other word, - * for a -DM14, sum the -DM1 for the first 14 days (that's - * 13 values because there is no DM for the first day!) - * Subsequent DM are calculated using the Wilder's - * smoothing approach: - * - * Previous +DM14 - * Today's +DM14 = Previous +DM14 - -------------- + Today's +DM1 - * 14 - * - * Calculation of a +DI14 is as follow: - * - * +DM14 - * +DI14 = -------- - * TR14 - * - * Calculation of the TR14 is: - * - * Previous TR14 - * Today's TR14 = Previous TR14 - -------------- + Today's TR1 - * 14 - * - * The first TR14 is the summation of the first 14 TR1. See the - * TA_TRANGE function on how to calculate the true range. - * - * Reference: - * New Concepts In Technical Trading Systems, J. Welles Wilder Jr - */ - - /* Original implementation from Wilder's book was doing some integer - * rounding in its calculations. - * - * This was understandable in the context that at the time the book - * was written, most user were doing the calculation by hand. - * - * For a computer, rounding is unnecessary (and even problematic when inputs - * are close to 1). - * - * TA-Lib does not do the rounding. Still, if you want to reproduce Wilder's examples, - * you can comment out the following #undef/#define and rebuild the library. - */ - #undef round_pos - #define round_pos(x) (x) - - if( optInTimePeriod > 1 ) - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI); - else - lookbackTotal = 1; - - /* Adjust startIdx to account for the lookback period. */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Indicate where the next output should be put - * in the outReal. - */ - outIdx = 0; - - /* Trap the case where no smoothing is needed. */ - if( optInTimePeriod <= 1 ) - { - /* No smoothing needed. Just do the following: - * for each price bar. - * +DM1 - * +DI1 = ---- - * TR1 - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - today = startIdx-1; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - prevClose = inClose[today]; - while( today < endIdx ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - if( TA_IS_ZERO(tempReal) ) - outReal[outIdx++] = (double)0.0; - else - outReal[outIdx++] = diffP/tempReal; - } - else - outReal[outIdx++] = (double)0.0; - prevClose = inClose[today]; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Process the initial DM and TR */ - VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; - - prevPlusDM = 0.0; - prevTR = 0.0; - today = startIdx - lookbackTotal; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - prevClose = inClose[today]; - i = optInTimePeriod-1; - while( i-- > 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR += tempReal; - prevClose = inClose[today]; - } - - /* Process subsequent DI */ - - /* Skip the unstable period. Note that this loop must be executed - * at least ONCE to calculate the first DI. - */ - i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI) + 1; - while( i-- != 0 ) - { - /* Calculate the prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; - } - else - { - /* Case 2,4,5 and 7 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - } - - /* Now start to write the output in - * the caller provided outReal. - */ - - if( !TA_IS_ZERO(prevTR) ) - outReal[0] = round_pos(100.0*(prevPlusDM/prevTR)); - else - outReal[0] = 0.0; - outIdx = 1; - - while( today < endIdx ) - { - /* Calculate the prevPlusDM */ - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; - } - else - { - /* Case 2,4,5 and 7 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); - } - - /* Calculate the prevTR */ - TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); - prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; - prevClose = inClose[today]; - - /* Calculate the DI. The value is rounded (see Wilder book). */ - if( !TA_IS_ZERO(prevTR) ) - outReal[outIdx++] = round_pos(100.0*(prevPlusDM/prevTR)); - else - outReal[outIdx++] = 0.0; - - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::PlusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode plusDI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_PLUS_DI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, lookbackTotal, outIdx; -/* Generated */ double prevHigh, prevLow, prevClose; -/* Generated */ double prevPlusDM, prevTR; -/* Generated */ double tempReal, tempReal2, diffP, diffM; -/* Generated */ int i; -/* Generated */ #define TRUE_RANGE(TH,TL,YC,OUT) {\ -/* Generated */ OUT = TH-TL; \ -/* Generated */ tempReal2 = std_fabs(TH-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ tempReal2 = std_fabs(TL-YC); \ -/* Generated */ if( tempReal2 > OUT ) \ -/* Generated */ OUT = tempReal2; \ -/* Generated */ } -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ #undef round_pos -/* Generated */ #define round_pos(x) (x) -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI); -/* Generated */ else -/* Generated */ lookbackTotal = 1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ if( optInTimePeriod <= 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ today = startIdx-1; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ prevClose = inClose[today]; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ if( TA_IS_ZERO(tempReal) ) -/* Generated */ outReal[outIdx++] = (double)0.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = diffP/tempReal; -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[outIdx++] = (double)0.0; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = today = startIdx; -/* Generated */ prevPlusDM = 0.0; -/* Generated */ prevTR = 0.0; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ prevClose = inClose[today]; -/* Generated */ i = optInTimePeriod-1; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR += tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DI,PlusDI) + 1; -/* Generated */ while( i-- != 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ } -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ outReal[0] = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ else -/* Generated */ outReal[0] = 0.0; -/* Generated */ outIdx = 1; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ TRUE_RANGE(prevHigh,prevLow,prevClose,tempReal); -/* Generated */ prevTR = prevTR - (prevTR/optInTimePeriod) + tempReal; -/* Generated */ prevClose = inClose[today]; -/* Generated */ if( !TA_IS_ZERO(prevTR) ) -/* Generated */ outReal[outIdx++] = round_pos(100.0*(prevPlusDM/prevTR)); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_PLUS_DM.c b/src/ta-lib/src/ta_func/ta_PLUS_DM.c deleted file mode 100644 index 829e3aa70..000000000 --- a/src/ta-lib/src/ta_func/ta_PLUS_DM.c +++ /dev/null @@ -1,592 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * CF Christo Fogelberg - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 122104 MF,CF Fix#1089506 for when optInTimePeriod is 1. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::PlusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int plusDMLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_PLUS_DM_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - if( optInTimePeriod > 1 ) - return optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM) - 1; - else - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_PLUS_DM - Plus Directional Movement - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode plusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_PLUS_DM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int today, lookbackTotal, outIdx; - double prevHigh, prevLow, tempReal; - double prevPlusDM; - double diffP, diffM; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* - * The DM1 (one period) is base on the largest part of - * today's range that is outside of yesterdays range. - * - * The following 7 cases explain how the +DM and -DM are - * calculated on one period: - * - * Case 1: Case 2: - * C| A| - * | | C| - * | +DM1 = (C-A) B| | +DM1 = 0 - * | -DM1 = 0 | -DM1 = (B-D) - * A| | D| - * | D| - * B| - * - * Case 3: Case 4: - * C| C| - * | A| | - * | +DM1 = (C-A) | | +DM1 = 0 - * | -DM1 = 0 B| | -DM1 = (B-D) - * A| | | - * | | D| - * B| | - * D| - * - * Case 5: Case 6: - * A| A| C| - * | C| +DM1 = 0 | | +DM1 = 0 - * | | -DM1 = 0 | | -DM1 = 0 - * | D| | | - * B| B| D| - * - * - * Case 7: - * - * C| - * A| | - * | | +DM=0 - * B| | -DM=0 - * D| - * - * In case 3 and 4, the rule is that the smallest delta between - * (C-A) and (B-D) determine which of +DM or -DM is zero. - * - * In case 7, (C-A) and (B-D) are equal, so both +DM and -DM are - * zero. - * - * The rules remain the same when A=B and C=D (when the highs - * equal the lows). - * - * When calculating the DM over a period > 1, the one-period DM - * for the desired period are initialy sum. In other word, - * for a +DM14, sum the +DM1 for the first 14 days (that's - * 13 values because there is no DM for the first day!) - * Subsequent DM are calculated using the Wilder's - * smoothing approach: - * - * Previous +DM14 - * Today's +DM14 = Previous +DM14 - -------------- + Today's +DM1 - * 14 - * - * Reference: - * New Concepts In Technical Trading Systems, J. Welles Wilder Jr - */ - - if( optInTimePeriod > 1 ) - lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM) - 1; - else - lookbackTotal = 1; - - /* Adjust startIdx to account for the lookback period. */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Indicate where the next output should be put - * in the outReal. - */ - outIdx = 0; - - /* Trap the case where no smoothing is needed. */ - if( optInTimePeriod <= 1 ) - { - /* No smoothing needed. Just do a simple DM1 - * for each price bar. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - today = startIdx-1; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - while( today < endIdx ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - outReal[outIdx++] = diffP; - } - else - outReal[outIdx++] = 0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Process the initial DM */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - prevPlusDM = 0.0; - today = startIdx - lookbackTotal; - prevHigh = inHigh[today]; - prevLow = inLow[today]; - i = optInTimePeriod-1; - while( i-- > 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM += diffP; - } - } - - /* Process subsequent DM */ - - /* Skip the unstable period. */ - i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM); - while( i-- != 0 ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; - } - else - { - /* Case 2,4,5 and 7 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); - } - } - - /* Now start to write the output in - * the caller provided outReal. - */ - outReal[0] = prevPlusDM; - outIdx = 1; - - while( today < endIdx ) - { - today++; - tempReal = inHigh[today]; - diffP = tempReal-prevHigh; /* Plus Delta */ - prevHigh = tempReal; - tempReal = inLow[today]; - diffM = prevLow-tempReal; /* Minus Delta */ - prevLow = tempReal; - - if( (diffP > 0) && (diffP > diffM) ) - { - /* Case 1 and 3: +DM=diffP,-DM=0 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; - } - else - { - /* Case 2,4,5 and 7 */ - prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); - } - - outReal[outIdx++] = prevPlusDM; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::PlusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode plusDM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_PLUS_DM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, lookbackTotal, outIdx; -/* Generated */ double prevHigh, prevLow, tempReal; -/* Generated */ double prevPlusDM; -/* Generated */ double diffP, diffM; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ lookbackTotal = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM) - 1; -/* Generated */ else -/* Generated */ lookbackTotal = 1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ if( optInTimePeriod <= 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ today = startIdx-1; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = diffP; -/* Generated */ } -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ prevPlusDM = 0.0; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ prevHigh = inHigh[today]; -/* Generated */ prevLow = inLow[today]; -/* Generated */ i = optInTimePeriod-1; -/* Generated */ while( i-- > 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM += diffP; -/* Generated */ } -/* Generated */ } -/* Generated */ i = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_PLUS_DM,PlusDM); -/* Generated */ while( i-- != 0 ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ } -/* Generated */ outReal[0] = prevPlusDM; -/* Generated */ outIdx = 1; -/* Generated */ while( today < endIdx ) -/* Generated */ { -/* Generated */ today++; -/* Generated */ tempReal = inHigh[today]; -/* Generated */ diffP = tempReal-prevHigh; -/* Generated */ prevHigh = tempReal; -/* Generated */ tempReal = inLow[today]; -/* Generated */ diffM = prevLow-tempReal; -/* Generated */ prevLow = tempReal; -/* Generated */ if( (diffP > 0) && (diffP > diffM) ) -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod) + diffP; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ prevPlusDM = prevPlusDM - (prevPlusDM/optInTimePeriod); -/* Generated */ } -/* Generated */ outReal[outIdx++] = prevPlusDM; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_PPO.c b/src/ta-lib/src/ta_func/ta_PPO.c deleted file mode 100644 index 55059d66b..000000000 --- a/src/ta-lib/src/ta_func/ta_PPO.c +++ /dev/null @@ -1,367 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AA Andrew Atkinson - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 020605 AA Fix #1117666 Lookback bug. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::PpoLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int ppoLookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_PPO_Lookback( int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Lookback is driven by the slowest MA. */ - return LOOKBACK_CALL(MA)( max(optInSlowPeriod,optInFastPeriod), optInMAType ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_PPO - Percentage Price Oscillator - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInFastPeriod:(From 2 to 100000) - * Number of period for the fast MA - * - * optInSlowPeriod:(From 2 to 100000) - * Number of period for the slow MA - * - * optInMAType: - * Type of Moving Average - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ppo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_PPO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_REF(tempBuffer); - ENUM_DECLARATION(RetCode) retCode; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastPeriod. */ -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowPeriod. */ -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Allocate an intermediate buffer. */ - ARRAY_ALLOC( tempBuffer, endIdx-startIdx+1 ); - #if !defined( _JAVA ) - if( !tempBuffer ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - - retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, inReal, - optInFastPeriod, - optInSlowPeriod, - optInMAType, - outBegIdx, - outNBElement, - outReal, - tempBuffer, - 1 /* Do percentage processing. */ ); - - ARRAY_FREE( tempBuffer ); - - return retCode; -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Ppo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ppo( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ MAType optInMAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_PPO( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInFastPeriod, /* From 2 to 100000 */ -/* Generated */ int optInSlowPeriod, /* From 2 to 100000 */ -/* Generated */ TA_MAType optInMAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(tempBuffer); -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastPeriod = 12; -/* Generated */ else if( ((int)optInFastPeriod < 2) || ((int)optInFastPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInSlowPeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowPeriod = 26; -/* Generated */ else if( ((int)optInSlowPeriod < 2) || ((int)optInSlowPeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInMAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInMAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInMAType < 0) || ((int)optInMAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-startIdx+1 ); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !tempBuffer ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL(INT_PO)( startIdx, endIdx, inReal, -/* Generated */ optInFastPeriod, -/* Generated */ optInSlowPeriod, -/* Generated */ optInMAType, -/* Generated */ outBegIdx, -/* Generated */ outNBElement, -/* Generated */ outReal, -/* Generated */ tempBuffer, -/* Generated */ 1 ); -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ROC.c b/src/ta-lib/src/ta_func/ta_ROC.c deleted file mode 100644 index ae9d0b836..000000000 --- a/src/ta-lib/src/ta_func/ta_ROC.c +++ /dev/null @@ -1,357 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::RocLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int rocLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ROC_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ROC - Rate of change : ((price/prevPrice)-1)*100 - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode roc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ROC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int inIdx, outIdx, trailingIdx; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* The interpretation of the rate of change varies widely depending - * which software and/or books you are refering to. - * - * The following is the table of Rate-Of-Change implemented in TA-LIB: - * MOM = (price - prevPrice) [Momentum] - * ROC = ((price/prevPrice)-1)*100 [Rate of change] - * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] - * ROCR = (price/prevPrice) [Rate of change ratio] - * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] - * - * Here are the equivalent function in other software: - * TA-Lib | Tradestation | Metastock - * ================================================= - * MOM | Momentum | ROC (Point) - * ROC | ROC | ROC (Percent) - * ROCP | PercentChange | - - * ROCR | - | - - * ROCR100 | - | MO - * - * The MOM function is the only one who is not normalized, and thus - * should be avoided for comparing different time serie of prices. - * - * ROC and ROCP are centered at zero and can have positive and negative - * value. Here are some equivalence: - * ROC = ROCP/100 - * = ((price-prevPrice)/prevPrice)/100 - * = ((price/prevPrice)-1)*100 - * - * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are - * always positive values. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate Rate of change: ((price / prevPrice)-1)*100 */ - outIdx = 0; - inIdx = startIdx; - trailingIdx = startIdx - optInTimePeriod; - - while( inIdx <= endIdx ) - { - tempReal = inReal[trailingIdx++]; - if( tempReal != 0.0 ) - outReal[outIdx++] = ((inReal[inIdx] / tempReal)-1.0)*100.0; - else - outReal[outIdx++] = 0.0; - inIdx++; - } - - /* Set output limits. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Roc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode roc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ROC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int inIdx, outIdx, trailingIdx; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ inIdx = startIdx; -/* Generated */ trailingIdx = startIdx - optInTimePeriod; -/* Generated */ while( inIdx <= endIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ if( tempReal != 0.0 ) -/* Generated */ outReal[outIdx++] = ((inReal[inIdx] / tempReal)-1.0)*100.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ inIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ROCP.c b/src/ta-lib/src/ta_func/ta_ROCP.c deleted file mode 100644 index 8440974e8..000000000 --- a/src/ta-lib/src/ta_func/ta_ROCP.c +++ /dev/null @@ -1,358 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::RocPLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int rocPLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ROCP_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rocP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ROCP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int inIdx, outIdx, trailingIdx; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* The interpretation of the rate of change varies widely depending - * which software and/or books you are refering to. - * - * The following is the table of Rate-Of-Change implemented in TA-LIB: - * MOM = (price - prevPrice) [Momentum] - * ROC = ((price/prevPrice)-1)*100 [Rate of change] - * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] - * ROCR = (price/prevPrice) [Rate of change ratio] - * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] - * - * Here are the equivalent function in other software: - * TA-Lib | Tradestation | Metastock - * ================================================= - * MOM | Momentum | ROC (Point) - * ROC | ROC | ROC (Percent) - * ROCP | PercentChange | - - * ROCR | - | - - * ROCR100 | - | MO - * - * The MOM function is the only one who is not normalized, and thus - * should be avoided for comparing different time serie of prices. - * - * ROC and ROCP are centered at zero and can have positive and negative - * value. Here are some equivalence: - * ROC = ROCP/100 - * = ((price-prevPrice)/prevPrice)/100 - * = ((price/prevPrice)-1)*100 - * - * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are - * always positive values. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate Rate of change Ratio: (price / prevPrice) */ - outIdx = 0; - inIdx = startIdx; - trailingIdx = startIdx - optInTimePeriod; - - while( inIdx <= endIdx ) - { - tempReal = inReal[trailingIdx++]; - if( tempReal != 0.0 ) - outReal[outIdx++] = (inReal[inIdx]-tempReal)/tempReal; - else - outReal[outIdx++] = 0.0; - - inIdx++; - } - - /* Set output limits. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::RocP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rocP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ROCP( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int inIdx, outIdx, trailingIdx; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ inIdx = startIdx; -/* Generated */ trailingIdx = startIdx - optInTimePeriod; -/* Generated */ while( inIdx <= endIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ if( tempReal != 0.0 ) -/* Generated */ outReal[outIdx++] = (inReal[inIdx]-tempReal)/tempReal; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ inIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ROCR.c b/src/ta-lib/src/ta_func/ta_ROCR.c deleted file mode 100644 index 46793bb04..000000000 --- a/src/ta-lib/src/ta_func/ta_ROCR.c +++ /dev/null @@ -1,359 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::RocRLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int rocRLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ROCR_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ROCR - Rate of change ratio: (price/prevPrice) - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rocR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ROCR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - - int inIdx, outIdx, trailingIdx; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* The interpretation of the rate of change varies widely depending - * which software and/or books you are refering to. - * - * The following is the table of Rate-Of-Change implemented in TA-LIB: - * MOM = (price - prevPrice) [Momentum] - * ROC = ((price/prevPrice)-1)*100 [Rate of change] - * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] - * ROCR = (price/prevPrice) [Rate of change ratio] - * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] - * - * Here are the equivalent function in other software: - * TA-Lib | Tradestation | Metastock - * ================================================= - * MOM | Momentum | ROC (Point) - * ROC | ROC | ROC (Percent) - * ROCP | PercentChange | - - * ROCR | - | - - * ROCR100 | - | MO - * - * The MOM function is the only one who is not normalized, and thus - * should be avoided for comparing different time serie of prices. - * - * ROC and ROCP are centered at zero and can have positive and negative - * value. Here are some equivalence: - * ROC = ROCP/100 - * = ((price-prevPrice)/prevPrice)/100 - * = ((price/prevPrice)-1)*100 - * - * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are - * always positive values. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate Rate of change Ratio: (price / prevPrice) */ - outIdx = 0; - inIdx = startIdx; - trailingIdx = startIdx - optInTimePeriod; - - while( inIdx <= endIdx ) - { - tempReal = inReal[trailingIdx++]; - if( tempReal != 0.0 ) - outReal[outIdx++] = (inReal[inIdx] / tempReal); - else - outReal[outIdx++] = 0.0; - - inIdx++; - } - - /* Set output limits. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::RocR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rocR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ROCR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int inIdx, outIdx, trailingIdx; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ inIdx = startIdx; -/* Generated */ trailingIdx = startIdx - optInTimePeriod; -/* Generated */ while( inIdx <= endIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ if( tempReal != 0.0 ) -/* Generated */ outReal[outIdx++] = (inReal[inIdx] / tempReal); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ inIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ROCR100.c b/src/ta-lib/src/ta_func/ta_ROCR100.c deleted file mode 100644 index 7895322c0..000000000 --- a/src/ta-lib/src/ta_func/ta_ROCR100.c +++ /dev/null @@ -1,358 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::RocR100Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int rocR100Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ROCR100_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100 - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rocR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ROCR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int inIdx, outIdx, trailingIdx; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* The interpretation of the rate of change varies widely depending - * which software and/or books you are refering to. - * - * The following is the table of Rate-Of-Change implemented in TA-LIB: - * MOM = (price - prevPrice) [Momentum] - * ROC = ((price/prevPrice)-1)*100 [Rate of change] - * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] - * ROCR = (price/prevPrice) [Rate of change ratio] - * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] - * - * Here are the equivalent function in other software: - * TA-Lib | Tradestation | Metastock - * ================================================= - * MOM | Momentum | ROC (Point) - * ROC | ROC | ROC (Percent) - * ROCP | PercentChange | - - * ROCR | - | - - * ROCR100 | - | MO - * - * The MOM function is the only one who is not normalized, and thus - * should be avoided for comparing different time serie of prices. - * - * ROC and ROCP are centered at zero and can have positive and negative - * value. Here are some equivalence: - * ROC = ROCP/100 - * = ((price-prevPrice)/prevPrice)/100 - * = ((price/prevPrice)-1)*100 - * - * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are - * always positive values. - */ - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < optInTimePeriod ) - startIdx = optInTimePeriod; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate Rate of change Ratio: (price / prevPrice) */ - outIdx = 0; - inIdx = startIdx; - trailingIdx = startIdx - optInTimePeriod; - - while( inIdx <= endIdx ) - { - tempReal = inReal[trailingIdx++]; - if( tempReal != 0.0 ) - outReal[outIdx++] = (inReal[inIdx] / tempReal)*100.0; - else - outReal[outIdx++] = 0.0; - - inIdx++; - } - - /* Set output limits. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::RocR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rocR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ROCR100( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int inIdx, outIdx, trailingIdx; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 10; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < optInTimePeriod ) -/* Generated */ startIdx = optInTimePeriod; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ inIdx = startIdx; -/* Generated */ trailingIdx = startIdx - optInTimePeriod; -/* Generated */ while( inIdx <= endIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ if( tempReal != 0.0 ) -/* Generated */ outReal[outIdx++] = (inReal[inIdx] / tempReal)*100.0; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ inIdx++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_RSI.c b/src/ta-lib/src/ta_func/ta_RSI.c deleted file mode 100644 index 641b476b5..000000000 --- a/src/ta-lib/src/ta_func/ta_RSI.c +++ /dev/null @@ -1,617 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 062804 MF Resolve div by zero bug on limit case. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::RsiLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int rsiLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_RSI_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - retValue = optInTimePeriod + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_RSI,Rsi); - if( TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock) ) - retValue--; - - return retValue; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_RSI - Relative Strength Index - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_RSI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int outIdx; - - int today, lookbackTotal, unstablePeriod, i; - double prevGain, prevLoss, prevValue, savePrevValue; - double tempValue1, tempValue2; - - #if defined( USE_SINGLE_PRECISION_INPUT ) - ARRAY_MEMMOVEMIX_VAR; - #endif - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* The following algorithm is base on the original - * work from Wilder's and shall represent the - * original idea behind the classic RSI. - * - * Metastock is starting the calculation one price - * bar earlier. To make this possible, they assume - * that the very first bar will be identical to the - * previous one (no gain or loss). - */ - - /* If changing this function, please check also CMO - * which is mostly identical (just different in one step - * of calculation). - */ - - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - outIdx = 0; /* Index into the output. */ - - /* Trap special case where the period is '1'. - * In that case, just copy the input into the - * output for the requested range (as-is !) - */ - if( optInTimePeriod == 1 ) - { - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - i = (endIdx-startIdx)+1; - VALUE_HANDLE_DEREF(outNBElement) = i; - #if defined( USE_SINGLE_PRECISION_INPUT ) - ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); - #else - ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); - #endif - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Accumulate Wilder's "Average Gain" and "Average Loss" - * among the initial period. - */ - today = startIdx-lookbackTotal; - prevValue = inReal[today]; - - unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_RSI,Rsi); - - /* If there is no unstable period, - * calculate the 'additional' initial - * price bar who is particuliar to - * metastock. - * If there is an unstable period, - * no need to calculate since this - * first value will be surely skip. - */ - if( (unstablePeriod == 0) && - (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) - { - /* Preserve prevValue because it may get - * overwritten by the output. - *(because output ptr could be the same as input ptr). - */ - savePrevValue = prevValue; - - /* No unstable period, so must calculate first output - * particular to Metastock. - * (Metastock re-use the first price bar, so there - * is no loss/gain at first. Beats me why they - * are doing all this). - */ - prevGain = 0.0; - prevLoss = 0.0; - for( i=optInTimePeriod; i > 0; i-- ) - { - tempValue1 = inReal[today++]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - } - - - tempValue1 = prevLoss/optInTimePeriod; - tempValue2 = prevGain/optInTimePeriod; - - /* Write the output. */ - tempValue1 = tempValue2+tempValue1; - if( !TA_IS_ZERO(tempValue1) ) - outReal[outIdx++] = 100*(tempValue2/tempValue1); - else - outReal[outIdx++] = 0.0; - - /* Are we done? */ - if( today > endIdx ) - { - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Start over for the next price bar. */ - today -= optInTimePeriod; - prevValue = savePrevValue; - } - - - /* Remaining of the processing is identical - * for both Classic calculation and Metastock. - */ - prevGain = 0.0; - prevLoss = 0.0; - today++; - for( i=optInTimePeriod; i > 0; i-- ) - { - tempValue1 = inReal[today++]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - } - - - /* Subsequent prevLoss and prevGain are smoothed - * using the previous values (Wilder's approach). - * 1) Multiply the previous by 'period-1'. - * 2) Add today value. - * 3) Divide by 'period'. - */ - prevLoss /= optInTimePeriod; - prevGain /= optInTimePeriod; - - /* Often documentation present the RSI calculation as follow: - * RSI = 100 - (100 / 1 + (prevGain/prevLoss)) - * - * The following is equivalent: - * RSI = 100 * (prevGain/(prevGain+prevLoss)) - * - * The second equation is used here for speed optimization. - */ - if( today > startIdx ) - { - tempValue1 = prevGain+prevLoss; - if( !TA_IS_ZERO(tempValue1) ) - outReal[outIdx++] = 100.0*(prevGain/tempValue1); - else - outReal[outIdx++] = 0.0; - } - else - { - /* Skip the unstable period. Do the processing - * but do not write it in the output. - */ - while( today < startIdx ) - { - tempValue1 = inReal[today]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - - prevLoss *= (optInTimePeriod-1); - prevGain *= (optInTimePeriod-1); - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - - prevLoss /= optInTimePeriod; - prevGain /= optInTimePeriod; - - today++; - } - } - - /* Unstable period skipped... now continue - * processing if needed. - */ - while( today <= endIdx ) - { - tempValue1 = inReal[today++]; - tempValue2 = tempValue1 - prevValue; - prevValue = tempValue1; - - prevLoss *= (optInTimePeriod-1); - prevGain *= (optInTimePeriod-1); - if( tempValue2 < 0 ) - prevLoss -= tempValue2; - else - prevGain += tempValue2; - - prevLoss /= optInTimePeriod; - prevGain /= optInTimePeriod; - tempValue1 = prevGain+prevLoss; - if( !TA_IS_ZERO(tempValue1) ) - outReal[outIdx++] = 100.0*(prevGain/tempValue1); - else - outReal[outIdx++] = 0.0; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Rsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode rsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_RSI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal, unstablePeriod, i; -/* Generated */ double prevGain, prevLoss, prevValue, savePrevValue; -/* Generated */ double tempValue1, tempValue2; -/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ ARRAY_MEMMOVEMIX_VAR; -/* Generated */ #endif -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ outIdx = 0; -/* Generated */ if( optInTimePeriod == 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ i = (endIdx-startIdx)+1; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = i; -/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, i ); -/* Generated */ #else -/* Generated */ ARRAY_MEMMOVE( outReal, 0, inReal, startIdx, i ); -/* Generated */ #endif -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ today = startIdx-lookbackTotal; -/* Generated */ prevValue = inReal[today]; -/* Generated */ unstablePeriod = TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_RSI,Rsi); -/* Generated */ if( (unstablePeriod == 0) && -/* Generated */ (TA_GLOBALS_COMPATIBILITY == ENUM_VALUE(Compatibility,TA_COMPATIBILITY_METASTOCK,Metastock))) -/* Generated */ { -/* Generated */ savePrevValue = prevValue; -/* Generated */ prevGain = 0.0; -/* Generated */ prevLoss = 0.0; -/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today++]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ } -/* Generated */ tempValue1 = prevLoss/optInTimePeriod; -/* Generated */ tempValue2 = prevGain/optInTimePeriod; -/* Generated */ tempValue1 = tempValue2+tempValue1; -/* Generated */ if( !TA_IS_ZERO(tempValue1) ) -/* Generated */ outReal[outIdx++] = 100*(tempValue2/tempValue1); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ if( today > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ today -= optInTimePeriod; -/* Generated */ prevValue = savePrevValue; -/* Generated */ } -/* Generated */ prevGain = 0.0; -/* Generated */ prevLoss = 0.0; -/* Generated */ today++; -/* Generated */ for( i=optInTimePeriod; i > 0; i-- ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today++]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ } -/* Generated */ prevLoss /= optInTimePeriod; -/* Generated */ prevGain /= optInTimePeriod; -/* Generated */ if( today > startIdx ) -/* Generated */ { -/* Generated */ tempValue1 = prevGain+prevLoss; -/* Generated */ if( !TA_IS_ZERO(tempValue1) ) -/* Generated */ outReal[outIdx++] = 100.0*(prevGain/tempValue1); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ while( today < startIdx ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ prevLoss *= (optInTimePeriod-1); -/* Generated */ prevGain *= (optInTimePeriod-1); -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ prevLoss /= optInTimePeriod; -/* Generated */ prevGain /= optInTimePeriod; -/* Generated */ today++; -/* Generated */ } -/* Generated */ } -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tempValue1 = inReal[today++]; -/* Generated */ tempValue2 = tempValue1 - prevValue; -/* Generated */ prevValue = tempValue1; -/* Generated */ prevLoss *= (optInTimePeriod-1); -/* Generated */ prevGain *= (optInTimePeriod-1); -/* Generated */ if( tempValue2 < 0 ) -/* Generated */ prevLoss -= tempValue2; -/* Generated */ else -/* Generated */ prevGain += tempValue2; -/* Generated */ prevLoss /= optInTimePeriod; -/* Generated */ prevGain /= optInTimePeriod; -/* Generated */ tempValue1 = prevGain+prevLoss; -/* Generated */ if( !TA_IS_ZERO(tempValue1) ) -/* Generated */ outReal[outIdx++] = 100.0*(prevGain/tempValue1); -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SAR.c b/src/ta-lib/src/ta_func/ta_SAR.c deleted file mode 100644 index 2b48d81d9..000000000 --- a/src/ta-lib/src/ta_func/ta_SAR.c +++ /dev/null @@ -1,724 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * CF Christo Fogelberg - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 122104 MF,CF Fix#1089506 for out-of-bound access to ep_temp. - */ - -/* SAR_ROUNDING is just for test purpose when cross-referencing that - * function with example from Wilder's book. Wilder is using two - * decimal rounding for simplification. TA-Lib does not round. - */ -/* #define SAR_ROUNDING(x) x=round_pos_2(x) */ -#define SAR_ROUNDING(x) - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SarLookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int sarLookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SAR_Lookback( double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInAcceleration == TA_REAL_DEFAULT ) -/* Generated */ optInAcceleration = 2.000000e-2; -/* Generated */ else if( (optInAcceleration < 0.000000e+0) ||/* Generated */ (optInAcceleration > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInMaximum == TA_REAL_DEFAULT ) -/* Generated */ optInMaximum = 2.000000e-1; -/* Generated */ else if( (optInMaximum < 0.000000e+0) ||/* Generated */ (optInMaximum > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInAcceleration); - UNUSED_VARIABLE(optInMaximum); - - /* SAR always sacrify one price bar to establish the - * initial extreme price. - */ - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SAR - Parabolic SAR - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInAcceleration:(From 0 to TA_REAL_MAX) - * Acceleration Factor used up to the Maximum value - * - * optInMaximum:(From 0 to TA_REAL_MAX) - * Acceleration Factor Maximum value - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ENUM_DECLARATION(RetCode) retCode; - - int isLong; /* > 0 indicates long. == 0 indicates short */ - int todayIdx, outIdx; - - VALUE_HANDLE_INT(tempInt); - - double newHigh, newLow, prevHigh, prevLow; - double af, ep, sar; - ARRAY_LOCAL(ep_temp,1); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInAcceleration == TA_REAL_DEFAULT ) -/* Generated */ optInAcceleration = 2.000000e-2; -/* Generated */ else if( (optInAcceleration < 0.000000e+0) ||/* Generated */ (optInAcceleration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInMaximum == TA_REAL_DEFAULT ) -/* Generated */ optInMaximum = 2.000000e-1; -/* Generated */ else if( (optInMaximum < 0.000000e+0) ||/* Generated */ (optInMaximum > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Implementation of the SAR has been a little bit open to interpretation - * since Wilder (the original author) did not define a precise algorithm - * on how to bootstrap the algorithm. Take any existing software application - * and you will see slight variation on how the algorithm was adapted. - * - * What is the initial trade direction? Long or short? - * =================================================== - * The interpretation of what should be the initial SAR values is - * open to interpretation, particularly since the caller to the function - * does not specify the initial direction of the trade. - * - * In TA-Lib, the following logic is used: - * - Calculate +DM and -DM between the first and - * second bar. The highest directional indication will - * indicate the assumed direction of the trade for the second - * price bar. - * - In the case of a tie between +DM and -DM, - * the direction is LONG by default. - * - * What is the initial "extreme point" and thus SAR? - * ================================================= - * The following shows how different people took different approach: - * - Metastock use the first price bar high/low depending of - * the direction. No SAR is calculated for the first price - * bar. - * - Tradestation use the closing price of the second bar. No - * SAR are calculated for the first price bar. - * - Wilder (the original author) use the SIP from the - * previous trade (cannot be implement here since the - * direction and length of the previous trade is unknonw). - * - The Magazine TASC seems to follow Wilder approach which - * is not practical here. - * - * TA-Lib "consume" the first price bar and use its high/low as the - * initial SAR of the second price bar. I found that approach to be - * the closest to Wilders idea of having the first entry day use - * the previous extreme point, except that here the extreme point is - * derived solely from the first price bar. I found the same approach - * to be used by Metastock. - */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - * - * Move up the start index if there is not - * enough initial data. - */ - if( startIdx < 1 ) - startIdx = 1; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Make sure the acceleration and maximum are coherent. - * If not, correct the acceleration. - */ - af = optInAcceleration; - if( af > optInMaximum ) - af = optInAcceleration = optInMaximum; - - /* Identify if the initial direction is long or short. - * (ep is just used as a temp buffer here, the name - * of the parameter is not significant). - */ - retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, - VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), - ep_temp ); - if( ep_temp[0] > 0 ) - isLong = 0; - else - isLong = 1; - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - outIdx = 0; - - /* Write the first SAR. */ - todayIdx = startIdx; - - newHigh = inHigh[todayIdx-1]; - newLow = inLow[todayIdx-1]; - - SAR_ROUNDING(newHigh); - SAR_ROUNDING(newLow); - - if( isLong == 1 ) - { - ep = inHigh[todayIdx]; - sar = newLow; - } - else - { - ep = inLow[todayIdx]; - sar = newHigh; - } - - SAR_ROUNDING(sar); - - /* Cheat on the newLow and newHigh for the - * first iteration. - */ - newLow = inLow[todayIdx]; - newHigh = inHigh[todayIdx]; - - while( todayIdx <= endIdx ) - { - prevLow = newLow; - prevHigh = newHigh; - newLow = inLow[todayIdx]; - newHigh = inHigh[todayIdx]; - todayIdx++; - - SAR_ROUNDING(newLow); - SAR_ROUNDING(newHigh); - - if( isLong == 1 ) - { - /* Switch to short if the low penetrates the SAR value. */ - if( newLow <= sar ) - { - /* Switch and Overide the SAR with the ep */ - isLong = 0; - sar = ep; - - /* Make sure the overide SAR is within - * yesterday's and today's range. - */ - if( sar < prevHigh ) - sar = prevHigh; - if( sar < newHigh ) - sar = newHigh; - - /* Output the overide SAR */ - outReal[outIdx++] = sar; - - /* Adjust af and ep */ - af = optInAcceleration; - ep = newLow; - - /* Calculate the new SAR */ - sar = sar + af * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar < prevHigh ) - sar = prevHigh; - if( sar < newHigh ) - sar = newHigh; - } - else - { - /* No switch */ - - /* Output the SAR (was calculated in the previous iteration) */ - outReal[outIdx++] = sar; - - /* Adjust af and ep. */ - if( newHigh > ep ) - { - ep = newHigh; - af += optInAcceleration; - if( af > optInMaximum ) - af = optInMaximum; - } - - /* Calculate the new SAR */ - sar = sar + af * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar > prevLow ) - sar = prevLow; - if( sar > newLow ) - sar = newLow; - } - } - else - { - /* Switch to long if the high penetrates the SAR value. */ - if( newHigh >= sar ) - { - /* Switch and Overide the SAR with the ep */ - isLong = 1; - sar = ep; - - /* Make sure the overide SAR is within - * yesterday's and today's range. - */ - if( sar > prevLow ) - sar = prevLow; - if( sar > newLow ) - sar = newLow; - - /* Output the overide SAR */ - outReal[outIdx++] = sar; - - /* Adjust af and ep */ - af = optInAcceleration; - ep = newHigh; - - /* Calculate the new SAR */ - sar = sar + af * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar > prevLow ) - sar = prevLow; - if( sar > newLow ) - sar = newLow; - } - else - { - /* No switch */ - - /* Output the SAR (was calculated in the previous iteration) */ - outReal[outIdx++] = sar; - - /* Adjust af and ep. */ - if( newLow < ep ) - { - ep = newLow; - af += optInAcceleration; - if( af > optInMaximum ) - af = optInMaximum; - } - - /* Calculate the new SAR */ - sar = sar + af * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar < prevHigh ) - sar = prevHigh; - if( sar < newHigh ) - sar = newHigh; - } - } - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sar( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ double optInAcceleration, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInMaximum, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int isLong; -/* Generated */ int todayIdx, outIdx; -/* Generated */ VALUE_HANDLE_INT(tempInt); -/* Generated */ double newHigh, newLow, prevHigh, prevLow; -/* Generated */ double af, ep, sar; -/* Generated */ ARRAY_LOCAL(ep_temp,1); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInAcceleration == TA_REAL_DEFAULT ) -/* Generated */ optInAcceleration = 2.000000e-2; -/* Generated */ else if( (optInAcceleration < 0.000000e+0) || (optInAcceleration > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInMaximum == TA_REAL_DEFAULT ) -/* Generated */ optInMaximum = 2.000000e-1; -/* Generated */ else if( (optInMaximum < 0.000000e+0) || (optInMaximum > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < 1 ) -/* Generated */ startIdx = 1; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ af = optInAcceleration; -/* Generated */ if( af > optInMaximum ) -/* Generated */ af = optInAcceleration = optInMaximum; -/* Generated */ retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, -/* Generated */ VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), -/* Generated */ ep_temp ); -/* Generated */ if( ep_temp[0] > 0 ) -/* Generated */ isLong = 0; -/* Generated */ else -/* Generated */ isLong = 1; -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ todayIdx = startIdx; -/* Generated */ newHigh = inHigh[todayIdx-1]; -/* Generated */ newLow = inLow[todayIdx-1]; -/* Generated */ SAR_ROUNDING(newHigh); -/* Generated */ SAR_ROUNDING(newLow); -/* Generated */ if( isLong == 1 ) -/* Generated */ { -/* Generated */ ep = inHigh[todayIdx]; -/* Generated */ sar = newLow; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ ep = inLow[todayIdx]; -/* Generated */ sar = newHigh; -/* Generated */ } -/* Generated */ SAR_ROUNDING(sar); -/* Generated */ newLow = inLow[todayIdx]; -/* Generated */ newHigh = inHigh[todayIdx]; -/* Generated */ while( todayIdx <= endIdx ) -/* Generated */ { -/* Generated */ prevLow = newLow; -/* Generated */ prevHigh = newHigh; -/* Generated */ newLow = inLow[todayIdx]; -/* Generated */ newHigh = inHigh[todayIdx]; -/* Generated */ todayIdx++; -/* Generated */ SAR_ROUNDING(newLow); -/* Generated */ SAR_ROUNDING(newHigh); -/* Generated */ if( isLong == 1 ) -/* Generated */ { -/* Generated */ if( newLow <= sar ) -/* Generated */ { -/* Generated */ isLong = 0; -/* Generated */ sar = ep; -/* Generated */ if( sar < prevHigh ) -/* Generated */ sar = prevHigh; -/* Generated */ if( sar < newHigh ) -/* Generated */ sar = newHigh; -/* Generated */ outReal[outIdx++] = sar; -/* Generated */ af = optInAcceleration; -/* Generated */ ep = newLow; -/* Generated */ sar = sar + af * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar < prevHigh ) -/* Generated */ sar = prevHigh; -/* Generated */ if( sar < newHigh ) -/* Generated */ sar = newHigh; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ outReal[outIdx++] = sar; -/* Generated */ if( newHigh > ep ) -/* Generated */ { -/* Generated */ ep = newHigh; -/* Generated */ af += optInAcceleration; -/* Generated */ if( af > optInMaximum ) -/* Generated */ af = optInMaximum; -/* Generated */ } -/* Generated */ sar = sar + af * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar > prevLow ) -/* Generated */ sar = prevLow; -/* Generated */ if( sar > newLow ) -/* Generated */ sar = newLow; -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ if( newHigh >= sar ) -/* Generated */ { -/* Generated */ isLong = 1; -/* Generated */ sar = ep; -/* Generated */ if( sar > prevLow ) -/* Generated */ sar = prevLow; -/* Generated */ if( sar > newLow ) -/* Generated */ sar = newLow; -/* Generated */ outReal[outIdx++] = sar; -/* Generated */ af = optInAcceleration; -/* Generated */ ep = newHigh; -/* Generated */ sar = sar + af * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar > prevLow ) -/* Generated */ sar = prevLow; -/* Generated */ if( sar > newLow ) -/* Generated */ sar = newLow; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ outReal[outIdx++] = sar; -/* Generated */ if( newLow < ep ) -/* Generated */ { -/* Generated */ ep = newLow; -/* Generated */ af += optInAcceleration; -/* Generated */ if( af > optInMaximum ) -/* Generated */ af = optInMaximum; -/* Generated */ } -/* Generated */ sar = sar + af * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar < prevHigh ) -/* Generated */ sar = prevHigh; -/* Generated */ if( sar < newHigh ) -/* Generated */ sar = newHigh; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SAREXT.c b/src/ta-lib/src/ta_func/ta_SAREXT.c deleted file mode 100644 index 3392de9ee..000000000 --- a/src/ta-lib/src/ta_func/ta_SAREXT.c +++ /dev/null @@ -1,1004 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * PP Peter Pudaite - * CF Christo Fogelberg - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 091503 PP Reworked TA_SAR to allow customisation of more SAR params. - * 092103 MF Some changes related on first round of tests - * 092303 PP Minor bug fixes. - * 122104 MF,CF Fix#1089506 for out-of-bound access to ep_temp. - * - */ - -/* SAR_ROUNDING is just for test purpose when cross-referencing that - * function with example from Wilder's book. Wilder is using two - * decimal rounding for simplification. TA-Lib does not round. - */ -/* #define SAR_ROUNDING(x) x=round_pos_2(x) */ -#define SAR_ROUNDING(x) - - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SarExtLookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int sarExtLookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SAREXT_Lookback( double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort ) /* From 0 to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( optInStartValue == TA_REAL_DEFAULT ) -/* Generated */ optInStartValue = 0.000000e+0; -/* Generated */ else if( (optInStartValue < -3.000000e+37) ||/* Generated */ (optInStartValue > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInOffsetOnReverse == TA_REAL_DEFAULT ) -/* Generated */ optInOffsetOnReverse = 0.000000e+0; -/* Generated */ else if( (optInOffsetOnReverse < 0.000000e+0) ||/* Generated */ (optInOffsetOnReverse > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInAccelerationInitLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationInitLong = 2.000000e-2; -/* Generated */ else if( (optInAccelerationInitLong < 0.000000e+0) ||/* Generated */ (optInAccelerationInitLong > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInAccelerationLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationLong = 2.000000e-2; -/* Generated */ else if( (optInAccelerationLong < 0.000000e+0) ||/* Generated */ (optInAccelerationLong > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInAccelerationMaxLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationMaxLong = 2.000000e-1; -/* Generated */ else if( (optInAccelerationMaxLong < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxLong > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInAccelerationInitShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationInitShort = 2.000000e-2; -/* Generated */ else if( (optInAccelerationInitShort < 0.000000e+0) ||/* Generated */ (optInAccelerationInitShort > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInAccelerationShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationShort = 2.000000e-2; -/* Generated */ else if( (optInAccelerationShort < 0.000000e+0) ||/* Generated */ (optInAccelerationShort > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInAccelerationMaxShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationMaxShort = 2.000000e-1; -/* Generated */ else if( (optInAccelerationMaxShort < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxShort > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInStartValue); - UNUSED_VARIABLE(optInOffsetOnReverse); - UNUSED_VARIABLE(optInAccelerationInitLong); - UNUSED_VARIABLE(optInAccelerationLong); - UNUSED_VARIABLE(optInAccelerationMaxLong); - UNUSED_VARIABLE(optInAccelerationInitShort); - UNUSED_VARIABLE(optInAccelerationShort); - UNUSED_VARIABLE(optInAccelerationMaxShort); - - /* SAR always sacrifices one price bar to establish the - * initial extreme price. - */ - - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SAREXT - Parabolic SAR - Extended - * - * Input = High, Low - * Output = double - * - * Optional Parameters - * ------------------- - * optInStartValue:(From TA_REAL_MIN to TA_REAL_MAX) - * Start value and direction. 0 for Auto, >0 for Long, <0 for Short - * - * optInOffsetOnReverse:(From 0 to TA_REAL_MAX) - * Percent offset added/removed to initial stop on short/long reversal - * - * optInAccelerationInitLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor initial value for the Long direction - * - * optInAccelerationLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor for the Long direction - * - * optInAccelerationMaxLong:(From 0 to TA_REAL_MAX) - * Acceleration Factor maximum value for the Long direction - * - * optInAccelerationInitShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor initial value for the Short direction - * - * optInAccelerationShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor for the Short direction - * - * optInAccelerationMaxShort:(From 0 to TA_REAL_MAX) - * Acceleration Factor maximum value for the Short direction - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sarExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SAREXT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ENUM_DECLARATION(RetCode) retCode; - - int isLong; /* > 0 indicates long. == 0 indicates short */ - int todayIdx, outIdx; - - VALUE_HANDLE_INT(tempInt); - - double newHigh, newLow, prevHigh, prevLow; - double afLong, afShort, ep, sar; - ARRAY_LOCAL(ep_temp,1); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ if( optInStartValue == TA_REAL_DEFAULT ) -/* Generated */ optInStartValue = 0.000000e+0; -/* Generated */ else if( (optInStartValue < -3.000000e+37) ||/* Generated */ (optInStartValue > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInOffsetOnReverse == TA_REAL_DEFAULT ) -/* Generated */ optInOffsetOnReverse = 0.000000e+0; -/* Generated */ else if( (optInOffsetOnReverse < 0.000000e+0) ||/* Generated */ (optInOffsetOnReverse > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInAccelerationInitLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationInitLong = 2.000000e-2; -/* Generated */ else if( (optInAccelerationInitLong < 0.000000e+0) ||/* Generated */ (optInAccelerationInitLong > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInAccelerationLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationLong = 2.000000e-2; -/* Generated */ else if( (optInAccelerationLong < 0.000000e+0) ||/* Generated */ (optInAccelerationLong > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInAccelerationMaxLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationMaxLong = 2.000000e-1; -/* Generated */ else if( (optInAccelerationMaxLong < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxLong > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInAccelerationInitShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationInitShort = 2.000000e-2; -/* Generated */ else if( (optInAccelerationInitShort < 0.000000e+0) ||/* Generated */ (optInAccelerationInitShort > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInAccelerationShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationShort = 2.000000e-2; -/* Generated */ else if( (optInAccelerationShort < 0.000000e+0) ||/* Generated */ (optInAccelerationShort > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInAccelerationMaxShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationMaxShort = 2.000000e-1; -/* Generated */ else if( (optInAccelerationMaxShort < 0.000000e+0) ||/* Generated */ (optInAccelerationMaxShort > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* This function is the same as TA_SAR, except that the caller has - * greater control on the SAR dynamic and initial state. - * - * In additon, the TA_SAREXT returns negative values when the position - * is short. This allow to distinguish when the SAR do actually reverse. - */ - - /* Implementation of the SAR has been a little bit open to interpretation - * since Wilder (the original author) did not define a precise algorithm - * on how to bootstrap the algorithm. Take any existing software application - * and you will see slight variation on how the algorithm was adapted. - * - * What is the initial trade direction? Long or short? - * =================================================== - * The interpretation of what should be the initial SAR values is - * open to interpretation, particularly since the caller to the function - * does not specify the initial direction of the trade. - * - * In TA-Lib, the following default logic is used: - * - Calculate +DM and -DM between the first and - * second bar. The highest directional indication will - * indicate the assumed direction of the trade for the second - * price bar. - * - In the case of a tie between +DM and -DM, - * the direction is LONG by default. - * - * What is the initial "extreme point" and thus SAR? - * ================================================= - * The following shows how different people took different approach: - * - Metastock use the first price bar high/low depending of - * the direction. No SAR is calculated for the first price - * bar. - * - Tradestation use the closing price of the second bar. No - * SAR are calculated for the first price bar. - * - Wilder (the original author) use the SIP from the - * previous trade (cannot be implement here since the - * direction and length of the previous trade is unknonw). - * - The Magazine TASC seems to follow Wilder approach which - * is not practical here. - * - * TA-Lib "consume" the first price bar and use its high/low as the - * initial SAR of the second price bar. I found that approach to be - * the closest to Wilders idea of having the first entry day use - * the previous extreme point, except that here the extreme point is - * derived solely from the first price bar. I found the same approach - * to be used by Metastock. - * - * - * Can I force the initial SAR? - * ============================ - * Yes. Using the optInStartValue_0 parameter: - * optInStartValue_0 > 0 : SAR is long at optInStartValue_0. - * optInStartValue_0 < 0 : SAR is short at fabs(optInStartValue_0). - * - * And when optInStartValue_0 == 0, the logic is the same as for TA_SAR - * (See previous two sections). - */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - * - * Move up the start index if there is not - * enough initial data. - */ - if( startIdx < 1 ) - startIdx = 1; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - - /* Check if the acceleration factors are being defined by the user. - * Make sure the acceleration and maximum are coherent. - * If not, correct the acceleration. - * Default afLong = 0.02 - * Default afShort = 0.02 - */ - - afLong = optInAccelerationInitLong; - afShort = optInAccelerationInitShort; - - if( afLong > optInAccelerationMaxLong ) - afLong = optInAccelerationInitLong = optInAccelerationMaxLong; - - if( optInAccelerationLong > optInAccelerationMaxLong ) - optInAccelerationLong = optInAccelerationMaxLong; - - if( afShort > optInAccelerationMaxShort) - afShort = optInAccelerationInitShort = optInAccelerationMaxShort; - - if( optInAccelerationShort > optInAccelerationMaxShort ) - optInAccelerationShort = optInAccelerationMaxShort; - - /* Initialise SAR calculations */ - - if(optInStartValue == 0) /* Default action */ - { - /* Identify if the initial direction is long or short. - * (ep is just used as a temp buffer here, the name - * of the parameter is not significant). - */ - retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, - VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), - ep_temp ); - if( ep_temp[0] > 0 ) - isLong = 0; - else - isLong = 1; - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - } - else if( optInStartValue > 0 ) /* Start Long */ - { - isLong = 1; - } - else /* optInStartValue_0 < 0 => Start Short */ - { - isLong = 0; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - outIdx = 0; - - - /* Write the first SAR. */ - todayIdx = startIdx; - - newHigh = inHigh[todayIdx-1]; - newLow = inLow[todayIdx-1]; - - SAR_ROUNDING(newHigh); - SAR_ROUNDING(newLow); - - if(optInStartValue == 0) /* Default action */ - { - if( isLong == 1 ) - { - ep = inHigh[todayIdx]; - sar = newLow; - } - else - { - ep = inLow[todayIdx]; - sar = newHigh; - } - } - else if ( optInStartValue > 0 ) /* Start Long at specified value. */ - { - ep = inHigh[todayIdx]; - sar = optInStartValue; - } - else /* if optInStartValue < 0 => Start Short at specified value. */ - { - ep = inLow[todayIdx]; - sar = std_fabs(optInStartValue); - } - - SAR_ROUNDING(sar); - - /* Cheat on the newLow and newHigh for the - * first iteration. - */ - newLow = inLow[todayIdx]; - newHigh = inHigh[todayIdx]; - - while( todayIdx <= endIdx ) - { - prevLow = newLow; - prevHigh = newHigh; - newLow = inLow[todayIdx]; - newHigh = inHigh[todayIdx]; - todayIdx++; - - SAR_ROUNDING(newLow); - SAR_ROUNDING(newHigh); - - if( isLong == 1 ) - { - /* Switch to short if the low penetrates the SAR value. */ - if( newLow <= sar ) - { - /* Switch and Overide the SAR with the ep */ - isLong = 0; - sar = ep; - - /* Make sure the overide SAR is within - * yesterday's and today's range. - */ - if( sar < prevHigh ) - sar = prevHigh; - if( sar < newHigh ) - sar = newHigh; - - /* Output the overide SAR */ - if( optInOffsetOnReverse != 0.0 ) - sar += sar * optInOffsetOnReverse; - outReal[outIdx++] = -sar; - - /* Adjust afShort and ep */ - afShort = optInAccelerationInitShort; - ep = newLow; - - /* Calculate the new SAR */ - sar = sar + afShort * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar < prevHigh ) - sar = prevHigh; - if( sar < newHigh ) - sar = newHigh; - } - else - { - /* No switch */ - - /* Output the SAR (was calculated in the previous iteration) */ - outReal[outIdx++] = sar; - - /* Adjust afLong and ep. */ - if( newHigh > ep ) - { - ep = newHigh; - afLong += optInAccelerationLong; - if( afLong > optInAccelerationMaxLong ) - afLong = optInAccelerationMaxLong; - } - - /* Calculate the new SAR */ - sar = sar + afLong * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar > prevLow ) - sar = prevLow; - if( sar > newLow ) - sar = newLow; - } - } - else - { - /* Switch to long if the high penetrates the SAR value. */ - if( newHigh >= sar ) - { - /* Switch and Overide the SAR with the ep */ - isLong = 1; - sar = ep; - - /* Make sure the overide SAR is within - * yesterday's and today's range. - */ - if( sar > prevLow ) - sar = prevLow; - if( sar > newLow ) - sar = newLow; - - /* Output the overide SAR */ - if( optInOffsetOnReverse != 0.0 ) - sar -= sar * optInOffsetOnReverse; - outReal[outIdx++] = sar; - - /* Adjust afLong and ep */ - afLong = optInAccelerationInitLong; - ep = newHigh; - - /* Calculate the new SAR */ - sar = sar + afLong * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar > prevLow ) - sar = prevLow; - if( sar > newLow ) - sar = newLow; - } - else - { - /* No switch */ - - /* Output the SAR (was calculated in the previous iteration) */ - outReal[outIdx++] = -sar; - - /* Adjust afShort and ep. */ - if( newLow < ep ) - { - ep = newLow; - afShort += optInAccelerationShort; - if( afShort > optInAccelerationMaxShort ) - afShort = optInAccelerationMaxShort; - } - - /* Calculate the new SAR */ - sar = sar + afShort * (ep - sar); - SAR_ROUNDING( sar ); - - /* Make sure the new SAR is within - * yesterday's and today's range. - */ - if( sar < prevHigh ) - sar = prevHigh; - if( sar < newHigh ) - sar = newHigh; - } - } - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::SarExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sarExt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SAREXT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ double optInStartValue, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ double optInOffsetOnReverse, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxLong, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationInitShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ double optInAccelerationMaxShort, /* From 0 to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int isLong; -/* Generated */ int todayIdx, outIdx; -/* Generated */ VALUE_HANDLE_INT(tempInt); -/* Generated */ double newHigh, newLow, prevHigh, prevLow; -/* Generated */ double afLong, afShort, ep, sar; -/* Generated */ ARRAY_LOCAL(ep_temp,1); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( optInStartValue == TA_REAL_DEFAULT ) -/* Generated */ optInStartValue = 0.000000e+0; -/* Generated */ else if( (optInStartValue < -3.000000e+37) || (optInStartValue > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInOffsetOnReverse == TA_REAL_DEFAULT ) -/* Generated */ optInOffsetOnReverse = 0.000000e+0; -/* Generated */ else if( (optInOffsetOnReverse < 0.000000e+0) || (optInOffsetOnReverse > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInAccelerationInitLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationInitLong = 2.000000e-2; -/* Generated */ else if( (optInAccelerationInitLong < 0.000000e+0) || (optInAccelerationInitLong > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInAccelerationLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationLong = 2.000000e-2; -/* Generated */ else if( (optInAccelerationLong < 0.000000e+0) || (optInAccelerationLong > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInAccelerationMaxLong == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationMaxLong = 2.000000e-1; -/* Generated */ else if( (optInAccelerationMaxLong < 0.000000e+0) || (optInAccelerationMaxLong > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInAccelerationInitShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationInitShort = 2.000000e-2; -/* Generated */ else if( (optInAccelerationInitShort < 0.000000e+0) || (optInAccelerationInitShort > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInAccelerationShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationShort = 2.000000e-2; -/* Generated */ else if( (optInAccelerationShort < 0.000000e+0) || (optInAccelerationShort > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInAccelerationMaxShort == TA_REAL_DEFAULT ) -/* Generated */ optInAccelerationMaxShort = 2.000000e-1; -/* Generated */ else if( (optInAccelerationMaxShort < 0.000000e+0) || (optInAccelerationMaxShort > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < 1 ) -/* Generated */ startIdx = 1; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ afLong = optInAccelerationInitLong; -/* Generated */ afShort = optInAccelerationInitShort; -/* Generated */ if( afLong > optInAccelerationMaxLong ) -/* Generated */ afLong = optInAccelerationInitLong = optInAccelerationMaxLong; -/* Generated */ if( optInAccelerationLong > optInAccelerationMaxLong ) -/* Generated */ optInAccelerationLong = optInAccelerationMaxLong; -/* Generated */ if( afShort > optInAccelerationMaxShort) -/* Generated */ afShort = optInAccelerationInitShort = optInAccelerationMaxShort; -/* Generated */ if( optInAccelerationShort > optInAccelerationMaxShort ) -/* Generated */ optInAccelerationShort = optInAccelerationMaxShort; -/* Generated */ if(optInStartValue == 0) -/* Generated */ { -/* Generated */ retCode = FUNCTION_CALL(MINUS_DM)( startIdx, startIdx, inHigh, inLow, 1, -/* Generated */ VALUE_HANDLE_OUT(tempInt), VALUE_HANDLE_OUT(tempInt), -/* Generated */ ep_temp ); -/* Generated */ if( ep_temp[0] > 0 ) -/* Generated */ isLong = 0; -/* Generated */ else -/* Generated */ isLong = 1; -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ } -/* Generated */ else if( optInStartValue > 0 ) -/* Generated */ { -/* Generated */ isLong = 1; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ isLong = 0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ todayIdx = startIdx; -/* Generated */ newHigh = inHigh[todayIdx-1]; -/* Generated */ newLow = inLow[todayIdx-1]; -/* Generated */ SAR_ROUNDING(newHigh); -/* Generated */ SAR_ROUNDING(newLow); -/* Generated */ if(optInStartValue == 0) -/* Generated */ { -/* Generated */ if( isLong == 1 ) -/* Generated */ { -/* Generated */ ep = inHigh[todayIdx]; -/* Generated */ sar = newLow; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ ep = inLow[todayIdx]; -/* Generated */ sar = newHigh; -/* Generated */ } -/* Generated */ } -/* Generated */ else if ( optInStartValue > 0 ) -/* Generated */ { -/* Generated */ ep = inHigh[todayIdx]; -/* Generated */ sar = optInStartValue; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ ep = inLow[todayIdx]; -/* Generated */ sar = std_fabs(optInStartValue); -/* Generated */ } -/* Generated */ SAR_ROUNDING(sar); -/* Generated */ newLow = inLow[todayIdx]; -/* Generated */ newHigh = inHigh[todayIdx]; -/* Generated */ while( todayIdx <= endIdx ) -/* Generated */ { -/* Generated */ prevLow = newLow; -/* Generated */ prevHigh = newHigh; -/* Generated */ newLow = inLow[todayIdx]; -/* Generated */ newHigh = inHigh[todayIdx]; -/* Generated */ todayIdx++; -/* Generated */ SAR_ROUNDING(newLow); -/* Generated */ SAR_ROUNDING(newHigh); -/* Generated */ if( isLong == 1 ) -/* Generated */ { -/* Generated */ if( newLow <= sar ) -/* Generated */ { -/* Generated */ isLong = 0; -/* Generated */ sar = ep; -/* Generated */ if( sar < prevHigh ) -/* Generated */ sar = prevHigh; -/* Generated */ if( sar < newHigh ) -/* Generated */ sar = newHigh; -/* Generated */ if( optInOffsetOnReverse != 0.0 ) -/* Generated */ sar += sar * optInOffsetOnReverse; -/* Generated */ outReal[outIdx++] = -sar; -/* Generated */ afShort = optInAccelerationInitShort; -/* Generated */ ep = newLow; -/* Generated */ sar = sar + afShort * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar < prevHigh ) -/* Generated */ sar = prevHigh; -/* Generated */ if( sar < newHigh ) -/* Generated */ sar = newHigh; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ outReal[outIdx++] = sar; -/* Generated */ if( newHigh > ep ) -/* Generated */ { -/* Generated */ ep = newHigh; -/* Generated */ afLong += optInAccelerationLong; -/* Generated */ if( afLong > optInAccelerationMaxLong ) -/* Generated */ afLong = optInAccelerationMaxLong; -/* Generated */ } -/* Generated */ sar = sar + afLong * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar > prevLow ) -/* Generated */ sar = prevLow; -/* Generated */ if( sar > newLow ) -/* Generated */ sar = newLow; -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ if( newHigh >= sar ) -/* Generated */ { -/* Generated */ isLong = 1; -/* Generated */ sar = ep; -/* Generated */ if( sar > prevLow ) -/* Generated */ sar = prevLow; -/* Generated */ if( sar > newLow ) -/* Generated */ sar = newLow; -/* Generated */ if( optInOffsetOnReverse != 0.0 ) -/* Generated */ sar -= sar * optInOffsetOnReverse; -/* Generated */ outReal[outIdx++] = sar; -/* Generated */ afLong = optInAccelerationInitLong; -/* Generated */ ep = newHigh; -/* Generated */ sar = sar + afLong * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar > prevLow ) -/* Generated */ sar = prevLow; -/* Generated */ if( sar > newLow ) -/* Generated */ sar = newLow; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ outReal[outIdx++] = -sar; -/* Generated */ if( newLow < ep ) -/* Generated */ { -/* Generated */ ep = newLow; -/* Generated */ afShort += optInAccelerationShort; -/* Generated */ if( afShort > optInAccelerationMaxShort ) -/* Generated */ afShort = optInAccelerationMaxShort; -/* Generated */ } -/* Generated */ sar = sar + afShort * (ep - sar); -/* Generated */ SAR_ROUNDING( sar ); -/* Generated */ if( sar < prevHigh ) -/* Generated */ sar = prevHigh; -/* Generated */ if( sar < newHigh ) -/* Generated */ sar = newHigh; -/* Generated */ } -/* Generated */ } -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - - diff --git a/src/ta-lib/src/ta_func/ta_SIN.c b/src/ta-lib/src/ta_func/ta_SIN.c deleted file mode 100644 index c63687101..000000000 --- a/src/ta-lib/src/ta_func/ta_SIN.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 082507 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SinLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int sinLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SIN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SIN - Vector Trigonometric Sin - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SIN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_sin(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sin( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SIN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_sin(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SINH.c b/src/ta-lib/src/ta_func/ta_SINH.c deleted file mode 100644 index 311da7375..000000000 --- a/src/ta-lib/src/ta_func/ta_SINH.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SinhLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int sinhLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SINH_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SINH - Vector Trigonometric Sinh - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sinh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SINH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_sinh(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sinh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sinh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SINH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_sinh(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SMA.c b/src/ta-lib/src/ta_func/ta_SMA.c deleted file mode 100644 index 1982c7469..000000000 --- a/src/ta-lib/src/ta_func/ta_SMA.c +++ /dev/null @@ -1,431 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int smaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return optInTimePeriod - 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SMA - Simple Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - return FUNCTION_CALL(INT_SMA)( startIdx, endIdx, - inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); -} - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - // No INT function -#else - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) - enum class Core::RetCode Core::TA_INT_SMA( int startIdx, - int endIdx, - SubArray^ inReal, - int optInTimePeriod, - [Out]int% outBegIdx, - [Out]int% outNBElement, - SubArray^ outReal) -#elif defined( _MANAGED ) - enum class Core::RetCode Core::TA_INT_SMA( int startIdx, - int endIdx, - cli::array^ inReal, - int optInTimePeriod, - [Out]int% outBegIdx, - [Out]int% outNBElement, - cli::array^ outReal) -#elif defined( _JAVA ) -RetCode TA_INT_SMA( int startIdx, - int endIdx, - INPUT_TYPE inReal[], - int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - MInteger outBegIdx, - MInteger outNBElement, - double outReal[] ) -#else -TA_RetCode TA_PREFIX(INT_SMA)( int startIdx, - int endIdx, - const INPUT_TYPE *inReal, - int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - int *outBegIdx, - int *outNBElement, - double *outReal ) -#endif -{ - double periodTotal, tempReal; - int i, outIdx, trailingIdx, lookbackTotal; - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the MA calculation using tight loops. */ - /* Add-up the initial period, except for the last value. */ - periodTotal = 0; - trailingIdx = startIdx-lookbackTotal; - - i=trailingIdx; - if( optInTimePeriod > 1 ) - { - while( i < startIdx ) - periodTotal += inReal[i++]; - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the inReal and - * outReal to be the same buffer. - */ - outIdx = 0; - do - { - periodTotal += inReal[i++]; - tempReal = periodTotal; - periodTotal -= inReal[trailingIdx++]; - outReal[outIdx++] = tempReal / optInTimePeriod; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ return FUNCTION_CALL(INT_SMA)( startIdx, endIdx, -/* Generated */ inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ } -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ // No INT function -/* Generated */ #else -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TA_INT_SMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TA_INT_SMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ RetCode TA_INT_SMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ INPUT_TYPE inReal[], -/* Generated */ int optInTimePeriod, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_PREFIX(INT_SMA)( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const INPUT_TYPE *inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double *outReal ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double periodTotal, tempReal; -/* Generated */ int i, outIdx, trailingIdx, lookbackTotal; -/* Generated */ lookbackTotal = (optInTimePeriod-1); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ periodTotal = 0; -/* Generated */ trailingIdx = startIdx-lookbackTotal; -/* Generated */ i=trailingIdx; -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ { -/* Generated */ while( i < startIdx ) -/* Generated */ periodTotal += inReal[i++]; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ periodTotal += inReal[i++]; -/* Generated */ tempReal = periodTotal; -/* Generated */ periodTotal -= inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = tempReal / optInTimePeriod; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SQRT.c b/src/ta-lib/src/ta_func/ta_SQRT.c deleted file mode 100644 index d6348786c..000000000 --- a/src/ta-lib/src/ta_func/ta_SQRT.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SqrtLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int sqrtLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SQRT_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SQRT - Vector Square Root - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sqrt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SQRT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_sqrt(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sqrt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sqrt( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SQRT( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_sqrt(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_STDDEV.c b/src/ta-lib/src/ta_func/ta_STDDEV.c deleted file mode 100644 index a799500cb..000000000 --- a/src/ta-lib/src/ta_func/ta_STDDEV.c +++ /dev/null @@ -1,519 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JV Jesus Viver <324122@cienz.unizar.es> - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 100502 JV Speed optimization of the algorithm - * 052603 MF Adapt code to compile with .NET Managed C++ - * 090404 MF Fix #978056. Trap sqrt with negative zero values. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::StdDevLookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int stdDevLookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_STDDEV_Lookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) -/* Generated */ optInNbDev = 1.000000e+0; -/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Lookback is driven by the variance. */ - return LOOKBACK_CALL(VAR)( optInTimePeriod, optInNbDev ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_STDDEV - Standard Deviation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) - * Nb of deviations - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stdDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_STDDEV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int i; - ENUM_DECLARATION(RetCode) retCode; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) -/* Generated */ optInNbDev = 1.000000e+0; -/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Calculate the variance. */ - retCode = FUNCTION_CALL(INT_VAR)( startIdx, endIdx, - inReal, optInTimePeriod, - outBegIdx, outNBElement, outReal ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - return retCode; - - /* Calculate the square root of each variance, this - * is the standard deviation. - * - * Multiply also by the ratio specified. - */ - if( optInNbDev != 1.0 ) - { - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = outReal[i]; - if( !TA_IS_ZERO_OR_NEG(tempReal) ) - outReal[i] = std_sqrt(tempReal) * optInNbDev; - else - outReal[i] = (double)0.0; - } - } - else - { - for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) - { - tempReal = outReal[i]; - if( !TA_IS_ZERO_OR_NEG(tempReal) ) - outReal[i] = std_sqrt(tempReal); - else - outReal[i] = (double)0.0; - } - } - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) - // No INT function -#else - -/* The inMovAvg is the moving average of the inReal. - * - * inMovAvgBegIdx is relative to inReal, in other word - * this is the 'outBegIdx' who was returned when doing the - * MA on the inReal. - * - * inMovAvgNbElement is the number of element who was returned - * when doing the MA on the inReal. - * - * Note: This function is not used by TA_STDDEV, since TA_STDDEV - * is optimized considering it uses always a simple moving - * average. Still the function is put here because it is - * closely related. - */ -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) -void Core::TA_INT_stddev_using_precalc_ma( SubArray^ inReal, - SubArray^ inMovAvg, - int inMovAvgBegIdx, - int inMovAvgNbElement, - int timePeriod, - SubArray^ output) -#elif defined( _MANAGED ) -void Core::TA_INT_stddev_using_precalc_ma( cli::array^ inReal, - cli::array^ inMovAvg, - int inMovAvgBegIdx, - int inMovAvgNbElement, - int timePeriod, - cli::array^ output) -#elif defined( _JAVA ) -void TA_INT_stddev_using_precalc_ma( INPUT_TYPE inReal[], - double inMovAvg[], - int inMovAvgBegIdx, - int inMovAvgNbElement, - int timePeriod, - double output[] ) -#else -void TA_PREFIX(INT_stddev_using_precalc_ma)( const INPUT_TYPE *inReal, - const double *inMovAvg, - int inMovAvgBegIdx, - int inMovAvgNbElement, - int timePeriod, - double *output ) -#endif -{ - double tempReal, periodTotal2, meanValue2; - int outIdx; - - /* Start/end index for sumation. */ - int startSum, endSum; - - startSum = 1+inMovAvgBegIdx-timePeriod; - endSum = inMovAvgBegIdx; - - periodTotal2 = 0; - - for( outIdx = startSum; outIdx < endSum; outIdx++) - { - tempReal = inReal[outIdx]; - tempReal *= tempReal; - periodTotal2 += tempReal; - } - - for( outIdx=0; outIdx < inMovAvgNbElement; outIdx++, startSum++, endSum++ ) - { - tempReal = inReal[endSum]; - tempReal *= tempReal; - periodTotal2 += tempReal; - meanValue2 = periodTotal2/timePeriod; - - tempReal = inReal[startSum]; - tempReal *= tempReal; - periodTotal2 -= tempReal; - - tempReal = inMovAvg[outIdx]; - tempReal *= tempReal; - meanValue2 -= tempReal; - - if( !TA_IS_ZERO_OR_NEG(meanValue2) ) - output[outIdx] = std_sqrt(meanValue2); - else - output[outIdx] = (double)0.0; - } -} -#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::StdDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stdDev( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_STDDEV( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int i; -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) -/* Generated */ optInNbDev = 1.000000e+0; -/* Generated */ else if( (optInNbDev < -3.000000e+37) || (optInNbDev > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL(INT_VAR)( startIdx, endIdx, -/* Generated */ inReal, optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ return retCode; -/* Generated */ if( optInNbDev != 1.0 ) -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = outReal[i]; -/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) -/* Generated */ outReal[i] = std_sqrt(tempReal) * optInNbDev; -/* Generated */ else -/* Generated */ outReal[i] = (double)0.0; -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ for( i=0; i < (int)VALUE_HANDLE_DEREF(outNBElement); i++ ) -/* Generated */ { -/* Generated */ tempReal = outReal[i]; -/* Generated */ if( !TA_IS_ZERO_OR_NEG(tempReal) ) -/* Generated */ outReal[i] = std_sqrt(tempReal); -/* Generated */ else -/* Generated */ outReal[i] = (double)0.0; -/* Generated */ } -/* Generated */ } -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ // No INT function -/* Generated */ #else -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ void Core::TA_INT_stddev_using_precalc_ma( SubArray^ inReal, -/* Generated */ SubArray^ inMovAvg, -/* Generated */ int inMovAvgBegIdx, -/* Generated */ int inMovAvgNbElement, -/* Generated */ int timePeriod, -/* Generated */ SubArray^ output) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ void Core::TA_INT_stddev_using_precalc_ma( cli::array^ inReal, -/* Generated */ cli::array^ inMovAvg, -/* Generated */ int inMovAvgBegIdx, -/* Generated */ int inMovAvgNbElement, -/* Generated */ int timePeriod, -/* Generated */ cli::array^ output) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ void TA_INT_stddev_using_precalc_ma( INPUT_TYPE inReal[], -/* Generated */ double inMovAvg[], -/* Generated */ int inMovAvgBegIdx, -/* Generated */ int inMovAvgNbElement, -/* Generated */ int timePeriod, -/* Generated */ double output[] ) -/* Generated */ #else -/* Generated */ void TA_PREFIX(INT_stddev_using_precalc_ma)( const INPUT_TYPE *inReal, -/* Generated */ const double *inMovAvg, -/* Generated */ int inMovAvgBegIdx, -/* Generated */ int inMovAvgNbElement, -/* Generated */ int timePeriod, -/* Generated */ double *output ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double tempReal, periodTotal2, meanValue2; -/* Generated */ int outIdx; -/* Generated */ int startSum, endSum; -/* Generated */ startSum = 1+inMovAvgBegIdx-timePeriod; -/* Generated */ endSum = inMovAvgBegIdx; -/* Generated */ periodTotal2 = 0; -/* Generated */ for( outIdx = startSum; outIdx < endSum; outIdx++) -/* Generated */ { -/* Generated */ tempReal = inReal[outIdx]; -/* Generated */ tempReal *= tempReal; -/* Generated */ periodTotal2 += tempReal; -/* Generated */ } -/* Generated */ for( outIdx=0; outIdx < inMovAvgNbElement; outIdx++, startSum++, endSum++ ) -/* Generated */ { -/* Generated */ tempReal = inReal[endSum]; -/* Generated */ tempReal *= tempReal; -/* Generated */ periodTotal2 += tempReal; -/* Generated */ meanValue2 = periodTotal2/timePeriod; -/* Generated */ tempReal = inReal[startSum]; -/* Generated */ tempReal *= tempReal; -/* Generated */ periodTotal2 -= tempReal; -/* Generated */ tempReal = inMovAvg[outIdx]; -/* Generated */ tempReal *= tempReal; -/* Generated */ meanValue2 -= tempReal; -/* Generated */ if( !TA_IS_ZERO_OR_NEG(meanValue2) ) -/* Generated */ output[outIdx] = std_sqrt(meanValue2); -/* Generated */ else -/* Generated */ output[outIdx] = (double)0.0; -/* Generated */ } -/* Generated */ } -/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_STOCH.c b/src/ta-lib/src/ta_func/ta_STOCH.c deleted file mode 100644 index 3b7b25646..000000000 --- a/src/ta-lib/src/ta_func/ta_STOCH.c +++ /dev/null @@ -1,820 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::StochLookback( int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int stochLookback( int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_STOCH_Lookback( int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSlowD_MAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastK_Period. */ -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowK_Period. */ -/* Generated */ if( (int)optInSlowK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowK_Period = 3; -/* Generated */ else if( ((int)optInSlowK_Period < 1) || ((int)optInSlowK_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowK_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowK_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowK_MAType < 0) || ((int)optInSlowK_MAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSlowD_Period. */ -/* Generated */ if( (int)optInSlowD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowD_Period = 3; -/* Generated */ else if( ((int)optInSlowD_Period < 1) || ((int)optInSlowD_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowD_MAType < 0) || ((int)optInSlowD_MAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Account for the initial data needed for Fast-K. */ - retValue = (optInFastK_Period - 1); - - /* Add the smoothing being done for %K slow */ - retValue += LOOKBACK_CALL(MA)( optInSlowK_Period, optInSlowK_MAType ); - - /* Add the smoothing being done for %D slow. */ - retValue += LOOKBACK_CALL(MA)( optInSlowD_Period, optInSlowD_MAType ); - - return retValue; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_STOCH - Stochastic - * - * Input = High, Low, Close - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInSlowK_Period:(From 1 to 100000) - * Smoothing for making the Slow-K line. Usually set to 3 - * - * optInSlowK_MAType: - * Type of Moving Average for Slow-K - * - * optInSlowD_Period:(From 1 to 100000) - * Smoothing for making the Slow-D line - * - * optInSlowD_MAType: - * Type of Moving Average for Slow-D - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outSlowK, -/* Generated */ SubArray^ outSlowD ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outSlowK, -/* Generated */ cli::array^ outSlowD ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stoch( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outSlowK[], -/* Generated */ double outSlowD[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_STOCH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSlowD_MAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outSlowK[], -/* Generated */ double outSlowD[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ENUM_DECLARATION(RetCode) retCode; - double lowest, highest, tmp, diff; - ARRAY_REF( tempBuffer ); - int outIdx, lowestIdx, highestIdx; - int lookbackTotal, lookbackK, lookbackKSlow, lookbackDSlow; - int trailingIdx, today, i; - #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) &&!defined(_JAVA) - int bufferIsAllocated; - #endif - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastK_Period. */ -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInSlowK_Period. */ -/* Generated */ if( (int)optInSlowK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowK_Period = 3; -/* Generated */ else if( ((int)optInSlowK_Period < 1) || ((int)optInSlowK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowK_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowK_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowK_MAType < 0) || ((int)optInSlowK_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInSlowD_Period. */ -/* Generated */ if( (int)optInSlowD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowD_Period = 3; -/* Generated */ else if( ((int)optInSlowD_Period < 1) || ((int)optInSlowD_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowD_MAType < 0) || ((int)optInSlowD_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outSlowK ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outSlowD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* With stochastic, there is a total of 4 different lines that - * are defined: FASTK, FASTD, SLOWK and SLOWD. - * - * The D is the signal line usually drawn over its - * corresponding K function. - * - * (Today's Close - LowestLow) - * FASTK(Kperiod) = --------------------------- * 100 - * (HighestHigh - LowestLow) - * - * FASTD(FastDperiod, MA type) = MA Smoothed FASTK over FastDperiod - * - * SLOWK(SlowKperiod, MA type) = MA Smoothed FASTK over SlowKperiod - * - * SLOWD(SlowDperiod, MA Type) = MA Smoothed SLOWK over SlowDperiod - * - * The HighestHigh and LowestLow are the extreme values among the - * last 'Kperiod'. - * - * SLOWK and FASTD are equivalent when using the same period. - * - * The following shows how these four lines are made available in TA-LIB: - * - * TA_STOCH : Returns the SLOWK and SLOWD - * TA_STOCHF : Returns the FASTK and FASTD - * - * The TA_STOCH function correspond to the more widely implemented version - * found in many software/charting package. The TA_STOCHF is more rarely - * used because its higher volatility cause often whipsaws. - */ - - /* Identify the lookback needed. */ - lookbackK = optInFastK_Period-1; - lookbackKSlow = LOOKBACK_CALL(MA)( optInSlowK_Period, optInSlowK_MAType ); - lookbackDSlow = LOOKBACK_CALL(MA)( optInSlowD_Period, optInSlowD_MAType ); - lookbackTotal = lookbackK + lookbackDSlow + lookbackKSlow; - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - /* Succeed... but no data in the output. */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the K calculation: - * - * Kt = 100 x ((Ct-Lt)/(Ht-Lt)) - * - * Kt is today stochastic - * Ct is today closing price. - * Lt is the lowest price of the last K Period (including today) - * Ht is the highest price of the last K Period (including today) - */ - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - - /* Calculate just enough K for ending up with the caller - * requested range. (The range of k must consider all - * the lookback involve with the smoothing). - */ - trailingIdx = startIdx-lookbackTotal; - today = trailingIdx+lookbackK; - lowestIdx = highestIdx = -1; - diff = highest = lowest = 0.0; - - /* Allocate a temporary buffer large enough to - * store the K. - * - * If the output is the same as the input, great - * we just save ourself one memory allocation. - */ - #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) - bufferIsAllocated = 0; - #endif - - #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) - /* Always alloc, since output is of different type and - * its allocated size is not guarantee to be as large as - * the input. - */ - ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); - #else - if( (outSlowK == inHigh) || - (outSlowK == inLow) || - (outSlowK == inClose) ) - { - tempBuffer = outSlowK; - } - else if( (outSlowD == inHigh) || - (outSlowD == inLow) || - (outSlowD == inClose) ) - { - tempBuffer = outSlowD; - } - else - { - #if !defined( _MANAGED ) && !defined(_JAVA) - bufferIsAllocated = 1; - #endif - ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); - } - #endif - - /* Do the K calculation */ - while( today <= endIdx ) - { - /* Set the lowest low */ - tmp = inLow[today]; - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inLow[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inLow[i]; - if( tmp < lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - diff = (highest - lowest)/100.0; - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - diff = (highest - lowest)/100.0; - } - - /* Set the highest high */ - tmp = inHigh[today]; - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inHigh[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inHigh[i]; - if( tmp > highest ) - { - highestIdx = i; - highest = tmp; - } - } - diff = (highest - lowest)/100.0; - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - diff = (highest - lowest)/100.0; - } - - /* Calculate stochastic. */ - if( diff != 0.0 ) - tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; - else - tempBuffer[outIdx++] = 0.0; - - trailingIdx++; - today++; - } - - /* Un-smoothed K calculation completed. This K calculation is not returned - * to the caller. It is always smoothed and then return. - * Some documentation will refer to the smoothed version as being - * "K-Slow", but often this end up to be shorten to "K". - */ - retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, - tempBuffer, optInSlowK_Period, - optInSlowK_MAType, - outBegIdx, outNBElement, tempBuffer ); - - - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) - { - #if defined(USE_SINGLE_PRECISION_INPUT) - ARRAY_FREE( tempBuffer ); - #else - ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); - #endif - /* Something wrong happen? No further data? */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Calculate the %D which is simply a moving average of - * the already smoothed %K. - */ - retCode = FUNCTION_CALL_DOUBLE(MA)( 0, (int)VALUE_HANDLE_DEREF(outNBElement)-1, - tempBuffer, optInSlowD_Period, - optInSlowD_MAType, - outBegIdx, outNBElement, outSlowD ); - - /* Copy tempBuffer into the caller buffer. - * (Calculation could not be done directly in the - * caller buffer because more input data then the - * requested range was needed for doing %D). - */ - ARRAY_MEMMOVE( outSlowK, 0, tempBuffer,lookbackDSlow,(int)VALUE_HANDLE_DEREF(outNBElement)); - - /* Don't need K anymore, free it if it was allocated here. */ - #if defined(USE_SINGLE_PRECISION_INPUT) - ARRAY_FREE( tempBuffer ); - #else - ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); - #endif - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - /* Something wrong happen while processing %D? */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Note: Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outSlowK, -/* Generated */ SubArray^ outSlowD ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Stoch( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outSlowK, -/* Generated */ cli::array^ outSlowD ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stoch( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInSlowD_MAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outSlowK[], -/* Generated */ double outSlowD[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_STOCH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInSlowK_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSlowK_MAType, -/* Generated */ int optInSlowD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInSlowD_MAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outSlowK[], -/* Generated */ double outSlowD[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ double lowest, highest, tmp, diff; -/* Generated */ ARRAY_REF( tempBuffer ); -/* Generated */ int outIdx, lowestIdx, highestIdx; -/* Generated */ int lookbackTotal, lookbackK, lookbackKSlow, lookbackDSlow; -/* Generated */ int trailingIdx, today, i; -/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) &&!defined(_JAVA) -/* Generated */ int bufferIsAllocated; -/* Generated */ #endif -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInSlowK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowK_Period = 3; -/* Generated */ else if( ((int)optInSlowK_Period < 1) || ((int)optInSlowK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowK_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowK_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowK_MAType < 0) || ((int)optInSlowK_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInSlowD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowD_Period = 3; -/* Generated */ else if( ((int)optInSlowD_Period < 1) || ((int)optInSlowD_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInSlowD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInSlowD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInSlowD_MAType < 0) || ((int)optInSlowD_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outSlowK ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outSlowD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackK = optInFastK_Period-1; -/* Generated */ lookbackKSlow = LOOKBACK_CALL(MA)( optInSlowK_Period, optInSlowK_MAType ); -/* Generated */ lookbackDSlow = LOOKBACK_CALL(MA)( optInSlowD_Period, optInSlowD_MAType ); -/* Generated */ lookbackTotal = lookbackK + lookbackDSlow + lookbackKSlow; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ trailingIdx = startIdx-lookbackTotal; -/* Generated */ today = trailingIdx+lookbackK; -/* Generated */ lowestIdx = highestIdx = -1; -/* Generated */ diff = highest = lowest = 0.0; -/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) -/* Generated */ bufferIsAllocated = 0; -/* Generated */ #endif -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) -/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); -/* Generated */ #else -/* Generated */ if( (outSlowK == inHigh) || -/* Generated */ (outSlowK == inLow) || -/* Generated */ (outSlowK == inClose) ) -/* Generated */ { -/* Generated */ tempBuffer = outSlowK; -/* Generated */ } -/* Generated */ else if( (outSlowD == inHigh) || -/* Generated */ (outSlowD == inLow) || -/* Generated */ (outSlowD == inClose) ) -/* Generated */ { -/* Generated */ tempBuffer = outSlowD; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ #if !defined( _MANAGED ) && !defined(_JAVA) -/* Generated */ bufferIsAllocated = 1; -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); -/* Generated */ } -/* Generated */ #endif -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inLow[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inLow[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inLow[i]; -/* Generated */ if( tmp < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ tmp = inHigh[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inHigh[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inHigh[i]; -/* Generated */ if( tmp > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ if( diff != 0.0 ) -/* Generated */ tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; -/* Generated */ else -/* Generated */ tempBuffer[outIdx++] = 0.0; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, -/* Generated */ tempBuffer, optInSlowK_Period, -/* Generated */ optInSlowK_MAType, -/* Generated */ outBegIdx, outNBElement, tempBuffer ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) -/* Generated */ { -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ #else -/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, (int)VALUE_HANDLE_DEREF(outNBElement)-1, -/* Generated */ tempBuffer, optInSlowD_Period, -/* Generated */ optInSlowD_MAType, -/* Generated */ outBegIdx, outNBElement, outSlowD ); -/* Generated */ ARRAY_MEMMOVE( outSlowK, 0, tempBuffer,lookbackDSlow,(int)VALUE_HANDLE_DEREF(outNBElement)); -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ #else -/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); -/* Generated */ #endif -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_STOCHF.c b/src/ta-lib/src/ta_func/ta_STOCHF.c deleted file mode 100644 index bde0ff79a..000000000 --- a/src/ta-lib/src/ta_func/ta_STOCHF.c +++ /dev/null @@ -1,738 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * EKO echo999@ifrance.com - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 051103 EKO Found bug and fix related to outFastD. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::StochFLookback( int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int stochFLookback( int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_STOCHF_Lookback( int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInFastD_MAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInFastK_Period. */ -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInFastD_Period. */ -/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_Period = 3; -/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Account for the initial data needed for Fast-K. */ - retValue = (optInFastK_Period - 1); - - /* Add the smoothing being done for Fast-D */ - retValue += LOOKBACK_CALL(MA)( optInFastD_Period, optInFastD_MAType ); - - return retValue; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_STOCHF - Stochastic Fast - * - * Input = High, Low, Close - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInFastD_Period:(From 1 to 100000) - * Smoothing for making the Fast-D line. Usually set to 3 - * - * optInFastD_MAType: - * Type of Moving Average for Fast-D - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outFastK, -/* Generated */ SubArray^ outFastD ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outFastK, -/* Generated */ cli::array^ outFastD ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stochF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_STOCHF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInFastD_MAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ENUM_DECLARATION(RetCode) retCode; - double lowest, highest, tmp, diff; - ARRAY_REF( tempBuffer ); - int outIdx, lowestIdx, highestIdx; - int lookbackTotal, lookbackK, lookbackFastD; - int trailingIdx, today, i; - - #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) - int bufferIsAllocated; - #endif - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInFastK_Period. */ -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInFastD_Period. */ -/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_Period = 3; -/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outFastK ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outFastD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* With stochastic, there is a total of 4 different lines that - * are defined: FASTK, FASTD, SLOWK and SLOWD. - * - * The D is the signal line usually drawn over its - * corresponding K function. - * - * (Today's Close - LowestLow) - * FASTK(Kperiod) = --------------------------- * 100 - * (HighestHigh - LowestLow) - * - * FASTD(FastDperiod, MA type) = MA Smoothed FASTK over FastDperiod - * - * SLOWK(SlowKperiod, MA type) = MA Smoothed FASTK over SlowKperiod - * - * SLOWD(SlowDperiod, MA Type) = MA Smoothed SLOWK over SlowDperiod - * - * The HighestHigh and LowestLow are the extreme values among the - * last 'Kperiod'. - * - * SLOWK and FASTD are equivalent when using the same period. - * - * The following shows how these four lines are made available in TA-LIB: - * - * TA_STOCH : Returns the SLOWK and SLOWD - * TA_STOCHF : Returns the FASTK and FASTD - * - * The TA_STOCH function correspond to the more widely implemented version - * found in many software/charting package. The TA_STOCHF is more rarely - * used because its higher volatility cause often whipsaws. - */ - - /* Identify the lookback needed. */ - lookbackK = optInFastK_Period-1; - lookbackFastD = LOOKBACK_CALL(MA)( optInFastD_Period, optInFastD_MAType ); - lookbackTotal = lookbackK + lookbackFastD; - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - /* Succeed... but no data in the output. */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the K calculation: - * - * Kt = 100 x ((Ct-Lt)/(Ht-Lt)) - * - * Kt is today stochastic - * Ct is today closing price. - * Lt is the lowest price of the last K Period (including today) - * Ht is the highest price of the last K Period (including today) - */ - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - - /* Calculate just enough K for ending up with the caller - * requested range. (The range of k must consider all - * the lookback involve with the smoothing). - */ - trailingIdx = startIdx-lookbackTotal; - today = trailingIdx+lookbackK; - lowestIdx = highestIdx = -1; - diff = highest = lowest = 0.0; - - /* Allocate a temporary buffer large enough to - * store the K. - * - * If the output is the same as the input, great - * we just save ourself one memory allocation. - */ - #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) - bufferIsAllocated = 0; - #endif - - #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) - /* Always alloc, since output is of different type and - * its allocated size is not guarantee to be as large as - * the input. - */ - ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); - #else - if( (outFastK == inHigh) || - (outFastK == inLow) || - (outFastK == inClose) ) - { - tempBuffer = outFastK; - } - else if( (outFastD == inHigh) || - (outFastD == inLow) || - (outFastD == inClose) ) - { - tempBuffer = outFastD; - } - else - { - #if !defined( _MANAGED ) && !defined( _JAVA ) - bufferIsAllocated = 1; - #endif - ARRAY_ALLOC(tempBuffer, endIdx-today+1 ); - } - #endif - - /* Do the K calculation */ - while( today <= endIdx ) - { - /* Set the lowest low */ - tmp = inLow[today]; - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inLow[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inLow[i]; - if( tmp < lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - diff = (highest - lowest)/100.0; - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - diff = (highest - lowest)/100.0; - } - - /* Set the highest high */ - tmp = inHigh[today]; - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inHigh[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inHigh[i]; - if( tmp > highest ) - { - highestIdx = i; - highest = tmp; - } - } - diff = (highest - lowest)/100.0; - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - diff = (highest - lowest)/100.0; - } - - /* Calculate stochastic. */ - if( diff != 0.0 ) - tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; - else - tempBuffer[outIdx++] = 0.0; - - trailingIdx++; - today++; - } - - /* Fast-K calculation completed. This K calculation is returned - * to the caller. It is smoothed to become Fast-D. - */ - retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, - tempBuffer, optInFastD_Period, - optInFastD_MAType, - outBegIdx, outNBElement, outFastD ); - - - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) - { - #if defined(USE_SINGLE_PRECISION_INPUT) - ARRAY_FREE( tempBuffer ); - #else - ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); - #endif - /* Something wrong happen? No further data? */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Copy tempBuffer into the caller buffer. - * (Calculation could not be done directly in the - * caller buffer because more input data then the - * requested range was needed for doing %D). - */ - ARRAY_MEMMOVE( outFastK, 0, tempBuffer, lookbackFastD, (int)VALUE_HANDLE_DEREF(outNBElement) ); - - /* Don't need K anymore, free it if it was allocated here. */ - #if defined(USE_SINGLE_PRECISION_INPUT) - ARRAY_FREE( tempBuffer ); - #else - ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); - #endif - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) - { - /* Something wrong happen while processing %D? */ - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - /* Note: Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outFastK, -/* Generated */ SubArray^ outFastD ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::StochF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outFastK, -/* Generated */ cli::array^ outFastD ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stochF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_STOCHF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInFastD_MAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ double lowest, highest, tmp, diff; -/* Generated */ ARRAY_REF( tempBuffer ); -/* Generated */ int outIdx, lowestIdx, highestIdx; -/* Generated */ int lookbackTotal, lookbackK, lookbackFastD; -/* Generated */ int trailingIdx, today, i; -/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) -/* Generated */ int bufferIsAllocated; -/* Generated */ #endif -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_Period = 3; -/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outFastK ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outFastD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackK = optInFastK_Period-1; -/* Generated */ lookbackFastD = LOOKBACK_CALL(MA)( optInFastD_Period, optInFastD_MAType ); -/* Generated */ lookbackTotal = lookbackK + lookbackFastD; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ trailingIdx = startIdx-lookbackTotal; -/* Generated */ today = trailingIdx+lookbackK; -/* Generated */ lowestIdx = highestIdx = -1; -/* Generated */ diff = highest = lowest = 0.0; -/* Generated */ #if !defined( _MANAGED ) && !defined(USE_SINGLE_PRECISION_INPUT) && !defined( _JAVA ) -/* Generated */ bufferIsAllocated = 0; -/* Generated */ #endif -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) || defined( USE_SUBARRAY ) -/* Generated */ ARRAY_ALLOC( tempBuffer, endIdx-today+1 ); -/* Generated */ #else -/* Generated */ if( (outFastK == inHigh) || -/* Generated */ (outFastK == inLow) || -/* Generated */ (outFastK == inClose) ) -/* Generated */ { -/* Generated */ tempBuffer = outFastK; -/* Generated */ } -/* Generated */ else if( (outFastD == inHigh) || -/* Generated */ (outFastD == inLow) || -/* Generated */ (outFastD == inClose) ) -/* Generated */ { -/* Generated */ tempBuffer = outFastD; -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ bufferIsAllocated = 1; -/* Generated */ #endif -/* Generated */ ARRAY_ALLOC(tempBuffer, endIdx-today+1 ); -/* Generated */ } -/* Generated */ #endif -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inLow[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inLow[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inLow[i]; -/* Generated */ if( tmp < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ tmp = inHigh[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inHigh[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inHigh[i]; -/* Generated */ if( tmp > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ diff = (highest - lowest)/100.0; -/* Generated */ } -/* Generated */ if( diff != 0.0 ) -/* Generated */ tempBuffer[outIdx++] = (inClose[today]-lowest)/diff; -/* Generated */ else -/* Generated */ tempBuffer[outIdx++] = 0.0; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(MA)( 0, outIdx-1, -/* Generated */ tempBuffer, optInFastD_Period, -/* Generated */ optInFastD_MAType, -/* Generated */ outBegIdx, outNBElement, outFastD ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) -/* Generated */ { -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ #else -/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ ARRAY_MEMMOVE( outFastK, 0, tempBuffer, lookbackFastD, (int)VALUE_HANDLE_DEREF(outNBElement) ); -/* Generated */ #if defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ #else -/* Generated */ ARRAY_FREE_COND( bufferIsAllocated, tempBuffer ); -/* Generated */ #endif -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_STOCHRSI.c b/src/ta-lib/src/ta_func/ta_STOCHRSI.c deleted file mode 100644 index 68c1d22d8..000000000 --- a/src/ta-lib/src/ta_func/ta_STOCHRSI.c +++ /dev/null @@ -1,522 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * PP Peter Pudaite - * AA Andrew Atkinson - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 101103 PP Initial creation of code. - * 112603 MF Add independent control to the RSI period. - * 020605 AA Fix #1117656. NULL pointer assignement. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::StochRsiLookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType ) /* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int stochRsiLookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType ) /* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_STOCHRSI_Lookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInFastD_MAType ) /* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInFastK_Period. */ -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInFastD_Period. */ -/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_Period = 3; -/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - retValue = LOOKBACK_CALL(RSI)( optInTimePeriod ) + LOOKBACK_CALL(STOCHF)( optInFastK_Period, optInFastD_Period, optInFastD_MAType ); - - return retValue; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_STOCHRSI - Stochastic Relative Strength Index - * - * Input = double - * Output = double, double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInFastK_Period:(From 1 to 100000) - * Time period for building the Fast-K line - * - * optInFastD_Period:(From 1 to 100000) - * Smoothing for making the Fast-D line. Usually set to 3 - * - * optInFastD_MAType: - * Type of Moving Average for Fast-D - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outFastK, -/* Generated */ SubArray^ outFastD ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outFastK, -/* Generated */ cli::array^ outFastD ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stochRsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_STOCHRSI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInFastD_MAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - ARRAY_REF(tempRSIBuffer); - - ENUM_DECLARATION(RetCode) retCode; - int lookbackTotal, lookbackSTOCHF, tempArraySize; - VALUE_HANDLE_INT(outBegIdx1); - VALUE_HANDLE_INT(outBegIdx2); - VALUE_HANDLE_INT(outNbElement1); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInFastK_Period. */ -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInFastD_Period. */ -/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_Period = 3; -/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_MANAGED) && !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outFastK ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( !outFastD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Stochastic RSI - * - * Reference: "Stochastic RSI and Dynamic Momentum Index" - * by Tushar Chande and Stanley Kroll - * Stock&Commodities V.11:5 (189-199) - * - * The TA-Lib version offer flexibility beyond what is explain - * in the Stock&Commodities article. - * - * To calculate the "Unsmoothed stochastic RSI" with symetry like - * explain in the article, keep the optInTimePeriod and optInFastK_Period - * equal. Example: - * - * unsmoothed stoch RSI 14 : optInTimePeriod = 14 - * optInFastK_Period = 14 - * optInFastD_Period = 'x' - * - * The outFastK is the unsmoothed RSI discuss in the article. - * - * You can set the optInFastD_Period to smooth the RSI. The smooth - * version will be found in outFastD. The outFastK will still contain - * the unsmoothed stoch RSI. If you do not care about the smoothing of - * the StochRSI, just leave optInFastD_Period to 1 and ignore outFastD. - */ - - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Adjust startIdx to account for the lookback period. */ - lookbackSTOCHF = LOOKBACK_CALL(STOCHF)( optInFastK_Period, optInFastD_Period, optInFastD_MAType ); - lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ) + lookbackSTOCHF; - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - tempArraySize = (endIdx - startIdx) + 1 + lookbackSTOCHF; - - ARRAY_ALLOC( tempRSIBuffer, tempArraySize ); - - retCode = FUNCTION_CALL(RSI)(startIdx-lookbackSTOCHF, - endIdx, - inReal, - optInTimePeriod, - VALUE_HANDLE_OUT(outBegIdx1), - VALUE_HANDLE_OUT(outNbElement1), - tempRSIBuffer); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || VALUE_HANDLE_GET(outNbElement1) == 0 ) - { - ARRAY_FREE( tempRSIBuffer ); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - retCode = FUNCTION_CALL_DOUBLE(STOCHF)(0, - tempArraySize-1, - tempRSIBuffer, - tempRSIBuffer, - tempRSIBuffer, - optInFastK_Period, - optInFastD_Period, - optInFastD_MAType, - VALUE_HANDLE_OUT(outBegIdx2), - outNBElement, - outFastK, - outFastD); - - ARRAY_FREE( tempRSIBuffer ); - - if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return retCode; - } - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outFastK, -/* Generated */ SubArray^ outFastD ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::StochRsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outFastK, -/* Generated */ cli::array^ outFastD ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode stochRsi( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ MAType optInFastD_MAType, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_STOCHRSI( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int optInFastK_Period, /* From 1 to 100000 */ -/* Generated */ int optInFastD_Period, /* From 1 to 100000 */ -/* Generated */ TA_MAType optInFastD_MAType, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outFastK[], -/* Generated */ double outFastD[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(tempRSIBuffer); -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int lookbackTotal, lookbackSTOCHF, tempArraySize; -/* Generated */ VALUE_HANDLE_INT(outBegIdx1); -/* Generated */ VALUE_HANDLE_INT(outBegIdx2); -/* Generated */ VALUE_HANDLE_INT(outNbElement1); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInFastK_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastK_Period = 5; -/* Generated */ else if( ((int)optInFastK_Period < 1) || ((int)optInFastK_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInFastD_Period == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_Period = 3; -/* Generated */ else if( ((int)optInFastD_Period < 1) || ((int)optInFastD_Period > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_MANAGED) && !defined(_JAVA) -/* Generated */ if( (int)optInFastD_MAType == TA_INTEGER_DEFAULT ) -/* Generated */ optInFastD_MAType = (TA_MAType)0; -/* Generated */ else if( ((int)optInFastD_MAType < 0) || ((int)optInFastD_MAType > 8) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outFastK ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !outFastD ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ lookbackSTOCHF = LOOKBACK_CALL(STOCHF)( optInFastK_Period, optInFastD_Period, optInFastD_MAType ); -/* Generated */ lookbackTotal = LOOKBACK_CALL(RSI)( optInTimePeriod ) + lookbackSTOCHF; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ tempArraySize = (endIdx - startIdx) + 1 + lookbackSTOCHF; -/* Generated */ ARRAY_ALLOC( tempRSIBuffer, tempArraySize ); -/* Generated */ retCode = FUNCTION_CALL(RSI)(startIdx-lookbackSTOCHF, -/* Generated */ endIdx, -/* Generated */ inReal, -/* Generated */ optInTimePeriod, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx1), -/* Generated */ VALUE_HANDLE_OUT(outNbElement1), -/* Generated */ tempRSIBuffer); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || VALUE_HANDLE_GET(outNbElement1) == 0 ) -/* Generated */ { -/* Generated */ ARRAY_FREE( tempRSIBuffer ); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(STOCHF)(0, -/* Generated */ tempArraySize-1, -/* Generated */ tempRSIBuffer, -/* Generated */ tempRSIBuffer, -/* Generated */ tempRSIBuffer, -/* Generated */ optInFastK_Period, -/* Generated */ optInFastD_Period, -/* Generated */ optInFastD_MAType, -/* Generated */ VALUE_HANDLE_OUT(outBegIdx2), -/* Generated */ outNBElement, -/* Generated */ outFastK, -/* Generated */ outFastD); -/* Generated */ ARRAY_FREE( tempRSIBuffer ); -/* Generated */ if( retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) || ((int)VALUE_HANDLE_DEREF(outNBElement)) == 0 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SUB.c b/src/ta-lib/src/ta_func/ta_SUB.c deleted file mode 100644 index d7d3b6a2d..000000000 --- a/src/ta-lib/src/ta_func/ta_SUB.c +++ /dev/null @@ -1,261 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SubLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int subLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SUB_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SUB - Vector Arithmetic Subtraction - * - * Input = double, double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sub( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal0[], -/* Generated */ double inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SUB( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal0[], -/* Generated */ const double inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Default return values */ - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = inReal0[i]-inReal1[i]; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal0, -/* Generated */ SubArray^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sub( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal0, -/* Generated */ cli::array^ inReal1, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sub( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal0[], -/* Generated */ float inReal1[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SUB( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal0[], -/* Generated */ const float inReal1[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal0 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( !inReal1 ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = inReal0[i]-inReal1[i]; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_SUM.c b/src/ta-lib/src/ta_func/ta_SUM.c deleted file mode 100644 index 4bbdc3cd4..000000000 --- a/src/ta-lib/src/ta_func/ta_SUM.c +++ /dev/null @@ -1,344 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::SumLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int sumLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_SUM_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_SUM - Summation - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sum( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_SUM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double periodTotal, tempReal; - int i, outIdx, trailingIdx, lookbackTotal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the MA calculation using tight loops. */ - - /* Add-up the initial period, except for the last value. */ - periodTotal = 0; - trailingIdx = startIdx-lookbackTotal; - - i=trailingIdx; - if( optInTimePeriod > 1 ) - { - while( i < startIdx ) - periodTotal += inReal[i++]; - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the inReal and - * outReal to be the same buffer. - */ - outIdx = 0; - do - { - periodTotal += inReal[i++]; - tempReal = periodTotal; - periodTotal -= inReal[trailingIdx++]; - outReal[outIdx++] = tempReal; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Sum( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode sum( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_SUM( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double periodTotal, tempReal; -/* Generated */ int i, outIdx, trailingIdx, lookbackTotal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = (optInTimePeriod-1); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ periodTotal = 0; -/* Generated */ trailingIdx = startIdx-lookbackTotal; -/* Generated */ i=trailingIdx; -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ { -/* Generated */ while( i < startIdx ) -/* Generated */ periodTotal += inReal[i++]; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ periodTotal += inReal[i++]; -/* Generated */ tempReal = periodTotal; -/* Generated */ periodTotal -= inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = tempReal; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_T3.c b/src/ta-lib/src/ta_func/ta_T3.c deleted file mode 100644 index 6088b5077..000000000 --- a/src/ta-lib/src/ta_func/ta_T3.c +++ /dev/null @@ -1,536 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MHL Matthew Lindblom - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 120802 MF Template creation. - * 032003 MHL Implementation of T3 - * 040503 MF Adapt for compatibility with published code - * for TradeStation and Metastock. - * See "Smoothing Techniques For More Accurate Signals" - * from Tim Tillson in Stock&Commodities V16:1 Page 33-37 - * 052603 MF Adapt code to compile with .NET Managed C++ - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::T3Lookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor ) /* From 0 to 1 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int t3Lookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor ) /* From 0 to 1 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_T3_Lookback( int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor ) /* From 0 to 1 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInVFactor == TA_REAL_DEFAULT ) -/* Generated */ optInVFactor = 7.000000e-1; -/* Generated */ else if( (optInVFactor < 0.000000e+0) ||/* Generated */ (optInVFactor > 1.000000e+0) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInVFactor); - return 6 * (optInTimePeriod-1) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_T3,T3); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_T3 - Triple Exponential Moving Average (T3) - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * optInVFactor:(From 0 to 1) - * Volume Factor - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::T3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::T3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode t3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_T3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - - int outIdx, lookbackTotal; - int today, i; - double k, one_minus_k; - double e1, e2, e3, e4, e5, e6; - double c1, c2, c3, c4; - double tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInVFactor == TA_REAL_DEFAULT ) -/* Generated */ optInVFactor = 7.000000e-1; -/* Generated */ else if( (optInVFactor < 0.000000e+0) ||/* Generated */ (optInVFactor > 1.000000e+0) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* For an explanation of this function, please read: - * - * Magazine articles written by Tim Tillson - * - * Essentially, a T3 of time serie 't' is: - * EMA1(x,Period) = EMA(x,Period) - * EMA2(x,Period) = EMA(EMA1(x,Period),Period) - * GD(x,Period,vFactor) = (EMA1(x,Period)*(1+vFactor)) - (EMA2(x,Period)*vFactor) - * T3 = GD (GD ( GD(t, Period, vFactor), Period, vFactor), Period, vFactor); - * - * T3 offers a moving average with less lags then the - * traditional EMA. - * - * Do not confuse a T3 with EMA3. Both are called "Triple EMA" - * in the litterature. - * - */ - lookbackTotal = 6 * (optInTimePeriod - 1) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_T3,T3); - if( startIdx <= lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - today = startIdx - lookbackTotal; - - k = 2.0/(optInTimePeriod+1.0); - one_minus_k = 1.0-k; - - /* Initialize e1 */ - tempReal = inReal[today++]; - for( i=optInTimePeriod-1; i > 0 ; i-- ) - tempReal += inReal[today++]; - e1 = tempReal / optInTimePeriod; - - /* Initialize e2 */ - tempReal = e1; - for( i=optInTimePeriod-1; i > 0 ; i-- ) - { - e1 = (k*inReal[today++])+(one_minus_k*e1); - tempReal += e1; - } - e2 = tempReal / optInTimePeriod; - - /* Initialize e3 */ - tempReal = e2; - for( i=optInTimePeriod-1; i > 0 ; i-- ) - { - e1 = (k*inReal[today++])+(one_minus_k*e1); - e2 = (k*e1)+(one_minus_k*e2); - tempReal += e2; - } - e3 = tempReal / optInTimePeriod; - - /* Initialize e4 */ - tempReal = e3; - for( i=optInTimePeriod-1; i > 0 ; i-- ) - { - e1 = (k*inReal[today++])+(one_minus_k*e1); - e2 = (k*e1)+(one_minus_k*e2); - e3 = (k*e2)+(one_minus_k*e3); - tempReal += e3; - } - e4 = tempReal / optInTimePeriod; - - /* Initialize e5 */ - tempReal = e4; - for( i=optInTimePeriod-1; i > 0 ; i-- ) - { - e1 = (k*inReal[today++])+(one_minus_k*e1); - e2 = (k*e1)+(one_minus_k*e2); - e3 = (k*e2)+(one_minus_k*e3); - e4 = (k*e3)+(one_minus_k*e4); - tempReal += e4; - } - e5 = tempReal / optInTimePeriod; - - /* Initialize e6 */ - tempReal = e5; - for( i=optInTimePeriod-1; i > 0 ; i-- ) - { - e1 = (k*inReal[today++])+(one_minus_k*e1); - e2 = (k*e1)+(one_minus_k*e2); - e3 = (k*e2)+(one_minus_k*e3); - e4 = (k*e3)+(one_minus_k*e4); - e5 = (k*e4)+(one_minus_k*e5); - tempReal += e5; - } - e6 = tempReal / optInTimePeriod; - - /* Skip the unstable period */ - while( today <= startIdx ) - { - /* Do the calculation but do not write the output */ - e1 = (k*inReal[today++])+(one_minus_k*e1); - e2 = (k*e1)+(one_minus_k*e2); - e3 = (k*e2)+(one_minus_k*e3); - e4 = (k*e3)+(one_minus_k*e4); - e5 = (k*e4)+(one_minus_k*e5); - e6 = (k*e5)+(one_minus_k*e6); - } - - /* Calculate the constants */ - tempReal = optInVFactor * optInVFactor; - c1 = -(tempReal * optInVFactor); - c2 = 3.0 * (tempReal - c1); - c3 = -6.0 * tempReal - 3.0 * (optInVFactor-c1); - c4 = 1.0 + 3.0 * optInVFactor - c1 + 3.0 * tempReal; - - /* Write the first output */ - outIdx = 0; - outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; - - /* Calculate and output the remaining of the range. */ - while( today <= endIdx ) - { - e1 = (k*inReal[today++])+(one_minus_k*e1); - e2 = (k*e1)+(one_minus_k*e2); - e3 = (k*e2)+(one_minus_k*e3); - e4 = (k*e3)+(one_minus_k*e4); - e5 = (k*e4)+(one_minus_k*e5); - e6 = (k*e5)+(one_minus_k*e6); - outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; - } - - /* Indicates to the caller the number of output - * successfully calculated. - */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::T3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::T3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode t3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_T3( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ double optInVFactor, /* From 0 to 1 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, lookbackTotal; -/* Generated */ int today, i; -/* Generated */ double k, one_minus_k; -/* Generated */ double e1, e2, e3, e4, e5, e6; -/* Generated */ double c1, c2, c3, c4; -/* Generated */ double tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInVFactor == TA_REAL_DEFAULT ) -/* Generated */ optInVFactor = 7.000000e-1; -/* Generated */ else if( (optInVFactor < 0.000000e+0) || (optInVFactor > 1.000000e+0) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = 6 * (optInTimePeriod - 1) + TA_GLOBALS_UNSTABLE_PERIOD(TA_FUNC_UNST_T3,T3); -/* Generated */ if( startIdx <= lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ today = startIdx - lookbackTotal; -/* Generated */ k = 2.0/(optInTimePeriod+1.0); -/* Generated */ one_minus_k = 1.0-k; -/* Generated */ tempReal = inReal[today++]; -/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) -/* Generated */ tempReal += inReal[today++]; -/* Generated */ e1 = tempReal / optInTimePeriod; -/* Generated */ tempReal = e1; -/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ tempReal += e1; -/* Generated */ } -/* Generated */ e2 = tempReal / optInTimePeriod; -/* Generated */ tempReal = e2; -/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ e2 = (k*e1)+(one_minus_k*e2); -/* Generated */ tempReal += e2; -/* Generated */ } -/* Generated */ e3 = tempReal / optInTimePeriod; -/* Generated */ tempReal = e3; -/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ e2 = (k*e1)+(one_minus_k*e2); -/* Generated */ e3 = (k*e2)+(one_minus_k*e3); -/* Generated */ tempReal += e3; -/* Generated */ } -/* Generated */ e4 = tempReal / optInTimePeriod; -/* Generated */ tempReal = e4; -/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ e2 = (k*e1)+(one_minus_k*e2); -/* Generated */ e3 = (k*e2)+(one_minus_k*e3); -/* Generated */ e4 = (k*e3)+(one_minus_k*e4); -/* Generated */ tempReal += e4; -/* Generated */ } -/* Generated */ e5 = tempReal / optInTimePeriod; -/* Generated */ tempReal = e5; -/* Generated */ for( i=optInTimePeriod-1; i > 0 ; i-- ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ e2 = (k*e1)+(one_minus_k*e2); -/* Generated */ e3 = (k*e2)+(one_minus_k*e3); -/* Generated */ e4 = (k*e3)+(one_minus_k*e4); -/* Generated */ e5 = (k*e4)+(one_minus_k*e5); -/* Generated */ tempReal += e5; -/* Generated */ } -/* Generated */ e6 = tempReal / optInTimePeriod; -/* Generated */ while( today <= startIdx ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ e2 = (k*e1)+(one_minus_k*e2); -/* Generated */ e3 = (k*e2)+(one_minus_k*e3); -/* Generated */ e4 = (k*e3)+(one_minus_k*e4); -/* Generated */ e5 = (k*e4)+(one_minus_k*e5); -/* Generated */ e6 = (k*e5)+(one_minus_k*e6); -/* Generated */ } -/* Generated */ tempReal = optInVFactor * optInVFactor; -/* Generated */ c1 = -(tempReal * optInVFactor); -/* Generated */ c2 = 3.0 * (tempReal - c1); -/* Generated */ c3 = -6.0 * tempReal - 3.0 * (optInVFactor-c1); -/* Generated */ c4 = 1.0 + 3.0 * optInVFactor - c1 + 3.0 * tempReal; -/* Generated */ outIdx = 0; -/* Generated */ outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ e1 = (k*inReal[today++])+(one_minus_k*e1); -/* Generated */ e2 = (k*e1)+(one_minus_k*e2); -/* Generated */ e3 = (k*e2)+(one_minus_k*e3); -/* Generated */ e4 = (k*e3)+(one_minus_k*e4); -/* Generated */ e5 = (k*e4)+(one_minus_k*e5); -/* Generated */ e6 = (k*e5)+(one_minus_k*e6); -/* Generated */ outReal[outIdx++] = c1*e6+c2*e5+c3*e4+c4*e3; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TAN.c b/src/ta-lib/src/ta_func/ta_TAN.c deleted file mode 100644 index 78e3664bb..000000000 --- a/src/ta-lib/src/ta_func/ta_TAN.c +++ /dev/null @@ -1,249 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TanLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int tanLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TAN_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TAN - Vector Trigonometric Tan - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_tan(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tan( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TAN( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_tan(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TANH.c b/src/ta-lib/src/ta_func/ta_TANH.c deleted file mode 100644 index 90c9444c0..000000000 --- a/src/ta-lib/src/ta_func/ta_TANH.c +++ /dev/null @@ -1,250 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090807 MF Initial Version - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TanhLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int tanhLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TANH_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TANH - Vector Trigonometric Tanh - * - * Input = double - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tanh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TANH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - int i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) - { - outReal[outIdx] = std_tanh(inReal[i]); - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tanh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tanh( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TANH( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) -/* Generated */ { -/* Generated */ outReal[outIdx] = std_tanh(inReal[i]); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TEMA.c b/src/ta-lib/src/ta_func/ta_TEMA.c deleted file mode 100644 index 9d0a2b386..000000000 --- a/src/ta-lib/src/ta_func/ta_TEMA.c +++ /dev/null @@ -1,492 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TemaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int temaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TEMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int retValue; - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* Get lookack for one EMA. */ - retValue = LOOKBACK_CALL(EMA)( optInTimePeriod ); - - return retValue * 3; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TEMA - Triple Exponential Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TEMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - ARRAY_REF(firstEMA); - ARRAY_REF(secondEMA); - double k; - - VALUE_HANDLE_INT(firstEMABegIdx); - VALUE_HANDLE_INT(firstEMANbElement); - VALUE_HANDLE_INT(secondEMABegIdx); - VALUE_HANDLE_INT(secondEMANbElement); - VALUE_HANDLE_INT(thirdEMABegIdx); - VALUE_HANDLE_INT(thirdEMANbElement); - - int tempInt, outIdx, lookbackTotal, lookbackEMA; - int firstEMAIdx, secondEMAIdx; - - ENUM_DECLARATION(RetCode) retCode; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* For an explanation of this function, please read: - * - * Stocks & Commodities V. 12:1 (11-19): - * Smoothing Data With Faster Moving Averages - * Stocks & Commodities V. 12:2 (72-80): - * Smoothing Data With Less Lag - * - * Both magazine articles written by Patrick G. Mulloy - * - * Essentially, a TEMA of time serie 't' is: - * EMA1 = EMA(t,period) - * EMA2 = EMA(EMA(t,period),period) - * EMA3 = EMA(EMA(EMA(t,period),period)) - * TEMA = 3*EMA1 - 3*EMA2 + EMA3 - * - * TEMA offers a moving average with less lags then the - * traditional EMA. - * - * Do not confuse a TEMA with EMA3. Both are called "Triple EMA" - * in the litterature. - * - * DEMA is very similar (and from the same author). - */ - - /* Will change only on success. */ - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - - /* Adjust startIdx to account for the lookback period. */ - lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); - lookbackTotal = lookbackEMA * 3; - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - /* Allocate a temporary buffer for the firstEMA. */ - tempInt = lookbackTotal+(endIdx-startIdx)+1; - ARRAY_ALLOC(firstEMA,tempInt); - #if !defined( _JAVA ) - if( !firstEMA ) - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - #endif - - /* Calculate the first EMA */ - k = PER_TO_K(optInTimePeriod); - retCode = FUNCTION_CALL(INT_EMA)( startIdx-(lookbackEMA*2), endIdx, inReal, - optInTimePeriod, k, - VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), - firstEMA ); - - /* Verify for failure or if not enough data after - * calculating the first EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) - { - ARRAY_FREE( firstEMA ); - return retCode; - } - - /* Allocate a temporary buffer for storing the EMA2 */ - ARRAY_ALLOC(secondEMA,VALUE_HANDLE_GET(firstEMANbElement)); - #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) - if( !secondEMA ) - { - ARRAY_FREE( firstEMA ); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, - optInTimePeriod, k, - VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), - secondEMA ); - - /* Return empty output on failure or if not enough data after - * calculating the second EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) - { - ARRAY_FREE( firstEMA ); - ARRAY_FREE( secondEMA ); - return retCode; - } - - /* Calculate the EMA3 into the caller provided output. */ - retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(secondEMANbElement)-1, secondEMA, - optInTimePeriod, k, - VALUE_HANDLE_OUT(thirdEMABegIdx), VALUE_HANDLE_OUT(thirdEMANbElement), - outReal ); - - /* Return empty output on failure or if not enough data after - * calculating the third EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(thirdEMANbElement) == 0) ) - { - ARRAY_FREE( firstEMA ); - ARRAY_FREE( secondEMA ); - return retCode; - } - - /* Indicate where the output starts relative to - * the caller input. - */ - firstEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); - secondEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx); - VALUE_HANDLE_DEREF(outBegIdx) = firstEMAIdx + VALUE_HANDLE_GET(firstEMABegIdx); - - /* Do the TEMA: - * Iterate through the EMA3 (output buffer) and adjust - * the value by using the EMA2 and EMA1. - */ - outIdx = 0; - while( outIdx < VALUE_HANDLE_GET(thirdEMANbElement) ) - { - outReal[outIdx] += (3.0*firstEMA[firstEMAIdx++]) - (3.0*secondEMA[secondEMAIdx++]); - outIdx++; - } - - ARRAY_FREE( firstEMA ); - ARRAY_FREE( secondEMA ); - - /* Indicates to the caller the number of output - * successfully calculated. - */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tema( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TEMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ ARRAY_REF(firstEMA); -/* Generated */ ARRAY_REF(secondEMA); -/* Generated */ double k; -/* Generated */ VALUE_HANDLE_INT(firstEMABegIdx); -/* Generated */ VALUE_HANDLE_INT(firstEMANbElement); -/* Generated */ VALUE_HANDLE_INT(secondEMABegIdx); -/* Generated */ VALUE_HANDLE_INT(secondEMANbElement); -/* Generated */ VALUE_HANDLE_INT(thirdEMABegIdx); -/* Generated */ VALUE_HANDLE_INT(thirdEMANbElement); -/* Generated */ int tempInt, outIdx, lookbackTotal, lookbackEMA; -/* Generated */ int firstEMAIdx, secondEMAIdx; -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ lookbackEMA = LOOKBACK_CALL(EMA)( optInTimePeriod ); -/* Generated */ lookbackTotal = lookbackEMA * 3; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ tempInt = lookbackTotal+(endIdx-startIdx)+1; -/* Generated */ ARRAY_ALLOC(firstEMA,tempInt); -/* Generated */ #if !defined( _JAVA ) -/* Generated */ if( !firstEMA ) -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ #endif -/* Generated */ k = PER_TO_K(optInTimePeriod); -/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( startIdx-(lookbackEMA*2), endIdx, inReal, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(firstEMABegIdx), VALUE_HANDLE_OUT(firstEMANbElement), -/* Generated */ firstEMA ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(firstEMANbElement) == 0) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ ARRAY_ALLOC(secondEMA,VALUE_HANDLE_GET(firstEMANbElement)); -/* Generated */ #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) -/* Generated */ if( !secondEMA ) -/* Generated */ { -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(firstEMANbElement)-1, firstEMA, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(secondEMABegIdx), VALUE_HANDLE_OUT(secondEMANbElement), -/* Generated */ secondEMA ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(secondEMANbElement) == 0) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ ARRAY_FREE( secondEMA ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, VALUE_HANDLE_GET(secondEMANbElement)-1, secondEMA, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(thirdEMABegIdx), VALUE_HANDLE_OUT(thirdEMANbElement), -/* Generated */ outReal ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(thirdEMANbElement) == 0) ) -/* Generated */ { -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ ARRAY_FREE( secondEMA ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ firstEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx) + VALUE_HANDLE_GET(secondEMABegIdx); -/* Generated */ secondEMAIdx = VALUE_HANDLE_GET(thirdEMABegIdx); -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = firstEMAIdx + VALUE_HANDLE_GET(firstEMABegIdx); -/* Generated */ outIdx = 0; -/* Generated */ while( outIdx < VALUE_HANDLE_GET(thirdEMANbElement) ) -/* Generated */ { -/* Generated */ outReal[outIdx] += (3.0*firstEMA[firstEMAIdx++]) - (3.0*secondEMA[secondEMAIdx++]); -/* Generated */ outIdx++; -/* Generated */ } -/* Generated */ ARRAY_FREE( firstEMA ); -/* Generated */ ARRAY_FREE( secondEMA ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TRANGE.c b/src/ta-lib/src/ta_func/ta_TRANGE.c deleted file mode 100644 index d454dbdf1..000000000 --- a/src/ta-lib/src/ta_func/ta_TRANGE.c +++ /dev/null @@ -1,340 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TrueRangeLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int trueRangeLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TRANGE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TRANGE - True Range - * - * Input = High, Low, Close - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode trueRange( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TRANGE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int today, outIdx; - double val2, val3, greatest; - double tempCY, tempLT, tempHT; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* True Range is the greatest of the following: - * - * val1 = distance from today's high to today's low. - * val2 = distance from yesterday's close to today's high. - * val3 = distance from yesterday's close to today's low. - * - * Some books and software makes the first TR value to be - * the (high - low) of the first bar. This function instead - * ignore the first price bar, and only output starting at the - * second price bar are valid. This is done for avoiding - * inconsistency. - */ - - /* Move up the start index if there is not - * enough initial data. - * Always one price bar gets consumed. - */ - if( startIdx < 1 ) - startIdx = 1; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; - today = startIdx; - while( today <= endIdx ) - { - - /* Find the greatest of the 3 values. */ - tempLT = inLow[today]; - tempHT = inHigh[today]; - tempCY = inClose[today-1]; - greatest = tempHT - tempLT; /* val1 */ - - val2 = std_fabs( tempCY - tempHT ); - if( val2 > greatest ) - greatest = val2; - - val3 = std_fabs( tempCY - tempLT ); - if( val3 > greatest ) - greatest = val3; - - outReal[outIdx++] = greatest; - today++; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TrueRange( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode trueRange( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TRANGE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int today, outIdx; -/* Generated */ double val2, val3, greatest; -/* Generated */ double tempCY, tempLT, tempHT; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ if( startIdx < 1 ) -/* Generated */ startIdx = 1; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tempLT = inLow[today]; -/* Generated */ tempHT = inHigh[today]; -/* Generated */ tempCY = inClose[today-1]; -/* Generated */ greatest = tempHT - tempLT; -/* Generated */ val2 = std_fabs( tempCY - tempHT ); -/* Generated */ if( val2 > greatest ) -/* Generated */ greatest = val2; -/* Generated */ val3 = std_fabs( tempCY - tempLT ); -/* Generated */ if( val3 > greatest ) -/* Generated */ greatest = val3; -/* Generated */ outReal[outIdx++] = greatest; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TRIMA.c b/src/ta-lib/src/ta_func/ta_TRIMA.c deleted file mode 100644 index 43617a633..000000000 --- a/src/ta-lib/src/ta_func/ta_TRIMA.c +++ /dev/null @@ -1,659 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * CR Chris (crokusek@hotmail.com) - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010503 MF Initial Coding - * 031703 MF Fix #701060. Correct logic when using a range with - * startIdx/endIdx. Thanks to Chris for reporting this. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TrimaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int trimaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TRIMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TRIMA - Triangular Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode trima( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TRIMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int lookbackTotal; - - double numerator; - double numeratorSub; - double numeratorAdd; - - int i, outIdx, todayIdx, trailingIdx, middleIdx; - double factor, tempReal; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to calculate at least one output. - */ - lookbackTotal = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* TRIMA Description - * ================= - * The triangular MA is a weighted moving average. Instead of the - * TA_WMA who put more weigth on the latest price bar, the triangular - * put more weigth on the data in the middle of the specified period. - * - * Examples: - * For TimeSerie={a,b,c,d,e,f...} ('a' is the older price) - * - * 1st value for TRIMA 4-Period is: ((1*a)+(2*b)+(2*c)+(1*d)) / 6 - * 2nd value for TRIMA 4-Period is: ((1*b)+(2*c)+(2*d)+(1*e)) / 6 - * - * 1st value for TRIMA 5-Period is: ((1*a)+(2*b)+(3*c)+(2*d)+(1*e)) / 9 - * 2nd value for TRIMA 5-Period is: ((1*b)+(2*c)+(3*d)+(2*e)+(1*f)) / 9 - * - * Generally Accepted Implementation - * ================================== - * Using algebra, it can be demonstrated that the TRIMA is equivalent to - * doing a SMA of a SMA. The following explain the rules: - * - * (1) When the period is even, TRIMA(x,period)=SMA(SMA(x,period/2),(period/2)+1) - * (2) When the period is odd, TRIMA(x,period)=SMA(SMA(x,(period+1)/2),(period+1)/2) - * - * In other word: - * (1) A period of 4 becomes TRIMA(x,4) = SMA( SMA( x, 2), 3 ) - * (2) A period of 5 becomes TRIMA(x,5) = SMA( SMA( x, 3), 3 ) - * - * The SMA of a SMA is the algorithm generaly found in books. - * - * Tradestation Implementation - * =========================== - * Tradestation deviate from the generally accepted implementation by - * making the TRIMA to be as follow: - * TRIMA(x,period) = SMA( SMA( x, (int)(period/2)+1), (int)(period/2)+1 ); - * This formula is done regardless if the period is even or odd. - * - * In other word: - * (1) A period of 4 becomes TRIMA(x,4) = SMA( SMA( x, 3), 3 ) - * (2) A period of 5 becomes TRIMA(x,5) = SMA( SMA( x, 3), 3 ) - * (3) A period of 6 becomes TRIMA(x,5) = SMA( SMA( x, 4), 4 ) - * (4) A period of 7 becomes TRIMA(x,5) = SMA( SMA( x, 4), 4 ) - * - * It is not clear to me if the Tradestation approach is a bug or a deliberate - * decision to do things differently. - * - * Metastock Implementation - * ======================== - * Output is the same as the generally accepted implementation. - * - * TA-Lib Implementation - * ===================== - * Output is also the same as the generally accepted implementation. - * - * For speed optimization and avoid memory allocation, TA-Lib use - * a better algorithm than the usual SMA of a SMA. - * - * The calculation from one TRIMA value to the next is done by doing 4 - * little adjustment (the following show a TRIMA 4-period): - * - * TRIMA at time 'd': ((1*a)+(2*b)+(2*c)+(1*d)) / 6 - * TRIMA at time 'e': ((1*b)+(2*c)+(2*d)+(1*e)) / 6 - * - * To go from TRIMA 'd' to 'e', the following is done: - * 1) 'a' and 'b' are substract from the numerator. - * 2) 'd' is added to the numerator. - * 3) 'e' is added to the numerator. - * 4) Calculate TRIMA by doing numerator / 6 - * 5) Repeat sequence for next output - * - * These operations are the same steps done by TA-LIB: - * 1) is done by numeratorSub - * 2) is done by numeratorAdd. - * 3) is obtain from the latest input - * 4) Calculate and write TRIMA in the output - * 5) Repeat for next output. - * - * Of course, numerotrAdd and numeratorSub needs to be - * adjusted for each iteration. - * - * The update of numeratorSub needs values from the input at - * the trailingIdx and middleIdx position. - * - * The update of numeratorAdd needs values from the input at - * the middleIdx and todayIdx. - */ - - outIdx = 0; - - if( (optInTimePeriod % 2) == 1 ) - { - /* Logic for Odd period */ - - /* Calculate the factor which is 1 divided by the - * sumation of the weight. - * - * The sum of the weight is calculated as follow: - * - * The simple sumation serie 1+2+3... n can be - * express as n(n+1)/2 - * - * From this logic, a "triangular" sumation formula - * can be found depending if the period is odd or even. - * - * Odd Period Formula: - * period = 5 and with n=(int)(period/2) - * the formula for a "triangular" serie is: - * 1+2+3+2+1 = (n*(n+1))+n+1 - * = (n+1)*(n+1) - * = 3 * 3 = 9 - * - * Even period Formula: - * period = 6 and with n=(int)(period/2) - * the formula for a "triangular" serie is: - * 1+2+3+3+2+1 = n*(n+1) - * = 3 * 4 = 12 - */ - - /* Note: entirely done with int and becomes double only - * on assignement to the factor variable. - */ - i = (optInTimePeriod>>1); - factor = (i+1)*(i+1); - factor = 1.0/factor; - - /* Initialize all the variable before - * starting to iterate for each output. - */ - trailingIdx = startIdx-lookbackTotal; - middleIdx = trailingIdx + i; - todayIdx = middleIdx + i; - numerator = 0.0; - numeratorSub = 0.0; - for( i=middleIdx; i >= trailingIdx; i-- ) - { - tempReal = inReal[i]; - numeratorSub += tempReal; - numerator += numeratorSub; - } - numeratorAdd = 0.0; - middleIdx++; - for( i=middleIdx; i <= todayIdx; i++ ) - { - tempReal = inReal[i]; - numeratorAdd += tempReal; - numerator += numeratorAdd; - } - - /* Write the first output */ - outIdx = 0; - tempReal = inReal[trailingIdx++]; - outReal[outIdx++] = numerator * factor; - todayIdx++; - - /* Note: The value at the trailingIdx was saved - * in tempReal to account for the case where - * outReal and inReal are ptr on the same - * buffer. - */ - - /* Iterate for remaining output */ - while( todayIdx <= endIdx ) - { - /* Step (1) */ - numerator -= numeratorSub; - numeratorSub -= tempReal; - tempReal = inReal[middleIdx++]; - numeratorSub += tempReal; - - /* Step (2) */ - numerator += numeratorAdd; - numeratorAdd -= tempReal; - tempReal = inReal[todayIdx++]; - numeratorAdd += tempReal; - - /* Step (3) */ - numerator += tempReal; - - /* Step (4) */ - tempReal = inReal[trailingIdx++]; - outReal[outIdx++] = numerator * factor; - } - } - else - { - /* Even logic. - * - * Very similar to the odd logic, except: - * - calculation of the factor is different. - * - the coverage of the numeratorSub and numeratorAdd is - * slightly different. - * - Adjustment of numeratorAdd is different. See Step (2). - */ - i = (optInTimePeriod>>1); - factor = i*(i+1); - factor = 1.0/factor; - - /* Initialize all the variable before - * starting to iterate for each output. - */ - trailingIdx = startIdx-lookbackTotal; - middleIdx = trailingIdx + i - 1; - todayIdx = middleIdx + i; - numerator = 0.0; - - numeratorSub = 0.0; - - for( i=middleIdx; i >= trailingIdx; i-- ) - { - tempReal = inReal[i]; - numeratorSub += tempReal; - numerator += numeratorSub; - } - numeratorAdd = 0.0; - middleIdx++; - for( i=middleIdx; i <= todayIdx; i++ ) - { - tempReal = inReal[i]; - numeratorAdd += tempReal; - numerator += numeratorAdd; - } - - /* Write the first output */ - outIdx = 0; - tempReal = inReal[trailingIdx++]; - outReal[outIdx++] = numerator * factor; - todayIdx++; - - /* Note: The value at the trailingIdx was saved - * in tempReal to account for the case where - * outReal and inReal are ptr on the same - * buffer. - */ - - /* Iterate for remaining output */ - while( todayIdx <= endIdx ) - { - /* Step (1) */ - numerator -= numeratorSub; - numeratorSub -= tempReal; - tempReal = inReal[middleIdx++]; - numeratorSub += tempReal; - - /* Step (2) */ - numeratorAdd -= tempReal; - numerator += numeratorAdd; - tempReal = inReal[todayIdx++]; - numeratorAdd += tempReal; - - /* Step (3) */ - numerator += tempReal; - - /* Step (4) */ - tempReal = inReal[trailingIdx++]; - outReal[outIdx++] = numerator * factor; - } - - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Trima( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode trima( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TRIMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int lookbackTotal; -/* Generated */ double numerator; -/* Generated */ double numeratorSub; -/* Generated */ double numeratorAdd; -/* Generated */ int i, outIdx, todayIdx, trailingIdx, middleIdx; -/* Generated */ double factor, tempReal; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = (optInTimePeriod-1); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ if( (optInTimePeriod % 2) == 1 ) -/* Generated */ { -/* Generated */ i = (optInTimePeriod>>1); -/* Generated */ factor = (i+1)*(i+1); -/* Generated */ factor = 1.0/factor; -/* Generated */ trailingIdx = startIdx-lookbackTotal; -/* Generated */ middleIdx = trailingIdx + i; -/* Generated */ todayIdx = middleIdx + i; -/* Generated */ numerator = 0.0; -/* Generated */ numeratorSub = 0.0; -/* Generated */ for( i=middleIdx; i >= trailingIdx; i-- ) -/* Generated */ { -/* Generated */ tempReal = inReal[i]; -/* Generated */ numeratorSub += tempReal; -/* Generated */ numerator += numeratorSub; -/* Generated */ } -/* Generated */ numeratorAdd = 0.0; -/* Generated */ middleIdx++; -/* Generated */ for( i=middleIdx; i <= todayIdx; i++ ) -/* Generated */ { -/* Generated */ tempReal = inReal[i]; -/* Generated */ numeratorAdd += tempReal; -/* Generated */ numerator += numeratorAdd; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = numerator * factor; -/* Generated */ todayIdx++; -/* Generated */ while( todayIdx <= endIdx ) -/* Generated */ { -/* Generated */ numerator -= numeratorSub; -/* Generated */ numeratorSub -= tempReal; -/* Generated */ tempReal = inReal[middleIdx++]; -/* Generated */ numeratorSub += tempReal; -/* Generated */ numerator += numeratorAdd; -/* Generated */ numeratorAdd -= tempReal; -/* Generated */ tempReal = inReal[todayIdx++]; -/* Generated */ numeratorAdd += tempReal; -/* Generated */ numerator += tempReal; -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = numerator * factor; -/* Generated */ } -/* Generated */ } -/* Generated */ else -/* Generated */ { -/* Generated */ i = (optInTimePeriod>>1); -/* Generated */ factor = i*(i+1); -/* Generated */ factor = 1.0/factor; -/* Generated */ trailingIdx = startIdx-lookbackTotal; -/* Generated */ middleIdx = trailingIdx + i - 1; -/* Generated */ todayIdx = middleIdx + i; -/* Generated */ numerator = 0.0; -/* Generated */ numeratorSub = 0.0; -/* Generated */ for( i=middleIdx; i >= trailingIdx; i-- ) -/* Generated */ { -/* Generated */ tempReal = inReal[i]; -/* Generated */ numeratorSub += tempReal; -/* Generated */ numerator += numeratorSub; -/* Generated */ } -/* Generated */ numeratorAdd = 0.0; -/* Generated */ middleIdx++; -/* Generated */ for( i=middleIdx; i <= todayIdx; i++ ) -/* Generated */ { -/* Generated */ tempReal = inReal[i]; -/* Generated */ numeratorAdd += tempReal; -/* Generated */ numerator += numeratorAdd; -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = numerator * factor; -/* Generated */ todayIdx++; -/* Generated */ while( todayIdx <= endIdx ) -/* Generated */ { -/* Generated */ numerator -= numeratorSub; -/* Generated */ numeratorSub -= tempReal; -/* Generated */ tempReal = inReal[middleIdx++]; -/* Generated */ numeratorSub += tempReal; -/* Generated */ numeratorAdd -= tempReal; -/* Generated */ numerator += numeratorAdd; -/* Generated */ tempReal = inReal[todayIdx++]; -/* Generated */ numeratorAdd += tempReal; -/* Generated */ numerator += tempReal; -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = numerator * factor; -/* Generated */ } -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TRIX.c b/src/ta-lib/src/ta_func/ta_TRIX.c deleted file mode 100644 index 123e61188..000000000 --- a/src/ta-lib/src/ta_func/ta_TRIX.c +++ /dev/null @@ -1,461 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AA Andrew Atkinson - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 020605 AA Fix #1117656. NULL pointer assignement. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TrixLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int trixLookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TRIX_Lookback( int optInTimePeriod ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int emaLookback; -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - emaLookback = LOOKBACK_CALL(EMA)( optInTimePeriod ); - return (emaLookback*3) + LOOKBACK_CALL(ROCR)( 1 ); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode trix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TRIX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - double k; - ARRAY_REF(tempBuffer); - VALUE_HANDLE_INT(nbElement); - VALUE_HANDLE_INT(begIdx); - int totalLookback; - int emaLookback, rocLookback; - ENUM_DECLARATION(RetCode) retCode; - int nbElementToOutput; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Adjust the startIdx to account for the lookback. */ - emaLookback = LOOKBACK_CALL(EMA)( optInTimePeriod ); - rocLookback = LOOKBACK_CALL(ROCR)( 1 ); - totalLookback = (emaLookback*3) + rocLookback; - - if( startIdx < totalLookback ) - startIdx = totalLookback; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - nbElementToOutput = (endIdx-startIdx)+1+totalLookback; - - /* Allocate a temporary buffer for performing - * the calculation. - */ - ARRAY_ALLOC(tempBuffer, nbElementToOutput ); - - #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) - if( !tempBuffer ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); - } - #endif - - /* Calculate the first EMA */ - k = PER_TO_K(optInTimePeriod); - retCode = FUNCTION_CALL(INT_EMA)( (startIdx-totalLookback), endIdx, inReal, - optInTimePeriod, k, - VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), - tempBuffer ); - - /* Verify for failure or if not enough data after - * calculating the EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - ARRAY_FREE( tempBuffer ); - return retCode; - } - - nbElementToOutput--; /* Make this variable zero base from now on. */ - - /* Calculate the second EMA */ - nbElementToOutput -= emaLookback; - retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, - optInTimePeriod, k, - VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), - tempBuffer ); - - /* Verify for failure or if not enough data after - * calculating the EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - ARRAY_FREE( tempBuffer ); - return retCode; - } - - /* Calculate the third EMA */ - nbElementToOutput -= emaLookback; - retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, - optInTimePeriod, k, - VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), - tempBuffer ); - - /* Verify for failure or if not enough data after - * calculating the EMA. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - ARRAY_FREE( tempBuffer ); - return retCode; - } - - /* Calculate the 1-day Rate-Of-Change */ - nbElementToOutput -= emaLookback; - retCode = FUNCTION_CALL_DOUBLE(ROC)( 0, nbElementToOutput, - tempBuffer, - 1, VALUE_HANDLE_OUT(begIdx), outNBElement, - outReal ); - - ARRAY_FREE( tempBuffer ); - /* Verify for failure or if not enough data after - * calculating the rate-of-change. - */ - if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - return retCode; - } - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Trix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode trix( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TRIX( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double k; -/* Generated */ ARRAY_REF(tempBuffer); -/* Generated */ VALUE_HANDLE_INT(nbElement); -/* Generated */ VALUE_HANDLE_INT(begIdx); -/* Generated */ int totalLookback; -/* Generated */ int emaLookback, rocLookback; -/* Generated */ ENUM_DECLARATION(RetCode) retCode; -/* Generated */ int nbElementToOutput; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ emaLookback = LOOKBACK_CALL(EMA)( optInTimePeriod ); -/* Generated */ rocLookback = LOOKBACK_CALL(ROCR)( 1 ); -/* Generated */ totalLookback = (emaLookback*3) + rocLookback; -/* Generated */ if( startIdx < totalLookback ) -/* Generated */ startIdx = totalLookback; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ nbElementToOutput = (endIdx-startIdx)+1+totalLookback; -/* Generated */ ARRAY_ALLOC(tempBuffer, nbElementToOutput ); -/* Generated */ #if !defined( _JAVA ) && !defined( USE_SUBARRAY ) -/* Generated */ if( !tempBuffer ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ return ENUM_VALUE(RetCode,TA_ALLOC_ERR,AllocErr); -/* Generated */ } -/* Generated */ #endif -/* Generated */ k = PER_TO_K(optInTimePeriod); -/* Generated */ retCode = FUNCTION_CALL(INT_EMA)( (startIdx-totalLookback), endIdx, inReal, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), -/* Generated */ tempBuffer ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ nbElementToOutput--; -/* Generated */ nbElementToOutput -= emaLookback; -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), -/* Generated */ tempBuffer ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ nbElementToOutput -= emaLookback; -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(INT_EMA)( 0, nbElementToOutput, tempBuffer, -/* Generated */ optInTimePeriod, k, -/* Generated */ VALUE_HANDLE_OUT(begIdx), VALUE_HANDLE_OUT(nbElement), -/* Generated */ tempBuffer ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || (VALUE_HANDLE_GET(nbElement) == 0) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ nbElementToOutput -= emaLookback; -/* Generated */ retCode = FUNCTION_CALL_DOUBLE(ROC)( 0, nbElementToOutput, -/* Generated */ tempBuffer, -/* Generated */ 1, VALUE_HANDLE_OUT(begIdx), outNBElement, -/* Generated */ outReal ); -/* Generated */ ARRAY_FREE( tempBuffer ); -/* Generated */ if( (retCode != ENUM_VALUE(RetCode,TA_SUCCESS,Success) ) || ((int)VALUE_HANDLE_DEREF(outNBElement) == 0) ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ return retCode; -/* Generated */ } -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TSF.c b/src/ta-lib/src/ta_func/ta_TSF.c deleted file mode 100644 index 351ad95a5..000000000 --- a/src/ta-lib/src/ta_func/ta_TSF.c +++ /dev/null @@ -1,365 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 090103 MF Initial coding re-using the existing TA_LinearReg - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TsfLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int tsfLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TSF_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TSF - Time Series Forecast - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tsf( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TSF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int outIdx; - - int today, lookbackTotal; - double SumX, SumXY, SumY, SumXSqr, Divisor; - - double m, b; - int i; - - double tempValue1; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Linear Regression is a concept also known as the - * "least squares method" or "best fit." Linear - * Regression attempts to fit a straight line between - * several data points in such a way that distance - * between each data point and the line is minimized. - * - * For each point, a straight line over the specified - * previous bar period is determined in terms - * of y = b + m*x: - * - * TA_LINEARREG : Returns b+m*(period-1) - * TA_LINEARREG_SLOPE : Returns 'm' - * TA_LINEARREG_ANGLE : Returns 'm' in degree. - * TA_LINEARREG_INTERCEPT: Returns 'b' - * TA_TSF : Returns b+m*(period) - */ - - /* Adjust startIdx to account for the lookback period. */ - lookbackTotal = LOOKBACK_CALL(TSF)( optInTimePeriod ); - - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - outIdx = 0; /* Index into the output. */ - today = startIdx; - - SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; - SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; - Divisor = SumX * SumX - optInTimePeriod * SumXSqr; - - while( today <= endIdx ) - { - SumXY = 0; - SumY = 0; - for( i = optInTimePeriod; i-- != 0; ) - { - SumY += tempValue1 = inReal[today - i]; - SumXY += (double)i * tempValue1; - } - m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; - b = ( SumY - m * SumX ) / (double)optInTimePeriod; - outReal[outIdx++] = b + m * (double)optInTimePeriod; - today++; - } - - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Tsf( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode tsf( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TSF( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx; -/* Generated */ int today, lookbackTotal; -/* Generated */ double SumX, SumXY, SumY, SumXSqr, Divisor; -/* Generated */ double m, b; -/* Generated */ int i; -/* Generated */ double tempValue1; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = LOOKBACK_CALL(TSF)( optInTimePeriod ); -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ SumX = optInTimePeriod * ( optInTimePeriod - 1 ) * 0.5; -/* Generated */ SumXSqr = optInTimePeriod * ( optInTimePeriod - 1 ) * ( 2 * optInTimePeriod - 1 ) / 6; -/* Generated */ Divisor = SumX * SumX - optInTimePeriod * SumXSqr; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ SumXY = 0; -/* Generated */ SumY = 0; -/* Generated */ for( i = optInTimePeriod; i-- != 0; ) -/* Generated */ { -/* Generated */ SumY += tempValue1 = inReal[today - i]; -/* Generated */ SumXY += (double)i * tempValue1; -/* Generated */ } -/* Generated */ m = ( optInTimePeriod * SumXY - SumX * SumY) / Divisor; -/* Generated */ b = ( SumY - m * SumX ) / (double)optInTimePeriod; -/* Generated */ outReal[outIdx++] = b + m * (double)optInTimePeriod; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_TYPPRICE.c b/src/ta-lib/src/ta_func/ta_TYPPRICE.c deleted file mode 100644 index 8c84d24d6..000000000 --- a/src/ta-lib/src/ta_func/ta_TYPPRICE.c +++ /dev/null @@ -1,283 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 112605 MF Fix outBegIdx when startIdx != 0 - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::TypPriceLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int typPriceLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_TYPPRICE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* This function have no lookback needed. */ - - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_TYPPRICE - Typical Price - * - * Input = High, Low, Close - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode typPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_TYPPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int outIdx, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Typical price = (High + Low + Close ) / 3 */ - outIdx = 0; - - for( i= startIdx; i <= endIdx; i++ ) - { - outReal[outIdx++] = ( inHigh [i] + - inLow [i] + - inClose[i] ) / 3.0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TypPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode typPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_TYPPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ outIdx = 0; -/* Generated */ for( i= startIdx; i <= endIdx; i++ ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = ( inHigh [i] + -/* Generated */ inLow [i] + -/* Generated */ inClose[i] ) / 3.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_ULTOSC.c b/src/ta-lib/src/ta_func/ta_ULTOSC.c deleted file mode 100644 index 259464d4d..000000000 --- a/src/ta-lib/src/ta_func/ta_ULTOSC.c +++ /dev/null @@ -1,594 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * DM Drew McCormack (http://www.trade-strategist.com) - * MF Mario Fortier - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 281206 DM Initial Implementation - * 010606 MF Abstract local arrays. Detect divide by zero. - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::UltOscLookback( int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3 ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int ultOscLookback( int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3 ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_ULTOSC_Lookback( int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3 ) /* From 1 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - int maxPeriod; -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod1. */ -/* Generated */ if( (int)optInTimePeriod1 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod1 = 7; -/* Generated */ else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInTimePeriod2. */ -/* Generated */ if( (int)optInTimePeriod2 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod2 = 14; -/* Generated */ else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ /* min/max are checked for optInTimePeriod3. */ -/* Generated */ if( (int)optInTimePeriod3 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod3 = 28; -/* Generated */ else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* Lookback for the Ultimate Oscillator is the lookback of the SMA with the longest - * time period, plus 1 for the True Range. - */ - maxPeriod = max( max(optInTimePeriod1, optInTimePeriod2), optInTimePeriod3); - return LOOKBACK_CALL(SMA)( maxPeriod ) + 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_ULTOSC - Ultimate Oscillator - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod1:(From 1 to 100000) - * Number of bars for 1st period. - * - * optInTimePeriod2:(From 1 to 100000) - * Number of bars fro 2nd period - * - * optInTimePeriod3:(From 1 to 100000) - * Number of bars for 3rd period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ultOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_ULTOSC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double a1Total, a2Total, a3Total; - double b1Total, b2Total, b3Total; - double trueLow, trueRange, closeMinusTrueLow; - double tempDouble, output, tempHT, tempLT, tempCY; - int lookbackTotal; - int longestPeriod, longestIndex; - int i,j,today,outIdx; - int trailingIdx1, trailingIdx2, trailingIdx3; - - ARRAY_INT_LOCAL(usedFlag,3); - ARRAY_INT_LOCAL(periods,3); - ARRAY_INT_LOCAL(sortedPeriods,3); - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod1. */ -/* Generated */ if( (int)optInTimePeriod1 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod1 = 7; -/* Generated */ else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInTimePeriod2. */ -/* Generated */ if( (int)optInTimePeriod2 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod2 = 14; -/* Generated */ else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ /* min/max are checked for optInTimePeriod3. */ -/* Generated */ if( (int)optInTimePeriod3 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod3 = 28; -/* Generated */ else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - - /* Ensure that the time periods are ordered from shortest to longest. - * Sort. */ - periods[0] = optInTimePeriod1; - periods[1] = optInTimePeriod2; - periods[2] = optInTimePeriod3; - usedFlag[0] = 0; - usedFlag[1] = 0; - usedFlag[2] = 0; - for ( i = 0; i < 3; ++i ) - { - longestPeriod = 0; - longestIndex = 0; - for ( j = 0; j < 3; ++j ) - { - if ( (usedFlag[j] == 0) && (periods[j] > longestPeriod) ) - { - longestPeriod = periods[j]; - longestIndex = j; - } - } - usedFlag[longestIndex] = 1; - sortedPeriods[i] = longestPeriod; - } - optInTimePeriod1 = sortedPeriods[2]; - optInTimePeriod2 = sortedPeriods[1]; - optInTimePeriod3 = sortedPeriods[0]; - - /* Adjust startIdx for lookback period. */ - lookbackTotal = LOOKBACK_CALL(ULTOSC)( optInTimePeriod1, optInTimePeriod2, optInTimePeriod3 ); - if( startIdx < lookbackTotal ) startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - - /* Prime running totals used in moving averages */ - #define CALC_TERMS(day) \ - { \ - tempLT = inLow[day]; \ - tempHT = inHigh[day]; \ - tempCY = inClose[day-1]; \ - trueLow = min( tempLT, tempCY ); \ - closeMinusTrueLow = inClose[day] - trueLow; \ - trueRange = tempHT - tempLT; \ - tempDouble = std_fabs( tempCY - tempHT ); \ - if( tempDouble > trueRange ) \ - trueRange = tempDouble; \ - tempDouble = std_fabs( tempCY - tempLT ); \ - if( tempDouble > trueRange ) \ - trueRange = tempDouble; \ - } - - #define PRIME_TOTALS(aTotal, bTotal, period) \ - { \ - aTotal = 0; \ - bTotal = 0; \ - for ( i = startIdx-period+1; i < startIdx; ++i ) \ - { \ - CALC_TERMS(i); \ - aTotal += closeMinusTrueLow; \ - bTotal += trueRange; \ - } \ - } - - PRIME_TOTALS(a1Total, b1Total, optInTimePeriod1); - PRIME_TOTALS(a2Total, b2Total, optInTimePeriod2); - PRIME_TOTALS(a3Total, b3Total, optInTimePeriod3); - - #undef PRIME_TOTALS - - /* Calculate oscillator */ - today = startIdx; - outIdx = 0; - trailingIdx1 = today - optInTimePeriod1 + 1; - trailingIdx2 = today - optInTimePeriod2 + 1; - trailingIdx3 = today - optInTimePeriod3 + 1; - while( today <= endIdx ) - { - /* Add on today's terms */ - CALC_TERMS(today); - a1Total += closeMinusTrueLow; - a2Total += closeMinusTrueLow; - a3Total += closeMinusTrueLow; - b1Total += trueRange; - b2Total += trueRange; - b3Total += trueRange; - - /* Calculate the oscillator value for today */ - output = 0.0; - - if( !TA_IS_ZERO(b1Total) ) output += 4.0*(a1Total/b1Total); - if( !TA_IS_ZERO(b2Total) ) output += 2.0*(a2Total/b2Total); - if( !TA_IS_ZERO(b3Total) ) output += a3Total/b3Total; - - /* Remove the trailing terms to prepare for next day */ - CALC_TERMS(trailingIdx1); - a1Total -= closeMinusTrueLow; - b1Total -= trueRange; - - CALC_TERMS(trailingIdx2); - a2Total -= closeMinusTrueLow; - b2Total -= trueRange; - - CALC_TERMS(trailingIdx3); - a3Total -= closeMinusTrueLow; - b3Total -= trueRange; - - /* Last operation is to write the output. Must - * be done after the trailing index have all been - * taken care of because the caller is allowed - * to have the input array to be also the output - * array. - */ - outReal[outIdx] = 100.0 * (output / 7.0); - - /* Increment indexes */ - outIdx++; - today++; - trailingIdx1++; - trailingIdx2++; - trailingIdx3++; - } - #undef CALC_TERMS - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::UltOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode ultOsc( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_ULTOSC( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod1, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod2, /* From 1 to 100000 */ -/* Generated */ int optInTimePeriod3, /* From 1 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double a1Total, a2Total, a3Total; -/* Generated */ double b1Total, b2Total, b3Total; -/* Generated */ double trueLow, trueRange, closeMinusTrueLow; -/* Generated */ double tempDouble, output, tempHT, tempLT, tempCY; -/* Generated */ int lookbackTotal; -/* Generated */ int longestPeriod, longestIndex; -/* Generated */ int i,j,today,outIdx; -/* Generated */ int trailingIdx1, trailingIdx2, trailingIdx3; -/* Generated */ ARRAY_INT_LOCAL(usedFlag,3); -/* Generated */ ARRAY_INT_LOCAL(periods,3); -/* Generated */ ARRAY_INT_LOCAL(sortedPeriods,3); -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod1 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod1 = 7; -/* Generated */ else if( ((int)optInTimePeriod1 < 1) || ((int)optInTimePeriod1 > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInTimePeriod2 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod2 = 14; -/* Generated */ else if( ((int)optInTimePeriod2 < 1) || ((int)optInTimePeriod2 > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( (int)optInTimePeriod3 == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod3 = 28; -/* Generated */ else if( ((int)optInTimePeriod3 < 1) || ((int)optInTimePeriod3 > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ periods[0] = optInTimePeriod1; -/* Generated */ periods[1] = optInTimePeriod2; -/* Generated */ periods[2] = optInTimePeriod3; -/* Generated */ usedFlag[0] = 0; -/* Generated */ usedFlag[1] = 0; -/* Generated */ usedFlag[2] = 0; -/* Generated */ for ( i = 0; i < 3; ++i ) -/* Generated */ { -/* Generated */ longestPeriod = 0; -/* Generated */ longestIndex = 0; -/* Generated */ for ( j = 0; j < 3; ++j ) -/* Generated */ { -/* Generated */ if ( (usedFlag[j] == 0) && (periods[j] > longestPeriod) ) -/* Generated */ { -/* Generated */ longestPeriod = periods[j]; -/* Generated */ longestIndex = j; -/* Generated */ } -/* Generated */ } -/* Generated */ usedFlag[longestIndex] = 1; -/* Generated */ sortedPeriods[i] = longestPeriod; -/* Generated */ } -/* Generated */ optInTimePeriod1 = sortedPeriods[2]; -/* Generated */ optInTimePeriod2 = sortedPeriods[1]; -/* Generated */ optInTimePeriod3 = sortedPeriods[0]; -/* Generated */ lookbackTotal = LOOKBACK_CALL(ULTOSC)( optInTimePeriod1, optInTimePeriod2, optInTimePeriod3 ); -/* Generated */ if( startIdx < lookbackTotal ) startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ #define CALC_TERMS(day) \ -/* Generated */ { \ -/* Generated */ tempLT = inLow[day]; \ -/* Generated */ tempHT = inHigh[day]; \ -/* Generated */ tempCY = inClose[day-1]; \ -/* Generated */ trueLow = min( tempLT, tempCY ); \ -/* Generated */ closeMinusTrueLow = inClose[day] - trueLow; \ -/* Generated */ trueRange = tempHT - tempLT; \ -/* Generated */ tempDouble = std_fabs( tempCY - tempHT ); \ -/* Generated */ if( tempDouble > trueRange ) \ -/* Generated */ trueRange = tempDouble; \ -/* Generated */ tempDouble = std_fabs( tempCY - tempLT ); \ -/* Generated */ if( tempDouble > trueRange ) \ -/* Generated */ trueRange = tempDouble; \ -/* Generated */ } -/* Generated */ #define PRIME_TOTALS(aTotal, bTotal, period) \ -/* Generated */ { \ -/* Generated */ aTotal = 0; \ -/* Generated */ bTotal = 0; \ -/* Generated */ for ( i = startIdx-period+1; i < startIdx; ++i ) \ -/* Generated */ { \ -/* Generated */ CALC_TERMS(i); \ -/* Generated */ aTotal += closeMinusTrueLow; \ -/* Generated */ bTotal += trueRange; \ -/* Generated */ } \ -/* Generated */ } -/* Generated */ PRIME_TOTALS(a1Total, b1Total, optInTimePeriod1); -/* Generated */ PRIME_TOTALS(a2Total, b2Total, optInTimePeriod2); -/* Generated */ PRIME_TOTALS(a3Total, b3Total, optInTimePeriod3); -/* Generated */ #undef PRIME_TOTALS -/* Generated */ today = startIdx; -/* Generated */ outIdx = 0; -/* Generated */ trailingIdx1 = today - optInTimePeriod1 + 1; -/* Generated */ trailingIdx2 = today - optInTimePeriod2 + 1; -/* Generated */ trailingIdx3 = today - optInTimePeriod3 + 1; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ CALC_TERMS(today); -/* Generated */ a1Total += closeMinusTrueLow; -/* Generated */ a2Total += closeMinusTrueLow; -/* Generated */ a3Total += closeMinusTrueLow; -/* Generated */ b1Total += trueRange; -/* Generated */ b2Total += trueRange; -/* Generated */ b3Total += trueRange; -/* Generated */ output = 0.0; -/* Generated */ if( !TA_IS_ZERO(b1Total) ) output += 4.0*(a1Total/b1Total); -/* Generated */ if( !TA_IS_ZERO(b2Total) ) output += 2.0*(a2Total/b2Total); -/* Generated */ if( !TA_IS_ZERO(b3Total) ) output += a3Total/b3Total; -/* Generated */ CALC_TERMS(trailingIdx1); -/* Generated */ a1Total -= closeMinusTrueLow; -/* Generated */ b1Total -= trueRange; -/* Generated */ CALC_TERMS(trailingIdx2); -/* Generated */ a2Total -= closeMinusTrueLow; -/* Generated */ b2Total -= trueRange; -/* Generated */ CALC_TERMS(trailingIdx3); -/* Generated */ a3Total -= closeMinusTrueLow; -/* Generated */ b3Total -= trueRange; -/* Generated */ outReal[outIdx] = 100.0 * (output / 7.0); -/* Generated */ outIdx++; -/* Generated */ today++; -/* Generated */ trailingIdx1++; -/* Generated */ trailingIdx2++; -/* Generated */ trailingIdx3++; -/* Generated */ } -/* Generated */ #undef CALC_TERMS -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_VAR.c b/src/ta-lib/src/ta_func/ta_VAR.c deleted file mode 100644 index d67e919fb..000000000 --- a/src/ta-lib/src/ta_func/ta_VAR.c +++ /dev/null @@ -1,498 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * JV Jesus Viver <324122@cienz.unizar.es> - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 100502 JV Speed optimization of the algorithm - * 052603 MF Adapt code to compile with .NET Managed C++ - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::VarianceLookback( int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int varianceLookback( int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_VAR_Lookback( int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev ) /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) -/* Generated */ optInNbDev = 1.000000e+0; -/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - UNUSED_VARIABLE(optInNbDev); - - return optInTimePeriod-1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_VAR - Variance - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 1 to 100000) - * Number of period - * - * optInNbDev:(From TA_REAL_MIN to TA_REAL_MAX) - * Nb of deviations - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode variance( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_VAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) -/* Generated */ optInNbDev = 1.000000e+0; -/* Generated */ else if( (optInNbDev < -3.000000e+37) ||/* Generated */ (optInNbDev > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - return FUNCTION_CALL(INT_VAR)( startIdx, endIdx, inReal, - optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - outBegIdx, outNBElement, outReal ); -} - - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) - // No INT function -#else - -#if defined( _MANAGED ) && defined( USE_SUBARRAY ) -enum class Core::RetCode Core::TA_INT_VAR( int startIdx, - int endIdx, - SubArray^ inReal, - int optInTimePeriod, - [Out]int% outBegIdx, - [Out]int% outNBElement, - SubArray^ outReal ) -#elif defined( _MANAGED ) -enum class Core::RetCode Core::TA_INT_VAR( int startIdx, - int endIdx, - cli::array^ inReal, - int optInTimePeriod, - [Out]int% outBegIdx, - [Out]int% outNBElement, - cli::array^ outReal ) -#elif defined( _JAVA ) -public RetCode TA_INT_VAR( int startIdx, - int endIdx, - INPUT_TYPE inReal[], - int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - MInteger outBegIdx, - MInteger outNBElement, - double outReal[] ) -#else -TA_RetCode TA_PREFIX(INT_VAR)( int startIdx, - int endIdx, - const INPUT_TYPE *inReal, - int optInTimePeriod, /* From 1 to TA_INTEGER_MAX */ - int *outBegIdx, - int *outNBElement, - double *outReal ) -#endif -{ - double tempReal, periodTotal1, periodTotal2, meanValue1, meanValue2; - int i, outIdx, trailingIdx, nbInitialElementNeeded; - - /* Validate the calculation method type and - * identify the minimum number of price bar needed - * to calculate at least one output. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Do the MA calculation using tight loops. */ - /* Add-up the initial periods, except for the last value. */ - periodTotal1 = 0; - periodTotal2 = 0; - trailingIdx = startIdx-nbInitialElementNeeded; - - i=trailingIdx; - if( optInTimePeriod > 1 ) - { - while( i < startIdx ) { - tempReal = inReal[i++]; - periodTotal1 += tempReal; - tempReal *= tempReal; - periodTotal2 += tempReal; - } - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the inReal and - * outReal to be the same buffer. - */ - outIdx = 0; - do - { - tempReal = inReal[i++]; - - /* Square and add all the deviation over - * the same periods. - */ - - periodTotal1 += tempReal; - tempReal *= tempReal; - periodTotal2 += tempReal; - - /* Square and add all the deviation over - * the same period. - */ - - meanValue1 = periodTotal1 / optInTimePeriod; - meanValue2 = periodTotal2 / optInTimePeriod; - - tempReal = inReal[trailingIdx++]; - periodTotal1 -= tempReal; - tempReal *= tempReal; - periodTotal2 -= tempReal; - - outReal[outIdx++] = meanValue2-meanValue1*meanValue1; - } while( i <= endIdx ); - - /* All done. Indicate the output limits and return. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} -#endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Variance( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode variance( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_VAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 1 to 100000 */ -/* Generated */ double optInNbDev, /* From TA_REAL_MIN to TA_REAL_MAX */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 5; -/* Generated */ else if( ((int)optInTimePeriod < 1) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ if( optInNbDev == TA_REAL_DEFAULT ) -/* Generated */ optInNbDev = 1.000000e+0; -/* Generated */ else if( (optInNbDev < -3.000000e+37) || (optInNbDev > 3.000000e+37) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ return FUNCTION_CALL(INT_VAR)( startIdx, endIdx, inReal, -/* Generated */ optInTimePeriod, -/* Generated */ outBegIdx, outNBElement, outReal ); -/* Generated */ } -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined(USE_SINGLE_PRECISION_INPUT) -/* Generated */ // No INT function -/* Generated */ #else -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::TA_INT_VAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::TA_INT_VAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode TA_INT_VAR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ INPUT_TYPE inReal[], -/* Generated */ int optInTimePeriod, -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_PREFIX(INT_VAR)( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const INPUT_TYPE *inReal, -/* Generated */ int optInTimePeriod, -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double *outReal ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double tempReal, periodTotal1, periodTotal2, meanValue1, meanValue2; -/* Generated */ int i, outIdx, trailingIdx, nbInitialElementNeeded; -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ periodTotal1 = 0; -/* Generated */ periodTotal2 = 0; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ i=trailingIdx; -/* Generated */ if( optInTimePeriod > 1 ) -/* Generated */ { -/* Generated */ while( i < startIdx ) { -/* Generated */ tempReal = inReal[i++]; -/* Generated */ periodTotal1 += tempReal; -/* Generated */ tempReal *= tempReal; -/* Generated */ periodTotal2 += tempReal; -/* Generated */ } -/* Generated */ } -/* Generated */ outIdx = 0; -/* Generated */ do -/* Generated */ { -/* Generated */ tempReal = inReal[i++]; -/* Generated */ periodTotal1 += tempReal; -/* Generated */ tempReal *= tempReal; -/* Generated */ periodTotal2 += tempReal; -/* Generated */ meanValue1 = periodTotal1 / optInTimePeriod; -/* Generated */ meanValue2 = periodTotal2 / optInTimePeriod; -/* Generated */ tempReal = inReal[trailingIdx++]; -/* Generated */ periodTotal1 -= tempReal; -/* Generated */ tempReal *= tempReal; -/* Generated */ periodTotal2 -= tempReal; -/* Generated */ outReal[outIdx++] = meanValue2-meanValue1*meanValue1; -/* Generated */ } while( i <= endIdx ); -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ #endif // Not defined( _MANAGED ) && defined( USE_SUBARRAY ) && defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_WCLPRICE.c b/src/ta-lib/src/ta_func/ta_WCLPRICE.c deleted file mode 100644 index be6dec70b..000000000 --- a/src/ta-lib/src/ta_func/ta_WCLPRICE.c +++ /dev/null @@ -1,282 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * 112605 MF Fix outBegIdx when startIdx != 0 - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::WclPriceLookback( void ) -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int wclPriceLookback( ) -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_WCLPRICE_Lookback( void ) -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ /* No parameters to validate. */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - /* This function have no lookback needed. */ - return 0; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_WCLPRICE - Weighted Close Price - * - * Input = High, Low, Close - * Output = double - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode wclPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_WCLPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int outIdx, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Weighted Close Price = (High + Low + (Close*2) ) / 4 */ - - outIdx = 0; - - for( i= startIdx; i <= endIdx; i++ ) - { - outReal[outIdx++] = ( inHigh [i] + - inLow [i] + - (inClose[i]*2.0) ) / 4.0; - } - - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::WclPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode wclPrice( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_WCLPRICE( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int outIdx, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ outIdx = 0; -/* Generated */ for( i= startIdx; i <= endIdx; i++ ) -/* Generated */ { -/* Generated */ outReal[outIdx++] = ( inHigh [i] + -/* Generated */ inLow [i] + -/* Generated */ (inClose[i]*2.0) ) / 4.0; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_WILLR.c b/src/ta-lib/src/ta_func/ta_WILLR.c deleted file mode 100644 index 27368f8a5..000000000 --- a/src/ta-lib/src/ta_func/ta_WILLR.c +++ /dev/null @@ -1,466 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 010802 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::WillRLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int willRLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_WILLR_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - - return (optInTimePeriod-1); -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_WILLR - Williams' %R - * - * Input = High, Low, Close - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode willR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inHigh[], -/* Generated */ double inLow[], -/* Generated */ double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_WILLR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inHigh[], -/* Generated */ const double inLow[], -/* Generated */ const double inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - double lowest, highest, tmp, diff; - int outIdx, nbInitialElementNeeded; - int trailingIdx, lowestIdx, highestIdx; - int today, i; - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ /* Verify required price component. */ -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Initialize 'diff', just to avoid warning. */ - diff = 0.0; - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - lowestIdx = highestIdx = -1; - diff = highest = lowest = 0.0; - - while( today <= endIdx ) - { - /* Set the lowest low */ - tmp = inLow[today]; - if( lowestIdx < trailingIdx ) - { - lowestIdx = trailingIdx; - lowest = inLow[lowestIdx]; - i = lowestIdx; - while( ++i<=today ) - { - tmp = inLow[i]; - if( tmp < lowest ) - { - lowestIdx = i; - lowest = tmp; - } - } - diff = (highest - lowest)/(-100.0); - } - else if( tmp <= lowest ) - { - lowestIdx = today; - lowest = tmp; - diff = (highest - lowest)/(-100.0); - } - - /* Set the highest high */ - tmp = inHigh[today]; - if( highestIdx < trailingIdx ) - { - highestIdx = trailingIdx; - highest = inHigh[highestIdx]; - i = highestIdx; - while( ++i<=today ) - { - tmp = inHigh[i]; - if( tmp > highest ) - { - highestIdx = i; - highest = tmp; - } - } - diff = (highest - lowest)/(-100.0); - } - else if( tmp >= highest ) - { - highestIdx = today; - highest = tmp; - diff = (highest - lowest)/(-100.0); - } - - if( diff != 0.0 ) - outReal[outIdx++] = (highest-inClose[today])/diff; - else - outReal[outIdx++] = 0.0; - - trailingIdx++; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inHigh, -/* Generated */ SubArray^ inLow, -/* Generated */ SubArray^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::WillR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inHigh, -/* Generated */ cli::array^ inLow, -/* Generated */ cli::array^ inClose, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode willR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inHigh[], -/* Generated */ float inLow[], -/* Generated */ float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_WILLR( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inHigh[], -/* Generated */ const float inLow[], -/* Generated */ const float inClose[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ double lowest, highest, tmp, diff; -/* Generated */ int outIdx, nbInitialElementNeeded; -/* Generated */ int trailingIdx, lowestIdx, highestIdx; -/* Generated */ int today, i; -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if(!inHigh||!inLow||!inClose) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 14; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ nbInitialElementNeeded = (optInTimePeriod-1); -/* Generated */ if( startIdx < nbInitialElementNeeded ) -/* Generated */ startIdx = nbInitialElementNeeded; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ diff = 0.0; -/* Generated */ outIdx = 0; -/* Generated */ today = startIdx; -/* Generated */ trailingIdx = startIdx-nbInitialElementNeeded; -/* Generated */ lowestIdx = highestIdx = -1; -/* Generated */ diff = highest = lowest = 0.0; -/* Generated */ while( today <= endIdx ) -/* Generated */ { -/* Generated */ tmp = inLow[today]; -/* Generated */ if( lowestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ lowestIdx = trailingIdx; -/* Generated */ lowest = inLow[lowestIdx]; -/* Generated */ i = lowestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inLow[i]; -/* Generated */ if( tmp < lowest ) -/* Generated */ { -/* Generated */ lowestIdx = i; -/* Generated */ lowest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ diff = (highest - lowest)/(-100.0); -/* Generated */ } -/* Generated */ else if( tmp <= lowest ) -/* Generated */ { -/* Generated */ lowestIdx = today; -/* Generated */ lowest = tmp; -/* Generated */ diff = (highest - lowest)/(-100.0); -/* Generated */ } -/* Generated */ tmp = inHigh[today]; -/* Generated */ if( highestIdx < trailingIdx ) -/* Generated */ { -/* Generated */ highestIdx = trailingIdx; -/* Generated */ highest = inHigh[highestIdx]; -/* Generated */ i = highestIdx; -/* Generated */ while( ++i<=today ) -/* Generated */ { -/* Generated */ tmp = inHigh[i]; -/* Generated */ if( tmp > highest ) -/* Generated */ { -/* Generated */ highestIdx = i; -/* Generated */ highest = tmp; -/* Generated */ } -/* Generated */ } -/* Generated */ diff = (highest - lowest)/(-100.0); -/* Generated */ } -/* Generated */ else if( tmp >= highest ) -/* Generated */ { -/* Generated */ highestIdx = today; -/* Generated */ highest = tmp; -/* Generated */ diff = (highest - lowest)/(-100.0); -/* Generated */ } -/* Generated */ if( diff != 0.0 ) -/* Generated */ outReal[outIdx++] = (highest-inClose[today])/diff; -/* Generated */ else -/* Generated */ outReal[outIdx++] = 0.0; -/* Generated */ trailingIdx++; -/* Generated */ today++; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_WMA.c b/src/ta-lib/src/ta_func/ta_WMA.c deleted file mode 100644 index c1f6ff808..000000000 --- a/src/ta-lib/src/ta_func/ta_WMA.c +++ /dev/null @@ -1,436 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF Template creation. - * 052603 MF Adapt code to compile with .NET Managed C++ - * - */ - -/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -/* All code within this section is automatically - * generated by gen_code. Any modification will be lost - * next time gen_code is run. - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ #include "TA-Lib-Core.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError) -/* Generated */ namespace TicTacTec { namespace TA { namespace Library { -/* Generated */ #elif defined( _JAVA ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #include "ta_java_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #elif defined( _RUST ) -/* Generated */ #include "ta_defs.h" -/* Generated */ #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError) -/* Generated */ #else -/* Generated */ #include -/* Generated */ #include -/* Generated */ #include "ta_func.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_UTILITY_H -/* Generated */ #include "ta_utility.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #ifndef TA_MEMORY_H -/* Generated */ #include "ta_memory.h" -/* Generated */ #endif -/* Generated */ -/* Generated */ #define TA_PREFIX(x) TA_##x -/* Generated */ #define INPUT_TYPE double -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ int Core::WmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public int wmaLookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #else -/* Generated */ TA_LIB_API int TA_WMA_Lookback( int optInTimePeriod ) /* From 2 to 100000 */ -/* Generated */ -/* Generated */ #endif -/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/ -{ - /* insert local variable here */ - -/**** START GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return -1; -/* Generated */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/**** END GENCODE SECTION 2 - DO NOT DELETE THIS LINE ****/ - - /* insert lookback code here. */ - return optInTimePeriod - 1; -} - -/**** START GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -/* - * TA_WMA - Weighted Moving Average - * - * Input = double - * Output = double - * - * Optional Parameters - * ------------------- - * optInTimePeriod:(From 2 to 100000) - * Number of period - * - * - */ -/* Generated */ -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode wma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_LIB_API TA_RetCode TA_WMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const double inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/**** END GENCODE SECTION 3 - DO NOT DELETE THIS LINE ****/ -{ - /* Insert local variables here. */ - int inIdx, outIdx, i, trailingIdx, divider; - double periodSum, periodSub, tempReal, trailingValue; - int lookbackTotal; - - #if defined( USE_SINGLE_PRECISION_INPUT ) - ARRAY_MEMMOVEMIX_VAR; - #endif - -/**** START GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ -/* Generated */ /* Validate the requested output range. */ -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif /* !defined(_JAVA)*/ -/* Generated */ /* min/max are checked for optInTimePeriod. */ -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ -/* Generated */ #endif /* !defined(_JAVA) */ -/* Generated */ #endif /* TA_FUNC_NO_RANGE_CHECK */ -/* Generated */ -/**** END GENCODE SECTION 4 - DO NOT DELETE THIS LINE ****/ - - /* Insert TA function code here. */ - lookbackTotal = optInTimePeriod-1; - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); - VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* To make the rest more efficient, handle exception - * case where the user is asking for a period of '1'. - * In that case outputs equals inputs for the requested - * range. - */ - if( optInTimePeriod == 1 ) - { - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - VALUE_HANDLE_DEREF(outNBElement) = endIdx-startIdx+1; - - #if defined( USE_SINGLE_PRECISION_INPUT ) - ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); - #else - ARRAY_MEMMOVE ( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); - #endif - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); - } - - /* Calculate the divider (always an integer value). - * By induction: 1+2+3+4+'n' = n(n+1)/2 - * '>>1' is usually faster than '/2' for unsigned. - */ - divider = (optInTimePeriod*(optInTimePeriod+1))>>1; - - /* The algo used here use a very basic property of - * multiplication/addition: (x*2) = x+x - * - * As an example, a 3 period weighted can be - * interpreted in two way: - * (x1*1)+(x2*2)+(x3*3) - * OR - * x1+x2+x2+x3+x3+x3 (this is the periodSum) - * - * When you move forward in the time serie - * you can quickly adjust the periodSum for the - * period by substracting: - * x1+x2+x3 (This is the periodSub) - * Making the new periodSum equals to: - * x2+x3+x3 - * - * You can then add the new price bar - * which is x4+x4+x4 giving: - * x2+x3+x3+x4+x4+x4 - * - * At this point one iteration is completed and you can - * see that we are back to the step 1 of this example. - * - * Why making it so un-intuitive? The number of memory - * access and floating point operations are kept to a - * minimum with this algo. - */ - outIdx = 0; - trailingIdx = startIdx - lookbackTotal; - - /* Evaluate the initial periodSum/periodSub and trailingValue. */ - periodSum = periodSub = (double)0.0; - inIdx=trailingIdx; - i = 1; - while( inIdx < startIdx ) - { - tempReal = inReal[inIdx++]; - periodSub += tempReal; - periodSum += tempReal*i; - i++; - } - trailingValue = 0.0; - - /* Tight loop for the requested range. */ - while( inIdx <= endIdx ) - { - /* Add the current price bar to the sum - * who are carried through the iterations. - */ - tempReal = inReal[inIdx++]; - periodSub += tempReal; - periodSub -= trailingValue; - periodSum += tempReal*optInTimePeriod; - - /* Save the trailing value for being substract at - * the next iteration. - * (must be saved here just in case outReal and - * inReal are the same buffer). - */ - trailingValue = inReal[trailingIdx++]; - - /* Calculate the WMA for this price bar. */ - outReal[outIdx++] = periodSum / divider; - - /* Prepare the periodSum for the next iteration. */ - periodSum -= periodSub; - } - - /* Set output limits. */ - VALUE_HANDLE_DEREF(outNBElement) = outIdx; - VALUE_HANDLE_DEREF(outBegIdx) = startIdx; - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -/**** START GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ -/* Generated */ -/* Generated */ #define USE_SINGLE_PRECISION_INPUT -/* Generated */ #if !defined( _MANAGED ) && !defined( _JAVA ) -/* Generated */ #undef TA_PREFIX -/* Generated */ #define TA_PREFIX(x) TA_S_##x -/* Generated */ #endif -/* Generated */ #undef INPUT_TYPE -/* Generated */ #define INPUT_TYPE float -/* Generated */ #if defined( _MANAGED ) && defined( USE_SUBARRAY ) -/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ SubArray^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ SubArray^ outReal ) -/* Generated */ #elif defined( _MANAGED ) -/* Generated */ enum class Core::RetCode Core::Wma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ cli::array^ inReal, -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ [Out]int% outBegIdx, -/* Generated */ [Out]int% outNBElement, -/* Generated */ cli::array^ outReal ) -/* Generated */ #elif defined( _JAVA ) -/* Generated */ public RetCode wma( int startIdx, -/* Generated */ int endIdx, -/* Generated */ float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ MInteger outBegIdx, -/* Generated */ MInteger outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #else -/* Generated */ TA_RetCode TA_S_WMA( int startIdx, -/* Generated */ int endIdx, -/* Generated */ const float inReal[], -/* Generated */ int optInTimePeriod, /* From 2 to 100000 */ -/* Generated */ int *outBegIdx, -/* Generated */ int *outNBElement, -/* Generated */ double outReal[] ) -/* Generated */ #endif -/* Generated */ { -/* Generated */ int inIdx, outIdx, i, trailingIdx, divider; -/* Generated */ double periodSum, periodSub, tempReal, trailingValue; -/* Generated */ int lookbackTotal; -/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ ARRAY_MEMMOVEMIX_VAR; -/* Generated */ #endif -/* Generated */ #ifndef TA_FUNC_NO_RANGE_CHECK -/* Generated */ if( startIdx < 0 ) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex); -/* Generated */ if( (endIdx < 0) || (endIdx < startIdx)) -/* Generated */ return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !inReal ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ if( (int)optInTimePeriod == TA_INTEGER_DEFAULT ) -/* Generated */ optInTimePeriod = 30; -/* Generated */ else if( ((int)optInTimePeriod < 2) || ((int)optInTimePeriod > 100000) ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #if !defined(_JAVA) -/* Generated */ if( !outReal ) -/* Generated */ return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); -/* Generated */ #endif -/* Generated */ #endif -/* Generated */ lookbackTotal = optInTimePeriod-1; -/* Generated */ if( startIdx < lookbackTotal ) -/* Generated */ startIdx = lookbackTotal; -/* Generated */ if( startIdx > endIdx ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outBegIdx); -/* Generated */ VALUE_HANDLE_DEREF_TO_ZERO(outNBElement); -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ if( optInTimePeriod == 1 ) -/* Generated */ { -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = endIdx-startIdx+1; -/* Generated */ #if defined( USE_SINGLE_PRECISION_INPUT ) -/* Generated */ ARRAY_MEMMOVEMIX( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); -/* Generated */ #else -/* Generated */ ARRAY_MEMMOVE ( outReal, 0, inReal, startIdx, (int)VALUE_HANDLE_DEREF(outNBElement) ); -/* Generated */ #endif -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ divider = (optInTimePeriod*(optInTimePeriod+1))>>1; -/* Generated */ outIdx = 0; -/* Generated */ trailingIdx = startIdx - lookbackTotal; -/* Generated */ periodSum = periodSub = (double)0.0; -/* Generated */ inIdx=trailingIdx; -/* Generated */ i = 1; -/* Generated */ while( inIdx < startIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[inIdx++]; -/* Generated */ periodSub += tempReal; -/* Generated */ periodSum += tempReal*i; -/* Generated */ i++; -/* Generated */ } -/* Generated */ trailingValue = 0.0; -/* Generated */ while( inIdx <= endIdx ) -/* Generated */ { -/* Generated */ tempReal = inReal[inIdx++]; -/* Generated */ periodSub += tempReal; -/* Generated */ periodSub -= trailingValue; -/* Generated */ periodSum += tempReal*optInTimePeriod; -/* Generated */ trailingValue = inReal[trailingIdx++]; -/* Generated */ outReal[outIdx++] = periodSum / divider; -/* Generated */ periodSum -= periodSub; -/* Generated */ } -/* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx; -/* Generated */ VALUE_HANDLE_DEREF(outBegIdx) = startIdx; -/* Generated */ return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -/* Generated */ } -/* Generated */ -/* Generated */ #if defined( _MANAGED ) -/* Generated */ }}} // Close namespace TicTacTec.TA.Lib -/* Generated */ #endif -/**** END GENCODE SECTION 5 - DO NOT DELETE THIS LINE ****/ - diff --git a/src/ta-lib/src/ta_func/ta_utility.c b/src/ta-lib/src/ta_func/ta_utility.c deleted file mode 100644 index 7b929ef66..000000000 --- a/src/ta-lib/src/ta_func/ta_utility.c +++ /dev/null @@ -1,134 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * RM Robert Meier (talib@meierlim.com http://www.meierlim.com) - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 052603 MF Adapt code to compile with .NET Managed C++ - * 123004 RM,MF Adapt code to work with Visual Studio 2005 - * - */ - -#if defined( _MANAGED ) - #using - #include "TA-Lib-Core.h" - #include "ta_memory.h" -namespace TicTacTec { namespace TA { namespace Library { -#else - #include "ta_utility.h" - #include "ta_func.h" - #include "ta_memory.h" -#endif - -#if defined( _MANAGED ) - enum class Core::RetCode Core::SetUnstablePeriod( enum class FuncUnstId id, - unsigned int unstablePeriod ) -#else -TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id, - unsigned int unstablePeriod ) -#endif -{ - int i; - - if( id > ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll) ) - return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam); - - if( id == ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll) ) - { - for( i=0; i < (int)ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll); i++ ) - { - #if defined( _MANAGED ) - Globals->unstablePeriod[(int)i] = unstablePeriod; - #else - TA_Globals->unstablePeriod[i] = unstablePeriod; - #endif - } - } - else - { - #if defined( _MANAGED ) - Globals->unstablePeriod[(int)id] = unstablePeriod; - #else - TA_Globals->unstablePeriod[id] = unstablePeriod; - #endif - } - - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -#if defined( _MANAGED ) -unsigned int Core::GetUnstablePeriod( enum class FuncUnstId id ) -#else -unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id ) -#endif -{ - if( id >= ENUM_VALUE(FuncUnstId,TA_FUNC_UNST_ALL,FuncUnstAll) ) - return 0; - - #if defined( _MANAGED ) - return Globals->unstablePeriod[(int)id]; - #else - return TA_Globals->unstablePeriod[id]; - #endif -} - -#if defined( _MANAGED ) - enum class Core::RetCode Core::SetCompatibility( enum class Compatibility value ) -#else -TA_RetCode TA_SetCompatibility( TA_Compatibility value ) -#endif -{ - TA_GLOBALS_COMPATIBILITY = value; - return ENUM_VALUE(RetCode,TA_SUCCESS,Success); -} - -#if defined( _MANAGED ) - enum class Core::Compatibility Core::GetCompatibility( void ) -#else -TA_Compatibility TA_GetCompatibility( void ) -#endif -{ - return TA_GLOBALS_COMPATIBILITY; -} - -#if defined( _MANAGED ) -}}} // Close namespace TicTacTec::TA::Lib -#endif diff --git a/src/ta-lib/src/ta_func/ta_utility.h b/src/ta-lib/src/ta_func/ta_utility.h deleted file mode 100644 index f1a5b1c1d..000000000 --- a/src/ta-lib/src/ta_func/ta_utility.h +++ /dev/null @@ -1,362 +0,0 @@ -/* Provides common mathematical or analysis functions. - * - * These functions are all PRIVATE to ta-lib and should - * never be called directly by the library users. - */ - -#ifndef TA_UTILITY_H -#define TA_UTILITY_H - -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) - #ifndef TA_FUNC_H - #include "ta_func.h" - #endif - - #ifndef TA_GLOBAL_H - #include "ta_global.h" - #endif -#endif - -#if defined( _MANAGED ) - #ifndef NULL - #define NULL 0 - #endif -#endif - -/* Calculate a Simple Moving Average. - * This is an internal version, parameter are assumed validated. - * (startIdx and endIdx cannot be -1). - */ -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) -TA_RetCode TA_INT_SMA( int startIdx, - int endIdx, - const double *inReal, - int optInTimePeriod, - int *outBegIdx, - int *outNBElement, - double *outReal ); - -TA_RetCode TA_S_INT_SMA( int startIdx, - int endIdx, - const float *inReal, - int optInTimePeriod, - int *outBegIdx, - int *outNBElement, - double *outReal ); -#endif - -/* Calculate an Exponential Moving Average. - * This is an internal version, parameter are assumed validated. - * (startIdx and endIdx cannot be -1). - */ -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) -TA_RetCode TA_INT_EMA( int startIdx, - int endIdx, - const double *inReal, - int optInTimePeriod, - double optInK_1, - int *outBegIdx, - int *outNBElement, - double *outReal ); - -TA_RetCode TA_S_INT_EMA( int startIdx, - int endIdx, - const float *inReal, - int optInTimePeriod, - double optInK_1, - int *outBegIdx, - int *outNBElement, - double *outReal ); -#endif - -/* Calculate a MACD - * This is an internal version, parameter are assumed validated. - * (startIdx and endIdx cannot be -1). - */ -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) -TA_RetCode TA_INT_MACD( int startIdx, - int endIdx, - const double inReal[], - int optInFastPeriod, /* 0 is fix 12 */ - int optInSlowPeriod, /* 0 is fix 26 */ - int optInSignalPeriod_2, - int *outBegIdx, - int *outNBElement, - double outRealMACD_0[], - double outRealMACDSignal_1[], - double outRealMACDHist_2[] ); - -TA_RetCode TA_S_INT_MACD( int startIdx, - int endIdx, - const float inReal[], - int optInFastPeriod, /* 0 is fix 12 */ - int optInSlowPeriod, /* 0 is fix 26 */ - int optInSignalPeriod_2, - int *outBegIdx, - int *outNBElement, - double outRealMACD_0[], - double outRealMACDSignal_1[], - double outRealMACDHist_2[] ); -#endif - -/* Internal Price Oscillator function. - * - * A buffer must be provided for intermediate processing - * 'tempBuffer' must be of at least (endIdx-startIdx+1) - */ -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) -TA_RetCode TA_INT_PO( int startIdx, - int endIdx, - const double *inReal, - int optInFastPeriod, - int optInSlowPeriod, - TA_MAType optInMethod_2, - int *outBegIdx, - int *outNBElement, - double *outReal, - double *tempBuffer, - int doPercentageOutput ); - -TA_RetCode TA_S_INT_PO( int startIdx, - int endIdx, - const float *inReal, - int optInFastPeriod, - int optInSlowPeriod, - TA_MAType optInMethod_2, - int *outBegIdx, - int *outNBElement, - double *outReal, - double *tempBuffer, - int doPercentageOutput ); -#endif - -/* Internal variance function. */ -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) -TA_RetCode TA_INT_VAR( int startIdx, - int endIdx, - const double *inReal, - int optInTimePeriod, - int *outBegIdx, - int *outNBElement, - double *outReal ); - -TA_RetCode TA_S_INT_VAR( int startIdx, - int endIdx, - const float *inReal, - int optInTimePeriod, - int *outBegIdx, - int *outNBElement, - double *outReal ); -#endif - -/* A function to calculate a standard deviation. - * - * This function allows speed optimization when the - * moving average series is already calculated. - */ -#if !defined( _MANAGED ) && !defined( _JAVA ) && !defined( _RUST ) -void TA_INT_stddev_using_precalc_ma( const double *inReal, - const double *inMovAvg, - int inMovAvgBegIdx, - int inMovAvgNbElement, - int timePeriod, - double *output ); - -void TA_S_INT_stddev_using_precalc_ma( const float *inReal, - const double *inMovAvg, - int inMovAvgBegIdx, - int inMovAvgNbElement, - int timePeriod, - double *output ); -#endif - - /* Provides an equivalent to standard "math.h" functions. */ -#if defined( _MANAGED ) - #define std_floor Math::Floor - #define std_ceil Math::Ceiling - #define std_fabs Math::Abs - #define std_atan Math::Atan - #define std_cos Math::Cos - #define std_sin Math::Sin - #define std_sqrt Math::Sqrt - #define std_tanh Math::Tanh - #define std_tan Math::Tan - #define std_sinh Math::Sinh - #define std_log10 Math::Log10 - #define std_log Math::Log - #define std_exp Math::Exp - #define std_cosh Math::Cosh - #define std_asin Math::Asin - #define std_acos Math::Acos -#elif defined( _JAVA ) || defined( _RUST ) - #define std_floor Math.floor - #define std_ceil Math.ceil - #define std_fabs Math.abs - #define std_atan Math.atan - #define std_cos Math.cos - #define std_sin Math.sin - #define std_sqrt Math.sqrt - #define std_tanh Math.tanh - #define std_tan Math.tan - #define std_sinh Math.sinh - #define std_log10 Math.log10 - #define std_log Math.log - #define std_exp Math.exp - #define std_cosh Math.cosh - #define std_asin Math.asin - #define std_acos Math.acos -#else - #define std_floor floor - #define std_ceil ceil - #define std_fabs fabs - #define std_atan atan - #define std_cos cos - #define std_sin sin - #define std_sqrt sqrt - #define std_tanh tanh - #define std_tan tan - #define std_sinh sinh - #define std_log10 log10 - #define std_log log - #define std_exp exp - #define std_cosh cosh - #define std_asin asin - #define std_acos acos -#endif - -/* Rounding macro for doubles. Works only with positive numbers. */ -#define round_pos(x) (std_floor((x)+0.5)) - -/* Rounding macro for doubles. Works only with negative numbers. */ -#define round_neg(x) (std_ceil((x)-0.5)) - -/* Rounding with a precision of 2 digit after the dot */ -#define round_pos_2(x) ((std_floor((x*100.0)+0.5))/100.0) -#define round_neg_2(x) ((std_ceil((x*100.0)-0.5))/100.0) - -/* In the context of TA-Lib, floating point are often - * compared within an acceptable error range. - * - * As an example,a TA oscillator ranging from 0 to 100 can - * fairly be considered equal if their difference is less - * than 0.000001. - * - * Ranging around zero also allows to work around limit - * cases where floating point minimal step (EPSILON) causes - * unexpected cummulative effect (ending with "negative zero" - * being one example). - * - * FLT_EPSILON == 1.192092896e-07 for float type on intel with msvc. - * DBL_EPSILON == 2.2204460492503131e-016 for the double type. - * - * Warning: These macro are not intended as "general purpose" floating - * point comparison. TA_REAL_EQ is not even transitive. The "ep" parameter - * must be carefully choosen to work in the domain of the tested values. - * Do a search on Google for a more generalize algo. - */ -#define TA_EPSILON (0.00000000000001) -#define TA_REAL_EQ(x,v,ep) (((v-ep) (b)) ? (a) : (b)) -#endif - -/* Candlestick macros (used by candlestick functions, where the parameters are always called inClose, inOpen, etc. - * Don't use i++ or func(i) with these macros ! - */ - -#define TA_REALBODY(IDX) ( std_fabs( inClose[IDX] - inOpen[IDX] ) ) -#define TA_UPPERSHADOW(IDX) ( inHigh[IDX] - ( inClose[IDX] >= inOpen[IDX] ? inClose[IDX] : inOpen[IDX] ) ) -#define TA_LOWERSHADOW(IDX) ( ( inClose[IDX] >= inOpen[IDX] ? inOpen[IDX] : inClose[IDX] ) - inLow[IDX] ) -#define TA_HIGHLOWRANGE(IDX) ( inHigh[IDX] - inLow[IDX] ) -#define TA_CANDLECOLOR(IDX) ( inClose[IDX] >= inOpen[IDX] ? 1 : -1 ) - -#if defined( _MANAGED ) - #define TA_CANDLERANGETYPE(SET) (Globals->candleSettings[(int)CandleSettingType::SET]->rangeType) - #define TA_CANDLEAVGPERIOD(SET) (Globals->candleSettings[(int)CandleSettingType::SET]->avgPeriod) - #define TA_CANDLEFACTOR(SET) (Globals->candleSettings[(int)CandleSettingType::SET]->factor) -#elif defined( _JAVA ) || defined( _RUST ) - #define TA_CANDLERANGETYPE(SET) (this.candleSettings[CandleSettingType.SET.ordinal()].rangeType) - #define TA_CANDLEAVGPERIOD(SET) (this.candleSettings[CandleSettingType.SET.ordinal()].avgPeriod) - #define TA_CANDLEFACTOR(SET) (this.candleSettings[CandleSettingType.SET.ordinal()].factor) -#else - #define TA_CANDLERANGETYPE(SET) (TA_Globals->candleSettings[TA_##SET].rangeType) - #define TA_CANDLEAVGPERIOD(SET) (TA_Globals->candleSettings[TA_##SET].avgPeriod) - #define TA_CANDLEFACTOR(SET) (TA_Globals->candleSettings[TA_##SET].factor) -#endif - -#define TA_CANDLERANGE(SET,IDX) \ - ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_RealBody,RealBody) ? TA_REALBODY(IDX) : \ - ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_HighLow,HighLow) ? TA_HIGHLOWRANGE(IDX) : \ - ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_Shadows,Shadows) ? TA_UPPERSHADOW(IDX) + TA_LOWERSHADOW(IDX) : \ - 0 ) ) ) -#define TA_CANDLEAVERAGE(SET,SUM,IDX) \ - ( TA_CANDLEFACTOR(SET) \ - * ( TA_CANDLEAVGPERIOD(SET) != 0.0? SUM / TA_CANDLEAVGPERIOD(SET) : TA_CANDLERANGE(SET,IDX) ) \ - / ( TA_CANDLERANGETYPE(SET) == ENUM_VALUE(RangeType,TA_RangeType_Shadows,Shadows) ? 2.0 : 1.0 ) \ - ) -#define TA_REALBODYGAPUP(IDX2,IDX1) ( min(inOpen[IDX2],inClose[IDX2]) > max(inOpen[IDX1],inClose[IDX1]) ) -#define TA_REALBODYGAPDOWN(IDX2,IDX1) ( max(inOpen[IDX2],inClose[IDX2]) < min(inOpen[IDX1],inClose[IDX1]) ) -#define TA_CANDLEGAPUP(IDX2,IDX1) ( inLow[IDX2] > inHigh[IDX1] ) -#define TA_CANDLEGAPDOWN(IDX2,IDX1) ( inHigh[IDX2] < inLow[IDX1] ) - -#endif diff --git a/src/ta-lib/src/tools/Makefile.am b/src/ta-lib/src/tools/Makefile.am deleted file mode 100644 index e3bfc9182..000000000 --- a/src/ta-lib/src/tools/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -AUTOMAKE_OPTIONS = foreign 1.4 -SUBDIRS = gen_code ta_regtest diff --git a/src/ta-lib/src/tools/gen_code/Makefile.am b/src/ta-lib/src/tools/gen_code/Makefile.am deleted file mode 100644 index 88be49e78..000000000 --- a/src/ta-lib/src/tools/gen_code/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ - -# gen_code should not be installed. -noinst_PROGRAMS = gen_code - -gen_code_SOURCES = gen_code.c - -gen_code_CPPFLAGS = -I../../ta_common -gen_code_LDFLAGS = -no-undefined -gen_code_LDADD = \ - ../../ta_common/libta_common.la \ - ../../ta_abstract/libta_abstract_gc.la \ - ../../ta_func/libta_func.la \ - $(LIBM) - -all-local: gen_code - $(LIBTOOL) --mode=execute ../post-build-bin.sh gen_code diff --git a/src/ta-lib/src/tools/gen_code/gen_code.c b/src/ta-lib/src/tools/gen_code/gen_code.c deleted file mode 100644 index 445278fd3..000000000 --- a/src/ta-lib/src/tools/gen_code/gen_code.c +++ /dev/null @@ -1,5005 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier (mfortier@ta-lib.org) - * ST Steve Thames (steve@softlife.com) - * AC Angelo Ciceri - * RM Robert Meier (talib@meierlim.com) - * CM Craig Miller (c-miller@users.sourceforge.net) - * RG Richard Gomes - * AB Anatol Belski (ab@php.net) - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 052403 MF Many modifications related to generate code that works - * with the windows .NET Managed C++ compiler. - * 092103 MF Now touch files only when there is really a change. - * 101303 MF Remove underscore from names. - * 020804 MF,ST Fixes to make it work on Linux (Bug#873879). - * 022904 MF Add TA_GetLookback - * 030604 MF Add generation of "ta_func.swg" - * 082004 AC Add generation of candlestick functions declaration - * 010405 RM Change createProjTemplate to work with VS03 and VS05 - * 031805 MF Add generation of MSVC project file. - * 061805 MF Changes related to .NET verifiable code. - * 062505 MF Fix 'out' attribute for .NET verifiable code. - * 121705 MF Complete Java port. - * 012806 MF Add call to Java post-processing. - * 093006 MF Add code generation for TA_FunctionDescription - * 110206 AC Change volume and open interest to double - * 120106 MF Add generation of java_defs.h - * 122406 MF Add generation of Makefile.am - * 011707 CM Add ta_pragma.h handles VC8 warnings, type conversion of strlen handles VC warning - * 021807 MF Add generation of VS2005 project file - * 040107 MF,RG Add generation of CoreAnnotated.java - * 091307 MF Add generation of Intel C++ compiler project file (TA-Lib Pro only) - * 052508 MF Add generation of VS2008 project file - * 061608 MF Add code to preserve proprietary code marker for TA-Lib pro. - * 071808 MF Add generation for Add-Ins express product (TA-Lib Pro only). - * 082712 AB Implemented java code generation on linux. - * 110724 MF Removed all TA-Lib Pro specific code. - * 110824 MF Removed VS2005 and VS2008 project file generation. - */ - -/* Description: - * Generates/maintains a lot of files. Run "gen_code ?" to - * get the complete list. - * - * The generator use as input the interface defined - * from static data in the TA-Abstract module. - * (Look for the 'table_x.c' files) - * - * This utility is intended only for TA-Lib maintainers, not - * the library users. - * - * Note: All directory in this code is relative to the 'bin' - * directory. You must run "gen_code" from ta-lib/bin. - * - */ -#include "ta_pragma.h" /* this must be the first inclusion */ -#include -#include -#include -#include -#include -#include - -// Comment-out these to reduce processing time (useful for devs) -#define ENABLE_JAVA -#define ENABLE_C -#define ENABLE_DOTNET -#define ENABLE_RUST - -// Comment to genereate all functions. -#define RUST_SINGLE_FUNC "MULT" - -#if !defined(__WIN32__) && !defined(__MSDOS__) && !defined(WIN32) - #include -#endif - -#if defined (WIN32) - #include - #include // _getcwd -#endif - -#include "ta_common.h" -#include "ta_abstract.h" -#include "ta_memory.h" - -#if defined(__WIN32__) || defined(WIN32) - #define PATH_SEPARATOR "\\" -const char *gmcpp_exec = "..\\src\\tools\\gen_code\\mcpp.exe"; -#else -#include -#define PATH_SEPARATOR "/" -const char *gmcpp_exec = "/usr/bin/mcpp"; -#endif - -int gmcpp_installed = 0; // 0 = mcpp not installed, 1 = verified installed - -void run_command(const char *command, char *output, size_t output_size) -{ - FILE *fp; -#if defined(_WIN32) || defined(_WIN64) - fp = _popen(command, "r"); -#else - fp = popen(command, "r"); -#endif - if (fp == NULL) { - fprintf(stderr, "Failed to run command: %s\n", command); - exit(1); - } - if (fgets(output, output_size, fp) == NULL) { - fprintf(stderr, "Failed to read command output: %s\n", command); -#if defined(_WIN32) || defined(_WIN64) - _pclose(fp); -#else - pclose(fp); -#endif - exit(1); - } -#if defined(_WIN32) || defined(_WIN64) - _pclose(fp); -#else - pclose(fp); -#endif - // Remove trailing newline character - output[strcspn(output, "\n")] = '\0'; -} - -const char* verify_git_repo() { - static char root_dir[1024]; - char output[1024]; - - // Check if Git is installed - run_command("git --version", output, sizeof(output)); - - // Check if the current directory is inside a Git work tree - run_command("git rev-parse --is-inside-work-tree", output, sizeof(output)); - if (strcmp(output, "true") != 0) { - fprintf(stderr, "Must run this script while the current directory is in a TA-Lib Git repository.\n"); - exit(1); - } - - // Get the root directory of the Git repository - run_command("git rev-parse --show-toplevel", root_dir, sizeof(root_dir)); - - // Change to the root directory of the Git repository for validation. -#if defined(_WIN32) || defined(_WIN64) - if (_chdir(root_dir) != 0) { -#else - if (chdir(root_dir) != 0) { -#endif - perror("_chdir"); - exit(1); - } - - // Sanity check that src/ta_func exists -#if defined(_WIN32) || defined(_WIN64) - if (_access("./src/ta_func", 0) != 0) { -#else - if (access("./src/ta_func", F_OK) != 0) { -#endif - fprintf(stderr, "Current directory is not a TA-Lib Git repository (src/ta_func missing).\n"); - exit(1); - } - - return root_dir; -} - -static char *ta_fs_path(int count, ...) { - char *path = (char *)malloc(16000); /* XXX quick and dirty */ - char *p; - va_list argp; - int j; - - va_start(argp, count); - - p = path; - for (j = 0; j < count; j++) { - int i; - char *part; - - part = va_arg(argp, char *); - i = strlen(part); - - memmove(p, part, i); - p += i; - - memmove(p, PATH_SEPARATOR, 1); - p++; - } - *--p = '\0'; - - va_end(argp); - - return path; -} - - -#define BUFFER_SIZE 16000 - -#define FILE_WRITE 0 -#define WRITE_ON_CHANGE_ONLY 0 - -#define FILE_READ 0x00000001 -#define WRITE_ALWAYS 0x00000002 - -#ifndef min - #define min(a, b) (((a) < (b)) ? (a) : (b)) -#endif - -#ifndef max - #define max(a, b) (((a) > (b)) ? (a) : (b)) -#endif - -typedef struct -{ - FILE *file; - FILE *fileTarget; - FILE *templateFile; - char f1_name[BUFFER_SIZE]; - char f2_name[BUFFER_SIZE]; - - int flags; -} FileHandle; - -FileHandle *gOutFunc_H = NULL; /* For "ta_func.h" */ -FileHandle *gOutFrame_H = NULL; /* For "ta_frame.h" */ -FileHandle *gOutFrame_C = NULL; /* For "ta_frame.c" */ -FileHandle *gOutGroupIdx_C = NULL; /* For "ta_group_idx.c" */ -FileHandle *gOutFunc_C = NULL; /* For "ta_x.c" where 'x' is TA function name. */ -FileHandle *gOutRetCode_C = NULL; /* For "ta_retcode.c" */ -FileHandle *gOutRetCode_CSV = NULL; /* For "ta_retcode.csv" */ -FileHandle *gOutFuncList_TXT = NULL; /* For "ta_func_list.txt" */ -FileHandle *gOutDefs_H = NULL; /* For "ta_defs.h" */ -FileHandle *gOutFunc_SWG = NULL; /* For SWIG */ -FileHandle *gOutFunc_XML = NULL; /* For "ta_func_api.xml" */ -FileHandle *gOutFuncAPI_C = NULL; /* For "ta_func_api.c" */ -FileHandle *gOutMakefile_AM = NULL; /* For "Makefile.am" */ - -FileHandle *gOutCore_Java = NULL; /* For Core.Java */ -FileHandle *gOutJavaDefs_H = NULL; /* For "java_defs.h" */ -FileHandle *gOutFunc_Annotation = NULL; /* For "CoreAnnotated.java" */ - -#ifdef _MSC_VER -/* The following files are generated only on Windows platform. */ -FileHandle *gOutDotNet_H = NULL; /* For .NET interface file */ -FileHandle *gOutProjFile = NULL; /* For .NET project file */ -FileHandle *gOutMSVCProjFile = NULL; /* For MSVC project file */ -#endif - -static void create_dirs( void ); -static void create_dir_recursively( const char *dir ); - -static void writeRustMod( void ); -static void genRustCodePhase2( const TA_FuncInfo *funcInfo ); - -static void genJavaCodePhase1( const TA_FuncInfo *funcInfo ); -static void genJavaCodePhase2( const TA_FuncInfo *funcInfo ); - -/* To generate CoreAnnotated.java */ -static void printJavaFunctionAnnotation(const TA_FuncInfo *funcInfo); - - -typedef void (*TA_ForEachGroup)( const char *groupName, - unsigned int index, - unsigned int isFirst, /* Boolean */ - unsigned int isLast /* Boolean */ - ); - -static unsigned int forEachGroup( TA_ForEachGroup forEachGroupfunc, - void *opaqueData ); - -static void doForEachFunctionPhase1( const TA_FuncInfo *funcInfo, - void *opaqueData ); - -static void doForEachFunctionPhase2( const TA_FuncInfo *funcInfo, - void *opaqueData ); - -static void doForEachFunctionXml( const TA_FuncInfo *funcInfo, - void *opaqueData ); - -static void doForEachUnstableFunction( const TA_FuncInfo *funcInfo, - void *opaqueData ); - -static void doDefsFile( void ); - -static int gen_retcode( void ); - -static void printIndent( FILE *out, unsigned int indent ); - -typedef struct { - FILE *out; - const char *prefix; - const TA_FuncInfo *funcInfo; - unsigned int lookbackSignature; - unsigned int validationCode; - unsigned int lookbackValidationCode; -} PrintFuncParamStruct; - -static void printRustFunc(const PrintFuncParamStruct *printFuncParamStruct); -static void printRustLookbackFunction(const PrintFuncParamStruct *printFuncParamStruct); -static void printRustDoublePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct); -static void printRustSinglePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct); - -static void printFunc(FILE *out, - const char *prefix, /* Can be NULL */ - const TA_FuncInfo *funcInfo, - unsigned int prototype, /* Boolean */ - unsigned int frame, /* Boolean */ - unsigned int semiColonNeeded, /* Boolean */ - unsigned int validationCode, /* Boolean */ - unsigned int lookbackSignature, /* Boolean */ - unsigned int managedCPPCode, /* Boolean */ - unsigned int managedCPPDeclaration, /* Boolean */ - unsigned int inputIsSinglePrecision, /* Boolean */ - unsigned int outputForSWIG, /* Boolean */ - unsigned int outputForJava, /* Boolean */ - unsigned int lookbackValidationCode, /* Boolean */ - unsigned int useSubArrayObject, /* Boolean */ - unsigned int arrayToSubArrayCnvt, /* Boolean */ - unsigned int outputForRust /* Boolean */ -); - -static void printCallFrame ( FILE *out, const TA_FuncInfo *funcInfo ); -static void printFrameHeader( FILE *out, const TA_FuncInfo *funcInfo, unsigned int lookbackSignature ); - -static void printExternReferenceForEachFunction( const TA_FuncInfo *info, - void *opaqueData ); - -static void printFunctionAddress( const TA_FuncInfo *info, - void *opaqueData ); - -static void printPerGroupList( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ); - -static void printGroupListAddress( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ); -static void printGroupSize( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ); -static void printGroupSizeAddition( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ); - -static int addUnstablePeriodEnum( FILE *out ); - -static int createTemplate( FileHandle *in, FileHandle *out ); - -static int generateFuncAPI_C( void ); - -#ifdef _MSC_VER -static int createProjTemplate( FileHandle *in, FileHandle *out ); -static int createMSVCProjTemplate( FileHandle *in, FileHandle *out ); -#endif - -static void writeFuncFile( const TA_FuncInfo *funcInfo ); -static void doFuncFile( const TA_FuncInfo *funcInfo ); -static void printOptInputValidation( FILE *out, - const char *name, - const TA_OptInputParameterInfo *optInputParamInfo, - int lookbackValidationCode /* Boolean */ ); -static int skipToGenCode( const char *dstName, FILE *out, FILE *templateFile ); -static void printDefines( FILE *out, const TA_FuncInfo *funcInfo ); - -static void printFuncHeaderDoc( FILE *out, - const TA_FuncInfo *funcInfo, - const char *prefix ); - - -static void extractTALogic( FILE *inFile, FILE *outFile ); - -static void cnvtToUpperCase( char *str ); -static void cnvtChar( char *str, char from, char to ); -static char *trimWhitespace( char *str ); - -/* Return 1 on success */ -static int copyFile( const char *src, const char *dest ); - -/* Return 1 when identical */ -static int areFileSame( const char *file1, const char *file2 ); - -static void fileDelete( const char *fileToDelete ); - -static void appendToFunc( FILE *out ); - -static void convertFileToCArray( FILE *in, FILE *out ); - -static void ReplaceReservedXmlCharacters(const char *input, char *output ); - -char gToOpen[BUFFER_SIZE]; -char gTempBuf[BUFFER_SIZE]; -char gTempBuf2[BUFFER_SIZE]; -char gTempBuf3[BUFFER_SIZE]; -char gTempBufForPrint[BUFFER_SIZE]; -char gTempDoubleToStr[200]; - -/* Because Microsoft and Borland does not display - * the value of a double in the same way (%e), this - * function attempts to eliminate difference. This - * is done to avoid annoying difference with CVS. - */ -const char *doubleToStr( double value ); - -const char *gCurrentGroupName; - -static int genCode(int argc, char* argv[]); - -extern const TA_OptInputParameterInfo TA_DEF_UI_MA_Method; - -/* Set this variable to 1 whenever you wish to output a - * prefix to all generated line. - */ -int genPrefix = 0; - -void print( FILE *out, const char *text, ... ) -{ - va_list arglist; - memset(gTempBufForPrint,0,sizeof(gTempBufForPrint)); - - va_start(arglist,text); - vsprintf(gTempBufForPrint,text,arglist); - va_end(arglist); - - if( strlen(gTempBufForPrint) >= BUFFER_SIZE-strlen("/* Generated */ ") ) - { - printf( "Lines length exceed internal buffers (%lu,%lu)\n", - (unsigned long)strlen(gTempBufForPrint), - (unsigned long)(BUFFER_SIZE-strlen("/* Generated */ ")) ); - exit(-1); - } - if( genPrefix ) - fprintf( out, "/* Generated */ %s", gTempBufForPrint ); - else - fprintf( out, "%s", gTempBufForPrint ); -} - -static void printIndent( FILE *out, unsigned int indent ) -{ - unsigned int i; - - if( genPrefix ) - fprintf( out, "/* Generated */ " ); - - for( i=0; i < indent; i++ ) - { - fprintf( out, " " ); - } -} - - -int main(int argc, char* argv[]) -{ - int retValue; - TA_RetCode retCode; - - if( argc > 1 ) - { - /* There is no parameter needed for this tool. */ - printf( "\n" ); - printf( "gen_code V%s - Updates TA-Lib source and docs files\n", TA_GetVersionString() ); - printf( "\n" ); - printf( "Usage: gen_code\n"); - printf( "\n" ); - printf( " No parameter needed.\n" ); - printf( "\n** Must be run from a directory within a ta-lib repos\n" ); - printf( "\n" ); - printf( " This utility is only for developers maintaining TA-Lib itself.\n" ); - printf( "\n" ); - printf( " The interface definitions in src/ta_abstract/tables are used\n" ); - printf( " as an input that specify which function to generate.\n" ); - printf( "\n" ); - printf( " The following files are created or updated:\n" ); - printf( " - ta-lib/include/ta_func.h\n" ); - printf( " - ta-lib/include/ta_defs.h\n" ); - printf( " - ta-lib/ta_func_list.txt\n" ); - printf( " - ta-lib/src/ta_common/ta_retcode.*\n" ); - printf( " - ta-lib/src/ta_abstract/ta_group_idx.c\n"); - printf( " - ta-lib/src/ta_abstract/frames/*.*\n"); - printf( " - ta-lib/swig/src/interface/ta_func.swg\n" ); - printf( " - ta-lib/dotnet/src/Core/TA-Lib-Core.vcproj (Win32 only)\n" ); - printf( " - ta-lib/dotnet/src/Core/TA-Lib-Core.h (Win32 only)\n" ); - printf( " - ta-lib/src/ta_abstract/java_defs.h (Win32 only)\n" ); - printf( " - ta-lib/ide/msvc/lib_proj/ta_func/ta_func.dsp (Win32 only)\n" ); - printf( " - ta-lib/java/src/com/tictactec/ta/lib/Core.java\n" ); - printf( " - ta-lib/java/src/com/tictactec/ta/lib/CoreAnnotated.java\n" ); - printf( " - ta-lib/ta_func_api.xml\n" ); - printf( " - ta-lib/src/ta_abstract/ta_func_api.c\n" ); - printf( " ... and more ..."); - printf( "\n" ); - printf( " The functions signature, params and validation code\n" ); - printf( " for all functions under src/ta_func are also updated.\n" ); - printf( "\n" ); - exit(-1); - } - - const char *root_dir = verify_git_repo(); - - // gen_code expect execution from root_dir/bin. - char bin_dir[1024]; - snprintf(bin_dir, sizeof(bin_dir), "%s%sbin", root_dir, PATH_SEPARATOR); -#if defined(_WIN32) || defined(_WIN64) - if (_chdir(bin_dir) != 0) { -#else - if (chdir(bin_dir) != 0) { -#endif - perror("chdir to bin"); - exit(1); -} - - printf( "gen_code V%s\n", TA_GetVersionString() ); - - // Show the path being used (to help debugging) - char temp_buffer[1024]; - char* cwd; - -#if defined(_WIN32) || defined(_WIN64) - cwd = _getcwd(temp_buffer, sizeof(temp_buffer)); -#else - cwd = getcwd(temp_buffer, sizeof(temp_buffer)); -#endif - if (cwd) { - printf("Executing from [%s]\n", cwd); - } else { - perror("getcwd() error"); - return 1; - } - - create_dirs(); - - // Detect if mcpp is installed. - gmcpp_installed = 0; - #if defined(ENABLE_RUST) - #if defined(_WIN32) - // TODO - gmcpp_installed = 1; - #else - gmcpp_installed = (system("which mcpp >/dev/null 2>&1") == 0); - run_command("which mcpp", temp_buffer, sizeof(temp_buffer)); - if (temp_buffer[0] != '\0') { - gmcpp_exec = temp_buffer; - printf("mcpp found at %s\n", gmcpp_exec); - } - #endif - #endif - - retCode = TA_Initialize(); - if( retCode != TA_SUCCESS ) - { - printf( "\nCannot initialize the library\n"); - return -1; - } - - printf( "Now updating source code...\n" ); - - retValue = genCode( argc, argv ); - - retCode = TA_Shutdown(); - if( retCode != TA_SUCCESS ) - { - printf( "Shutdown failed (%d)\n", retCode ); - } - - #if defined(ENABLE_RUST) - if( gmcpp_installed == 0 ) - { - printf( "\nWarning: mcpp is not installed. Rust code generation skipped.\n" ); - printf("To install do 'sudo apt install mcpp' or 'brew install mcpp'.\n"); - } - #endif - - return retValue; -} - - -/* The following I/O function facilitate file modifications. - * - * When opening the file, specifiy a path relative to ta-lib/bin. - * - * 'templateFile' is the source to create a new file. - * This template must contain one '%%%GENCODE%%%' token. - * - * All characters before the token are written to the output - * on fileOpen, and all characters after the token are - * appended on fileClose. - * - * 'templateFile' is ignored when FILE_READ is specified. - * - * Another advantage to use fileOpen/fileClose is the writing - * is first done in a temporary file and the target file - * is touch only if there was actually a modification. - * - * On failure, simply exit. - */ -static void init_gToOpen( const char *filePath, const char *suffix ) -{ - strcpy( gToOpen, filePath ); - if( suffix ) - strcat( gToOpen, suffix ); -} - - -static FileHandle *fileOpen( const char *fileToOpen, - const char *templateFile, - int flags ) -{ - FileHandle *retValue; - - if( (fileToOpen == NULL) || - ((flags&FILE_READ) && (templateFile != NULL)) ) - { - printf( "Internal error line %d", __LINE__ ); - return (FileHandle *)NULL; - } - - retValue = TA_Malloc( sizeof(FileHandle) ); - if( !retValue ) - { - printf( "Memory alloc error line %d", __LINE__ ); - return (FileHandle *)NULL; - } - - memset( retValue, 0, sizeof(FileHandle) ); - - retValue->flags = flags; - - init_gToOpen( fileToOpen, NULL ); - strcpy( retValue->f1_name, gToOpen ); - - /* First let's try to open the file. Might fail when - * for writing but that is ok. (the file might not exist). - */ - if( flags&FILE_READ ) - { - retValue->file = fopen( gToOpen, "r" ); - if( retValue->file == NULL ) - { - memset( retValue, 0, sizeof(FileHandle) ); - TA_Free( retValue ); - return (FileHandle *)NULL; - } - } - else if( flags&WRITE_ALWAYS ) - { - retValue->file = fopen( gToOpen, "w" ); - if( retValue->file == NULL ) - { - memset( retValue, 0, sizeof(FileHandle) ); - TA_Free( retValue ); - return (FileHandle *)NULL; - } - } - else - { - retValue->file = fopen( gToOpen, "r" ); - - if( retValue->file ) - { - /* Move pointer to fileTarget. The file - * ptr will become the temporary file who - * is going to be truly write enabled. - */ - retValue->fileTarget = retValue->file; - init_gToOpen( fileToOpen, ".tmp" ); - strcpy( retValue->f2_name, gToOpen ); - retValue->file = fopen( gToOpen, "w" ); - if( !retValue->file ) - { - fclose( retValue->fileTarget ); - memset( retValue, 0, sizeof(FileHandle) ); - TA_Free( retValue ); - return (FileHandle *)NULL; - } - } - else - { - /* File does not exist, directly open for write - * no temporary will be used. - */ - retValue->fileTarget = NULL; - retValue->file = fopen( gToOpen, "w" ); - - if( retValue->file == NULL ) - { - memset( retValue, 0, sizeof(FileHandle) ); - TA_Free( retValue ); - return (FileHandle *)NULL; - } - } - } - - if( !(flags&FILE_READ) ) - { - /* Handle the template. */ - if( templateFile ) - { - init_gToOpen( templateFile, NULL ); - retValue->templateFile = fopen( gToOpen, "r" ); - if( retValue->templateFile == NULL ) - { - if(retValue->fileTarget) fclose( retValue->fileTarget ); - if(retValue->file) fclose( retValue->file ); - if(retValue->templateFile) fclose( retValue->templateFile ); - memset( retValue, 0, sizeof(FileHandle) ); - TA_Free( retValue ); - printf( "\nCannot open template [%s]\n", gToOpen ); - return (FileHandle *)NULL; - } - - /* Copy the header part of the template. */ - if( skipToGenCode( fileToOpen, retValue->file, retValue->templateFile ) != 0 ) - { - if(retValue->fileTarget) fclose( retValue->fileTarget ); - if(retValue->file) fclose( retValue->file ); - if(retValue->templateFile) fclose( retValue->templateFile ); - memset( retValue, 0, sizeof(FileHandle) ); - TA_Free( retValue ); - return (FileHandle *)NULL; - } - } - } - - return retValue; -} - -static void fileClose( FileHandle *handle ) -{ - if( !handle ) return; - - /* Write remaining template info. */ - if( handle->templateFile && handle->file ) - { - while( fgets( gTempBuf, BUFFER_SIZE, handle->templateFile ) != NULL ) - { - if( fputs( gTempBuf, handle->file ) == EOF ) - { - printf( "Cannot write to output file! Disk Full? " ); - break; - } - } - - #if 0 - /* Make sure the last line of the output - * finish with a carriage return. This may - * avoid warning from some compilers. - */ - if( gTempBuf[0] != '\n' ) - { - fprintf( handle->file, "\n" ); - } - #endif - } - - if(handle->fileTarget) fclose( handle->fileTarget ); - if(handle->templateFile) fclose( handle->templateFile ); - if(handle->file) fclose( handle->file ); - - if( !(handle->flags&FILE_READ) && !(handle->flags&WRITE_ALWAYS) && (handle->fileTarget != NULL)) - { - if( !areFileSame( handle->f1_name, handle->f2_name ) ) - copyFile( handle->f2_name, handle->f1_name ); - - fileDelete( handle->f2_name ); - } - - memset( handle, 0, sizeof(FileHandle) ); - TA_Free( handle ); -} - -static void fileDelete( const char *fileToDelete ) -{ - if (!fileToDelete) return; - - init_gToOpen( fileToDelete, NULL ); - - #if defined (WIN32) - DeleteFile (fileToDelete); - #else - unlink (fileToDelete); - #endif -} - -static int genCode(int argc, char* argv[]) -{ - TA_RetCode retCode; - unsigned int nbGroup; - FileHandle *tempFile; - - FileHandle *tempFileOut; - - (void)argc; /* Get ride of compiler warning */ - (void)argv; - int ret; - - #ifdef _MSC_VER - /* Create .NET project files template */ - #define FILE_NET_PROJ ta_fs_path(5, "..", "dotnet", "src", "Core", "TA-Lib-Core.vcproj") - #define FILE_NET_PROJ_TMP ta_fs_path(3, "..", "temp", "dotnetproj.tmp") - gOutProjFile = fileOpen( FILE_NET_PROJ, NULL, FILE_READ ); - if( gOutProjFile == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - tempFile = fileOpen( FILE_NET_PROJ_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); - if( tempFile == NULL ) - { - printf( "Cannot create temporary .NET project file!\n" ); - return -1; - } - if( createProjTemplate( gOutProjFile, tempFile ) != 0 ) - { - printf( "Failed to parse and write the temporary .NET project file!\n" ); - return -1; - } - fileClose(gOutProjFile); - fileClose(tempFile); - - /* Create MSVC project files template */ - #define FILE_MSVC_PROJ ta_fs_path(6, "..", "ide", "msvc", "lib_proj", "ta_func", "ta_func.dsp") - #define FILE_MSVC_PROJ_TMP ta_fs_path(3, "..", "temp", "ta_func_dsp.tmp") - gOutMSVCProjFile = fileOpen( FILE_MSVC_PROJ, NULL, FILE_READ ); - if( gOutMSVCProjFile == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - tempFile = fileOpen( FILE_MSVC_PROJ_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); - if( tempFile == NULL ) - { - printf( "Cannot create temporary MSVC project file!\n" ); - return -1; - } - if( createMSVCProjTemplate( gOutMSVCProjFile, tempFile ) != 0 ) - { - printf( "Failed to parse and write the temporary MSVC project file!\n" ); - return -1; - } - fileClose(gOutMSVCProjFile); - fileClose(tempFile); - #endif - - - // Verify if javac executeable is installed, if not, just skip the java code generation. - #define FILE_CORE_JAVA ta_fs_path(8, "..", "java", "src", "com", "tictactec", "ta", "lib", "Core.java") - #define FILE_CORE_JAVA_TMP ta_fs_path(3, "..", "temp", "CoreJava.tmp") - #define FILE_CORE_JAVA_UNF ta_fs_path(3, "..", "temp", "CoreJavaUnformated.tmp") - - int javac_installed = 0; - #if defined(ENABLE_JAVA) - #if defined(_WIN32) - javac_installed = (system("javac -version >nul 2>&1") == 0); - #else - javac_installed = (system("javac -version >/dev/null 2>&1") == 0); - #endif - - if( !javac_installed) { - printf("warning: 'javac' not installed. Skipping Java code update\n"); - gOutCore_Java = NULL; - } else { - /* Create Java template for Core.java */ - gOutCore_Java = fileOpen( FILE_CORE_JAVA, NULL, FILE_READ ); - if( gOutCore_Java == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - tempFile = fileOpen( FILE_CORE_JAVA_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); - if( tempFile == NULL ) - { - printf( "Cannot create temporary Core.java project file!\n" ); - return -1; - } - if( createTemplate( gOutCore_Java, tempFile ) != 0 ) - { - printf( "Failed to parse and write the temporary Core.java project file!\n" ); - return -1; - } - fileClose(gOutCore_Java); - fileClose(tempFile); - } - #endif - - #if defined(ENABLE_DOTNET) - /* Create the .NET interface file template */ - #ifdef _MSC_VER - #define FILE_NET_HEADER ta_fs_path(5, "..", "dotnet", "src", "Core", "TA-Lib-Core.h") - #define FILE_NET_HEADER_TMP ta_fs_path(3, "..", "temp", "dotneth.tmp") - gOutDotNet_H = fileOpen( FILE_NET_HEADER, NULL, FILE_READ ); - if( gOutDotNet_H == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - tempFile = fileOpen( FILE_NET_HEADER_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); - if( tempFile == NULL ) - { - printf( "Cannot create temporary .NET header file!\n" ); - return -1; - } - if( createTemplate( gOutDotNet_H, tempFile ) != 0 ) - { - printf( "Failed to parse and write the temporary .NET header file!\n" ); - return -1; - } - fileClose(gOutDotNet_H); - fileClose(tempFile); - #endif - #endif - - #if defined(ENABLE_C) - /* Create ta_retcode.c */ - if( gen_retcode() != 0 ) - { - printf( "\nCannot generate src/ta_common/ta_retcode.c\n" ); - return -1; - } - - /* Create "ta_func.h" */ - gOutFunc_H = fileOpen( ta_fs_path(3, "..", "include", "ta_func.h"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_func.h.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutFunc_H == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - gOutFunc_XML = fileOpen( ta_fs_path(2, "..", "ta_func_api.xml"), NULL, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if(gOutFunc_XML == NULL) - { - printf( "\nCannot access ta_func_api.xml" ); - } - - /* Create "ta_func.swg" */ - gOutFunc_SWG = fileOpen( ta_fs_path(5, "..", "swig", "src", "interface", "ta_func.swg"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_func.swg.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutFunc_SWG == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - #endif - - #if defined(ENABLE_C) - /* Create the "ta_func_list.txt" */ - gOutFuncList_TXT = fileOpen( ta_fs_path(2, "..", "ta_func_list.txt"), - NULL, - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutFuncList_TXT == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - #endif - - - #if defined(ENABLE_C) - /* Create the "ta_frame.h" */ - gOutFrame_H = fileOpen( ta_fs_path(5, "..", "src", "ta_abstract", "frames", "ta_frame.h"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_frame.h.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutFrame_H == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - /* Create the "ta_frame.c" */ - gOutFrame_C = fileOpen( ta_fs_path(5, "..", "src", "ta_abstract", "frames", "ta_frame.c"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_frame.c.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutFrame_C == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - /* Create the "Makefile.am" */ - gOutMakefile_AM = fileOpen( ta_fs_path(4, "..", "src", "ta_func", "Makefile.am"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "Makefile.am.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutMakefile_AM == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - #endif - - #if defined(ENABLE_JAVA) - if (!gOutCore_Java) { - gOutJavaDefs_H = NULL; - } else { - /* Create "java_defs.h" */ - gOutJavaDefs_H = fileOpen( ta_fs_path(4, "..", "src", "ta_abstract", "ta_java_defs.h"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_java_defs.h.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - - if( gOutJavaDefs_H == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - } - #endif - - - #if defined(ENABLE_C) - #ifdef _MSC_VER - /* Re-open the .NET project template. */ - gOutProjFile = fileOpen( FILE_NET_PROJ, FILE_NET_PROJ_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if( gOutProjFile == NULL ) - { - printf( "Cannot update [%s]\n", FILE_NET_PROJ ); - return -1; - } - - /* Re-open the MSVC project template. */ - gOutMSVCProjFile = fileOpen( FILE_MSVC_PROJ, FILE_MSVC_PROJ_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if( gOutMSVCProjFile == NULL ) - { - printf( "Cannot update [%s]\n", FILE_MSVC_PROJ ); - return -1; - } - #endif - #endif - - #if defined(ENABLE_JAVA) - if (gOutCore_Java == NULL) { - gOutFunc_Annotation = NULL; - } else { - /* Create "CoreAnnotated.java" */ - gOutFunc_Annotation = fileOpen( ta_fs_path(8, "..", "java", "src", "com", "tictactec", "ta", "lib", "CoreAnnotated.java"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "CoreAnnotated.java.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if(gOutFunc_Annotation == NULL) - { - printf( "\nCannot access CoreAnnotated.java" ); - } - - /* Re-open the Core.java template. */ - gOutCore_Java = fileOpen( FILE_CORE_JAVA_UNF, FILE_CORE_JAVA_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if( gOutCore_Java == NULL ) - { - printf( "Cannot update [%s]\n", FILE_CORE_JAVA_UNF ); - return -1; - } - } - #endif - - #if defined(ENABLE_DOTNET) - /* Re-open the .NET interface template. */ - #ifdef _MSC_VER - gOutDotNet_H = fileOpen( FILE_NET_HEADER, FILE_NET_HEADER_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if( gOutDotNet_H == NULL ) - { - printf( "Cannot update [%s]\n", FILE_NET_HEADER ); - return -1; - } - #endif - #endif - - /* Process each functions. Two phase. */ - TA_ForEachFunc( doForEachFunctionPhase1, NULL ); - TA_ForEachFunc( doForEachFunctionPhase2, NULL ); - - #if defined(ENABLE_C) - /* Leave empty line for Makefile.am */ - fprintf( gOutMakefile_AM->file, "\n" ); - - /* Append some "hard coded" prototype for ta_func */ - appendToFunc( gOutFunc_H->file ); - if (gOutFunc_SWG) appendToFunc( gOutFunc_SWG->file ); - - /* Seperate generation of xml description file */ - fprintf(gOutFunc_XML->file, "\n"); - fprintf(gOutFunc_XML->file, "\n"); - retCode = TA_ForEachFunc( doForEachFunctionXml, NULL ); - fprintf(gOutFunc_XML->file, "\n"); - #endif - - #if defined(ENABLE_RUST) - writeRustMod(); - #endif - - /* Close all files who were updated with the list of TA functions. */ - fileClose( gOutFuncList_TXT ); - fileClose( gOutFunc_H ); - fileClose( gOutFunc_SWG ); - fileClose( gOutFrame_H ); - fileClose( gOutFrame_C ); - fileClose( gOutFunc_XML ); - fileClose( gOutMakefile_AM ); - fileClose( gOutCore_Java ); - fileClose( gOutJavaDefs_H ); - fileClose( gOutFunc_Annotation ); - fileDelete( FILE_CORE_JAVA_TMP ); - - #ifdef _MSC_VER - fileClose( gOutDotNet_H ); - fileClose( gOutProjFile ); - fileClose( gOutMSVCProjFile ); - #endif - - if( retCode != TA_SUCCESS ) - { - printf( "Failed [%d]\n", retCode ); - return -1; - } - - #if defined(ENABLE_C) - /* Create the "ta_group_idx.c" file. */ - genPrefix = 1; - gOutGroupIdx_C = fileOpen( ta_fs_path(4, "..", "src", "ta_abstract", "ta_group_idx.c"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_group_idx.c.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutGroupIdx_C == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - retCode = TA_ForEachFunc( printExternReferenceForEachFunction, NULL ); - if( retCode != TA_SUCCESS ) - { - fileClose( gOutGroupIdx_C ); - return -1; - } - - nbGroup = forEachGroup( printPerGroupList, NULL ); - - print( gOutGroupIdx_C->file, "const TA_FuncDef **TA_PerGroupFuncDef[%d] = {\n", nbGroup ); - forEachGroup( printGroupListAddress, NULL ); - print( gOutGroupIdx_C->file, "};\n\n" ); - - print( gOutGroupIdx_C->file, "const unsigned int TA_PerGroupSize[%d] = {\n", nbGroup ); - forEachGroup( printGroupSize, NULL ); - print( gOutGroupIdx_C->file, "};\n\n" ); - - print( gOutGroupIdx_C->file, "const unsigned int TA_TotalNbFunction =\n" ); - forEachGroup( printGroupSizeAddition, NULL ); - - fileClose( gOutGroupIdx_C ); - genPrefix = 0; - - /* Update "ta_defs.h" */ - doDefsFile(); - - /* Convert the xml description file into a format embedded in the library. */ - if( generateFuncAPI_C() != 1 ) - { - return -1; /* Failed. */ - } - #endif - - #if defined(ENABLE_JAVA) - /* Run Java Post-Processing. - * On Success, the Java program create a file named "java_success". - */ - if (gOutCore_Java) { - printf( "\nPost-Processing Java Code\n" ); - # define JAVA_SUCCESS_FILE ta_fs_path(3, "..", "temp", "java_success") - #define JAVA_PRETTY_TEMP_FILE ta_fs_path(3, "..", "temp", "CoreJavaPretty.tmp") - fileDelete( JAVA_SUCCESS_FILE ); - - #ifdef _MSC_VER - ret = system( "javac -cp . -d . \".." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "PrettyCode.java" ); - ret = system( "javac -cp . -d . \".." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "Main.java" ); - #else - ret = system( "javac -cp . -d . .." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "PrettyCode.java" ); - ret = system( "javac -cp . -d . .." PATH_SEPARATOR "src" PATH_SEPARATOR "tools" PATH_SEPARATOR "gen_code" PATH_SEPARATOR "java" PATH_SEPARATOR "Main.java" ); - #endif - ret = system( "java -cp . Main" ); - tempFile = fileOpen(JAVA_SUCCESS_FILE,NULL,FILE_READ ); - fileDelete( FILE_CORE_JAVA_UNF ); - - if( tempFile == NULL ) - { - printf( "\nWarning: Java code NOT updated.\n" ); - } - else - { - - fileClose( tempFile ); - - /* Java processing done. Overwrite the original Core.java ONLY if there - * is changes (re-use fileOpen/fileClose even if not efficient). - */ - tempFile = fileOpen( JAVA_PRETTY_TEMP_FILE, NULL, FILE_READ ); - tempFileOut = fileOpen( FILE_CORE_JAVA, NULL, - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( (tempFile == NULL) || (tempFileOut == NULL) ) - { - printf( "\nError: Java code update failed.\n" ); - return -1; - } - else - { - - while( fgets( gTempBuf, BUFFER_SIZE, tempFile->file ) ) - fputs(gTempBuf,tempFileOut->file); - - fileClose(tempFile); - fileClose(tempFileOut); - } - } - fileDelete( JAVA_SUCCESS_FILE ); - fileDelete( JAVA_PRETTY_TEMP_FILE ); - } - #endif - - /* Remove temporary files. */ - #ifdef _MSC_VER - fileDelete( FILE_NET_PROJ_TMP ); - fileDelete( FILE_MSVC_PROJ_TMP ); - fileDelete( FILE_NET_HEADER_TMP ); - #endif - - printf( "\n** Update completed with success **\n"); - - return 0; -} - -static unsigned int forEachGroup( TA_ForEachGroup forEachGroupFunc, - void *opaqueData ) -{ - TA_RetCode retCode; - TA_StringTable *table; - unsigned int i; - - (void)opaqueData; /* Get ride of compiler warning */ - - retCode = TA_GroupTableAlloc( &table ); - if( retCode != TA_SUCCESS ) - return 0; - - for( i=0; i < table->size; i++ ) - { - forEachGroupFunc( table->string[i], - i, - i==0? 1:0, - i==(table->size-1)? 1:0 ); - } - - retCode = TA_GroupTableFree( table ); - if( retCode != TA_SUCCESS ) - return 0; - - return i; -} - -/* Replaces reserved xml characters with the appropriate escape sequence. */ -static void ReplaceReservedXmlCharacters(const char *input, char *output ) -{ - char *currentPosition; - char tempString[8*1024]; - - if((input == NULL) || (output == NULL)) - { - return; - } - - strcpy(output, input); - - /*Replace '&' with "&" - *Note1: '&' has to be processed first as otherwise we replace the - * '&' in the escaped characters. - *Note2: We assume that the input string does not have any escaped - * characters already. - */ - currentPosition = output; - while((currentPosition = strchr(currentPosition, '&')) != NULL) - { - tempString[0] = '\0'; - if(strlen(currentPosition) > 1) - { - strcpy(tempString, currentPosition+1); - } - sprintf(currentPosition, "&%s", tempString); - } - - /* Replace '<' with "<" */ - currentPosition = output; - while((currentPosition = strchr(currentPosition, '<')) != NULL) - { - tempString[0] = '\0'; - if(strlen(currentPosition) > 1) - { - strcpy(tempString, currentPosition+1); - } - sprintf(currentPosition, "<%s", tempString); - } - - /* Replace '>' with ">" */ - currentPosition = output; - while((currentPosition = strchr(currentPosition, '>')) != NULL) - { - tempString[0] = '\0'; - if(strlen(currentPosition) > 1) - { - strcpy(tempString, currentPosition+1); - } - sprintf(currentPosition, ">%s", tempString); - } - - /* Replace ''' with "'" */ - currentPosition = output; - while((currentPosition = strchr(currentPosition, '\'')) != NULL) - { - tempString[0] = '\0'; - if(strlen(currentPosition) > 1) - { - strcpy(tempString, currentPosition+1); - } - sprintf(currentPosition, "'%s", tempString); - } - - /* Replace '"' with """ */ - currentPosition = output; - while((currentPosition = strchr(currentPosition, '"')) != NULL) - { - tempString[0] = '\0'; - if(strlen(currentPosition) > 1) - { - strcpy(tempString, currentPosition+1); - } - sprintf(currentPosition, ""%s", tempString); - } -} - -static void doForEachFunctionXml(const TA_FuncInfo *funcInfo, - void *opaqueData) -{ - TA_RetCode retCode; - const TA_InputParameterInfo *inputInfo; - const TA_OptInputParameterInfo *optInputInfo; - const TA_OutputParameterInfo *outputInfo; - char tempString[8*1024]; - unsigned int i; - - (void)opaqueData; - - /* General stuff about function */ - fprintf(gOutFunc_XML->file, " \n", funcInfo->name); - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " %s\n", (funcInfo->name == NULL)? "" : funcInfo->name); - fprintf(gOutFunc_XML->file, " %s\n", (funcInfo->camelCaseName == NULL)? "" : funcInfo->camelCaseName); - ReplaceReservedXmlCharacters(funcInfo->hint, tempString); - fprintf(gOutFunc_XML->file, " %s\n", (funcInfo->hint == NULL)? "" : tempString); - fprintf(gOutFunc_XML->file, " %s\n", funcInfo->group); - - /* Optional function flags */ - if(funcInfo->flags & (TA_FUNC_FLG_OVERLAP | TA_FUNC_FLG_VOLUME | TA_FUNC_FLG_CANDLESTICK | TA_FUNC_FLG_UNST_PER)) - { - fprintf(gOutFunc_XML->file, " \n"); - if(funcInfo->flags & TA_FUNC_FLG_OVERLAP) - { - fprintf(gOutFunc_XML->file, " Overlap\n"); - } - if(funcInfo->flags & TA_FUNC_FLG_VOLUME) - { - fprintf(gOutFunc_XML->file, " Volume\n"); - } - if(funcInfo->flags & TA_FUNC_FLG_CANDLESTICK) - { - fprintf(gOutFunc_XML->file, " Candlestick\n"); - } - if(funcInfo->flags & TA_FUNC_FLG_UNST_PER) - { - fprintf(gOutFunc_XML->file, " Unstable Period\n"); - } - - fprintf(gOutFunc_XML->file, " \n"); - } - - - /* Required input arguments */ - fprintf(gOutFunc_XML->file, " \n"); - for(i=0; inbInput; i++) - { - retCode = TA_GetInputParameterInfo( funcInfo->handle, i, &inputInfo); - if(inputInfo->type == TA_Input_Price) - { - if(inputInfo->flags & TA_IN_PRICE_OPEN) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " Open\n"); - fprintf(gOutFunc_XML->file, " Open\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - if(inputInfo->flags & TA_IN_PRICE_HIGH) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " High\n"); - fprintf(gOutFunc_XML->file, " High\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - if(inputInfo->flags & TA_IN_PRICE_LOW) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " Low\n"); - fprintf(gOutFunc_XML->file, " Low\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - if(inputInfo->flags & TA_IN_PRICE_CLOSE) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " Close\n"); - fprintf(gOutFunc_XML->file, " Close\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - if(inputInfo->flags & TA_IN_PRICE_VOLUME) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " Volume\n"); - fprintf(gOutFunc_XML->file, " Volume\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - if(inputInfo->flags & TA_IN_PRICE_OPENINTEREST) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " Open Interest\n"); - fprintf(gOutFunc_XML->file, " Open Interest\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - if(inputInfo->flags & TA_IN_PRICE_TIMESTAMP) - { - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " Timestamp\n"); - fprintf(gOutFunc_XML->file, " Timestamp\n"); - fprintf(gOutFunc_XML->file, " \n"); - } - } - else - { - fprintf(gOutFunc_XML->file, " \n"); - if(inputInfo->type == TA_Input_Real) - { - fprintf(gOutFunc_XML->file, " Double Array\n"); - } - else if(inputInfo->type == TA_Input_Integer) - { - fprintf(gOutFunc_XML->file, " Integer Array\n"); - } - else - { - printf("Unknown input type detected.\n"); - } - fprintf(gOutFunc_XML->file, " %s\n", inputInfo->paramName); - fprintf(gOutFunc_XML->file, " \n"); - } - } - fprintf(gOutFunc_XML->file, " \n"); - - /* Optional input arguments */ - if(funcInfo->nbOptInput > 0) - { - - fprintf(gOutFunc_XML->file, " \n"); - for(i=0; inbOptInput; i++) - { - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, &optInputInfo ); - - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " %s\n", optInputInfo->displayName); - ReplaceReservedXmlCharacters(optInputInfo->hint, tempString); - fprintf(gOutFunc_XML->file, " %s\n", (optInputInfo->hint == NULL)? "" : tempString); - if(optInputInfo->flags != 0) - { - fprintf(gOutFunc_XML->file, " \n"); - - if(optInputInfo->flags & TA_OPTIN_IS_PERCENT) - { - fprintf(gOutFunc_XML->file, " Percent\n"); - } - if(optInputInfo->flags & TA_OPTIN_IS_DEGREE) - { - fprintf(gOutFunc_XML->file, " Degree\n"); - } - if(optInputInfo->flags & TA_OPTIN_IS_CURRENCY) - { - fprintf(gOutFunc_XML->file, " Currency\n"); - } - if(optInputInfo->flags & TA_OPTIN_ADVANCED) - { - fprintf(gOutFunc_XML->file, " Advanced\n"); - } - - fprintf(gOutFunc_XML->file, " \n"); - } - - if(optInputInfo->type == TA_OptInput_RealRange) - { - TA_RealRange *doubleRange; - - doubleRange= (TA_RealRange*)optInputInfo->dataSet; - fprintf(gOutFunc_XML->file, " Double\n"); - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->min)); - fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->max)); - fprintf(gOutFunc_XML->file, " %d\n", doubleRange->precision); - fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->suggested_start)); - fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->suggested_end)); - fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(doubleRange->suggested_increment)); - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " %s\n", doubleToStr(optInputInfo->defaultValue)); - } - else if(optInputInfo->type == TA_OptInput_IntegerRange) - { - TA_IntegerRange *integerRange; - - integerRange = (TA_IntegerRange*)optInputInfo->dataSet; - fprintf(gOutFunc_XML->file, " Integer\n"); - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " %d\n", integerRange->min); - fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); - fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); - fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); - fprintf(gOutFunc_XML->file, " %d\n", integerRange->max); - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " %d\n", (int)optInputInfo->defaultValue); - } - else if(optInputInfo->type == TA_OptInput_IntegerList) - { - TA_IntegerList *intList; - - intList = (TA_IntegerList*) optInputInfo->dataSet; - fprintf(gOutFunc_XML->file, " MA Type\n"); - fprintf(gOutFunc_XML->file, " %d\n", (int)optInputInfo->defaultValue); - if( intList != (TA_IntegerList*) TA_DEF_UI_MA_Method.dataSet ) - { - printf("Integer lists are not supported.\n"); - } - } - else - { - printf("Unknown optional input type detected.\n"); - } - - fprintf(gOutFunc_XML->file, " \n"); - } - fprintf(gOutFunc_XML->file, " \n"); - } - - /* Output arguments */ - fprintf(gOutFunc_XML->file, " \n"); - for(i=0; inbOutput; i++) - { - retCode = TA_GetOutputParameterInfo( funcInfo->handle, i, &outputInfo ); - fprintf(gOutFunc_XML->file, " \n"); - if(outputInfo->type == TA_Output_Integer) - { - fprintf(gOutFunc_XML->file, " Integer Array\n"); - } - else if(outputInfo->type == TA_Output_Real) - { - fprintf(gOutFunc_XML->file, " Double Array\n"); - } - else - { - printf("Unknown output type detected.\n"); - } - fprintf(gOutFunc_XML->file, " %s\n", outputInfo->paramName); - if(outputInfo->flags != 0) - { - fprintf(gOutFunc_XML->file, " \n"); - - if(outputInfo->flags & TA_OUT_LINE) - { - fprintf(gOutFunc_XML->file, " Line\n"); - } - if(outputInfo->flags & TA_OUT_DOT_LINE) - { - fprintf(gOutFunc_XML->file, " Dotted Line\n"); - } - if(outputInfo->flags & TA_OUT_DASH_LINE) - { - fprintf(gOutFunc_XML->file, " Dashed Line\n"); - } - if(outputInfo->flags & TA_OUT_DOT) - { - fprintf(gOutFunc_XML->file, " Dots\n"); - } - if(outputInfo->flags & TA_OUT_HISTO) - { - fprintf(gOutFunc_XML->file, " Histogram\n"); - } - if(outputInfo->flags & TA_OUT_PATTERN_BOOL) - { - fprintf(gOutFunc_XML->file, " Pattern Bool\n"); - } - if(outputInfo->flags & TA_OUT_PATTERN_BULL_BEAR) - { - fprintf(gOutFunc_XML->file, " Pattern Bull Bear\n"); - } - if(outputInfo->flags & TA_OUT_PATTERN_STRENGTH) - { - fprintf(gOutFunc_XML->file, " Pattern Strength\n"); - } - if(outputInfo->flags & TA_OUT_POSITIVE) - { - fprintf(gOutFunc_XML->file, " Positive\n"); - } - if(outputInfo->flags & TA_OUT_NEGATIVE) - { - fprintf(gOutFunc_XML->file, " Negative\n"); - } - if(outputInfo->flags & TA_OUT_ZERO) - { - fprintf(gOutFunc_XML->file, " Zero\n"); - } - if(outputInfo->flags & TA_OUT_UPPER_LIMIT) - { - fprintf(gOutFunc_XML->file, " Upper Limit\n"); - } - if(outputInfo->flags & TA_OUT_LOWER_LIMIT) - { - fprintf(gOutFunc_XML->file, " Lower Limit\n"); - } - - fprintf(gOutFunc_XML->file, " \n"); - } - fprintf(gOutFunc_XML->file, " \n"); - } - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, " \n"); - fprintf(gOutFunc_XML->file, "\n"); - fprintf(gOutFunc_XML->file, "\n"); -} - -static void doForEachFunctionPhase1( const TA_FuncInfo *funcInfo, - void *opaqueData ) -{ - (void)opaqueData; - - #if defined(ENABLE_JAVA) - if (gOutCore_Java) { - genJavaCodePhase1( funcInfo ); - } - #endif -} - -static void doForEachFunctionPhase2( const TA_FuncInfo *funcInfo, - void *opaqueData ) -{ - static int firstTime = 1; - - (void)opaqueData; /* Get ride of compiler warning */ - - printf( "Processing [TA_%s]\n", funcInfo->name ); - - #if defined(ENABLE_C) - /* Add this function to the "ta_func_list.txt" */ - genPrefix = 0; - fprintf( gOutFuncList_TXT->file, "%-20s%s\n", funcInfo->name, funcInfo->hint ); - #endif - - #if defined(ENABLE_C) - fprintf( gOutFunc_H->file, "\n" ); - if( gOutFunc_SWG ) fprintf( gOutFunc_SWG->file, "\n" ); - - fprintf( gOutFunc_H->file, "/*\n" ); - printFuncHeaderDoc( gOutFunc_H->file, funcInfo, " * " ); - fprintf( gOutFunc_H->file, " */\n" ); - - if( gOutFunc_SWG ) { - fprintf( gOutFunc_SWG->file, "/*\n" ); - printFuncHeaderDoc( gOutFunc_SWG->file, funcInfo, " * " ); - fprintf( gOutFunc_SWG->file, " */\n" ); - } - - /* Generate the defines corresponding to this function. */ - printDefines( gOutFunc_H->file, funcInfo ); - if (gOutFunc_SWG) printDefines( gOutFunc_SWG->file, funcInfo ); - - /* Generate the function prototype. */ - printFunc( gOutFunc_H->file, "TA_LIB_API ", funcInfo, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - fprintf( gOutFunc_H->file, "\n" ); - - printFunc( gOutFunc_H->file, "TA_LIB_API ", funcInfo, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0); - fprintf( gOutFunc_H->file, "\n" ); - - /* Generate the SWIG interface. */ - if (gOutFunc_SWG) { - printFunc( gOutFunc_SWG->file, NULL, funcInfo, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0); - fprintf( gOutFunc_SWG->file, "\n" ); - } - - /* Generate the corresponding lookback function prototype. */ - printFunc( gOutFunc_H->file, "TA_LIB_API ", funcInfo, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (gOutFunc_SWG) { - printFunc( gOutFunc_SWG->file, NULL, funcInfo, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); - } - - /* Create the frame definition (ta_frame.c) and declaration (ta_frame.h) */ - genPrefix = 1; - printFrameHeader( gOutFrame_H->file, funcInfo, 0 ); - fprintf( gOutFrame_H->file, ";\n" ); - printFrameHeader( gOutFrame_H->file, funcInfo, 1 ); - fprintf( gOutFrame_H->file, ";\n\n" ); - printCallFrame( gOutFrame_C->file, funcInfo ); - - /* Add this function to the Makefile.am */ - if( firstTime ) - fprintf( gOutMakefile_AM->file, "\tta_%s.c", funcInfo->name ); - else - fprintf( gOutMakefile_AM->file, " \\\n\tta_%s.c", funcInfo->name ); - #endif - - #if defined(ENABLE_DOTNET) && defined(_MSC_VER) - /* Add the entry in the .NET project file. */ - fprintf( gOutProjFile->file, " file, " RelativePath=\".." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR "c" PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c\">\n", funcInfo->name ); - fprintf( gOutProjFile->file, " file, " Name=\"Debug|Win32\">\n" ); - fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); - fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); - fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); - fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); - fprintf( gOutProjFile->file, " \n" ); - fprintf( gOutProjFile->file, " file, " Name=\"Release|Win32\">\n" ); - fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); - fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); - fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); - fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); - fprintf( gOutProjFile->file, " \n" ); - fprintf( gOutProjFile->file, " file, " Name=\"Debug SubArray|Win32\">\n" ); - fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); - fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); - fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); - fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); - fprintf( gOutProjFile->file, " \n" ); - fprintf( gOutProjFile->file, " file, " Name=\"Release SubArray|Win32\">\n" ); - fprintf( gOutProjFile->file, " file, " Name=\"VCCLCompilerTool\"\n" ); - fprintf( gOutProjFile->file, " AdditionalIncludeDirectories=\"\"\n" ); - fprintf( gOutProjFile->file, " UsePrecompiledHeader=\"0\"\n" ); - fprintf( gOutProjFile->file, " CompileAs=\"2\"/>\n" ); - fprintf( gOutProjFile->file, " \n" ); - fprintf( gOutProjFile->file, " \n" ); - - /* Add the entry in the MSVC project file. */ - fprintf( gOutMSVCProjFile->file, "# Begin Source File\n" ); - fprintf( gOutMSVCProjFile->file, "\n" ); - fprintf( gOutMSVCProjFile->file, "SOURCE=.." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c\n", funcInfo->name ); - fprintf( gOutMSVCProjFile->file, "# End Source File\n" ); - - /* Generate the functions declaration for the .NET interface. */ - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); - - fprintf( gOutDotNet_H->file, " #if defined( _MANAGED ) && defined( USE_SUBARRAY )\n" ); - - // SubArray declaration - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0 ); - fprintf( gOutDotNet_H->file, "\n" ); - - // SubArray declaration - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0 ); - fprintf( gOutDotNet_H->file, "\n" ); - - // cli_array to SubArray conversion - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); - fprintf( gOutDotNet_H->file, " { return " ); - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0 ); - fprintf( gOutDotNet_H->file, " }\n" ); - - // cli_array to SubArray conversion - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); - fprintf( gOutDotNet_H->file, " { return " ); - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0 ); - fprintf( gOutDotNet_H->file, " }\n" ); - - fprintf( gOutDotNet_H->file, " #elif defined( _MANAGED )\n" ); - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0 ); - printFunc( gOutDotNet_H->file, NULL, funcInfo, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0 ); - fprintf( gOutDotNet_H->file, " #endif\n" ); - - fprintf( gOutDotNet_H->file, "\n" ); - fprintf( gOutDotNet_H->file, " #define TA_%s Core::%s\n", funcInfo->name, funcInfo->camelCaseName ); - fprintf( gOutDotNet_H->file, " #define TA_%s_Lookback Core::%sLookback\n\n", funcInfo->name, funcInfo->camelCaseName ); - #endif - - #if defined(ENABLE_JAVA) - /* Generate CoreAnnotated */ - printJavaFunctionAnnotation( funcInfo ); - #endif - - doFuncFile( funcInfo ); - - #if defined(ENABLE_JAVA) - /* Run the func file through the pre-processor to generate the Java code. */ - genJavaCodePhase2( funcInfo ); - #endif - - #if defined(ENABLE_RUST) - genRustCodePhase2( funcInfo ); - #endif - - - firstTime = 0; -} - -static void doForEachUnstableFunction( const TA_FuncInfo *funcInfo, - void *opaqueData ) -{ - unsigned int *i; - - i = (unsigned int *)opaqueData; - - #if defined(ENABLE_C) - if( funcInfo->flags & TA_FUNC_FLG_UNST_PER ) - { - print( gOutDefs_H->file, " /* %03d */ ENUM_DEFINE( TA_FUNC_UNST_%s, %s),\n", *i, funcInfo->name, funcInfo->camelCaseName ); - (*i)++; - } - #endif -} - -static void printDefines( FILE *out, const TA_FuncInfo *funcInfo ) -{ - TA_RetCode retCode; - const TA_OptInputParameterInfo *optInputParamInfo; - unsigned int i, j; - unsigned int paramNb; - const char *paramName; - const char *defaultParamName; - TA_IntegerList *intList; - TA_RealList *realList; - - if (!out) return; - - /* Go through the optional parameter and print - * the corresponding define for the TA_OptInput_IntegerList - * and TA_OptInput_RealList having a string. - */ - paramNb = 0; - for( i=0; i < funcInfo->nbOptInput; i++ ) - { - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, - i, &optInputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'optional input' information\n", funcInfo->name ); - return; - } - - paramName = optInputParamInfo->paramName; - - /* TA_MA: Value for parameter */ - - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealList: - defaultParamName = "optInReal"; - break; - case TA_OptInput_IntegerList: - defaultParamName = "optInInteger"; - break; - default: - paramNb++; - continue; /* Skip other type of parameter */ - } - - if( !paramName ) - paramName = defaultParamName; - - /* Output a comment to guide the user. */ - switch( optInputParamInfo->type ) - { - case TA_OptInput_IntegerList: - intList = (TA_IntegerList *)optInputParamInfo->dataSet; - if( intList != (TA_IntegerList *)TA_DEF_UI_MA_Method.dataSet ) - { - fprintf( out, "\n/* TA_%s: Optional Parameter %s */\n", - funcInfo->name, paramName ); - for( j=0; j < intList->nbElement; j++ ) - { - strcpy( gTempBuf, intList->data[j].string ); - cnvtChar( gTempBuf, ' ', '_' ); - trimWhitespace( gTempBuf ); - cnvtToUpperCase( gTempBuf ); - fprintf( out, "#define TA_%s_%s %d\n", - funcInfo->name, - gTempBuf, - intList->data[j].value ); - - } - fprintf( out, "\n" ); - } - break; - case TA_OptInput_RealList: - fprintf( out, "\n/* TA_%s: Optional Parameter %s */\n", - funcInfo->name, paramName ); - - realList = (TA_RealList *)optInputParamInfo->dataSet; - for( j=0; j < realList->nbElement; j++ ) - { - strcpy( gTempBuf, realList->data[j].string ); - cnvtChar( gTempBuf, ' ', '_' ); - trimWhitespace( gTempBuf ); - cnvtToUpperCase( gTempBuf ); - fprintf( out, "#define TA_%s_%s %s\n", - funcInfo->name, - gTempBuf, - doubleToStr(realList->data[j].value) ); - - } - fprintf( out, "\n" ); - break; - default: - /* Do nothing */ - break; - } - - paramNb++; - } -} - -static void printFunc(FILE *out, - const char *prefix, /* Can be NULL */ - const TA_FuncInfo *funcInfo, - unsigned int prototype, /* Boolean */ - unsigned int frame, /* Boolean */ - unsigned int semiColonNeeded, /* Boolean */ - unsigned int validationCode, /* Boolean */ - unsigned int lookbackSignature, /* Boolean */ - unsigned int managedCPPCode, /* Boolean */ - unsigned int managedCPPDeclaration, /* Boolean */ - unsigned int inputIsSinglePrecision, /* Boolean */ - unsigned int outputForSWIG, /* Boolean */ - unsigned int outputForJava, /* Boolean */ - unsigned int lookbackValidationCode, /* Boolean */ - unsigned int useSubArrayObject, /* Boolean */ - unsigned int arrayToSubArrayCnvt, /* Boolean */ - unsigned int outputForRust /* Boolean */ -) -{ - TA_RetCode retCode; - unsigned int i, j, k, lastParam; - int indent; - unsigned int paramNb; - const char *paramName; - const char *defaultParamName; - const TA_InputParameterInfo *inputParamInfo; - const TA_OptInputParameterInfo *optInputParamInfo; - const TA_OutputParameterInfo *outputParamInfo; - const char *typeString; - const char *inputDoubleArrayType; - const char *inputIntArrayType; - const char *outputDoubleArrayType; - const char *outputIntArrayType; - const char *outputIntParam; - const char *arrayBracket; - const char *funcName; - int excludeFromManaged; - int isMAType; - - const char *startIdxString; - const char *endIdxString; - const char *outNbElementString; - const char *outBegIdxString; - - char funcNameBuffer[1024]; /* Not safe, but 1024 is realistic, */ - - if (!out) return; - - if (outputForRust) { - PrintFuncParamStruct printFuncParamStruct = { - out, - prefix, - funcInfo, - lookbackSignature, - validationCode, - lookbackValidationCode - }; - printRustFunc(&printFuncParamStruct); - } - - if( arrayToSubArrayCnvt ) - { - inputIntArrayType = "int"; - if( inputIsSinglePrecision ) - { - inputDoubleArrayType = "float"; - } - else - { - inputDoubleArrayType = "double"; - } - outputDoubleArrayType = "double"; - outputIntArrayType = "int"; - outputIntParam = " "; - arrayBracket = " "; - startIdxString = "startIdx"; - endIdxString = "endIdx"; - outNbElementString = "outNBElement"; - outBegIdxString = "outBegIdx"; - funcName = funcInfo->camelCaseName; - } - else if( managedCPPCode ) - { - if( inputIsSinglePrecision ) - { - inputDoubleArrayType = useSubArrayObject? "SubArray^":"cli::array^"; - } - else - { - inputDoubleArrayType = useSubArrayObject? "SubArray^":"cli::array^"; - } - - inputIntArrayType = useSubArrayObject? "SubArray^" : "cli::array^"; - outputDoubleArrayType = useSubArrayObject? "SubArray^": "cli::array^"; - outputIntArrayType = useSubArrayObject? "SubArray^" : "cli::array^"; - outputIntParam = "[Out]int%"; - arrayBracket = ""; - startIdxString = "startIdx"; - endIdxString = "endIdx"; - outNbElementString = "outNBElement"; - outBegIdxString = "outBegIdx"; - funcName = funcInfo->camelCaseName; - } - else if( outputForSWIG ) - { - if( inputIsSinglePrecision ) - inputDoubleArrayType = "const float *"; - else - inputDoubleArrayType = "const double *"; - inputIntArrayType = "const int *"; - outputIntArrayType = "int"; - outputDoubleArrayType = "double"; - outputIntParam = "int"; - arrayBracket = ""; - startIdxString = " START_IDX"; - endIdxString = " END_IDX"; - outNbElementString = "OUT_SIZE"; - outBegIdxString = "BEG_IDX"; - funcName = funcInfo->name; - } - else if( outputForJava ) - { - if( inputIsSinglePrecision ) - inputDoubleArrayType = "float"; - else - inputDoubleArrayType = "double"; - inputIntArrayType = "int"; - outputDoubleArrayType = "double"; - outputIntArrayType = "int"; - outputIntParam = "MInteger"; - arrayBracket = "[]"; - startIdxString = "startIdx"; - endIdxString = "endIdx"; - outNbElementString = "outNBElement"; - outBegIdxString = "outBegIdx"; - funcName = funcNameBuffer; - - /* For Java, first letter is always lowercase. */ - strcpy( funcNameBuffer, funcInfo->camelCaseName ); - funcNameBuffer[0] = tolower(funcNameBuffer[0]); - } - else - { - if( inputIsSinglePrecision ) - inputDoubleArrayType = "const float"; - else - inputDoubleArrayType = "const double"; - inputIntArrayType = "const int"; - outputDoubleArrayType = "double"; - outputIntArrayType = "int"; - outputIntParam = "int"; - arrayBracket = "[]"; - startIdxString = "startIdx"; - endIdxString = "endIdx"; - outNbElementString = "outNBElement"; - outBegIdxString = "outBegIdx"; - funcName = funcInfo->name; - } - - typeString = ""; - defaultParamName = ""; - - if( prototype ) - { - if( lookbackSignature ) - { - if( managedCPPCode ) - { - sprintf( gTempBuf, "%s%sint %s%sLookback( ", - prefix? prefix:"", - managedCPPDeclaration? " static ":"", - managedCPPDeclaration? "":"Core::", - funcName ); - } - else if( outputForJava ) - { - sprintf( gTempBuf, "%spublic int %sLookback( ", - prefix? prefix:"", - funcName ); - } - else - { - sprintf( gTempBuf, "%sint TA_%s_Lookback( ", - prefix? prefix:"", - funcName ); - } - print( out, gTempBuf ); - indent = (unsigned int)strlen(gTempBuf) - 2; - } - else - { - if( arrayToSubArrayCnvt ) - { - sprintf( gTempBuf, "%s%s( %s, ", prefix? prefix:"", funcName, startIdxString ); - } - else if( managedCPPCode ) - { - sprintf( gTempBuf, "%s%senum class %sRetCode %s%s( int %s,\n", - prefix? prefix:"", - managedCPPDeclaration? " static ":"", - managedCPPDeclaration? "":"Core::", - managedCPPDeclaration? "":"Core::", - funcName, - startIdxString ); - } - else if( outputForJava ) - { - sprintf( gTempBuf, "%spublic RetCode %s( int %s,\n", - prefix? prefix:"", - funcName, - startIdxString ); - } - else - { - if( inputIsSinglePrecision ) - sprintf( gTempBuf, "%sTA_RetCode TA_S_%s( int %s,\n", - prefix? prefix:"", - funcName, - startIdxString ); - else - sprintf( gTempBuf, "%sTA_RetCode TA_%s( int %s,\n", - prefix? prefix:"", - funcName, - startIdxString ); - } - print( out, gTempBuf ); - indent = (unsigned int)strlen(gTempBuf); - - if( outputForSWIG ) - indent -= 25; - else - indent -= 17; - - if( indent < 0 ) indent = 0; - - printIndent( out, indent ); - if( arrayToSubArrayCnvt ) - fprintf( out, "%s,\n", endIdxString ); - else - fprintf( out, "int %s,\n", endIdxString ); - } - } - else if( frame ) - { - indent = (unsigned int)strlen(funcName); - if( lookbackSignature ) - { - print( out, "%sTA_%s_Lookback(", prefix == NULL? "" : prefix, funcName ); - indent += 12; - - } - else - { - print( out, "%sTA_%s(\n", prefix == NULL? "" : prefix, funcName ); - indent += 4; - } - } - else if( validationCode ) - { - indent = 3; - } - else - { - printf( "printFunc has nothing to do?\n" ); - return; - } - - if( prefix ) - indent += (unsigned int)strlen(prefix); - if( frame ) - indent -= 5; - - if( frame && !lookbackSignature ) - { - printIndent( out, indent ); - fprintf( out, "%s,\n", startIdxString ); - printIndent( out, indent ); - fprintf( out, "%s,\n", endIdxString ); - } - - /* Go through all the input. */ - if( !lookbackSignature && !lookbackValidationCode ) - { - if( validationCode ) - { - printIndent( out, indent ); - fprintf( out, "#if !defined(_JAVA)\n" ); - } - - paramNb = 0; - for( i=0; i < funcInfo->nbInput; i++ ) - { - retCode = TA_GetInputParameterInfo( funcInfo->handle, - i, &inputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'input' information (%d,%d)\n", funcName, i, paramNb ); - return; - } - - paramName = inputParamInfo->paramName; - - switch( inputParamInfo->type ) - { - case TA_Input_Price: - /* Find how many component are requested. */ - j = 0; - if( inputParamInfo->flags & TA_IN_PRICE_TIMESTAMP ) - j++; - if( inputParamInfo->flags & TA_IN_PRICE_OPEN ) - j++; - if( inputParamInfo->flags & TA_IN_PRICE_HIGH ) - j++; - if( inputParamInfo->flags & TA_IN_PRICE_LOW ) - j++; - if( inputParamInfo->flags & TA_IN_PRICE_CLOSE ) - j++; - if( inputParamInfo->flags & TA_IN_PRICE_VOLUME ) - j++; - if( inputParamInfo->flags & TA_IN_PRICE_OPENINTEREST ) - j++; - - if( j == 0 ) - { - printf( "[%s] invalid 'price input' information (%d,%d)\n", funcName, i, paramNb ); - return; - } - - if( validationCode ) - { - printIndent( out, indent ); - fprintf( out, "/* Verify required price component. */\n" ); - printIndent( out, indent ); - fprintf( out, "if(" ); - k = 0; - if( inputParamInfo->flags & TA_IN_PRICE_TIMESTAMP ) - { - k++; - fprintf( out, "!inTimestamp%s", k != j? "||":")"); - } - - if( inputParamInfo->flags & TA_IN_PRICE_OPEN ) - { - k++; - fprintf( out, "!inOpen%s", k != j? "||":")"); - } - - if( inputParamInfo->flags & TA_IN_PRICE_HIGH ) - { - k++; - fprintf( out, "!inHigh%s", k != j? "||":")"); - } - - if( inputParamInfo->flags & TA_IN_PRICE_LOW ) - { - k++; - fprintf( out, "!inLow%s", k != j? "||":")"); - } - - if( inputParamInfo->flags & TA_IN_PRICE_CLOSE ) - { - k++; - fprintf( out, "!inClose%s", k != j? "||":")"); - } - - if( inputParamInfo->flags & TA_IN_PRICE_VOLUME ) - { - k++; - fprintf( out, "!inVolume%s", k != j? "||":")"); - } - - if( inputParamInfo->flags & TA_IN_PRICE_OPENINTEREST ) - { - k++; - fprintf( out, "!inOpenInterest%s", k != j? "||":")"); - } - - fprintf( out, "\n" ); - printIndent( out, indent ); - fprintf( out, " return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n" ); - print( out, "\n" ); - } - else - { - if( inputParamInfo->flags & TA_IN_PRICE_OPEN ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->in[%d].data.inPrice.open, /*", paramNb ); - if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(inOpen,0)", inputDoubleArrayType ); - } - else - { - fprintf( out, "%-*s%s%s%s", - prototype? 12 : 0, - prototype? inputDoubleArrayType : "", - outputForSWIG?"":" ", - outputForSWIG? "IN_ARRAY /* inOpen */": "inOpen", - prototype? arrayBracket : "" ); - } - fprintf( out, "%s\n", frame? " */":"," ); - } - - if( inputParamInfo->flags & TA_IN_PRICE_HIGH ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->in[%d].data.inPrice.high, /*", paramNb ); - if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(inHigh,0)", inputDoubleArrayType ); - } - else - { - fprintf( out, "%-*s%s%s%s", - prototype? 12 : 0, - prototype? inputDoubleArrayType : "", - outputForSWIG?"":" ", - outputForSWIG? "IN_ARRAY /* inHigh */":"inHigh", - prototype? arrayBracket : "" ); - } - fprintf( out, "%s\n", frame? " */":"," ); - } - - if( inputParamInfo->flags & TA_IN_PRICE_LOW ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->in[%d].data.inPrice.low, /*", paramNb ); - if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(inLow,0)", inputDoubleArrayType ); - } - else - { - fprintf( out, "%-*s%s%s%s", - prototype? 12 : 0, - prototype? inputDoubleArrayType : "", - outputForSWIG?"":" ", - outputForSWIG? "IN_ARRAY /* inLow */": "inLow", - prototype? arrayBracket : "" ); - } - - fprintf( out, "%s\n", frame? " */":"," ); - } - - if( inputParamInfo->flags & TA_IN_PRICE_CLOSE ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->in[%d].data.inPrice.close, /*", paramNb ); - if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(inClose,0)", inputDoubleArrayType ); - } - else - { - fprintf( out, "%-*s%s%s%s", - prototype? 12 : 0, - prototype? inputDoubleArrayType : "", - outputForSWIG?"":" ", - outputForSWIG? "IN_ARRAY /* inClose */": "inClose", - prototype? arrayBracket : "" ); - } - - fprintf( out, "%s\n", frame? " */":"," ); - } - - if( inputParamInfo->flags & TA_IN_PRICE_VOLUME ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->in[%d].data.inPrice.volume, /*", paramNb ); - if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(inVolume,0)", inputDoubleArrayType ); - } - else - { - fprintf( out, "%-*s%s%s%s", - prototype? 12 : 0, - prototype? inputDoubleArrayType : "", - outputForSWIG?"":" ", - outputForSWIG? "IN_ARRAY /* inVolume */": "inVolume", - prototype? arrayBracket : "" ); - } - - fprintf( out, "%s\n", frame? " */":"," ); - } - - if( inputParamInfo->flags & TA_IN_PRICE_OPENINTEREST ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->in[%d].data.inPrice.openInterest, /*", paramNb ); - if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(inOpenInterest,0)", inputDoubleArrayType ); - } - else - { - fprintf( out, "%-*s%s%s%s", - prototype? 12 : 0, - prototype? inputDoubleArrayType : "", - outputForSWIG?"":" ", - outputForSWIG? "IN_ARRAY /* inOpenInterest */": "inOpenInterest", - prototype? arrayBracket : "" ); - } - - fprintf( out, "%s\n", frame? " */":"," ); - } - } - break; - case TA_Input_Real: - typeString = inputDoubleArrayType; - defaultParamName = outputForSWIG? "IN_ARRAY":"inReal"; - break; - case TA_Input_Integer: - typeString = inputIntArrayType; - defaultParamName = outputForSWIG? "IN_ARRAY":"inInteger"; - break; - default: - if( !paramName ) - paramName = "inParam"; - printf( "[%s,%s,%d] invalid 'input' type(%d)\n", - funcName, paramName, paramNb, - inputParamInfo->type ); - return; - } - - if( inputParamInfo->type != TA_Input_Price ) - { - printIndent( out, indent ); - if( validationCode ) - fprintf( out, "if( !%s ) return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n", inputParamInfo->paramName ); - else - { - - if( frame ) - fprintf( out, "params->in[%d].data.%s, /*", paramNb, defaultParamName ); - if( outputForSWIG ) - fprintf( out, "%-*s%s%s /* %s */", - prototype? 12 : 0, - prototype? typeString : "", - defaultParamName, - prototype? arrayBracket : "", - inputParamInfo->paramName ); - else - { - if( arrayToSubArrayCnvt ) - { - fprintf( out, " %-*sgcnew SubArrayFrom1D<%s>(%s,0)", - prototype? 12 : 0, "", - typeString, - inputParamInfo->paramName ); - } - else - { - fprintf( out, "%-*s %s%s", - prototype? 12 : 0, - prototype? typeString : "", - inputParamInfo->paramName, - prototype? arrayBracket : "" ); - } - } - fprintf( out, "%s\n", frame? " */":"," ); - } - } - paramNb++; - } - - if( validationCode ) - { - printIndent( out, indent ); - fprintf( out, "#endif /* !defined(_JAVA)*/\n" ); - } - } - - /* Go through all the optional input */ - paramNb = 0; - lastParam = 0; - for( i=0; i < funcInfo->nbOptInput; i++ ) - { - excludeFromManaged = 0; - - if( (i == (funcInfo->nbOptInput-1)) && lookbackSignature ) - lastParam = 1; - - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, - i, &optInputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'optional input' information\n", funcName ); - return; - } - - paramName = optInputParamInfo->paramName; - - /* Boolean to detect special TA_MAType enumeration. */ - if( optInputParamInfo->dataSet == TA_DEF_UI_MA_Method.dataSet ) - isMAType = 1; - else - isMAType = 0; - - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealRange: - case TA_OptInput_RealList: - typeString = "double"; - defaultParamName = outputForSWIG? "OPT_REAL":"optInReal"; - break; - case TA_OptInput_IntegerRange: - typeString = "int"; - defaultParamName = outputForSWIG? "OPT_INT":"optInInteger"; - break; - case TA_OptInput_IntegerList: - if( isMAType && !frame ) - { - - typeString = managedCPPCode||outputForJava? "MAType":"TA_MAType"; - defaultParamName = outputForSWIG? "OPT_MATYPE":"optInMAType"; - excludeFromManaged = 1; - } - else - { - typeString = "int"; - defaultParamName = outputForSWIG? "OPT_INT":"optInInteger"; - } - break; - default: - if( !paramName ) - paramName = "optInParam"; - printf( "[%s,%s,%d] invalid 'optional input' type(%d)\n", - funcName, paramName, paramNb, - optInputParamInfo->type ); - return; - } - - if( arrayToSubArrayCnvt ) - typeString = ""; - - if( !paramName ) - paramName = defaultParamName; - - if( validationCode ) - { - if( excludeFromManaged ) - { - printIndent( out, indent ); - fprintf( out, "#if !defined(_MANAGED) && !defined(_JAVA)\n" ); - } - - printOptInputValidation( out, paramName, optInputParamInfo, lookbackValidationCode ); - - if( excludeFromManaged ) - { - printIndent( out, indent ); - fprintf( out, "#endif /* !defined(_MANAGED) && !defined(_JAVA)*/\n" ); - } - } - else - { - if( !(lookbackSignature && (i == 0 )) ) - printIndent( out, indent ); - - if( frame ) - { - fprintf( out, "%sparams->optIn[%d].data.%s%s /*", - isMAType?"(TA_MAType)":"", - paramNb, defaultParamName, - lookbackSignature&&lastParam?"":"," ); - } - if( outputForSWIG ) - fprintf( out, "%-*s %s /* %s */", - prototype? 13 : 0, - prototype? typeString : "", - defaultParamName, paramName ); - else - fprintf( out, "%-*s %s", - prototype? 13 : 0, - prototype? typeString : "", - paramName ); - - if( frame ) - { - if( lookbackSignature && lastParam ) - fprintf( out, "*/ )%s\n", semiColonNeeded? ";":"" ); - else - fprintf( out, "*/\n" ); - } - else - { - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealRange: - if( lookbackSignature && lastParam ) - fprintf( out, " )%s ", semiColonNeeded? ";":"" ); - else - fprintf( out, "," ); - - if( ((TA_RealRange *)(optInputParamInfo->dataSet))->min == TA_REAL_MIN ) - fprintf( out, " /* From TA_REAL_MIN" ); - else - fprintf( out, " /* From %.*g", - ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, - ((TA_RealRange *)(optInputParamInfo->dataSet))->min ); - - if( ((TA_RealRange *)(optInputParamInfo->dataSet))->max == TA_REAL_MAX ) - fprintf( out, " to TA_REAL_MAX */\n" ); - else - { - fprintf( out, " to %.*g%s */\n", - ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, - ((TA_RealRange *)(optInputParamInfo->dataSet))->max, - optInputParamInfo->flags & TA_OPTIN_IS_PERCENT? " %":"" ); - } - break; - case TA_OptInput_IntegerRange: - if( lookbackSignature && lastParam ) - fprintf( out, " )%s ", semiColonNeeded? ";":"" ); - else - fprintf( out, "," ); - - if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min == TA_INTEGER_MIN ) - fprintf( out, " /* From TA_INTEGER_MIN" ); - else - { - fprintf( out, " /* From %d", - ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min ); - } - - if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max == TA_INTEGER_MAX ) - fprintf( out, " to TA_INTEGER_MAX */\n" ); - else - { - fprintf( out, " to %d */\n", - ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max ); - } - break; - default: - if( lookbackSignature && lastParam ) - fprintf( out, " )%s ", semiColonNeeded? ";":"" ); - else - fprintf( out, ",\n" ); - } - } - } - - paramNb++; - } - - if( lookbackSignature && (funcInfo->nbOptInput == 0) ) - { - if( frame || outputForJava ) - fprintf( out, " )%s\n", semiColonNeeded? ";":"" ); - else - fprintf( out, "void )%s\n", semiColonNeeded? ";":"" ); - } - - /* Go through all the output */ - if( lookbackSignature ) - { - if( !frame ) - print( out, "\n" ); - } - else if( !lookbackValidationCode ) - { - paramNb = 0; - lastParam = 0; - - if( !validationCode ) - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "%s, ", outBegIdxString ); - else - fprintf( out, "%-*s %s%s", - prototype? 12 : 0, - prototype? outputIntParam : "", - prototype&&!managedCPPCode&&!outputForJava? "*" : "", - outBegIdxString ); - - fprintf( out, "%s\n", frame? "":"," ); - - printIndent( out, indent ); - if( frame ) - fprintf( out, "%s, ", outNbElementString ); - else - fprintf( out, "%-*s %s%s", - prototype? 12 : 0, - prototype? outputIntParam : "", - prototype&&!managedCPPCode&&!outputForJava? "*" : "", - outNbElementString ); - fprintf( out, "%s\n", frame? "":"," ); - } - - if( validationCode ) - { - printIndent( out, indent ); - fprintf( out, "#if !defined(_JAVA)\n" ); - } - - for( i=0; i < funcInfo->nbOutput; i++ ) - { - if( i == (funcInfo->nbOutput-1) ) - lastParam = 1; - - retCode = TA_GetOutputParameterInfo( funcInfo->handle, - i, &outputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'output' information\n", funcName ); - return; - } - - paramName = outputParamInfo->paramName; - - switch( outputParamInfo->type ) - { - case TA_Output_Real: - typeString = outputDoubleArrayType; - defaultParamName = outputForSWIG? "OUT_ARRAY":"outReal"; - break; - case TA_Output_Integer: - typeString = outputIntArrayType;; - defaultParamName = outputForSWIG? "OUT_ARRAY":"outInteger"; - break; - default: - if( !paramName ) - paramName = "outParam"; - printf( "[%s,%s,%d] invalid 'output' type(%d)\n", - funcName, paramName, paramNb, - outputParamInfo->type ); - return; - } - - if( !paramName ) - paramName = defaultParamName; - - if( validationCode ) - { - print( out, " if( !%s )\n", paramName ); - print( out, " return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n" ); - print( out, "\n" ); - } - else - { - printIndent( out, indent ); - if( frame ) - fprintf( out, "params->out[%d].data.%s%s /*", - paramNb, defaultParamName, - lastParam? "":"," ); - - if( outputForSWIG ) - fprintf( out, "%-*s *%s%s /* %s */", - prototype? 12 : 0, - prototype? typeString : "", - defaultParamName, - prototype? arrayBracket : "", - paramName ); - else if( arrayToSubArrayCnvt ) - { - fprintf( out, " gcnew SubArrayFrom1D<%s>(%s,0)", typeString, paramName ); - } - else - { - fprintf( out, "%-*s %s%s", - prototype? 12 : 0, - prototype? typeString : "", - paramName, - prototype? arrayBracket : "" ); - } - - if( !lastParam ) - fprintf( out, "%s\n", frame? " */":"," ); - else - { - fprintf( out, "%s )%s\n", - frame? " */":"", - semiColonNeeded? ";":"" ); - } - } - - paramNb++; - } - - if( validationCode ) - { - printIndent( out, indent ); - fprintf( out, "#endif /* !defined(_JAVA) */\n" ); - } - - } - -} - -static void printCallFrame( FILE *out, const TA_FuncInfo *funcInfo ) -{ - if (!out) return; - - genPrefix = 1; - - printFrameHeader( out, funcInfo, 0 ); - print( out, "{\n" ); - printFunc( out, " return ", funcInfo, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - print( out, "}\n" ); - - printFrameHeader( out, funcInfo, 1 ); - print( out, "{\n" ); - if( funcInfo->nbOptInput == 0 ) - print( out, " (void)params;\n" ); - printFunc( out, " return ", funcInfo, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); - print( out, "}\n" ); - - genPrefix = 0; -} - - -static void printFrameHeader( FILE *out, const TA_FuncInfo *funcInfo, unsigned int lookbackSignature ) -{ - if (!out) return; - - if( lookbackSignature ) - { - print( out, "unsigned int TA_%s_FramePPLB( const TA_ParamHolderPriv *params )\n", funcInfo->name ); - } - else - { - print( out, "TA_RetCode TA_%s_FramePP( const TA_ParamHolderPriv *params,\n", funcInfo->name ); - print( out, " int startIdx,\n" ); - print( out, " int endIdx,\n" ); - print( out, " int *outBegIdx,\n" ); - print( out, " int *outNBElement )\n" ); - } -} - -static void printExternReferenceForEachFunction( const TA_FuncInfo *info, - void *opaqueData ) -{ - (void)opaqueData; /* Get ride of compiler warning */ - - #if defined(ENABLE_C) - fprintf( gOutGroupIdx_C->file, "extern const TA_FuncDef TA_DEF_%s;\n", info->name ); - #endif -} - -static void printPerGroupList( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ) -{ - (void)isLast; /* Get ride of compiler warning. */ - (void)isFirst; /* Get ride of compiler warning. */ - - #if defined(ENABLE_C) - fprintf( gOutGroupIdx_C->file, - "\nconst TA_FuncDef *TA_PerGroupFunc_%d[] = {\n", index ); - - gCurrentGroupName = groupName; - TA_ForEachFunc( printFunctionAddress, NULL ); - fprintf( gOutGroupIdx_C->file, "NULL };\n" ); - - fprintf( gOutGroupIdx_C->file, - "#define SIZE_GROUP_%d ((sizeof(TA_PerGroupFunc_%d)/sizeof(const TA_FuncDef *))-1)\n", - index, index ); - #endif -} - -static void printFunctionAddress( const TA_FuncInfo *info, - void *opaqueData ) -{ - (void)opaqueData; /* Get ride of compiler warning. */ - - #if defined(ENABLE_C) - if( strcmp( info->group, gCurrentGroupName ) == 0 ) - fprintf( gOutGroupIdx_C->file, "&TA_DEF_%s,\n", info->name ); - #endif -} - -static void printGroupListAddress( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ) -{ - (void)isFirst; /* Get ride of compiler warning. */ - - #if defined(ENABLE_C) - if( groupName == NULL ) - fprintf( gOutGroupIdx_C->file, "NULL%s", isLast? "" : "," ); - else fprintf( gOutGroupIdx_C->file, "&TA_PerGroupFunc_%d[0]%s\n", - index, isLast? "" : "," ); - #endif -} - -static void printGroupSize( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ) -{ - (void)isFirst; /* Get ride of compiler warning. */ - (void)groupName; /* Get ride of compiler warning. */ - - #if defined(ENABLE_C) - fprintf( gOutGroupIdx_C->file, "SIZE_GROUP_%d%s\n", - index, isLast? "" : "," ); - #endif -} - -static void printGroupSizeAddition( const char *groupName, - unsigned int index, - unsigned int isFirst, - unsigned int isLast - ) -{ - (void)isFirst; /* Get ride of compiler warning. */ - (void)groupName; /* Get ride of compiler warning. */ - - #if defined(ENABLE_C) - fprintf( gOutGroupIdx_C->file, "SIZE_GROUP_%d%s", - index, isLast? ";" : "+\n" ); - #endif -} - -static void doFuncFile( const TA_FuncInfo *funcInfo ) -{ - - FileHandle *tempFile1; - - unsigned int useTempFile; - FILE *logicIn; - FILE *logicTmp; - char localBuf1[500]; - - #define TEMPLATE_PASS1 ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "pass1.tmp" - #define TEMPLATE_PASS2 ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "pass2.tmp" - #define TEMPLATE_DEFAULT ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract" PATH_SEPARATOR "templates" PATH_SEPARATOR "ta_x.c.template" - #define LOGIC_TEMP ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "logic.tmp" - - /* Check if the file already exist. */ - sprintf( localBuf1, ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c", funcInfo->name ); - - gOutFunc_C = fileOpen( localBuf1, NULL, FILE_READ); - if( gOutFunc_C == NULL ) - useTempFile = 0; - else - { - useTempFile = 1; - /* Create a temporary template using it. */ - tempFile1 = fileOpen( TEMPLATE_PASS1, NULL, FILE_WRITE|WRITE_ALWAYS ); - if( tempFile1 == NULL ) - { - printf( "Cannot create temporary file!\n" ); - return; - } - - createTemplate( gOutFunc_C, tempFile1 ); - - fileClose( tempFile1 ); - fileClose( gOutFunc_C ); - } - - /* Open the file using the template. */ - if( useTempFile ) - gOutFunc_C = fileOpen( TEMPLATE_PASS2, TEMPLATE_PASS1, FILE_WRITE|WRITE_ALWAYS ); - else - gOutFunc_C = fileOpen( TEMPLATE_PASS2, TEMPLATE_DEFAULT, FILE_WRITE|WRITE_ALWAYS ); - - if( gOutFunc_C == NULL ) - { - printf( "Cannot create [%s]\n", localBuf1 ); - return; - } - - /* Generate. 1st Pass */ - writeFuncFile( funcInfo ); - - fileClose( gOutFunc_C ); - - if( !useTempFile ) - { - /* When the file is new, the first pass becomes the - * original. - */ - if( !copyFile( TEMPLATE_PASS2, localBuf1 ) ) - { - printf( "Cannot copy %s to %s\n", TEMPLATE_PASS2, localBuf1 ); - return; - } - } - - /* Extract the TA function code in a temporary file */ - init_gToOpen( localBuf1, NULL ); - logicIn = fopen( gToOpen, "r" ); - if( !logicIn ) - { - printf( "Cannot open [%s] for extracting TA logic\n", localBuf1 ); - return; - } - init_gToOpen( LOGIC_TEMP, NULL ); - logicTmp = fopen( gToOpen, "w" ); - if( !logicTmp ) - { - fclose(logicIn); - printf( "Cannot open logic.tmp\n" ); - return; - } - extractTALogic( logicIn, logicTmp ); - fclose(logicIn); - fclose(logicTmp); - - /* Insert the TA function code in the single-precision frame - * using the template generated from the first pass. - */ - gOutFunc_C = fileOpen( localBuf1, TEMPLATE_PASS2, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if( gOutFunc_C == NULL ) - { - printf( "Cannot complete 2nd pass with [%s]\n", localBuf1 ); - return; - } - - /* Duplicate the function, but using float this time */ - print( gOutFunc_C->file, "\n" ); - print( gOutFunc_C->file, "#define USE_SINGLE_PRECISION_INPUT\n" ); - print( gOutFunc_C->file, "#if !defined( _MANAGED ) && !defined( _JAVA )\n" ); - print( gOutFunc_C->file, " #undef TA_PREFIX\n" ); - print( gOutFunc_C->file, " #define TA_PREFIX(x) TA_S_##x\n" ); - print( gOutFunc_C->file, "#endif\n" ); - print( gOutFunc_C->file, "#undef INPUT_TYPE\n" ); - print( gOutFunc_C->file, "#define INPUT_TYPE float\n" ); - - print( gOutFunc_C->file, "#if defined( _MANAGED ) && defined( USE_SUBARRAY )\n" ); - printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0); - print( gOutFunc_C->file, "#elif defined( _MANAGED )\n" ); - printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0); - print( gOutFunc_C->file, "#elif defined( _JAVA )\n" ); - printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0); - print( gOutFunc_C->file, "#else\n" ); - printFunc( gOutFunc_C->file, NULL, funcInfo, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0); - print( gOutFunc_C->file, "#endif\n" ); - - /* Insert the internal logic of the function */ - init_gToOpen( LOGIC_TEMP, NULL ); - logicTmp = fopen( gToOpen, "r" ); - if( !logicTmp ) - { - fileClose( gOutFunc_C ); - printf( "Cannot read open logic.tmp\n" ); - return; - } - while( fgets(gTempBuf,BUFFER_SIZE,logicTmp) ) - fputs( gTempBuf, gOutFunc_C->file ); - fclose(logicTmp); - print( gOutFunc_C->file, "\n" ); - - /* Add the suffix at the end of the file. */ - print( gOutFunc_C->file, "#if defined( _MANAGED )\n" ); - print( gOutFunc_C->file, "}}} // Close namespace TicTacTec.TA.Lib\n" ); - print( gOutFunc_C->file, "#endif\n" ); - - fileClose( gOutFunc_C ); - fileDelete( LOGIC_TEMP ); - fileDelete( TEMPLATE_PASS1 ); - fileDelete( TEMPLATE_PASS2 ); -} - -static void doDefsFile( void ) -{ - - FileHandle *tempFile; - FILE *out; - - #define FILE_TA_DEFS_H ".." PATH_SEPARATOR "include" PATH_SEPARATOR "ta_defs.h" - #define FILE_TA_DEFS_TMP ".." PATH_SEPARATOR "temp" PATH_SEPARATOR "ta_defs.tmp" - - /* Check if the file already exist. If not, this is an error. */ - gOutDefs_H = fileOpen( FILE_TA_DEFS_H, NULL, FILE_READ ); - if( gOutDefs_H == NULL ) - { - printf( "ta_defs.h must exist for being updated!\n" ); - exit(-1); - } - - /* Create the template. The template is just the original file content - * with the GENCODE SECTION emptied (so they can be re-generated) - */ - tempFile = fileOpen( FILE_TA_DEFS_TMP, NULL, FILE_WRITE|WRITE_ALWAYS ); - if( tempFile == NULL ) - { - printf( "Cannot create temporary file!\n" ); - exit(-1); - } - - createTemplate( gOutDefs_H, tempFile ); - - fileClose( tempFile ); - fileClose( gOutDefs_H ); - - /* Re-open the file using the template. */ - gOutDefs_H = fileOpen( FILE_TA_DEFS_H, FILE_TA_DEFS_TMP, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutDefs_H == NULL ) - { - printf( "Cannot create ta_defs.h\n" ); - exit(-1); - } - - /* Generate the GENCODE SECTION */ - out = gOutDefs_H->file; - - genPrefix = 1; - addUnstablePeriodEnum( out ); - print( out, "\n" ); - genPrefix = 0; - - fileClose( gOutDefs_H ); - fileDelete( FILE_TA_DEFS_TMP ); - #undef FILE_TA_DEFS_H - #undef FILE_TA_DEFS_TMP -} - -#ifdef _MSC_VER -static int createProjTemplate( FileHandle *in, FileHandle *out ) -{ - FILE *inFile; - FILE *outFile; - unsigned int skipSection; - unsigned int sectionDone; - unsigned int step; - - inFile = in->file; - outFile = out->file; - - skipSection = 0; - sectionDone = 0; - step = 0; - - while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - { - if( !skipSection ) - { - fputs( gTempBuf, outFile ); - if( !strstr( gTempBuf, "" ) ) - continue; - - skipSection = 1; - fputs( "%%%GENCODE%%%\n", outFile ); - } - else if( strstr( gTempBuf, "" ) ) - { - skipSection = 0; - fputs( gTempBuf, outFile ); - sectionDone++; - } - } - - return 0; -} - -static int createMSVCProjTemplate( FileHandle *in, FileHandle *out ) -{ - FILE *inFile; - FILE *outFile; - unsigned int skipSection; - - inFile = in->file; - outFile = out->file; - - skipSection = 0; - - while( !skipSection && fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - { - if( strstr( gTempBuf, "# Begin Source File") ) - skipSection = 1; - else - fputs( gTempBuf, outFile ); - } - - if( !skipSection ) - { - printf( "Unexpected end-of-file\n" ); - return -1; - } - - fputs( "%%%GENCODE%%%\n", outFile ); - - while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - { - if( strstr( gTempBuf, "# End Group" ) ) - { - /* Add the "non TA function" source files. */ - fprintf( outFile, "# Begin Source File\n"); - fprintf( outFile, "\n"); - fprintf( outFile, "SOURCE=.." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_utility.c\n"); - fprintf( outFile, "# End Source File\n"); - fprintf( outFile, "# End Group\n"); - break; - } - } - - while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - fputs( gTempBuf, outFile ); - - return 0; -} -#endif - -static int createTemplate( FileHandle *in, FileHandle *out ) -{ - FILE *inFile; - FILE *outFile; - char *inTheLinePtr; - unsigned int skipSection; - unsigned int sectionDone; - - inFile = in->file; - outFile = out->file; - - skipSection = 0; - sectionDone = 0; - while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - { - inTheLinePtr = gTempBuf; - /* Skip leading whitespace. */ - while( isspace(*inTheLinePtr) ) inTheLinePtr++; - - if( strncmp( inTheLinePtr, "/**** START GENCODE SECTION", 27 ) == 0 ) - { - skipSection = 1; - fputs( gTempBuf, outFile ); - fputs( "%%%GENCODE%%%\n", outFile ); - } - - else if( strncmp( inTheLinePtr, "/**** END GENCODE SECTION", 25 ) == 0 ) - { - if( skipSection ) - { - skipSection = 0; - sectionDone++; - } - } - - if( !skipSection ) - { - if( fputs( gTempBuf, outFile ) == EOF ) - { - printf( "Cannot write tmp file\n" ); - return -1; - } - } - } - - return 0; -} - -static void writeFuncFile( const TA_FuncInfo *funcInfo ) -{ - FILE *out; - - out = gOutFunc_C->file; - fprintf( out, "/* All code within this section is automatically\n" ); - fprintf( out, " * generated by gen_code. Any modification will be lost\n" ); - fprintf( out, " * next time gen_code is run.\n" ); - fprintf( out, " */\n" ); - - genPrefix = 1; - print( out, "\n" ); - print( out, "#if defined( _MANAGED )\n" ); - print( out, " #include \"TA-Lib-Core.h\"\n" ); - print( out, " #define TA_INTERNAL_ERROR(Id) (RetCode::InternalError)\n" ); - print( out, " namespace TicTacTec { namespace TA { namespace Library {\n" ); - print( out, "#elif defined( _JAVA )\n" ); - print( out, " #include \"ta_defs.h\"\n" ); - print( out, " #include \"ta_java_defs.h\"\n" ); - print( out, " #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError)\n" ); - print( out, "#elif defined( _RUST )\n" ); - print( out, " #include \"ta_defs.h\"\n" ); - print( out, " #define TA_INTERNAL_ERROR(Id) (RetCode.InternalError)\n" ); - print( out, "#else\n" ); - print( out, " #include \n" ); - print( out, " #include \n" ); - print( out, " #include \"ta_func.h\"\n" ); - print( out, "#endif\n" ); - print( out, "\n" ); - print( out, "#ifndef TA_UTILITY_H\n" ); - print( out, " #include \"ta_utility.h\"\n" ); - print( out, "#endif\n" ); - print( out, "\n" ); - print( out, "#ifndef TA_MEMORY_H\n" ); - print( out, " #include \"ta_memory.h\"\n" ); - print( out, "#endif\n" ); - print( out, "\n" ); - print( out, "#define TA_PREFIX(x) TA_##x\n" ); - print( out, "#define INPUT_TYPE double\n" ); - print( out, "\n" ); - print( out, "#if defined( _MANAGED )\n" ); - printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0); - print( out, "#elif defined( _JAVA )\n" ); - printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0); - print( out, "#else\n" ); - printFunc( out, "TA_LIB_API ", funcInfo, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); - print( out, "#endif\n" ); - - genPrefix = 0; - skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); - - genPrefix = 1; - if( funcInfo->nbOptInput != 0 ) - print( out, "#ifndef TA_FUNC_NO_RANGE_CHECK\n" ); - printFunc( out, NULL, funcInfo, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0); - if( funcInfo->nbOptInput != 0 ) - print( out, "#endif /* TA_FUNC_NO_RANGE_CHECK */\n" ); - else - print( out, "/* No parameters to validate. */\n" ); - - genPrefix = 0; - skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); - - genPrefix = 1; - fprintf( out, "/*\n" ); - printFuncHeaderDoc( out, funcInfo, " * " ); - fprintf( out, " */\n" ); - print( out, "\n" ); - print( out, "#if defined( _MANAGED ) && defined( USE_SUBARRAY )\n" ); - printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0); - print( out, "#elif defined( _MANAGED )\n" ); - printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0); - print( out, "#elif defined( _JAVA )\n" ); - - /* Handle special case to avoid duplicate definition of min,max */ - if( strcmp( funcInfo->camelCaseName, "Min" ) == 0 ) { - print( out, "#undef min\n" ); - } else if( strcmp( funcInfo->camelCaseName, "Max" ) == 0 ) { - print( out, "#undef max\n" ); - } - - printFunc( out, NULL, funcInfo, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0); - print( out, "#else\n" ); - printFunc( out, "TA_LIB_API ", funcInfo, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - print( out, "#endif\n" ); - - genPrefix = 0; - skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); - - genPrefix = 1; - print( out, "\n" ); - print( out, "#ifndef TA_FUNC_NO_RANGE_CHECK\n" ); - print( out, "\n" ); - print( out, " /* Validate the requested output range. */\n" ); - print( out, " if( startIdx < 0 )\n" ); - print( out, " return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_START_INDEX,OutOfRangeStartIndex);\n" ); - print( out, " if( (endIdx < 0) || (endIdx < startIdx))\n" ); - print( out, " return ENUM_VALUE(RetCode,TA_OUT_OF_RANGE_END_INDEX,OutOfRangeEndIndex);\n" ); - print( out, "\n" ); - /* Generate the code for checking the parameters. - * Also generates the code for setting up the - * default values. - */ - printFunc( out, NULL, funcInfo, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - - print( out, "#endif /* TA_FUNC_NO_RANGE_CHECK */\n" ); - print( out, "\n" ); - - skipToGenCode( funcInfo->name, gOutFunc_C->file, gOutFunc_C->templateFile ); - - /* Put a marker who is going to be used in the second pass */ - fprintf( out, "%%%%%%GENCODE%%%%%%\n" ); -} - -static void printOptInputValidation( FILE *out, - const char *name, - const TA_OptInputParameterInfo *optInputParamInfo, - int lookbackValidationCode /* Boolean */ ) -{ - int minInt, maxInt; - double minReal, maxReal; - unsigned int i; - int isMAType; - - const TA_RealList *realList; - const TA_IntegerList *integerList; - const TA_RealRange *realRange; - const TA_IntegerRange *integerRange; - - minInt = maxInt = (int)0; - minReal = maxReal = (double)0.0; - - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealRange: - realRange = (const TA_RealRange *)optInputParamInfo->dataSet; - minReal = realRange->min; - maxReal = realRange->max; - break; - case TA_OptInput_IntegerRange: - integerRange = (const TA_IntegerRange *)optInputParamInfo->dataSet; - minInt = integerRange->min; - maxInt = integerRange->max; - break; - case TA_OptInput_RealList: - /* Go through the list to find the min/max. */ - realList = (const TA_RealList *)optInputParamInfo->dataSet; - minReal = realList->data[0].value; - maxReal = realList->data[0].value; - for( i=0; i < realList->nbElement; i++ ) - { - minReal = min( realList->data[i].value, minReal ); - maxReal = max( realList->data[i].value, maxReal ); - } - break; - case TA_OptInput_IntegerList: - /* Go through the list to find the min/max. */ - integerList = (const TA_IntegerList *)optInputParamInfo->dataSet; - minInt = integerList->data[0].value; - maxInt = integerList->data[0].value; - for( i=0; i < integerList->nbElement; i++ ) - { - minInt = min( integerList->data[i].value, minInt ); - maxInt = max( integerList->data[i].value, maxInt ); - } - break; - } - - /* Boolean to detect special TA_MAType enumeration. */ - if( optInputParamInfo->dataSet == TA_DEF_UI_MA_Method.dataSet ) - isMAType = 1; - else - isMAType = 0; - - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealList: - print( out, " /* min/max are checked for %s. */\n", name ); - case TA_OptInput_RealRange: - print( out, " if( %s == TA_REAL_DEFAULT )\n", name ); - print( out, " %s = %s;\n", name, doubleToStr(optInputParamInfo->defaultValue) ); - print( out, " else if( (%s < %s) ||", name, doubleToStr(minReal) ); - print( out, " (%s > %s) )\n", name, doubleToStr(maxReal) ); - break; - case TA_OptInput_IntegerRange: - print( out, " /* min/max are checked for %s. */\n", name ); - case TA_OptInput_IntegerList: - print( out, " if( (int)%s == TA_INTEGER_DEFAULT )\n", name ); - print( out, " %s = %s%d;\n", name, isMAType?"(TA_MAType)":"", (int)optInputParamInfo->defaultValue ); - print( out, " else if( ((int)%s < %d) || ((int)%s > %d) )\n", - name, minInt, - name, maxInt ); - break; - } - - if( lookbackValidationCode ) - print( out, " return -1;\n" ); - else - print( out, " return ENUM_VALUE(RetCode,TA_BAD_PARAM,BadParam);\n" ); - - print( out, "\n" ); -} - - -static int skipToGenCode( const char *dstName, FILE *out, FILE *templateFile ) -{ - unsigned int headerWritten = 0; - - while( fgets( gTempBuf, BUFFER_SIZE, templateFile ) ) - { - if( strncmp( gTempBuf, "%%%GENCODE%%%", 13 ) == 0 ) - { - headerWritten = 1; - break; - } - if( out && (fputs( gTempBuf, out ) == EOF) ) - { - printf( "Cannot write to [%s]\n", dstName ); - return -1; - } - } - - if( !headerWritten ) - { - printf( "Line with string %%%%%%GENCODE%%%%%% Missing in [%s]", dstName ); - return -1; - } - - return 0; -} - -static void printFuncHeaderDoc( FILE *out, - const TA_FuncInfo *funcInfo, - const char *prefix ) -{ - TA_RetCode retCode; - unsigned int paramNb; - const char *paramName; - const char *defaultParamName; - const TA_InputParameterInfo *inputParamInfo; - const TA_OptInputParameterInfo *optInputParamInfo; - const TA_OutputParameterInfo *outputParamInfo; - int first; - - fprintf( out, "%sTA_%s - %s\n", prefix, funcInfo->name, funcInfo->hint ); - fprintf( out, "%s\n", prefix ); - - - fprintf( out, "%sInput = ", prefix ); - for( paramNb=0; paramNb < funcInfo->nbInput; paramNb++ ) - { - retCode = TA_GetInputParameterInfo( funcInfo->handle, - paramNb, &inputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'input' information\n", funcInfo->name ); - return; - } - - switch( inputParamInfo->type ) - { - case TA_Input_Price: - first = 1; - #define PRICE_PARAM(upperParam,lowerParam) \ - { \ - if( inputParamInfo->flags & TA_IN_PRICE_##upperParam ) \ - { \ - if( !first ) fprintf( out, ", " ); \ - fprintf( out, lowerParam ); \ - first = 0; \ - } \ - } - - PRICE_PARAM( OPEN, "Open" ); - PRICE_PARAM( HIGH, "High" ); - PRICE_PARAM( LOW, "Low" ); - PRICE_PARAM( CLOSE, "Close" ); - PRICE_PARAM( VOLUME, "Volume" ); - PRICE_PARAM( OPENINTEREST, "OpenInterest" ); - PRICE_PARAM( TIMESTAMP, "Timestamp" ); - - #undef PRICE_PARAM - - break; - case TA_Input_Integer: - fprintf( out, "int" ); - break; - case TA_Input_Real: - fprintf( out, "double" ); - break; - } - if( paramNb+1 == funcInfo->nbInput ) - fprintf( out, "\n" ); - else - fprintf( out, ", " ); - } - - fprintf( out, "%sOutput = ", prefix ); - for( paramNb=0; paramNb < funcInfo->nbOutput; paramNb++ ) - { - retCode = TA_GetOutputParameterInfo( funcInfo->handle, - paramNb, &outputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'output' information\n", funcInfo->name ); - return; - } - - switch( outputParamInfo->type ) - { - case TA_Output_Real: - fprintf( out, "double" ); - break; - case TA_Output_Integer: - fprintf( out, "int" ); - break; - } - if( paramNb+1 == funcInfo->nbOutput ) - fprintf( out, "\n" ); - else - fprintf( out, ", " ); - } - - if( funcInfo->nbOptInput != 0 ) - { - fprintf( out, "%s\n", prefix ); - fprintf( out, "%sOptional Parameters\n", prefix ); - fprintf( out, "%s-------------------\n", prefix ); - - for( paramNb=0; paramNb < funcInfo->nbOptInput; paramNb++ ) - { - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, - paramNb, &optInputParamInfo ); - - if( retCode != TA_SUCCESS ) - { - printf( "[%s] invalid 'optional input' information\n", funcInfo->name ); - return; - } - - paramName = optInputParamInfo->paramName; - - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealRange: - case TA_OptInput_RealList: - defaultParamName = "optInReal"; - break; - case TA_OptInput_IntegerRange: - case TA_OptInput_IntegerList: - defaultParamName = "optInInteger"; - break; - default: - if( !paramName ) - paramName = "optInParam"; - printf( "[%s,%s,%d] invalid 'optional input' type(%d)\n", - funcInfo->name, paramName, paramNb, - optInputParamInfo->type ); - return; - } - - if( !paramName ) - paramName = defaultParamName; - - fprintf( out, "%s%s:", prefix, paramName ); - switch( optInputParamInfo->type ) - { - case TA_OptInput_RealRange: - if( ((TA_RealRange *)(optInputParamInfo->dataSet))->min == TA_REAL_MIN ) - fprintf( out, "(From TA_REAL_MIN" ); - else - { - fprintf( out, "(From %.*g", - ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, - ((TA_RealRange *)(optInputParamInfo->dataSet))->min ); - } - - if( ((TA_RealRange *)(optInputParamInfo->dataSet))->max == TA_REAL_MAX ) - fprintf( out, " to TA_REAL_MAX)\n" ); - else - { - fprintf( out, " to %.*g%s)\n", - ((TA_RealRange *)(optInputParamInfo->dataSet))->precision, - ((TA_RealRange *)(optInputParamInfo->dataSet))->max, - optInputParamInfo->flags & TA_OPTIN_IS_PERCENT? " %":"" ); - } - break; - case TA_OptInput_IntegerRange: - if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min == TA_INTEGER_MIN ) - fprintf( out, "(From TA_INTEGER_MIN" ); - else - { - fprintf( out, "(From %d", - ((TA_IntegerRange *)(optInputParamInfo->dataSet))->min ); - } - - if( ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max == TA_INTEGER_MAX ) - fprintf( out, " to TA_INTEGER_MAX)\n" ); - else - { - fprintf( out, " to %d)\n", - ((TA_IntegerRange *)(optInputParamInfo->dataSet))->max ); - } - break; - default: - fprintf( out, "\n" ); - } - fprintf( out, "%s %s\n", prefix, optInputParamInfo->hint ); - fprintf( out, "%s\n", prefix ); - } - } - - fprintf( out, "%s\n", prefix ); -} - -static int addUnstablePeriodEnum( FILE *out ) -{ - TA_RetCode retCode; - unsigned int id; - - print( out, "\n" ); - print( out, "ENUM_BEGIN( FuncUnstId )\n"); - - /* Enumerate the function having an "unstable period". Give - * to each a unique identifier. - */ - id = 0; - retCode = TA_ForEachFunc( doForEachUnstableFunction, &id ); - - print( out, " ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll),\n"); - print( out, " ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1\n" ); - print( out, "ENUM_END( FuncUnstId )\n"); - - if( retCode != TA_SUCCESS ) - return -1; - - return 0; -} - -static int gen_retcode( void ) -{ - FileHandle *inHdr; - char *ptr1, *ptr2; - int step1Done; - int retValue; - TA_RetCode retCodeValue; - char *retCodeEnum, *retCodeInfo; - - retValue = -1; - - /* Create "ta_retcode.c" */ - gOutRetCode_C = fileOpen( ta_fs_path(4, "..", "src", "ta_common", "ta_retcode.c"), - ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_retcode.c.template"), - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutRetCode_C == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - /* Create "ta_retcode.csv" */ - gOutRetCode_CSV = fileOpen( ta_fs_path(4, "..", "src", "ta_common", "ta_retcode.csv"), - NULL, - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - if( gOutRetCode_CSV == NULL ) - { - fileClose( gOutRetCode_C ); - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - inHdr = fileOpen( ta_fs_path(3, "..", "include", "ta_defs.h"), - NULL, - FILE_READ ); - if( inHdr == NULL ) - { - fileClose( gOutRetCode_C ); - fileClose( gOutRetCode_CSV ); - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - - step1Done = 0; - while( fgets( gTempBuf, sizeof( gTempBuf ), inHdr->file ) ) - { - if( !step1Done ) - { - if( strstr( gTempBuf, "ENUM_BEGIN( RetCode )" ) != NULL ) - step1Done = 1; - } - else - { - if( strstr( gTempBuf, "TA_UNKNOWN_ERR" ) != NULL ) - { - retValue = 0; - goto gen_retcode_exit; - } - - ptr1 = strstr( gTempBuf, "/*" ); - ptr2 = strstr( gTempBuf, "/***" ); - if( ptr1 && !ptr2 ) - { - ptr1 += 2; - retCodeValue = (TA_RetCode)atoi(ptr1); - ptr1 = strstr( ptr1, "TA_" ); - if( !ptr1 ) - { - printf( "Can't find TA_" ); - goto gen_retcode_exit; - } - retCodeEnum = ptr1; - - retCodeInfo = NULL; - while( isdigit(*ptr1) || isalpha(*ptr1) || *ptr1 == '_' ) - ptr1++; - if( *ptr1 != '\0' ) - { - *ptr1 = '\0'; - ptr1++; - if( *ptr1 != '\0' ) - { - retCodeInfo = strstr( ptr1, "/* " ); - if( retCodeInfo ) - { - retCodeInfo += 3; - ptr1 = strstr( retCodeInfo, "*/" ); - if( ptr1 == NULL ) - retCodeInfo = NULL; - else - *ptr1 = '\0'; - } - } - } - - if( !retCodeInfo ) - retCodeInfo = "No Info"; - - strcpy( gTempBuf, retCodeEnum ); - ptr1 = trimWhitespace( gTempBuf ); - fprintf( gOutRetCode_C->file, " {(TA_RetCode)%d,\"%s\",", retCodeValue, ptr1 ); - fprintf( gOutRetCode_CSV->file, "%d,%s", retCodeValue, ptr1 ); - strcpy( gTempBuf, retCodeInfo ); - ptr1 = trimWhitespace( gTempBuf ); - fprintf( gOutRetCode_C->file, "\"%s\"},\n", ptr1 ); - fprintf( gOutRetCode_CSV->file, ",%s\n", ptr1 ); - } - } - } - -gen_retcode_exit: - fileClose( inHdr ); - fileClose( gOutRetCode_C ); - fileClose( gOutRetCode_CSV ); - - return retValue; /* Success. */ -} - -const char *doubleToStr( double value ) -{ - int length; - int i, outIdx; - sprintf( gTempDoubleToStr, "%e", value ); - - /* Remove extra "0" added by Microsoft in the - * exponential part. - */ - length = (int)strlen( gTempDoubleToStr ); - outIdx = 0; - for( i=0; i < length; i++ ) - { - /* Will skip two leading zero in the exponent */ - if( (i >= 2) && - (toupper(gTempDoubleToStr[i-2]) == 'E') && - ((gTempDoubleToStr[i-1] == '+')||(gTempDoubleToStr[i-1] == '-')) && - (gTempDoubleToStr[i] == '0') && - (gTempDoubleToStr[i+1] == '0') && - (isdigit(gTempDoubleToStr[i+2])) ) - { - i++; - continue; - } - - /* Will skip one leading zero in the exponent */ - if( (i >= 2) && - (toupper(gTempDoubleToStr[i-2]) == 'E') && - ((gTempDoubleToStr[i-1] == '+')||(gTempDoubleToStr[i-1] == '-')) && - (gTempDoubleToStr[i] == '0') && - (isdigit(gTempDoubleToStr[i+1]))) - { - continue; - } - - gTempDoubleToStr[outIdx++] = gTempDoubleToStr[i]; - } - gTempDoubleToStr[outIdx] = '\0'; - - return gTempDoubleToStr; -} - -static void printRustFunc(const PrintFuncParamStruct *printFuncParamStruct) { - // three functions: single-precision, double-precision, lookback - printRustSinglePrecisionFunction(printFuncParamStruct); - printRustDoublePrecisionFunction(printFuncParamStruct); - printRustLookbackFunction(printFuncParamStruct); -} - -static void printRustLookbackFunction(const PrintFuncParamStruct *printFuncParamStruct) { - // TODO: open function - // TODO: print input params - // TODO: print optional input params - // TODO: close function - // TODO: print return type - // TODO: handle validation logic - // TODO: handle abstract frame logic -} - -static void printRustDoublePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct) { - // TODO: open function - // TODO: print input params - // TODO: print optional input params - // TODO: close function - // TODO: print return type - // TODO: handle validation logic - // TODO: handle abstract frame logic -} - -static void printRustSinglePrecisionFunction(const PrintFuncParamStruct *printFuncParamStruct) { - // TODO: open function - // TODO: print input params - // TODO: print optional input params - // TODO: close function - // TODO: print return type - // TODO: handle validation logic - // TODO: handle abstract frame logic -} - - -static void cnvtToUpperCase( char *str ) -{ - char c; - - if( !str ) return; - - c = *str; - while( c != '\0' ) - { - *str = (char)toupper(c); - str++; - c = *str; - } -} - -static char *trimWhitespace( char *str ) -{ - int i; - - if( !str ) return str; - - while( isspace(*str) ) str++; - if( *str == '\0' ) return str; - - for( i=(int)strlen(str)-1; i >= 0; i-- ) - { - if( !isspace(str[i]) ) - return str; - str[i] = '\0'; - } - - return str; -} - -static void cnvtChar( char *str, char from, char to ) -{ - char c; - - if( !str ) return; - - c = *str; - while( c != '\0' ) - { - if( c == from ) *str = to; - str++; - c = *str; - } -} - -static void extractTALogic( FILE *inFile, FILE *outFile ) -{ - int i, length, nbCodeChar; - int commentBlock, commentFirstCharFound, outIdx; - - #define START_DELIMITATOR "/**** END GENCODE SECTION 3" - #define STOP_DELIMITATOR "/**** START GENCODE SECTION 5" - - /* Find the begining of the function */ - while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - { - length = (int)strlen(gTempBuf); - if( length > BUFFER_SIZE ) - return; - - if( strncmp( gTempBuf, START_DELIMITATOR, strlen(START_DELIMITATOR) ) == 0) - break; - } - - /* Copy until the end of the function. - * At the same time, eliminate all empty line and - * comments to avoid confusion with original code. - */ - commentBlock = 0; - commentFirstCharFound = 0; - while( fgets( gTempBuf, BUFFER_SIZE, inFile ) ) - { - length = (int)strlen(gTempBuf); - if( length > BUFFER_SIZE ) - return; - - if( strncmp( gTempBuf, STOP_DELIMITATOR, strlen(STOP_DELIMITATOR) ) == 0) - break; - - /* Process the whole line and put it in gTempBuf2 */ - outIdx = 0; - nbCodeChar = 0; - for( i=0; i < length; i++ ) - { - if( !commentBlock ) - { - if( !commentFirstCharFound ) - { - if( gTempBuf[i] == '/' ) - commentFirstCharFound = 1; - else - { - gTempBuf2[outIdx++] = gTempBuf[i]; - if( !isspace(gTempBuf[i]) ) - nbCodeChar++; - } - } - else - { - commentFirstCharFound = 0; - if( gTempBuf[i] == '*' ) - commentBlock = 1; - else - { - gTempBuf2[outIdx++] = '/'; - nbCodeChar++; - if( gTempBuf[i] == '/' ) - commentFirstCharFound = 1; - else - { - gTempBuf2[outIdx++] = gTempBuf[i]; - if( !isspace(gTempBuf[i]) ) - nbCodeChar++; - } - } - } - } - else - { - if( !commentFirstCharFound ) - { - if( gTempBuf[i] == '*' ) - commentFirstCharFound = 1; - } - else - { - commentFirstCharFound = 0; - if( gTempBuf[i] == '/' ) - commentBlock = 0; - else if( gTempBuf[i] == '*' ) - commentFirstCharFound = 1; - } - } - } - - /* Preserve markers for proprietary code. */ - #define BEG_PROP_MARKER "* Begin Proprietary *" - #define END_PROP_MARKER "* End Proprietary *" - if( strstr( gTempBuf, BEG_PROP_MARKER ) ) - { - fputs( "/* Generated */ /", outFile ); - fputs( BEG_PROP_MARKER, outFile ); - fputs( "/\n", outFile ); - } - else if( strstr( gTempBuf, END_PROP_MARKER ) ) - { - fputs( "/* Generated */ /", outFile ); - fputs( END_PROP_MARKER, outFile ); - fputs( "/\n", outFile ); - } - else if( nbCodeChar != 0 ) - { - gTempBuf2[outIdx] = '\0'; - /* Write the code */ - fputs( "/* Generated */ ", outFile ); - fputs( gTempBuf2, outFile ); - } - } -} - -static int copyFile( const char *src, const char *dest ) -{ - FILE *in; - FILE *out; - - init_gToOpen( src, NULL ); - in = fopen( gToOpen, "rb" ); - if( !in ) - return 0; - - init_gToOpen( dest, NULL ); - out = fopen( gToOpen, "wb" ); - if( !out ) - { - fclose( in ); - return 0; - } - - while( fgets( gTempBuf, BUFFER_SIZE, in ) ) - { - fputs(gTempBuf,out); - } - - fclose(in); - fclose(out); - return 1; -} - -static int areFileSame( const char *file1, const char *file2 ) -{ - /* Text comparison of both files */ - unsigned int i; - - FILE *f1; - FILE *f2; - - - init_gToOpen( file1, NULL ); - f1 = fopen( gToOpen, "r" ); - if( !f1 ) - return 0; - - init_gToOpen( file2, NULL ); - f2 = fopen( gToOpen, "r" ); - if( !f2 ) - { - fclose( f1 ); - return 0; - } - - memset( gTempBuf, 0, sizeof(gTempBuf ) ); - memset( gTempBuf2, 0, sizeof(gTempBuf2) ); - - while( fgets( gTempBuf, BUFFER_SIZE, f1 ) ) - { - if( !fgets( gTempBuf2, BUFFER_SIZE, f2 ) ) - { - fclose(f1); - fclose(f2); - return 0; - } - - for( i=0; i < sizeof(gTempBuf); i++ ) - { - if( gTempBuf[i] != gTempBuf2[i] ) - { - fclose(f1); - fclose(f2); - return 0; - } - if( gTempBuf[i] == '\0' ) - i = sizeof(gTempBuf); - } - - memset( gTempBuf, 0, sizeof(gTempBuf ) ); - memset( gTempBuf2, 0, sizeof(gTempBuf2) ); - } - - if( fgets( gTempBuf2, BUFFER_SIZE, f2 ) ) - { - fclose(f1); - fclose(f2); - return 0; - } - - fclose(f1); - fclose(f2); - return 1; -} - - -static void appendToFunc( FILE *out ) -{ - fprintf( out, "\n" ); - fprintf( out, "/* Some TA functions takes a certain amount of input data\n" ); - fprintf( out, " * before stabilizing and outputing meaningful data. This is\n" ); - fprintf( out, " * a behavior pertaining to the algo of some TA functions and\n" ); - fprintf( out, " * is not particular to the TA-Lib implementation.\n" ); - fprintf( out, " * TA-Lib allows you to automatically strip off these unstabl\n" ); - fprintf( out, " * data from your output and from any internal processing.\n" ); - fprintf( out, " * (See documentation for more info)\n" ); - fprintf( out, " *\n" ); - fprintf( out, " * Examples:\n" ); - fprintf( out, " * TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 30 );\n" ); - fprintf( out, " * Always strip off 30 price bar for the TA_EMA function.\n" ); - fprintf( out, " *\n" ); - fprintf( out, " * TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 30 );\n" ); - fprintf( out, " * Always strip off 30 price bar from ALL functions\n" ); - fprintf( out, " * having an unstable period.\n" ); - fprintf( out, " *\n" ); - fprintf( out, " * See ta_defs.h for the enumeration TA_FuncUnstId\n" ); - fprintf( out, " */\n" ); - fprintf( out, "\n" ); - fprintf( out, "TA_RetCode TA_SetUnstablePeriod( TA_FuncUnstId id,\n" ); - fprintf( out, " unsigned int unstablePeriod );\n" ); - fprintf( out, "\n" ); - fprintf( out, "unsigned int TA_GetUnstablePeriod( TA_FuncUnstId id );\n" ); - fprintf( out, "\n" ); - fprintf( out, "/* You can change slightly the behavior of the TA functions\n" ); - fprintf( out, " * by requesting compatibiliy with some existing software.\n" ); - fprintf( out, " *\n" ); - fprintf( out, " * By default, the behavior is as close as the original \n" ); - fprintf( out, " * author of the TA functions intend it to be.\n" ); - fprintf( out, " *\n" ); - fprintf( out, " * See ta_defs.h for the enumeration TA_Compatibility.\n" ); - fprintf( out, " */\n" ); - fprintf( out, "TA_RetCode TA_SetCompatibility( TA_Compatibility value );\n" ); - fprintf( out, "TA_Compatibility TA_GetCompatibility( void );\n" ); - fprintf( out, "\n" ); - fprintf( out, "/* Candlesticks struct and functions\n" ); - fprintf( out, " * Because candlestick patterns are subjective, it is necessary \n" ); - fprintf( out, " * to allow the user to specify what should be the meaning of \n" ); - fprintf( out, " * 'long body', 'short shadows', etc.\n" ); - fprintf( out, " */\n" ); - fprintf( out, "\n" ); - fprintf( out, "/* Call TA_SetCandleSettings to set that when comparing a candle \n" ); - fprintf( out, " * basing on settingType it must be compared with the average \n" ); - fprintf( out, " * of the last avgPeriod candles' rangeType multiplied by factor.\n" ); - fprintf( out, " * This setting is valid until TA_RestoreCandleDefaultSettings is called\n" ); - fprintf( out, " */\n" ); - fprintf( out, "TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, \n" ); - fprintf( out, " TA_RangeType rangeType, \n" ); - fprintf( out, " int avgPeriod, \n" ); - fprintf( out, " double factor );\n" ); - fprintf( out, "\n" ); - fprintf( out, "/* Call TA_RestoreCandleDefaultSettings after using custom settings \n" ); - fprintf( out, " * to restore the default settings for the specified settingType\n" ); - fprintf( out, " */\n" ); - fprintf( out, "TA_RetCode TA_RestoreCandleDefaultSettings( TA_CandleSettingType settingType );\n" ); -} - -void genJavaCodePhase1( const TA_FuncInfo *funcInfo ) -{ - if (!gOutJavaDefs_H) - return; - - fprintf( gOutJavaDefs_H->file, "#define TA_%s_Lookback %c%sLookback\n", funcInfo->name, tolower(funcInfo->camelCaseName[0]), &funcInfo->camelCaseName[1] ); - fprintf( gOutJavaDefs_H->file, "#define TA_%s %c%s\n", funcInfo->name, tolower(funcInfo->camelCaseName[0]), &funcInfo->camelCaseName[1] ); -} - -void genJavaCodePhase2( const TA_FuncInfo *funcInfo ) -{ - FILE *logicTmp; - char buffer[500]; - int idx, again; - static int firstTime = 1; - int ret; - - if (!gOutCore_Java) - return; - - if( firstTime == 1 ) - { - /* Clean-up jus tin case. */ - fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode1.tmp") ); - fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode2.tmp") ); - firstTime = 0; - } - - init_gToOpen(ta_fs_path(3, "..", "temp", "CoreJavaCode1.tmp"), NULL ); - logicTmp = fopen( gToOpen, "w" ); - if( !logicTmp ) - { - printf( "Cannot open CoreJavaCode1.tmp\n" ); - return; - } - fprintf( logicTmp, "#include \"ta_java_defs.h\"\n" ); - fclose(logicTmp); - -#ifdef _MSC_VER - sprintf( buffer, "%s -c -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "TA_%s.c >>.." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp ", gmcpp_exec, funcInfo->name); - ret = system( buffer ); - - sprintf( buffer, "%s -c -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp >.." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode2.tmp ", gmcpp_exec); - ret = system( buffer ); -#else - /* The options are the quite same, but on linux it still outputs the #include lines, - didn't find anything better that to cut them with the sed ... a hack for now. */ - sprintf( buffer, "%s -@compat -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c | sed '/^#include/d' >> .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp ", gmcpp_exec, funcInfo->name); - ret = system( buffer ); - - sprintf( buffer, "%s -@compat -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _JAVA .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode1.tmp | sed '/^#include/d' > .." PATH_SEPARATOR "temp" PATH_SEPARATOR "CoreJavaCode2.tmp ", gmcpp_exec ); - ret = system( buffer ); -#endif - - /* Append the output of the C pre-processor to the Core.Java file. */ - init_gToOpen( ta_fs_path(3, "..", "temp", "CoreJavaCode2.tmp"), NULL ); - logicTmp = fopen( gToOpen, "r" ); - if( !logicTmp ) - { - printf( "Cannot open CoreJavaCode2.tmp\n" ); - return; - } - while( fgets(gTempBuf,BUFFER_SIZE,logicTmp) ) - { - /* Remove empty lines and lines with only a ';' */ - idx = 0; - again = 1; - while( again && gTempBuf[idx] != '\0' ) - { - if( !isspace(gTempBuf[idx]) && !(gTempBuf[idx] == ';') ) - again = 0; - idx++; - } - if( (again == 0) && (idx > 0) ) - fputs( gTempBuf, gOutCore_Java->file ); - } - - /* Clean-up */ - fclose(logicTmp); - print( gOutCore_Java->file, "\n" ); - fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode1.tmp") ); - fileDelete( ta_fs_path(3, "..", "temp", "CoreJavaCode2.tmp") ); -} - - -static int generateFuncAPI_C() -{ - #if defined(ENABLE_C) - FileHandle *inFile; - FILE *out; - FILE *in; - - #define FILE_INPUT ta_fs_path(2, "..", "ta_func_api.xml") - #define FILE_OUTPUT ta_fs_path(4, "..", "src", "ta_abstract", "ta_func_api.c") - #define FILE_OUTPUT_TEMPLATE ta_fs_path(5, "..", "src", "ta_abstract", "templates", "ta_func_api.c.template") - - inFile = fileOpen( FILE_INPUT, NULL, FILE_READ ); - if( inFile == NULL ) - { - printf( "\nCannot access [%s]\n", gToOpen ); - return -1; - } - gOutFuncAPI_C = fileOpen( FILE_OUTPUT, FILE_OUTPUT_TEMPLATE, FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - if( gOutFuncAPI_C == NULL ) - { - printf( "\nCannot write to [%s]\n", gToOpen ); - return -1; - } - - out = gOutFuncAPI_C->file; - in = inFile->file; - - convertFileToCArray(in, out); - - fileClose(gOutFuncAPI_C); - fileClose(inFile); - #endif - - return 1; -} - -static void convertFileToCArray( FILE *in, FILE *out ) -{ - int c; - int position; - - if (!in || !out) - return; - - position = 0; - c = getc(in); - while( c != EOF ) - { - if( position == 0 ) - fprintf( out, "0x%02X", (char)c ); - else - { - fprintf( out, ",0x%02X", (char)c ); - if( (position % 20) == 0 ) - fprintf( out, "\n" ); - } - position++; - c = getc(in); - } - -} - -static void printJavaFunctionAnnotation(const TA_FuncInfo *funcInfo) -{ - #ifndef ENABLE_JAVA - (void)funcInfo; - return; - #else - TA_RetCode retCode; - TA_InputParameterInfo *inputInfo; - TA_OptInputParameterInfo *optInputInfo; - TA_OutputParameterInfo *outputInfo; - TA_RealRange *doubleRange; - TA_IntegerRange *integerRange; - TA_IntegerList *intList; - unsigned int i, j; - #define FUNCNAME_SIZE 100 - char funcName[FUNCNAME_SIZE]; - - if (!gOutFunc_Annotation) - return; - - memset(funcName, 0, FUNCNAME_SIZE); - if (strlen(funcInfo->name) > (FUNCNAME_SIZE - 1)) - { - printf("\n*** Error buffer size exceeded (printJavaFunctionAnnotation)\n"); - strcpy(funcName, "1A2"); /* Substitute name. Will cause Java compilation to fail */ - } - else - { - if (funcInfo->camelCaseName == NULL) - { - strcpy(funcName, funcInfo->name); - for (i=0; funcName[i]; i++) { - funcName[i] = tolower(funcName[i]); - } - } else { - strcpy(funcName, funcInfo->camelCaseName); - funcName[0] = tolower(funcName[0]); - } - } - - - /* - * Generate Lookback method - */ - fprintf(gOutFunc_Annotation->file, "public int %sLookback(\n", funcName); - for(i=0; inbOptInput; i++) - { - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, (void*)&optInputInfo ); - if(optInputInfo->type == TA_OptInput_RealRange) - { - fprintf(gOutFunc_Annotation->file, " double %s", optInputInfo->paramName); - } - else if(optInputInfo->type == TA_OptInput_IntegerRange) - { - fprintf(gOutFunc_Annotation->file, " int %s", optInputInfo->paramName); - } - else if(optInputInfo->type == TA_OptInput_IntegerList) - { - fprintf(gOutFunc_Annotation->file, " MAType %s", optInputInfo->paramName); - } - else - { - printf( "Unexpected error 1 (doForEachFunctionAnnotation)\n"); - } - if (inbOptInput-1) fprintf(gOutFunc_Annotation->file, ",\n"); - } - fprintf(gOutFunc_Annotation->file, ") {\n"); - fprintf(gOutFunc_Annotation->file, " return super.%sLookback(\n", funcName); - for(i=0; inbOptInput; i++) - { - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, (void*)&optInputInfo ); - fprintf(gOutFunc_Annotation->file, " %s", optInputInfo->paramName); - if (inbOptInput-1) fprintf(gOutFunc_Annotation->file, ",\n"); - } - fprintf(gOutFunc_Annotation->file, "); }\n\n"); - - /* - * Annotate Function - */ - fprintf(gOutFunc_Annotation->file, "@FuncInfo(\n"); - fprintf(gOutFunc_Annotation->file, " name = \"%s\",\n", funcInfo->name); - fprintf(gOutFunc_Annotation->file, " group = \"%s\",\n", funcInfo->group); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", funcInfo->flags); /* TODO: should be like: FuncFlags.TA_FUNC_FLG_OVERLAP | FuncFlags.TA_FUNC_FLG_UNST_PER */ - /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", funcInfo->hint);*/ - /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", funcInfo->helpFile);*/ - fprintf(gOutFunc_Annotation->file, " nbInput = %d,\n", funcInfo->nbInput); - fprintf(gOutFunc_Annotation->file, " nbOptInput = %d,\n", funcInfo->nbOptInput); - fprintf(gOutFunc_Annotation->file, " nbOutput = %d\n", funcInfo->nbOutput); - fprintf(gOutFunc_Annotation->file, ")\n"); - fprintf(gOutFunc_Annotation->file, "public RetCode %s(\n", funcName); - - fprintf(gOutFunc_Annotation->file, " int startIdx,\n"); - fprintf(gOutFunc_Annotation->file, " int endIdx,\n"); - - - /* - * Anotate Input parameters - */ - for(i=0; inbInput; i++) - { - char idx = ' '; - /*if (funcInfo->nbInput>1) idx='0'+i;*/ /* TODO: compile Java code and see if it is necessary to distinguish parameters*/ - - retCode = TA_GetInputParameterInfo( funcInfo->handle, i, (void*)&inputInfo); - if(inputInfo->type == TA_Input_Price) - { - fprintf(gOutFunc_Annotation->file, " @InputParameterInfo(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", inputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", inputInfo->flags); - /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", inputInfo->hint);*/ - /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", inputInfo->helpFile);*/ - fprintf(gOutFunc_Annotation->file, " type = InputParameterType.TA_Input_Price\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - - if(inputInfo->flags & TA_IN_PRICE_OPEN) - { - fprintf(gOutFunc_Annotation->file, " double inOpen%c[],\n",idx); - } - if(inputInfo->flags & TA_IN_PRICE_HIGH) - { - fprintf(gOutFunc_Annotation->file, " double inHigh%c[],\n",idx); - } - if(inputInfo->flags & TA_IN_PRICE_LOW) - { - fprintf(gOutFunc_Annotation->file, " double inLow%c[],\n",idx); - } - if(inputInfo->flags & TA_IN_PRICE_CLOSE) - { - fprintf(gOutFunc_Annotation->file, " double inClose%c[],\n",idx); - } - if(inputInfo->flags & TA_IN_PRICE_VOLUME) - { - fprintf(gOutFunc_Annotation->file, " double inVolume%c[],\n",idx); - } - if(inputInfo->flags & TA_IN_PRICE_OPENINTEREST) - { - fprintf(gOutFunc_Annotation->file, " double inOpenInterest%c[],\n",idx); /* FIXME: does it exist? */ - } - if(inputInfo->flags & TA_IN_PRICE_TIMESTAMP) - { - fprintf(gOutFunc_Annotation->file, " long inTimestamp%c[],\n",idx); /* FIXME: does it exist? */ - } - } - else - { - if(inputInfo->type == TA_Input_Real) - { - fprintf(gOutFunc_Annotation->file, " @InputParameterInfo(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", inputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", inputInfo->flags); - fprintf(gOutFunc_Annotation->file, " type = InputParameterType.TA_Input_Real\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " double %s[],\n", inputInfo->paramName); - } - else if(inputInfo->type == TA_Input_Integer) - { - fprintf(gOutFunc_Annotation->file, " @InputParameterInfo(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", inputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", inputInfo->flags); - fprintf(gOutFunc_Annotation->file, " type = InputParameterType.TA_Input_Integer\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " int %s[],\n", inputInfo->paramName); - } - else - { - printf( "Unexpected error 2(doForEachFunctionAnnotation)\n"); /* FIXME: fatal error! */ - } - } - } - - - - /* - * Annotate Optional input parameters - */ - for(i=0; inbOptInput; i++) - { - retCode = TA_GetOptInputParameterInfo( funcInfo->handle, i, (void*)&optInputInfo ); - fprintf(gOutFunc_Annotation->file, " @OptInputParameterInfo(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " displayName = \"%s\",\n", optInputInfo->displayName); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", optInputInfo->flags); - /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", optInputInfo->hint);*/ - /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", optInputInfo->helpFile);*/ - if(optInputInfo->type == TA_OptInput_RealRange) - { - fprintf(gOutFunc_Annotation->file, " type = OptInputParameterType.TA_OptInput_RealRange,\n"); - fprintf(gOutFunc_Annotation->file, " dataSet = com.tictactec.ta.lib.meta.annotation.RealRange.class\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - doubleRange= (TA_RealRange*)optInputInfo->dataSet; - fprintf(gOutFunc_Annotation->file, " @RealRange(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " defaultValue = %.5f,\n", (double)optInputInfo->defaultValue); - fprintf(gOutFunc_Annotation->file, " min = %.5f,\n", doubleRange->min); - fprintf(gOutFunc_Annotation->file, " max = %.5f,\n", doubleRange->max); - fprintf(gOutFunc_Annotation->file, " precision = %d,\n", doubleRange->precision); - fprintf(gOutFunc_Annotation->file, " suggested_start = %.5f,\n", doubleRange->suggested_start); - fprintf(gOutFunc_Annotation->file, " suggested_end = %.5f,\n", doubleRange->suggested_end); - fprintf(gOutFunc_Annotation->file, " suggested_increment = %.5f\n", doubleRange->suggested_increment); - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " double %s,\n", optInputInfo->paramName); - } - else if(optInputInfo->type == TA_OptInput_IntegerRange) - { - fprintf(gOutFunc_Annotation->file, " type = OptInputParameterType.TA_OptInput_IntegerRange,\n"); - fprintf(gOutFunc_Annotation->file, " dataSet = com.tictactec.ta.lib.meta.annotation.IntegerRange.class\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - integerRange= (TA_IntegerRange*)optInputInfo->dataSet; - fprintf(gOutFunc_Annotation->file, " @IntegerRange(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " defaultValue = %d,\n", (int)optInputInfo->defaultValue); - fprintf(gOutFunc_Annotation->file, " min = %d,\n", integerRange->min); - fprintf(gOutFunc_Annotation->file, " max = %d,\n", integerRange->max); - fprintf(gOutFunc_Annotation->file, " suggested_start = %d,\n", integerRange->suggested_start); - fprintf(gOutFunc_Annotation->file, " suggested_end = %d,\n", integerRange->suggested_end); - fprintf(gOutFunc_Annotation->file, " suggested_increment = %d\n", integerRange->suggested_increment); - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " int %s,\n", optInputInfo->paramName); - } - else if(optInputInfo->type == TA_OptInput_IntegerList) - { - fprintf(gOutFunc_Annotation->file, " type = OptInputParameterType.TA_OptInput_IntegerList,\n"); - fprintf(gOutFunc_Annotation->file, " dataSet = com.tictactec.ta.lib.meta.annotation.IntegerList.class\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - intList = (TA_IntegerList*) optInputInfo->dataSet; - /*if( intList != (TA_IntegerList*) TA_DEF_UI_MA_Method.dataSet ) - *{ - * - *} - */ - fprintf(gOutFunc_Annotation->file, " @IntegerList(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", optInputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " defaultValue = %d,\n", (int)optInputInfo->defaultValue); - - if (intList->nbElement>0) { - fprintf(gOutFunc_Annotation->file, " value = { "); - for (j=0; jnbElement-1; j++) { - fprintf(gOutFunc_Annotation->file, "%d, ", intList->data[j].value); - } - fprintf(gOutFunc_Annotation->file, "%d },\n", intList->data[intList->nbElement-1].value); - fprintf(gOutFunc_Annotation->file, " string = { "); - for (j=0; jnbElement-1; j++) { - fprintf(gOutFunc_Annotation->file, "\"%s\", ", intList->data[j].string); - } - fprintf(gOutFunc_Annotation->file, "\"%s\" }\n", intList->data[intList->nbElement-1].string); - } - - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " MAType %s,\n", optInputInfo->paramName); - } - else - { - printf( "Unexpected error 2(doForEachFunctionAnnotation)\n"); /* FIXME: fatal error! */ - } - } - - fprintf(gOutFunc_Annotation->file, " MInteger outBegIdx,\n"); - fprintf(gOutFunc_Annotation->file, " MInteger outNBElement,\n"); - - - /* - * Annotate Output parameters - */ - for(i=0; inbOutput; i++) - { - retCode = TA_GetOutputParameterInfo( funcInfo->handle, i, (void*)&outputInfo ); - if(outputInfo->type == TA_Output_Integer) - { - fprintf(gOutFunc_Annotation->file, " @OutputParameterInfo(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", outputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", outputInfo->flags); - /*fprintf(gOutFunc_Annotation->file, " hint = \"%s\",\n", outputInfo->hint);*/ - /*fprintf(gOutFunc_Annotation->file, " helpFile = \"%s\",\n", outputInfo->helpFile);*/ - fprintf(gOutFunc_Annotation->file, " type = OutputParameterType.TA_Output_Integer\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " int %s[]\n", outputInfo->paramName); - } - else if(outputInfo->type == TA_Output_Real) - { - fprintf(gOutFunc_Annotation->file, " @OutputParameterInfo(\n"); - fprintf(gOutFunc_Annotation->file, " paramName = \"%s\",\n", outputInfo->paramName); - fprintf(gOutFunc_Annotation->file, " flags = %d,\n", outputInfo->flags); - fprintf(gOutFunc_Annotation->file, " type = OutputParameterType.TA_Output_Real\n"); - fprintf(gOutFunc_Annotation->file, " )\n"); - fprintf(gOutFunc_Annotation->file, " double %s[]", outputInfo->paramName); - } - else - { - printf( "Unexpected error 3(doForEachFunctionAnnotation)\n"); /* FIXME: fatal error!*/ - } - - if (inbOutput-1) { - fprintf(gOutFunc_Annotation->file, ","); - } - fprintf(gOutFunc_Annotation->file, "\n"); - - } - - fprintf(gOutFunc_Annotation->file, ") {\n"); - fprintf(gOutFunc_Annotation->file, " return super.%s (\n", funcName); - - fprintf(gOutFunc_Annotation->file, " startIdx,\n"); - fprintf(gOutFunc_Annotation->file, " endIdx,\n"); - - for(i=0; inbInput; i++) - { - retCode = TA_GetInputParameterInfo(funcInfo->handle, i, (void*)&inputInfo); - if(inputInfo->type == TA_Input_Price) - { - char idx = ' '; - /*if (funcInfo->nbInput>1) idx='0'+i;*/ /* TODO: compile Java code and see if it is necessary to distinguish parameters */ - - if(inputInfo->flags & TA_IN_PRICE_OPEN) - { - fprintf(gOutFunc_Annotation->file, " inOpen%c,\n", idx); - } - if(inputInfo->flags & TA_IN_PRICE_HIGH) - { - fprintf(gOutFunc_Annotation->file, " inHigh%c,\n", idx); - } - if(inputInfo->flags & TA_IN_PRICE_LOW) - { - fprintf(gOutFunc_Annotation->file, " inLow%c,\n", idx); - } - if(inputInfo->flags & TA_IN_PRICE_CLOSE) - { - fprintf(gOutFunc_Annotation->file, " inClose%c,\n", idx); - } - if(inputInfo->flags & TA_IN_PRICE_VOLUME) - { - fprintf(gOutFunc_Annotation->file, " inVolume%c,\n", idx); - } - if(inputInfo->flags & TA_IN_PRICE_OPENINTEREST) - { - fprintf(gOutFunc_Annotation->file, " inOpenInterest%c,\n", idx); /* FIXME: does it exist?*/ - } - if(inputInfo->flags & TA_IN_PRICE_TIMESTAMP) - { - fprintf(gOutFunc_Annotation->file, " inTimestamp%c,\n", idx); /* FIXME: does it exist? */ - } - } else { - fprintf(gOutFunc_Annotation->file, " %s,\n", inputInfo->paramName); - } - } - - for(i=0; inbOptInput; i++) - { - retCode = TA_GetOptInputParameterInfo(funcInfo->handle, i, (void*)&optInputInfo); - fprintf(gOutFunc_Annotation->file, " %s,\n", optInputInfo->paramName); - } - - fprintf(gOutFunc_Annotation->file, " outBegIdx,\n"); - fprintf(gOutFunc_Annotation->file, " outNBElement,\n"); - - for(i=0; inbOutput-1; i++) - { - retCode = TA_GetOutputParameterInfo(funcInfo->handle, i, (void*)&outputInfo); - fprintf(gOutFunc_Annotation->file, " %s,\n", outputInfo->paramName); - } - retCode = TA_GetOutputParameterInfo(funcInfo->handle, funcInfo->nbOutput-1, (void*)&outputInfo); - fprintf(gOutFunc_Annotation->file, " %s\n", outputInfo->paramName); - - fprintf(gOutFunc_Annotation->file, "); }\n\n\n"); -#endif -} - -void create_dir_recursively(const char *path) { - char buffer[1024]; - char *p = NULL; - size_t len; - - snprintf(buffer, sizeof(buffer), "%s", path); - len = strlen(buffer); - if (buffer[len - 1] == PATH_SEPARATOR[0]) { - buffer[len - 1] = '\0'; - } - - for (p = buffer + 1; *p; p++) { - if (*p == PATH_SEPARATOR[0]) { - *p = '\0'; - #if defined(_WIN32) || defined(_WIN64) - _mkdir(buffer); - #else - mkdir(buffer, S_IRWXU); - #endif - *p = PATH_SEPARATOR[0]; - } - } - #if defined(_WIN32) || defined(_WIN64) - _mkdir(buffer); - #else - mkdir(buffer, S_IRWXU); - #endif -} - -void create_dirs(void) { - // Make sure output/temp directories exists. - #define DIR_RUST ".." PATH_SEPARATOR "rust" PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" - #define DIR_TEMP ".." PATH_SEPARATOR "temp" - create_dir_recursively(DIR_RUST); - create_dir_recursively(DIR_TEMP); -} - -struct WriteRustModLinesParams { - FileHandle *out; - int writePubUse; // 0 to write "pub mod", 1 to write "pub use" -}; - -void writeRustModLines(const TA_FuncInfo *funcInfo, void *opaque) { - struct WriteRustModLinesParams *params = (struct WriteRustModLinesParams *)opaque; - FileHandle *out = params->out; - char buffer[500]; - - #if defined(RUST_SINGLE_FUNC) - if (strcmp(funcInfo->name,RUST_SINGLE_FUNC) != 0) - return; - #endif - - // Convert filename to lowercase into buffer. - int i = 0; - while (funcInfo->name[i]) { - buffer[i] = tolower(funcInfo->name[i]); - i++; - } - buffer[i] = '\0'; - - if (params->writePubUse == 1) - fprintf(out->file, "pub use self::%s::*\n", buffer); - else - fprintf(out->file, "pub mod %s;\n", buffer); -} - -void writeRustMod( void ) -{ - // Update the rust/src/ta_func/mod.rs file. - struct WriteRustModLinesParams params; - char buffer[500]; - FileHandle *out; - - if (!gmcpp_installed) - return; - - // Add rs file to ta_func/mod.rs - // A common header/footer is provided by the template file. - #define FILE_RUST_MOD ".." PATH_SEPARATOR "rust" PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "mod.rs" - #define FILE_RUST_MOD_TEMPLATE ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract" PATH_SEPARATOR "templates" PATH_SEPARATOR "ta_func_mod.rs.template" - - out = fileOpen( FILE_RUST_MOD, - FILE_RUST_MOD_TEMPLATE, - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - - params.out = out; - params.writePubUse = 1; - TA_ForEachFunc(writeRustModLines, ¶ms); - params.writePubUse = 0; - TA_ForEachFunc(writeRustModLines, ¶ms); - - fileClose(out); -} - -void genRustCodePhase2( const TA_FuncInfo *funcInfo ) -{ - // Each TA function get its own .rs file generated. - // A common header/footer is provided by the template file. - FILE *logicTmp; - char buffer[500]; - int idx, again; - static int firstTime = 1; - int ret; - - #if defined(RUST_SINGLE_FUNC) - if (strcmp(funcInfo->name,RUST_SINGLE_FUNC) != 0) - return; - #endif - - if (!gmcpp_installed) - return; - - // Convert filename to lowercase into buffer. - int i = 0; - while (funcInfo->name[i]) { - buffer[i] = tolower(funcInfo->name[i]); - i++; - } - buffer[i] = '\0'; - strcat(buffer, ".rs"); - #define FILE_RUST_FUNC_TEMPLATE ".." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract" PATH_SEPARATOR "templates" PATH_SEPARATOR "ta_x.rs.template" - - FileHandle *out = fileOpen( ta_fs_path(5, "..", "rust", "src", "ta_func", buffer), - FILE_RUST_FUNC_TEMPLATE, - FILE_WRITE|WRITE_ON_CHANGE_ONLY ); - - - /* Clean-up just in case. */ - fileDelete( ta_fs_path(3, "..", "temp", "rust_logic.tmp") ); - - #ifdef _MSC_VER - sprintf( buffer, "%s -c -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _RUST .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "TA_%s.c >>.." PATH_SEPARATOR "temp" PATH_SEPARATOR "rust_logic.tmp ", gmcpp_exec, funcInfo->name); - ret = system( buffer ); - #else - sprintf( buffer, "%s -@compat -+ -z -P -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_common -I.." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_abstract -I.." PATH_SEPARATOR "include -D _RUST .." PATH_SEPARATOR "src" PATH_SEPARATOR "ta_func" PATH_SEPARATOR "ta_%s.c | sed '/^#include/d' >> .." PATH_SEPARATOR "temp" PATH_SEPARATOR "rust_logic.tmp ", gmcpp_exec, funcInfo->name); - ret = system( buffer ); - #endif - - /* Write the output of the C pre-processor to the rust file. */ - init_gToOpen( ta_fs_path(3, "..", "temp", "rust_logic.tmp"), NULL ); - logicTmp = fopen( gToOpen, "r" ); - if( !logicTmp ) - { - printf( "Cannot open temp/rust_logic.tmp\n" ); - return; - } - while( fgets(gTempBuf,BUFFER_SIZE,logicTmp) ) - { - /* Remove empty lines and lines with only a ';' */ - idx = 0; - again = 1; - while( again && gTempBuf[idx] != '\0' ) - { - if( !isspace(gTempBuf[idx]) && !(gTempBuf[idx] == ';') ) - again = 0; - idx++; - } - if( (again == 0) && (idx > 0) ) - fputs( gTempBuf, out->file ); - } - - /* Clean-up */ - fclose(logicTmp); - print( out->file, "\n" ); - fileDelete( ta_fs_path(3, "..", "temp", "rust_logic.tmp") ); - - // Upon closing, will touch the target file only if there was a change... - fileClose(out); -} diff --git a/src/ta-lib/src/tools/post-build-bin.sh b/src/ta-lib/src/tools/post-build-bin.sh deleted file mode 100755 index 78c3433aa..000000000 --- a/src/ta-lib/src/tools/post-build-bin.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# This is a work around for a slibtool bug with --mode=execute -# -# With slibtool the gen_code binary is created in the .libs directory while GNU -# libtool outputs in the same directory as the Makefile. This means that cp(1) -# needs to be invoked with $(LIBTOOL) --mode=execute. -# -# However slibtool currently has a bug where the destination argument is dropped -# which will result in the command failing. -# -# See https://bugs.gentoo.org/790770 - -set -eu - -mkdir -p ../../../bin -cp "${1}" ../../../bin diff --git a/src/ta-lib/src/tools/ta_regtest/Makefile.am b/src/ta-lib/src/tools/ta_regtest/Makefile.am deleted file mode 100644 index 929dacfda..000000000 --- a/src/ta-lib/src/tools/ta_regtest/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ - -# ta_regrest is used for testing and should -# not be installed. -noinst_PROGRAMS = ta_regtest - -ta_regtest_SOURCES = ta_regtest.c \ - test_data.c \ - test_util.c \ - test_abstract.c \ - ta_test_func/test_adx.c \ - ta_test_func/test_mom.c \ - ta_test_func/test_sar.c \ - ta_test_func/test_rsi.c \ - ta_test_func/test_candlestick.c \ - ta_test_func/test_per_ema.c \ - ta_test_func/test_per_hlc.c \ - ta_test_func/test_stoch.c \ - ta_test_func/test_macd.c \ - ta_test_func/test_minmax.c \ - ta_test_func/test_per_hlcv.c \ - ta_test_func/test_1in_1out.c \ - ta_test_func/test_1in_2out.c \ - ta_test_func/test_per_ohlc.c \ - ta_test_func/test_stddev.c \ - ta_test_func/test_bbands.c \ - ta_test_func/test_ma.c \ - ta_test_func/test_po.c \ - ta_test_func/test_per_hl.c \ - ta_test_func/test_trange.c \ - ta_test_func/test_imi.c \ - ta_test_func/test_avgdev.c \ - test_internals.c - -ta_regtest_CPPFLAGS = -I../../ta_func \ - -I../../ta_common/trio \ - -I../../ta_common/mt \ - -I../../ta_common \ - -I../../ta_abstract -ta_regtest_LDFLAGS = -no-undefined -ta_regtest_LDADD = ../../libta-lib.la $(LIBM) - -all-local: ta_regtest - $(LIBTOOL) --mode=execute ../post-build-bin.sh ta_regtest diff --git a/src/ta-lib/src/tools/ta_regtest/ta_error_number.h b/src/ta-lib/src/tools/ta_regtest/ta_error_number.h deleted file mode 100644 index b761bd860..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_error_number.h +++ /dev/null @@ -1,297 +0,0 @@ -#ifndef TA_ERROR_NUMBER_H -#define TA_ERROR_NUMBER_H - -/* All possible failure should have a unique number different than zero. */ -typedef enum -{ - TA_TEST_PASS = 0, - - /* Error code for test in ta_regtest.c */ - TA_REGTEST_BAD_USER_PARAM = 1, - TA_REGTEST_ADDDATASOURCE_FAILED = 2, - TA_REGTEST_HISTORYALLOC_FAILED = 3, - TA_REGTEST_HISTORYFREE_FAILED = 4, - TA_REGTEST_HISTORYALLOC_0 = 5, - TA_REGTEST_HISTORYALLOC_1 = 6, - TA_REGTEST_HISTORYALLOC_2 = 7, - TA_REGTEST_HISTORYALLOC_3 = 8, - TA_REGTEST_HISTORYALLOC_4 = 9, - TA_REGTEST_HISTORYALLOC_5 = 10, - TA_REGTEST_HISTORYALLOC_6 = 11, - TA_REGTEST_HISTORYALLOC_7 = 12, - TA_REGTEST_HISTORYALLOC_8 = 13, - TA_REGTEST_HISTORYALLOC_9 = 14, - TA_REGTEST_HISTORYALLOC_10 = 15, - TA_REGTEST_HISTORYALLOC_11 = 16, - TA_REGTEST_HISTORYALLOC_12 = 17, - TA_REGTEST_HISTORYALLOC_13 = 18, - TA_REGTEST_HISTORYALLOC_14 = 19, - TA_REGTEST_HISTORYALLOC_15 = 20, - TA_REGTEST_HISTORYALLOC_16 = 21, - TA_REGTEST_HISTORYALLOC_17 = 22, - TA_REGTEST_HISTORYALLOC_18 = 23, - TA_REGTEST_HISTORYALLOC_19 = 24, - TA_REGTEST_ADDDSOURCE_FAILED = 25, - TA_REGTEST_OPTIMIZATION_REF_ERROR = 26, - - /* Error code for test in test_util.c */ - TA_TESTUTIL_INIT_FAILED = 101, - TA_TESTUTIL_SET_FATAL_ERROR_FAILED = 102, - TA_TESTUTIL_UDBASE_ALLOC_FAILED = 103, - TA_TESTUTIL_UDBASE_FREE_FAILED = 104, - TA_TESTUTIL_SHUTDOWN_FAILED = 105, - - TA_TESTUTIL_TFRR_BAD_PARAM = 120, - TA_TESTUTIL_TFRR_BAD_RETCODE = 121, - TA_TESTUTIL_TFRR_BAD_CALCULATION = 122, - TA_TESTUTIL_TFRR_BAD_BEGIDX = 123, - TA_TESTUTIL_TFRR_BAD_OUTNBELEMENT = 124, - - TA_TEST_TFRR_BAD_OVERLAP_OR_NAN = 125, - TA_TEST_TFRR_INPUT_HAS_BEEN_MODIFIED = 126, - TA_TEST_TFRR_CHECK_SAME_CONTENT = 127, - TA_TEST_TFRR_OVERLAP_OR_NAN_0 = 128, - TA_TEST_TFRR_OVERLAP_OR_NAN_1 = 129, - TA_TEST_TFRR_OVERLAP_OR_NAN_2 = 130, - TA_TEST_TFRR_OVERLAP_OR_NAN_3 = 131, - TA_TEST_TFRR_OVERLAP_OR_NAN_4 = 132, - TA_TEST_TFRR_OVERLAP_OR_NAN_5 = 133, - TA_TEST_TFRR_OVERLAP_OR_NAN_6 = 134, - TA_TEST_TFRR_OVERLAP_OR_NAN_7 = 135, - TA_TEST_TFRR_OVERLAP_OR_NAN_8 = 136, - TA_TEST_TFRR_OVERLAP_OR_NAN_9 = 137, - TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL = 138, - TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE = 139, - TA_TEST_TFRR_BAD_MA_TYPE = 140, - TA_TEST_TFFR_BAD_MA_LOOKBACK = 141, - - TA_TESTUTIL_DRT_REF_FAILED = 150, - TA_TESTUTIL_DRT_ALLOC_ERR = 151, - TA_TESTUTIL_DRT_RETCODE_ERR = 152, - TA_TESTUTIL_DRT_BAD_SUFFIX = 153, - TA_TESTUTIL_DRT_BAD_PREFIX = 154, - TA_TESTUTIL_DRT_MISSING_DATA = 155, - TA_TESTUTIL_DRT_BAD_OUTNBLEMENT = 156, - TA_TESTUTIL_DRT_BAD_OUTBEGIDX = 157, - TA_TESTUTIL_DRT_LOOKBACK_TOO_HIGH = 158, - TA_TESTUTIL_DRT_LOOKBACK_INCORRECT = 159, - TA_TESTUTIL_DRT_REF_OUTPUT_INCORRECT = 160, - TA_TESTUTIL_DRT_DATA_DIFF = 161, - TA_TESTUTIL_DRT_DATA_DIFF_INT = 162, - TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT = 163, - TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT_INT = 164, - - /* Error code for test in test_period.c */ - TA_PERIOD_HISTORYALLOC_FAILED = 200, - TA_PERIOD_NBBAR_INCORRECT = 201, - TA_PERIOD_PRICE_INCORRECT = 202, - TA_PERIOD_OPENINTEREST_INCORRECT = 203, - TA_PERIOD_TIMESTAMP_YEAR_INCORRECT = 204, - TA_PERIOD_TIMESTAMP_MONTH_INCORRECT = 205, - TA_PERIOD_TIMESTAMP_DAY_INCORRECT = 206, - TA_PERIOD_HISTORYFREE_FAILED = 207, - TA_PERIOD_DELTA_WEEKDAY_FAILED = 208, - TA_PERIOD_DELTA_WEEKDAY_FAILED_1 = 209, - TA_PERIOD_END_OF_PERIOD_ADD_FAILED = 210, - TA_PERIOD_END_OF_PERIOD_HISTORY_FAILED = 211, - TA_PERIOD_END_OF_PERIOD_CONSOLIDATED_FAILED = 212, - TA_PERIOD_END_OF_PERIOD_WRONG_HISTORY = 213, - TA_PERIOD_HISTORYCOMPARE_FAILED = 214, - - /* Error code for test in test_ascii.c */ - TA_TESTASCII_UNEXPECTED_RETCODE = 301, - TA_TESTASCII_FOREACHSYMBOL_FAILED = 302, - TA_TESTASCII_SEARCHININDEX_FAILED = 303, - TA_TESTASCII_CANTFIND_CATSYM_IN_INDEX = 304, - TA_TESTASCII_SAMPLING_FILE_NOT_FOUND = 305, - TA_TESTASCII_CATTABLE_ALLOC_ERROR = 306, - TA_TESTASCII_SYMTABLE_ALLOC_ERROR = 307, - TA_TESTASCII_CATTABLE_FREE_ERROR = 308, - TA_TESTASCII_SYMTABLE_FREE_ERROR = 309, - TA_TESTASCII_EQV_HISTORYALLOC = 310, - TA_TESTASCII_EQV_DIFF_HISTORY_PTR = 311, - TA_TESTASCII_HISTORYFREE_FAILED = 312, - TA_TESTASCII_EQV_DIFF_NBBARS = 313, - TA_TESTASCII_EQV_DIFF_PERIOD = 314, - TA_TESTASCII_EQV_DIFF_VALUE = 315, - TA_TESTASCII_UDBASEFREE_FAILED = 316, - TA_TESTASCII_EQV_BAD_FILENAME = 317, - TA_TESTASCII_EQV_ADDDATASOURCE = 318, - TA_TESTASCII_EQV_BAD_FIELD_ID = 319, - TA_TESTASCII_REFHISTORYFREE_FAILED = 320, - TA_TESTASCII_EQV_DIFF_DATA = 321, - TA_TESTASCII_CATSYM_NOT_FOUND = 322, - - /* Error code for test in test_yahoo.c */ - TA_YAHOO_ADDDATASOURCE_USA_FAILED = 330, - TA_YAHOO_HISTORYALLOC_1_FAILED = 331, - TA_YAHOO_HISTORYALLOC_2_FAILED = 332, - TA_YAHOO_HISTORYALLOC_3_FAILED = 333, - TA_YAHOO_HISTORYFREE_FAILED = 334, - TA_YAHOO_VALUE_1_FAILED = 335, - TA_YAHOO_VALUE_2_FAILED = 336, - TA_YAHOO_VALUE_3_FAILED = 337, - TA_YAHOO_FIELD_MISSING_1 = 338, - TA_YAHOO_FIELD_MISSING_2 = 339, - TA_YAHOO_FIELD_MISSING_3 = 340, - TA_YAHOO_CRS_HISTORYALLOC_FAILED = 341, - TA_YAHOO_CRS_NBBARSBAD = 342, - TA_YAHOO_CRS_PRICEBARBAD = 343, - TA_YAHOO_ADDDATASOURCE_CAN_FAILED = 344, - TA_YAHOO_ADDDATASOURCE_KPN_AS_FAILED = 345, - TA_YAHOO_HISTORYALLOC_KPN_AS_FAILED = 346, - - /* Error code for test in test_pm.c */ - TA_PM_EMPTY_TA_TRADE_LOG_TESTS_0 = 400, - TA_PM_EMPTY_TA_TRADE_LOG_TESTS_1 = 401, - TA_PM_EMPTY_TA_TRADE_LOG_TESTS_2 = 402, - TA_PM_EMPTY_TA_TRADE_LOG_TESTS_3 = 403, - TA_PM_EMPTY_TA_TRADE_LOG_TESTS_4 = 404, - TA_PM_EMPTY_TA_TRADELOGFREE_FAILED = 405, - TA_PM_ERR_INVALID_KEY_TYPE = 406, - TA_PM_TRADELOGADD_ONE_TRADE_FAILED = 407, - TA_PM_TRADELOGFREE_ONE_TRADE_FAILED = 408, - TA_PM_2TRADETST_BAD_TRADE_TYPE = 409, - TA_PM_2TRADETST_TRADELOGADD_1 = 410, - TA_PM_2TRADETST_TRADELOGADD_2 = 411, - TA_PM_2TRADETST_PMALLOC_FAILED = 412, - TA_PM_2TRADETST_PMADDTRADELOG_FAILED = 413, - TA_PM_2TRADETST_PMFREE_FAILED = 414, - TA_PM_CHECKVALUE_FAILED_0 = 415, - TA_PM_CHECKVALUE_FAILED_1 = 416, - TA_PM_CHECKVALUE_FAILED_2 = 417, - TA_PM_CHECKVALUE_FAILED_3 = 418, - TA_PM_CHECKVALUE_FAILED_4 = 419, - TA_PM_CHECKVALUE_FAILED_5 = 420, - TA_PM_CHECKVALUE_FAILED_6 = 421, - TA_PM_CHECKVALUE_FAILED_7 = 422, - TA_PM_CHECKVALUE_FAILED_8 = 423, - TA_PM_CHECKVALUE_FAILED_9 = 424, - TA_PM_CHECKVALUE_FAILED_10 = 425, - TA_PM_ERR_CHECK_NO_HANG_1 = 426, - TA_PM_ERR_CHECK_NO_HANG_2 = 427, - TA_PM_ERR_CHECK_NO_HANG_3 = 428, - TA_PM_ERR_CHECK_NO_HANG_4 = 429, - TA_PM_ERR_CHECK_NO_HANG_5 = 430, - TA_PM_ERR_CHECK_NO_HANG_6 = 431, - TA_PM_TRADELOGADD_ONE_TRADE_FAILED_1 = 432, - TA_PM_TRADELOGADD_ONE_TRADE_FAILED_2 = 433, - TA_PM_TRADELOGADD_ONE_TRADE_FAILED_3 = 434, - TA_PM_UNKNOWN_TRANSACTION_TYPE = 435, - TA_PM_REPORT_ALLOC_FAILED = 436, - TA_PM_TEST_VALUE_ID_FAILED_0 = 437, - TA_PM_TEST_VALUE_ID_FAILED_1 = 438, - TA_PM_TEST_VALUE_ID_FAILED_2 = 439, - TA_PM_TEST_VALUE_ID_FAILED_3 = 440, - TA_PM_TEST_VALUE_ID_FAILED_4 = 441, - TA_PM_TEST_VALUE_ID_FAILED_5 = 442, - TA_PM_TEST_VALUE_ID_FAILED_6 = 443, - TA_PM_TEST_VALUE_ID_FAILED_7 = 444, - TA_PM_TEST_VALUE_ID_FAILED_8 = 445, - TA_PM_TEST_VALUE_ID_FAILED_9 = 446, - TA_PM_VALUE_TO_FILE_FAILED = 447, - TA_PM_TEST_ARRAY_ID_FAILED_0 = 448, - TA_PM_TEST_ARRAY_ID_FAILED_1 = 449, - TA_PM_TEST_ARRAY_ID_FAILED_2 = 450, - TA_PM_TEST_ARRAY_ID_FAILED_3 = 451, - TA_PM_TEST_ARRAY_ID_FAILED_4 = 452, - TA_PM_TEST_ARRAY_ID_FAILED_5 = 453, - TA_PM_TEST_ARRAY_ID_FAILED_6 = 454, - TA_PM_TEST_ARRAY_ID_FAILED_7 = 455, - TA_PM_TEST_ARRAY_ID_FAILED_8 = 456, - TA_PM_TEST_ARRAY_ID_FAILED_9 = 457, - TA_PM_TEST_ARRAY_WITH_INVALID_DATE = 458, - - /* Error code related to call to ta_abstract */ - TA_ABS_TST_FAIL_GETFUNCHANDLE = 600, - TA_ABS_TST_FAIL_GETFUNCINFO = 601, - TA_ABS_TST_FAIL_PARAMHOLDERALLOC = 602, - TA_ABS_TST_FAIL_PARAMHOLDERFREE = 603, - TA_ABS_TST_FAIL_PARAMREALPTR = 604, - TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER = 605, - TA_ABS_TST_FAIL_SETOUTPUTPARAMREALPTR = 606, - TA_ABS_TST_FAIL_CALLFUNC = 607, - TA_ABS_TST_FAIL_GETLOOKBACK_CALL_1 = 608, - TA_ABS_TST_FAIL_GETLOOKBACK_CALL_2 = 609, - TA_ABS_TST_FAIL_GETLOOKBACK_1 = 610, - TA_ABS_TST_FAIL_GETLOOKBACK_2 = 611, - TA_ABS_TST_FAIL_CALLFUNC_1 = 612, - TA_ABS_TST_FAIL_CALLFUNC_2 = 613, - TA_ABS_TST_FAIL_CALLFUNC_3 = 614, - TA_ABS_TST_FAIL_CALLFUNC_4 = 615, - TA_ABS_TST_FAIL_INVALID_OUTPUT = 616, - TA_ABS_TST_FAIL_STARTEND_ZERO = 617, - TA_ABS_TST_FAIL_FUNCTION_DESC_SMALL = 618, - TA_ABS_TST_FAIL_FUNCTION_DESC_LARGE = 619, - - /* Error code related to internal tests. */ - TA_INTERNAL_CIRC_BUFF_FAIL_0 = 700, - TA_INTERNAL_CIRC_BUFF_FAIL_1 = 701, - TA_INTERNAL_CIRC_BUFF_FAIL_2 = 702, - TA_INTERNAL_CIRC_BUFF_FAIL_3 = 703, - TA_INTERNAL_CIRC_BUFF_FAIL_4 = 704, - TA_INTERNAL_CIRC_BUFF_FAIL_5 = 705, - TA_INTERNAL_CIRC_BUFF_FAIL_6 = 706, - TA_INTERNAL_FATAL_TST_FAIL = 707, - TA_INTERNAL_ASSERT_TST_FAIL = 708, - TA_INTERNAL_TIMESTAMP_TEST_FAILED = 709, - TA_INTERNAL_PSEUDORANDOM_UINT32 = 710, - TA_INTERNAL_PSEUDORANDOM_DOUBLE = 711, - - /* Error code related to CSI data source tests. */ - TA_CSI_ADDDATASOURCE_FAILED = 800, - TA_CSI_HISTORYALLOC_1_FAILED = 801, - TA_CSI_VALUE_1_FAILED = 802, - TA_CSI_FIELD_MISSING_1 = 803, - TA_CSI_HISTORYFREE_FAILED = 804, - TA_CSI_HISTORYALLOC_3_FAILED = 805, - TA_CSI_CRS_HISTORYALLOC_FAILED = 806, - TA_CSI_CRS_NBBARSBAD = 807, - TA_CSI_CRS_PRICEBARBAD = 808, - TA_CSI_HISTORYALLOC_4_FAILED = 809, - TA_CSI_HISTORYALLOC_5_FAILED = 810, - - /* Error code related to test_candlestick */ - TA_TSTCDL_GETFUNCHANDLE_FAIL = 900, - TA_TSTCDL_PARAMHOLDERALLOC_FAIL= 901, - TA_TSTCDL_NBINPUT_WRONG = 902, - TA_TSTCDL_INPUT_TYPE_WRONG = 903, - TA_TSTCDL_INPUT_FLAG_WRONG = 904, - TA_TSTCDL_NBOUTPUT_WRONG = 905, - TA_TSTCDL_OUTPUT_TYPE_WRONG = 906, - TA_TSTCDL_CALLFUNC_FAIL = 907, - TA_TSTCDL_GETLOOKBACK_FAIL = 908, - TA_TSTCDL_PARAMHOLDERFREE_FAIL = 909, - - /* Error code related to test_merge */ - TA_TSTMERGE_AC_ADDFAILED_1 = 1000, - TA_TSTMERGE_AC_ADDFAILED_2 = 1001, - TA_TSTMERGE_AC_HISTALLOC_1 = 1002, - TA_TSTMERGE_AC_HISTFREE_1 = 1003, - TA_TSTMERGE_ASCII_ADDFAILED_1 = 1004, - TA_TSTMERGE_ASCII_ADDFAILED_2 = 1005, - TA_TSTMERGE_ASCII_ADDFAILED_3 = 1006, - TA_TSTMERGE_ASCII_ADDFAILED_4 = 1007, - TA_TSTMERGE_ASCII_HISTALLOC = 1008, - TA_TSTMERGE_ASCII_HISTFREE = 1009, - TA_TSTMERGE_ASCII_BAD_PATTERN_1 = 1010, - TA_TSTMERGE_ASCII_BAD_PATTERN_2 = 1011, - TA_TSTMERGE_ASCII_BAD_PATTERN_3 = 1012, - TA_TSTMERGE_ASCII_BAD_PATTERN_VOL = 1013, - TA_TSTMERGE_ASCII_BAD_PATTERN_OI = 1014, - TA_TSTMERGE_ASCII_BAD_PATTERN_OPEN = 1015, - TA_TSTMERGE_ASCII_BAD_PATTERN_LOW = 1016, - TA_TSTMERGE_ASCII_BAD_PATTERN_HIGH = 1017, - TA_TSTMERGE_ASCII_BAD_PATTERN_CLOSE = 1018, - TA_TSTMERGE_ASCII_BAD_PATTERN_TS = 1019, - - /* Error code related to bug fix documentented on SourceForge. */ - TA_TEST_FAIL_BUG1359452_1 = 2000, - TA_TEST_FAIL_BUG1359452_2 = 2001, - TA_TEST_FAIL_BUG1359452_3 = 2003, - TA_TEST_FAIL_BUG1359452_4 = 2004, - TA_TEST_FAIL_BUG1359452_5 = 2005, - - TA_LAST_VALID_ERROR = 0xFFFF -} ErrorNumber; -#endif diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c deleted file mode 100644 index 4eccb811d..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_gDataClose.c +++ /dev/null @@ -1,723 +0,0 @@ -double gDataClose[10000] = { -111.45,110,109.04,109.22,110.9,109.69,111.23,112.05,112.71,112.64,110.73,112.98,113.53,113.89, -111.89,113.23,112.04,110.65,114.52,115.62,116.53,118.1,116.17,116.38,114.81,115.86,111.08,110.77, -109.66,108.6,109.28,109.1,108.63,108.97,109.03,108.05,106.58,105.01,105.25,105.95,105.43,105.33, -105.1,104.44,106.6,106,106.5,105.33,105.09,103.85,103.12,102.34,103.22,103.07,101.8,102.41, -105.84,106.23,106.54,106.6,106.93,105.91,105.18,103.95,105.58,106.7,107.04,107.99,105.31,105.87, -104.83,105.57,105.98,104.68,104.38,103.29,103.16,102.96,102.8,102.22,103.17,102.21,101.17,100.9, -101.46,98.49,95.21,94.58,94.29,94.8,97.12,96.18,94.93,95.67,95.16,96.46,96.62,96.52, -96.21,96.1,95.21,94.26,94.57,94.26,94.73,95,95.03,95.19,95.36,94.5,93.99,93.25, -93.45,93.76,92.71,94.11,93.28,93,93.94,93.8,91.81,90.9,92.27,92.94,93.96,96.91, -97.73,98.5,99.09,99.35,98.99,98.92,99.2,98.29,98.58,98.55,99.62,99.54,99.85,100.38, -99.17,99,99.15,99.37,98.54,97.45,97.51,97.4,97.08,97.11,96.17,99.45,100.02,100.82, -99.34,98.65,98.89,100.07,98.9,97.42,98.31,97.27,97.15,96.97,97.2,95.66,95.25,95.91, -96,96,95.44,95.3,95.36,94.77,94.12,93.64,93.86,94.23,94.12,94.48,93.51,91.25, -91.92,91.52,91.35,91.45,93.35,93.52,93.08,93.25,93.81,93.47,93.11,93.29,92.07,91.76, -92.42,92.59,92.75,92.6,91.41,91.68,91.8,92.33,91.5,90.76,91.54,91.83,91.49,91.56, -90.48,89.86,89.82,86.95,86.71,86.08,84.7,84.19,84.19,84,83.14,82.92,83.1,81.65, -81.87,81.94,81.99,82.09,82.5,82,81.21,81.61,83.42,81.87,82.24,82.94,82.47,82.21, -82.28,80.93,80.66,79.4,80.28,80.85,81.41,80.97,81.22,81.4,80.32,79.88,79.38,78.67, -78.95,79.28,79.9,79.37,79.09,77.08,76.68,75.48,75.74,75.39,75.33,75.52,75.91,76.33, -76.32,76.14,77.41,76.96,76.15,75.83,75.89,75.99,74.86,75.48,76.07,74.26,73.7,73.57, -74.24,75.48,76.47,76.67,76.42,78.09,77.77,78.02,76.82,77.59,76.56,76.63,77.15,77.1, -77.19,78.3,77.99,77.67,77.95,78.56,77.71,76.93,77.02,77.63,77.03,79.15,79.76,79.06, -79.52,80.69,79.9,80.16,80.75,80.14,79.78,79.83,80.02,80.28,80.66,81.27,82.16,82.89, -82.39,82.46,82.9,83.23,82.89,83.28,82.43,82.7,82.42,82.23,82.34,83.88,83.35,82.67, -82.11,81.66,82.02,81.86,83.31,81.64,81.98,80.75,81.16,82.1,82.48,83.81,84.17,83.45, -83.06,82.47,83.2,83.13,82.43,83.08,83.36,83.2,84.45,83.81,83.58,83.3,82.87,83.38, -82.88,81.93,81.57,81.02,81.14,80.29,80,79.96,79.94,79.9,80.24,80.63,80.1,80.2, -81.35,80.5,80.71,80.91,80.85,81.09,80.44,81.33,80.4,80.8,79.85,79.51,79.97,81.23, -81.94,81.3,81.63,81.02,80.72,80.91,80.85,81.41,81.36,83.09,83.8,83,83.17,83.57, -84.17,84.07,83.73,84.95,82.5,81.95,82.06,82.2,82.4,83.04,82.99,83.48,83.22,83.12, -82.48,82.76,83.37,83.53,83.13,83.71,85.96,86.97,87.5,88.72,89.14,88.43,88.65,89.21, -88.9,89.1,89.11,88.8,88.8,87.99,87.29,87.77,86.89,86.54,85.53,84.36,84.55,83.99, -82.84,83.15,83.61,83,82.87,81.06,81.59,81.88,81.42,82.31,82.89,83.36,83.47,83.33, -83.17,84.17,83.48,82.59,82.35,82.2,82.19,83.19,81.25,80.5,79.7,79.82,80.11,80.45, -80.22,80.36,79.5,77.99,77.41,78,78.21,77.56,78.7,79.43,80.33,80.01,80.48,80.75, -81.48,81.44,80.8,80.98,81.02,79.46,79.54,80.62,80.54,81.34,80.38,81.1,81.32,82.03, -82.6,82.76,81.15,81.3,81.3,82.5,82.19,82.66,82.02,83.5,83.36,83.36,83.12,84.06, -83.31,83.43,83.46,83.8,83.87,84.12,84.2,84.44,84.4,84.6,83.7,81.81,82.38,82.42, -81.45,80.04,78.96,79.3,77.38,75.81,74.79,74.67,74.2,74.73,75.3,73.88,74.01,75.41, -77.23,76.41,76.55,76.39,77.05,76.3,74.89,75.05,74.77,74.93,74.8,75.04,75,75.79, -77.35,76.84,75.55,77.1,77.14,76,75.81,76.51,76.41,77.16,76.36,74.29,74.34,73.16, -72.62,73.28,73.3,74.98,75.26,75.5,77.08,76.47,76.51,76.38,75.91,77.05,75.43,74.61, -74.21,74.03,72.01,75.48,76.65,76.7,83.64,84.57,85.75,86.2,87.6,88.44,89,89.57, -90.32,90.44,91.38,90.68,90.6,91.04,90.7,90.52,89.5,89.51,89.28,89.86,90.65,91.38, -91.9,91.51,92.41,92.35,92.13,91.6,92.37,92.41,92.92,93.3,92.58,92.8,92.64,92.1, -92.32,93.27,93.75,94.62,94.33,93.57,93.3,92.76,92.7,94.13,94.53,94.51,93.54,94.3, -93.86,93.42,92.89,91.98,91.95,92.19,91.79,92.38,93,93.1,94.9,94.1,94.45,95.21, -95,95.68,95.78,96.2,96.5,96.7,97.75,98.58,98.3,98.18,98.3,97.5,97.72,97.61, -97.02,96.55,96.2,97.45,97.33,97.31,96.45,96.67,97.51,96.65,96.1,97.67,97.08,95.76, -95.88,94.24,95.5,94.72,95.46,95.28,95.11,94.45,95.1,95.46,94.89,95.92,95.32,94.79, -93.61,93.37,93.37,93.28,92.38,91.2,90.47,90.11,89.75,89.5,90,89,88.43,87.39, -88.1,88.82,89.37,85.92,84.85,84.78,84.98,86,86.63,86.71,87.42,88.04,87.32,87.16, -86.72,85.74,84.98,84.48,84.16,84.43,83.88,84.31,85.72,85.7,85.74,86.12,86.37,86.72, -86.49,86.76,86.44,85.86,84.97,84.39,84.57,84.22,84.69,84.4,84.94,84.69,85.07,84.71, -84.65,85.25,84.89,85.13,84.04,84.02,83.91,82.21,83.69,84.99,83.55,83.48,85.19,85.97, -85.71,86.69,87.07,86.77,85.85,85.88,85.09,84.85,86.06,85.3,86.36,85.3,84.28,84.02, -84.13,85.25,84.1,83.89,83.65,85.35,85.7,87.04,87.5,88.15,88.29,88.71,89.55,89.99, -90.79,90.02,89.49,90.06,90.44,90.38,90.54,90.07,90.46,90.09,90.04,88.64,87.56,87.35, -87.98,88.12,88.59,88.59,88.35,88.7,87.1,87.13,87.42,87.05,86.06,85.53,86.41,87.19, -86.81,87.13,86.88,88.19,88.36,88.96,89,88.02,88.17,89.08,90.41,91.11,90.43,91.28, -90.74,91.26,90.65,91.94,92.28,93.45,93.7,93.04,93.74,93.12,93.08,93.7,94.18,94.2, -92.37,91.84,92.32,92.68,92.77,92.39,91.77,91.32,91.02,91.62,92.85,93.39,92.45,91.82, -93.3,91.21,93.06,94.53,94.59,96.45,96.39,96.84,96.82,97.04,96.5,96.79,96.54,96.79, -95.96,97.31,97.8,98.42,99.37,99.71,99.3,99.96,99.61,98.95,98.94,98.86,100.19,100, -99.39,99.23,98.01,97.38,98.8,99.85,97.9,97.51,97.7,97.1,95.32,94.02,90.31,89.7, -91.55,91.21,93.04,92.78,93.06,93.05,91.55,92.68,92.63,93.52,92.9,92.27,92.79,93.39, -93.14,92.73,93.4,93.98,92.11,92.71,92.4,91.73,90.63,91.2,90.64,91.42,90.3,90.75, -91.01,90.54,89.91,89.43,89.66,88.63,88.39,89.4,88.95,89.8,90.25,91.09,90.69,89.36, -89.95,88.26,89.34,88.49,89.14,89.68,89.48,89.12,89.34,89.9,88.52,88.42,88.15,88.46, -88.93,89,89.23,89.28,92.74,92.72,93.2,92.67,92.45,92.66,91.7,91.18,90.64,90.08, -90.35,88.33,89.45,89.05,89.41,89.4,91.34,91.39,93.28,92,90.63,90.29,88.49,88.7, -87.92,87.84,89.42,89.1,86.95,87.91,86.33,85.76,82.01,81.9,82,82.5,81.96,82.97, -82.85,83.05,82.85,83.52,81.79,81.56,81.2,81.51,81.02,80.88,80.69,79.75,79.85,81.13, -81.27,81.25,80.96,81.8,82.54,83.55,81.51,82.3,81.85,82.5,83.72,83.33,86.74,86.44, -85.42,84.89,84.03,85.47,86.25,86.09,83.95,84.74,83.59,82.5,83.42,84.35,82.49,83.63, -83.18,84.92,84.55,84.7,84.3,84.5,82.75,83.95,83.97,81.71,82,80.05,81.9,84.25, -83.82,87.33,88.04,87.36,87.57,87.69,85.26,86.08,86.18,85.77,86.45,88.99,89.9,88.7, -89.98,89,87.55,86.05,86.68,87.51,86.52,87.57,85.89,84.9,85.66,85.12,83.88,85.2, -85.75,85.63,83.36,84.26,82.88,82.79,80.07,78.75,79.01,78.71,80.07,80.47,80.79,81.91, -81.46,78.73,78.43,80.85,81.45,81.55,83.45,82.25,84.9,82.2,82,82.47,82.46,79, -78.45,75.18,75.35,75.7,77.9,77.07,77.73,76.7,77.33,77.95,77.28,77.4,79.07,78.56, -79.95,79.15,79.51,79.33,77.45,75.86,76.5,77.39,77.91,77.1,77.51,77.26,77.09,78.18, -78.2,78.3,80.32,80.11,78.42,78.99,81.05,79.7,80.54,81.3,86.05,87.59,88.58,87.51, -87.68,87,84.19,86,83.59,81.65,80.57,77.5,76.25,77.36,78.5,79.76,80.26,79.79, -78.66,79.13,80.31,81.62,80,80.17,81.44,80.8,79.59,82.32,83.06,83.69,85.21,87.3, -86.92,87.7,85.06,86.2,84.43,84.9,81.61,78.37,79.18,80.01,80.72,79.35,79.15,77.29, -77.59,78.95,81.54,81.68,82.5,80.4,78.94,78.67,76.74,76.56,74.56,72.1,74.6,74.49, -75.55,74.25,72.2,64.9,68.48,63.42,63.92,57.58,55.07,57.05,56.86,56.6,60,59.63, -61.17,58.31,60.36,62.02,63.01,59.75,63.37,63.92,64.8,69.55,71.75,72.32,72.5,71.87, -74.2,75.6,74.5,73.2,72.18,73.73,72.35,75.38,76.62,76.06,77.96,79.42,80.4,81.99, -81,81.27,82.49,79.35,76.5,74.92,71.9,71.77,71.83,71.61,69.17,67.9,65.99,67.88, -68.25,70.4,71.79,71.18,66.4,69.35,69.54,67.05,68.5,72,72.05,70.69,69.01,71, -69.21,69.41,68.76,69.67,71.3,73.5,70.51,68.58,67.6,72,71.9,70.05,68.6,69.7, -68.75,71.58,73.35,75.94,77.14,76.17,75.6,74.65,75.49,76.8,78.3,79.66,80.55,79.31, -78.11,80.45,82.25,81.6,82.08,83.1,84.35,84,83.45,84.45,85.69,85.45,84.5,85.48, -82.19,79.68,79.93,82.45,76.5,76,81.78,83.86,84.3,83.76,83.89,84.71,86.71,86.5, -87.33,87.93,89,88.95,84.81,86.2,85.35,85.6,84.19,89.01,87.74,87.41,97.25,100.84, -99.96,100.95,102.86,104,103.39,102.9,103.56,105.6,106.78,105.5,107.49,106.35,106.79,106.6, -107.18,108.5,105.24,105.09,103.71,106.3,105.67,105.9,103.02,98.12,97.83,97.15,98.3,98.45, -96.38,99.31,101.3,102.89,107.89,108.07,106.57,107.38,104.99,103.91,106.63,106.3,106.8,108, -107.89,105.55,103,108.15,109.28,108.72,107.9,110.5,114.25,119.9,117.4,118.85,118.05,120.31, -122.14,124.49,124.7,124.05,125.6,123.66,121.5,120.96,122.9,123.5,122.4,121.45,122,122.7, -123.89,122.2,121.34,121.1,120.25,123.2,121.5,119.66,120.4,120.14,121.4,116.64,114.13,115.59, -114.43,112.15,114.2,116.33,115.35,114.34,115.44,115,114.5,114.75,114.35,116.7,114.86,114.08, -113.81,113.85,113.61,109.97,109.5,109.89,108.07,108.65,108.62,111.16,110.66,108.57,105.81,105.25, -102.65,101.26,102.9,101.85,102,100.84,99.4,97.25,97.14,98.5,98.02,97.31,96.95,93.77, -92.71,91.72,90,91.3,94.45,94.8,90.5,93.4,96,96.4,93.34,96.47,96.59,98, -100.35,101.49,99.95,100.36,104.13,104.95,106.86,106.99,103,103.96,101.89,104.1,104.59,105.75, -105.01,106.2,105.86,104.95,104.08,104.19,106.25,106.51,108.18,108.8,107.06,105.21,105.85,104.7, -106,104.89,104.51,105.85,105.7,104,104.28,108.53,107.82,108.53,107.25,103.85,101.96,104.72, -106.5,112.1,112.98,114.35,113.5,115.1,113.52,113.04,112.65,112.87,112.6,113.09,114.84,114.27, -113.6,115.75,116.54,117.25,117.36,116.1,117.25,117.5,116.97,113.64,112.89,111.8,112.65,115.27, -117.8,119.6,117.4,118.01,119.04,117.44,115.07,115.8,113.58,112.56,111.81,115.2,116.98,117.7, -115.9,115.86,113.7,115.4,118.51,115.14,116.2,113.74,114.85,112.67,112,114.83,114.47,106.5, -99.7,96.75,96.2,97.43,99.05,96,97.95,98.21,92,90.39,94.66,96.18,95.04,94.41, -99.5,95.4,93.51,89.1,89.08,88.3,92.6,90.1,95.56,94.96,98.39,95.49,99.29,106.47, -107.55,106,104.91,102.3,106.05,99.9,102.59,105.3,104,108.9,107.51,111.5,115,116.78, -115.1,113.75,114.9,112,114.1,116.91,114.19,112.22,110.27,114.05,112,116.61,114.98,114.19, -110.75,110.44,109.06,108.56,111.25,108.31,96.69,92.75,93.81,93.69,93.44,92.56,93.56,94, -93.19,94.62,84.81,85,85.25,84.69,84.81,89,81.56,86,90.12,90.5,87.81,92.44, -91.25,93.87,95,97,93.12,96.75,103.37,98.37,95.62,93.5,99.81,97.87,98.44,99.94, -98.5,98.5,103.25,101.94,98.25,99.37,99.5,97.44,93,99.44,100,102.31,100.31,100.12, -101.94,98.56,98.5,93.31,93.69,92.75,87.56,91.44,92.87,94.75,96.44,95.44,113,111.12, -109.06,103.12,112,114.87,117.94,116,113.19,114.37,110.56,117.81,112.62,115.25,118,119.12, -123,123.87,121.5,124.75,124.94,123.25,125,126.87,127.69,125,124.5,129.5,133.38,131.44, -131.19,133.63,132.02,130.31,132.88,131.5,129,124.81,123.25,121.37,121.44,120.44,122.5,122.37, -122,123.25,120.62,119.75,118.75,118.87,116.31,115.87,116,114.25,110.5,112.25,111.81,110.31, -109.87,112,112.5,114.75,117.25,108.75,103.31,105.5,103.94,104,104.62,102,103.31,105.06, -101.25,105,109.5,109.56,114,113.78,109.75,114.41,111.87,111.81,114.5,116.37,120.37,113.25, -116.81,116,119.31,118.84,119.69,119.75,121,112.37,112.81,108.81,106,107.31,110.94,106.94, -106.5,109.62,107.37,109.25,106.44,106.06,107.87,109,104.19,104.44,104.44,103,109,109.75, -107.87,107.62,108.12,111.37,112,111.5,110.62,110.5,112.5,106.5,104,105,111.5,111.87, -105,110.62,113.75,119.37,122.12,123.12,122.75,125,121.19,122,118.37,122.75,119,122.5, -126.87,120.62,115.25,114.25,113.5,112.75,110,109,107,108.62,107.69,105.25,108,106.25, -103,103.06,108,103.12,100.25,102.75,104.5,108,110.5,108.75,111,112.5,116.75,115.75, -117.12,116.06,115.37,119.12,117.37,118.81,114.12,115.62,117.12,113.5,110,112.25,111.56,113.5, -116.75,119.12,121.5,121.5,119,119.5,115.75,119.62,118.25,119.5,119,118,113.5,114, -116,112.06,116,107.87,108.75,109,109.81,109.75,108.62,108,110.12,109.2,110,109.19, -107,109.25,109.7,109,113.37,118.28,116.62,116,111.87,105.27,103.42,103.06,104.19,105, -104.5,106.06,107.87,103.94,98,93.75,94.62,94.06,95.87,95,97,93.62,93.94,90.25, -91.56,94.37,94.81,96.75,98.25,94.94,93,95.5,93.87,93.94,91,107,107.12,107, -107.87,107,105.06,110,114.25,113.5,116.37,119.19,122,119.87,117.75,121,120.06,123.5, -123,125,122,125.19,127.12,130.13,125.37,130,131.94,133.31,132.38,135,134.75,130.75, -132,128.86,125.87,127.25,124.56,123.19,124,122.94,122.37,122,124.44,121.75,122.94,123.87, -128.5,127.37,123.37,121.12,123.31,119.31,122.19,123.5,123.19,118.5,119.37,122.25,125.69,125.37, -128.38,126.25,123,124.81,123.87,129,128.25,134.63,136.25,136.31,137.25,137.88,137.81,137.38, -134,132.81,131,132.25,131,129.25,124.62,122.56,123.12,122.56,122.94,123.37,124.75,120.75, -120.19,120.69,115.87,115.5,114.31,115.25,117,116.62,120.5,116,112.94,113.75,112,116, -116,236.25,221.19,223.75,230.38,232.88,235.88,238.5,237.5,239.25,246,225.5,221,218.63, -217.25,209.25,212.13,212,212.25,209.19,204.81,205,212,209.88,199.75,194.5,171.88,169.75, -166.75,170.38,177.75,179.38,180,183.44,186.31,187,186.5,183,183.94,177,177.25,178.56, -177.88,172.38,171.31,169.5,165.38,167,168.56,177.63,178.06,181,182,178,182.88,181.5, -182.19,178.88,178.38,171,166.75,167.75,168.38,169.75,173.63,173.75,176.94,177.94,171.63,174.25, -170.5,172.5,172.75,178.5,168.88,162.75,167,166,169.56,175.25,176.75,179.75,183.25,178.69, -178.31,185.63,182,179.75,197,194.5,192.25,184.94,180.63,185.5,185.06,189.25,187.56,190.19, -188.75,189.63,183,184.38,186.75,187.13,189.25,187.94,185,182.25,176.38,171.56,166.06,164.38, -165,162.88,168,165,169.44,168.19,167.19,164.25,163.5,167.44,169.88,165.13,170,166.75, -165.25,166.56,160.13,158.56,159,158,159.38,157.44,157.88,157.13,156,151.38,149.94,149, -147.88,147.38,148.38,148.5,148.75,146.19,144.38,143.06,141.56,141.81,142.69,137.88,139.38,135.94, -136.5,130.5,128.19,130.88,127.31,123.5,120.75,119.25,120.25,124.81,125.37,128.5,131.44,133.63, -133.5,130.56,132.06,127.75,128.19,124.69,126.75,130.5,130,129.13,126.56,122.5,123.5,125.94, -119.37,121.75,120.5,117.94,112.62,122.56,125.25,130.88,128.44,128.56,127.87,128.06,129.94,128.88, -125.12,125.37,126.19,128,128.5,129.88,129.13,129.75,128.75,126.81,132.75,132.5,133.38,127.87, -125.44,125.5,124.25,123.87,127.44,128.13,122,120.19,118.37,117,119.62,119.37,118.5,117.06, -115,113.87,113.69,115.19,116.75,114.81,114.12,113,112.44,112,111.75,108.12,106.12,108.81, -111,110,112.25,116.25,116,117.25,119.25,118.81,118.87,116.06,113.87,115.56,117.19,117.5, -120.06,120.25,121,121.94,123.62,123.5,125,124.62,124.94,125.81,121.87,119.62,119.31,120, -117.12,117.25,117.81,116.62,116.87,115.87,115.56,115.69,115.31,117.37,117.5,114.75,118,111.19, -107.75,107.81,109.75,106.25,104.19,106.37,104.5,104.69,106,104.69,105.81,104.44,103.87,103.25, -104.37,105.06,106,103.5,101.37,102.06,102.87,101.56,100.87,101.25,99.62,100.25,99.12,97.5, -96.12,98.12,98.94,99,102.12,101.94,104.44,105.5,105.25,102.5,102.87,102.62,102.75,102.75, -102,102.37,102.87,102.69,100.87,98,98,99.56,98.31,99.37,100.56,98.75,98.19,97, -96.5,98.12,99.19,99.37,100.12,108.37,105,103.44,102.62,102.12,100.12,100.06,104.19,104.25, -105.25,106.44,105.62,104.62,103.12,102.75,101.69,99.12,98.62,102.56,102.12,100,102,103.75, -100.87,100.37,101.62,106.5,110.37,112.87,112.25,109.25,110.37,110.75,112.56,109.5,109.75,107.37, -103.12,105.56,104.75,103.06,102.12,103.5,101.5,99.12,96.62,99,97.69,99.5,101.06,102.75, -101.94,101.62,98.5,95.81,98.25,99.37,90,98,100.37,105.12,105.19,97.5,95.44,99.87, -101.69,103.31,104.5,104.94,104.62,105.25,106.81,104.81,104.31,104.56,103.5,106,105,102.62, -101.62,101.56,103.25,103.87,99.25,98.75,99.62,99.62,96.25,97.75,98,97,100,102.87, -103.62,103.75,103.56,104.06,101.37,101.12,103.87,103.31,105,106.37,105.75,108,107.94,104, -99.94,103.62,104.37,103.44,103,105.25,107.37,107.87,106.5,106.25,104.75,105.75,106,102.87, -105,107,107.81,105.12,103,103.75,104.5,99.62,97.62,96,95.25,95.75,95.75,96.19, -95.75,94.5,94.81,93.44,91.81,90.25,91.25,90.62,91.87,91.81,87.75,89.87,89.62,89, -89.87,89.25,89,88.12,87.12,86.25,86.87,85.62,82.87,83.37,84.37,87.12,86.5,87.75, -90.12,179.25,173.38,172.5,175.13,173.75,168.75,170,173.88,173.88,173.63,173.5,167.5,167.38, -162.13,165.5,166.13,162.13,161.38,160.5,158.38,150.38,150.75,153.63,142.38,140,137.38,139.75, -137.75,137.5,137.88,136.5,133.38,133,133.13,136.63,132.5,129.25,131.13,133.75,136.75,137.25, -137,140.25,135.88,136.75,132.5,136.88,137.88,139.38,139.5,143.63,142.88,144.88,146,146.13, -144.75,146.63,145.5,144.88,145.13,143.75,143,146.88,146.5,143.88,137.63,141.25,143.63,145.25, -145,146.38,145,145.25,142.75,148.75,146,148.75,153.63,154.88,156.88,157.25,156.38,150.75, -145.75,150.5,151.75,158,168,167,165.25,165.5,164.63,167.02,163.88,163,161.88,159.88, -163.38,161.25,159.13,153.25,151.5,153.63,155.13,155.75,155.75,154.25,154.63,158.13,158.63,151.88, -148.63,152.88,151.63,156.13,157.75,160,155.63,158.5,162,162.63,163,159.38,158.13,158, -157.63,158.5,154.13,152.63,154.13,146.75,145,136.88,134.75,133.25,134.5,134.38,133.75,133.38, -130.25,128.75,127.5,129,126.37,125.62,127.37,126.5,127.37,129.25,127,130.13,129.38,125.62, -127.62,129.5,130,129.88,127.75,126.25,128.38,127.87,126.62,125,125.87,123.75,124.5,124.75, -124.37,126.5,124.12,124.25,123,123.5,124.5,123.62,122.75,122.12,117.25,118,118.12,117.62, -115.5,113.12,114.62,115.25,114.37,115.12,115,111.75,112.5,113,112.62,112.25,110.5,110, -110,110.87,111.25,109.37,112.12,112.37,113.5,112.62,109.62,109.25,108.87,107.25,107.5,107.37, -104.75,103.87,103.62,91.75,90.25,92.5,93.75,94.25,94.12,95.75,90.87,95.31,96,98.87, -99,98.37,97.87,98.5,100,101.5,99,98.87,98.62,99.75,99.62,98.62,100.75,102.12, -101.25,102.5,101.62,103.25,103,103.12,102.62,101.75,101.25,104.87,105.87,105.37,106.75,107.25, -106.87,108.25,108.75,109.25,110.37,111,112.12,110.87,108.62,109,108.62,107.62,106.37,107, -105.87,105.87,107,108.12,107.87,107.87,107.75,108.62,107.75,108.25,106.75,107,107.25,105.37, -105.5,105.25,115.5,114.12,111.5,117.5,116,117.87,119.37,117.75,119.75,117.62,110.37,111.25, -109.75,111.25,110.75,108.75,114.25,114.87,117,121.75,124.62,119.87,116.87,115.87,114.25,117.25, -114.25,117.12,117,119,116.12,118.12,122.62,127.37,128.75,124.87,125.62,124.12,120.25,119.12, -118,117.62,114.25,113.62,115.25,113.5,113.5,112.62,114.75,112.25,109.62,109,108.5,108.62, -106.5,104.75,104.12,107,103,102.25,102,96.25,87.62,87,83.12,86.37,87.25,87.25, -86.75,89.12,88.62,86.87,89.25,90.87,91.37,90.12,92,91.75,91.25,90.87,89.37,91.87, -89,90.25,93.75,94.5,95.37,96.25,96.87,94.75,95.75,95.75,96.12,94.75,96.62,97.12, -97,95.87,95.87,95.25,94.5,93,95.12,95.62,95.5,95.37,97.37,97.37,98.37,97.75, -98.75,100.5,101.5,99.62,96.87,97.25,98.25,96.5,95.87,96.12,98,99,95.37,98.25, -96.37,96.87,94,92.5,93,92.5,90.75,92,94.12,94.5,93.75,94.87,93.5,94.5, -93.87,94.37,92.87,92.75,93.87,94.37,95.75,96.75,94.12,92.25,93.37,94.62,97.5,96.37, -98.87,99.37,100.75,101.12,102.75,103.37,101.62,102.37,101.62,103.87,104.87,106.62,107.62,106.75, -111.37,113.62,112.37,112,110.75,109.25,109.12,109.87,109.62,108.87,108.62,109,107.5,109.62, -108.87,110.62,110.75,109,108.37,107.5,103.62,104.12,101.25,107,107.25,103.87,103.75,101.62, -99.75,100.62,99.5,98.87,96.75,97.62,96,97,96.12,95.37,98.25,98.62,97.5,97.12, -97.75,93.75,92.62,93,93,91.75,90.25,89.12,89.37,89.87,91.37,91.25,93.87,94.25, -93,92.62,95,96.75,96.12,97.25,95.25,93.37,93.12,94.87,94.62,95,94.37,94.25, -93.87,93.62,93.75,93.12,93.75,94.25,92.87,92.12,94.62,96.87,95.25,93.62,93.5,91.62, -89,87.12,88.25,87.87,86.37,87.12,86.75,86,84,83.87,84,83,82.87,82.12, -82.37,83,84.5,85,83.62,83.37,81.62,82.25,83.5,82.62,83.5,81.75,81.5,82, -81.12,80.62,79.75,79.75,80.25,79.87,77.25,75.37,75.25,74,74.87,74.25,74.25,74.25, -75,75.5,75.62,75.62,74.87,75,75,74.25,74.25,74.37,74.62,74.37,73.62,72.12, -71.75,72.5,72.37,72.37,74,74.25,75.37,76.5,77.25,77.5,77.5,76.37,76,76, -76.62,75.5,75.12,74,74.37,73.75,73.5,74.37,73,74.25,73.5,73.5,73.62,70.75, -71.62,70.12,70.5,70.25,69.75,70.62,71.5,70.12,71.25,71.62,71.37,71.37,69.5,70.75, -70.62,70.62,70.75,70,69.75,72.87,73.25,73.12,72.75,73.12,72.87,72.37,72,74, -73,71.87,71.12,73.5,74.25,73.87,74.5,76.12,74.12,74.37,73.87,73,74.62,75, -75.37,74.5,73.25,73.12,72.25,73.12,71.62,71.5,71.12,68.75,69.12,68.37,68.87,69.62, -69.5,68.5,69,69,69.12,69.62,69.5,70.25,70.37,71,69.75,69.75,69.25,67.87, -67.25,67.87,67.5,67.5,67.25,67.87,68.5,69.37,69.37,70,69.37,67.37,67.62,67.75, -68.12,66.25,64.87,64.62,64.37,63.75,64.62,64.12,64.5,63.25,62.38,63.13,63,62.25, -62.88,61.88,62.25,62.5,62.38,62.25,61.38,62.38,55.88,55.63,56.88,56.88,58.25,56.75, -55.88,55.63,56.63,56.75,57,56.25,57,58.75,60.38,61.13,61.5,59.88,60.88,62, -61,61.63,62.38,62.88,63.75,65,63.75,62.63,62,61.63,62.63,62.63,61,62, -63.5,63,63.63,64,63.63,63.13,61.75,62.13,61.38,60.75,61.25,58.5,57.5,57.25, -57.25,58,57,56.5,57.13,57.75,58.38,58,57.5,57.13,58.5,59.25,58.75,58.38, -52.25,53.38,53.38,53,53.88,52.38,52.88,53,52.5,53.13,53.13,53.38,53,54.63, -53.5,52.63,53.63,54,56.38,57.25,58.25,58.63,57.13,57.88,58.25,57.38,57.5,55.88, -56,55.38,54.75,52.25,52.63,52.63,53,53.63,52.88,52.88,52.88,53.5,53.63,52.63, -52.75,54.63,54.5,54,53.25,52.88,53.13,53.63,54.25,52,55.75,56.38,56.5,56.5, -57.75,57.13,56.38,58.25,58.63,55.25,55.25,56,57.13,57.5,58.63,58.75,58.13,58.63, -59.25,58.88,58.5,59.5,59,57.63,56.5,57,58.13,58.38,59.13,58.63,59.25,58.63, -58.38,59.75,57.5,56.88,56.13,57.38,55.25,53.63,53.88,53.75,53.75,53.5,53.75,53.13, -53.88,54.38,55.75,55.13,53.13,52,51.88,52.75,51.88,52.75,51,51.63,52,49.88, -49.13,50.25,49.88,49.75,50.75,50.88,47.75,46,45.75,46,46.25,44.88,44.5,45, -43.63,43.38,44,44.5,42.63,43.13,43.75,44.13,44.25,44,44,43.75,44.25,43.88, -42,41.63,41.75,41.75,41.75,41.88,41.88,42.13,42.25,43.38,43.5,43.63,43.5,43.88, -43.75,44.38,44.38,45.5,45.75,46,45.88,45.75,44.63,44.13,44,44,43.88,44.38, -43.13,43,42.75,43,41,41.63,41.75,42.25,43.25,43.13,43.38,43.75,44.38,43.38, -43.88,44.5,43.88,44,45.63,42.38,42.25,43.38,43.63,42.88,43.63,45.63,47.5,47.38, -47.63,48.13,46.63,46.63,46.63,46.88,48.25,49.25,49.38,49.38,50.38,49.75,48.75,48.63, -49.25,49.25,49.38,49.63,50.38,49.88,52,52.5,52.5,52.88,52.25,52.25,54,53.88, -53.88,52,52.75,53.25,52.75,50.38,49.75,48.38,49.25,49.63,49,47.63,47.88,47.5, -48,48.88,48.88,48.63,48.25,49.38,49.25,49.25,48.63,48.88,49.88,48.38,48.38,47.75, -48.5,49.13,50.63,49.25,49,48.75,49,49.38,51,50.25,52.25,52,52.63,52.63, -51.88,50.88,50,51.75,51.38,50.5,51.13,54.25,53.63,53.75,54.63,54.5,55.13,55, -55.63,54.88,55.88,56.63,56.13,55.25,54.88,55.25,54.25,54.75,54.38,53.75,51.88,51.13, -51.25,50.5,50.5,50.5,50,50.75,51.13,52.25,53.38,52.88,52,51.38,51.13,52.13, -52.63,51.5,50.25,49.63,49,48.88,48.63,46.38,46.88,48.38,49.5,48.25,48.75,47.75, -48.75,47.75,46.5,47,48,48.88,50.13,50.38,50.13,49.75,51.75,52.75,51.25,51.75, -48.88,51.38,53,51.88,56.13,62.88,62.38,61.75,62.63,65.37,65.87,67,67.25,67.87, -67.75,68.25,66,65.37,64.87,63.25,62.25,61.25,63.13,64.25,64.87,64.87,64.12,65, -65.87,67.5,66.25,65.87,68.25,69.12,68.87,66.87,66,67.12,65.75,67.5,69.12,68.5, -68.5,68.37,68.5,70.75,72.87,78,78.75,78.5,78.5,79.37,78.37,79.75,78.87,78.5, -80.12,80.75,81,82.75,82.25,82.5,83.62,83.25,84.37,83.5,83.75,83.12,85.5,88.37, -88,87.5,86.87,86.12,86,86.62,87.5,87.62,86.62,87.25,87.37,86.37,87.12,85.12, -86,85.87,86.62,88,88.62,88.37,88.12,88.37,88,88.5,87.12,88.25,91.62,94.25, -94.87,94.75,95.37,94.37,93.75,92.37,92.75,92.75,92.5,93.75,92.87,95,100.25,99.25, -97.87,97.87,97.62,97.5,97.87,96.75,98.12,96.87,98.25,97.87,98.62,97.25,97.12,97.62, -95.87,95.25,95,94.5,92.62,93.12,94.12,93,92,90.12,90.62,91,90.37,89, -89.75,90.62,90.62,90.75,91.12,90.87,90.5,91.75,91.5,91.62,92.5,90.75,91.62,91.75, -92.37,93.5,93.87,93.12,93.75,93.37,93.87,92.5,90.62,90.75,88.12,88.5,88.12,88.12, -89.25,90.12,90,89.5,88.62,88.5,88.25,87.5,86,85.12,84.87,82.37,83.12,81.75, -82.25,82.87,83.5,83.37,83.25,84.12,85.12,85.25,85.62,86.12,85.87,87.5,87.62,88.75, -89.62,89.12,87.75,87.87,87.37,86.37,86.62,87.37,88.25,87.5,86.87,87.75,88.25,88.25, -89.37,89.87,89.75,89.62,89.62,89.75,90.75,92.12,90.25,89.75,89.25,89.87,91.25,92.25, -91.37,90,91.75,91.87,93.25,93.75,93.12,93.5,95.62,92.87,95.25,96.37,95.5,95.37, -92.37,90.25,90.87,91.25,92.37,94.62,92.25,90.37,90.25,89,90.37,89.37,88.25,88.25, -88.25,85.75,84.87,86.25,85.5,86.87,88,88.62,87.75,86.25,85.12,89,90.25,90, -91.25,92.25,92.5,94.25,97.87,95.12,94.75,95.37,95.5,96.5,97.25,96.25,100,98.87, -99.37,100.12,100.25,99.87,96.62,96.62,97,98.37,98.25,100.25,98.87,98.25,98,98.25, -98.5,98.5,100.25,100.37,99.87,101.62,104.25,101.25,99.87,99.75,97.25,98,98.87,98.25, -99,101.12,102.62,103.62,102.25,104.87,105,105.87,104.62,104.25,104.87,105.37,104.87,103.62, -102.87,104,101.37,99.62,101,99.37,98.25,98.62,98,96.87,95.5,94.5,95.25,95.12, -94.87,94.37,95.62,95.75,95,96.5,98.37,98.5,99,98.62,98.87,99.25,99,100.37, -101,100.37,101.25,101.25,101.62,101.37,100.5,100.5,100.75,100.62,102,100.5,98.25,96.25, -96.62,99.25,99.37,98.25,98.75,99.5,100.5,98.62,98.12,99.12,98.37,97.12,97.62,98.62, -99.37,98.37,99.62,99.12,101,100.87,99.5,100.37,100.62,101.5,102.25,102.37,102,103, -103.25,105,106.37,106.12,104.37,104.12,105.12,105,104.62,104.62,101.5,103.25,103.75,104.12, -102.75,106,105.87,103.37,105.87,103.75,101.87,103.37,103.62,105.87,104,103,104.87,107.37, -108,108.25,108.37,108.5,109.5,109.75,109.87,109.25,106.87,108.5,110.62,111.25,111.25,113, -112.62,113.5,113.12,113.25,112.25,113.87,112.87,113.87,113.5,111.62,111.87,114.12,115.12,127.87, -126.62,128.13,129.13,127,129.13,131.25,132.5,132.88,133.5,130.63,131,128.75,130.88,129.75, -133.63,133.25,135.5,137.88,139.5,137.38,135,134.63,132.75,132.38,129.5,128.5,129.88,128.5, -127.37,126.87,126.75,127,124.5,124.25,122.62,121,119.25,118,119.62,117.62,115.75,109.12, -107.5,106.75,108.12,108.37,106.87,109,110.25,112.12,112.5,112.12,113,113.37,113.62,113.5, -113.87,113.87,113.75,112.75,113.5,111.5,111.25,112.87,114.37,112.87,113.37,112.5,111.5,114.62, -114.75,113.37,113.62,112,112.37,113.5,113.87,112.62,114.12,113.37,114.75,113.62,112.62,113.5, -112,113,110.25,107.5,106.5,107.87,107.87,108.37,107.25,105.5,106.37,106,106.87,108.12, -108.62,106.75,107.75,107.62,105.37,100.75,99.37,99.25,100.25,101,103.5,105.37,109.5,108.25, -107.87,107.37,108.25,109,106.37,104.37,105.37,106.37,105,106.75,107.87,108.37,107.25,105.12, -104.37,105,107.87,107.5,105.87,105.5,102.37,102.5,102.5,101.87,101.75,103.87,103.62,104.37, -100.37,96.87,99,100.5,102.25,101.37,103.75,105,104.37,103.75,102,103.25,103.12,103, -103.87,108.12,109.75,111.62,111.5,112.12,111.37,113.12,114.75,114.75,115.87,117.62,120,119.87, -120.75,122.37,121,120,119.12,117.75,119,118,117.37,117.62,118.5,117.5,117.62,118, -116.75,116.62,116.25,119.12,118,118.75,118.62,120.37,120.87,121.37,120.25,119.87,118.75,120.62, -120.62,120.75,120.37,119.5,120,120.87,119.75,116.25,118.75,118.75,117.75,117,115.37,116.12, -115.37,115.62,114.25,114,112.37,111.25,110.75,110.5,110.5,109.25,109.12,108,109,107.37, -108.75,109.37,108.87,109.37,109.37,109.12,109.87,111.12,110.87,107.12,106.37,105.87,105.5,105.87, -106.12,106.5,106.62,105.87,106.12,106,105.87,104.5,104.12,105,106.5,107.25,108,109, -108.62,107,106.25,106.25,107.75,106.5,107,105.5,105.75,105,104.87,104,103.87,103.75, -104,102.62,103.25,104.87,102.87,103.5,103.75,103.75,103.25,101.12,102.5,102.75,103.12,101, -99.62,98.37,97.75,98.62,97.25,97.25,96.87,95.87,97.5,96.75,96.62,98.62,99.5,98.87, -100.12,98.12,97.87,99.87,99,99.37,100.37,99.75,100,98.87,98,94.12,94.12,94.75, -94.5,95.37,95.12,94.62,94.75,93.62,95,95.12,95.87,97,96.12,96.87,98,98.62, -99.62,99.25,97.12,97.62,97.75,98.87,99.37,100.37,100.12,99.5,98.75,99.12,97.12,97.87, -98,98.25,98.12,97.37,96.75,97.37,96.62,98.5,97.87,100,100.25,99.5,99.87,100.75, -101.87,103,103.5,104.25,104.12,101.75,102.25,103,102,107.62,107.75,108.25,109.25,107.5, -107.5,108.25,106,108.62,109.25,109,111.5,117.5,116.25,116.5,116.12,116,116,116.12, -115.5,115.75,115.37,116.87,116.25,116,116.25,116.75,117.75,117.37,117.12,116.87,116.37,118, -116.12,116,114,113.62,113,115.12,114.75,115.5,116.25,116.12,115.5,117.5,117.12,118.25, -117.37,115.5,113.75,114,114.62,115,113.37,113,112.5,112.75,113.5,114.12,112.75,114.37, -114.75,116,114.75,114.87,114.75,113.87,114.62,112.12,111.62,112,112.25,111.87,111.5,113.87, -114.37,112,110.87,109.12,109.75,109.5,110.37,109.5,109.37,110.37,111,108.87,108.37,109.25, -109.5,109.62,109,110.12,110,109.62,108.25,109.5,109.62,109.75,109.5,109.87,111.12,112, -111.5,111.37,112.75,110.75,109.12,109.62,109.75,109.5,109.37,110.62,111.5,112.37,113.37,114.12, -114.62,114.5,114.5,113.5,113.5,112.37,112.37,113,111.37,110.87,109.25,111.12,111.12,110, -109.75,108,107.75,107.12,108.5,109.12,108.75,109.62,110,110.12,109.62,109.25,110.12,109.5, -112.5,118.12,117,117.87,118.87,118.25,118.62,119.62,119.87,121.5,120.87,120.5,119.87,121.5, -121.62,121.12,123.37,123.37,125.5,125.25,125.87,127,124.75,126,125,126.37,127,127.62, -126.62,127.75,128.38,129.63,130.63,128.75,126.87,126,123.25,124.25,122.37,123.62,124.25,125, -123.87,124.25,123.37,123.12,122.25,121.12,122,121.87,122.25,122.5,121,121.87,123.25,122.5, -123.12,123.37,122.5,123,123.25,122.75,121.25,121,120.5,120.75,120.5,120.37,119.37,121, -122.12,120.87,119.25,118.25,118.5,119.37,118.87,116,118,117,115.62,115.75,115.5,115.5, -117.5,117.12,116.62,119.75,119.87,119.75,119.12,120.25,122.25,122.87,124,122.62,120.75,120.25, -121.62,122.87,123.12,124.37,124.87,122.37,124.37,121.12,119.75,118.62,117.5,118.75,116.12,116, -114,113.87,114.5,114.87,115.37,115.37,113.87,113.25,112.25,112.87,112,113.25,112.75,112.75, -114.25,113.75,114.62,115,113.62,114.37,112.12,111.75,112.87,114,110.25,111.5,112.87,113.37, -112.25,111.62,112.75,110.87,110.75,112.75,114.62,114.62,115.75,115.12,118,119,118.87,121.62, -123.12,123.87,124.25,125.75,125.75,126.25,125.75,123.75,121.12,122.62,122.37,120.12,121.75,124, -124,125.12,126.5,124.75,125.25,125.25,126.75,126.37,127.62,126.87,129.25,126.62,127.37,127, -127,125,125.12,125.75,123,120.25,117.12,117.5,117.12,118.87,118.75,117,116,115.37, -116.62,113.75,114.37,113.25,112.62,113.12,112.5,108,108.25,108.5,109.25,108.75,109.5,110.5, -108.87,110.12,111.62,110.37,108.75,108.75,110.87,110.5,110.5,111.25,113.25,114.62,114.12,113.37, -113.12,114,114.25,113.87,113.75,112.37,112.87,113.12,114,114.12,111.37,116.12,113.62,113.37, -111.62,109.25,109.62,107.5,107.5,107.62,105.12,105.87,108.12,107,110,111.62,113.12,113.75, -114.25,114.87,115.25,114,115.5,115.5,113.75,116.62,117.62,117.25,116.87,116.5,117.25,117, -117.5,115.75,114.5,116.12,115.37,115.25,113.37,112.5,112.75,113.75,112,111.25,111.62,109.12, -107.75,108,108.62,109,109.87,110,112.37,113.75,112.75,111.87,113.25,110.5,111,110.37, -111.75,117.75,119,115.87,116.12,115.25,117.75,114.87,123.37,122.87,121.87,120.75,115.5,117, -116,115.75,119.87,119.5,118.25,118.25,117.25,115.5,118.87,116,115.12,110.12,111,114, -111.5,109.5,107.75,106.5,110.5,111.25,110.75,114.87,117.62,118.5,117.5,117.75,115.62,118.37, -117.75,120,121.62,122.25,119.25,117.75,118.12,119.5,123.75,120.62,121.87,124.5,122.5,120.25, -118,118,112,120.75,120,122.75,115,103.25,135,140.13,145.25,148.75,149.5,147.38, -151.5,152.75,151,156.5,155.25,154.63,150.75,150.5,152.75,156,155.88,154.25,155.75,150.5, -155.38,157.88,156.63,157.5,162,161.13,157.75,157.25,157.75,160.75,161.63,162.5,162.88,168.38, -166.5,166.25,167.88,172,174.63,174.75,174.75,172.63,172.88,174.5,173.25,173.38,170.38,169, -166.75,164.38,163,160.25,159.38,159.25,161,162.38,161.5,161.25,162.13,161.25,160.13,161.38, -162.75,164.63,167,168.13,168,167.5,169.88,167,166.25,166.75,163.88,165.13,164.25,164, -162.5,165.38,166.5,167.88,166.13,164.88,163.25,161.38,160.88,161.38,162,159.63,156.63,157.63, -157.75,159.88,161.25,160,161.38,160.25,157.25,159.63,160,162.63,161,160.63,156.63,157.25, -156.63,156.75,161,160.63,165.13,166.25,165.38,163,163.75,164.88,166.75,166.88,163,160.63, -160.13,158.63,155.25,154.25,151.75,154.25,154.25,157,150,150,150.88,148.13,147.63,145, -144,147.25,146.5,149.38,149.5,148,151.13,150.13,152.38,150.75,154,155.63,152.88,149.75, -148.63,147,146.25,147.13,144.63,144.88,144.25,141.75,142.88,138.88,139.38,140.38,139.88,138.13, -138.5,139.5,139.38,141.75,143,143.38,139.63,139.13,138,138.38,134.5,132.63,134,133.38, -133.75,135.75,136.88,135.13,133,132.25,128.75,128.63,130,129.38,127.25,126.25,127.37,122.75, -122.75,125.25,120,120,118.62,116.5,120.37,122.25,122.87,123.5,123,123.62,122,120, -120.87,120.62,122,122,120.5,123.12,125.12,125.37,126.75,128.13,127.62,126.5,128,128, -126.87,127.75,126.62,127.75,128.63,129.88,127.37,127.12,126,127.12,124.62,123.25,123.5,123, -120.5,122,121.37,119.87,122.75,123.75,123.12,121.5,121.37,123.12,125.87,126.37,123.62,122, -120.87,120.75,122.12,121.37,121.5,120.37,121.37,120.25,121.87,121.12,123,120.87,122,123.62, -122,127.5,128.13,133.5,130.88,133,133,134.5,134.25,135.5,135.75,137.5,139.25,138.63, -136.88,138.38,137.63,138.25,137,137.38,139.25,144.13,143.88,143.75,140.38,139.38,136.13,136, -138.75,140,141.13,141.13,139,138,138,139.25,136.75,135.38,133.13,134.25,134,132.5, -131,130,131,131.13,130.88,131.63,131.38,132.5,132.25,131.25,132.38,134.13,133.13,133.13, -133.63,131.88,131.75,132,133.13,135.75,139.25,143.13,145.75,144.25,144.63,145.25,149,149.5, -148.63,146.5,147,146.75,147.5,146.5,145.13,147.5,145,146.38,146.88,148.5,149.63,148, -149.13,148.38,146.75,149.88,150.75,150,152.75,152.25,152.38,152.88,151.38,147,143.88,143.38, -144.5,146.25,144.13,144.88,145.38,148.13,148.88,150,149.75,149,151.25,154.25,155.63,154.13, -156.88,156.25,159.38,161.38,159.5,157.63,155.25,153,154.88,152.63,154.63,154.75,152.63,152.38, -149.75,150.25,149.25,152,149.5,148.25,149.63,151,149.13,151.5,149.13,147.63,148,148.88, -149,150.13,151.63,152.38,150.88,150.38,150.5,149,152,148.5,146,146.75,148.38,149.75, -151.25,150.88,155.88,158.25,157.5,158.88,159.75,159.13,157.5,158.88,156.25,155.63,155,156.75, -157.25,155.75,155,154.88,154,154.63,151.5,149.5,151,151.75,149.63,150,148,144.25, -149.5,149.38,150.88,156,152.63,149.25,149,148.5,150.38,148.88,155.63,154.38,154.38,152, -155.5,158.25,155.38,153.25,152.75,154,154.25,153.75,152.88,152.5,152.25,150.25,148.63,149, -146.63,144.63,141.75,140.75,141.88,138.63,137.88,139.75,140.25,139,139,139.5,140.25,139, -138.25,138.5,136.75,136.63,135,135.38,134.63,132.5,132.13,132.88,133.38,132.25,130.88,129.88, -131.13,130.5,129.38,128,128.63,130.5,129.13,127.5,127.62,128.5,129.38,128,128,125.62, -124.37,124.25,124.37,124.25,123.5,124.37,124.37,126.62,123.87,123.75,124,126.75,128.13,126.75, -128,127.5,126.75,128.38,127.5,127.12,127.25,127.87,129.38,129.13,128.38,127.25,127.12,126.62, -127.5,128,128.25,128.25,126.87,126.62,128.38,127.5,125.87,125.75,126.37,126.75,126.62,127.12, -127.37,128.38,129.25,129.38,131.25,131.63,132.5,131.38,130.5,129.63,132,130.25,129.13,129.38, -129.88,129.25,128.75,129.38,128.5,125.5,124.25,123.75,123,121.25,123.5,124.5,123.75,124.37, -124.87,123.75,124,123.12,122,120.87,119.37,118.75,119.37,119.87,120.12,121.12,118.62,120.75, -126,127.62,127.37,129.75,128.5,129.75,129.13,128.63,128,129.75,130.38,130.88,131.38,132.63, -133,133,130.75,129,128.5,128,130.25,130.13,127.87,127.12,125.75,124.75,125,125.37, -125.62,126.5,126.25,127.12,128.88,128.63,129,127.75,127.62,127.5,129.63,129.75,129.25,128, -127,125.87,124.62,123.87,127,126.5,127.75,128.13,127,126.62,126.37,125.37,124.5,127.75, -128.75,129.38,130.5,128.38,128.63,128.88,130,131.88,131.5,129.63,130.13,132.88,135,135, -135.88,134,133.13,134.5,133.88,132.88,133.75,133.75,131.88,131.38,132,133.75,131.75,133.5, -137.25,137.13,135.38,136.5,137.63,135.63,136.38,136.63,137,134.63,133.25,133.13,132.5,129.63, -128.25,124.12,123.62,123.87,124.62,124.75,122.75,123.75,120.37,119.75,120.37,119.75,120,121, -123.12,123.5,123.12,123.75,124.25,123.75,122.37,123,123.12,119,118.75,117.75,118.75,119.12, -117.87,117.12,118.5,117.87,120.25,120,121.75,122,123.12,124.75,122.62,122.62,121,121.25, -120,121.5,122.75,123.12,122.75,124,123.25,125.75,125.75,127.5,126.75,125.87,126,124.62, -126.75,124.87,124.12,125,126.75,126.62,125.75,125.12,126,121.87,121.25,122.5,121.87,120.25, -121.62,120.5,121,121.25,121.87,121.25,121.75,122.62,124.25,125.75,124.62,124,123.75,124.25, -126,125.87,126.62,127.62,126.75,126.12,122.5,122.25,122.75,121.62,123.37,122.5,122.5,123.75, -123.62,124.25,125.37,124.75,125.5,124.87,124,125.87,123.25,123,123.12,121.87,121.25,122.25, -121.12,122.75,118.5,121.25,121.75,120.25,114.87,112.87,110.62,108.37,109,108.25,107.12,105.37, -106.12,107,106.75,107.25,108.12,107.25,105.25,104.37,105.25,107.12,107.25,105.75,106.25,107.12, -105.75,105.75,105.12,103.12,104.12,105.5,105.25,105.87,102.12,102.62,101.75,99.12,100.75,104.37, -104.5,104.25,105.75,105.62,105.75,105.37,108.25,107.87,107.75,107.5,106.62,107.25,106.75,107.75, -107.87,108.62,109.37,110.5,111.87,113,112.25,111.25,112.37,112.87,114.25,113.25,112.75,115.62, -116.25,116.5,113.75,113.25,113.25,111.87,110.75,109.87,110.75,111.12,112.25,112.75,111.25,112.5, -108.87,110,109.62,109.75,108.75,111,112,112,113.87,113.75,115.37,113.87,112.25,112.25, -112.75,114,114.75,114,113.75,112,111,110.62,110.25,108,108.5,107.62,109.25,111, -112,111.5,110.25,110,112.87,111.25,109.25,109.12,109.37,109.75,109.62,109.62,110.87,109, -109.87,109,107.75,110.5,108.75,110.75,114.37,113.75,114.12,113.87,114.87,114.62,115.37,116.75, -116.12,117,118.87,120.5,121,120.5,119,121.25,122.25,122.25,123.25,123.5,124.25,123.87, -121.75,122,123.12,124.25,124.62,123.62,122.87,123.62,121.75,121.25,120.87,119.5,120.87,122.12, -124,122.25,119,119.25,117.62,118.62,117.87,118.87,117.37,121.62,119.25,121,120.87,123, -125.25,123.5,123.37,124.75,124.5,127.5,126.87,125.25,123.62,122.25,122.12,122.25,123.87,126.5, -126.75,126.75,128,129.38,128,128.5,128.25,127,129.75,130.5,128.75,131.75,131.75,133.63, -132.63,133,134.25,132.25,132.13,131.13,129.88,128.13,126.87,127.87,128.75,127.87,128.63,126.62, -124.62,123,123.87,123.75,123.12,121.75,122.87,122,121.5,122.25,122.25,122.37,121.87,119.75, -118.62,119.5,117.37,119,117.87,116.25,116.5,119.37,121.25,122.5,121.62,123,121.62,120.5, -118.5,117.75,118.12,118.12,119,119.75,119.5,121.25,120.5,120.75,120.37,122,123.37,125.75, -125.87,124.37,125.5,125.37,120.87,119.87,120.12,122,121.25,120.87,123.25,121.5,119.75,121.62, -119.25,121,120.25,120,118,120.87,123,123.25,123.5,123.12,122,121.12,121.75,121, -118,117.25,114.25,113.75,113.37,113.12,115.75,114,113.5,111.87,111.25,113,114.37,115.62, -114.62,112.5,110.75,111.25,114,114,115.25,116.5,115.5,115.5,116.87,117.5,117.62,115.75, -116.5,115.5,115,117,117.25,116,117.12,114.5,117.25,115,115.12,111.5,112.62,110.12, -109.5,108.75,107,106.62,103.87,103.25,102.62,102,102.37,101.75,104.25,102.87,102.37,102.12, -102.25,102.12,100.12,100.75,99.87,98.87,98.87,100.87,100.5,100.75,100.25,102.25,100.87,103, -102.25,101.87,102.12,101.75,99,100.37,100.87,98.75,97.12,98.62,98.37,98.37,98.87,99, -96.37,96.37,94.5,95.12,97.12,97.37,95.5,96,97,98.87,97.37,97.62,95.12,96, -93.87,94.62,97.87,98.5,99.62,99.25,99.12,98.62,98.12,98,98,96.62,97.62,96, -95.62,93,96.25,96.12,96.62,95.12,96.37,93.62,93.5,95.75,92.5,93.37,90.75,89.37, -91,93.87,92.75,93.62,94.5,95.12,92.75,88.25,88.25,86.5,86.5,82.5,83.37,82.75, -81.25,80.5,83.5,83.75,84,82.12,82.25,85.37,85.37,84.37,85.75,83.37,84.25,84, -85.25,81.87,81.5,79.87,79.62,81.62,82,80,82.75,84.75,84.5,82.12,83,79.5, -80.12,83.5,82.75,83.5,81.12,80.37,79,75.12,74.5,74.12,73.37,74.75,76.25,76.62, -76,76.37,75.5,76.75,74.75,74.12,74.12,73.37,72.5,72.87,71.37,71.87,72.5,72.5, -72.12,71.37,69.75,70.5,69.87,69,69.12,69.12,68.37,69.37,68.25,66,65.75,66, -62.88,62.88,62.25,62.38,63,63.25,63.13,63.88,65.62,66,66.75,65.62,65.5,64.87, -65.5,65.87,66.5,66.62,67.5,67.37,65.87,66.75,66.75,66.87,64.5,66.87,62.5,61.5, -61,60.38,60,60.63,60.63,61.13,61.13,60.25,60.5,61.13,59.88,58.63,58.38,58.5, -59.5,59.75,59.13,59.63,58.75,58.13,58.25,60,60.25,61.5,62,61.75,61.5,62, -62,61.88,62.25,62.63,63,62.5,62.75,62.88,63.63,63.63,63.88,64.37,63.88,64.75, -64.87,65.12,64.75,64.5,64.25,64.12,64.87,65.12,66,65.75,64.37,63.88,63.25,63.75, -64.5,64.62,63.63,62,62.13,62.25,61.75,61.75,61.5,61.5,61,59.75,60.38,59.88, -59,59.75,59.13,59.5,59.13,57.63,57.88,57.38,57.38,58.88,57.88,58.25,59,58.63, -57.5,58.5,59.13,59.88,61,62.13,61.88,61.63,62,60.88,60.38,62.38,62.75,62.25, -62.25,61,61.25,61.88,61.38,61.5,63.25,63.25,62.75,63,62.63,63.63,64.37,62.63, -61.75,62,61.63,62.5,61.5,61,61.88,59.75,58.88,57.38,57.5,56.75,56.75,56.75, -56.75,57,58.25,56.88,57.25,56,56.5,57,56.13,56.88,56.38,56.75,55.75,54.13, -53.63,53.38,54.38,54.63,53.88,53.25,53.5,54.63,54,53,54.13,54.5,54.5,52.63, -52.25,50.5,50.63,50.38,50.38,51,51,51.63,52.75,52.5,52.25,51.63,50.88,51.5, -52.38,53,53,51.5,49,49.5,50.75,50.63,51,51.13,51.38,51.63,51.25,51.25, -52.25,52.5,53.75,55.5,55.88,55.5,55,54.25,55.13,55,54,54.13,53.25,54.88, -53.63,54.63,54.5,54.38,54.88,54,54.13,54.88,55.5,55.88,55.75,54.75,54.13,54, -54,54.63,55.75,56,55.13,55.88,55.25,55.5,55.88,55.88,56.88,57.25,57,56.63, -56.75,58,58.25,57.88,58.75,57.88,57,56.88,58.38,58.25,56.5,56.13,56.38,55.38, -55.38,55.63,55,54.88,55.13,55.5,55.38,56.13,56.63,56.63,56.88,55.88,56.38,56.63, -56.63,57,57,56.88,56.88,57.88,57.88,58.75,59,59.5,59.38,58.13,57.5,57.63, -58.5,58.88,59.88,59.38,59,57.88,57.38,58.25,58.38,58,59.13,59.88,60.25,58.75, -58,57.88,56.13,55.5,55.63,56.38,56.63,56.75,56.38,56.63,56.75,56.75,56,57.88, -57.38,57.88,57.75,58.38,59.13,58.63,59.63,60.38,61.13,60.63,60.38,60.38,60.5,61.63, -60,59.63,59.13,60.13,60.75,61.75,60,60,60.38,61.13,62.13,63,62.38,61.5, -61.75,63.13,63.88,62.25,62.88,63.13,63.75,64.75,64.25,64.62,63.25,64,62.25,62.5, -63,61.88,62,61.88,62.5,63.63,64.25,64.75,64.25,62.13,62,60.5,61.25,62, -62,61.75,61.75,62.63,63,63.5,64.25,64,64.5,64.25,63.38,64.37,64.87,64.62, -65.5,65,65,65.25,65.12,65,66.62,66.87,65.75,66.75,66.5,66.75,67.37,67.62, -69.5,71.5,70.25,69.12,67.87,68.62,68,69,68.5,67.25,67.12,64.62,63.63,65.25, -66.25,64.5,65.75,64.5,63.75,66.12,66.37,67.5,68.37,68,67.87,66.5,68.12,68.75, -69.5,70.37,70.37,72,71.37,72,71.62,71.62,71.25,70.87,67.12,67.25,67.12,66.5, -68.5,67.5,66.62,65.12,65.5,66.62,66.12,66.62,65.87,67.75,68,68.5,68,68.62, -70.37,69.75,70.5,69.25,70.12,70,67.75,68,66.25,65.37,64.62,64.12,63.75,64.62, -66.12,67.5,66.87,68.12,67,66.5,67.25,65.62,66.12,65.87,66.37,65.75,66.12,64.25, -66.5,66.62,67.5,66.12,65.5,65,65.87,66.75,67.12,67.37,67.5,66.87,66,66.37, -68.75,68.87,66.75,66.75,66.75,65.25,65.75,65.62,64.25,64.75,65.12,65.25,65.5,65.12, -65,64.37,64.75,64.87,65.12,66,65.12,65.62,64.25,63.75,65,62.75,61.63,61.5, -61.75,62,61.13,60.63,59.5,58.75,59.75,59.25,59.75,59.38,58.88,57.88,57.88,59.63, -58.88,60.38,58.88,58,58,57.5,56.75,57.13,57,58.13,56.38,56,55.38,54.38, -56.38,55.25,54.75,53.75,52.88,52.75,53.38,53,52.5,53,53.25,52.25,52.13,53.88, -55.13,54.88,55.38,54,54.38,54.88,54.88,54.5,55.38,53.75,53.5,53.88,51.25,51.25, -51.25,51.13,52,53,53.5,54.25,54.63,53.5,53.38,54.88,55.5,54.88,55.75,55.88, -57.5,53,54.75,54.13,56.75,58.25,58.88,59.63,59.13,59.88,60.13,61.38,62.25,61.63, -61,61.13,62,63.25,62.75,63.5,63.38,62,65,65.12,66,66.25,67.25,67, -67.62,68.12,69.37,68.87,66.75,67.25,67.12,68.37,69.62,69.12,69.37,68.62,70.37,70.37, -71,70.12,70.62,71.25,69,69,69.62,69.25,70,70.12,66.87,67,67.5,65.37, -67.37,63.13,63.38,63.5,62.5,64.37,64.25,64.75,64.87,64.87,64,65.12,64.37,64, -65.37,66,65,65.25,65.62,66.37,66.62,67.25,65.75,65.37,65,65.25,65.75,65.75, -64.5,64.62,62,61.63,61.63,61.88,62,62.5,62.5,62.25,62.88,61.75,61.88,61.5, -62.75,63.13,63.25,63.5,62.38,64,62.5,62.25,62.13,62.5,62.75,62.5,61.88,62.88, -63.25,64.12,65.37,65.75,66.5,67.75,66,67.37,68.87,68.62,68.25,68.25,67.62,67.75, -68.25,68.12,68.62,67.87,70,71.25,67.75,67.87,68.5,67.87,66.75,66.25,66.5,67.5, -67.75,67.62,68.25,68.62,70,69.5,69.62,70,70,69.62,69.62,70.5,70.87,71.62, -71.25,71.62,72.25,70.25,70.25,70.37,68.87,69.37,70.75,69.25,68.87,69.62,70,69.75, -69.12,68.5,68.5,69.5,68.87,69.12,69.75,69.5,69.5,69.25,70.5,70,70.12,71.62, -72.25,73.5,73.62,72.12,72.37,72.37,73.37,73.87,73.5,72.75,73.87,74.12,73.5,73, -72.62,72.75,74.25,74.62,75.37,78,77.5,77.37,77.87,77.5,77.87,76,76.25,304, -303.63,307,306.75,306.75,306,309,308.25,307.5,309.5,306.75,305,308,308.38,307.25, -309.75,312,309,311.25,319.75,318,315.63,314.25,310.5,308.88,312,310.25,310,306.75, -308.88,312,312.5,311.63,311.75,312,320,319,318.5,320.75,317.5,319.5,314.13,315.5, -317.75,317.75,320.75,312.25,315,316,316,310.5,310.63,308.75,306.88,307.5,308.5,310, -307.75,309,304.75,303.88,306.13,300.75,301,300,299.13,304,302.25,303.63,306,308, -306.5,308.25,305.5,308.13,306.63,301.75,299.63,298.5,303.5,305.75,308.25,311,308.75,312, -311.25,313,312,308.5,311.25,311.5,306.5,311,310.25,309.63,315.5,312.75,311.5,305.38, -306,304.5,306,305,306.5,303.5,298.5,304,302.5,309.5,295,283.75,284.38,282.88, -270.13,275.38,274.25,274.25,276,278,274.25,276,278,277.88,273.75,273.38,269.5,265.5, -267.88,271.25,269.38,268,264,263.75,261,261,258.5,260,259.75,263.63,263.75,265.88, -262.25,264.13,268.5,269.38,276.13,264.25,273,269.5,272.63,273.75,275,278,277.13,276, -279.75,279,279,286,287,290.5,281.25,283,278.75,279,282,276.63,280.5,277, -277,275,281,280.5,284,284,284.5,286.5,289,289.75,293.5,295,300.88,299.5, -304.5,299.25,300,301,293.5,291.88,293,292.5,295,297.25,297,297.75,296.5,293.38, -293.75,295.25,296.75,291.5,288.63,289,287.5,288.75,289.75,286,288.5,285,293,279.13, -281,278.63,276.25,273.5,273,271,270.25,268.13,269.75,264.5,266,267.5,259.38,258.38, -258.75,260,260.5,258.38,258,256.75,257.25,259.63,261.75,260.88,258.25,262.5,266.38,268, -265.88,269.25,266.25,270,271.13,274.25,267.88,269,268,265.25,266,265.88,260.75,257.13, -258.25,261.13,260.75,261.25,262.5,263.13,266.75,262.13,264.5,266,267.25,266,262.63,265.25, -259.75,260.25,259.63,262.5,260.63,263.25,266,267,266,261.5,262.38,261.75,258,254, -253.5,253,251.25,251.13,243.5,239.5,236.25,239.88,241,240.88,240.63,241.38,238,236.25, -235.5,237.88,238.5,239.63,238.25,239.75,239.5,239.25,240.75,243.88,243.25,240.13,242.25,239, -242.75,244.25,246.13,244.75,240.88,245.25,249,251.5,251.25,253.75,256.63,256,254.75,255.25, -255.25,256,257.25,257.25,258.38,258,259.75,260.13,260.75,258.5,258.63,263.25,265.5,265.5, -266.88,265,264.25,265.88,266,265.38,266.25,267.5,269.25,269,267.5,266,266.63,266.13, -267,268.88,267,266.88,270.75,268.75,273.5,272.75,271,270.25,270.25,267.5,266,264.25, -263.13,263.75,264.75,266.25,264.25,263.25,264.5,262.38,261,260.5,263.13,264.5,263,264, -262.88,267,268.75,268.5,266.25,260.5,260.25,258,257.88,261,258.25,260.13,259.25,252.75, -251,252,253,250,249.63,255.75,257.25,258.88,260.25,260.5,257.25,258.75,258.75,257.75, -256,257.38,258.75,257.88,257.5,255.25,256.5,258,257.25,257.88,257.38,259,262.5,261, -260.38,259.5,258.25,259.5,257,257.63,256.25,259,255.75,259.25,262.75,263.13,262.75,262.75, -262.75,265.38,267.88,268.38,268.5,267.13,268.38,266.63,269.5,267.63,267.25,268,270.13,271.25, -269.13,268.5,268.75,267.75,269.38,266,266.13,268.25,265.63,264,266.5,269,269.75,269.25, -269.75,268.13,267,267.5,271.63,273.88,273.25,273,273,274.88,274,270.13,261.13,259.5, -259.88,259.13,261.5,259.88,261.5,261.63,264,265.25,264.13,267.13,266,262,260.38,259.75, -260,257.5,257.25,258.75,258.5,253.5,251.63,251.25,252.88,252.88,250.5,250.75,246.5,248, -245.5,245.25,249,247.13,247.5,245.38,249.88,252.25,254,255.38,253.25,253.25,252.38,252.75, -255.25,255.25,256.25,260.5,262.88,261.25,260,258.75,259.75,261.25,259.5,258.25,258,264, -270,271.13,272,272.5,272,273.75,278.75,276.63,276.75,275.5,274.5,275.75,278,276.5, -276.63,280.63,279.25,277.5,280.13,282.5,285.5,283.25,283.5,283.5,284,285.25,284,283.25, -284.5,279.63,280.13,280.5,278,278.25,276.5,277,276,275.5,275.5,276.25,275.75,270.13, -270.5,271.5,272.25,274.25,267,269,268,270,270.5,269,271.13,274.25,276.5,275.25, -272.5,268.5,268.25,269.75,271.75,274,273,277.5,275.25,273,270.5,270.5,269,269, -271.25,272,274,274,273,276.5,279.13,280.5,276.5,278.5,277.5,271.63,270.25,270.38, -265.75,265,267.25,268.75,269.88,270,271,271.5,272.75,270.75,273,272,269.5,269.5, -271,271.38,274.13,272.25,269.38,271.5,270,271,267.5,263.5,264.25,262,264.5,261, -260.25,259.5,262.25,267.38,268,271.25,271.75,266.5,266,263.5,259.5,256.5,257.25,263.5, -263.5,263.63,262.5,264.5,272.5,271.75,278,278.25,281.25,279.5,279,280,280.5,281.38, -281.5,283.88,286.75,283.75,284.25,285.5,287.75,284.25,284,284,278.25,278,277.63,279.5, -278,277,280,278.5,276.38,276.88,273.63,272.25,269.75,268.88,272,269.5,273.5,273, -275.25,279.5,280,279.38,278.25,277.5,277.38,278.5,274.5,275.25,274.63,276.75,275.88,271.75, -272.13,273,273,272.25,275.5,273,272.5,271,270.5,272,274.25,276.25,276.63,277.63, -279.75,278,276.5,278,275,276,274.5,276.75,275.5,273.63,274.5,275.25,272,268.75, -270.5,266,269,262.25,259,260.25,257.75,255.5,253.25,253,253.38,253,256,257.5, -254,256.63,253.25,250,251,249.75,253.5,257,253.75,253,252.25,252.25,255.5,257, -256.5,258,250.5,249.63,250,252.5,249,253.38,253.5,256,255.88,259.25,258.63,260, -260.5,261.25,259.13,256.5,255.5,263.5,261.63,267.88,268.25,269,269.75,272,267,261.75, -262,260.25,260.25,259.5,258.5,261.75,262,258.25,258.75,258,258.13,261.88,259.63,261.5, -265.75,261.75,258.75,260,257.5,256.25,259.38,259.25,259.25,255.63,256,260,262.5,260.25, -262,261.25,255.75,253.13,254,252.5,255.25,258,253.5,254,258,263.75,261,259.25, -257.75,256.5,251,249.88,254.25,254.25,250,247.5,252.88,250,242,239.63,241.25,234.25, -235.75,231.25,230.38,228.5,229.38,230,226.5,224.25,223.25,222.5,223.25,223.25,220,216, -217.75,219.5,219.75,219.88,216.75,215.63,214.75,217.5,215.88,215,214.63,220.13,219,220.75, -224.13,226.38,225,224.63,222.25,221.75,221,219.5,220.38,225,222.5,221.38,224.75,219.75, -216.63,216.25,217,215.75,213.5,211.25,212.25,211.13,211,215,211.13,209,215.38,213.25, -212.88,211.5,207.25,209.38,208.75,208.5,210.5,206,205.25,206,201.25,201,195.25,188.75, -183.38,188.25,190.75,196,192,191,188.5,186.5,189.25,186.25,179.75,178.13,179.88,180, -181.25,180,179,183.5,180,182,182.75,181.25,186.25,186.25,181,178.25,182,180.25, -177.5,176.5,178.25,182,182.25,179.75,177.5,182,183.5,180,183,186,184.38,187.75, -189.25,190.25,194.88,192,190.63,190.5,194.25,193,197.5,201,201.88,202.38,204.63,206.75, -208,205.5,204.75,209.5,206.13,204,206.5,206.88,208.5,209,209,209.25,210.5,211.5, -213,206.38,208.38,204.25,203.5,208.25,206.13,208.5,210.25,211.5,212,213.5,218,216.63, -218.5,218,215,212.5,213.38,216.13,218.88,214,212.75,216,219,216.63,217.5,223.5, -223.5,216,214.5,209.75,212.38,209.75,213.75,207.63,209.25,209.88,202.25,202.5,206,206.88, -208,211.88,213.75,209.38,212.5,212.75,209.5,209.5,205,208.13,209.5,201.5,197.88,198, -198,203.75,206.13,206.63,207.5,209.88,210,204.63,209.13,209.5,214.5,214.75,218.75,215.5, -217,213,215.5,219.5,217,219.25,215.38,214.5,220,215.5,212.25,212,207.5,212, -218.25,217.75,217.75,212,220.13,215.5,210.25,201.63,198.63,197.63,196,199.88,191.75,193, -188.25,182.88,187.25,179.75,162.88,162.88,163,163.5,159.63,160,158.13,160.75,163.5,168.25, -169.25,171.25,168.5,163.25,165.75,166.63,167.5,168.88,168,164.25,162.25,165,167.38,165.75, -169.5,169,170,171.63,165.25,167.25,169.5,171.75,172,168.5,164.5,166.25,169.75,168.13, -170.75,177.25,178.25,177,174,170.5,171.5,168.5,169.5,173.88,180.25,182.13,184.75,185, -190,190.5,187.25,184,195.88,189.5,191.5,189.13,193,191.75,180.75,177.25,181.25,182, -187.75,192.5,184.25,180,177.13,177.25,179,178,176.13,172,162,164.13,156.25,157.75, -159.5,160.25,159,160.88,164,165,166.75,169.25,171.5,170.5,166.5,161.88,159.63,152, -156.5,165.13,171.5,173,179,182.25,180,183.5,192,188.75,191.25,192,193.5,190, -192.75,192,199.75,196.75,198.5,200,200,202.25,203,208.5,208.5,214.75,208.75,204.25, -200.75,201.75,201.63,207.5,203,206.25,214.75,221,222.25,219.88,217.75,217,217.75,213.75, -219,215,198.75,197.75,201.75,199,205.75,210,211.5,212.75,212.75,212,216.25,221.5, -215.75,213,213.75,216.5,216,218.75,222.75,227.5,224.75,226.5,230.25,229.25,227.5,220.38, -220.5,219,212.5,214.5,210.63,217,218.75,216.25,216.13,217.5,218.25,218.25,220,222.38, -223,221.5,224,230.5,226,228.13,224.25,226.25,229.38,230,227.25,224.5,225.5,221.63, -223.63,227.25,230.5,231.63,235,234.25,234.25,230.5,229.5,230.25,233,230.75,233.5,240.13, -239.25,234,229.75,235.75,239.75,244,250,247.5,243.5,243,246.25,245.75,247.5,249.25, -248.75,250,249.5,246.5,240.5,239.75,244.25,241.75,236.75,236,237.88,237,237.75,235.75, -236.5,237.5,235.5,231.75,233.5,226.5,229.25,228.25,228,233.13,236.25,237.25,236.75,237, -241.25,245.25,246.25,243.25,244.38,247,246.5,248,249.75,245,246,250.75,243.75,239.13, -237,240,229,227.75,228,227.25,230.75,239.25,242.75,246.75,249.25,255,248.5,237.5, -240.5,243,250.75,249.5,240,246,252,250.63,251.5,263,265,260.75,253.25,255.25, -258.5,265,266,269.25,263.5,266,272.5,276.75,272,276,284.5,280,287,289.75, -284.25,278.38,282.25,276.75,276,276.75,280.25,281.25,280.25,278.5,285,285.5,289,287.5, -286,280,291.5,287.5,283.25,281.88,279.25,282,281,274,261.75,261.75,259.5,251.5, -248.5,255.5,257.75,258,260,260.5,259.5,251.5,260,268.75,270.75,259.5,272,298, -292.25,290.5,286,293.25,296.13,298.25,297.75,296.88,301,303.25,304.25,304,304.5,298.25, -299.25,297.75,297.75,299.75,300.5,300.5,302.5,299.75,301.5,301.25,303.5,304,308,311, -311.5,313,311.5,314.5,320.75,318,318.75,319,311.75,312.75,315,315,314.25,310, -319,310,313.75,320,314,305.5,300.25,300,298.5,305.25,317,319.75,313.25,312.75, -308.75,316.75,315.5,321.5,318,314,318.25,321,329.5,329.25,323,324.25,322,315, -317,309.75,310,314.75,319,323.5,408,400.5,389.75,390,386.75,389,397,400, -400,396.13,405.63,410.5,414,422,417,421.75,424,415.38,415.38,408,405.25,409.75, -407.5,415.25,425.5,429,432,425,425.25,429.75,432.25,430.25,434.25,429.5,423.5,422.88, -423,424.25,428,431.5,438.75,434.5,437.5,432.5,428,425.5,430.5,437.75,437.88,443.5, -444,448.75,444.75,442.5,439.5,440.5,441,437.25,438.75,442,427,431.5,423,431, -433.5,444,443.75,447,441.25,441.5,445.63,451,448.5,446,437.5,438.5,437.75,430, -429.75,429,435.5,439,441.5,437.75,436,444.25,436,439,428.88,424,422.5,423.25, -420,415.25,411.5,417.5,418.75,418.75,411.75,409.25,409,402,399,391.75,390.5,385.5, -389.5,390,394.5,398.13,395.5,396.25,399,404.25,403,396.75,397,398,400.5,398, -391,387,382.25,385.5,389,394,387.25,385,384,385,384.25,388,376.75,372.25, -371.5,376.5,381,387.88,391,389.5,385.5,379.75,378.75,377.5,383.5,389.25,390.5,387, -378.5,379,370.25,364.5,379,384.5,390.75,394,400.25,401.5,395,403.25,406.75,405.25, -406.5,404.25,407,398.13,398.25,398.25,399.5,400.5,397,396.25,397.75,399.5,398,395, -396.5,398.75,399.5,401.25,404.75,406.25,408.5,408,408.75,404.25,406,407.25,413,412.75, -410.5,411.5,413.25,416,420.25,424.75,425.5,423.5,423.5,418.25,417.75,416,415.25,409, -410,400.75,398,397,394.5,398,398.75,396.5,390.75,390,388.5,388,393.25,391.75, -395.75,397,399,404,403.75,400,395.13,392,391.5,390.63,392.25,392.25,395,395.75, -397.5,397,396.5,398.75,397.5,399.75,392.75,387.75,391,392.75,395.25,393,394.5,398.5, -399,397.75,395.5,404,404,403,402,401,396.25,394.5,389.5,383.75,386.5,382, -383.5,383.75,379.25,386.25,388.75,384.5,379,380,382.5,386,381,380,381.5,385, -385,387.75,391,395.75,395,395,394.25,397.5,390.5,390.5,389.25,391,392,389, -385.5,382.25,380,384.88,385,382.75,382.25,377.75,376.5,376.88,377,373,373,371.5, -373.25,378.25,383,382,383.75,380,377.5,376.25,372.5,368.5,367,372.5,364.75,369, -368.5,368.75,367.75,369.38,369.75,369,373.75,372,373.75,372.25,368.5,369.75,373.25,373.5, -369,368,368.25,368.25,368.75,366,360.5,368.25,363.5,353.25,349.5,349.5,350,341, -342.25,341,338,338.75,341,341,340,333,336.5,335,337,339.25,333.5,336, -341.25,346,341.5,339,339,327.13,320,324.25,324.5,317.5,313.5,317,313.25,321, -309.5,309.75,305.5,302.25,298.75,291.75,290.5,291.75,293.5,294.75,301,302,294.25,294.25, -292.25,297.25,299,299.25,300,300.25,303,295.5,292.38,300.5,298.25,297,299,302, -301.63,304,305,309,309,308.75,307.75,309.25,315.13,305.75,304.75,308.5,309,307.75, -306.5,306,303.75,302.75,304.25,303.88,304.75,305,307.75,305.5,304,300.75,301,303, -299.75,300,305.25,306.38,310.5,310,307.75,299.5,301.5,304,310.13,315.5,314,314.75, -318.25,314.75,309,307,310.25,315.75,314,295,296.75,291.25,286,284,285.5,287, -287,290,293.75,291.25,296.75,299.5,292.75,296.75,298,299.5,301.75,299,296.5,294.5, -298,300,302,315,316,311.25,311.5,316.5,319,317.75,317,314,311.75,311.25, -313,315.25,314.75,314,315.5,321,323.5,321.5,318.63,324.5,321.5,318.25,312.5,317.75, -324.25,321.25,326.5,328.75,327,334,337.25,337,341,344,348,342,338,334, -335.5,340.25,342.5,342.25,344.75,347,351.75,353,353.5,353.25,357.75,362,361.25,358, -356,355,352,353,356,354,352,356.25,358.75,358,357,356.75,361,361.13, -360.75,358,356,357.5,357,356.5,358,356,355,355.75,358.5,360.63,361,363.5, -362.5,363.5,354,347.75,348.75,349,348.5,345.5,340.75,337.25,338,339,336.5,334, -338.25,335.25,330.5,328.25,329.25,336.5,341.63,339.5,338.75,337.25,338.5,340.75,336.5,330.5, -328.63,327.75,327.25,325.5,317.5,322.5,326,321.75,316.5,315.5,314.75,312.75,311.75,310, -314.5,315.63,315.75,312.5,314.5,316.25,318,316.25,313,317.75,319.5,320.25,318.5,315, -312.5,316,317.25,315.5,313,313,311,310.75,317,317.5,317.25,316.25,316,311.75, -311.5,314,308,307.25,308.5,299,300,299,296.5,291,290.5,292.88,293.25,293.13, -297.13,297.25,299,297.5,294,292.63,296.25,296.13,299.75,294,298.5,296.5,291,289.75, -295,288,288.88,291.13,284.5,290.75,293,291.5,292,290.25,296.13,298.25,305.75,307.13, -306.75,299.25,297,291.75,291.75,290,288.5,288.5,281,273.25,275.5,280.25,276.5,271, -266.38,266,268.75,268.25,273,275,272,269.75,264,263.88,266.25,271.25,265.25,263.75, -264,262.75,249.25,244.75,239.75,239.75,235.25,229.88,223,230.63,238.25,240.5,245.5,248.5, -249.75,250.25,249.25,252.25,253.5,252.5,252.75,253.25,253.75,257,254,257.75,258,259.5, -254,252,251.25,247.75,250.25,254.25,252.5,242.5,244.5,250.75,254,250,257.5,257.5, -258,255,257.13,268.5,270.25,272,265.75,271,259,259,259.25,265.5,268.25,266.25, -270,271.25,283,283,287,278,267,259,242,241,248,245.5,250.5,258.5, -270,270.75,268.5,275,282.5,285.5,290.5,289.75,287.5,283,283,296.75,298,300.25, -290.25,301.5,309,309.63,313,321,324.5,322.5,320.75,323.25,324.75,327,331.5,325.75, -324,320,320.5,326.5,332,337.75,338.5,336.75,333.25,333,328,322,319.75,322.38, -322.25,322.5,320,324.25,328.75,328.5,326.5,316.75,325.25,329.25,329.75,333.25,335.5,340.25, -344.25,345,344.5,349.5,352,351.25,349.75,349.25,349,352,355,346,349.75,344.75, -338.75,343.25,343.25,343,335.19,338.5,341,345.25,348.5,356,356,355,356.5,350, -369.75,381.5,373.75,374.13,367.75,369,369.5,368.75,368.5,368.25,364.75,364.5,359.5,358.25, -361,355,351.5,360.5,366.5,360.25,351.5,353.25,358,359.5,355.5,355.5,356,355.5, -357,357,355.13,356,360,357,350,346.25,345.75,351,354.75,359,363.25,362.5, -363,364.5,367,367.75,366.75,365,360.5,360.5,359.5,359.5,360.5,359.5,356.25,361.5, -363.5,364,356.5,355.5,357,353,351,351.75,354,353,347.25,346.5,347,341.5, -346,348.5,344.75,344.5,343.5,345.25,346.25,346.5,347.75,357,357.25,358.5,351,348.5, -347,346.75,344,345.5,343.5,348.5,338.5,335.25,338,340.25,340.75,343.5,345,348, -342.75,340,341,350.25,349,346.88,342,341.25,339.5,338.75,335,330.5,329.25,333.5, -333.75,336,334.5,326.75,329.5,324.5,315.5,313,313.13,316.5,317,320.25,318.25,323, -327.5,328.5,323.5,321.5,331.5,327,333.5,336,348,351.25,348,337.5,337.75,331.5, -329.75,320.5,325.5,315.5,312.25,314,314.25,314.25,313.5,311.5,308,309.5,310.25,312.25, -315,318,319,318,319.5,319,321.75,322.25,327,327,322.75,322.5,319.5,324.25, -330.5,330,334,331.5,326.5,327,329.75,329,331.5,327.5,326.5,325.5,328,327.25, -324.25,317.75,315.5,311.25,312.5,308,308.25,306.75,308.75,310.5,309.25,312.25,313.75,312, -306.5,307.25,310.75,311,313,314,311.25,309.5,308,306.5,305.5,305.5,303.5,299.88, -301.75,295.75,294.75,299.63,303,303.5,299.75,301,301,297.75,296,293.38,296,298.5, -296.25,296.75,295.5,295.5,300,300,308.75,310.25,305.5,303,298,297.25,296.75,296.25, -294.88,296.25,296.5,296.25,299.75,299.75,299.75,300.5,303,303,300,307.5,312.75,308.75, -308.5,300,305.75,310,306,303.5,302.5,312,313.75,315,313.5,319,319.75,321, -317.75,322,326,319.5,315.75,316.5,321,328,327,326,328.5,330,329,333.75, -334.5,329.75,327,327.75,326,325,322.5,327,325,324,320,315.5,316.75,310, -315,309,307,309.5,313.5,316.75,318,324,327,327,319,315,319.75,325, -329.5,330.75,330.25,331,324.5,327,335,332.25,335.75,337,337,331,335.75,336.75, -336,337.5,337,337,338.5,340.5,339.75,339,336.5,335,338,338,340,338.25, -343.5,344.5,345,340.5,339,343.25,338.75,335,336,338,335.5,336,337.88,338.75, -331.5,332,335.5,343.75,342,345,358,355,357,354.75,358,363,365,358, -352,351.5,353.75,360.5,354.5,348.25,358.25,358.5,346.75,346.5,355.75,360,370,370.75, -370,368,365,369.75,375,357,345.75,335.5,332.5,329.5,326.5,329,330,324.88, -325,331.25,334.5,335.5,335,338.88,341.25,343.5,343.88,343,344,348,343,338.75, -334.25,329.5,328,326.5,327.5,636,636.5,640,643,645,648.25,649,641,642, -630,637.5,639,635,631,612.5,600.5,598,594,587.5,585.5,580,586.75,581.5, -590.75,589.13,573,590.5,595.5,593,579.5,585,587.5,569.75,562,577,580,590, -594,587.5,589.75,599,595,585.13,577,586,585,571,571,579,592.5,587, -592.5,596,599.5,594.5,609.5,614.5,618.5,617,614,623,607,621,621.5,616, -616,623,616,609,604,598.5,597.5,593,588.75,606,613.5,627,624.5,625, -616.5,613.5,622.25,625,617.5,618,637.25,648,643.5,641,645.5,644.5,640,632.75, -629,630,616,612 -}; - - - - - - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c deleted file mode 100644 index 67b7a40b8..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_gDataHigh.c +++ /dev/null @@ -1,723 +0,0 @@ -double gDataHigh[10000] = { -111.68,110.5,110.11,111.1,112.67,111.42,112.85,113.15,113.95,113.5,114.49,114.6,114.17,113.89, -114.18,114.05,112.73,114.72,115.75,117.95,118.82,118.38,117,116.43,115.86,116.48,111.88,111.47, -110.04,109.2,109.65,109.6,109.15,109.35,109.66,108.39,107.08,105.8,106.58,106.92,105.47,106.06, -105.77,106.44,107,107.02,106.66,105.65,105.19,104.24,103.26,103.18,104,103.21,103.17,105.51, -106.55,106.59,107.24,107.67,107.1,106.63,105.43,105.98,107,107.25,108,108.05,106.23,105.89, -105.8,106.25,105.99,105.11,104.75,103.39,103.17,103.03,103,103.14,103.17,103,101.17,101.5, -101.7,99.9,95.73,95.15,94.87,95.91,97.66,96.3,95.75,95.82,96.7,96.8,96.94,96.75, -96.45,96.23,95.5,94.75,95.11,95.02,95.03,95.25,95.22,95.44,95.81,94.53,94.32,94.45, -93.97,94.03,94.47,94.17,94,94.82,94.85,93.89,92.15,92.37,93.05,94.09,96.01,97.86, -98.44,99.5,99.37,99.46,99.25,99.52,99.43,98.74,99.2,99.7,99.74,100.36,100.4,100.44, -99.73,99.18,99.48,99.45,98.66,97.83,97.92,97.58,97.38,97.23,96.85,99.95,100.9,100.84, -99.69,99.9,99.05,100.33,99.5,97.95,98.79,98.4,97.88,97.4,97.23,95.81,95.98,96.5, -96.5,96.39,96.16,95.8,95.72,95.33,94.85,94.35,94.39,94.43,94.87,94.64,93.95,91.91, -92.48,91.66,91.57,93.24,93.75,93.74,93.43,93.8,94.05,93.6,93.28,93.29,92.43,92.35, -93.19,92.92,93.4,92.74,92.34,91.95,92.68,92.68,92,91.89,91.93,91.99,91.95,92, -90.7,90.98,92.04,87.94,87.6,86.21,84.9,84.69,84.63,84.08,83.78,83.21,83.25,82.26, -82.47,82.79,82.35,82.67,82.66,82.28,82.12,83.25,83.79,82.09,83.21,83.59,83,82.7, -82.5,81.2,80.86,80.38,80.69,81.54,81.57,81.5,81.68,81.48,80.47,80,79.5,79.47, -79.55,79.88,79.97,79.56,79.28,77.14,77.49,75.78,76.08,76.28,76.26,76.2,76.77,76.73, -76.93,77.38,77.5,77.3,77.29,76.3,76.41,76.15,75.5,75.88,77.06,74.42,73.94,74.3, -75.28,76.3,76.65,76.83,78.09,78.53,78.39,78.27,77.93,77.8,76.6,77.6,77.52,77.84, -78.37,78.56,78.3,78.3,78.53,78.78,77.85,77.93,78.09,78.1,79.58,80.74,79.9,80.04, -80.56,80.87,80.83,80.96,80.86,80.18,80.04,81.3,80.34,81,81.35,82.21,83.25,83.15, -83.69,83.09,83.33,83.29,83.22,83.34,83.09,83.29,82.74,83.31,83.62,84.4,83.48,82.9, -82.41,82.5,82.85,84,83.53,82.92,82.6,81.37,82.06,82.74,83.8,84.32,84.45,83.78, -83.59,83.6,83.7,83.55,83.39,83.26,83.72,84.27,84.68,84.99,83.75,83.41,83.72,83.76, -82.99,82.4,82.25,81.98,81.6,80.79,80.64,80.83,80.21,80.81,80.55,80.89,80.65,81.34, -81.65,80.75,81.03,80.91,81.5,81.45,81.91,81.46,80.8,80.9,80.19,79.95,80.77,81.59, -82.24,82,81.81,81.77,81.65,81.62,82.15,81.92,83.05,84.39,84.7,83.16,83.45,83.96, -84.81,84.12,84.25,85.03,82.9,82.5,82.55,82.49,83.06,83.57,84.5,84.2,83.23,84, -83.1,83.6,84,83.63,83.95,84.9,87.35,87.1,88.91,89.92,89.84,88.65,89.15,89.74, -89.64,89.94,89.43,89.32,89.39,88.08,87.87,88,86.98,86.58,85.9,85,84.84,84.3, -83.33,83.9,83.85,83.3,83.03,81.89,82.15,82.3,82.43,82.93,83.87,83.95,83.61,84, -84.19,84.2,84.6,82.99,82.71,83.2,82.93,83.52,82.1,81.12,80.27,80.68,81.47,80.6, -80.5,80.55,79.73,78.6,78.41,78.11,78.5,78.46,79.65,79.98,80.5,80.65,81.4,81.49, -82.11,81.49,81.52,81.13,81.19,80.01,80.32,80.79,81,81.75,81.02,81.45,82.4,83.14, -83.35,83.3,82,81.94,82.43,82.94,82.58,82.75,84.01,83.95,83.89,83.74,83.89,84.2, -83.86,83.85,83.95,83.97,84.13,84.35,84.52,84.63,84.95,84.96,85.11,83.94,82.75,82.67, -81.75,80.49,79.52,79.52,77.53,76.15,74.97,75.33,75.49,75.68,75.3,74.77,75.4,76.97, -77.49,77,76.98,77.73,77.25,76.5,75.43,75.93,75.05,75.47,75.4,76.09,75.9,77.1, -77.39,77.5,77.41,77.24,77.41,76.03,76.51,76.95,77.28,77.64,76.82,74.43,74.49,73.86, -73.8,73.69,74.76,75.46,75.92,78.11,77.2,76.96,77.29,77.08,77.11,77.18,76.98,75.72, -74.7,74.1,75.87,77.2,77.75,79.66,85.41,85.97,86.24,87.56,88.46,89.2,89.38,90.33, -90.62,91.76,91.41,90.88,91.07,91.63,91.55,91.17,90.34,90.28,89.9,90.68,91.4,92.27, -92.04,92.41,92.8,93,92.56,92.51,93.18,93.21,93.73,93.43,92.76,92.8,93.09,92.44, -93.5,94.25,94.76,94.97,94.67,94.02,93.97,93.1,94.83,94.64,94.9,94.74,93.94,94.35, -94,93.95,93.59,92.22,92.87,92.59,92.85,93.3,93.84,95.15,95.34,94.25,96.2,95.28, -95.79,96.09,96.8,96.98,97.83,98.42,99.1,98.91,99,98.47,98.55,97.97,98,97.98, -97.15,97.57,98,98.15,97.7,97.7,97.2,97.99,97.6,97.35,98.25,97.9,97.63,96.78, -96.07,95.65,96.38,95.38,95.79,95.37,95.4,95.16,95.7,96.63,95.5,96,95.5,95.22, -94.3,93.95,93.7,93.52,92.7,91.9,91.22,90.6,89.9,90.24,90.27,89.57,88.9,88.45, -88.76,89.19,89.73,86.15,85.25,84.98,86.48,86.2,87.2,87.91,88.1,88.1,88.03,88.1, -86.98,85.98,84.98,84.65,84.44,84.74,84.27,85.44,86.11,86.43,86.5,86.96,86.5,86.88, -87.28,87,86.79,86.51,85.44,84.69,84.78,85.09,84.69,84.99,84.95,85.04,85.27,85.15, -85.45,85.25,85.35,85.13,84.54,84.56,83.94,83.05,83.98,84.99,83.96,84.76,86.42,86.65, -86.8,87.39,87.4,87.22,86.28,86.3,85.58,86.06,86.4,87.11,86.49,85.85,86.48,84.63, -85.24,86.09,85.25,84.5,85.01,85.94,86.73,87.55,88.44,88.5,88.49,89.9,90.23,90.92, -90.84,90.24,90.43,90.8,90.56,90.93,91.21,90.58,90.75,90.55,90.5,88.99,88.49,88.1, -88.64,88.48,88.85,89.08,88.85,88.92,87.84,88.18,87.95,88.88,86.49,86.03,87.35,87.41, -87.25,88.15,88.1,89.4,89.1,89.75,89.74,88.52,89.2,90.26,90.98,91.99,91.56,91.61, -91.51,91.42,92.48,92.3,92.35,94.09,93.86,94.04,94.36,94.39,93.58,93.79,94.37,94.55, -92.68,92.24,92.67,93.61,93.25,92.63,92.49,92.16,91.48,92.97,93.18,93.79,92.7,92.69, -93.38,92.98,94.74,95.28,96.88,96.98,96.92,96.89,97.6,97.25,97.38,97.26,97.09,97.46, -97.51,98.6,99.23,99.77,100,100.09,100.3,100.31,99.97,99.44,99.24,100.09,100.43,100, -99.94,99.33,98.6,99.42,99.67,99.85,98.21,98.16,98.04,97.44,95.35,95.65,90.46,91.51, -92.14,92.35,93.21,93.38,93.19,93.09,93.05,92.85,93.5,93.73,93,92.8,93.44,93.5, -93.25,93.38,93.87,94.12,93.97,93.16,92.97,92.74,92.16,91.47,91.3,91.44,91.44,91.48, -91.36,90.68,90.09,89.85,89.74,88.85,89.79,89.83,90.18,90.05,91.42,91.48,91.16,90.03, -90.47,89.6,89.59,88.88,89.8,90.84,90.71,90.17,89.94,89.9,89.1,88.64,88.4,89.01, -89.34,89.4,89.68,89.7,94.54,92.95,93.54,93.18,93.6,92.87,91.7,91.76,91.95,90.45, -90.6,89.25,90.18,90.14,90.97,91.82,92.09,92.24,93.47,92.43,91.94,90.41,89.96,89.01, -88.42,89,89.97,89.66,88.26,88.29,87.3,85.96,82.11,82.34,82.53,82.54,83.03,84.72, -83.85,83.31,83.81,83.68,81.98,81.75,82.19,81.54,81.5,81.27,80.82,80.68,81.33,81.36, -81.27,82.54,82.45,82.88,83.7,83.74,82.99,82.77,83.26,83.43,84.02,83.94,87.03,87, -86.58,85.28,85.22,86.35,86.75,86.45,84.69,84.89,83.66,84.2,84.65,84.38,84.16,84.18, -84.79,85.24,85.29,84.99,84.95,84.55,84.29,84.98,84.15,82.92,82,83.23,84.25,84.96, -85.24,89.08,88.68,88.59,88.7,87.9,85.95,86.8,86.18,87.24,88.47,89.89,89.96,90.4, -90.1,89.26,87.7,86.78,87.81,88.34,88,87.57,86.23,85.67,86.49,85.5,85.28,85.7, -85.97,86.06,84.51,84.4,84.4,82.85,80.07,81.29,79.25,80.74,80.7,82.9,82.55,83.48, -81.97,79.56,79.61,81.99,82.33,83.25,84,83.35,84.9,82.49,82.5,83.5,82.67,79.48, -78.68,75.63,76.33,77.45,77.99,77.78,77.73,77.75,79,78.47,78.59,79.05,79.37,79.99, -80,80.05,79.7,79.5,77.45,76.35,78.09,78.97,78.02,78.15,78.2,78.9,78.18,78.87, -78.34,81.3,80.7,80.47,79.5,81.5,81.36,80.77,81.85,83.74,87.71,88.65,88.59,88.95, -88.04,87.02,85.69,86.18,84.8,81.65,80.57,78.46,77.43,79.18,80.7,81,81.5,80, -80.34,79.69,81.77,81.79,80,81.69,82.48,81,81.33,82.75,84.98,84.86,87.03,89.46, -88.05,88.11,86.15,86.25,85.17,84.92,81.71,79.45,80.99,80.4,80.99,80.33,79.9,78.36, -79.29,80,81.88,82.01,83.81,80.5,79.79,79.4,77.05,77.5,74.62,75.55,74.97,75.68, -75.9,74.25,73,67,68.48,63.8,63.92,58.48,56.7,58.09,58.5,59.51,61.16,62, -61.98,59.89,63.49,64.88,63.77,63.3,63.75,65.4,66.48,70.9,73.45,72.72,72.88,74.05, -77.5,75.6,74.98,73.99,72.85,73.99,75,76.35,77.35,77.01,80.44,80.89,81.48,82.45, -82.33,82,82.85,79.98,76.71,75.02,73.8,72.64,74.3,72.05,69.9,69.42,68.35,68.23, -70.7,71.6,72.7,71.4,69.47,70,70,70,72.19,72.7,74.2,71.6,71.39,71, -71.74,69.75,71.25,72.25,73.48,73.9,70.71,69.4,72.41,73.62,72.15,70.59,71.45,71.49, -70.99,74.09,75.2,76.9,77.75,76.77,77.4,75.95,78.25,78.8,78.85,80.95,80.71,79.65, -80.91,82.05,82.25,82,83.11,83.75,85.05,84.39,85,85.46,86.4,86,86.49,85.48, -82.29,80.5,83,82.8,77.5,81.87,83.5,84.8,84.65,85.23,85.1,86.96,86.92,88.25, -89.08,88.95,90.03,89.1,87.2,86.85,86.6,87.96,88.51,89.95,88.52,88.59,101.25,101.14, -101.5,102.01,104,105.14,103.79,105.7,106.66,106.7,106.78,106.9,108.05,108.64,107.45,107.95, -108.65,108.85,105.97,107.34,107.5,107.09,106.5,106.53,103.1,99.6,100.31,99.19,99.25,99.2, -99.7,100,101.8,104.8,109.15,108.48,107.89,107.69,105.72,107,107.82,108.5,108,109.3, -107.98,105.75,108.56,110.21,110.69,109.73,111.25,114.26,114.9,120.55,118.75,119.7,120.09,122.18, -124,126.39,125.2,126.19,125.6,124.22,121.5,123.24,123.88,123.93,123.7,122.48,123.5,124, -124.7,122.97,122.14,121.48,122.3,123.21,122.74,121,121,121.7,121.98,116.72,114.85,115.94, -114.55,114.38,116.3,116.4,115.37,115.25,116.8,115.8,115,116.33,116.85,117,114.9,114.9, -115.56,115.2,114.8,110.59,110.3,110.17,111.12,109.75,110.7,112.1,110.85,108.75,106.69,105.78, -102.74,103.75,106.7,103,102.76,101,99.4,97.3,98.5,99,98.45,98.88,97.62,93.9, -93.48,92.71,91.5,94.45,96,95.54,93.5,95.75,96.85,96.75,95.86,97.4,98.15,100.68, -102.83,103.13,101.36,103.4,105.9,107.17,108.2,107.8,104.7,104.04,104.97,105,105.49,106.02, -106.59,106.85,106.64,104.95,104.54,106.1,107.37,107.37,110.09,109.47,108.5,107,106.25,105.95, -106,105.7,106.15,106.95,105.7,106,107.6,108.58,109.38,109.3,107.8,104.13,105.4,106.95, -110.9,113.26,114.19,115.4,116.65,116.95,114.18,114.05,114.9,114.43,114.7,114.99,117.25,115.44, -115.45,116.08,118.47,117.8,118.14,117.5,118.25,119,117.6,114.75,113.6,113.86,114.1,117.59, -119.9,119.6,118.95,119.7,119.9,117.68,117.09,115.8,114.15,113.18,114.15,118.9,118.18,117.75, -117.25,115.86,115.1,118.95,118.65,118.05,116.9,116.7,114.85,114.75,114.05,116.4,115.9,110, -99.88,99.89,97.5,101.94,99.9,98.74,100,100,94.05,94.65,98.1,97.56,97.07,98.45, -100,95.66,94.99,91,91.6,92.03,92.8,93.9,97.87,98.9,98.44,98.4,105.01,107.34, -108.25,108.4,105.6,107.65,106.4,103.54,106.87,105.8,107.5,110.9,111.5,115.6,115.75,118.64, -116.17,117.38,115.72,114.99,118.2,117.6,115.69,112.6,113.99,114.34,116.75,116.75,115.5,115.25, -111.12,111.44,109.94,109.94,113.94,110,97.75,94,96.44,94.25,94.94,95.75,93.94,94.69, -99.75,95,87.5,86.94,88.19,88.12,89.56,89.37,87.94,88,94.44,90.5,90.69,93.69, -96.62,96.12,98.25,99,95.94,101.81,104.75,99.19,99.31,98,99.94,100.75,102,101.75, -100.81,104.37,103.25,102.5,99.69,100.06,99.87,99.44,98.37,100,103.75,103.5,102.37,102.62, -102.31,99.87,99.12,93.75,93.69,92.87,90.94,94.37,95,96.25,98.5,99.12,113.87,113.12, -110.44,114.37,112.94,117.12,119.37,116.12,114.56,114.87,119.37,119.62,116.94,118.87,120.31,121.87, -126.62,124.31,126.69,126.56,126.25,126,127.25,129.19,128.81,126.87,128.25,132.94,134.5,134.88, -133.31,134.94,134.19,131.5,134.25,133.19,129.88,125.44,123.75,122.19,122.19,123.37,122.81,122.94, -122.62,123.69,121.81,120.25,120.81,119.62,119,116.5,116.5,114.87,112.44,113.69,112.5,111.5, -112.37,113.37,115.62,117,117.81,109.5,104.81,107.87,104.87,105.94,105.87,104,104.94,105.06, -105.12,105.62,109.87,113.19,114.37,115.19,112.81,115.75,113.62,114.31,115.94,120.69,120.37,117.69, -119,120,119.94,120.44,120.75,122.31,121.75,114.62,114.19,109.75,108.94,110.75,111,107.19, -112.25,110,110,109.25,107.5,107.31,108.87,109.25,104.87,105.75,107.5,105.69,110.62,110.37, -109.62,109.19,111.12,113.62,113.19,112.69,113.12,113.94,113,107.19,105.25,109.75,115.12,112.25, -112.75,114.31,119.62,121.62,125.37,125.69,128,125.75,126.94,122.37,123.75,123,122.44,127, -128.25,122.25,115.87,115.37,114.69,113.37,111.69,109.81,108.25,110,109,109,108,106.87, -107,111,110,105.44,105.5,105.56,106.5,109.87,111,110.5,113.44,115.94,118.87,117.31, -117.44,116.37,119.44,119.12,119.75,119,116.87,118.44,117.5,115.81,113.44,112.81,114.19,118.44, -119.94,119.5,122.87,123,124.75,122,119.75,123.31,121,122,121.12,119.37,117.94,118.94, -119.75,114.5,116,109.5,110.5,110.5,110.75,110,110.44,110.31,110.12,110.44,111.06,109.69, -107.94,110.19,112.75,111.94,122.12,121,119.19,116.5,112.87,106.31,104.44,104.5,104.94,106, -105,109.87,108.44,105.12,98.25,94.87,95,96.37,96.25,97.5,97.06,95.5,93.94,92.94, -94.44,95.94,96.81,98.81,99,95.31,95.56,96,95.12,94.62,93,113.06,108.5,109, -108.87,107.25,110.87,114.87,116.69,115.06,119.19,122.75,123.25,120,121.06,122.25,122.81,124.75, -126.81,125,127.81,127.25,129.63,130.88,131.44,132.38,135,133.56,135.56,137.69,136.5,133.94, -132.69,129.75,126.75,128.5,126,125.62,125.19,125.87,124.06,123.62,124.87,124.37,124.87,129.63, -128.56,127.87,124.5,123.81,123.75,122.5,124.44,127,124,121.87,123.12,126,126.69,126.62, -128.69,126.5,125.12,125.44,128.5,129.75,132.13,138.88,137.5,138.13,138.5,139.19,138.69,137.44, -135.5,133.5,133.88,132.25,131.31,132,125.31,124.69,125.75,124.44,124.19,127.75,125.75,121.44, -122,121.5,118.31,116,116.5,116.75,120.87,119.87,121.69,116,115.31,114.62,113.87,116.75, -116.87,236.63,226,230.69,233.38,236.38,238.75,240.63,239.63,243.5,246,228.44,221.88,221.88, -217.5,214,212.5,215.88,212.25,211,209,210.5,215.25,210.75,206.56,198.75,171.88,169.75, -172.31,177.5,179.5,183.88,184,183.63,188.06,188.06,187.63,186.75,183.94,177.69,181.5,181.25, -178.75,175.88,173.25,170.5,167.63,170.5,178,177.75,180,183.5,182.31,183.44,185.94,182.88, -184.88,180,178.94,177,168.94,170.94,169.5,171.88,173.94,179.69,180,177.94,174.75,174.5, -174.31,178.25,176.25,178.81,168.88,169.5,168.88,171,176.5,177,180.69,184.5,183.94,181.31, -186.81,186.5,182.63,185.5,198.25,199.25,192.5,185.5,184.94,187.44,190,189.44,192,192.38, -192.75,189.88,186.5,187.19,188.63,188.94,189.94,187.94,185.38,183,178.94,172.19,169.63,166.88, -165.81,167,168.44,170,169.94,169.88,168.19,165.38,169.38,169.25,170,170.56,170.19,166.94, -167.19,167,160.13,159.88,159.63,161.38,159.69,157.5,159.88,158.88,156.75,152.19,150.94,149.56, -149.75,149.94,149.69,149.81,149.5,146.88,146.81,144.44,143.44,143.5,143.69,142.44,139.81,137.5, -138.75,132,130.5,132.88,127.94,123.5,122.87,124,123.75,125.25,126.44,131.5,134.13,136.19, -133.69,134.94,133,130.63,128.63,127.25,128.25,130.94,130.69,129.94,126.56,122.5,127.44,125.94, -122.87,122.69,123.75,118.94,123.37,125.81,128.75,131.75,130.88,128.69,128,130.06,131,129.5, -126,127.37,128.38,129.56,128.5,130.13,134.25,130.94,129.25,134.25,134.88,138.13,133.75,128.44, -126.94,125.75,125.94,129,128.44,131,123,120.37,118.94,120,120.62,120,119.25,118.5, -115.56,114.5,115.06,116.62,116.94,116.31,114.81,113.44,114.69,112.12,112.31,109.5,109.25,109.12, -112.19,111.87,115.44,116.81,118.06,119.62,119.56,120,119,116.19,116.62,117.69,118.31,120.94, -121.62,121.5,123,123.62,124.19,125.81,127,125.75,127.75,129.31,122.25,120,122.75,120, -117.75,118.94,118.25,118.87,117.37,117.44,116.87,118.5,116.62,117.94,117.62,120,118.5,111.25, -107.94,110,109.81,106.25,107.81,106.5,105.62,105.81,106.5,106.37,106.69,104.87,104.94,104.87, -105.5,106.62,106.69,103.69,103.37,103.25,103,102.31,101.81,101.37,101.12,100.62,99.87,98.19, -98.25,99.81,100.37,103.31,102.5,104.56,105.62,105.87,105.25,102.87,103.94,103.44,104.62,103.62, -103.69,103.62,103.25,103.25,102.44,99.62,99.62,99.56,99.81,100.25,101.25,99.56,99.31,98, -97.87,99.94,100,100.62,102,108.37,105.19,104.94,104,102.44,101.12,104.87,105.5,105, -107.19,106.81,105.75,105.19,105.5,103.69,101.75,100.81,104.12,104.75,102.94,102.94,105.5,105.25, -101.94,103.44,103.94,109.62,112.25,113.5,112.87,111.31,111.62,112.19,113.31,109.94,109.87,107.5, -105.75,106.37,105,103.94,104.37,104.87,102.06,99.37,99.5,100,100.81,100.44,103.19,103.94, -102.75,102.19,99.19,99.37,102.25,99.94,98.62,102.81,103.87,105.94,105.37,97.75,98.87,102.69, -102.87,104.12,105.5,105.37,105.81,106.87,107.12,105.25,107.25,104.56,106.44,107.44,105.12,103.19, -103,104.44,105,105.12,99.62,100.25,101.25,100.5,99.19,98,98.37,100.06,104,104.31, -105.25,104.56,105.12,104.31,102.87,103.87,104.81,104.37,107,106.62,107.94,108.44,108,104.12, -104.5,105.12,106,105.62,105.31,107.12,109.25,109.44,107.94,106.5,105.94,107,106,104.62, -106.87,108.44,108.44,107,103.5,106.31,105.25,101.75,98,96.25,96.44,97.37,96.19,96.69, -95.75,95.5,95.12,93.62,92.25,92.5,92,92.94,93.75,92.25,91.37,91.94,90.75,89.5, -90.75,90,89.75,88.37,87.37,87.87,87.62,86,84.87,85.62,86.62,87.87,88.25,90, -91.87,179.25,174.88,176,177.38,175.5,170.38,173.75,175.63,175,177.13,173.5,169.25,169.25, -166.88,167.38,166.25,162.88,161.63,161.13,159,151.75,152.88,157,143.75,140.13,141.25,140.13, -139.75,138.38,139,136.88,134.75,134.88,138,136.88,133.5,131.13,132.25,137.38,137.75,139.5, -141.63,141.13,138.38,136.88,137.13,139.75,138.75,140.75,143.13,144.38,146.25,147.25,149.75,147, -147.63,149,146.5,146.75,146.75,145.75,146.88,147.5,148,144,140.88,143.5,145.88,145.5, -147.75,148.13,146.63,145.25,148.75,150,149.75,153.63,154.75,157.38,157.88,158.25,156.75,154.25, -151.75,154,160.25,160,170.13,167.63,165.75,166.75,168.38,167.63,166.25,164,162,164.25, -163.75,163.38,159.13,154.38,155.38,155.5,155.63,158.38,156,155.38,158.38,159.75,159,153.63, -153.25,154.88,158.5,158.63,161.88,160.13,158,162.63,164,166,163.5,159.63,160.25,160.75, -158.5,158.88,154.88,159,154.88,150,145.5,137.63,135.88,135.75,134.88,134.5,135.13,133.88, -131.5,129.38,129.63,129.13,127.5,127.75,128.13,128,129.75,129.88,130.75,135.38,129.5,129.13, -129.5,131.25,130,130.13,128,129.38,129.5,128,127.12,126.25,125.87,125.25,127.12,125.5, -127.87,126.87,126.87,124.75,124.87,125.12,125.25,123.62,123.37,122.87,118.25,118.25,119.37,117.75, -115.87,114.5,115.62,115.37,115,115.5,115.75,112.75,113.12,113.62,113.87,112.75,110.75,110.37, -111.25,111.62,111.5,112.5,113.25,113.75,113.87,112.87,110.12,109.37,109.37,109,108.87,108, -105.5,104.12,103.75,92.62,93.25,93.37,95.25,95.62,97.87,95.75,94.87,96,97.62,99.5, -100.25,99.25,99.25,100.12,101.25,102.25,99.87,99.62,100.12,99.75,100.12,101.75,102.25,102.62, -102.5,102.75,104.25,104.12,103.87,104.37,103.25,102,104.87,106.37,106.62,106.5,108.25,107.62, -108.37,109.37,109.87,110.5,111,112.12,112.5,111.62,109.25,109.87,108.87,108.5,108.37,107.75, -106,107.25,108.5,109,109.37,108.5,110.25,108.75,108.87,108.5,107.62,107.75,107.62,107.12, -107.25,120.12,116.37,114.37,115.62,118.37,120.87,120.12,119.37,119.87,120.5,118.12,112.75,113.75, -112.37,113.75,112,115.12,115.75,117.87,120.87,125.5,125.12,120,118.75,116.62,116,117.87, -116.87,117.5,119.87,119.5,121.25,121.75,127.37,128.88,128.88,125.5,126.12,125.62,120.62,120.87, -118.87,118.5,115,114.87,115.87,114.37,114.5,114.62,115.12,112.37,109.87,110.37,109.87,109, -106.62,106.25,108,109,104.5,103.87,104.12,96.25,89.25,87.75,86.5,87.25,88.5,89.25, -89.12,89.25,88.75,89.12,91.25,92.12,91.75,91.37,92,92.12,91.87,91.12,92,91.87, -90.12,92,95.12,95.37,96.75,97.25,96.87,95.5,96.5,97.12,97.25,97,98.12,97.5, -97.5,97.37,96.62,96.37,94.87,95.37,95.87,96.75,96.25,97.37,98,98.25,99.75,100.12, -100.62,102.37,101.5,99.87,97.62,99.12,98.75,96.62,96.62,98.5,99.25,99,98.5,98.37, -98.25,97,94.12,94.25,93.5,92.87,91.12,94.12,95.37,95,94.62,95.25,95.62,95.25, -95.37,94.5,93.87,94.75,94.37,96.5,98.12,96.87,94.25,92.75,95.62,98.75,98.5,98.37, -100,101.25,102.62,103,104.5,103.75,103.5,102.62,103.87,105.37,106.62,108.5,108.25,111.37, -114,114.62,112.75,112.12,110.87,109.62,110.37,110.37,110,109.37,109.75,109.5,111.75,110.12, -111.25,111.25,110.87,109.62,110.25,107.87,104.87,104.37,105.5,108.62,107.5,104.12,104.25,102, -101,101.25,100.62,98.87,98.62,97.87,98.12,98.12,96.62,98.69,99.25,99.37,99.12,98.62, -98,94.62,93.62,94,93.37,92.25,90.75,90.25,90.75,91.37,92.75,93.5,95.37,95, -93.62,95.75,97.5,97.87,97.87,97.62,95.37,93.75,96.12,95.62,95.87,95.37,95.62,95.12, -95,94.37,95.25,94.62,96.12,94.62,93.37,94.25,96.25,96.87,95.75,93.87,93.87,92, -90.37,88.25,88.5,88.5,87.37,87.62,86.87,86,85.12,84.62,84.12,83.62,83.5,83.5, -83.37,84.75,84.87,85.12,84.37,83.37,82.62,84,84,83.62,83.62,82.25,82.75,83, -81.62,81.37,80,80.87,81.25,80,77.37,76.37,75.25,75.37,75.37,75.75,74.5,75.12, -75.75,76.25,75.87,75.62,75.37,75.75,75.25,74.87,74.37,74.87,75.25,74.37,73.87,72.87, -73,73.12,73.37,73.12,74.87,74.5,76.5,77.62,77.87,78,78,76.87,76.37,77.12, -77.25,75.87,75.75,75.25,74.62,73.87,74.5,74.37,74.37,74.5,74.25,74.62,73.62,71.62, -71.62,70.87,71,70.62,71,71.37,71.5,71.5,71.37,72,72.37,71.37,70.75,71.25, -71,71.62,70.87,70,72.87,74.12,73.37,73.75,73.12,73.87,73,73,73.62,74.37, -73.5,72.25,73.5,74.62,75.25,75.25,75.62,76.37,74.62,74.5,74.37,74.62,75.37,76.12, -75.75,74.5,73.75,73.12,74.12,73.5,72.37,71.87,71.75,69.5,69.12,69.5,69.5,70.12, -69.87,69.87,69.37,69.12,69.5,70.25,71.37,70.5,71.25,71.37,70.25,70.12,69.62,68.12, -68,68.12,68.25,67.62,68,68.25,69.5,69.75,70,70.12,69.75,67.37,68.25,68.37, -68.62,66.87,65.62,64.75,64.5,65.12,64.62,65,64.5,63.38,63.13,63.5,63.13,63.38, -63.13,62.75,63,62.5,63.13,62.38,62.5,62.63,56.25,56.88,57.63,57.88,58.5,56.75, -56.13,57.13,57.88,57.38,57,57.88,59.13,60.5,61.5,61.88,61.63,61,62.25,62.13, -62.13,62.25,63.13,63.5,64.75,65,64.12,62.88,62.13,63,63.25,63.5,61.88,63.5, -63.63,63.75,64.12,64.12,64.12,63.38,62.5,62.38,62.13,61.88,61.5,58.63,57.88,57.75, -58.25,58.25,57.88,57.13,57.5,58.25,58.63,58.38,57.88,58.25,59.25,59.25,59.5,58.63, -53.5,53.75,54.13,54.5,53.88,53.38,53.88,53.38,53.13,53.25,53.55,54.13,53.5,54.63, -55,54.38,54.63,56.5,57.13,57.88,58.63,58.88,58.25,58.25,58.25,58.38,57.88,56.25, -56.25,55.75,54.88,53,53.25,53.38,53.5,53.88,53.25,53.38,53.38,54.25,53.88,52.88, -55,55.25,54.63,54.63,53.38,53.63,54.25,54.75,54.63,55.63,56.88,56.5,57.38,57.88, -58.13,57.5,58.75,59.38,58.75,55.63,55.88,57,57.38,58.5,59.5,59,58.88,59.38, -59.5,59.38,60,59.88,59.13,57.75,57.38,58.38,58.75,59.38,59.25,59.38,59.25,59.13, -59.38,59.88,57.63,57.63,57.38,57.75,55.5,54.13,54.13,54.25,54.38,54,54.13,54.75, -55.13,56.13,56,55.25,53.25,52.5,52.63,53.13,54.25,53,51.63,52.5,52.38,50.13, -50.63,50.75,50.13,50.5,51.13,51.13,48,46.63,46.38,46.63,46.25,45,45.75,45.25, -43.63,44.63,45.13,44.88,43.25,43.88,44.38,44.38,44.38,44.13,44.38,44.5,44.75,43.88, -42.13,42.13,42.63,41.88,42,42.38,42.5,42.63,43.38,43.38,44,43.88,43.88,44.38, -44.63,44.63,45.38,46.25,46.38,46.38,46.38,45.88,44.75,44.13,44.75,44.13,44.63,44.75, -43.25,43.25,43.5,43,41.75,42,42.5,43.5,43.38,43.75,43.75,44.75,44.38,44.13, -44.75,44.5,44.5,46.38,45.88,43,43.63,44.75,43.88,43.75,46,47.5,47.88,47.88, -48.5,48.25,47,47.63,47,48.13,48.63,49.75,49.88,50.5,50.75,49.75,49.13,49.38, -49.63,50.13,49.63,50.25,50.38,51.88,52.5,53,52.75,53.38,52.5,54,54.38,54.38, -54,53.38,53.13,54,52.75,50.88,49.88,49.25,49.5,50.13,49,48.25,48.13,47.75, -48.63,48.88,49.13,48.63,48.63,49.5,49.88,49.38,49.38,50.13,50.75,48.75,49.25,48.38, -49,50.25,50.63,50.63,49.13,49.25,49.63,51.13,51.88,52.38,52.25,52.63,53,53.13, -52.13,51.5,52,52.75,51.63,50.88,53.75,54.25,53.75,54.5,54.75,55.63,55.38,56.25, -55.75,55.88,57.13,56.75,56.25,55.88,55.25,55.5,54.63,55.38,54.88,53.88,52,51.75, -51.38,50.75,51.25,50.75,50.88,51.63,51.88,53.88,54.5,53.13,52.63,51.88,52.75,53, -52.63,51.63,50.88,50,53.25,49.25,48.75,47,48.25,50.88,50.13,49,49.5,49, -49.88,48.38,46.88,48.63,49.13,50,51.88,51.25,50.88,51.13,53,53,52.63,52, -51.63,53.25,53.38,55,59.88,63.38,62.88,62.38,64.25,65.75,67.37,67.62,68,68.25, -68.87,68.62,66.25,66,65.5,63.88,62.63,63.88,64.37,65,65.5,65.12,65.37,65.75, -68,67.62,66.5,67.25,69.62,69.87,69,67.37,67.62,67.12,67.25,68.75,69.37,69, -69.12,69.62,70.25,72.87,74.12,78.87,80,79,79.87,79.5,80,80.37,78.87,80.5, -81.12,81.37,82.75,82.87,83.12,83.75,83.75,84.62,84.5,84,83.75,84.5,87,88.75, -88.25,87.5,86.87,86.37,86.62,87.75,87.62,87.62,87.5,87.37,87.37,87.12,87.12,86.25, -86.5,86.87,88.5,88.62,89.12,88.75,89.12,89,88.62,88.75,88.62,90.12,93,94.87, -95.25,95.12,95.5,94.87,94,93.25,93.62,93.25,94,94.25,93.37,97.37,100.37,99.37, -98.37,98.87,97.87,98.37,97.87,98.75,98.25,98.25,98.5,98.62,98.62,97.37,98.25,97.87, -96.37,95.37,95.5,95.87,93.87,94,94.12,93.87,92.12,91.12,91,91.25,90.75,89.75, -90.75,91,91.25,92,91.5,91,91.5,92.25,91.62,92.75,92.5,91.87,92.12,92.25, -93.62,93.87,94.37,94.25,94.12,94.12,94,93,92.12,90.75,88.87,88.5,88.75,89.25, -90.62,90.12,90.25,89.75,88.62,88.87,89.75,87.5,86.12,85.87,85,84.87,83.12,82.37, -83.5,83.5,84.87,83.87,84.37,85.37,86,86,86.75,86.62,87.12,88.5,88.87,89.62, -90.25,89.12,88.37,88.37,87.37,87.25,88.12,89.62,88.62,87.75,88.62,88.37,88.62,89.25, -90.25,90.37,90.62,90.75,91.12,91.12,93.25,92.37,90.87,89.87,90.37,90.87,92.12,92.25, -91.37,92,92.5,94.12,94,94,94.25,95.87,95.62,95.5,96.37,98.12,97.12,95.75, -92.5,90.87,92.5,94.25,95,94.75,93.12,91.12,90.62,91.12,90.75,89.62,88.87,90, -88.5,86.25,85.87,86.87,87,88,88.87,89.25,87.87,86.5,89.75,90.25,91.12,91.5, -92.12,92.37,93.87,97.12,98.12,95.62,96,96.75,97.37,96.75,97.75,100.12,100.12,99.12, -100.62,100.75,101.37,100,97.25,97.75,97.75,99.37,100.37,100.25,99.37,98.62,98.62,99.12, -98.75,100.5,101,100.37,101.25,103.75,104.75,101.62,100.5,99.87,98.25,99.37,99.37,99.62, -101,102.5,103.75,104.25,105.37,105.75,105.75,105.87,104.62,105.12,106.37,105.5,104.87,104.37, -103.75,104,101.37,101.25,101.12,99.62,99.12,99.25,98.87,97.12,95.87,95.25,95.62,95.62, -96.12,96.37,96.37,96.25,95.62,98.62,99,99.37,99.87,99.5,99.62,99.75,100.5,100.75, -101.25,101.62,101.75,102.12,102,101.37,101,101.62,101.37,103,102.12,100.87,98.37,96.87, -99.5,99.87,99.75,99,100.37,100.87,100.5,99.25,98.87,99.37,98.62,97.75,98.75,99.37, -99.62,99.62,100,99.25,101.25,101,100,101.62,101.37,102,103.5,102.75,103,103.62, -105.5,106,107.37,106.5,105.12,104.62,105.37,105.12,104.62,104.62,104.25,104.25,104.62,104.25, -105.12,106.25,106,106,105.87,104,103.5,103.62,106.5,106,104.5,105.5,107.87,108.25, -109.12,108.87,109.12,109.37,110.25,110.75,110.75,109.25,108.37,111,111.87,111.62,113.37,113.5, -114.5,114.75,114.25,113.5,114.25,114.37,114.62,114.62,113.62,112.62,115,115.37,119,128.13, -127.75,130.75,129.63,129.25,130.5,133.63,133.75,134.88,135,132.5,131.5,131.5,130.88,133, -135.13,137,138.25,138.75,139.75,137.88,136.25,135,133.88,132.5,129.88,131,130,128.5, -127.62,127.62,127.12,127,125.37,125,122.62,121.62,120.12,119.62,120.12,118.25,116.12,109.25, -107.75,107.12,108.25,108.37,110.75,110.37,111.87,113,113.87,113.75,113.5,113.87,113.87,114.25, -114.25,114.37,114.62,114,113.5,111.75,112.5,114.62,114.5,113.12,113.75,112.87,116,114.87, -115,114.5,114.5,112.87,113.87,114.12,114.25,114.25,114.12,115.12,114.87,114.12,113.62,114, -113.5,113.25,110.25,107.62,108.25,109,108.12,108.62,107.37,106.62,106.87,107.87,107.5,109.25, -109,108.25,108.75,109,105.37,101.62,100.37,100.87,102,103.87,106.62,108.62,109.5,109, -108.25,109,110.37,109.5,107.12,106.62,106.75,106.5,106.25,107.87,109,109.25,107.62,105.75, -105,107.75,108.37,107.75,107.62,105.5,103.5,103.87,102.62,101.87,104.12,104.37,104.12,104.37, -101,98.37,101,101.75,102.75,103.37,105.75,105.25,105.12,104,103.62,103.87,103.87,105, -104.37,109.5,110.75,112.37,112.87,112.37,112.75,114.62,115.5,116,117.75,120.25,120.12,121.62, -122.5,123.12,122.12,120.37,119.25,119.75,119.25,118.5,117.62,118.75,118.75,118.12,118.37,118.12, -118,117.25,119.5,119.12,119.12,119.12,120.75,121.25,121.87,122.12,120.87,120.25,120.87,121.5, -122.25,121.87,120.87,120.75,120.87,122.12,119.87,118,118.87,118.75,117.75,117.37,116.25,116.25, -115.75,115.62,115.5,114.5,112.87,111.25,111,111.37,110.62,110.12,109.12,109.62,109.25,109, -110,110.12,110.37,109.5,109.5,110.25,110.87,111.25,111.25,108,106.5,106.37,105.87,106.37, -106.87,107.75,106.75,105.87,106.75,106.87,105.87,104.75,105.75,106.12,107.5,108.5,109.37,109.12, -108.75,107.37,107,108.25,107.75,107.37,107.37,106.25,105.75,105.87,105.37,104.37,104.62,105.5, -104.12,103.87,105.5,105.12,103.12,104.5,104.62,104.25,103.25,102.37,103.25,103.87,103.75,101.37, -99.87,98.75,99.75,98.62,97.62,97.75,97.25,97.87,97.87,98.25,99.12,99.87,99.62,100.87, -100.37,98.37,99.25,100.37,100,101.25,100.87,101.62,100.37,99.5,98.12,94.62,95.12,95.37, -95.5,95.75,95.37,95.12,95.25,95.25,95.25,95.5,97.37,97,96.75,98.12,99.25,99.25, -101.87,99.5,98.12,98.12,98.62,99.37,100.75,100.75,100.5,99.75,99.37,99.75,98.25,98.5, -99.25,98.87,98.62,97.5,98,97.75,98.12,98.87,99.62,100.37,101.37,100.75,100.87,101.75, -102.75,104.5,104.75,104.62,105.37,103,102.87,107.75,108,107.75,108.25,109.37,109.25,108.12, -109.12,108.25,108.25,109.75,109.37,111.25,112.5,117.75,117.87,116.87,117.25,116.37,116.5,116.12, -116.25,115.87,117.5,117.25,116.37,116.37,117,117.62,118.75,118.25,117.62,117.5,118.37,118.12, -116.5,116.12,114.12,113.87,115.37,115.5,115.75,116.37,116.5,116.5,118.25,118.25,119.12,119.37, -117.62,115.75,114,115,116.5,115.25,114.25,113,112.62,114.37,114.12,114.37,114.62,115.5, -116.75,116.5,115,115.25,115.12,115.87,115,112.75,112.37,112.75,112.5,112.12,113.25,115.12, -114.5,112.75,111.12,109.87,110.37,111.25,110.5,109.62,110.5,111.5,111.62,109,109.5,109.62, -110.37,109.75,110.12,110.87,110.75,110.12,109.75,110,110.25,110.12,109.87,111.87,112.5,112.5, -111.87,113.12,112.87,111.25,109.87,110.25,110.12,109.75,111.37,111.12,112.5,113.75,113.62,114.62, -115.75,114.75,115.12,114.37,113.5,112.87,113.12,113.12,111.75,112,111,112.25,111.37,110.25, -110.25,108.25,108,108.5,109.5,109.5,109.75,110.37,110.87,110.37,110.25,109.37,110.5,111.37, -116.5,118.75,118.75,119.37,119.62,118.5,119.87,120.62,121.12,121.62,121,120.87,122.37,122.25, -121.87,123.5,123.62,125.5,126,126.62,126.87,127.12,126.75,126.25,126.62,127.5,128.38,128.63, -127.87,128.88,129.88,130.88,130.88,129.25,127.87,127,124.37,124.62,124.12,124.37,125.37,125, -124.5,125.12,123.75,124.12,122.25,122.5,122.37,122.75,123.12,122.62,122.25,123.62,124,123.12, -123.87,123.5,123.25,123.62,124.12,123.25,121.87,121.62,121.75,120.75,121.87,120.75,121.37,122.75, -122.12,121.62,119.37,118.75,119.75,119.75,119.75,116.75,118.5,117.25,115.62,116.12,116,117.5, -118.12,117.5,119.25,120.37,120,120.62,120.12,121.37,122.87,123.87,124.37,122.87,121.25,121.25, -122.5,123.5,124.62,124.62,124.87,124.75,124.37,121.87,120.25,119.75,118.5,118.75,116.5,116.25, -114.12,114.37,115.37,115.25,116.5,115.5,114.12,113.62,113.62,113.37,113.87,113.62,113.37,114.12, -115,115.37,115.87,115,115.37,115.25,113.12,113.25,113.87,114.75,111.12,113.5,113.75,114, -112.75,112.12,112.87,111.75,113.12,115,115.5,116.37,116.75,117.87,118.75,119.62,121.62,123.62, -124.37,124.25,125.5,126.5,126.87,126.5,126.25,123.87,123.12,123.37,122.37,121.62,123.62,124.75, -125.37,126.25,126.5,125.75,125.62,127.37,127.37,128.25,127.87,129.5,129.25,127.75,127.75,128.38, -127.75,126.25,126.25,125.87,123.62,120.37,117.62,117.5,118.37,119.62,119.75,117.37,117.37,117.12, -116.87,115.25,114.37,113.87,113.62,114.5,113,108.37,109.25,109.75,109.5,109.87,110.75,110.62, -110.62,112.75,111.75,110.37,109.37,109.87,111.5,110.87,111.87,111.62,114.75,115.12,114.37,113.75, -113.5,114.5,114.75,114.62,114.25,114.12,113.87,116,114.5,114.37,115.75,116.5,114.12,113.62, -112.62,110.25,109.75,108.25,109,108.5,106.62,108.75,108.37,110.37,110.5,113.37,114.25,114, -114.62,115.5,115.37,115.37,115.75,115.5,116.5,117.75,118.62,117.5,117.5,117.25,118.37,118.37, -117.75,115.75,117.87,116.75,115.87,115.62,113.37,113.75,114.25,113.75,112.87,112.37,111.75,109.25, -108.37,109.5,109.25,111.75,110.62,113.5,114.37,114.5,114.75,113.5,113.25,111.75,112,111.37, -115.5,119.75,120.25,117.37,118.25,117.75,118,123.75,124,123.25,123.5,121.25,116.37,117.75, -116.62,117.62,119.87,120.37,118.37,119.5,118.25,119.5,119.25,117,115.75,111.62,114.5,114.75, -111.5,109.5,107.75,110.87,112.12,112.87,112.37,117,118.87,119.5,117.75,117.87,118.87,119.5, -119.25,123.25,122.62,123.5,120.12,119.5,119.75,124.5,124.62,122.5,123,124.87,125,123, -120,118.62,117,122.75,122.5,125.5,122,138,141.25,145.75,147.38,151.5,151.25,151.63, -152.88,153,156.38,157.25,156.88,154.75,151.88,153.75,158.25,156.63,158.13,156,155.75,156.5, -158.5,158.63,159.88,162.25,162.75,161.38,158.38,158.13,160.5,162.75,163.5,164.13,169.38,169.5, -168,168.38,169.5,174.88,175.13,175.88,175.25,173.25,173.88,174.75,175,174,172.13,169.63, -166.75,165.63,163.25,161,160,160.88,163,162.5,161.75,162.88,162.63,161.5,162.25,162.88, -164.63,165.88,168.5,168.75,169.5,169.88,169.88,167.25,167.25,166.88,166,165.63,165.13,164.63, -165.75,166.5,167.75,168.63,167.63,165,163.5,162.13,162,162.5,162.25,160.13,159.38,159.13, -161.5,161.63,161.88,161.25,161.38,160.38,159.75,161.38,163.88,162.75,162.38,160.75,159.25,158.75, -158.63,161.75,161.25,165.38,167.38,167,166.13,167.38,165.88,166.75,167.63,167.63,163,162.38, -161.5,159.63,156.63,156,154.13,156.5,157,158,150.63,152.25,151.88,150.88,150.25,145.63, -147.5,148.25,150.13,150.38,150.75,151.38,152,153.38,152.75,154.13,156.63,156.5,152.88,150.25, -149.25,147.38,148,147.13,145,146,145.13,144.38,142.88,138.88,140.5,141.88,141.38,138.88, -140,140.63,141.63,143.5,144.25,144.13,139.75,139.63,139.5,138.63,134.75,135,134.5,135.5, -135.88,137.13,137.5,135.13,134.38,132.5,129.13,130.88,130.25,129.75,127.87,129.88,128,124.87, -127.25,125.25,121.12,121.37,118.75,118.75,121.12,122.62,123.37,124,124.37,124,122.5,121.87, -121.62,122,122.25,122.5,122.5,125,125.87,127,128.13,128.5,127.62,128.25,129.38,129, -128.13,128.75,128.5,129.25,130.13,129.88,127.37,127.25,127.87,127.5,125.25,125.37,123.87,123, -123.12,123.62,121.5,123,124.37,124.25,123.25,121.87,122,124.75,126.5,126.37,123.75,123, -121.75,122.37,122.12,122.25,122.5,121.5,121.37,121.25,122.37,123.37,123,123,125.25,124.5, -127.87,127.5,133.63,133.63,133.25,133.38,135.5,135.88,135.25,136.63,137.63,139.38,139.38,138.63, -138.25,139,139.63,138.5,138.5,139.88,142.88,144.5,145.5,143.88,141,139.5,136.38,138.88, -140,140.38,142,141.25,140,138.13,140.5,139.5,137.75,135.75,134.5,135.25,134.38,132.75, -131.63,131.63,131.88,131.5,131.88,131.88,133.38,133.25,133.25,132.75,134.88,135,133.63,134, -133.88,132.38,133.5,134,136.13,138.63,141.38,145.63,145.88,144.75,144.63,148.13,150.13,150.13, -148.63,147.5,147.38,147.63,148.5,147.88,147,147.5,147,147,148.75,149.88,149.88,149.13, -149.5,148.75,149,151,150.88,152.88,152.75,153.5,154.63,153.63,152.5,147,146.25,145.13, -146.63,146.38,145.25,145.63,148.13,149.13,150.38,151.5,150.25,150.5,153.5,155.88,155.88,157.25, -157.5,159.75,161.88,161.38,160.38,158.5,155.25,155.13,154.88,154.88,155.63,155.25,153.63,152.63, -152.38,151.5,152.63,152,150.25,150.13,152.88,151.13,152,153.13,151,147.88,148.75,150, -150.88,152.75,152.38,153.5,151,151.5,150.88,152.63,152.13,148.5,147.25,149.13,148.38,153.13, -152.5,156.75,158.25,159.13,158.63,160,161,159.13,160.38,159.75,157.88,155.88,157.25,158.25, -157.88,157.25,156,155,155.5,154.63,153.5,151.13,153.63,151.75,151.25,150.5,148,150, -150.38,150,156.25,156.5,152.75,149.88,149.63,151,150.38,156,156.5,154.88,154.38,154.88, -158.75,158.5,155.63,153.75,154.63,155.13,156.63,154,153.88,154.5,153.5,151.5,149.38,149.38, -148,144.88,141.75,142.88,141.88,138.63,139.88,140.75,140.5,139.75,139.5,140.5,140.25,139.13, -139.25,138.63,138.38,137,135.75,136.38,134.88,133,132.75,133.25,134,132.63,131.13,130.75, -131.38,131.38,129.38,128.88,131.25,130.88,130.13,127.87,129,130,129.5,129,128.13,126.25, -124.75,125.37,124.75,125,124.37,125.25,127,126.62,124.25,123.87,127,128,128.38,128, -128,128,128.5,128.5,128,128.5,128.5,129.5,130.5,129.75,128.63,127.25,127.5,127.62, -128,128.63,128.88,128.25,127.12,128.38,128.38,127.75,126.37,126.37,127.25,129.13,127.5,127.37, -128.63,128.88,129.75,131.75,131.5,132.25,132.75,131.88,130.75,132,132.5,130.25,129.88,131.88, -129.88,130,130,130.25,128.75,126.75,124.62,124.12,123.37,123.25,124.5,124.87,124.62,125.37, -125,124.5,124.25,123.25,123.37,121.12,119.75,119.75,120.87,121.62,120.5,121.12,120.25,126.12, -128.25,127.87,129.88,129.75,130.63,130.13,129.5,130,129.5,130.25,131.75,131.63,132.38,132.75, -133.25,133.25,131.25,129.5,129.25,130.88,130.63,130.88,128.25,127.25,126.25,125.62,125.62,126.87, -126.87,126.75,127.12,129.75,129,129.13,129.25,128,128.13,130,130.13,130.38,129.75,128.13, -127.62,126.62,125.37,127,127.25,127.62,129.5,128.25,127.12,127.62,126.62,125.62,128,128.75, -130,130.63,131.13,129.88,130,130.38,132,132.5,131.75,131,133.38,135.5,135.88,136.38, -136.75,134.5,135,135.5,133.88,134.25,134.5,134.88,132.25,132.75,134.63,134.63,133,137.25, -137.88,137.63,136.63,138.25,138.25,136.63,136.88,137.63,137,135.25,134.13,134.5,132.63,130.63, -128.5,125,124.62,125.5,125.62,125.25,124,123.75,120.75,120.5,120.87,120.37,122.25,122.62, -123.87,124,124.25,124.25,124.5,123.75,123.87,124.5,123.25,119,120.25,119.62,119.37,119.12, -118.25,119.12,119.5,120.25,121,121.37,122.25,123.12,124.87,125.12,123.25,122.62,121.37,121.37, -121.62,123.12,123.25,123.75,124.25,124,125.5,125.75,127.12,127.75,126.87,126.5,126.87,126.75, -127.12,124.87,125.12,126.75,127.37,127.37,126.5,127.75,126.25,123,122.75,123.37,122.25,122.12, -121.75,122.25,121,122.37,122.25,122.5,123.62,123.75,126.12,126,126,124.75,125.12,127.5, -126.25,128.38,127.87,128.5,127.75,126.12,123.37,124.5,123.37,123.87,124.25,122.62,123.12,124.12, -124.87,126,125.75,124.75,125.62,125.75,126.37,126.75,123.5,123.87,123.62,123.5,123.25,122.75, -124.87,123.25,121,122.75,124,121.25,115.12,113.25,110.87,109.37,109.62,108.75,107.75,107, -106.37,107.25,107.37,108.12,108.37,107.25,105.75,105.62,107.12,107.37,107.5,106,107.5,107.37, -105.75,106.5,105.62,104.5,105.5,106.25,106.5,108,102.5,103.75,101.87,101.12,104.12,105.5, -104.87,105.5,106,106.25,106,107.62,109.25,108.62,108.75,108.5,107.62,107.87,108.12,109, -108.5,109.75,110.87,111.75,112.87,113.25,112.25,112.12,113.37,114.87,114.25,113.37,114.87,116.37, -117.25,116.5,114.62,114.25,113.5,112.25,111.62,111.37,111.12,112.25,113.5,112.87,113.5,112.75, -110.37,110.75,110,109.75,111.37,111.5,112.5,114.62,114.62,115.75,115.37,113.87,113.25,113, -114,115.5,115.37,114,114.25,112.5,111.5,112,110.5,108.62,109.25,108.25,111.62,111.5, -112.87,111.62,111.75,112.5,113.5,111.5,109.25,110.87,109.87,110.5,110.37,111.37,111,110.25, -110.5,110.12,110.87,110.75,110.87,114.37,114.5,114.62,114.75,115,115,115.87,117.75,117.25, -117.12,119.12,120.75,121.87,121,120.5,122.25,123,122.75,123.87,124,124.5,125,124, -123.37,123.37,124.87,124.62,124.75,123.75,124.12,123.62,122.62,122.37,120.87,121.62,123.12,124.37, -124.5,122.37,119.87,119.37,119.25,119.12,119.25,119.5,122.25,121.75,121,121.75,123.37,125.62, -125.5,123.75,124.5,125.87,127.62,127.75,127.25,125.75,123.62,122.87,123.37,123.25,126.5,127, -127.25,129,130,129.38,128.88,129.75,128.63,129.75,130.5,130.75,132.13,132.63,133.75,133.88, -133.38,134,134.25,132.5,132.25,131.25,130.13,128.5,128.13,129.5,129.13,128.38,129.5,126.62, -124.75,124.12,124.5,124.87,124.25,123.25,123.5,122,123.37,122.87,123.5,122.87,121.87,119.75, -119.62,119.5,119.25,119.25,118.25,116.87,119,120.87,123.25,122.5,123.75,123.5,122,121.5, -118.87,119.12,119,119.5,119.87,120.12,119.87,121.37,121.5,121.37,122,124.12,126.5,127, -126.25,125.5,126.25,125.37,121.5,120.5,121.75,124,121.75,123.5,123.37,121.5,122.75,121.75, -119.62,121.25,121,120.87,121.37,122.75,123.87,123.75,124.5,123.62,122.75,122.5,122.87,121, -119.75,117.25,114.62,114.5,114.75,116.25,116.12,114.87,113.87,111.87,112.87,115,115.87,115.62, -115,112.87,111.75,112.5,114.75,115,115.25,116.62,116,117,117.62,118.25,118.5,115.87, -116.87,115.87,117.12,117.62,117.5,118,117.25,117.12,117.87,115.5,115.25,112.12,112.62,110.5, -110,109,107.37,106.75,104,103.37,102.75,103.25,102.5,104.87,104.5,104,102.87,103.25, -103.12,102.87,101.12,101.12,100,99.25,100.75,101,101.12,101,102.62,102.37,103.25,103.37, -102.25,103,103,101.87,100.5,101.25,101.5,98.75,99.5,99.5,99,100.25,100.5,99.5, -97.75,96.87,95.5,97.37,98.37,97.5,96,97.25,99.25,98.87,98.5,98,96.12,96.25, -94.12,97.5,98.75,100.25,100.37,100.75,99.87,99.25,100.12,98.37,99.25,98.37,98.5,96.75, -95.62,97,97.12,98,97.25,96.37,96.87,94.5,96.37,96,94.62,94.62,91.25,91.5, -96.25,94.75,95.12,96,97.5,96.37,93.75,89.37,89.25,88.25,86.5,83.75,83.62,82.75, -82.12,83,84.37,84.5,84.5,83.12,82.75,85.37,85.37,86.5,85.87,83.75,85,85.37, -85.5,83,81.5,80.5,81.5,82.37,82.12,81.87,84.75,84.75,84.5,83.5,83,80.37, -81.87,84.12,84.37,84.5,81.12,80.37,79,76.12,74.62,74.62,74.87,76.37,77.25,77, -76.5,76.62,77.62,76.75,74.75,74.75,75,73.62,74,73,72.12,73.25,73.62,72.75, -74,72,71,71,70,69.25,70.5,70.12,69.25,69.5,68.62,66.75,67.62,66.12, -63.63,63,62.88,63.13,63.75,63.25,64.25,64.75,66.12,67.25,67.12,66.25,65.62,66, -66.25,66.62,67,67.37,68.62,67.62,66.62,67.75,67.5,66.87,65,66.87,62.5,61.63, -61.25,60.75,60.63,60.88,61.5,61.38,61.5,60.63,61.25,61.5,59.88,59.63,58.63,59.25, -60,59.75,59.5,60.13,59,58.63,59.88,60.63,61.63,62.13,62.13,61.88,62.13,62.38, -62.38,62.63,62.63,63,63,63.25,63.25,63.75,64,64.25,64.62,64.75,64.87,65.12, -65.12,65.25,65.25,64.75,64.75,64.62,65.25,65.75,66.12,65.75,64.75,63.88,63.88,65.12, -64.87,64.62,64,62.75,62.5,62.5,62.13,61.88,61.75,61.88,61.13,60.63,60.5,60.25, -59.75,60.13,59.38,59.63,59.5,58,58.38,58.13,58.88,58.88,58.13,59.38,59.63,59.5, -59.25,59.38,60,60.88,62.38,62.75,61.88,62.5,62.13,61.38,62.88,63,63,63.25, -62.38,61.75,62,62.38,61.75,63,64,63.5,63.25,63.5,63.38,64.75,64.5,62.75, -62.5,62.25,62.63,63,62,62.13,62.13,60.13,58.88,58.25,58.38,58.75,56.75,57.25, -57,57.88,58.38,57.38,57.63,57,57.38,57,56.88,57.25,56.88,57,55.75,54.5, -53.88,53.88,54.75,54.75,54,53.75,55.38,55.13,54,53.75,54.63,54.5,54.5,53.13, -52.38,50.88,50.88,50.38,51.13,51.38,51.25,52.63,53.13,52.63,53,51.75,51.75,52.75, -52.38,53,53.13,51.75,49.75,50.88,51.25,50.88,51.13,51.63,52.25,51.88,51.63,52.38, -52.88,53.38,55.13,56,56.25,55.5,55,55.13,55.5,55.13,54.38,54.5,54.88,55, -54.25,55.25,54.63,55,55.13,54.5,55.13,55.38,56.5,56.75,56.13,55,54.5,54.13, -54.88,56.13,56.25,56.13,56.38,56.13,56.38,56.13,56.63,56.63,57.38,57.5,57.25,57.13, -58.25,58.75,58.63,58.75,58.88,58.13,57.25,57.5,58.75,58.25,56.75,56.63,56.63,55.75, -55.5,55.63,55.13,55.25,55.88,55.63,55.88,56.63,56.88,56.88,56.88,56.25,56.5,56.88, -57.13,57.38,57.13,57.25,57.88,58,59.13,59.63,60.13,59.5,59.63,58.25,58,58.5, -58.88,59.75,60.38,59.63,59.5,58.25,58.13,58.88,58.5,59.13,59.75,60.5,60.75,59.13, -58.5,58.13,56.38,55.88,56.38,56.63,56.63,56.88,56.88,57.13,57.25,56.88,57.63,57.88, -57.63,58.13,58.25,58.38,59.38,59.75,60.25,61.25,61.38,61.13,61.38,61,61.38,61.75, -60.25,59.88,60,60.75,63.25,61.75,60.5,60.63,61,62.38,62.75,63.38,62.63,62.13, -63.38,64.25,64.12,63.25,63.38,64.12,64.75,65.25,65.25,64.75,64.62,64.12,62.75,63.38, -63.25,62.38,62.38,62.88,63.75,64.25,64.5,64.87,64.25,62.63,62.38,61.63,62.25,62.38, -62.5,62.13,62.75,63.25,63.63,64.37,64.75,64.5,64.75,64.25,64.37,65.5,65.5,65.62, -65.87,65.5,65.62,65.37,65.62,67.12,67.25,67,66.75,67.5,66.75,68,68,69.75, -70.12,71.5,70.75,69.25,69.12,69.25,69.5,69,68.75,68.12,67.25,64.87,65.62,66, -66.25,66.37,66,64.5,66.5,66.75,67.25,68.87,69.5,69,68,68,68.87,69.75, -70.62,70.37,71.62,72.25,72.75,72.62,71.75,72.25,71.62,71.12,67.75,67.25,67.12,68.12, -70.25,67.62,67.25,66.25,67.12,66.75,66.5,66.62,67.75,68.12,68.87,68.5,69.37,71.12, -70.37,70.87,70.75,71.5,70.87,70.37,68.25,68.25,67,65.37,65.62,64.5,64.25,65.87, -67.87,68,69,68.37,67.5,67.37,67.87,66.37,66.25,66.5,66.37,66.25,66.25,66.62, -67.25,68.12,67.5,66.5,65.62,66,67,67.75,67.5,68.87,67.75,67.87,67,68, -69.12,69.12,67.5,68,66.75,66.25,65.75,65.62,65.37,65,65.37,65.37,66,65.5, -65.25,64.62,65,65.37,66.12,66,65.75,65.62,64.62,65.25,65,62.88,62.38,62.88, -62.25,62.25,61.5,61,59.63,59.5,60,60.25,60.25,59.38,59.25,58.38,59.75,59.75, -60.38,60.38,59.13,58.38,58.38,57.75,57.5,57.88,58.38,58.13,57.13,57.38,55.5,56.13, -56.63,55.63,55,54.13,52.88,53.5,53.75,53,53.25,53.5,53.25,53,53.75,54.38, -55.75,55.75,55.75,54.38,54.88,55.13,55.13,55.38,55.38,54.25,54.38,54.5,51.63,51.75, -51.63,52.88,53.5,53.75,55,55.25,54.75,55.75,54.88,55.88,56,55.75,55.88,56.38, -57.5,55.88,55.13,56.38,58.13,59.25,59.75,60.25,60.38,60.75,61.25,62.13,62.25,62.25, -61.88,62.25,63.13,63.38,63.5,63.75,64,65.12,65.37,65.87,66.25,67.12,67.75,67.75, -68,70.25,70.5,68.87,67.5,67.62,68.25,69,69.62,69.62,69.5,71.12,70.62,71.37, -72,70.75,71.5,71.25,69.87,69.87,69.75,70.37,70.87,70.25,67.25,68.25,67.75,68, -67.5,63.38,63.75,63.5,64.5,64.62,64.62,65,65.12,64.87,65.25,65.75,64.62,65.25, -65.87,66.12,65.25,65.75,66.75,66.62,67.62,67.25,66.37,65.37,65.12,65.5,66.25,67, -65.25,64.62,62.25,61.88,62.5,62.38,62.38,63.25,63,62.75,62.88,62.5,62.13,62, -63.13,63.25,63.75,63.63,64.12,64,62.88,62.38,62.88,63.13,63.38,64.37,63,63.75, -64.5,65.75,65.87,67.12,67.62,67.75,67.37,69,69.5,68.87,69,68.75,67.62,68.5, -68.75,69.5,69.25,69.87,71,71.37,68.62,68.5,69.25,68.37,66.87,66.62,67.75,67.87, -68,68.25,68.5,69.87,70,70,70.25,70.12,70.62,70.5,70.75,71.12,71.62,71.87, -71.87,72.5,72.37,70.37,70.37,70.5,69.25,70.37,71.12,69.37,69.5,70.25,70,70, -69.75,69.5,69.37,69.62,69.62,69.37,70.12,70,69.5,70.37,70.62,70,71.5,72.37, -73.62,74,76.75,72.37,72.5,73.62,74.12,74.12,74.5,74.25,74.5,74.25,74.5,73.75, -73.5,74,75,75.25,78,78.5,77.62,77.87,78.25,78.25,78,76.37,76.37,304.75, -306.38,307.25,307.38,307.5,310.5,310.5,308.88,309.75,309.5,307,310,309.75,309,310.13, -312.75,312.25,309.88,317.5,321.5,318.5,317.5,314.25,310.5,312,312.25,312.88,310.25,309.25, -312.88,314,313.5,313.38,314.25,321.5,322,319.75,320.38,320.75,321.38,319.75,315.5,318.63, -319.38,319.88,320.75,314.5,317,317.5,316,311.63,312.25,309.25,308.63,309.75,311.75,310, -309.88,309.5,307.75,306.5,307.75,301.25,301.5,301,304,304.75,303.5,305.5,308.63,308.38, -308,308.5,308.25,310,307,301.88,300.63,299.75,306.5,306.63,311,311,312.5,314.5, -313.25,313.5,312,311.25,313,312,310.75,312,312,314.63,316.25,313.88,312,307.5, -308.38,305.75,307,309,308.75,305,306.5,308,306.5,310,295,284.88,285.5,283.25, -271.88,275.38,275,276.5,278.5,278.75,276.5,278.25,279.5,278.38,274.63,274.5,270,267.5, -272,271.75,270.5,268,265.25,264.5,262.25,261.25,262.25,260.38,264.5,265.5,266.75,266, -263.25,268.25,271.5,272.75,276.5,272.5,273,273.88,275.13,277.5,278.25,278.5,277.5,280.75, -279.75,279.75,286,288.5,293.5,290.5,283.5,283,281.5,282,282,281.5,280.5,278.5, -279,282,282.5,281.5,284.5,285.75,288.5,291.25,291.88,294.5,296.38,301.38,300.88,303.38, -304.5,302.5,303,301,294.88,294,295,296.25,297.38,299.5,300,300.75,297.63,295.75, -299.75,299.38,298.5,291.5,291.5,290.75,291.25,293.25,289.75,290.5,289.63,295,293,281.75, -281.5,279.5,276.25,276.75,273,271,270.25,272,269.75,266.88,270.13,267.75,259.5,259.75, -260.75,260.88,260.63,259,259.5,257.5,260.25,262.25,261.88,262,262.5,266.5,267,268.25, -269.75,270,270.63,272.5,276.25,274.25,271.38,270,269.75,266.63,268.5,266,260.75,259.5, -262.38,261.75,261.88,264,262.5,266,266.75,264.63,266.25,267.63,268.5,266.25,266.25,265.25, -260.88,260.38,263.5,264.5,261.25,266.25,267.63,268.75,266,261.75,265,264,258.25,255.5, -257.88,254,253,253.63,244,239.5,242,240.5,241.5,243,244,241.5,238.38,236.25, -237.63,238.38,240,239.88,239,240.75,240.75,241,244.38,244.25,243.5,242.13,243,243.75, -245.75,247.38,246.75,244.75,244.25,249.75,252.25,252.5,253.75,257.13,257.5,256,256.25,255.63, -256.38,256.25,258,257.75,258.5,260.25,260.13,261.88,260.75,258.75,260.5,266.25,266.38,266.88, -266.88,265.75,266.63,267.38,267,266.25,267.25,269.25,269.75,269.25,268,267.75,268.25,268.13, -269.75,268.88,267,271.75,270.75,273,275.25,273.5,271.25,270.63,270.25,268,266.75,264.38, -264.75,266,267.63,266.38,264.5,265.88,265.88,262.75,261.5,262.38,264.75,264.5,264.25,265, -267.13,268.88,269.25,269.25,266.25,261,260.88,259.25,261.5,263,260,260.75,259.5,252.75, -252.38,253.25,253,250.75,253.38,257.63,259.25,260.13,261.25,261,257.5,259.63,259.5,258.63, -257.5,259.25,258.75,258.75,258.5,256,257.63,258,258.38,258.75,259.25,262,262.5,261.25, -260.63,260.5,259.75,260,258.5,258.63,259,259,258,262.5,263.88,264.25,263.38,263.13, -265.25,267.75,268.5,268.63,268.5,269,268.75,270.88,269.5,267.88,268.75,270.38,272,271.5, -269.38,271.25,270.13,269.25,269.38,267.38,268.75,268.25,266.25,266.5,269.63,269,270.5,269.63, -270.75,268.13,268.5,271.5,273.25,274.25,274.38,273.25,274.75,275.5,274.25,270.75,261.63,261.5, -259.88,262.25,261.5,261.75,263.63,263.88,266.38,265.75,268.88,267.25,266.5,262.25,260.38,261.25, -260.25,258.75,258.38,259.88,258.5,253.75,252.25,253.5,253.75,253,252,250.75,248.38,249, -246.63,249.25,249.13,248.38,248.13,249.63,251,254.5,256.5,255.38,255.13,254.25,252.88,255.5, -257.25,257,260,262,263.75,262,260,259.75,261.63,262,260.5,259.63,263.25,270.5, -271.5,272.88,272.63,272.5,275.5,278,279.25,277.25,276.88,275.5,276.75,278.13,278.5,278.5, -280.5,281.25,279.5,280.75,282.63,285.63,285.5,284,284.75,284.13,285.63,286.13,285,284.38, -284.5,280.13,281.25,280.5,279,278.5,277.5,277.75,276,276.13,276,276.63,277,270.88, -271.88,274,274.5,274.25,269.63,270,270.25,272.13,270.5,272.25,271.75,276.75,277.88,275.25, -274.25,269.5,269.5,273,276,275.5,279,279.63,275.75,273,271,271.25,269,272, -273,274.13,276.5,274.75,277.25,280.5,282,280.5,279,280.13,278,271.75,272.38,270.38, -266.25,269.25,268.88,270.5,270.5,271.25,272.63,274.13,273,273.75,274.5,272,273.88,273.88, -271.63,274,275.5,272.5,271.75,273,270.75,271.38,267.5,266.25,265,264.5,264.88,261.88, -260.63,261.75,267.75,269.38,270.75,272.5,272,268.38,266,263.5,259.75,257.25,264,264.75, -265.5,265.25,265.38,271.5,273.25,279.13,278.75,281.63,281.88,280.38,281,281,283.25,283.5, -285,287.5,287.5,285.5,286.13,288.5,287.75,286.75,285.63,284,279.5,278.5,280.13,279.63, -279,280.13,280.13,278.5,278,277.25,274.75,272.75,270.38,272,272.75,273.75,273.5,275.13, -279.63,280.5,280.75,280,278.88,278,279.75,278.5,275.25,275.25,275.63,277.5,275.88,272.88, -273.5,273.75,273.13,275.5,275.5,273.88,272.5,272.5,272.75,275.5,276.38,279.5,280.38,280.38, -280,279,279.38,278,277.25,276,278,278.88,276,276,276.75,275.25,272,272.88, -270.5,270,269,263,260.5,260.75,257.88,255.75,255.13,254.63,253.63,256.25,258.5,258.25, -256.5,257.25,254,252.75,251.5,253,257.5,257.63,255.25,254.25,253.75,255,257,257.25, -259.5,258.25,251.25,250,251.5,252.88,252.75,254.38,256.75,256,259.75,259.25,260,262.25, -262,261.75,259.25,257.5,262.88,263.75,270.75,269.5,269.25,271.75,273.25,272,267.25,263.75, -262.75,260.75,261.75,260.5,262.5,265.13,262,260.25,259.25,259.63,262.5,262.75,261.25,265.88, -265.88,262.25,262.5,260.13,257.5,259.25,260.38,260.75,259.25,256.38,261.5,262.5,263.13,262, -264.5,262.25,257.25,255.25,255,258,260.5,258,257.75,257.25,263.25,264.5,261.25,259.25, -259.75,257,252.25,255,256,255.5,251,252.5,253,250,242.75,242.88,241.25,238.38, -236.25,231.75,230.75,231,230.88,230,226.5,225.25,223.5,224.63,223.5,223.5,220.75,218, -219.88,221.5,220.75,219.88,216.88,215.75,217.75,218,215.88,217,220.63,220.13,219.63,224.25, -227.25,226.5,226,225.25,222.88,222.75,222,220.75,225.75,225.25,223.25,225,224.75,219.88, -216.88,217.63,218,217,214.25,212.75,212.75,213.5,214.25,215.5,211.75,214.75,215.75,213.75, -214.75,211.88,210.5,212.5,210,213,210.5,207,209.25,206.75,202.38,203.5,195.5,188.75, -189.75,191,195,196.25,193,193.25,188.75,190.25,190,186.5,180.63,180.25,180,183, -182.75,180.75,185.88,183.5,182,183.75,182.75,186.5,187.5,186.5,181,181.75,182,180.25, -178.75,178.13,182.25,183.75,182.25,181,182.25,185.38,183.5,183.75,185.75,186.25,188.75,190.25, -190.75,195.25,194.88,194,192.25,194.5,194.5,198.75,199.25,203.5,201.88,205.25,207.75,209.5, -208,208,209.25,210,206.5,207,208,207.5,210.75,211,211.5,210.5,213.25,215.38, -213,210.25,208.38,205.5,209,208.5,208.75,211.75,213.25,212.88,215,217.63,218,218.75, -219.75,219.25,215.75,215,216.5,219,219.38,216,216.5,220,219.25,219.25,226.38,227.38, -223.5,218.75,214.5,211.5,212.5,214.88,215,210.75,212.5,210,204,207,210,209, -211.75,215.75,215.25,212.88,217.38,212.75,212,209.5,206.25,212.5,210.5,201.5,198.38,200.5, -204.25,207.75,207.5,208.5,210.5,212,210.5,206.25,210,216.38,214.75,219.38,218.75,218.25, -217,216,221,220.5,220.13,219.25,220.25,224.75,220,215.75,214,212.5,209.75,217.75, -220.75,218.88,217.75,220.75,221,218.25,210.5,201.88,201.88,197.75,202,199.88,194.75,193, -189,191.5,188,188,162.88,164.63,165.25,163.5,162.25,160,160.75,164.5,170,170.5, -172.5,173,168.5,167.13,166.5,170.25,171.25,171.38,168.88,164.25,166,168.75,167.5,170, -170,171,173.25,171.63,168.25,170.5,173,175.63,174,168.5,165.75,171.5,172.75,170.5, -175.5,178.75,181.5,178.25,174.5,175.25,173,171.88,174.75,177.5,184,187.75,186.25,189.88, -191.75,191,191.25,200,196,191.25,193.5,194.25,197,191.75,181.25,183.75,181.25,185.5, -195.5,192.5,186.75,181.5,181,182,184,179.38,179.5,172,164.5,164.75,159.5,160.5, -163.5,161.75,159.5,166.75,164,171,168,175,173.5,173.75,166.5,168.5,159.75,157.25, -165,172.25,175.25,178.5,185.5,183.5,180,192.5,193.5,192,195,194.25,196.5,195.25, -196.5,200,200.5,196.75,201,202.5,202,203.75,209.75,210.75,215,215,211.75,206.88, -203.5,203.75,207.5,207.5,203.5,214.5,222.75,222.75,223.88,219.88,220,221.5,217.75,216, -221,215,200.75,203,203,202.25,209.13,213.25,213.5,213.5,214,215,220.5,221.5, -215.75,213.75,218,218.5,219.5,222,226.75,228.25,226,229,230.5,232,227.75,222.5, -222,219,215,214.75,217.88,219.5,218.75,216.75,220.25,221.5,220.75,219.75,223.75,223.5, -224.5,224,230.5,230.75,228.5,228.5,224.5,228.75,232,231.75,229,225,226.75,222.5, -227.75,230.38,232.5,233.75,237,235.5,234.5,233.5,232,234.5,235,233.5,236.5,242.5, -239.5,235.25,236.5,240.25,242.5,249,250.75,247.75,244.5,247.75,246.75,247.5,250.75,250.5, -251.5,254,251.5,246.5,243.25,244.75,244.5,242,236.75,238.25,238,240,237.75,237.5, -237,238,235.5,238,233.5,229.5,232,230,233.5,237.25,237.25,238.5,239.5,240.75, -244.5,249.75,248.5,244.25,248,248.75,248.25,250,249.75,245,251,251.5,244.5,242.25, -245.75,240,235,228.25,230.75,230.75,238,245.75,247,249.5,255,256.25,248.5,239, -244,251,254,249.5,244.5,251.5,255,253,263.5,266,267,260.75,257.75,260.5, -264.75,268,271,270.75,268.25,269.5,276.25,277.75,274.75,284.63,288.25,286,290,290, -284.75,282,285.75,279.5,280.75,279,285,284.75,281.75,284.75,288.75,291.75,291.5,288.75, -289.75,288.25,295,292.5,285,282,280.25,284.5,283.75,284.5,261.75,263.5,262,251.5, -254,257.5,257.75,261,264.5,267.5,261,260.75,264.5,271.75,270.75,261,285.13,298, -294,292.5,291.5,296,298.25,298.75,298,300.5,303,304.25,305,306.5,304.5,299.75, -300.25,300,300.75,301.25,302,304.75,303.5,303.5,302,305.5,306.75,306,310.75,312.75, -312,314,314.75,323.5,320.75,320.75,322.25,322.5,313.5,316.5,318.5,319.25,316,319.5, -319,316.5,319,320,314,305.5,302,301,304,314,319.5,319.75,314.5,315.5, -314.13,320,319,322.25,318,317,319.75,328.5,333.5,330,327,325.25,332.5,319.75, -317,310.75,314,319.75,324,328.5,408,400.5,396.5,393.75,386.75,395,400,402, -402,403.5,409.5,415.5,423,422,419,425.25,424,417.75,417.75,409,411,411.5, -409.75,423.5,428.25,432.5,432,425.75,429.75,430.75,432.25,436.25,435,429.5,428,424, -426.5,428.75,432.75,437.5,439,437.75,438.5,435,429,428.88,441.25,440,442.88,448.5, -449.75,449.5,446.75,444,442.5,443.25,445.5,445.75,442.13,444,435,431.5,432,433.5, -442.5,445,447.5,447,442.75,447.25,450.75,456.5,450,446,439,442,440,432, -432,438,437.75,445,442,438,448.5,444.75,439,439,430,424.25,424.75,429, -425,423,415.5,419.25,420,419.5,412.5,413.75,409.5,403,399,395.5,390.5,389.75, -392.75,393.75,397.5,401,397,399,403.75,405,404.5,397.5,399,400,400.75,401, -391.25,387,386.25,387.25,394.25,394.5,388,385.5,385.25,385.5,390,388,377,374.75, -376.25,383,388.5,390.88,391,389.75,385.5,381,380.75,383.5,388.75,390.5,392.5,387, -379.25,379.75,372,380,383.5,388.5,394.25,403,403.38,403.75,403.5,407.88,407.5,406.75, -406.75,405.75,407,401.5,399,399.75,401,400.88,399.25,397,400.25,400.5,398,398.5, -397.75,400.5,403,405.5,406.75,409.75,409.25,409.5,409,407.5,408,413.5,414,414.5, -413.75,416.5,417.25,421.5,422.75,426.75,425.5,425,423.5,419,420.25,417,416.5,411.5, -410,400.75,399.75,398,398.13,400.5,401,396.5,391.5,394,388.75,395.75,401,397, -398.75,399.5,404,405.5,405.13,401.75,395.25,394.25,392,394.25,395,393.5,397.25,396, -400.75,398,398.75,399.5,400.75,399.75,393,393.25,394.63,397,395.5,396.5,397.5,401, -401,399,403.25,406,404,404.75,402.5,401.5,398,395,389.5,387,386.75,386.5, -386.5,386,385.75,387,389.75,385,383.75,386,386.25,387,384.5,385,383.5,385.5, -389.25,390.75,396.75,399.5,395,398,398,399.75,393.5,393.75,391,393.5,393.75,389.5, -387.75,383.5,383.63,386,385,384,382.5,380.75,379,381,377,374,374.5,374, -377.75,382,385,384.5,383.75,381.75,378.75,380.5,373.75,370.75,371.75,373,371,371.75, -373.5,368.75,372,370,370.25,372.75,374.75,374.75,375,372.25,371,372.25,375,374.88, -369,369.88,372,369.25,370,370,366,370,365,355.25,353.5,350.75,350,341.25, -347.5,341.25,339.75,342.75,341.5,343.5,340,338.5,338,337.25,340,339.75,336.5,339.75, -345,347,348.5,339.75,339.75,328,325.25,328,324.75,318.5,317.25,317.25,320.75,321.5, -312,310,305.5,302.5,298.75,294,293.25,295.25,295.75,301,301.75,302,295,296.5, -296,299.75,302,300,300,306.5,303.5,295.75,300,301,301,300.5,304.75,303.25, -308,305.75,308.5,309.25,309.25,309.25,309.5,313.63,315.25,306,309.25,312.5,309,307.75, -308,306,306.19,304.25,306.5,304.5,309.5,308.75,308.75,306.5,304.5,302.75,302.5,303.75, -300.25,304,305.75,310.75,311.75,313,308,301.75,305.75,307.5,316.75,317.5,315,318.38, -318.88,314.75,310,310,315,318,320,296.5,297.5,291.5,287,285.75,287.75,288.75, -292.75,294.75,296,297.75,299.88,301,296,299.5,299.5,301.75,301.75,301.88,296.75,301.5, -302,301,314.5,316,316.5,313.5,317.25,317.5,319.25,318.5,317.5,314.25,312.5,312, -315.75,316.25,317.5,316.75,320.13,323.75,325,322.5,323.5,325.75,322,318.5,319.5,323.75, -329,327.75,329,331.5,333,338,339.75,340,343,347.5,349.75,342.13,339.5,344.5, -339,343.75,344.5,345.25,347,349.5,354.75,353,355.5,355,361.25,362,361.25,358.5, -358,356.75,352.5,355.75,356,355.25,353.75,358.75,359.25,361.25,360.5,362,364,362.75, -360.75,359,358,359.75,358.25,360,359,356.25,357,359.5,361.75,362.25,365.75,364, -363.25,364.75,354,349.5,350.25,350.75,348.5,345.5,342.75,338.25,338.5,339.25,336.5,338.75, -339.5,335.5,331,331.75,337.25,340.38,343.5,339.5,339.5,338,341.25,341.75,337.5,331, -329.25,328.75,328,325.5,321,326,327.75,321.75,317.75,316,314.75,314,313.75,315, -316,317.75,316.5,314,316.75,319.5,320.5,318.25,316.75,319.75,320.75,320.5,318.5,315.75, -316.75,318.75,318.25,316.75,315.75,314,311.5,316.75,319,319.88,318,319.25,316,314.75, -315,314.25,309,309,308.5,300.75,300,300.5,296.75,293,292.5,295.25,293.25,296, -298.5,303,300,299,294,296.5,300.5,300.75,299.75,297,300,297.25,291,294.75, -295.25,289.5,295.5,292,286.75,293.5,294.88,294.75,293,294.75,298.5,305,307,309.75, -308,301,297,295.5,292.75,292,291.25,288.5,281,275.25,280.38,284.75,277,271.5, -266.5,270.5,271,270.75,276.75,275,274,270.25,264,265.25,269.5,271.5,267.75,270, -268,262.75,250,244.75,242.75,240.25,235.25,229.88,230,235.75,239.75,245.5,249,249.75, -250.75,250.5,251.88,253.25,254.75,254,253.75,255,256,258.5,259,258.25,262.5,260, -255.5,253,251.75,252,254.5,256,252.5,247.25,250.38,255.25,254.75,259.75,260,261, -262,262.25,270,273.25,275.75,272,272.75,271,263,260,262.25,268.75,269.5,273.5, -273.25,281.25,284.75,286.5,287,279.75,267.75,260.5,247.25,247.25,250,245.75,255.5,268.5, -271.5,271,274.5,278.75,288.25,289.5,290.5,290.13,291,284,294.63,299,300.25,301, -299.75,310,311.5,314.5,319.63,325,325.75,323.5,325,327,326.5,331,337,330.5, -324,323,323.5,330.75,337,340.5,338.5,337.75,335,337,328,322.75,323,323.75, -324.25,324,321.75,329,328.75,332,326.5,320,329.13,332,334.75,335.5,341,345, -345,349,348.5,352.5,354.5,354.75,349.75,350.75,352,355,355,351.5,351.5,345.25, -339.5,346.75,346.75,343,344.75,344.75,347.25,345.75,354,359,357,356.5,357,355.13, -387,381.5,375.5,376,369.75,370.5,369.5,368.75,369,368.25,365.75,364.5,360.25,362.75, -361.5,359.5,360,366,367,360.75,354.5,358,359,360.25,356.75,356,361.5,359, -360,357.5,359,359.5,361,357.5,351,351.75,350,354.5,357.25,363.5,363.75,363.75, -364.5,365.75,368.5,368.75,368.5,365.25,361.25,361.25,360.5,360,362.25,359.5,360,363.5, -365,365,356.5,357.25,358.75,353,353.5,356,355.75,353.5,347.75,349.88,347.75,345.75, -350.5,349,346.75,345.5,346,347,348.25,351,356,357.5,360.25,359,353,349.5, -347.5,347.75,347.25,345.5,346.5,349.5,338.5,337.5,340.5,341.5,345.25,345.5,349.88,348, -346,341.75,346.5,350.75,349.5,346.88,344.25,341.5,339.5,338.75,335,330.5,334.25,337.5, -337,338.5,334.5,334,331.75,326.5,320,323,316.25,318.5,321.5,322,325,326, -332,328.5,324,332,333,336,335.5,345,351.5,364.5,348,339.25,339.5,334.5, -329.75,325.5,326.5,315.5,319,317.75,318,314.25,314.75,313.25,309,311,313,314.25, -318.5,319.25,320.5,321.5,320,324,322.5,329.25,329,327.5,324,324,323.75,329, -333,332.5,334.88,331.5,328.25,329.75,331.5,332.5,331.75,328,327.5,328.5,330.25,328.5, -324.5,318,316,313.5,313,308.75,308.75,308.75,311.25,312,312,314.5,313.75,312, -309.5,309,311,313,316,315.5,311.5,310.25,309.5,307,305.5,305.75,304.75,301.75, -303,295.75,300,303.5,307.75,303.5,299.75,302.5,302.5,298.5,296,297.25,298,298.5, -299.5,297.5,296.5,302,300,306.5,310.5,310.5,306.75,303,298,299,296.75,297, -297.25,297.5,297.25,300,300.5,300,300.5,303,303.75,303,300,313,312.75,309.5, -308.5,303.75,310,311,306.75,303.5,307.5,312,315.25,317,318,321.5,324,322, -321.88,329.5,326,319.75,318,319.75,327.5,329,328.5,328.25,330.75,330.25,334.75,334.75, -334.5,331,328,327.88,326.5,325,327.75,327.25,327,324,320,316,317,317, -317,309.75,307.5,314.5,316.75,317.5,323.5,327,329.5,327,319,318.5,325.75,327.75, -333,331,332.25,332.5,326.75,330.5,335,335.5,337,337,337,334,337.5,336.75, -337.5,339.5,338,338,341,341.5,341.5,339,336.5,337.5,338.5,340.5,340.5,343.63, -346.5,344.75,345,341.5,344.75,343.5,339.5,335.5,341,338,336.5,336.5,344,340.5, -332,337,346,344,346.75,353,358,356.5,360.5,358.75,362.5,364.75,365,358, -352,356,359.75,360.5,357,358,359.75,358.5,350,358,359,371.75,371.75,371.75, -370.5,369.5,370.5,375,375,357,345.75,335.5,333.75,329.5,328.25,334.5,330,326.75, -328.25,335,335.25,336.75,338.5,343,344,343.88,345.25,345.25,349.5,350.75,343.25,338.75, -334.5,331,329.75,331.5,327.5,639,640.75,644,644.5,647,649.88,649.5,648,643, -638.5,638.5,648,637.5,632,613,604.5,599.75,596,589,595,588.5,589,592, -599,593,586.13,594.5,597,593.75,582,590,590,571.5,573.75,580,586,596.5, -594,590.5,597.25,600,595,588,579,592.5,586,577,575.5,591.5,592.5,591.5, -594.5,602,599.75,606,612.5,620,620.75,618.5,623.5,626,619,624,624,616.5, -624.75,626,620.5,614,604.5,603,598,599.5,601.75,616,627.25,627.75,626.75,626.5, -619,622,625,626,623,632.5,646,648,644.5,647,647,648,643,633, -633.5,630,616,615.75 -}; - - - - - - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c deleted file mode 100644 index ce311ee75..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_gDataLow.c +++ /dev/null @@ -1,719 +0,0 @@ -double gDataLow[10000] = { -110.01,109.15,108.08,109.13,108.66,103.7,109.91,111.74,112.31,109.7,110.73,112.26,112.25,111.7, -111.7,111.5,110.06,110.02,113.52,115.62,115.52,115.24,115.02,114.85,113.94,114.65,110.04,109.45, -108.42,108.1,108.22,108.25,108.25,108.2,107.66,105.98,105.24,104.58,104.1,105.22,104.4,104.82, -104.5,104.44,105.61,105.95,104.9,104.89,103.88,102.81,102.1,102.15,102.5,101.75,101.56,102.39, -105.54,105.58,106.02,106,105.21,105.3,103.85,103.57,105.25,106.01,106.87,105.6,104.73,104.53, -104.7,104.79,104.67,103.71,103.7,102.21,102.4,102.25,101.35,102.13,102.05,100.97,100.06,100.21, -98.73,97.23,95.05,93.91,94,94.4,96.02,94.72,94.59,94.53,94.95,96.16,96.12,95.75, -95.57,95.33,94.06,93.57,93.96,93.8,94.2,94.32,94.65,94.65,93.83,93.55,93.39,93.02, -93.1,92.1,92.62,92.97,92.82,92.52,93.62,92.26,90.1,90.84,88.77,92.47,92.88,96.46, -97.41,97.77,98.7,98.55,98.63,98.48,98.25,97.8,98.22,97.81,98.65,99.12,99.54,98.9, -98.88,97.96,98.35,98.5,97.45,96.84,97.22,96.58,96.2,96.12,94.55,98.91,99.9,99.3, -98.5,98.5,97.93,99.07,98.35,96.91,96.88,96.26,96.83,96.87,96.27,94.92,95.24,95.53, -95.7,94.91,94.8,95.05,94.54,94.5,93.3,93.56,93.47,93.55,94.01,93.44,92.25,90.55, -91.25,91.01,90.43,91.12,92.98,92.8,92.85,93.01,93.31,92.6,92.54,91.65,91.41,91.63, -92.37,92.01,92.41,91.5,91.18,91.25,91.5,91.5,89.8,90.58,91.25,90.94,90.8,90.01, -89.55,89.31,89.73,86.22,85.75,84.44,84.1,83.79,83.56,83,82.5,82.6,81.63,81.56, -81.58,81.77,81.72,81.71,81.7,81.28,81.01,81.35,82.2,81.42,82.17,82.79,81.74,81.84, -81.06,80.25,79.35,79.31,80.17,80.6,80.81,80.78,80.84,80.06,79.76,79.14,78.87,78.42, -78.61,78.87,78.63,78.53,77.35,76.31,75.6,75.2,75.05,75.39,75.11,75.28,75.32,75.4, -76.2,75.75,76.15,76.26,75.75,75.36,75.31,74.92,74.5,75.2,76,72.73,73.2,73.37, -73.83,74.82,75.44,75.87,76.12,77.57,77.52,77.27,76.79,76.56,76.06,76.32,76.8,76.94, -77,77.98,77.25,77.34,77.57,76.95,76.93,76.82,77.01,77.05,76.75,79.12,78.5,79.01, -79.15,79.81,79.61,80.15,79.7,79.65,79.06,79.64,79.4,79.51,80.03,81.02,82.07,81.8, -82.3,82.45,82.6,82.41,82.3,82.7,82.4,82.45,82,82.1,81.98,82.7,82.71,81.6, -81.1,81.38,81.64,81.26,81.7,81.4,81.12,80.63,80.75,82,82.44,83.36,83.32,82.8, -82.65,82.29,82.83,82.2,82.29,82.58,82.99,82.93,83.35,83.58,82.99,82.82,82.61,82.64, -81.47,81.45,81.03,80.8,80.25,79.86,79.9,79.51,79.54,79.78,79.71,79.95,79.85,80.04, -79.97,79.97,80.13,80.13,80.5,80.35,80.18,80.2,79.5,80.24,79.3,78.93,79.72,80.9, -80.65,81.17,80.21,80.75,80.59,80.61,80.8,80.92,81.25,83.02,83.52,82.54,82.5,83.4, -83.4,83.12,83.38,83.41,81.25,81.33,80.81,81.56,82.22,82.8,82.89,83.39,82.3,82.46, -82.06,82.65,83,82.75,82.95,83.5,85.76,86.33,86.67,88.45,88.56,87.71,88.36,89.05, -88.73,89.02,88.75,88.62,87.95,86.88,87.01,87.17,85.76,85.39,84.03,84.11,84.15,82.3, -82.49,83.11,83.07,82.65,81.31,80.64,81.29,81.3,80.5,82.25,82.72,82.71,82.6,82.91, -82.88,82.38,83.35,81.93,81.6,81.7,81.95,81.97,81.08,80.09,78.7,79.56,79.93,79.5, -79.97,78.87,78.06,77.16,76.93,77.5,77.3,77.37,78.63,79.01,79.83,79.67,80.42,80.52, -81,80.52,80.5,80.32,79.7,79.46,79.34,79.87,79.98,79.9,80.26,80.72,81.23,81.6, -81.85,81.36,80.8,80.84,81.09,81.61,82.06,81.62,81.97,82.94,83.02,82.73,82.98,83.11, -83.04,82.85,83.22,83.27,82.81,83.85,83.92,83.86,83.4,82.99,83.7,81.68,81.52,82, -81.16,79.18,78.52,77.14,75,74.4,74.16,74.3,74.07,74.62,73.45,73.5,74,75.06, -76.67,76.11,75.57,76.38,76.31,75.15,74.73,74.45,74.1,74.23,74.63,75,74.92,75.74, -76.68,75.57,75.5,76.53,76.29,75.17,75.56,76,76.36,76.37,74.69,73.33,73.09,72.52, -72.5,72.51,73.04,74.71,74.97,75.33,76.5,75.93,76.03,75.91,75.65,75.5,74.65,74.05, -73.26,72.8,71.85,75.25,76.14,76.33,83.47,84.24,85.17,86.09,87.5,88.1,88.71,89.26, -89.77,90.04,90.22,90.32,90.18,90.62,90.7,89.82,89.26,89.27,89.09,89.7,90.25,91.2, -91.5,91.2,92.09,92.01,91.7,91.59,92.36,92.2,92.75,92.59,92.41,92.29,91.85,91.55, -92.23,92.9,93.74,94.2,93.48,93.16,92.5,92.3,92.54,94.13,94.33,93,93.06,93.63, -93.37,93.05,92.48,91.44,91.94,91.95,91.76,92.23,92.6,92.93,93.62,93.55,93.7,94.06, -94.71,95.24,95.47,96.05,96.4,96.52,97.25,98.49,98.07,97.8,97.37,97.38,97.5,97.29, -96.51,96.35,96.2,96.8,96.81,96.29,96.08,96.1,95.71,95.77,95.99,96.65,96.55,95.49, -94.47,94.24,94.94,94.58,95.04,94.55,94.16,94.25,95.03,95.3,94.65,94.8,94.56,93.54, -92.92,93,92.5,92.4,90.82,90.97,89.5,89.23,88.95,89.43,88.5,88.25,87.31,87.29, -87.66,88.29,88,84.29,84.6,84.3,84.43,85.58,86.27,86.51,87.4,87.1,87.13,86.72, -85.88,85.01,84.15,83.88,83.98,83.78,83.24,84.17,85.34,85.4,85.44,85.93,85.89,86.15, -86.08,86.25,85.86,84.88,84.6,83.96,83.85,84.01,83.65,84.39,84.59,84.69,84.55,84.35, -84.65,84.52,84.45,83.57,83.66,83.51,82.51,81.9,83.1,83.81,82.87,83.42,85.01,85.25, -85.44,86.42,86.39,86.23,84.88,85.45,84.51,84.5,84.68,85.3,85.3,84.4,84.28,83.61, -83.78,85.2,83.42,83.51,83.58,85.05,85.13,86.6,86.57,87.7,87.9,88.36,88.94,89.84, -89.84,89.13,89.31,89.9,90.07,90.09,90.23,89.62,89.89,89.81,88.4,88.01,87.5,87.35, -87.89,87.3,88.25,87.98,88.04,86.55,86.55,86.91,87.05,86.5,86,85.15,86.07,86.26, -85.12,86.82,86.37,87.62,87.59,88.51,88,87.2,88.01,88.19,90.21,90.56,90.35,90.36, -89.7,90.69,90.65,91.7,91.04,93.06,92.1,92.5,93.4,92.55,92.51,93.02,93.51,93.33, -91.62,91.51,91.35,92.18,92.16,91.45,91.04,90.68,90.28,91.51,91.9,92.45,91.42,90.88, -91.68,91.15,92.68,93.77,94.59,95.56,96.13,95.6,96.62,96.15,96.1,96.25,96.23,95.2, -95.46,97.19,97.52,98.15,99.32,99.08,99.3,98.8,98.41,98.6,98.25,98.26,99.3,98.95, -98.5,97.84,96.55,97.28,98.7,97.56,97.1,97.32,96.64,95.73,94.71,93.55,89.75,89.01, -91.21,91,92.03,92.47,92.14,92,91.2,92.16,92.36,93.03,92.3,92.18,92.34,92.78, -92.67,92.5,92.85,91.88,92.08,92.24,91.92,90.65,90.61,90.52,90.5,90.03,90.3,90.52, -90.48,89.62,89.11,89.27,88.95,88.23,88.38,88.32,88.9,89.03,89.81,90.16,89.31,88.89, -89.55,88.26,87.72,88,88.86,89.48,89.2,89.06,89.15,88.52,88.05,87.72,87.53,87.9, -88.7,88.86,88.81,88.66,92.74,92.32,92.58,92.36,92.2,91.95,90.4,90.51,90.57,89.22, -88.7,87.9,89.07,89,89.2,89.33,90.56,90.9,91.8,90.46,90.2,88.49,88.39,87.2, -86.4,87.61,88.93,88.35,86.75,85.69,86,82.3,81.56,81.27,81.9,81.27,81.75,82.96, -82.85,82,82.56,81.9,81.2,80.69,80.58,80.65,80.28,80.35,79.38,78.73,79.8,80.06, -80.05,81.1,80.58,81.6,82.04,81.57,81.51,81.73,81.52,82.21,83.21,82.5,85.85,85.82, -85.42,83.7,83.47,84.85,85.19,84.74,83.48,83.75,81.4,82.5,83.22,82.82,82.09,82.85, -82.97,84.69,84.5,83.22,83.8,82.55,82.51,83.55,82.29,81.21,79.81,79.84,81.75,83.83, -83.24,87.25,87.45,87.2,87.4,84.51,85.1,85.8,85.08,84.89,86.41,88.95,89,88.3, -88.56,87.1,86.4,85.75,86.5,86,86.52,84.45,84.47,84.68,84.97,83.62,83.86,84.63, -84.96,82.6,83.1,81.89,82.74,79.71,78.16,78.45,78.13,78.63,78.47,80.25,80.04,81.71, -79.9,78.12,78.31,80.5,80.51,81.18,81.74,82.23,82.76,80.64,81.08,81.49,77.84,78.11, -75.31,73.17,75.2,75.5,75.71,76.7,76.25,76.53,77.12,77,76.75,77.3,76.9,78.56, -78.16,78.71,78.82,77.91,75.35,74.31,76.5,77.31,76.45,76.61,76.51,76.87,76.25,77.75, -77.02,78.3,78.57,78.36,77.61,78.82,79.8,79.39,80.5,81.18,85.38,86.95,87.22,87.35, -85.7,84.75,84.07,83.75,81.81,80.21,78.19,77.1,75.6,76.61,78.26,79.76,79.44,78.88, -78.35,78.24,80.03,79.05,78.27,79.7,79.99,78.6,79.5,81.07,82.6,82.82,85.15,86.3, -86.76,85.85,84.39,83.52,83.8,82.05,77.9,77.84,79.08,79.01,79.4,77.98,77.3,76.7, -77.2,78.32,80.05,80.47,81.7,78.32,78.5,76.02,74.2,74.56,72.16,71.75,72.46,73.62, -72.94,70.26,71.23,64.24,66.58,61.54,61.5,54.01,54.81,54.8,56.6,55.77,58.95,58.35, -58.99,57.99,60.31,61.33,60.99,59.55,62.37,63.9,64.65,68.86,71.35,71.23,71.31,71.64, -74.06,73.85,71.85,73.07,71.5,71.6,72.3,75.1,75.15,75.67,77.3,77.8,79.35,80.2, -79.55,80.18,79.01,75.98,74.6,71.35,71.19,70.61,70.4,68.35,66.8,66.61,65.85,67.12, -67.22,69.11,70.02,68,65.76,67.3,65.7,66.66,68.31,70,70,69.62,68.48,66.6, -68.8,67.55,68.53,69.45,71.03,72,67.87,67.7,67.16,71.25,69.1,66.1,68.41,67.25, -68.19,71.43,73.25,75.47,75.16,73.25,75.3,73.25,75.2,76.6,77,78.89,79.11,77.6, -78,80.4,80.22,81,81.69,82.62,82.52,82.74,83.3,83.93,85,83.4,84.05,82.19, -79.5,79.25,79,78.2,75.92,76,81.11,83.13,81.67,83.53,83.55,84.7,85.77,86.27, -87.24,87.36,87.6,86.9,84,85.58,84.7,84.4,83.34,88.2,87.1,85.35,97.25,99.5, -98.9,100.51,102.4,103.39,102.5,102.3,103.5,105.07,104.7,105.49,106.49,106.23,105.59,106.59, -106.7,105.51,103.6,104.82,103.24,104.75,104.16,103.13,98.5,97.82,96.7,95.99,97.12,95.76, -96.01,97,98.86,101.7,107.2,106.12,106.06,104.51,102.61,103.86,105.33,106,105.99,106.64, -104.46,101,102.41,107.06,108.1,107.07,107,110.33,112.81,117.26,117.25,117.72,117.1,120.28, -121.42,124.15,123.73,123.7,123.98,120.25,119.8,120.95,122.35,122.64,121.81,121.1,121.71,122.15, -121.01,121.35,120.15,119.41,120.12,120.06,119.8,119.41,118.75,119.8,116.65,113.38,113.21,113.8, -111.81,112.1,114.07,115.2,113.72,113.05,114.25,113.77,112.55,113.84,113.33,115.7,112.05,113.1, -113.61,113.03,109,109.08,108.77,106.9,108.07,107.76,108.62,109.62,106.75,106.09,104.55,101.9, -100.07,100.78,102.9,99.66,99.85,98,96.5,94.9,96.76,96.75,95.37,96.8,92.4,92.1, -91.34,89.9,87.49,90.3,93.41,91.8,89.5,92.85,92.45,93.68,92.55,95.59,96,97.65, -99.61,99.29,99.24,98.86,103.82,104.87,106.64,103.41,103,101.76,101.4,102.8,103.9,103.66, -105.01,105.4,104.65,102.81,102.7,104.1,105.26,105.79,107.1,107.21,105.31,105.15,104.76,104.11, -102.93,102.73,103.79,105.3,103.03,103.1,103.2,104.75,107.28,106.11,105.62,101.56,101.6,103.65, -105.81,111.79,112.76,112.96,113,113.75,112.45,111.1,111.78,112.5,111.36,111.76,114.56,113.31, -113.38,113.99,116.53,115.55,116.1,115.6,117,116.5,113.56,112.85,111.9,111.64,112,115.08, -117.76,117.5,117.1,117.25,117.55,114.9,115.05,112.2,112.5,111,110.96,115.2,115.3,115.5, -115,111.2,112.35,113.74,114.9,114.72,114.55,113.68,111.99,112.3,111.68,113.75,110.45,102.3, -97,95.2,95.15,95.8,96.56,93.8,96.4,95.53,90.05,90.1,93.58,95.14,94.26,94.25, -93.97,93.75,90.29,87.65,87.75,88.1,89.2,88.2,95.17,93.34,94.2,95.02,97.9,105.37, -105.66,105.25,102.64,100.94,97.5,99.1,102.56,101.83,100.25,103.38,107.29,110.78,113.94,116.38, -112.5,113.07,110.3,111,114.03,112.67,111.2,109.3,109.6,111.2,112,113.4,112.47,109.19, -109.44,108.94,107.62,108.19,107.25,103.5,94.31,91.81,92.37,91.25,91.69,91.44,91.56,91, -92.69,83.75,84.12,84.25,82.12,83.56,84.25,84.5,80.06,84.81,89.81,88.37,87.31,91.81, -90.69,92.5,93.75,95.75,93.12,94.81,99.62,95.75,94.37,92.25,96.69,97.37,98.44,99.25, -98.31,98.5,100.87,98.25,98.25,97.62,98.5,91.62,93,95.69,99.25,100.69,99.44,99.37, -98.5,97.25,93.75,90.31,91,87.62,86.94,90.19,91.06,94.19,92.69,90.25,108.56,108.56, -104.19,103.12,107.5,112.44,114.31,112.75,111.56,108.56,110,112.62,110.25,115,115.5,118.37, -121,121.31,120,123.5,122.56,123.06,124.75,126.31,122.75,124.06,123.62,129.38,131.88,130.38, -130.81,132.63,131.63,129.56,131,129.75,124.25,122.69,119.87,121,120.06,120.12,119.5,119.5, -120.75,119.31,119.19,117.87,118.75,115.56,115.81,114.31,112.31,110.75,110.25,110.06,108.87,109.31, -108.87,110.25,111.62,113.75,111.75,101,102.62,104.19,103.12,102,102.62,101,102.87,101.62, -100,101.12,108.31,108.62,110.06,109.87,108.75,112.87,110.81,111.25,113.5,115.37,113.25,113.25, -115.87,115.5,116.75,118.84,118.87,117.5,111.5,111.25,108.44,107.62,105.5,107.19,107.69,104.56, -106.37,104.19,107.12,103.44,105,104.69,106.12,105,102,103.25,103.19,102.06,108.25,107.62, -106.5,107.19,106.56,110.69,110.44,110.12,108.69,109,106.44,101.25,102.06,102.81,110.06,103.31, -102.87,110,111.69,117.81,121.56,121.5,122.62,119.75,115.06,119.44,117.06,118.69,118.5,122.06, -124.62,115.06,111.62,113.87,111.94,109.94,107.69,107.87,106.12,107.37,102.5,105,104.12,102.75, -101.69,101,106.06,99.5,100.06,100.94,103.94,104.94,108.19,108.5,108.75,111.5,115.75,115.25, -113.87,114.5,114.56,116.87,117,116.19,113.12,114.81,114.06,110.37,109.12,109.62,110.06,111.62, -116,116,116.56,119.94,119,112.69,115,117.5,115.75,118.25,116.62,115.37,110.62,113.5, -112.12,110.87,111.87,106.62,108.56,108.75,109.06,108.12,108.19,108,108.06,107.75,108.62,105.75, -104.5,106.87,106.56,107.56,112.25,115.5,115.44,112.5,107.94,103.37,102.25,102.12,103.37,104.12, -101.81,106,104.44,98.37,93.56,92.62,93,93.87,93,94.87,94.12,92.12,90.5,90.19, -90,93.5,93.69,96.37,96.25,94.25,92.81,94.62,92.12,92.5,89,107,105.44,104.69, -103.87,104.69,105,110,113.12,111.06,115.06,119.06,119.06,116.75,115.5,119.62,120,121.69, -121.37,120.44,121.44,124.37,126.25,126,123.75,129.56,131.94,131.94,132,134.38,131.63,130.69, -128.38,128,124.25,125.5,122.87,122.69,122.75,122.06,120.87,121,122.31,121.06,121.25,123.5, -126.56,124.5,122,121,119.81,118.94,121.12,121,117.56,118.06,118.19,121.81,124.37,124.62, -125.81,123.56,122.75,122.62,123.5,126.87,126.06,133.69,135.38,134.5,136.19,135.75,135.38,133.88, -132.13,130.63,130.81,129.5,128,124.37,122.75,122.19,123.12,121.56,121.75,123,122.62,119.75, -119,118.87,114.75,114,112.56,113.31,116.56,116.06,117.5,112.44,111.56,109.44,111.19,114.19, -112.62,221.44,221,221.75,229.19,232.5,233.06,237,232,236,234,215.5,217.5,217.06, -211.06,208,207.31,211.38,206.31,203.44,203.44,203.5,208.5,202.31,192.94,192.69,165.13,163, -164.06,170.13,173.5,177.63,179.94,181.06,184,182.31,179.06,182.19,178.56,174.69,176.5,176.88, -174.38,170.56,169.5,166.5,164,166.63,168,172.94,178,180.19,177.13,178,181.5,180.25, -178.56,177.06,173.75,170.13,165.06,166.88,165.13,166.5,169.31,173.13,175.75,171.06,171,170.19, -168.81,171.94,171.19,168.13,162.5,161.75,163.13,164.56,169.25,173.06,175,179.5,178.5,177.56, -177.81,181.88,173.5,177.63,192.06,192.63,185.5,181.25,178.88,179.5,184,187,185.63,187, -188.5,182.81,181.5,183.5,186.31,187,186,184.06,181.13,175.25,171.56,166.63,165.06,164.31, -162.5,162.75,163.25,163.75,167.38,165.06,164.25,162.25,163,164.75,163.5,164.88,166.63,164.38, -165,160.56,158.5,158.13,157.63,158,158.06,155.75,156.63,156.5,150.69,149.94,147.5,146.81, -145.75,147.19,147.31,147.5,147,143.81,143.06,140.06,141.19,139.63,139,136.5,135,134.81, -129.75,127.19,126.56,129.56,122.5,116.81,118.12,118.75,117.31,118.94,123.37,127.62,130,132.19, -129.81,130.25,128.5,127.69,120,124.25,126.19,128.19,128.5,127.62,120.62,118.19,123.37,122.19, -115.31,118.06,119.87,110.75,112.62,120.81,124.81,127,127.62,127.31,124.5,127.5,129.06,127, -124.25,124,126,127.56,125.31,128.75,129.13,127.37,124,126.81,132.31,132.25,128.44,127.06, -124.19,122.25,122.5,123.69,124.5,127.75,120.31,118.5,116,117,119,118.25,117.37,114.62, -113.62,112.75,113.31,114.5,115.5,113.5,113.56,112.31,112,110.06,109.94,106.19,106,107.62, -110.06,107.12,112.12,114,115.75,116.87,117.81,118.37,116.56,114.25,113.87,114.81,114.62,117.37, -119.81,118.56,120.81,121.12,121.94,122.56,124.75,123.44,124.12,122.87,120.12,117.31,118.31,116.87, -116.12,117.25,116.69,116.62,115.5,115.5,114.62,115.31,114.37,116.25,114.12,114.62,113.62,107.19, -106.5,107.62,106.5,104.62,104.19,105.31,103.75,103.56,105,103.94,104,103.31,103.37,102.5, -103.87,105,104.87,102.12,101.37,101.44,101.44,100.56,99.56,99.25,99,98.19,97.44,96.69, -95.87,98.12,98.31,99,99.81,100,103.87,104.31,102.5,101.75,102.81,101.56,102.75,101.31, -101.5,102.37,101.56,101.5,97.5,98,97.75,98.37,98.06,98.69,100,98,97,96.5, -95.62,98,98.94,98.5,99.62,104.69,104.5,102.37,101.25,100.31,97.5,99.37,102.94,102.62, -105.06,105,104.06,103.19,102.94,102.75,99.25,99,98.62,100.87,97,99,101.87,101.12, -97,96.37,101.37,105.44,110,111.75,109,108.87,109,110.56,109.87,109.12,107.37,103.87, -103,105,103.25,101.75,102,102.87,99.12,95.25,96.5,97.94,97.62,98.25,101.06,101.56, -100.94,99.12,96.56,95.56,97.87,88.62,89.87,96.87,100.06,104.25,101,94.5,95.25,99.12, -101.37,102.06,104.06,104.12,104.19,104.5,105.94,104.37,103.5,103,103.19,103.62,102,101.94, -101.19,101.44,102.75,102,98.31,98.75,99,96.37,96.12,96.94,96.5,96.12,100,102.62, -103.56,103,103.5,101.25,100.47,101,102.5,103.06,104.5,102.44,105.25,106.12,104.25,99.69, -99.87,102.62,102.75,103,103,104,106.87,105.81,106.5,104.31,103.31,105,102.87,102.75, -104.81,105.62,104.5,103.19,99.37,102.19,100,97.12,95.37,93.37,94,95.62,94.06,95.31, -94.5,94,94.31,91.62,90.12,90.12,91.19,90.25,91.37,89.5,87.62,89.75,89.12,88.25, -89,88.62,88.12,85.5,86.12,85.5,85.62,82.62,82.12,81.75,84.12,86.62,84.5,87.5, -88.5,174,173.13,172.5,174.38,168.38,166.88,169.63,173.13,171.88,173.38,168.13,166.63,163.5, -162.13,164.63,162.63,159.88,159.38,157.25,152,149.13,150.63,150.5,139,134.75,136.63,137.75, -136.75,135.75,134.38,133.25,131.38,132.88,133,132.25,130.5,127.12,128.88,133.25,135.63,134.38, -136.13,135.5,134.75,130,132.13,136.5,135.88,137.88,137.38,142.13,142.25,144.13,146,144.38, -144.13,144.63,144.38,142.5,143.63,140.63,143,144,144.13,137.5,137.13,140.25,143,143.13, -144,145.13,143,141.13,142,145.88,145.5,145.5,150.75,154.5,156.13,155.75,152.38,148.63, -145,149,150.63,155,166.38,164.5,163.88,163.25,163.38,164.5,162.75,160.13,158.38,159.13, -159.38,158.5,154.88,150.25,150.88,153.63,153.5,155.13,154.13,152.75,154.13,157.25,152.38,147.38, -147.25,152,151.5,153.75,157.75,156.25,153.38,158.38,159.13,162.63,159.63,158.13,157.75,157, -156.13,154.13,152.5,152.38,146.5,143,137.38,134.63,133.25,133,134,132.88,132.75,130.25, -129.25,127.37,127.12,125.87,125.75,125.12,126.5,126.37,127.37,126.12,126.25,126.75,124,125.25, -127.37,128.63,129.13,128.25,125.5,126.12,127.62,126.87,125.62,124.62,124,123.12,124.12,124, -124.12,124.5,124,122.12,122.87,123,123,121.5,121.75,118.12,117.12,116.75,116.5,115.87, -113.5,113,114.5,112.56,113.62,114.62,113.87,111.25,112.25,112,112.37,110.12,110,109.5, -109.87,110.75,109.37,109.12,111.62,112.12,111.5,109.75,108.25,108,107.75,107.25,107,103.75, -103.37,101.62,95,89.12,90,91.87,93.5,93.12,94,89.75,89.75,94.62,94.12,97.75, -98.75,98.12,97.75,98.12,99.87,99.12,98.87,97.62,98.5,98.87,98.5,98.25,99.37,101.5, -101.25,100.87,101.62,101.75,102.75,102.37,101.37,96.12,101,104.75,105.37,105,106.62,106.12, -105.62,107.87,108,109.25,109.75,110.75,111,109,107.62,108.5,107.5,105.87,106.12,105.75, -103.62,105.62,106.37,107.75,107.37,107.62,107.5,107.37,107.62,106.62,105.62,106.75,105.62,104.62, -103.62,103.37,114.62,111.5,110.12,114.75,115.12,117.5,114.5,117.25,116.12,110.5,110,110.37, -109.5,110.25,107.62,108.37,114.25,114.12,114.25,121.5,120.5,115.75,116.12,114.5,113.62,113.87, -112.25,115.37,116.37,116.12,115.25,117,122,127,124.5,123.87,124,121.25,118.62,116.75, -117.5,114.25,113.75,113.5,113.87,113,111.87,111.5,112.62,109.25,108.75,108.12,107.5,106.37, -104.25,103.5,104.12,103.12,100.75,101.37,96.5,89.62,85.75,83.5,83.12,86.12,86,86.62, -86.12,88.62,86,85.62,89,90.62,89.5,90,90.75,91.62,90.87,89.75,89.12,89.12, -87.75,89.87,92.37,94.37,95.25,95.87,94.62,94,94.25,95.62,94.62,94.75,96.62,96.75, -95.62,95.62,95.25,94.37,93,93,94.75,95.12,94.75,95.25,97,96.62,98,97.25, -98.12,100,99.87,96.75,96.37,96.87,97.12,95.75,94.62,96,97.25,95.62,95.25,96, -95.75,91.25,92.5,92.5,92.12,91.25,89.12,92,94.12,93.5,93.37,93.37,93.37,93.62, -93.87,91.87,92.5,92.62,93.37,93.87,95.62,94.25,92.37,91.62,92.5,92.37,95.12,95.87, -98.12,99,100.62,100.12,102.37,102,101.12,98.62,101.37,103.75,104.5,106.5,105.62,106.5, -111.12,112.25,110.75,110.25,109.25,108.37,108.87,109.62,108.87,108.62,108.5,105.62,107,107.25, -108.5,109.87,109.5,108.25,107.5,103.5,103.12,101.37,97.75,102.87,104,102.12,101.25,99.62, -99.5,100,98.62,96.87,96.75,95.75,95.37,96.37,94.37,94.5,98,97.25,97.37,97.12, -93.87,93.25,92.62,93,91.87,90.87,89.75,88.62,88.37,89,91.37,90,93.37,93.37, -91.87,91.5,94.5,95.87,94.5,95.5,93.5,92.25,93.12,94.75,94.25,94.12,93.75,93.25, -93.87,93.37,92.62,92.87,93.25,93,91.62,91.75,94.25,94.62,92.87,92.87,91,89.12, -88.62,86,87.12,86.87,86.12,86.12,85.62,84,83.5,83.62,82.87,82.5,82.25,81.37, -81.75,82.5,84.25,83.87,83.5,81.5,81.25,82.12,82.5,82.62,81.62,81.25,81.5,81.5, -80.37,80.37,78.5,79.37,79.5,77,75.37,75.12,74,73.75,74.25,74.12,74.12,74.12, -74.75,75.5,75.12,74.62,74.75,75,74.25,74.12,73.87,74.12,74.5,73.5,72.25,70.25, -71.5,70.62,72.25,72,73.5,72.37,75,76.37,76.62,77.12,76.37,75.75,75.5,75.25, -75.62,74.87,74.12,73.75,73.25,73.37,73.12,73,72.5,73.75,73.25,73.5,71,70.75, -70.5,69.87,70.12,69.37,69.62,69.62,69.5,69.75,70.62,71.25,71.37,68.87,69.25,70.62, -70.25,70.25,70,68,69.37,72.62,72.75,72.75,72.62,72.5,72.25,71.75,71.62,73.25, -71.37,70.75,71.12,73.12,73.75,73.5,74.5,74.12,73.75,73.62,72.62,72.87,74.12,73.87, -73.75,73.37,72.75,71.87,72.25,71,71.5,70.75,68.75,68.62,67.37,68.25,68.62,68.87, -67.75,68.5,68.62,67.75,68.87,69.37,69.37,69.62,70.25,69.5,69.5,69,68.62,67.5, -66.75,67.25,67.37,66.62,66.75,66.87,68.5,68.87,69.25,69.12,66.87,66.62,67.62,67.25, -66,65.37,64.37,63.75,63.75,63.75,63.75,64.12,63.25,62.63,61.88,62.75,62.25,62.25, -61.5,61.75,62.25,61.88,62.13,61.33,61.13,58,54.5,55.63,56.63,56.75,57.25,55.88, -54.88,55.38,56.5,56.63,56.38,56.25,56.75,58.63,60.13,60,58.13,59.5,60.88,61.13, -60.38,61.63,62.25,62.88,63.5,63.88,62.25,62.25,61.5,61.5,62.63,61.13,60.75,61.88, -62.5,62.75,63.63,62.5,62.5,61.88,61.38,61,60.5,60.5,58.63,57.38,57.25,57, -57,57.38,56.5,56.25,56.88,57.5,57.88,56.88,56.88,56.75,58.5,58.25,58,54, -51.75,51.38,52.75,52.63,52.5,51.88,52.5,52.25,52.38,52.25,52.75,53,52.25,52, -52.5,52.5,52.5,53.63,56,56.63,57.75,56.75,56.75,57.5,57.13,57.38,55.88,55.25, -55.13,54.75,51.38,52.13,52.38,52.63,52.13,52.5,52.63,52.63,52.63,53.25,52.63,52.13, -52.5,54.5,54,53.38,52,52.75,53.13,53.38,52.25,52,55.75,55.5,56.5,56.5, -57.5,56.5,56,55.38,55.75,54.75,55.13,55.75,56.38,57.13,58.38,58.25,58.13,58.5, -58.5,58,58.5,58.5,58,56.88,56.38,56.88,58.13,58.25,58,58.5,58.5,58.13, -58.25,57.75,57.13,55.63,56,55.38,53.88,53.25,53.38,53.25,52.75,53.13,53.25,53.13, -53.75,54.38,55.13,53.75,51.88,51.63,51.5,52.13,51.88,50.75,50.88,51.5,50.13,49, -49,50,49.38,49.38,50.13,48.5,45.75,45.88,45.63,45.75,44.38,43.75,44.38,43.5, -42.88,42.88,43.88,42.88,42.5,43.13,43.75,43.88,43.38,43.63,43.25,43.25,43.75,42.13, -41.38,41.25,41.63,41.5,41.5,41.75,41.63,41.88,42.25,42.75,43.38,43.25,43.38,43.5, -43.5,44.13,43.75,45.25,45.63,45.75,45.63,44.75,44.13,43.63,43.63,43.5,43.63,43, -42.63,42.75,42.38,41,40.63,41.5,41.25,42,42.88,42.88,43.13,43.5,43.25,43.13, -43.88,43.63,43.38,43.88,44.5,41.13,42,43,43,41.63,43.38,45.5,47.13,47.13, -47.25,46.75,46.38,46.38,46.38,46.88,47.75,49.13,49.13,48.75,49.75,49,48.63,48.5, -49.13,49,48.88,49.38,48.88,49.75,51.88,52.38,51.5,52.63,51.63,52.25,53.63,53.5, -51.75,51.88,52,52.88,50.5,49.88,48.5,48.25,48.75,48.38,47.75,47.5,47.38,47.13, -47.88,48.38,48.38,47.75,48,48.88,49.25,48.5,48.63,48.38,48.63,47.88,47.88,47.38, -48.13,49.13,48.75,48.88,48.5,48.5,48.5,49.25,50.63,50.25,50.88,51.75,51.63,51.75, -51.38,50.13,49.88,51.63,50.63,50.13,50.88,52.88,52.75,53.63,54.25,54.13,54.88,55, -53.63,54.75,55,56,55.25,54.75,54.5,53.63,53.75,54.5,53.38,51.63,51,50.75, -50.5,50,49.75,49.75,48.75,50.5,50.5,51.63,52.88,52.13,51.63,50.75,50.88,52, -52,50.88,49.75,48.25,48.75,47.5,46.5,45.88,46.63,47.25,48.63,47.75,47.75,47.5, -47.75,46.75,45.88,46.63,47.13,48.5,50,50,49.75,49.25,51.13,51.25,51,49, -48.75,50.25,51.25,50.75,56,62.38,61.63,61.38,61.5,64.37,65.75,66.62,66.75,67.62, -67.5,67.5,65.25,65.12,63.5,62.25,60.88,61,62.75,64,64.62,64,64.12,64.5, -65.87,66.25,65,65.62,68.12,68.5,67,66,65.62,65.62,65,67.5,68.37,68, -68.25,67.75,68.5,68.87,72,76.75,78.37,78.37,78.25,78.5,78,78.62,75.5,78.25, -80,80,81,82,82,82.25,83.25,83.12,83.87,83.25,82.75,82.5,85.37,88.12, -87.12,86.62,86.25,85.87,85.87,86.62,86.75,86.5,86.5,86.62,86.37,86.25,85.25,85, -85.75,85.5,86.5,87.87,88.5,88.25,87.87,88,87.75,87.25,86.62,88.12,91.37,94.25, -94.37,94.5,94.37,94.25,92.37,92.37,92.37,92.62,92.5,92.87,92.75,94.62,99,98, -97.5,97.62,96.5,97.5,96.75,96.62,97,96.87,97.75,97.75,97.75,96.5,96.62,96.25, -95.25,94.62,94.75,93.12,92.12,92.87,92.5,92.25,90.37,90.12,90.37,90.37,88.25,88.87, -89.75,90.37,90.12,90.75,90.37,90.12,90.37,91.25,90.62,91.5,90.62,90.5,91.12,91, -92.37,93,93.37,93.12,92.75,93.12,92.37,92.12,90.37,88.25,87.75,87.37,87.75,88.12, -89,89.62,89.5,88.25,87.5,87.62,88,85.87,84.5,84.62,82.62,82.25,81.62,81.75, -81.87,82.75,83.37,83.12,83.12,84.12,84.75,85,85.62,85.75,85.62,87.25,87.37,88.25, -89.12,87.62,87.12,87.5,85.12,86,86.5,87.37,87.12,86.25,86.62,87.5,87.62,88.12, -88.75,89.25,89.12,89.37,89.12,89.5,90.12,89.87,89.75,89.12,88.62,89.62,91,90, -89.25,90,91.37,91.62,92.87,93.37,93.12,93.25,92.87,92.87,95.25,92.62,95,93.5, -90.25,89.75,90.62,91.25,92.25,91.87,90.87,90,88.87,88.87,89.12,88.37,87.5,87.87, -85.5,85,84.5,84.87,85.25,86.75,87.25,88,85.62,83.5,84.62,89,90.12,90, -91,90.62,92.37,94.12,94.62,94.62,94.62,95.12,95.37,95,96.25,96,98.37,98.37, -99.12,99.87,100,98.25,96.37,96.62,96.62,97.75,98.25,98.87,97.5,98,97.5,97.62, -97.25,98.5,99.87,99.62,99.37,101.37,99.75,99.12,99.5,97,96.75,97.62,98.25,98.12, -99,100.75,102.5,101.25,102,104.25,104.75,104.12,104.12,104,104.75,104.5,103.25,102.87, -101.5,102.25,99.62,99.25,99.5,97.75,97.62,97.62,97.62,95.75,94,94.25,94.62,94.75, -94.37,94.12,94,95.12,92,96.5,98.12,98.37,98.37,98.62,98.75,99,99,99.62, -100.37,100.25,100.75,101.12,100.37,100.37,100.12,100.5,100,100.62,100.87,98.5,95.62,96.12, -96,99.25,98.25,98,98.5,99.25,97.75,97.87,98.12,98.12,97.37,96.62,97.37,98.12, -98.25,98.25,99.12,97.12,100,99.75,99.5,99.87,100.12,100.62,102.12,102.12,101.37,102, -103.12,104.62,105.75,103.75,103.62,103.75,103.62,104.5,103.75,102,100.5,103.12,103.5,103, -101.25,104.62,103.25,103,104.12,101.75,101.87,102.37,102,103.75,102.12,102.12,104.62,107.25, -107.62,108,107.87,108.12,109,109.37,109.25,106.75,105.62,108.12,110.12,110,111,112, -112.5,112.12,113,111.12,111.87,112.87,112.5,113.37,111.75,111.25,111,113.5,115,126.25, -126.25,126.5,126.75,126.5,128.75,131,131.63,132.63,129.88,129.88,128.13,127.5,128.13,129.75, -132.13,132.63,135.5,137.88,137,135.38,133.88,132.25,131.5,129.63,128.25,128.38,128,127, -125.62,125.62,126.25,124.62,123,122.37,120.5,119.87,117.87,117.75,116.62,114.87,114.25,106.62, -106.75,105.5,107.75,107.25,106.75,108.75,110,111.87,112.25,112.12,112.87,113.25,113,113.5, -113.75,113.37,112.25,112.12,111.5,110.62,111,112.87,112.62,112.37,112.12,110.75,111.25,113.75, -113,113,111.25,111.62,112.37,112.62,111.62,112.62,112.37,113.25,114,112,112.5,112.5, -112,110.75,107.87,106.25,106.25,107.62,106.5,107.25,104.87,104.75,104.87,105.12,106.5,106.62, -106.75,106.62,106.5,104.62,101.75,99.37,98.25,96.25,99.5,99.75,102.87,105.37,108.62,106, -106.37,107.12,108.25,107.12,102.87,102.87,104.25,104.87,104.5,105.5,106.62,107.5,105.12,104.12, -103.62,104.75,107.12,105.87,105.5,101.87,101.5,102.25,100.75,100.37,101.37,102.75,103.37,102.75, -97.87,96.5,98.87,99.75,101.87,100.75,103.75,104.5,103.12,101,101.5,103,102.87,102.5, -102.5,103.75,109,110.62,110.62,110.5,110.62,112.25,114.25,113.62,114.12,117.5,118.75,119.87, -119.87,121.25,120.25,118.75,117.87,117.75,117.87,117,116.87,117.62,117.37,117.37,117.5,116.75, -116.5,116.5,116.25,117.5,117.25,117.87,118.62,120.12,120.12,120.25,119.25,118.62,118.62,119.75, -120.37,120.12,119.25,119,119.5,119.62,116.75,116.12,117.87,117.25,116.62,115.12,115.25,115.12, -114.62,113.75,114,113,111.25,110.37,110.37,110.25,108.25,109.12,108,107.87,107,107.37, -108.5,109.12,108.87,108.62,108.25,109.12,109.5,109.87,110,107,105.87,105.12,105.25,105.25, -105.87,105.87,106,105,105.62,105.75,103.75,103.37,104.12,104.87,105.5,107.12,107.87,107.37, -107.37,106.5,105.62,106.25,106.25,106.25,106,105.25,104.25,104.62,104,103.37,103.12,103.62, -102.5,102,103.25,102,102.25,103.37,103.75,103.25,101.25,100.62,102,101.87,100.62,98.62, -97.5,97.87,97.75,97.62,95.75,95.5,95.12,95,95.5,96.62,96.5,98.5,97.62,98.37, -97.5,97.25,97.62,99.37,98.62,99.37,99.25,99.5,98.87,98.37,94.5,94,94,94.5, -94.25,95.12,94.37,93.87,93.37,93.37,94,95,95.62,95.62,95.5,96.5,97.62,98.5, -99.62,97.37,96.87,96.87,97.5,98.5,98.25,100.25,99.37,98.5,98,96.75,96,97.12, -97.75,97.75,97.62,96.5,96.75,96.25,96.5,97.87,96.75,99.62,99.87,99.37,99.5,100.5, -101.75,101,103.37,103.5,103.12,101.5,100.5,97.75,99.87,107.25,107.5,107.87,107.75,107.12, -107,106,105.62,108.37,108.62,107.75,111,116.62,116.12,116.12,116,115.75,116,115.37, -115.12,115,115.37,116.12,115.37,115,115.87,116,117.37,116.87,116.87,116.12,116,115.37, -115.62,113.25,112.75,112.5,113,114.75,114.37,115.12,115.37,114.75,114.87,116.12,117.12,117.75, -115.75,113.25,112.62,113.62,114.5,113.62,113.12,111.87,110.62,112.5,113.37,112.5,112.75,114.12, -114.5,114.5,113.62,114.25,113.37,113.62,112.25,111.25,111.37,111.25,111.75,109.62,111.25,113.12, -112.37,110.87,109.62,108.5,109.37,109.37,109.62,108.37,108.5,109.62,108.5,107.5,108.37,108.75, -109.12,108.62,108.75,109.62,109.5,107.87,107.5,109.25,109.5,109.37,109.12,109.25,110.87,110.62, -110.25,111.25,110.62,110.25,109,109.62,109.12,108.62,109.12,110.25,111.5,112.37,112.87,114, -114.25,113.5,113.37,113.12,112.12,111,112.12,112.12,110.75,110.5,108.87,110.87,110,109.5, -107.75,107.12,107.12,106.25,108.5,109,108.25,109.12,109.37,109,108.5,107.62,109.75,109, -111.37,117.25,117,117.62,118.12,117.12,118.12,119.5,119.37,120.62,120.12,119.75,119.12,121.37, -120.62,121.12,122.62,123.25,125,125.25,125,124.87,124.75,124.75,125,126,126.87,126.25, -126.25,126.87,127.87,129.25,127.37,127.25,126.37,123.12,123,122.12,122.12,123.5,123.75,122.12, -123.5,123.37,122.37,122.25,120.75,120.87,121.5,121.37,122,121.25,120.62,121.62,122.5,121.87, -122.62,122.75,122.37,122.75,123,121.12,121.12,120.25,120.25,119.5,120.12,119.62,119.37,120.87, -120.5,119.5,117.62,117.75,118.25,117.62,116.25,116,117,115.37,114.12,115.37,114.87,114.5, -117,116.37,116.37,119.62,118.5,119.37,118.62,120.25,122.12,121.75,122.5,120.25,120.37,119.5, -121.5,122.25,123.12,123.62,122.37,120.5,121.12,119.37,119.37,117.75,117.5,116.12,115.5,114.75, -113.37,112.75,114.37,114,114.75,113.75,113,111.37,112.25,111.75,112,112.5,112.37,111.75, -113.37,113.75,113.5,112.5,113.37,111.25,111.37,111.62,112.37,111.62,109.5,110.75,112.62,112.75, -111.5,110.75,111.25,110.37,110.75,112.5,114.12,113.75,114.62,115,117.87,117.37,118.87,121.62, -123.12,123.5,124,125.5,124.62,125.37,124.25,121.25,120.75,122.37,120.25,120,121.5,123.37, -123.12,124.87,125,124.62,123.5,124.37,126.37,126.25,126.37,126,126,125.75,126.75,126.37, -125,124.75,124.75,122.75,122.62,117.5,116.62,115.75,117.12,118.5,118.25,115.75,115.5,115.25, -114,113.62,113,112,111.75,112.37,108.12,107.5,108.12,108.5,108.62,108.12,109.37,108.62, -108.5,110,109.87,109.12,108.62,108.37,110,109.87,110.12,110.87,113.25,113.25,113.12,112.62, -112.62,113.12,113.37,113.5,112.37,111.5,112,113,113.25,111,111.25,114.25,113.25,111.87, -109.37,108.12,105.75,105.62,106.75,104.5,104.75,105.87,104.25,106.5,109.37,111.25,113.12,112.75, -113.25,113.75,113.37,113.62,114.5,112.37,113.62,116.25,117.25,116.12,115.25,115.75,116.87,116.25, -115.87,114.12,114.12,114.75,114.37,113.12,112.12,112.12,112,112.5,111,110.5,109.5,107.25, -106.87,107.75,107.5,108.25,109.12,110,110.5,113,111.5,111.5,110.5,109.62,109,108.62, -111.5,117,118.37,114.5,113.37,113.25,114.5,114.87,121.12,121.25,121.62,116.75,115,116.37, -115.5,115.12,119,118.75,116.5,116.87,115.25,115,115.75,114.25,110.25,109.25,110.5,111, -108.37,107.75,105,106.5,110.25,111,110,114.37,117.37,117.87,116.25,114.75,115.62,116.25, -116.25,117.75,121.25,121.12,118.25,115.12,118,119,119.12,119.5,118,121,121.75,118.25, -114,115,112,118,111.5,120,108,100,132,140,144.13,145,145.5,147, -150,150,151,154.5,154.75,151,148.5,149.5,151.5,155,153.63,152.88,149.25,149.75, -155.13,156.13,156,157,161.25,157.88,157.13,155,155.88,160.63,160.25,161.25,162.25,166.5, -165.25,165.88,166.75,171,173.13,174.5,173.13,170.63,171,173.25,172,170.38,168.63,167.13, -164.5,163,159.13,159.75,158.5,158.75,160.75,160.63,159.63,160.13,160.88,160.13,159.13,161.25, -162,164,166.75,167.38,166.63,166.5,167.13,165.5,165.75,164.5,163.88,164.13,164,162.75, -162.5,165,166.13,167,164.63,162.5,161.88,160.38,160.13,160.25,159.38,158,156.25,157, -156,159.25,158.75,158.88,159.63,157.88,157.25,159.25,160,159.25,160,158.25,156.13,156.88, -155,155.63,157.13,160.63,165,164.5,162.25,163,163.25,163.88,166,164.25,159.75,159.13, -157.75,155.88,154.63,149.5,151.5,153.13,153.88,148.5,148.75,149.88,149,146.5,146.75,142.63, -143.5,146.13,146.5,148.88,145.63,147.5,149,149.5,145.88,150.5,153.88,152.13,149.25,148.5, -147.38,145.88,145.13,144.38,143.13,144.63,140.88,141.5,138.75,137.88,139,140,138.25,137.63, -138.25,139.25,139.38,141.75,142.38,138.75,138.13,137.5,137.13,134.25,132.25,132.63,132.75,131.5, -132.5,135.5,134.25,131.5,132.63,128,127.5,127.5,128.5,127.87,124.75,124,122.62,121.75, -122,119,119.5,118.75,115.75,116,120,121.5,121.37,122.12,122.62,122.62,120.87,120, -120.25,120.25,121.75,120.5,120.37,121.12,124.25,125.12,126.37,127,125.37,126.37,127.75,126.75, -126.5,125.75,126.25,127.62,128.63,127.5,125.25,126.5,126,124.12,123.25,122.62,121.75,120.12, -120.25,120.62,119.62,119.87,121.87,122.87,121.25,120,119.25,122.5,124.75,123.75,121.75,121.37, -120.25,120.62,120,121.25,120.62,120.12,120.25,119.87,120.5,120.87,120.37,119.75,121.87,122.37, -121.75,126.25,128.13,131,130.63,132.25,132.63,134.25,133.13,135,134.25,137.13,138.38,137.13, -136.75,136.75,137.63,135.63,136,136.25,138.75,142.88,143.5,140.88,138.5,136,135.13,135.5, -138,139.5,140.5,138.88,138,137.38,137.25,136.75,135.13,133.13,133,133.75,132.5,130.63, -129.25,129.75,130.13,129.63,130.75,130.13,131.38,132.13,130.25,130.88,132,133.25,132.5,132.63, -131.5,130.75,129.88,131.75,132.75,135.5,139.25,143,141.25,143.5,143,145,148.25,148.25, -146.38,146.25,146.63,146.63,146.75,144.75,144.5,144.63,145,144.13,146.5,148.13,148,147.75, -148.25,146.63,146.5,149,149.38,149.5,151.5,151.75,152,150.25,147.88,143.88,143.63,142.25, -144.25,144.25,143.75,144.63,145.38,147,148.75,149.75,148.13,148.63,150,153.5,154.5,153.63, -155.75,156.25,158.25,158.5,158.5,155.5,152.13,152.25,152.25,152.5,154.13,153.25,151.5,149.13, -149.25,148.13,148.38,149.75,147.38,148.13,149,148,149.13,149.63,148.13,146.75,147.25,146.5, -148.5,149.88,150.25,150.75,149.5,148,147.75,148.88,149,146.25,144.5,145.25,146.5,149.13, -150.13,150,154.5,157.38,156.5,157.75,159.13,157.13,157.13,156,155.13,153.5,153.75,156, -155.38,151,154,152.13,151.75,151.63,149.38,148.63,150.38,149,148.25,147.88,144.13,143, -148.5,148.25,150,152.63,149.25,148.75,147.88,148,147.25,147,154.38,153.13,152.38,151.63, -155,156,153.75,152.13,151.25,153.38,153.75,152.38,151.63,151.5,150,149.13,147,146.63, -144.25,142.13,140.25,140.63,138.63,137.63,137.75,139.25,139,138.75,138.38,139.25,139,137.88, -137.25,136.63,136.38,134.75,134.63,134.75,132.63,131.75,131.63,131.25,132.25,130.5,129.63,129.38, -130.25,129.5,127.5,127.5,128.25,129.38,127.62,127.25,127.62,128.25,127.5,127,125.37,123.62, -123.75,124.25,123.5,123.12,122.87,123.75,124.37,123.87,123,122.25,123.75,126.25,127.62,126.37, -126.5,126.5,126.5,127.5,126.12,126.75,127,127.62,129.25,128.63,127,126.5,126.5,126.5, -127.25,127.5,127.75,126.37,126.37,126.37,127.62,125.87,125.75,125.5,125.75,126.75,125.75,126.62, -127.25,127.25,129,129.13,130.5,131.38,131.63,130.5,129.13,129.38,130.13,128.63,127.62,129, -128.63,128.75,128.38,129,125.5,123.37,123.25,122.87,120,120.5,123.25,124.12,123.25,124.25, -123,123.5,123.12,122,121.37,118.75,118.37,117.37,119.25,119.12,119.25,119.37,118.25,120.62, -126,126.87,127.25,127.62,128.5,128.75,128.25,127.25,127.25,129.25,129.75,130.75,131.25,131.88, -132.38,131.38,128.63,128.5,127.75,127.75,129.75,128.5,127,125.37,125,124.75,124.62,124.75, -125.12,125.5,126.12,127.12,128.13,127.25,127.25,126.75,126.87,127.37,129.25,128.5,127.87,126.87, -125.87,125,124.25,123.87,125.5,126.25,127.5,126.87,125.62,126.37,125.5,124.12,124.5,127.75, -128.13,129,128.25,128,128,128.75,129.38,131,129.75,129.13,130,132.75,134.63,134.38, -134,132.75,132.75,133.25,132.13,132.13,133,131.88,131.25,130.75,132,131.75,131.25,132.75, -136.75,135.88,135,136,135,135.38,135.25,136.13,133.75,133.25,132.63,132.38,129.25,129.13, -124.37,123.62,123,123.62,124.12,120.5,122.12,119.62,119.5,119.25,119.75,119,119.87,120.75, -122.87,122.75,122.75,123.62,123.25,120,122.12,122.37,120,117.12,117.87,117.5,118.37,117.75, -116,116.5,117.25,117.37,120,119.5,120.75,121.62,123,122.75,122.12,121.12,119.62,120.12, -119.5,121.12,122,122,122.5,122.75,123.25,124.25,125.37,126.5,123.75,125.75,125.25,124.62, -125.12,124.12,123.75,124.87,126.25,126,124.87,123.75,121.75,120.62,120.5,121.37,120.62,120.12, -118.75,120.5,120.25,121.12,121,120.5,121.75,122.25,124,125.25,124,122.75,123.62,123.62, -125.12,125,126.5,126.12,126.25,122.62,122,122.25,120.87,121.25,122.87,121.62,121.87,123, -123.37,124.25,124.37,123.62,124.25,123.87,124,123.5,122.5,122.5,122.25,121,120.75,120, -120.75,118.5,118.25,120,120,117,113.5,110.87,108.87,108.25,107.87,106.75,104.5,105.12, -105.12,105.5,106.25,107.12,106.75,104.5,104,104.12,105.25,106.25,105.37,104.62,106.25,106.12, -104.75,105.12,103,102.75,103.12,105.37,105.12,105.37,101.62,101.87,99,99.12,100.5,104.25, -103.75,104.12,104.62,104.75,103.37,105,108,107.25,107.5,105.62,105.75,106.75,106.12,107.75, -107.5,108.25,108.62,109.62,111.75,112.25,110.5,110.5,111.62,112.5,112.75,112.37,112.5,115, -116,114,112.75,112.62,111.87,110.62,109.5,109.62,110.12,110.5,112,110.62,111.12,107.5, -108.75,109.75,108.37,107.75,108.37,110.62,110.37,111,113.62,113.75,113.62,112.62,111.75,111.5, -112.37,114,113.5,112.5,112.75,111.12,110.37,110.37,108.5,107.37,107.62,106.62,109.12,110.37, -111.62,109.75,109.37,109.87,110.75,109.25,107,108.62,108.62,109.12,108.62,109.5,109.12,108, -109.37,106.5,107.5,108.5,108.5,110.75,112.75,113.25,113.25,113.12,112.62,114,115,116.37, -116,117,118.25,119,119.87,119,118.25,121.25,121.87,122,122.5,123,122.62,121.75, -121.62,122,123,123.5,124,122.62,122.5,122.12,121.12,120.5,119.62,119.5,120.62,122, -122.25,120.62,118.5,117.62,117.62,117.12,117.62,117.62,117.37,118.62,118.25,120.87,120,122.62, -123.12,122,122.87,123.62,124,127,125.12,124,122.37,121.87,122,121.75,123.5,125.5, -125,126,127.12,127.37,127.5,128.25,125.5,125.75,129.63,128.63,128.5,130.5,130.75,132.63, -131.88,132.75,131.5,131.75,131,129.13,128.88,126.25,126.5,127.87,127.75,126.5,126,123.87, -122.75,122.87,123.12,122.62,121.5,121.5,121.62,120.62,121.12,121.37,121.62,121,120,118.5, -118.12,117.12,117.25,116.87,115.62,115.25,116,118.5,120.62,121.12,121.37,121.62,120.37,119.12, -117.87,117.5,117,116.62,118.5,119,117.5,119.12,120.12,120.25,119.37,121.5,122.62,125.25, -123.5,124.37,123.5,122,120,119.12,119.5,121.62,120.25,120.62,121.5,120.25,119.75,119, -118.62,120.37,119.75,117.87,117.75,120.25,122.62,122.75,122.5,120.62,121.5,120.25,121.5,118.12, -117,114.12,113.62,113.12,112.62,113,113.62,113,111.25,110.25,110.25,112.87,114.25,113.37, -113,109.75,110.25,110.5,110.75,113.12,114,115.62,115,115.25,116.75,116.62,115.5,114.62, -115.37,114.62,114.75,116,115.87,115,113.62,113.75,114.75,114.12,111.75,111,110,109.62, -107.25,107.37,106,104.62,102.62,102,101.25,101.87,101.12,101.62,103.25,102.5,101.75,101.75, -101.37,100.25,100,99.25,99.12,98.62,98.75,100,99.75,99.87,100.12,100.62,100,101.75, -101.12,101.25,101.25,99.62,99,100,99.25,97.12,97,98.25,97,98.25,98.75,97, -96,95.12,93.87,95,96.62,95.37,95.12,95.25,97,96.75,97.12,95.75,94.87,94.37, -92.25,94,96.75,97,98.5,99.25,98.5,98.12,98,97,96,96.5,95.5,95, -92.37,92.5,96.12,95.75,95.37,94.75,93.37,93.5,93.5,92.75,92,91.5,89.5,89.12, -90.5,93.12,92.37,92.5,94.5,93.25,87.87,87.87,86.5,86.12,82.5,82,83,81.75, -80.62,80.5,82.87,83.5,82.37,81,82,83.37,83.5,83.75,83.62,83,83.62,83.75, -82.25,81.5,79.5,79.12,79.5,80.5,79.37,80,82.75,82,81.5,81.25,79.62,79, -79.5,81.25,82.37,81.37,79.25,78.37,75.37,74.62,73.25,73.37,73.25,74.5,76.25,75.75, -75.62,75.25,75.5,74.75,73.37,73.75,73.25,72.25,72.25,71.12,70.75,71.75,72.12,71.75, -71.62,69.37,69.5,69.62,68.37,68.37,69,68.37,68.12,67.75,66,65.25,65.75,63, -62.75,62.25,62.13,62.38,63,62.38,63,63.75,65.5,66,66.12,65.5,64.37,64.87, -65.5,65.75,66.37,66.5,67.25,65.87,65.62,66.5,66.37,64.75,63.13,64.75,61.38,59.75, -60.38,59.38,60,60.25,60.63,60.63,60.13,60.13,60.38,59.63,58.75,58.25,58.38,58.38, -59.25,58.88,59.13,59.13,58,57.5,58.13,59.5,60.13,61.25,61.5,61.38,61.25,61.75, -61.63,61.88,62,62.38,62,62.38,62.75,62.75,63.63,63.63,63.5,64,63.88,64.75, -64.75,64.75,64.5,64,64,64.12,64.5,64.62,65,64.5,64,63.25,63,63.63, -64.25,63.38,61.25,61.88,62,61.63,61.5,61,61.13,61,59.88,59.63,59.63,58.75, -59,59.13,58.88,58.75,57.88,57.25,57.63,57.38,57.25,57.38,57.38,58.13,58.63,57.13, -57.38,58.13,58.5,59.63,60.88,61.5,61.13,61.5,60.13,59.75,60.13,61.63,62.5,62, -60.13,61,60.88,61.63,61,61.38,62.88,61.63,61.5,62.38,62.5,63.63,63,61.5, -61.63,61,61.38,61.63,60.75,60.75,59.38,58.5,57.38,57,56.75,56.75,56.75,55.63, -56,56.75,56.88,56.63,56,55.75,56.25,56.25,56,56.63,56.13,55.5,54.13,53.13, -53,53.25,53.38,53.75,53.38,53,53.38,54,53,53,53.88,53.75,52.88,52.5, -50.5,50.5,50.25,49.88,50.25,50.63,50.5,51.5,52.25,51.25,52,50.88,50.75,51.5, -51.75,52.25,52,49.13,48.38,49.5,50.75,50.38,50.75,50.88,51.13,51.5,50.63,51, -52.13,52.25,53.5,55.13,55.13,54.5,54.13,54.25,54.75,54.25,53.75,53.13,53.13,52.25, -53.25,54.25,53.38,54.13,53.75,53.88,53.5,54.5,55.5,55,54.75,54.13,53.63,53.38, -54,54.5,55.63,55,55,55.38,55,55.38,55.13,55.63,56.75,57,56.63,56.25, -56.75,58,58.13,57.88,57.88,56.75,56.75,56.88,58,56.25,56.13,56,55.25,55.25, -55,54.88,54.63,54.75,55.13,55.13,55.25,56.13,56.13,56.38,55.63,55.75,56.25,56.38, -56.38,56.38,56.38,56.38,56.75,57.25,57.63,58.63,58.75,58.63,58.13,57.63,57.38,57.25, -58,58.75,59.63,58.75,57.88,57.38,57.13,58.25,58,57.63,58.5,59.88,59.75,57.88, -57.25,55.88,55.13,55.25,55.5,56.13,55.75,56.25,56,56.38,56.5,56.13,56,57, -57,57.63,57.38,58.13,58.5,58.63,59.5,59.88,60.63,59.75,60.25,60.13,60.38,59.75, -59.75,59,59.13,60.13,60.5,59.75,59.88,60,59.88,60.75,61.88,62,61.88,61.38, -61.63,62.63,62.13,62.13,62.63,62.75,63.25,64.25,64.12,62.88,63.25,62.38,61.75,62.25, -61.75,61.5,61.88,61.63,62.5,63.38,63.75,63.38,61.88,61.88,60.5,60.25,61.13,61.63, -61.63,61.25,61.75,62.38,62.75,63.25,64,63.88,63.63,63.38,63,64,64.5,64.5, -65,64.62,64.87,64.5,64.62,64.75,66.37,65.75,65.62,66.37,65.25,66.25,66.75,67.37, -69.12,69.62,69.5,67.62,67.5,67.87,67.75,68.37,67,66.87,64.5,63.75,63.63,64.75, -64.37,64.5,64.37,63.25,63.75,65.62,66,67.5,67.5,67.5,66.25,66.5,67.62,68.62, -69.5,69.5,70.12,70.62,71.25,71.62,70.62,70.37,70.25,67.25,66.87,66.5,66.5,66.25, -68,66.75,65.25,65.12,65.5,65.87,65.75,65.5,65.62,67.5,67.5,66.5,67.75,68.5, -69.62,69.5,69.25,69.12,69.75,68,67.12,66.5,65.5,64.12,63.63,63.88,63.38,64.25, -66.12,66.75,65.62,66.5,66.25,66.25,65.62,65.25,65,65.75,65.75,65.25,64.12,64.25, -66.12,66.25,66.12,65.37,64.75,64.87,65.87,66.62,66.62,67.37,66.62,65.87,65.87,66.37, -68.25,66.75,66.5,66.37,65.12,65.25,64.75,64,64.12,64.5,64.37,64.37,65.12,64.37, -64,63.88,64.25,64.37,64.75,64.25,64.87,64,63.63,63.75,62.75,61.63,61.25,61.25, -61.25,61,60.63,59.38,58.38,58.38,58.75,59.13,59,58.5,57.88,57.75,57.63,58.88, -58.88,58.75,57.88,57.25,57.25,56.63,56.63,57.13,56.88,56.5,56,55.25,54.13,54.38, -55.13,54.88,53.88,52.75,52.13,52.63,52.88,52.5,52.5,53,52.38,52.13,52,53.5, -54.75,54.75,53.75,53.88,53.75,53.63,54.13,54.38,52.88,53.25,53.25,52,50.5,50.88, -50.38,51,51.88,52.75,53.5,54,53.38,53,53.38,54.63,54.63,54.5,54.63,54.13, -51.38,52.5,54,54,56.25,58,58.75,58.63,59.13,59.63,59.88,60.88,61.5,61.13, -60.88,60.63,61.75,62.25,62.63,63,62.13,62,64.62,64.87,65.5,65.87,67.12,66.37, -67.12,68.12,69.25,66.37,66.5,66.25,67.12,67.75,68.75,68.62,68.37,68.25,69.62,69.37, -70.12,69.87,70.12,69,69,69,68.62,69.25,69.75,66.5,66.25,65.62,66,65.37, -62.63,62.63,63,61.25,62.5,64,64,64.25,64.37,64,64,64.12,63.25,63.88, -65.37,64.87,64.62,65.12,65.62,66.12,66.37,65.37,65.5,64.87,64.5,64.87,65.37,64.12, -64.25,62.38,61.75,61.25,61.5,61.75,61.75,62,62,62,61.63,61.63,61.13,61.25, -62.5,62.75,63.25,62.25,62.38,62.5,62.25,61.75,61.75,62.38,62,61.13,61.75,62.88, -63.13,64,65,65.62,66.25,65,66,67,68.5,68.25,68.12,67.25,67,67.5, -67.62,68,66.5,67.75,69.37,67.62,67.75,67.75,68.37,66.5,66.12,65.75,66.12,67.37, -67.37,67.5,67.25,68.5,69.75,69.5,69.62,69.62,69.5,69.12,69.5,70.37,70.5,70.87, -71,71,69.87,69.75,69.75,68.5,68.75,69.12,69.5,68.25,68.75,69.25,69.25,69.25, -68.5,68,68.5,69.12,68.87,68.37,69.5,69.37,68.5,69.25,69.75,69,70,71.12, -72,72.87,71.87,71.75,72.12,71.87,73,73.62,73,72.5,73.37,73.87,72.87,72.12, -72.25,72.62,73.87,73.75,75.25,77.5,76.62,76.87,77.62,77.37,76.12,75.75,75.87,302.25, -303,305.75,306.25,305.25,306,307.5,307.25,307,306,302.75,305,307.5,307.5,306, -309.75,308.63,308.13,311,318,315,314.25,309.75,307.5,308.5,309.88,309.75,307,306.25, -308.25,312,311.25,311,311,312,318.88,317,317.75,317.25,316,314.5,312.5,314.5, -316.75,317,312.75,312,314.75,314.75,310.25,309.5,309.38,306.75,305.25,306.75,308.13,305.5, -307.5,304.25,304.13,303.75,302.13,299.25,298.63,298.63,298.13,302.5,301.25,302.13,305.63,305, -306,304.5,304,306.75,299.75,300.13,299.13,297.13,303,304.5,307.63,308.13,308.63,311.38, -310.75,311,309.25,307.75,310,305.25,306,309,306.5,308.75,312.25,310.75,304.75,304.88, -306,302.5,305.13,304,304.5,294.5,298,302.5,300.5,295.25,285,282,281.38,270.38, -269.38,272,273,274.13,275.5,274.5,273.75,275,276,274.38,271.75,270.63,265,264.75, -267.5,268.25,266.75,264,262.38,261.25,261,259.25,258,256,259.63,263.25,262.75,260.63, -259.38,264,267.25,268,265.25,263.5,266.5,269,271,272.5,275,274,273.63,276, -277,275.25,279,284.75,285.25,280.5,280.5,279.25,278.75,278.13,275,276.5,276.88,276.25, -273.5,274.5,279.63,277.5,284,280.5,282.5,286.5,287.5,289,292.88,295,298.75,299.5, -298.75,297.5,299.5,293.88,292,291.5,292.5,291.5,294.5,296.63,296.5,297,293,292.25, -293.5,294.75,290.75,286.75,288.63,287.63,286.75,288.5,285,286,284.5,285,279,279, -278.75,275.5,273,273,269.25,267.75,267,267.75,266,264,266,259.38,256.63,258.38, -258.75,258.75,257.75,256.63,255.25,255,257.25,259,258.5,258.25,257.75,262.25,265.25,265.13, -265.5,265.75,266,269,271,266.75,267.5,267.25,265,264.5,266,260.5,256.88,256, -258.25,259.88,260.5,260.5,260,262.5,262,261,264.5,265,266.13,261.25,262.5,259.38, -259,258.5,259,261.13,258,262.75,265.5,264.38,260.38,259.88,261.38,261.25,253,252.13, -252.5,249.63,248.88,248.38,240.5,235.5,236.25,239.38,239.75,239.75,240.5,238.25,236.13,234.75, -235.25,237.38,238.5,237.13,237.25,239.13,238.38,238,240.75,241.5,239.25,239.5,239.25,238.75, -242.25,243.75,241.38,241.13,240.25,245,248.75,250.38,250.25,253.5,255.38,253.63,254.75,254.25, -255.13,254.75,256.5,256.5,257.25,258,258.63,259.5,258.25,257.13,258,262.75,264.63,264.5, -264.5,264.25,264,265.75,264.75,264.5,265.13,267,267,266.75,264,265.5,266.38,265.5, -266.5,265.25,264.63,266,267.5,268.5,272.75,269.88,269.25,269,267.5,266.63,264.25,261.63, -262.5,263.75,264.75,263.13,262.63,263.25,260.25,261.13,259.75,259.25,262.5,262.25,262.25,261.75, -262.75,267,267.25,264.5,261.63,259,258.38,257,257.5,258.25,258.13,259.5,252.75,250.63, -250.5,251.5,250.38,249,249,255.75,257,258.5,259,257,255.75,258.5,257.38,255.63, -255.38,257.25,257.13,256.75,255.13,254.13,256.25,256.5,256.75,257.38,257,258.5,259.25,259.63, -259.63,258.25,258,256.75,256.38,256,255.25,255.63,255.5,259.13,261.75,262.5,261.63,261.25, -262.75,265.25,267.13,266.5,267.5,266.75,265.63,266.63,267.75,266,266.88,267.13,269.5,269, -267.25,267.5,267.75,267.5,265.75,265.5,265.75,265,264.25,263.88,266.5,266.63,268.25,268.63, -268.13,265.88,266.25,267.25,271.25,272.5,272.63,270.75,272.63,272.75,270.5,262.13,259.13,259.5, -258.13,258,259.25,259.25,261.25,261,264,261.5,264.13,265,262.38,260.38,259.13,259.13, -257.88,256.88,255.25,257,254.13,251.75,250.5,251.25,252.25,249.63,250,247.38,246.13,246, -244.5,245,246.75,245.88,245.38,245.25,249.38,252.25,253.75,251.75,253.25,252,250.5,251.63, -255.13,253.63,256,259.5,260.38,259.5,257.38,257.13,259.25,259.25,257.5,256.5,257.5,263.5, -269.88,270.75,271.38,270.13,271.25,269,275.63,273.75,275,274.25,274.5,275.63,276.5,275.75, -275.75,279.5,277.5,277.5,279.63,282.5,282.5,282.5,282.63,282.5,283.63,284,282.5,282.25, -278.75,279.63,280.13,278,276.5,276.75,276.38,276.13,275.38,275.38,275.25,275.13,275,269, -269.38,271,271.75,267.75,267,267.63,266,269.5,268.5,268.13,269.75,273.5,275.25,271.5, -268.75,267.25,267.25,269,271.25,271,272.38,274.75,271.25,270,268.25,269,266.13,268, -269.13,271.63,273.75,271.75,272.38,276.5,279,277.25,276.5,277.75,273.5,270.25,270.13,265.25, -264.75,265,267,267.75,268.25,269.5,270,271.5,270.75,270.75,272.5,270.25,269.5,269.5, -269.25,271.13,272.75,270,269.25,269.5,268.25,268,262.75,263.5,260.5,261.25,260.19,258.88, -257.5,257.5,262,266.25,265.75,270.13,266.5,265.25,261.5,259.88,255.5,253,256.5,263.5, -261.5,262.75,262.5,263.5,269.75,271,277.25,277.5,278,276.5,277.75,279.13,278.75,280.75, -280,282.75,284.5,283.38,284,285,284.63,283.5,282.5,277.75,277.13,277,277.63,277.5, -277.5,277,278,275.75,276,273.25,272.13,270,267.75,268.5,268.75,269.5,270.88,272.25, -274.63,278.5,279.25,277.5,277.5,275.88,277.25,274.5,274.25,274.25,274.25,276,271.5,271, -271.75,272.25,270.88,272,273.75,272,270.25,270.5,268,272,272.75,276,276.63,276.75, -277.13,276.75,276,274.63,274.5,274.5,273.75,276.25,273.5,273.63,274,271.5,268.38,268.5, -266.5,266,263.63,259,257.75,259,254.75,253.75,252.75,252.5,252,252.5,255.75,253.88, -253.25,253.5,249.88,249.5,248.5,249.13,253.5,253.75,253.5,253,251.5,252.13,255.38,256, -255.5,252.25,249.63,248,245.25,249.25,249,252.5,252.38,253.75,255.5,257,256.75,260, -258.5,259.25,255.75,254.38,255.5,258.5,261.25,266.75,266.13,268,269.5,268.25,260.75,260.25, -260.5,258.5,259.25,258,258.5,261,258.25,257.5,257,257,258,259,258.5,261.25, -261.75,259.25,258.75,258.5,255.25,255.75,257.75,258,254.25,252.5,256,259,261,259, -262,258.5,252.5,252.88,251.75,252.5,255.25,253,252.75,254,257.75,261.25,259.25,256, -257.63,251,248.13,249.63,253.38,249.88,246.75,247,248.25,242.88,238.5,239,234.25,233.75, -230.13,230,228.5,228.38,229,226.25,223.38,223.5,221.5,222.25,221.13,221.13,216.25,215.88, -207.75,219,218.5,216.75,215,214.25,214.75,215,210.5,214,214.63,217.25,217,220.63, -224,224.5,223.75,222.13,220.5,220.5,219.63,217.5,220.13,223.13,220.75,221,220.5,217, -215,215.75,213,213.25,211.63,211,210.5,210.5,209.75,211.88,208.75,209,212,210.25, -212.5,208,207.25,208.63,207.5,208,205.25,203.75,204.75,201,197.5,200.13,189,183.75, -183.25,188,190.75,192.13,190,190.5,185.5,186,185.75,180,178.63,177.75,178,179, -179.5,177.63,179,179.5,179.75,181.5,179.63,180.75,185.75,181.5,178.25,178.25,180,177.75, -176.25,176,177.75,181.63,179.75,177.75,177.13,181.63,180.13,179.5,182,184.38,184.38,187.75, -188,190,191.25,190.38,190.25,189.75,191.5,192,197.13,199.5,199.25,201.5,203.5,206.25, -205,202.5,204.75,206.75,203.63,203.88,206.25,205.5,208.13,208.25,208.25,208,210,211.25, -206.25,204.5,204,203,203.5,205.75,206,208,210.25,210.5,212,213.25,214.5,216.63, -216.5,217,213.5,212.5,213,215.5,214.25,212.75,212,216,214.5,216.25,216,223, -216.25,215.25,210.5,208.5,208.5,208.75,206.25,206,207.63,201.75,200,202.5,205.13,206.25, -208,211,210.25,208,212.25,207.75,207.5,204.75,201.5,207,202.25,198.75,196.25,197.25, -198,203.5,204.88,205.75,206.25,208.75,203.25,203.5,208.13,209,213,214.13,215.75,215.25, -212.5,213,215.5,215.75,217,213.75,214.25,214.25,216,211.88,211.5,207.5,206,212, -217.5,214.75,211.5,210.5,214,213.25,201.63,196.75,198.25,192.5,195.25,191.25,188,187.25, -183.25,182,179.63,179.25,162.88,162,162.13,158.5,159.5,157.25,157.88,160.25,157.5,167.75, -169,169.63,162.63,163.25,163.5,165.5,166.75,168.25,166,160.13,161.75,164.5,166,165, -168,168,169.75,165,165,165.38,169.13,171.13,170.25,162.5,162.5,166.13,166.13,168, -170.5,176.5,177,172.5,168.5,170.5,166.75,167.5,169,173.75,180,182,183,184.75, -188.25,186.75,185.5,183.25,189.5,186,187.25,189,188.5,184.25,176.25,177.25,175.88,181.25, -186.5,182.25,182.5,175.25,174.5,176.13,176.25,174,175.38,160.5,160.75,159.25,154.25,155.63, -158.5,154.25,153.5,160,160.25,165,164.75,168.25,166.5,169.25,158,161.75,150.5,150.5, -155.25,165.13,170.25,171.75,179,176.5,173.5,183.5,190.25,188.25,190.75,190,188.25,189, -189,192,195.25,193.5,198.5,198.5,199,199.75,202.5,206,207,207.75,207,200.88, -200.63,198.63,201.63,202.25,201.25,204.75,213.75,219.5,221,214.75,217,216.5,210.5,213, -215.5,203.25,196.25,197,198.75,198.13,205.25,210,210.25,211.5,210,211.25,216,215.75, -211.25,210.5,213.5,216,215.5,218.25,222.75,225,222.75,226.25,226,228.75,219.5,218.75, -218.75,211,212,209.63,210.5,216.5,215,212.5,215,217.13,217.5,217.5,220,220.63, -221.75,219.13,222.63,225.5,225.5,224.25,221.5,224.5,228,225.75,223.5,221.88,222,218.75, -223.5,227.25,229.75,231.25,234,231.25,231.25,229.25,229.5,230,230.63,230.25,233.25,238.5, -235,231.63,228.5,235,239,244,248,241,241.5,242.5,245.13,245.25,247.38,246.75, -247,249.13,246.5,236.5,237.5,238.25,240.25,238.25,231.5,235.5,236,235.75,233.5,233.88, -232.75,235.75,228.75,230.75,227.5,225,228,226.5,226.5,232.5,234,235.5,235.25,237, -240.25,245.13,245.25,240.5,244,245,244,247.75,243.25,238.25,245.5,247.25,238.75,236.5, -235,232,227.5,225.25,226,225,229.5,238.75,241,245,248.5,251.5,243.5,235.13, -239.75,242.5,248.25,238.75,238.25,243.5,250.5,249,251.25,261,259.5,253.13,253,255.25, -255.5,263,265.25,264.5,263.5,266,272,270,267.13,275.13,280.25,275.5,283.75,287, -276.25,278.25,282,275.5,276,275,280,278.5,277.25,278.5,284,283,285.5,283.75, -275.25,280,289,283.25,281.25,276,278,281,277.5,270.5,261.75,255,252.5,245, -247.25,253.5,255,257,259,260.5,253,250.5,258,266,266,252.75,270.75,290.5, -290.5,286.25,285.25,293.25,296,297.5,295.5,296.75,299,302.75,302.5,303.25,298.25,298.25, -298,297.25,297.75,298,299.25,300.25,298.5,299,300.5,300.63,303.25,304,308,308.25, -310.25,310.25,311,314.5,316.25,317,315.75,314,309,310.5,313,312.5,308,309.13, -307.5,310,313.75,315,308.25,299.25,298.75,296.5,295,305.25,315.75,313,309.5,306, -308.63,315.25,313.75,317.75,311.13,312.88,315.5,320,328.5,323.25,322.5,321,318.5,313.13, -309.75,307.13,310,314,318.75,323.5,397.5,390,389,388.5,381.5,388.5,396.75,397.5, -392.25,395.25,405.5,409.25,414,416,416.25,421,410.25,411.5,411.5,401.25,405.13,405.5, -406.25,415,424.5,428.25,424.25,423.5,425,428.5,428.75,426.5,429.75,420.5,423.25,420, -420,424,427,430.5,434,434,432,427.25,419.5,424.25,430.25,433.5,437.5,440.5, -444,444.75,442,440.75,438,438.25,438.5,435.25,432.5,422,426.5,418.5,422,427.25, -432,438.5,441,443,439.25,440.25,445.5,451,446.5,437.75,431.5,438.5,431,428.5, -427,428.5,434.5,438.5,434,432.25,434.5,433.75,436,427.25,427,420.75,420.75,422.75, -417.25,412,411.25,415.25,416,412.75,406,409.25,404.5,399,392.25,391.5,385,385.5, -386,390,392.5,396,394.5,396.25,398.5,402,397.25,396,396,397.75,399.25,391, -387,380,381.5,384,388.5,387,385.25,382.75,380.5,382.75,384.25,378.75,373.25,371.25, -371,373.25,376.5,387,388.25,386,381,378,378.25,377,383,385.5,389,378, -375.5,374.5,361.5,362.25,377.25,384.5,384,392,400,393.75,395,403.25,405.25,403.5, -403.5,401.5,398.25,398,397.25,396.5,398.5,397,397,394,397.75,397.25,393.25,393.25, -393.5,398.75,398.75,401,404.5,405.25,406,407,403,404.25,405.5,407.13,411.5,411, -408.25,411.5,413.25,416,419,424.75,422.25,421.25,418,415.5,415.25,412.5,408,408.5, -402,398.25,396.25,394.5,393,398,398,389.25,389.5,390,383.5,387.5,391.5,391.75, -395.25,396.5,399,403.5,403,396.5,393,392,388.25,390.63,390.5,391,394.75,392, -396.5,395.25,395.5,396,396.25,395,387,387.5,391,392.75,391.25,391.5,394.25,397.63, -399,396,394.5,402.25,401.25,400.5,397.75,398.5,394.5,390,383.5,383.5,384.5,380.63, -383,379,379.25,383.5,382.75,376.75,378.75,380,382,381.25,381,379.25,381,383.25, -383.5,387.5,390.5,395.25,393,393.75,394,391.75,389.5,390,388.5,391,389,383.5, -382,378.75,380,383.75,381,381.25,379,377,373,376.75,371.25,366,372,371.5, -372,377.5,380.25,382,379.5,376.5,374.5,374.25,369.5,366,365,365.5,364.75,368, -368.5,364.5,366.5,369,367.75,368.25,370.5,370.5,372,369,367.5,369.25,370.25,368.5, -365,366.75,367.5,367,364.25,357,360.5,363.25,360,349.25,349.5,347,342.5,339, -342,338.25,336.75,336.5,338.75,339.25,331.75,333,334,335,336.75,330.5,333.5,335, -341.25,338,341,334.25,334.25,318.5,320,324.25,317.75,312,313.5,311,313.25,309.5, -308.25,306.5,300.25,299.25,291.5,290.25,290,291.75,293.5,294,298.25,293.75,293.63,288.5, -288.25,296.75,299,297.5,296.5,300.25,297.5,290,290.75,295.5,295.75,296.25,299,301.5, -301,301,305,305.25,305.25,306.75,307,308.5,305,303.5,304,308,305.75,305.25, -306,304.25,302.5,302.25,303.5,301,304.5,305,306,303.25,302.25,300,299.75,299.75, -299,300,302.5,306.25,309.25,310,299.75,299,301,301.5,310,313.5,310.25,313.25, -315,311.25,305.5,306.5,309.5,314,313.5,294,294,286.5,283.25,283.5,285,285.5, -285.5,289,292.75,290.25,293.5,292.25,291.25,296,296.75,298.5,299.5,298.5,293,293.5, -297.5,295,301.25,314.5,311.25,310.75,310,315,316.75,316.75,315.5,311.88,310.5,310, -312.5,314.25,313.25,312.63,315,321,321,317.75,318,323.5,318.75,308,311.25,317, -322.25,320.75,325.75,327.5,325,334,336.5,336.25,341,343.5,342,338,333.5,331.25, -334.25,338.75,342,342.25,344.25,345.5,351.75,349,352.75,350.25,356.5,361,358.75,355.5, -354.5,351.25,349,352.25,354,353,352,356.25,356.5,357,356.5,356,360,359, -356.5,355.25,354.25,356,356.25,356.5,356.25,351,354,355.25,358.5,358,360.5,359, -360.25,353,347.5,346.5,348.75,348,343.25,341.25,338.25,336,336,334.75,332,334, -336,329.75,326.5,327,329.25,335.75,338.75,337.5,336.75,334.25,338.25,332.5,328.25,327, -326.5,325.75,325,318.25,317,319.5,323,316.25,316.13,313.5,312,311.75,311,310, -313.25,315.5,312.25,310.25,314,315.75,316,311.5,312.25,316.5,319,317,316,312.75, -311,315.38,314.5,313,313,310.75,309.63,310.5,317,317,314.5,314.75,311,309, -310.25,307.75,306.25,305.25,298.5,297.75,295.25,297,290.75,290,290,292.25,288.5,293, -296.25,297.25,298.25,295.25,291.5,292.5,296.25,296.13,292.75,293,297,289.5,289,289, -288.75,286.25,288.75,284.5,283,290,291.5,290.25,286,288.5,294,298,301.5,307, -300.5,297.75,291.75,291.5,286,287,287,282,273.75,271.5,273.75,277.25,273,266.13, -263.25,264.5,268.25,268,270.25,267,269.25,265.75,259.25,261,266.25,265.25,260.75,263, -260,254,243.75,236,238.75,235.5,227.5,225,218.75,230.5,236.25,238.5,245,247.5, -249.25,247,248.13,251.13,252.5,252.25,251.25,251.25,253,253.5,253.63,256.25,257.75,255.75, -252.25,250,247.75,245,248.75,250.5,243.5,242,244,250,249.88,250,254.5,255.25, -256.75,255,257.13,265.13,270.25,260,265.25,259.13,254.5,253.25,258.75,262,265,265.25, -264.25,270.25,278,279.25,276,263.5,259,245,238,241,243,237,249.5,258.5, -269.5,263,262,274.25,278,285,287,287.5,280.5,279,282,292,294.5,286.25, -290,299.63,306,309.5,313,321,323,319.5,320.5,322.75,321.25,326.38,325.75,325.5, -319.5,319,317.5,325.75,331.75,337.25,336,334.25,332.75,329.5,322,317.75,317.75,321.25, -322.25,319.25,318.5,324.25,325.13,325,318.5,315.25,323.5,329,328.5,333,334.75,340.25, -339.5,335,344.5,348,352,349.5,346,347.75,347.5,350.5,348.75,344.5,346.5,338.25, -334.75,336.5,336.5,337,334.25,334.25,340.25,341,348.5,356,354.25,353.5,345,349.5, -369,375,373,367.75,367.75,368.5,367.5,366.25,366.25,366,364,362,356.5,358, -355,354,351.25,360.25,360.5,351,350.25,353.25,356.25,356.25,355.25,352.5,355.25,355.5, -355.25,352.25,355.13,355.5,358.5,351.75,346.75,345.5,344.25,351,352.5,359,360.5,361.5, -363,359.5,366.25,366.25,365,361.75,359.25,359.25,356,356.25,359.5,354.25,356.25,360, -360.5,358.75,352.75,355,353.25,351,350.25,348.5,353.75,347,343,344,340.25,341.13, -345.25,343.25,343.75,340,343.25,344.5,343,345,347,355,354.5,352.5,349.25,347, -345.25,341.5,340,337.5,342.75,340,331,335.25,336.25,338,340.25,340.5,343,343.5, -341.5,338,341,348.75,346,341,340,338.25,337,334.5,328.75,328,329.25,333.5, -332.75,335.25,327.5,325.5,326,320,310,313,313,315.25,316.5,315.5,317.75,320.5, -327,325.5,317.25,321,326.5,325.5,332.5,336,344,348,339.5,334.25,332.5,329.5, -320,320.5,319.5,312,312,313.25,314.25,310.25,313,309.5,307.75,308,310,311, -315,318,317.75,317.5,319,318.25,319,322.25,326.5,322.5,321.75,319.75,319.5,324.25, -330,329,331.5,325.5,325.13,326.25,328,326,327.75,326.75,325,322.5,326.25,324.5, -318,314.5,311.5,311,306.19,305.25,306.5,306.5,307,310,309,311.5,311.5,307, -305.25,307,308,310.5,312.75,311.5,308.75,307,305.75,305.25,302,303,300,298, -294.5,293.5,294.25,299.5,301.5,299,295,299,299,295.5,291.75,293.25,295.5,296, -295.25,295.25,294,295.25,297,300,306.75,306.5,303.5,300.25,295.5,294.5,295.5,295, -294.75,295.25,295.25,296.25,298.25,297.75,298.5,300,300,299.75,295,305.25,310,307, -300,299,304,307.5,304.25,300.25,300.25,309.25,313,314,310,315,319,319.25, -316.5,320.25,319.75,316.5,315.25,316.5,318,326,323.25,325,327.5,328,328.5,333, -330.25,328,326.25,322.5,323,318.5,321.5,325.5,323.25,319.75,317,312.5,310,309.25, -307.5,308,304.5,309,308,315.5,317,323,326,321.25,315.5,313.25,319,322, -328.5,328,328,325,322.25,325.25,332,331.5,335.25,334.25,330,330.25,334.75,335.25, -335.25,337.25,334.75,335,338.25,338,338,337,332,333.5,332,335.5,338.5,335.5, -339,341,341,336.5,338,338.75,335.25,331.5,335,335.25,334,330,336,331.5, -326,332,334,339,338,345,352.5,352,355,352,354,361.5,361,351, -348,348.25,351.5,356.25,349,348,355.75,351.5,345.25,345,352,358.75,369,364.5, -367,366,363,368,369,349,337,331.75,330,326,325.5,329,324.13,323.75, -322.5,331.25,333,333,334.5,338.25,340.5,342.5,342.63,340,343.5,346.5,339.5,335, -329.5,327.5,326,326,320,633,636.5,639.5,642,642,645.5,639,641,631.5, -628,628.25,633.5,625,625.5,602.25,598,595,590,584,579.25,580,584,581.5, -590.75,573.5,573,589.5,586,580.5,576,581,566,561,560,576.5,578,587, -585.5,586.25,587.5,596,586,577,572.5,586,572,570,568.5,579,588.5,586.5, -589,593.25,594,591.5,606,614,618,603.5,614,605,606,617,619,609, -616,618,612,605.75,599.25,597.75,594,590.5,588.75,600.5,613.5,624,620,617, -613.5,613.5,620,619.5,614,617,636,644,640,640,642,641,637,629, -624,620,610,610.5 -}; - - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c b/src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c deleted file mode 100644 index ae087f294..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_gDataOpen.c +++ /dev/null @@ -1,667 +0,0 @@ -double gDataOpen[10000] = { 110.4,110.09,108.9,110.9,111.87,110.98,111,112.83,112.99,109.75,110.77,114.3,113.02,111.97,113.24, -112.1,110.39,114.72,115,116.62,117.01,116.19,115.32,114.88,114.85,115,110.25,109.66,108.57,108.75, -109.35,108.3,108.55,108.73,107.79,106.31,105.5,105.39,105.96,105.52,104.75,105.1,104.73,105.96,105.77, -106.5,104.93,105.27,104.22,103.1,102.85,103.11,102.87,101.8,102.46,105.5,106.55,106.5,106.62,107.26, -105.4,105.57,103.9,105.45,106.8,106.95,107.67,105.84,105.61,105.1,105.4,105.81,104.69,103.82,103.93, -102.42,102.76,102.75,101.75,102.8,102.06,101.11,100.3,101,98.74,97.23,95.16,95.02,94.5,94.8, -96.3,94.99,95.75,95.03,96.51,96.4,96.43,95.98,95.8,95.45,94.51,94.24,94.66,93.9,94.71, -95,94.82,95.1,94.5,94,93.95,94.45,93.4,92.65,93.86,93.29,93.48,94.5,93.97,92.4, -90.25,92,90.25,93.71,96,97.86,98.4,98.8,98.9,98.66,99.12,99.06,98.5,98.6,98.8, -99.52,98.9,99.8,100,99.17,99.1,98.97,98.8,98.57,97.7,97.52,97.22,97.08,96.91,96.42, -95,99.8,100.69,99.4,98.99,99,98.5,99.08,98.5,97.6,97.25,97.18,97,97.11,96.3, -95,95.75,95.78,96.1,95.1,94.95,95.61,94.97,94.78,93.6,93.72,93.65,94,94.48,93.51, -92.5,91.9,91.35,91.35,90.65,92.71,93.05,92.9,93.01,93.6,93.42,93.07,93.08,92,91.55, -92.3,92.59,92.25,92.42,91.5,91.76,91.8,92.5,91.5,89.8,90.91,91.83,91.21,90.91,90.05, -90.04,89.8,90.51,86.33,86.08,84.45,84.2,84.15,83.71,83.14,82.93,82.81,81.65,81.88,81.76, -81.9,81.85,82,81.9,81.65,81.75,82.61,82.37,81.97,82.56,83.21,81.9,82.25,81.14,80.6, -79.6,79.9,80.29,81.19,81.13,81.3,81.26,80.06,79.91,79.2,78.9,78.95,79.28,79.51,79.38, -78.93,77.48,76.9,76.05,75.34,75.2,75.56,75.63,75.63,76.65,76,76.21,76.65,76.44,76.38, -75.83,75.48,75.99,74.92,75.49,75.73,76,73.7,73.35,74.24,75.01,76.07,76.25,76.18,78.09, -77.59,78,77.54,77.7,76.89,76.53,77.32,77.04,77.15,78.16,77.99,77.84,77.9,78.44,77.85, -76.93,77.14,77.63,77.24,78.55,79.78,79.06,79.1,80.5,79.89,80.15,80.35,80.16,79.89,79.35, -80.25,79.83,80.86,80.5,81.75,83,81.8,82.47,82.65,82.9,82.49,82.6,82.95,82.87,82.54, -82.11,82.59,83.51,82.7,82.84,81.95,81.3,82.49,81.65,83.95,81.89,81.92,81.18,81.1,81.83, -82.27,83.6,83.7,83.33,83.05,82.72,82.95,82.88,82.2,82.86,82.98,82.99,84.23,83.35,83.82, -83.11,83.35,83.43,82.65,81.51,81.56,81.03,81.26,80.25,80.01,79.91,79.51,79.55,80.2,80.1, -79.97,80.65,81.2,80,80.1,80.91,80.68,80.86,80.55,81.33,80.4,80.4,80.58,79.5,79.94, -80.55,81.45,80.9,81.5,80.21,80.75,81.5,81.05,81.39,81.33,83.04,84.14,84,82.8,83, -83.82,84.37,83.15,83.9,83.95,81.4,82.2,82.45,81.85,82.8,83.1,83.48,84,82.61,82.46, -82.95,83.23,83.89,82.88,83.65,84.5,87.01,86.8,88.57,89,88.56,88.4,89,89.15,89.05, -89.18,88.8,88.95,88.12,86.88,87.6,88,86.18,85.45,84.03,84.25,84.2,82.7,82.71,83.41, -83.1,82.91,81.55,81.2,81.85,81.51,82.32,82.53,82.97,83.08,83.15,83.08,84,82.41,84.33, -82.36,82.6,81.7,82.75,82.25,81.24,80.25,79.82,80.11,80.65,80.22,80.02,79.25,78.06,77.17, -78.31,77.7,77.56,78,79.27,79.74,80.38,80.43,80.75,81.49,81.03,80.86,81.28,80.7,79.7, -79.5,80.16,80.35,81,80,80.81,81.45,81.53,82.7,82.75,81.36,81.1,81.4,82.07,81.9, -82.15,81.93,83.65,83.4,83.41,82.75,83.75,83.31,83.27,83,83.3,83.55,83.8,84.15,83.98, -83.98,84.6,83.2,84.72,81.99,82.43,82,81.16,79.2,79.4,77.38,75.15,74.8,74.38,74.3, -74.8,75.26,73.83,74.01,75.17,76.81,76.83,76.7,76.03,77.7,76.4,75.7,75.05,74.5,74.75, -74.58,75.04,75,75.8,77.06,76.75,75.57,77.3,77.11,76.45,75.42,76.14,76.3,77.28,76.5, -75,73.93,73.09,72.53,73.53,73.63,74.75,75.26,75.56,78,76.6,76.78,76.88,77.05,77.05, -75.6,74.68,75.1,74.23,73,75.48,76.98,77.15,79,84.51,85.76,85.9,87.35,88.28,89, -89.05,90.23,90.08,91.49,90.46,90.32,90.74,90.71,90.8,89.97,89.61,89.42,89.86,90.49,90.74, -92,91.5,92.25,92.35,92.02,91.7,92.35,92.94,93.15,92.75,92.64,92.53,92.35,91.98,92.29, -92.67,93.75,94.5,94.23,93.5,93.16,92.7,92.95,94.14,94.21,94.35,93.01,93.87,93.78,93.67, -93.65,92.68,91.5,92.3,91.98,92.7,93,92.61,94.95,93.65,94.01,95.39,95,95.68,95.78, -96.5,96.54,96.6,97.74,98.97,98.6,98.1,97.81,97.4,97.69,97.5,97.35,96.59,96.35,97, -96.8,96.92,96.3,96.85,96.1,96.2,96.43,97.7,96.88,96.55,95.65,94.5,95.15,94.94,95.05, -95.04,94.7,94.3,94.95,95.36,95.3,95.25,95.08,94.66,93.6,92.92,93,92.5,92.4,91.05, -91.25,89.55,89.33,89.4,89.8,88.58,88.33,87.36,88.22,88.4,88.45,88.2,84.3,84.78,84.75, -86.26,86.02,86.77,87.43,88.04,87.14,87.95,87,85.95,85.14,84.48,84.35,84.1,83.8,84.04, -85.35,85.7,85.4,86.4,86.2,85.94,86.6,87,86.43,85.86,84.9,84.7,84.3,84.22,84.05, -84.55,84.57,84.65,85,85,85,85.23,84.52,84.75,83.6,84.1,83.7,82.54,83.05,83.7, -84,83.48,84.38,85.97,85.3,86.7,86.87,86.45,86.25,85.88,85.6,84.85,85.7,85,86.75, -85.63,84.5,86.05,84.13,84.84,85.9,84,84.4,85,85.3,86.5,87.45,88.28,88.3,88.35, -89.71,89.95,90.28,90.1,89.28,90.4,90.2,90.5,90.25,90.49,90.05,90.23,89.9,88.64,88.75, -87.95,87.85,88.64,88,88.48,88.75,88.64,86.75,87.75,87.59,87.06,87.4,86.08,85.3,86.65, -86.79,87.25,87.2,87.6,87.75,88.1,89.75,88.02,88.13,89.01,90.01,90.3,90.65,90.75,91, -90.5,91.15,92,91.9,92.3,93.8,92.1,93.79,93.5,94,93.37,93.6,93.95,93.55,91.67, -92.07,92.67,92.99,92.39,92.15,91.57,91.6,91.27,92.86,93.05,92.57,92.4,92.6,92,92, -94.38,94.3,96.49,95.95,96.58,96.57,97.6,96.5,96.8,96.27,96.5,95.2,97.4,98.6,98.42, -99.31,99.99,99.1,100.06,99.2,98.45,99.31,98.85,100,99.38,99,99.15,98.02,98.1,99.15, -99.4,97.9,97.82,97.84,97.23,96,95,95.07,89.9,91.45,91.21,91.75,93.21,93.14,92.2, -92,92.86,92.66,93.27,93.1,92.37,92.8,93.07,92.83,93.23,93,93.85,92.11,93.43,92.7, -91.96,90.69,91.15,90.52,91.3,90.05,91.15,90.57,90.9,89.9,89.79,89.66,89.03,88.4,89.3, -88.32,89.92,89.9,91.02,90.4,89.45,90,89.55,89.4,88.33,88.52,89.68,89.9,90.71,90, -89.6,89.05,88.8,88.15,87.6,88.3,89.25,89.35,89.28,89.27,93.9,92.65,93.1,92.4,93.3, -92,90.5,90.74,91,89.55,88.75,89.2,89.25,89.41,89.4,91.08,91.5,92.24,92.45,90.63, -90.4,88.49,89.7,87.6,86.75,88.99,89.2,88.45,87,86.33,86.24,82.4,81.95,82,82, -81.65,82.85,84.25,83.39,82,83.1,82.05,81.8,81,81.65,81.45,80.87,81.05,79.69,79.7, -81.13,80.75,81.15,81.8,82.45,82.55,83.67,81.6,82.95,82,82.5,83.2,83.85,82.7,87, -86.15,86,84.1,85,86.1,86.09,84.8,84.25,83.95,81.4,83.9,84.15,83.7,83.55,82.95, -84.79,85,84.95,84.15,84.95,83.1,84.15,84.8,82.75,82.35,80,82.25,84,84,84.32, -89,87.45,87.57,87.6,84.51,85.75,86.25,85.77,86.58,88.05,89.67,89.5,90,88.78,87.55, -86.9,86.37,86.95,86.3,87.2,84.45,85.3,85.66,85.34,84.05,85.21,84.65,85.24,83.36,84.4, -81.89,83.38,80.07,78.5,80.1,79.1,79.7,80.62,82.6,82.35,82.32,79.9,78.5,79.26,81.05, -80.75,83,82,82.46,82.76,81.71,82.09,82.46,78,78.45,75.99,75.25,75.82,77.45,75.71, -77,76.7,77.6,78.9,77,77.9,78.45,77.9,79.7,79.49,79.57,79.08,78.02,76.4,76.1, -77.5,78.3,77.1,77.97,77.11,77.85,78.18,78.2,77.7,81.3,79.5,78.5,77.99,80.6,80.15, -80,81.3,83.74,87.4,88.58,87.23,88.31,85.85,84.75,85.55,83.95,81.9,80.7,78.8,77.1, -77,78.5,79.81,80.2,79.75,79.4,78.6,79.25,80.6,79.6,79.25,81.25,80.8,78.6,81, -81.5,84.9,83.41,86.72,88.6,87.71,85.9,86.15,84.63,83.95,82.05,77.95,78.24,80.8,80.38, -80.38,79.5,77.5,77.59,78.5,80,80.8,81.75,81.99,78.9,78.67,77,76.56,75.15,72.5, -75.5,74.4,74.5,73.65,71.73,72.8,66.6,67.75,61.54,62,54.65,56.05,57.78,56.6,59.5, -60.3,61.18,59.2,59.55,61.43,64.2,61.2,61.08,63.75,65.4,64.8,70.65,73,72,71.5, -74.05,76.4,74.6,72.45,73.75,72.74,72.35,74.2,75.55,75.6,76,80.4,80.4,81.2,80.95, -81.9,81.56,79.35,76.5,75.4,71.95,71.55,71.05,70.61,69.2,69,67,67.94,68.21,70.4, -70.75,70.5,70.37,68.75,68.9,66,68.25,71.25,70.96,70.5,71,69.51,68.4,70,68, -70.6,71.4,73,72.45,67.95,67.85,72.01,71.35,71.2,66.1,70.3,67.25,70,74,74.2, -75.6,76.18,74.2,75.45,75.4,77.85,77.75,78.48,80.55,79.65,78.11,80.75,82.05,80.6,81.5, -82.8,83.65,84.25,83.76,84.41,85.45,86.25,84.2,84.6,84.5,80.25,79.95,81.9,78.2,76.89, -81.7,83.1,83.75,83.85,83.91,84.71,86.7,86.05,88.2,88.35,88.95,89.9,86.97,87.05,86.35, -86.5,87.56,88.05,88.45,88.5,87.5,100.84,99.96,101.4,102,104,103.55,103.75,103.57,105.8, -106.5,105.7,106.9,106.85,107.1,106.55,107.02,108.3,105.52,104.35,104.82,107.3,105.15,104.25,103.35, -98.6,98.49,98.1,99,98.45,96.38,98.75,99.54,101.5,104.8,109,106.7,106.75,105,103, -106.64,106.7,106.25,108,107.64,106.4,104.25,108.15,109.5,108.5,108.8,110.8,114.25,114.25,119.85, -118,118.05,120,121.5,123.75,124.7,124.25,125,124.05,121.5,120.6,122.75,123.5,122.75,122, -122.05,122.7,123.89,121.9,121.51,120.15,120.8,121.55,121.12,120.4,120,119.5,120.5,116.85,114.3, -114.8,114.43,112.9,114.1,116.25,115.9,114.29,114.95,114.35,114.7,115,114.1,116.7,115.7,113, -113.1,113.96,113.05,109.6,109.95,109.15,107.25,109.6,107.8,110.5,110,108.05,106.5,105.75,102.65, -101.65,103.05,106.3,101.87,99.85,98.7,97.7,95,98.5,98.03,96.65,97.15,92.9,92.3,91.72, -90.2,91.3,94.45,94.1,91.8,90.6,94.1,96.4,94,93.9,96,97.9,100.68,101.5,100.15, -101,102.75,105.75,106.9,106.99,103.95,104,102.5,103.85,104.68,105.49,104.2,106.35,106.5,105, -103.85,103.7,105,105.8,107.25,107.8,108.5,105.35,105.9,104.9,104.75,104.75,104.5,104.85,105.7, -103.4,105.6,106.1,106.1,108.53,106.15,105.9,101.6,104.73,106.5,110.9,112.6,114.1,113.5,115.6, -113.8,113.1,111.25,113.75,112.6,112.15,113.5,116.26,113.98,115.1,115.6,117.25,116.75,116.3,117.5, -117,117.6,113.64,113.25,112.5,112.65,114,117.35,119.52,117.5,117.8,119.7,117.95,115.07,115.8, -112.5,113.5,111.2,113.75,118.5,116.2,117.25,116.2,112,114.6,118.3,115.85,116.4,116.8,114.95, -112,113.4,114.01,114.35,112,103,97,96.2,96.4,101.5,97,98.5,98,95.8,90.45, -94.6,97.45,96.5,94.46,97.9,94,95.25,93.5,89.12,88.45,91.6,91,93.9,96,95.4, -95.1,97.9,105,107.17,107.45,106.25,102.81,104,99.3,102.95,104.9,105.8,107.5,106.5,109.55, -114.55,114.55,116.8,113.75,114.15,110.55,114.03,116.91,113.4,112.23,109.4,112.75,112.4,115.75,115, -112.5,109.62,110.12,109.06,109.56,109.5,107.5,104.37,95.37,93.75,93.69,92.94,92.5,94.44,93.5, -93.94,94.75,83.75,84.5,86.94,83.5,84.75,89,84.5,85.5,85.87,90.19,88.37,90,92, -94.87,95.25,96.5,98,95.06,101.75,100.44,96,94.44,98,97.75,98.75,100.44,99.37,98.5, -103.25,101.5,98.31,99.25,99.5,99.25,91.81,98,96.75,103.62,101.12,99.87,102.5,99,98.44, -93.75,93.5,93,88,90.5,93,94.75,95.12,98,96.75,111.94,111.5,104.19,114.25,111.87, -116.62,115.94,114,113.81,110.37,118.87,112.62,115.5,117.37,120.06,120,124.5,123,124.19,124.69, -122.75,125.25,126.81,128,123.12,124.81,127.87,132.5,131.88,130.88,132.81,133.06,131.88,130.75,131.5, -129.88,124.31,123,120.31,121.19,121.06,122.37,119.75,121.06,122.06,120,119.75,118.75,119,115.69, -116.62,116,113,111,112,110.5,111.12,109.87,111,113.25,114.12,117,112,102.37,104.12, -104.44,103.75,105.44,103.19,103.25,104.69,102.69,105,105.62,108.75,112.69,111.75,110,111.62,113, -113.5,114.12,115.56,120,113.5,116.31,116,118.87,118.87,119.12,119.87,119.37,112.5,112.25,108.44, -109,107.56,110.5,107.75,105.5,110.5,106.5,109,106,106.06,106.12,107.5,105.12,104,103.75, -104,105.5,110.5,108.06,106.62,109.12,110.5,111,112.5,112,109.5,112.5,106.5,102,105, -109.75,112.25,103.87,109.81,112.5,119.62,121.62,124.75,123.5,123.5,120.5,121.5,120,122.62,118.87, -122.31,125.75,125,115.37,115.87,114.5,112.81,110,108.25,109,107.5,107.75,104,107.62,106.5, -103,106,109.94,107.25,100.5,102,105.56,104.62,109.87,108.81,110.5,112,115.25,116.5,116.5, -115.87,116,119.06,117.69,119,116.94,116,118.19,115,112,112.37,111.37,112.75,118,119.06, -116.75,121.87,121.87,123,115.56,119.69,120.94,119.94,119.62,117.87,117.25,117.25,118,112.94,114, -112.44,109.19,109.69,110.44,109.56,109.69,109.12,109.87,108.5,109.06,110.69,108,107.75,110.19,108.12, -111.62,120.5,116.25,117,113,109.81,103.44,102.56,103.69,104.94,105.94,105,108.81,105.5,99, -94,94.87,94.62,96,96,97.5,94.62,95.06,90.5,92.75,94.44,95.87,96.75,98.5,97, -94.5,95.5,94.87,94.25,93.75,93,108.62,107,108,106.44,106.5,110.81,114,113.5,115, -119.12,122.25,122,118,121,121,122.06,123,126.62,120.5,127.5,127.19,128.75,126.5,131.38, -132,134,132,134.63,137.5,132.5,131.5,128.88,128.38,126.5,125.62,124.37,124.25,125,122.62, -122,123.37,122.75,124.37,123.87,128.38,128.5,125,122.75,123.75,120.12,121.5,123.62,122,120, -120,122.75,124,125.94,126.25,126.37,125,123.62,124,127.62,127.5,132,136.5,136.38,138, -138.31,135.75,137.44,134,132.5,131,132.5,130.88,130,124.81,123,124,123.31,123.12,122.25, -123.87,122.87,120.19,119.25,119.87,117.5,115.87,115.06,115.87,116.62,119.87,118.12,113.62,114.56,111.75, -113.62,116,116.69,223,222.5,230.31,232.75,235.63,238.25,238.25,236,241.5,234,221.13,220.5, -217.25,211.25,211.88,212.13,212.25,208,208.5,205,209.25,212,204.75,193.38,197.25,169.75,167, -170.88,177.5,179.5,182.75,184,183.5,185.63,186,184,183.13,179,177.31,180,177,175, -171.06,172,168,167,168.69,176.63,177.5,179.5,182,179.19,182.69,182.38,181.63,179.88,178.63, -173.88,173.5,168.5,170.5,169.5,171,172,177.25,178,172.25,174.38,172,170.5,175,176.25, -170.25,162.5,167,167,170.44,175.19,175.88,179.56,184.5,178.69,179.5,186.81,183.75,182.25,184, -197.63,195,187.75,182.25,183.63,183,190,189,191,187.94,190.31,183,185,186.75,186.88, -188.63,186.5,184.75,182.69,177.5,171.56,166.63,165.44,166.88,163.5,166.5,164,169.31,168.06,168.19, -164.44,164.63,168.25,168.94,163.5,169.75,166.63,165.13,165.5,161,158.88,159.5,158.06,159.38,158.63, -157,156.69,157,150.88,150.75,148.88,147.69,148.88,148.5,148.44,149.5,148,144.63,145,141.31, -141.5,140,140.13,140.63,135,137,130,127.75,130.5,130.13,124.44,120.75,119.5,124,123.75, -124.12,125.06,130.75,133.75,134.5,130,131.56,128.75,129.38,120.12,126.75,127.5,130,129,128, -121.37,122.12,125.75,124.94,122.5,118.75,121,113,123,125.25,128.75,127.25,129.13,128,127.5, -129.5,129.5,127,125.12,126.62,127.56,128.75,126.12,128.88,131.75,127.81,127,134,134,133.25, -128.63,127.94,126.25,123.75,125.87,127.19,126,128.25,121,118.56,117.12,119.25,119.75,118.5,118.25, -114.75,113.75,113.62,115,116.56,116,114.12,114.12,112.37,112.5,111.87,110,106.25,108.75,109, -111,111.87,114.62,115.87,117.5,118.75,119,118.75,116.75,114.25,116,117.19,117.37,120.56,120.25, -119.31,122.37,123.62,123.5,125.25,125.62,124.75,125.62,123.37,120.25,118.25,120.19,116.94,117.5,118, -116.69,117.12,115.94,116.06,115.69,116.12,116.25,116.75,114.5,118,114,107.94,107.44,109.37,107, -105,106.56,105.62,104.75,105.75,106.25,105.62,104.31,103.87,104,104.12,105.25,105.87,105,102.25, -101.56,103,101.69,100.62,101.31,99.69,100.87,99.19,97.87,97.37,97.12,99.12,100.19,102,100, -104.19,104.81,104.75,102.56,102.62,103.44,103,103,102,103.06,102.69,101.87,101.62,98.06,98.12, -99.12,99.12,99.12,100.12,100,98.31,97,97.12,96.75,99.25,99.81,99.81,100.25,105.19,104.87, -103.19,103.5,100.56,98.25,104.31,103.5,105,105.37,105.56,104.5,104,103.69,102.87,99.37,100.12, -102.44,104.75,99.25,102.19,105,101.12,101.5,103,103,109.44,111.5,112.87,109.5,110.62,110.5, -112.12,110,109.12,107.5,104.12,104.94,105.25,104.06,102,103.69,103,99.94,97.5,98.37,98.12, -100.75,99,102.62,102.5,101.12,99.12,98.37,96.5,100,89,97.25,102.25,102,105.25,101.62, -95.81,98.12,102.37,102.12,104.06,105.5,104.37,104.31,106.81,106.5,105.06,106.87,103.81,106.12,104.75, -102.37,102.81,101.69,103.87,104.06,102,98.94,100.12,100.25,97.25,98.12,97.94,97,100,103, -103.94,104.94,103.56,103.81,101.37,100.56,102.75,103.19,103.37,106.37,102.5,107.5,107.62,104.75,101, -103.31,104.56,105.81,103.37,104.75,106.31,108.5,106.44,106.5,104.56,105.5,106.12,102.87,104.5,106.5, -107.94,105.62,104.37,100.5,105.25,100,97.81,95.75,94.87,95.62,95.81,94.69,96,94.5,95, -94.87,91.62,90.25,92.25,91.25,91.81,91.87,89.75,89.87,89.87,89.12,89.37,89.75,88.75,88.25, -86.25,86.25,87.12,86,83.5,84,85,86.37,87.75,85,90,90.5,174,173.38,175.13, -174.75,168.5,169.88,173,174.13,174.25,174.75,168.25,168.75,164,164.38,165.88,162.88,161,160.5, -157.88,152.38,149.63,152.25,150.5,140,137.25,139.63,138,137.38,137.38,138.63,134.5,132.25,133.75, -138,132.25,130.75,127.25,132,136.88,137,137.25,140.5,136.5,136.88,132.63,136.88,138,138.63, -139.88,142.75,143.63,144.75,146,146.38,144.75,147.25,145.63,145.88,145.63,143.75,143.13,146.88,147, -144.38,137.63,140.75,143.13,145.25,145.5,146.38,145.13,144,143.38,148.75,148.5,149,153.63,154.75, -157.38,157.63,157.75,153.5,149.88,151.38,151.88,158.88,159,166.38,164.88,165.13,164.75,166.38,165, -163,160.5,159.75,164.13,160.88,159.38,155,153.75,153.75,155.25,155.63,157.38,154.13,154,158.13, -159.75,152.5,148.38,153,152.25,158.13,155.25,161.5,156.63,154,161.38,162.88,163.63,159.63,158.13, -158.25,157.5,158.13,154.13,153.13,153.38,146.88,144.75,137.63,134.63,133.5,135,134.38,133.38,133.13, -130.63,129.75,127.37,128.88,126.5,125.75,127.5,126.62,126.37,129.5,126.5,129.63,128,125.5,128.75, -129.5,130.75,129.88,128.5,125.5,129,128,126.87,125.87,125.75,124.25,124,124.87,124.75,126.25, -124.5,124.25,122.25,123.62,124.25,124.37,123,122.12,118.12,118,116.75,117.62,116,113.5,114, -115,113.25,114.62,115.12,114,112.62,113,112.12,112.75,110.5,110.12,109.87,111,111.62,109.37, -111.62,112,113,111.62,110,109.25,108,108.37,108,107.12,105.25,103.5,103.12,96,89.62, -92.5,93.37,94.5,94.25,97.87,92.25,94.5,95.62,97.62,98.75,98.75,98.12,97.87,99.75,101, -99.25,99.12,98.37,99.75,99.37,99.62,100.75,102.25,101.75,102,101.87,103.37,103,103.62,103.25, -102,96.5,104.87,106,105.37,106.37,107.62,106.87,107.75,109.25,109.5,109.87,110.75,111.87,112, -109,108,109,108.25,106.37,107.37,105.75,105,107,108.5,108.25,108,107.75,110,107.75, -108.5,107,107.62,107.5,106.87,105.75,105.62,116.75,115.12,112.62,115.25,116.37,117.75,119.75,115.62, -119.87,117.5,111,112.12,110.37,111.87,111.12,108.37,114.87,115,117.5,120.87,124.75,120.62,116.87, -116.5,114.5,115.62,113.87,115.5,117,119.75,117.12,118.75,121.62,125,127.62,125.12,123.87,125, -121.75,119,116.75,118,114.37,113.87,114,114.12,113.37,112.37,114,112.87,109.37,109,108.75, -108,106.5,104.75,103.87,107.62,103.12,100.75,101.5,96.62,90,86.75,84.12,86.5,87.25,88.12, -86.62,89.12,88.62,86,89.12,91,91.37,90.37,91.12,91.75,92,90.87,89.87,92,89.12, -90,92,94.75,95.12,96.37,97.12,95,95.25,96.25,96.87,95,97,97.25,97.25,95.75, -96.5,95.25,94.75,93.12,95,95.37,95.62,95.62,96.87,97.5,97.5,99,99.12,99.5,101.25, -100,97,97.25,98.37,97.5,95.87,96.25,98.5,98.87,95.62,98.25,96.87,97.87,92.5,92.5, -94,93.25,91.5,90,93.87,95.25,93.87,94.25,93.5,95,94.25,94.87,92.62,93.25,94, -93.87,95.75,97.62,94.62,92.5,92.75,95.25,97.5,96.12,98.25,100,100.5,102,103,102.75, -102.5,103.12,102.12,103.75,103.75,106.62,108.12,107,111.37,113.87,112.37,112.12,111,109.25,109.5, -109.87,110,108.87,109.12,109.12,106.5,110.62,109.12,110.62,110.87,109.5,109.12,107.5,104.12,104, -102,105.25,107,104.12,102.62,101.75,100.37,100,100,98.62,97.12,97.87,96.25,97.75,96.37, -95,98.12,98.5,97.5,97.37,98,93.87,93.37,93.12,93.62,91.87,91.37,90.5,89.62,90.12, -90.75,92.37,91.75,93.62,93.5,92.37,95.62,96.62,96.25,97.5,95.5,93.5,92.25,94.62,95, -94.25,94.5,93.75,93.5,93.87,94.12,92.75,94.25,94.75,93,91.62,93.87,96,94.87,93.12, -93.12,91.5,89.37,89.62,87.87,88.12,87,86.87,86.5,85.87,84,83.75,84.37,82.87,83.12, -82.25,82.12,83.12,84.25,84.87,83.87,83.62,81.5,82.12,83.5,82.75,83.5,81.75,81.25,82.25, -81.5,80.87,80.37,79.75,80.37,79.5,77.12,75.37,75.12,74,74.62,74.25,74.75,74.25,75, -75.75,75.87,75.62,75,75.12,75.12,74.25,74.12,74.25,74.37,74.87,73.62,72.37,72,72.75, -72.75,72.37,72,74.12,74.5,76.37,77.12,77.62,77.25,76.37,76.75,75.87,77,76,75, -74.25,74.37,73.87,73.5,74.25,73,74.37,74.12,73.62,73.62,71.12,71.37,70.5,70.87,70.37, -69.5,70.75,71.12,69.62,71.12,70.75,71.25,71.62,69.25,70.62,71.12,70.62,70.87,70,69.25, -72.75,73.25,73,73.25,73,72.87,72.75,72,73.5,73.75,71.62,71.37,73.37,74.5,74, -74.37,75.62,74.12,74.5,74,72.62,74.62,74.62,75.5,74,73.5,72.87,72.5,73.62,71, -71.75,71.25,68.87,69,68.12,69.12,69.37,69.25,68.37,69.12,68.87,69,69.37,69.75,71, -69.87,70.62,69.75,69.5,69.12,68.75,67.5,66.87,67.25,67.5,67.12,68,66.87,69.25,69.37, -69.75,69.37,67,67.37,67.87,67.5,66.37,65.37,64.87,64.5,63.75,64.75,64,64.5,63.38, -62.75,62.75,63,62.38,63,61.88,62.63,62.38,62.25,62.5,61.38,62.25,59,55.75,56.75, -57.25,57.75,57.5,56,55.75,56.88,56.5,57.38,56.5,57,59,60.38,60.88,61.5,59, -60.75,61.88,61.38,61.75,61.88,62.63,63.25,64.5,63.88,62.38,62.25,61.5,62.88,62.75,61.25, -61.75,63.38,63,63.5,63.88,63.25,63,62,62.13,61.38,60.88,61.63,58.63,57.63,57.5, -57.63,58,57.63,56.5,56.5,57.38,58.25,58.13,57.5,57.38,57.88,58.88,58.5,58.38,55, -53.25,53.5,52.88,53.88,52.5,52.88,53.75,52.63,52.88,53.25,53.5,53.5,53,54,52.5, -53.63,54.38,56.5,56.88,57,58,56.88,57.88,58.25,57.63,57.75,56.13,56.13,55.5,55, -52.13,53,53.25,52.88,52.75,52.88,53.13,53.38,53.25,53.75,52.63,52.63,54.88,55.25,54.38, -53.38,52.5,53.38,53.88,54.75,52.38,55.5,56.25,56.5,56.88,57.88,58.13,56.63,58.75,58.88, -55.75,55.13,55.88,56.75,57.38,58.5,58.75,58.25,58.75,59.13,58.88,58.5,60,59,58.13, -56.88,56.63,58,58.5,58.88,58.63,59.25,58.75,58.25,59.25,57.75,57.25,56.13,57.25,55.88, -54,53.88,53.88,54.13,53,54,53.25,54.75,54.5,56,55.5,54,52.38,51.88,52.25, -52.25,53.5,51.13,51.63,52.25,50.25,49.5,50.5,50.25,49.75,50.25,51,49,46,46, -45.75,46.38,45.75,43.88,45.38,43.63,43.38,44,44.5,43,43.13,43.5,44.13,44.25,44.38, -44,43.5,44.38,44.25,42.13,41.63,41.75,41.75,41.75,41.88,42,42.25,42.5,43.25,43.25, -43.5,43.5,43.88,43.88,44.63,44.25,45.25,46.13,46.25,46,45.75,44.75,44.13,43.88,44.13, -44,44.5,43.13,43,43.13,43.38,41,41.63,42,42.5,43.5,43.13,43.38,43.63,44.13, -43.38,44,44.38,43.63,44,46,44.88,41.88,43.63,43.75,43.13,43.63,45.63,47.5,47.38, -47.5,48.13,46.88,46.75,46.88,46.88,48,48.5,49.63,49.5,50.38,49.88,49,48.63,49.25, -49.13,50.13,49.63,50.13,49.5,51.88,52.25,52.88,52.75,53,52.25,54,54,54,51.75, -53.25,53.13,53.25,50.5,49.88,48.63,48.75,49.38,49.13,47.75,47.88,47.5,47.5,48.25,48.88, -48.88,48.13,48.5,49,49.63,49.13,48.88,49.88,48.75,48.38,48.13,48.13,48.88,50,49.88, -50.25,49,49,49.13,51,50.75,52.25,51.25,52.63,52.63,52,51.5,50.25,52,52, -50.63,50.75,53.38,53.38,53.5,54.5,54.63,55,55.13,56.13,54,55.88,56.88,56.13,55.5, -55.38,55.25,54.38,54.63,54.75,54,51.75,51.13,51.5,50.5,50.63,51,50.25,50.5,51.13, -51.88,53.63,53,52.25,51.75,51,52.5,52.25,52,51,50,49.13,52.88,48.75,46.5, -47,48.25,50.25,48.88,48.25,48.38,49,48,46.75,46.75,48,48.88,50,51.75,50.13, -50.38,50.13,52.88,51.38,51.63,50,51.25,53.13,52.13,53.63,59.88,62.38,61.75,61.63,64, -65.5,67.25,67.37,67.87,67.75,68.37,67.87,65.87,65.37,63.75,62.38,61.38,63,64.12,64.87, -64.75,64.87,65.12,65.62,67.62,66.25,65.37,67.12,69,68.5,67,66,67.37,65.75,67.12, -68.5,68.5,68.75,68.62,69.25,70.12,72.87,73.25,78.37,78.75,78.62,79.37,78.87,79.87,79.12, -78.12,80.25,81,80.37,82.25,82,82.5,83.75,83.37,84.37,83.87,83.37,83.25,84,87, -88.62,87.25,87,86.25,85.87,86.25,87.75,87.5,86.62,87.5,87.37,86.75,87,85.37,85.62, -86.37,86.62,88.25,88.62,88.87,88.37,88.62,88.12,88.37,87.25,88.37,90,92.62,94.75,94.5, -94.87,94.37,94.62,92.62,92.75,92.62,92.75,93.5,93.12,93.25,97,99,98,97.87,98, -97.75,97.75,96.75,98.12,97.12,98.25,97.87,98.62,97.87,96.75,97.62,96.37,95.5,94.75,95, -93.37,92.87,94,92.5,92.5,90.5,90.5,91,90.37,88.62,89.62,90.62,90.62,90.5,91.37, -90.87,90.37,91.25,91.5,91.37,92.37,90.87,91.62,91.37,92.12,93.5,93.75,93.5,94.12,92.75, -94,92.5,92.5,91.25,88.5,88.87,88.12,87.87,89.12,90,89.87,89.62,88.5,88.5,88.75, -89.5,86.12,85.62,85.37,82.62,83.37,82,82.12,83.25,83.5,83.37,83.37,84,85.37,85.12, -85.75,86,85.87,85.87,87.37,88.75,89.25,90.25,87.62,87.87,87.75,86.37,86.75,86.75,88.25, -87.62,86.87,88.37,88,88.37,89.25,89.87,89.75,89.75,90,90,90.5,92.75,90.5,89.75, -89.62,90,90.37,91.75,91.12,90,91.87,92.12,92.75,93.87,93.5,93.62,95.5,92.87,95.25, -96.25,95,95.12,94,90.37,90.75,91.37,92.62,94,92,91,90.25,89,90.12,89.75, -88.37,88.25,88.25,85.87,86,85.62,85.5,86.75,87.75,88.75,88.5,87,85.37,89.37,90, -90.12,91.37,91.75,91.12,93.87,96.62,95.62,95,95.37,95.12,97,96.62,96.87,100,99.12, -98.62,100.25,100.12,101,98.37,96.75,97.25,97,98.37,100.12,99,98.37,98.25,98.25,98, -98.62,100.25,100.25,100,101,103.75,101.87,99.25,100,97.62,97.75,99.12,98.37,99.12,100.87, -102.5,103.62,102.37,104.62,104.5,105.62,104.87,104.25,104.87,105.37,104.5,103.37,102.87,103.62,102.37, -100,101.25,99.5,98.25,98.62,98.37,97.75,95.75,94.75,95.12,95.25,95.12,94.37,95.62,96.12, -96.25,93.25,98.37,98.5,99.37,99,98.87,99.25,99.12,100.37,100.25,100.37,101.5,101,101.87, -101.75,100.5,100.62,101.25,100.75,102.75,101,100,96.62,96.25,99.5,99.5,99,98.87,99.87, -100.37,98,98.12,98.75,98.25,97.62,97.25,98.75,99.12,98.62,99.12,99.25,98.75,100.25,99.75, -99.62,101.37,101.37,101.87,102.75,102.37,102.87,103.12,105.37,105.62,106,104.37,103.62,104.62,105.25, -104.62,104.5,102.25,103.62,104.12,103.62,103.75,105,105.5,103.62,105.87,104.25,102.12,103.37,102.37, -105.5,103.75,102.5,105.5,107.75,108,108.37,108.37,109,108.75,109.25,110,109.62,107,108.25, -111,111.12,111.37,112.75,112.37,114.12,113.62,113.37,112.5,113.87,114,114.37,113.5,111.87,112, -114.75,115,118.75,126.37,127.75,129.25,127,128.88,130,133.13,132.75,134.38,130.63,131.25,128.25, -131.25,130,132.75,134.25,135.63,138,138.25,137.25,135.5,134.88,132.38,131.5,129.88,128.88,130, -128.13,127.25,126.25,126.5,126.62,124.75,124.12,122.5,121.12,120,117.87,119.37,116.75,115.25,115, -107.25,106.87,106.87,107.87,107.62,109.75,110.37,111.37,112.75,112.37,112.87,113.37,113.62,113.25,114, -113.87,114,112.25,113,111.5,110.87,112,114.37,112.87,113,112.25,111.5,115.87,114.12,113.37, -114.5,111.62,112.5,113,113.87,112,113.87,113.25,114.75,114.12,113,113.25,112.5,113,110.87, -108.5,106.5,108,107.87,107.37,107.25,105.37,106.5,106.12,106.5,107.37,109,106.75,107.37,107.62, -105.25,102,99.5,99.37,100.62,101.75,103.75,105.62,108.37,108.75,106.5,107.37,108.25,109.5,107.12, -103.12,105.75,106.5,105.25,106.25,107.62,108.12,107.87,105.25,104.25,104.87,107.75,108.37,106.37,106.5, -101.87,102.87,102.87,101,101.62,103.87,103.5,103.87,103,98.5,96.75,100.75,100.62,102,103, -104.25,105.12,103.62,101.5,103.25,103.5,103,104.62,103.87,109.25,109,111.87,112.37,110.75,112.75, -114.62,114.5,115.87,117.75,120.12,119.62,120.87,122.5,122,120.62,119,118.12,119.25,118.12,117.12, -117.5,118.62,117.5,117.62,118.25,116.87,117.62,116.62,119,118,118.75,118.87,120.25,120.37,121.25, -120.5,120.12,118.62,120.87,121.25,120.37,120.5,119.5,120.5,119.75,120,117,117.62,118.75,117.5, -117.5,115.12,115.87,115.87,115.25,113.87,114.12,113.62,111.37,110.75,110.5,110.5,108.62,109.5,108, -109.5,107,109,109.87,109.25,109.62,109,109.37,109.5,110.87,110.5,110,107.12,106.12,105.25, -105.62,106.25,106.75,106.62,106,105.12,106.37,106,104.25,103.62,105.5,106,107,108.5,108.87, -108.12,107.75,106.62,106.87,107.5,106.5,107,106,106,105.25,104.87,104,103.75,103.62,104.12, -103,102.75,105,102.25,102.62,104.5,104.12,103.37,101.87,102.37,102.87,103.62,100.75,99.62,97.62, -97.87,98.62,98,97.37,97.37,96.12,97.87,95.75,97,98.75,99.75,98,100.37,97.5,97.62, -98.62,99.5,99.5,100.5,99.25,99.87,99,98.75,94.75,94.25,94.87,94.75,95.12,95.25,94.5, -94.87,93.62,94.62,95.25,95.12,96.87,96.12,96.62,98,98.87,99,101.75,97.37,97.62,97.5, -98.5,99.12,100.5,100.25,99.62,99,99.12,97,98,98.37,98.75,98.37,97.87,96.87,97.62, -96.5,98.12,97.87,99.12,100.25,100,100.5,100.25,101.12,101.75,103.25,104.25,104.12,103.5,101.75, -102,98.5,107.37,107.62,108,109.25,107.75,107.5,108.75,106,108.12,109.37,109,111.12,111, -116.75,116.75,116.37,116,116,116.37,115.62,115.62,115.37,117,116.12,115.87,115.87,117,117.62, -117.5,116.87,117.25,116.5,117.75,116,116,113.87,113.87,113.12,115,114.75,115.5,116.25,116.5, -115,118,116.87,118,117.87,116.5,113.37,112.75,114.75,115.5,113.62,113.25,112.5,111.37,113.62, -113.87,112.5,114,115.25,116.12,114.5,114.75,114.75,113.62,115.5,112.37,111.87,112.37,111.75,112.5, -111.75,113.12,114.25,112.5,111.25,110,109.62,109.87,110.25,109.62,108.87,110.37,111.25,109,107.5, -109,109.62,109.75,109.12,110.12,110.5,109.5,108.12,109.62,109.62,109.5,109.5,109.25,111.62,112.25, -110.75,111.37,112.5,110.87,111,109.87,110,109.37,109.12,111.25,110.5,112.25,113.62,113,114.62, -114.62,114.5,114,113.5,112.5,112.62,112.5,112.25,110.75,110.5,110.75,111.87,110.25,109.5,107.75, -107.37,107.12,108,109.25,109,109.62,109.75,110.62,109.5,109.75,108.25,110.37,111.12,115.62,117.37, -117.75,119.25,118.12,118.25,119.62,119.62,121,121.37,120.62,119.75,122.12,121.75,121.25,123.37,122.75, -125.25,125.62,125.87,126.87,124.87,126.62,125.75,125.75,126.37,128.13,126.25,127.25,128,128.75,129.75, -128.75,127.37,126.75,123.12,124.25,122.37,123.5,124,124.87,123.87,123.87,123.62,123.12,122.5,121.12, -122.12,121.62,122.5,122.5,121.5,121.87,123.5,122.5,123,123,123,122.87,123.12,123.87,121.25, -121.25,121.37,120.37,120.25,120.5,119.62,120.62,121.87,120.87,119.5,117.62,118.37,119.25,119.37,116.25, -116.75,117.25,115.5,115.5,115.87,115.75,117.5,117.25,117.25,119,119.75,119.5,119.62,120,120.37, -122.87,123.62,122.87,120.25,120.75,121.25,122.5,123.25,124.62,124.62,122.62,124.25,121.25,119.62,119.87, -117.87,117.75,116.25,116,115.25,113.37,114.12,114.87,115.12,115.37,114,113,112.37,113,112, -113.12,113,112.62,113.75,113.5,114.87,115.75,112.75,114.87,112,111.62,113.25,113.75,111.62,111.12, -113.37,113.62,112.75,111.62,111.75,111.37,111.12,113,114.87,114.75,115.75,115,117.62,118.62,119.37, -121.25,123.62,123.75,123.62,125.5,125.75,126.5,126,124.5,121.75,122.87,122.5,120.62,121.5,123.5, -124.62,125.12,125.62,125.5,125.37,125.37,127.12,126.75,127.25,126.62,129.13,126.37,127.75,127.5,127.75, -125.12,125.25,126.25,123,123,117.87,116.87,117.25,117.75,118.5,119,116.37,115.87,116.37,114.12, -114.25,113.62,112.87,113.12,113,108.25,108.12,108.75,109.5,109,109.75,110.62,108.87,110.25,112.25, -110.5,109.25,108.87,109.87,111,110.5,111.25,111.5,114.75,114.37,113.62,113,113.5,114.37,114, -114.25,112.75,113.25,113.12,114.5,113.62,111.75,114.25,114.87,113.37,112.37,109.5,109.62,107.87,107.87, -107.5,104.62,106.5,108.75,106.75,109.62,110.25,113,113.87,113.5,114.62,115.25,114,115.12,115, -114.25,116.25,117.62,117.75,116.37,116.25,117,117.75,117.87,116.25,114.75,116.25,115.62,115.37,113.12, -112.5,112.75,113.62,112.62,111.25,111.62,109.5,108,107.25,108.75,109,109.87,109.62,112.75,114.12, -113.5,112.12,112.75,110.75,111.37,110.75,110,115,118.87,118.37,115.62,114.5,117.5,116.25,123, -121.75,122,122.5,117,115.5,116.37,116.25,117,119.62,118.87,117,117.12,115.5,119,116, -115.37,110.37,111,111.75,111,109.5,108.25,105.75,110.5,111,112.5,112.25,116.5,118.37,118, -117.12,115,118,118,119,123,122.12,122,119,116,119,123.75,119.5,120.75,122.75, -121,123.87,118.75,118,118,117,118.5,116.5,123,115,135,141,143.38,146.75,151.25, -147,151,152.63,151,155.75,155.5,155,151.25,149.25,152.5,157,156,153.63,155.13,150.63, -156,158.25,157.75,156.63,162.25,162.25,158,158.25,156.75,160.13,162.25,163.25,162.75,168.63,166.63, -166.13,167,168,174.75,174.63,175,173.25,172.5,173.5,173.5,172,170.63,169,167.25,164.63, -163.13,160.25,159.88,159.38,159.5,162,161.13,160.88,162.75,161.38,160.13,162.25,162.75,163.75,165.5, -168.5,168.63,167.13,169.88,167.25,166.63,165.88,165.13,164.63,165.5,164.5,162.88,165.63,165.75,167, -167.38,164.75,163.75,162,160.75,160.63,162.25,159.63,158.25,159,159,160.63,161.63,159.75,160.75, -160.13,158,159.5,161,163.25,161.38,160.25,158.5,158.25,158.25,156.5,161.5,159.75,163.5,167.25, -165.5,162.63,165,165.5,165.75,166.88,164.38,160.13,160,158.5,156,155.5,150.5,153.25,154.5, -156,149,150.25,151.25,151,148.75,147.63,143,147.25,147.25,149.13,150.13,147.25,151.38,149, -153.25,146,154,156.5,152.88,149.88,149,147.63,146,147.88,144.38,144.38,144.75,141.75,144.25, -139.75,138.75,140.38,140.63,138.38,137.75,139.5,140.13,141,142.75,143.13,139.75,139.13,138,139, -134.38,132.63,135,133.38,133.5,135.5,136.88,134.25,133.5,132.75,128.25,128.63,130.75,130,127.87, -126,127.62,122.75,122.25,126,119.62,120.62,118.87,116.12,118,120,122,123.25,122.75,123.87, -122.75,121,121.12,120.5,121.75,121.75,120.75,122.25,124.5,125,126.62,127.5,127.5,125.5,128, -128.38,127,128,126.87,128,128.88,129.88,127.87,126.5,127,127,124.87,123.62,123.25,123.87, -120.37,122.12,120.62,120.25,122.87,124.25,123.25,121.5,120.87,122,124.62,125.5,124,122.12,122.62, -120.37,122.12,121.12,121.87,120.62,121.37,120.87,120.87,120.75,123.37,120.5,121.5,124.5,122.37,127.5, -126.5,133.5,131.25,133,132.63,134.88,134.5,134.25,135.13,137.5,139,138.63,137.25,137.5,136.88, -138.63,136.75,138,139.25,142.5,144.13,145,141,139.5,136.38,135.5,138.88,139.88,139.75,141.38, -139,139,138,139.63,136.88,135.75,133.63,134.5,133.88,133,131.38,129.75,130.75,130.25,130.75, -131.75,130.75,132.63,132.25,131.13,132.5,134.25,133.38,133.5,133.5,131.75,130.75,132.13,132.5,135.88, -138.5,141.13,145,144.25,144.25,143.5,148,150,148.63,146.5,147,147.13,147.63,146.88,145.63, -146.88,145.25,145.88,146.88,148.63,149.88,148.75,149,148.63,146.75,149,150.5,150.38,152.75,152.38, -152.75,152,150.63,148,144.75,143.88,144.88,146.38,145.25,145.25,145.25,147.75,148.88,150.13,149.88, -148.63,150.38,153.25,155.88,154.5,157,156,159.5,161.75,159.88,159,155.75,152.5,154.88,152.88, -154.75,154.5,153.75,152,151.25,151,149.5,152.63,150.5,148.25,149.63,151.38,148,151.88,149.75, -148.5,147.5,148.75,150,150.5,151.75,152.38,150.88,149.75,150.75,148.38,152,149.38,146.5,146, -149,148,152,150.38,156.75,156.38,157.5,158,159.5,160.25,157.13,158.63,156.88,155.75,154.88, -156.75,156.63,155.88,152.5,155.25,153.75,155,151.88,149.38,150.75,151.75,149.75,151,148.13,144.25, -149.38,149.75,149.75,156,153,149.5,149.75,148.25,150.88,148.25,156,154.88,154.63,152.38,154.75, -158.75,156.25,153.88,152.88,153.88,154,154.5,152.63,152.5,153.13,150.38,149.25,148.88,146.63,144.63, -142.38,140.5,141.75,138.88,137.75,139.75,140.75,139.13,139.13,139.5,140.13,139.5,138.13,139,136.88, -136.38,134.88,135.63,134.88,132.88,132.13,132,132.88,132.5,131,129.63,130.75,131,129.63,127.5, -128.38,130.88,129.5,127.75,127.75,128.75,129.25,128,128.38,125.87,124.5,124.37,124.37,124.5,123.37, -123,124.37,126.87,124,124,123.75,126.87,127.87,128.25,127.62,127,126.75,128.38,127.87,127.5, -127.37,127.62,129.5,129.5,128.63,127.5,127.25,126.62,127.5,128,128.5,128.63,126.62,126.87,128.38, -127.75,126.75,125.75,126,127,126.87,127,127.12,128.38,128.5,129.13,131.5,131.38,132.25,131.75, -130.75,129.38,132,130.25,129.13,129.38,129.75,129.13,128.88,128.5,130,126.12,124.25,123.62,123, -121.12,123.12,124.5,124.25,124.37,124.87,123.75,124.37,123.75,122.25,121.75,119.25,118.5,119.37,119.87, -120,120.5,119.5,119.87,125.75,128,127.37,129.88,128.25,130.38,129.25,129.38,127.25,129.5,130.13, -131.38,131.25,132.38,132.75,132.63,132,128.75,128.75,127.87,130.63,130.25,128.88,127.37,125.75,125.12, -125,125.25,125.87,126.37,126.37,126.87,128.75,128.25,129.13,127.5,128,127.62,130,130,129.38, -127.87,127.12,126.5,125.5,124.37,126.87,126.5,127.5,128.38,127,126.87,127,125.62,124.37,128, -128.63,129,129.38,128.63,128.63,129,129.5,131.5,131,129.88,130.5,132.38,135.13,135.38,136.25, -134.5,132.75,134.13,133.38,132.75,133.63,133.5,132,131.5,132.25,134.25,131.75,131.5,137.25,137.25, -135.88,135.25,137.63,135,135.63,136.25,137.5,134.5,133.5,133.13,132.63,129.5,129.25,124.75,123.62, -124.37,124.87,125.25,122.75,123.62,119.87,119.87,120.12,120.37,120,120.37,122.37,123.87,123.12,123.75, -123.75,123.37,122.37,123.25,123,120.25,117.75,117.87,118.75,119.12,118.37,117.12,118.5,117.75,120.25, -120.25,121.25,121.62,122.87,124.87,123.12,122.87,121.5,121.12,120.25,121.62,123.12,123,122.75,123.75, -123.25,125.37,125,127,126.62,125.87,126,125.75,125.5,125.12,124.25,124,126.75,126.25,126.12, -125,127.75,122,120.62,122.37,121.5,120.75,121.75,120.87,122,120.87,122.37,121.75,121.87,122.75, -123.75,125.5,125.25,124.12,123.87,124.37,125.62,125.62,126.37,127.37,126.25,126.87,123.25,122.5,122.75, -121,123.87,123.12,122,123,123,124.75,125.5,125,124,125.12,124.12,126,123.75,123.12, -123.25,122.25,121.12,122.75,120.62,124.25,118.62,120.5,120,120,117.25,113.5,111,109,108.75, -108.37,107.12,105.5,106.37,105.5,106.5,107.37,107.87,107.12,105.75,105,105.25,106.5,107.12,106.12, -105.75,107.25,106.12,105.75,105.25,103.12,104.12,105.12,106,105.5,107,102,102.12,99.37,101, -104,105.12,104.25,105.5,105.5,105.25,105.12,107.62,108.87,107.75,107.62,106.12,107.12,107,107.87, -108.12,108.5,109.25,110.5,111.62,112.87,112.37,110.75,111.87,112.87,114.25,113.25,112.75,114.62,116.37, -116.25,114,113.75,112.75,111.87,110.87,109.75,111.12,110.87,111.87,113,110.87,112.37,108.87,110.25, -110,110,109.25,111.12,111.25,111.12,114.25,113.87,115.5,113.87,112.75,112.12,112.75,114,114.87, -114.12,112.5,114.25,111.37,110.62,110.75,108.62,107.87,107.62,108,111.25,111.5,112,109.75,110.62, -112.5,111.25,109.25,108.87,109.12,109.5,109.75,109.75,111.12,109.5,110.12,109.62,107.75,110.75,109.62, -110,114,113.62,114.25,114.12,114.87,114.87,115.75,117.5,116.5,116.75,118.87,120.75,121,120.37, -119.5,122.12,122.5,122.12,123.5,123.25,123.75,124.5,121.87,122.25,122.75,124.62,124.62,124.37,122.62, -123.62,122.37,121.5,120.87,120,120.87,122.62,123.37,122.62,121,118.75,117.62,118.75,117.87,118.75, -117.75,121.5,119,121,121.12,123.25,125.5,123.12,123.5,124.12,124.62,126.5,127.12,125.37,124, -122.37,121.87,122.12,123.25,126.5,125.5,127.25,128.38,129.13,127.87,128.63,128.88,125.5,129.63,130.38, -128.75,131.5,131.25,133.63,132.75,132.88,133,131.88,132.25,131.13,129.75,129,126.5,128.13,128.88, -128.13,128.38,126.62,125,122.87,123.75,124.37,123.37,121.5,122.87,121.87,121.25,123.25,122.25,122.25, -121.75,120.5,118.62,119.62,117.62,119,117.25,115.62,116.75,118.5,120.75,122.87,121.87,123.37,121.62, -120.75,119.62,118,118.5,117.75,119.37,119.25,119,119.5,120.5,121.12,120.25,121.75,123.25,126.12, -126,123.5,124.94,125.12,122,120.12,120.12,121.62,121.75,120.75,123,121.75,120.62,121.62,119.87, -119.25,120.62,120.5,118.62,121.12,122.75,123.12,123.5,123.5,122.37,121.62,121.75,121.75,118.25,117.25, -115.25,114,113.62,112.62,115.75,114.37,113.5,112.37,111.25,112.5,114.75,115,114.87,113.12,109.75, -110.75,111.87,114.25,114.12,114,115.75,116,116.62,117.12,117.62,115.62,115.25,116.12,115,116, -116.87,116.75,117.12,115.5,115.5,115,115.12,111.75,111.87,110.12,109.87,108.87,107.5,106.62,105.75, -103.25,102.75,102,103.25,101.62,104.75,103.87,102.62,102.12,102.25,102.37,100.25,100.87,100.25,99.12, -99,99.75,100.5,100.5,100.5,101.37,101.5,101.62,102.62,101.75,102.12,102.12,100.75,99.75,100.62, -100.37,98,98.25,98.87,98,99.25,99.62,98.25,96.87,96,94.75,96.25,97.5,96.5,95.62, -96.25,98.12,97.87,97.87,96.87,95.5,95.37,93.25,95.75,97.75,98.62,99.5,100,99.25,98.75, -99.12,97.75,97.62,97.5,97,95.87,94,94.75,96.62,96.87,96.37,95.62,95.12,94,95, -94.37,93.37,93.12,90.37,90.37,93.37,94,93.75,94.25,96,94.87,90.87,88.62,87.87,87.25, -84.5,82.87,83.37,82.25,81.37,81.75,83.62,84,83.5,82.12,82.37,84.37,84.5,85.12,84.75, -83.37,84.37,84.62,83.87,82.25,80.5,79.87,80.5,81.5,80.75,81,83.75,83.37,83,82.37, -79.75,79.75,80.75,82.87,83.25,83,80.25,79.37,77.25,75.37,74,74,74.12,75.5,76.75, -76.37,76.12,76,76.62,75.75,74.12,74.25,74.12,73,73.12,72.12,71.5,72.5,72.87,72.25, -72.87,70.75,70.25,70.37,69.25,68.87,69.75,69.25,68.75,68.62,67.37,66,66.75,64.62,63.25, -62.63,62.5,62.75,63.38,62.88,63.63,64.25,65.87,66.62,66.62,65.87,65,65,65.87,66.25, -66.75,67,68,66.75,66.12,67.12,67,65,64.37,65.87,62,60.75,60.88,60.13,60.38, -60.63,61.13,61,60.88,60.38,60.88,60.63,59.38,59,58.5,58.88,59.63,59.38,59.38,59.63, -58.5,58.13,59,60.13,60.88,61.75,61.88,61.63,61.75,62.13,62,62.25,62.38,62.75,62.5, -62.88,63,63.25,63.88,64,64.12,64.37,64.37,65,65,65,64.87,64.37,64.37,64.37, -64.87,65.25,65.62,65.12,64.37,63.63,63.5,64.37,64.62,64,62.63,62.38,62.25,62.13,61.88, -61.5,61.5,61.5,60.5,60.13,60.13,59.5,59.38,59.63,59.13,59.25,58.75,57.88,58,57.75, -58.13,58.13,57.75,59,59.13,58.38,58.38,58.75,59.25,60.25,61.63,62.13,61.5,62,61.13, -60.63,61.5,62.38,62.75,62.63,61.25,61.38,61.5,62,61.38,62.25,63.5,62.63,62.38,63, -63,64.25,63.75,62.13,62.13,61.63,62,62.38,61.38,61.5,60.75,59.38,58.13,57.63,57.63, -57.75,56.75,56.5,56.5,57.38,57.63,57,56,56.5,57,56.25,56.88,56.63,56.75,55.75, -54.13,53.63,53.38,53.88,54.63,53.88,53.38,53.5,54.63,54,53,53.75,54.5,54.5,52.88, -52.5,50.5,50.63,50.38,50.38,51,51,51.25,52.63,52.5,52.25,52,50.88,51.5,52.38, -52.38,53,52,49.13,49.5,50.75,50.75,50.88,51.13,51.38,51.63,51.5,51.25,52.25,52.5, -53.38,55.13,55.88,55.5,55,54.25,55.13,55,54.25,54.13,53.25,54.88,53.63,54.25,54.5, -54.38,54.88,54,54.13,54.88,55.38,55.88,55.75,54.75,54.13,54,54,54.63,55.75,56, -55.13,55.88,55.38,55.5,55.88,55.88,56.63,57.25,57,56.63,56.75,58,58.25,58.13,58.75, -57.88,57,56.88,57.5,58.25,56.5,56.13,56.38,55.38,55.38,55.5,55,54.88,55.13,55.5, -55.38,55.88,56.63,56.63,56.88,55.88,56.25,56.5,56.63,57,57,56.88,56.88,57.88,57.88, -58.75,59,59.5,59.38,58.13,57.63,57.63,58.5,58.88,59.75,59.63,59,57.88,57.38,58.13, -58.38,58,59.13,59.75,60.25,59.75,58,57.88,56.13,55.5,55.63,56.38,56.63,56.63,56.38, -56.63,56.75,56.75,56.13,57.63,57.38,57.63,57.75,58.25,58.38,58.63,59.63,60.25,61.13,60.63, -60.38,60.38,60.5,61.38,60,59.75,59.13,60,60.75,61.75,60,60,60.38,61,62.13, -62.75,62.38,61.88,61.75,63.13,63.88,62.25,62.88,63.13,63.75,64.75,64.25,64.62,63.25,64, -62.38,62.5,63,61.75,62,61.88,62.5,63.63,64.25,64.5,64.25,62.13,62,60.5,61.25, -62,62,61.75,61.75,62.63,63,63.5,64.25,64,64.5,64.25,63.38,64.37,64.87,64.62, -65.5,65,65,65.25,65.12,65,66.62,66.87,65.75,66.75,66.5,66.75,67.37,67.62,69.5, -70.12,70.25,69.5,67.87,68.62,68,69,68.5,67.25,67.12,64.62,63.75,65.25,66,64.5, -65.75,64.5,63.75,66.12,66.37,67.25,68.37,68,67.87,66.5,68,68.75,69.5,70.37,70.37, -71.62,71.37,72,71.62,71.62,71.25,70.87,67.25,67.25,67.12,66.5,68.12,68,66.75,65.25, -65.5,66.62,66.12,66.5,65.87,67.75,68,68.5,68,68.62,70.37,69.62,70.5,69.25,70.12, -70,68,68,66.5,65.5,64.62,64.12,63.88,64.25,65.87,67.5,66.87,68.12,67,66.5, -67.25,65.62,66.12,65.87,66.37,65.75,66.12,64.25,66.5,66.62,67.5,66.12,65.5,65,65.87, -66.75,67.12,67.37,67.5,66.87,66,66.37,68,68.87,66.75,66.75,66.75,65.25,65.75,65.62, -64.25,64.75,65,65.25,65.37,65.12,65,64.37,64.62,64.87,65.12,66,65.12,65.62,64.25, -63.75,65,62.75,61.63,61.5,61.75,62,61.13,60.63,59.5,58.75,59.5,59.25,59.75,59.38, -58.88,57.88,57.88,59.63,58.88,60.38,58.88,58,58,57.5,56.75,57.13,57.13,58.13,56.5, -56,55.38,54.38,56.13,55.25,54.88,53.88,52.88,52.75,53.38,53,52.5,53,53.25,52.38, -52.13,53.75,54.38,54.88,55.38,54,54.38,54.88,54.88,54.5,55.38,53.75,53.5,53.88,52, -51.25,51.25,51.13,52,53,53.5,54.25,54.63,53.5,53.38,54.88,55.5,54.88,55.75,55.88, -56.38,53,54.75,54.13,56.38,58.13,58.88,59.63,59.13,59.88,60.13,61.25,62.13,61.63,61.13, -61.13,62,63.13,62.75,63.5,63.38,62.13,65,65.12,65.87,66.25,67.12,67.12,67.62,68, -69.37,69.25,66.75,67.25,67.12,68.25,69,69.12,69.37,68.62,70.37,70.37,71,70.12,70.62, -71.25,69,69,69.62,69.25,70,70.12,66.87,67,67.5,66,67.37,63.13,63.38,63.5, -62.5,63,64.25,64.62,64.87,64.87,64,65.12,64.37,64,65.25,65.87,65,65.25,65.62, -66.37,66.62,67.25,65.75,65.5,65,65.12,65.5,65.75,64.5,64.62,62.38,61.75,61.63,61.88, -62,62.38,62.5,62.25,62.75,61.75,61.88,61.5,62,63.13,63.25,63.5,62.38,64,62.5, -62.25,62.13,62.5,62.75,62.5,61.88,62.88,63.25,64.12,65.37,65.75,66.5,67.62,66,67.37, -68.87,68.62,68.25,68.25,67.62,67.62,68.25,68.12,68.62,67.87,69.87,71,67.75,67.87,68.5, -68.37,66.75,66.25,66.5,67.5,67.75,67.62,68.25,68.5,69.87,69.75,69.62,70,70,69.62, -69.62,70.5,70.87,71.62,71.25,71.62,72.25,70.25,70.25,70.37,68.87,69.25,70.37,69.5,68.87, -69.5,70,69.75,69.25,68.5,68.5,69.37,69.12,69.12,69.37,69.5,69.5,69.25,70.37,70, -70,71.5,72.25,73.5,73.62,72.12,72.37,72.37,73.37,73.87,73.62,73,74.25,74.12,73.87, -73,72.62,72.75,74,74.62,75.25,78,77.5,77.37,77.87,77.62,77.87,76.12,76.25,76.37, -303.63,306.38,306.75,306.75,306,309,308.25,307.5,309.5,306.75,305,308,308.38,307.5,309.75, -312,309,309.88,317.5,318,315.63,314.25,310.5,308.88,312,310.25,310,307,308.88,312, -312.5,311.63,311.75,312,320,319,318.5,320.38,317.5,319.5,314.5,315.5,317.75,317.75,319.88, -312.75,314.5,316,316,310.5,310.63,309.38,306.88,307.5,308.5,310,307.75,309,304.75,304.13, -306.13,302.13,301,300,299.13,304,302.5,303.5,305.5,308,306.5,308,305.5,308.13,306.75, -301.75,300.13,299.13,299.75,305.75,306.63,311,308.75,312,311.38,313,312,309.25,311.25,311.5, -306.5,310.75,310.25,309.63,314.63,312.75,311.5,305.38,306,306,305.75,305.13,306.5,304.5,298.5, -304,302.5,306.5,295.25,285,284.38,282.88,270.38,271.88,274.25,274.25,276,278,274.5,276, -278,277.88,274.38,273.38,270.63,265.5,267.5,271.25,269.38,270.5,264,263.75,261.25,261,259.25, -260,259.75,263.63,263.75,265.88,262.25,263.25,268.25,269.38,272.75,265.25,263.5,269.5,272.63,273.75, -275,278,277.13,276,279.75,279,279,286,287,290.5,281.25,283,279.25,279,282, -276.63,280.5,277,277,275,281,280.5,280,284,284.5,286.5,289,289.75,293.5,295, -300.88,299.5,303.38,299.25,300,301,293.88,292,293,292.5,295,297.25,297,297.75,297, -293.38,293.75,295.25,296.75,291.5,288.63,289,287.63,288.75,289.75,286,288.5,285,293,279.13, -281,278.75,276.25,273.5,273,271,270.25,268.13,269.75,266,266,267.5,259.38,258.38,258.75, -260,260.5,258.38,258,256.75,257.25,259.63,261.75,260.88,258.25,262.5,266.38,267,265.88,269.25, -266.25,270,271.13,274.25,266.75,269,268,265.25,266,266,260.75,257.13,258.25,261.13,260.75, -261.25,262.5,262.5,266,262.13,264.5,266,267.25,266.13,262.63,265.25,259.75,260.25,259.63,262.5, -261.13,261.25,266,267,266,261.5,261.75,261.75,261.25,254,253.5,253,251.25,251.13,253.63, -240.5,236.25,239.88,240.5,240.88,240.63,241.38,238.25,236.25,236.25,237.63,238.38,239.63,238.25,239, -239.5,239.25,240.75,243.88,243.25,240.13,242.13,239.25,242.75,244.25,246.13,244.75,241.13,244.25,249, -251.5,251.25,253.75,256.63,256,254.75,255.25,255.25,256,256.25,257.25,257.75,258,259.75,260.13, -260.75,258.5,258.63,260.5,265.5,265.5,266.88,265,264.25,265.88,266,265.38,266.25,267.25,269.25, -269,267.5,266,266.63,266.38,267,268.88,267,266.88,270.75,268.75,268.5,272.75,271,270.25, -270.25,267.5,266.63,264.25,263.13,263.75,264.75,266.25,264.25,263.25,264.5,262.38,261.13,260.5,262.38, -264.5,263,264,262.88,267,268.75,268.5,266.25,261.63,260.25,258.38,257.88,261,258.25,260, -259.5,252.75,251,252,253,250.38,249.63,253.38,257.25,258.88,260.13,260.5,257.25,257.25,258.75, -257.75,256,257.38,258.75,257.88,257.5,255.25,256,257.63,257.25,257.88,257.38,259,262,261, -260.38,259.63,258.25,259.5,257,257.63,256.25,259,255.75,258,262.5,263.13,262.75,262.75,262.75, -265.25,267.75,268.38,268.5,267.5,268.38,266.63,269.5,267.75,267.25,268,270.13,271.25,269.13,268.5, -267.75,267.75,269.25,266,266.13,268.25,265.63,264.25,266.5,269,269,269.25,269.63,268.13,267, -267.5,271.5,273.25,273.25,273,273,274.75,274,270.5,262.13,259.13,259.5,259.13,261.5,259.88, -261.5,261.63,263.88,265.25,264.13,267.13,266,262.38,260.38,259.75,260,257.88,257.25,258.38,258.5, -254.13,251.75,251.25,252.88,252.88,250.5,250.75,247.38,248,246,245.25,249,247.13,247.5,245.38, -249.63,251,254,255.38,253.25,253.25,252.38,252.75,255.25,255.25,256.25,260,262,261.25,260, -258.75,259.75,261.25,259.5,258.25,258,263.25,270,271.13,272,272.5,272,273.75,278,276.63, -276.75,275.5,274.5,275.75,278,276.5,276.63,280.5,279.5,277.5,280.13,282.5,285.5,283.25,283.5, -283.5,284,285.25,284,283.25,284.38,279.63,280.13,280.5,278,278.25,276.75,277,276.13,275.5, -275.5,276,275.75,275,270.5,271.5,272.25,274.25,267.75,269,268,270,270.5,269,271.13, -271.75,276.5,275.25,272.5,268.75,268.25,269.5,271.75,274,273,277.5,275.25,273,270.5,270.5, -269,269,271.25,272,274,274,273,276.5,276.5,280.5,277.25,278.5,277.75,273.5,270.25, -270.38,265.75,265,267.25,268.75,269.88,270,271,271.5,272.75,270.75,273,272.5,270.25,272, -271,271.38,274,272.75,270,271.5,270,270.75,268,263.5,264.25,262,264.5,261,260.25, -259.5,261.75,267.38,268,270.75,271.75,266.5,266,263.5,259.88,256.5,257.25,263.5,263.5,263.63, -262.75,264.5,271.5,271.75,278,278.25,281.25,279.5,279,280,280.5,281.38,281.5,283.88,286.75, -284.5,284.25,285.5,287.75,284.63,284,284,278.25,278,277.63,279.5,278,277.5,280,278.5, -276.38,276.88,273.63,272.25,270,268.88,272,269.5,273.5,273,275.13,279.5,280,279.38,278.25, -277.5,277.38,278.5,274.5,275.25,274.63,275.63,276,271.75,272.13,273,273,272.25,275.5,273.75, -272.5,271,270.5,272,274.25,276.25,276.63,277.63,279.75,278,276.75,278,275,276,274.5, -276.75,276.25,273.63,274.5,275.25,272,268.75,270.5,266.5,269,263.63,259,260.25,259,255.5, -253.75,253,253.38,253,256,257.5,254,256.5,253.5,250,251,249.75,253,257,253.75, -253.5,253,252.25,255,257,256.5,258,252.25,249.63,250,251.5,249.25,252.75,253.5,256, -255.88,259.25,258.63,260,260.5,261.25,259.25,256.5,255.5,262.88,261.63,267.88,268.25,269,269.75, -272,268.25,261.75,262,260.5,260.25,259.5,258.5,261.75,262,258.25,258.75,258,258.13,261.88, -259.63,261.25,265.75,261.75,259.25,260,258.5,256.25,259.25,259.25,259.25,255.63,256,260,262.5, -261,262,262,258.5,253.13,254,252.5,255.25,258,253.5,254,257.25,263.25,261.25,259.25, -257.75,257.63,251,249.88,254.25,254.25,250,247.5,252.5,250,242.88,239.63,241.25,234.25,235.75, -231.25,230.38,228.5,229.38,230,226.5,224.25,223.5,222.5,223.25,221.38,221.13,216.25,217.75,219.5, -219.75,219.88,216.75,215.63,214.75,217.5,215.88,215,214.63,220.13,219,219.63,224.13,226.38,225, -224.63,222.25,221.75,221,219.63,220.38,225,223.13,221.38,224.75,220.5,217,216.25,217,215.75, -213.5,211.63,212.25,211.13,211,214.25,211.88,209,214.75,213.25,212.88,212.5,208,209.38,208.75, -208.5,210.5,206,205.25,206,201.25,201,200.13,189,183.75,188.25,190.75,195,192.13,191, -190.5,186.5,189.25,186.25,180,178.63,179.88,180,181.25,180,179,183.5,180,182,182.75, -181.25,186.25,186.25,181.5,178.25,181.75,180.25,177.75,176.5,178.13,182,182.25,179.75,177.75,182, -183.5,180.13,183,185.75,184.38,187.75,189.25,190.25,194.88,192,190.63,190.5,194.25,193,197.5, -199.25,201.88,201.88,204.63,206.75,208,205.5,204.75,209.25,206.75,204,206.5,206.88,207.5,209, -209,209.25,210.5,211.5,213,206.38,208.38,204.25,203.5,208.25,206.13,208.5,210.25,211.5,212, -213.5,217.63,216.63,218.5,218,217,213.5,213.38,216.13,218.88,214.25,212.75,216,219,216.63, -217.5,223.5,223.5,216.25,215.25,210.5,211.5,209.75,213.75,207.63,209.25,209.88,202.25,202.5,206, -206.88,208,211.75,213.75,210.25,212.5,212.75,209.5,209.5,205,206.25,209.5,202.25,198.75,198, -198,203.75,206.13,206.63,207.5,209.88,210,204.63,206.25,209.5,214.5,214.75,218.75,215.75,217, -213,215.5,219.5,217,219.25,215.38,214.5,220,216,212.25,212,207.5,209.75,217.75,217.75, -217.75,212,220.13,215.5,213.25,201.63,198.63,198.25,196,199.88,191.75,193,188.25,183.25,187.25, -179.75,179.25,162.88,163,163.5,159.63,160,158.13,160.75,163.5,168.25,169.25,171.25,169.63,163.25, -165.75,166.5,167.5,168.88,168.25,166,162.25,165,167.38,166,169.5,169,170,171.63,165.25, -167.25,169.5,171.75,172,170.25,164.5,165.75,169.75,168.13,170.5,175.5,178.25,177,174,170.5, -171.5,168.5,169.5,173.88,177.5,182.13,184.75,185,189.88,190.5,187.25,185.5,195.88,189.5,191.25, -189.13,193,191.75,184.25,177.25,181.25,181.25,185.5,192.5,184.25,182.5,177.13,177.25,179,178, -176.13,175.38,162,164.13,159.25,157.75,159.5,160.25,159,159.5,164,164,166.75,168,171.5, -170.5,169.25,161.88,161.75,152,156.5,165,171.5,173,178.5,182.25,180,180,192,190.25, -191.25,192,193.5,190,192.75,192,199.75,196.75,196.75,200,200,202,203,208.5,208.5, -214.75,208.75,207,200.88,201.75,201.63,207.5,203,203.5,214.5,221,222.25,221,217.75,217, -217.75,213.75,216,215.5,203.25,197.75,201.75,199,202.25,209.13,211.5,212.75,212.75,212,215, -220.5,215.75,213,213.75,216.5,216,218.75,222,226.75,225,226,229,229.25,228.75,220.38, -220.5,219,212.5,214.5,210.63,217,218.75,216.25,216.13,217.5,218.25,218.25,219.75,222.38,223, -221.75,224,230.5,226,228.13,224.25,224.5,228.75,230,227.25,224.5,225,222,222.5,227.25, -230.38,231.63,233.75,234.25,234.25,231.25,229.5,230.25,233,230.75,233.5,236.5,239.25,235,231.63, -235.75,239.75,242.5,249,248,243.5,243,246.25,245.75,247.5,249.25,248.75,250,249.5,246.5, -240.5,239.75,244.25,241.75,238.25,236,237.88,237,237.75,235.75,236.5,237,235.75,231.75,233.5, -227.5,229.25,228.25,228,233.13,236.25,237.25,236.75,237,240.75,244.5,246.25,245.25,244.25,247, -246.5,248,249.75,245,245,250.75,247.25,239.13,237,240,232,227.75,228,227.25,230.75, -238,242.75,246.75,249.25,255,251.5,243.5,239,243,250.75,249.5,240,244.5,251.5,250.63, -251.5,263,265,260.75,253.25,255.25,258.5,264.75,266,269.25,264.5,266,269.5,276.25,272, -274.75,284.5,280.25,286,289.75,287,278.38,282,282,276,276.75,279,281.25,280.25,278.5, -284.75,285.5,289,287.5,286,280,288.25,289,283.25,281.88,279.25,280.25,281,277.5,270.5, -261.75,259.5,252.5,248.5,254,257.5,257.75,260,260.5,260.5,253,260,264.5,270.75,266, -261,285.13,292.25,290.5,286.25,291.5,296,298.25,297.75,296.88,300.5,303,304.25,304,304.5, -298.25,299.25,298,297.75,299.75,300.5,300.5,302.5,299.75,301.5,301.25,303.5,304,306,310.75, -311.5,312,311.5,314.5,320.75,318,318.75,319,314,312.75,315,315,314.25,310,319, -310,313.75,319,315,308.25,300.25,300,298.5,304,314,319.5,313.25,312.75,308.75,314.13, -315.5,319,318,314,317,319.75,328.5,329.25,323.25,324.25,322,318.5,317,309.75,310, -314,319,323.5,328.5,400.5,390,390,388.5,386.75,395,400,400,396.13,403.5,409.5, -414,422,417,419,424,415.38,411.5,411.5,405.25,409.75,407.5,409.75,423.5,428.25,432, -425,425.25,429.75,430.75,430.25,434.25,429.75,423.5,423.25,423,424.25,428,431.5,437.5,434.5, -437.5,432.5,428,425.5,428.88,437.75,437.88,442.88,444,448.75,444.75,442.5,440.75,440.5,441, -438.5,438.75,442,427,431.5,423,431,433.5,442.5,443.75,447,443,441.5,445.63,450.75, -451,446.5,437.75,438.5,438.5,431,429.75,429,435.5,437.75,441.5,437.75,436,444.25,436, -439,428.88,427,422.5,423.25,422.75,417.25,412,415.5,418.75,418.75,412.75,409.25,409.25,404.5, -399,392.25,391.5,385.5,389.5,390,393.75,397.5,396,396.25,399,403.75,403,397.25,397, -398,400,399.25,391,387,382.25,385.5,387.25,394,387.25,385.25,384,385,384.25,388, -378.75,373.25,371.5,376.25,381,387.88,390.88,389.5,386,381,378.75,378.25,383.5,388.75,390.5, -389,378.5,379,374.5,364.5,379,383.5,388.5,394,400.25,401.5,395,403.25,406.75,405.25, -406.5,404.25,405.75,398.25,398.25,398.25,399.5,400.5,397,397,397,399.5,398,395,396.5, -397.75,399.5,401.25,404.75,406.25,408.5,408,408.75,404.25,406,407.25,413,412.75,411,411.5, -413.25,416,420.25,422.75,425.5,423.5,423.5,418.25,417.75,416,415.25,409,410,402,398.25, -397,394.5,398,398.75,398,390.75,390,390,388,393.25,391.75,395.75,397,399,404, -403.75,403,396.5,393,392,390.63,392.25,392.25,393.5,395.75,396,397,396.5,398.75,397.5, -399.75,395,387.75,391,392.75,395.25,393,394.5,397.5,399,399,396,403.25,404,403, -402,401,398.5,394.5,390,383.75,386.5,384.5,383.5,383.75,379.25,385.75,387,384.5,379, -380,382.5,386,381.25,381,381.5,383.5,385,387.75,390.75,395.75,395.25,395,394.25,397.5, -391.75,390.5,390,391,392,389,385.5,382.25,380,383.63,385,382.75,382.25,379,377, -376.88,377,373,373,372,373.25,377.75,382,382,383.75,380,377.5,376.25,374.25,369.5, -367,371.75,365.5,369,368.5,368.75,367.75,369.38,369.75,369,372.75,372,373.75,372.25,369, -369.75,372.25,373.5,369,368,368.25,368.25,368.75,366,360.5,366,363.5,360,349.5,349.5, -350,342.5,341.25,342,338.25,338.75,341,341,340,333,336.5,335,337,339.25,333.5, -336,339.75,345,341.5,341,339,334.25,320,324.25,324.5,317.75,313.5,317,313.25,320.75, -309.5,309.75,306.5,302.25,299.25,291.75,290.5,291.75,293.5,294.75,301,301.75,294.25,294.25,292.25, -296,299,299.25,300,300,303,297.5,292.38,300,298.25,297,299,302,301.63,304, -305,308.5,306.25,308.75,307.75,309.25,313.63,305.75,304.75,308.5,309,307.75,306.5,306,304.25, -302.75,304.25,303.88,304.5,305,307.75,306,304,302.25,301,302.5,299.75,300,304,305.75, -310.5,310,310,299.75,301.5,304,307.5,315.5,314,314.75,318.25,315,311.25,307,310, -315,314,313.5,296.5,294,286.5,284,285.5,287,287,290,293.75,292.75,296.75,299.5, -292.75,296,298,299.5,301.75,299.5,298.5,294.5,298,300,301,314.5,316,311.25,311.5, -316.5,317.5,317.75,317,315.5,311.88,311.25,312,315.25,314.75,314,315.5,320.13,323.5,321.5, -318.63,323.5,323.5,318.75,312.5,317.75,323.75,322.25,326.5,328.75,327.5,333,337.25,337,340, -343,347.5,342,338,334,335.5,339,342.5,342.25,344.75,347,349.5,353,353,353.25, -355,361.25,361.25,358.75,356,355,352,352.5,355.75,354,353,353.75,358.75,358,357, -356.75,361,361.13,360.75,358,356,357.5,357,356.5,358,356.25,355,355.75,358.5,360.63, -361,363.5,362.5,363.25,354,347.75,348.75,349,348.5,345.5,341.25,338.25,338,338.5,336.5, -334,338.25,336,330.5,328.25,329.25,336.5,340.38,339.5,338.75,337.25,338,340.75,336.5,330.5, -328.63,327.75,327.25,325.5,318.25,321,326,323,321.75,316.13,314.75,312.75,311.75,311,314.5, -315.63,315.75,312.5,314,316.25,318,316.25,313,316.75,319.5,320.25,318.5,316,312.75,316, -317.25,315.5,313,313,311,310.75,316.75,317.5,317.25,316.25,316,311.75,311.5,314,308, -307.25,308.5,299,300,299,297,291,290.5,292.5,293.25,293.13,296,297.25,299,298.25, -295.25,292.63,296.25,296.25,299.75,294,297,297,291,289.75,294.75,288.75,288.88,291.13,284.5, -286.75,293,291.5,292,290.25,294.75,298.25,305,307,307,300.5,297.75,291.75,291.75,290, -288.5,288.5,282,273.75,275.25,280.25,277.25,273,266.38,266,268.75,268.25,270.75,275,272, -269.75,265.75,263.88,265.25,269.5,265.25,263.75,264,262.75,254,244.75,239.75,239.75,235.5,229.88, -225,230,235.75,239.75,245.5,248.5,249.75,250.25,249.25,251.88,253.25,252.5,252.75,253.25,253.75, -256,254,257.75,258,259.5,255.75,252.25,251.25,247.75,250.25,254.25,252.5,243.5,244.5,250.38, -254,250,257.5,257.5,258,256.75,257.13,268.5,270.25,272,265.75,271,259.13,259,259.25, -262.25,268.25,266.25,270,271.25,281.25,283,286.5,278,267,259,245,241,247.25,245.5, -245.75,255.5,268.5,270.75,268.5,274.5,278.75,285.5,289.5,289.75,287.5,283,283,294.63,298, -300.25,290.25,299.75,309,309.63,313,319.63,324.5,323,320.75,323.25,324.75,326.5,331,325.75, -325.5,320,320.5,323.5,330.75,337,338.5,336.75,334.25,333,329.5,322,319.75,322.38,322.25, -322.5,320,321.75,328.75,328.5,326.5,318.5,320,329.13,329.75,333.25,335.5,340.25,344.25,345, -344.5,348.5,352,352,349.75,349.25,349,352,355,348.75,349.75,346.5,338.75,339.5,343.25, -343,337,335.19,341,345.25,345.75,354,356,355,356.5,350,355.13,381.5,375,374.13, -367.75,369,369.5,368.75,368.5,368.25,366,364.5,362,358.25,361,355,354,360,366, -360.5,351.5,353.25,358,359,356.25,355.5,356,355.5,357,357,355.13,356,359.5,358.5, -351.75,346.75,345.75,350,354.5,357.25,363.25,362.5,363,364.5,365.75,367.75,366.75,365,361.75, -360.5,359.5,359.5,360,359.5,356.25,360,363.5,364,358.75,355.5,357,353.25,351,351.75, -354,353.75,347.25,346.5,347,341.5,345.75,348.5,344.75,344.5,343.5,345.25,346.25,346.5,347.75, -356,357.25,358.5,352.5,349.25,347,346.75,344,345.5,343.5,346.5,340,335.25,337.5,340.25, -340.75,343.5,345,348,343.5,341.5,341,346.5,349,346.88,342,341.25,339.5,338.75,335, -330.5,329.25,333.5,333.75,336,335.25,327.5,329.5,326,320,313,313.13,316.25,317,320.25, -318.25,323,326,328.5,325.5,321.5,331.5,327,333.5,335.5,345,351.25,348,339.5,337.75, -332.5,329.75,320.5,325.5,319.5,312.25,314,314.25,314.25,313.5,313,309.5,309,310.25,312.25, -314.25,318,319,318,319.5,319,321.75,322.25,327,327,322.75,322.5,319.75,323.75,329, -330,332.5,331.5,326.5,327,329.75,329,331.5,327.75,326.75,325.5,328,327.25,324.5,318, -315.5,311.5,312.5,308,308.25,306.75,308.75,310.5,310,312,313.75,312,307,307.25,309, -311,313,314,311.5,309.5,308,306.5,305.5,305.5,303.5,300,301.75,295.75,294.75,299.63, -303,303.5,299.75,299.75,302.5,299,296,293.38,296,298,296.25,296.75,295.5,295.5,300, -300,306.5,310.25,306.5,303.5,300.25,297.25,296.75,296.25,295,296.25,296.5,296.25,299.75,299.75, -299.75,300.5,303,303,300,300,312.75,310,308.5,300,303.75,310,307.5,304.25,302.5, -307.5,312,315,314,318,319.75,321,319.25,321.88,326,319.75,316.5,316.5,319.75,327.5, -327,326,328.25,330,329,333.75,334.5,330.25,328,327.75,326,325,322.5,327,325.5, -324,320,317,316,310,315,309,308,307.5,313.5,316.75,317.5,323.5,327,327, -321.25,315.5,318.5,325,327.75,330.75,330.25,331,325,326.75,330.5,332.25,335.5,337,337, -331,334,336.75,336,337.5,337.25,337,338,340.5,339.75,339,337,335,337.5,338, -340,338.5,343.5,344.5,344.75,341,339,343.25,338.75,335.25,335.5,338,335.5,336,336.5, -338.75,331.5,332,335.5,343.75,342,345,353,355,356.5,355,358,362.5,364.75,361, -352,351.5,353.75,359.75,356.25,349,358,358.5,351.5,346.5,358,359,370,370.75,370, -368,366,369.75,375,369,349,337,332.5,330,329.5,328.25,330,324.88,325,328.25, -334.5,335.25,335,338.5,341.25,343.5,343.88,343,344,348,346.5,339.5,335,329.5,328, -326.5,327.5,327.5,636.5,640,643,644.5,647,649,641,642,631.5,637.5,638.5,635, -631,625.5,602.25,598,595,590,585.5,580,586.75,584,590.75,590.75,573.5,586.13,594.5, -593,580.5,582,587.5,569.75,562,573.75,580,586,594,587.5,589.75,597.25,596,586, -577,579,586,572,571,575.5,591.5,588.5,591.5,594.5,599.5,594.5,606,612.5,618.5, -618,614,623,607,619,621.5,619,616,623,618,612,605.75,599.25,597.75,594, -590.5,601.75,613.5,627,624.5,625,617,613.5,622,625,619.5,618,632.5,646,644, -641,645.5,644.5,641,637,629,630,620,612,614 }; diff --git a/src/ta-lib/src/tools/ta_regtest/ta_regtest.c b/src/ta-lib/src/tools/ta_regtest/ta_regtest.c deleted file mode 100644 index 331329e80..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_regtest.c +++ /dev/null @@ -1,301 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AC Angelo Ciceri - * AB Anatoliy Belsky - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 063001 MF First version (initial framework only). - * 090404 MF Add test_candlestick - * 110206 AC Change volume and open interest to double - * 122506 MF Add MININDEX,MAXINDEX,MINMAX and MINMAXINDEX. - * 101812 AB Add AVGDEV. - * 101912 AB Add IMI. - */ - -/* Description: - * Perform regression testing of the TA-LIB. - */ - -/**** Headers ****/ -#ifdef WIN32 - #include "windows.h" -#endif - -#include -#include -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -int nbProfiledCall; -double timeInProfiledCall; -double worstProfiledCall; -int insufficientClockPrecision; -int doExtensiveProfiling; - -/**** Local declarations. ****/ -/* None */ - -/**** Local functions declarations. ****/ -static ErrorNumber testTAFunction_ALL( void ); -static ErrorNumber test_with_simulator( void ); -static void printUsage(void); - -/**** Local variables definitions. ****/ -/* None */ - -/**** Global functions definitions. ****/ -int main( int argc, char **argv ) -{ -#ifdef WIN32 - LARGE_INTEGER QPFrequency; -#endif - double freq; - - ErrorNumber retValue; - - (void)argv; - - insufficientClockPrecision = 0; - timeInProfiledCall = 0.0; - worstProfiledCall = 0.0; - nbProfiledCall = 0; - doExtensiveProfiling = 0; - - printf( "\n" ); - printf( "ta_regtest V%s - Regression Tests of TA-Lib code\n", TA_GetVersionString() ); - printf( "\n" ); - - if( argc == 2 ) - { - /* Detect option to perform extended profiling. */ - if( (argv[1][0] == '-') && (argv[1][1] == 'p') && (argv[1][2] == '\0')) - { - doExtensiveProfiling = 1; - } - else - { - printUsage(); - return TA_REGTEST_BAD_USER_PARAM; - } - } - - if( argc > 2 ) - { - printUsage(); - return TA_REGTEST_BAD_USER_PARAM; - } - - /* Some tests are using randomness. */ - srand( (unsigned)time( NULL ) ); - - /* Test utility like List/Stack/Dictionary/Memory Allocation etc... */ - retValue = test_internals(); - if( retValue != TA_TEST_PASS ) - { - printf( "\nFailed an internal test with code=%d\n", retValue ); - return retValue; - } - - /* Test abstract interface. */ - retValue = test_abstract(); - if( retValue != TA_TEST_PASS ) - { - printf( "Failed: Abstract interface Tests (error number = %d)\n", retValue ); - return retValue; - } - - /* Perform all regresstions tests (except when ta_regtest is executed for profiling only). */ - if( !doExtensiveProfiling ) - { - retValue = test_with_simulator(); - if( retValue != TA_TEST_PASS ) - return retValue; - - if( insufficientClockPrecision != 0 ) - { - printf( "\nWarning: Code profiling not supported for this platform.\n" ); - } - else if( nbProfiledCall > 0 ) - { - printf( "\nNumber profiled function call = %d function calls", nbProfiledCall ); - -#ifdef WIN32 - QueryPerformanceFrequency(&QPFrequency); - freq = (double)QPFrequency.QuadPart; - printf( "\nTotal execution time = %g milliseconds", (timeInProfiledCall/freq)*1000.0 ); - printf( "\nWorst single function call = %g milliseconds", (worstProfiledCall/freq)*1000.0 ); - printf( "\nAverage execution time per function = %g microseconds\n", ((timeInProfiledCall/freq)*1000000.0)/((double)nbProfiledCall) ); -#else - freq = (double)CLOCKS_PER_SEC; - printf( "\nTotal execution time = %g milliseconds", timeInProfiledCall/freq/1000.0 ); - printf( "\nWorst single function call = %g milliseconds", worstProfiledCall/freq/1000.0 ); - printf( "\nAverage execution time per function = %g microseconds\n", (timeInProfiledCall/freq/1000000.0)/((double)nbProfiledCall) ); -#endif - } - printf( "\n* All tests succeeded. Enjoy the library. *\n" ); - } - - - return TA_TEST_PASS; /* Everything succeed !!! */ -} - -/**** Local functions definitions. ****/ -static ErrorNumber test_with_simulator( void ) -{ - ErrorNumber retValue; - - /* Initialize the library. */ - retValue = allocLib(); - if( retValue != TA_TEST_PASS ) - return retValue; - - /* Perform testing of each of the TA Functions. */ - retValue = testTAFunction_ALL(); - if( retValue != TA_TEST_PASS ) - { - return retValue; - } - - /* Clean-up and exit. */ - - retValue = freeLib( ); - if( retValue != TA_TEST_PASS ) - return retValue; - - return TA_TEST_PASS; /* All test succeed. */ -} - -extern TA_Real TA_SREF_open_daily_ref_0_PRIV[]; -extern TA_Real TA_SREF_high_daily_ref_0_PRIV[]; -extern TA_Real TA_SREF_low_daily_ref_0_PRIV[]; -extern TA_Real TA_SREF_close_daily_ref_0_PRIV[]; -extern TA_Real TA_SREF_volume_daily_ref_0_PRIV[]; - -static ErrorNumber testTAFunction_ALL( void ) -{ - ErrorNumber retValue; - TA_History history; - - history.nbBars = 252; - history.open = TA_SREF_open_daily_ref_0_PRIV; - history.high = TA_SREF_high_daily_ref_0_PRIV; - history.low = TA_SREF_low_daily_ref_0_PRIV; - history.close = TA_SREF_close_daily_ref_0_PRIV; - history.volume = TA_SREF_volume_daily_ref_0_PRIV; - - printf( "Testing the TA functions\n" ); - - initGlobalBuffer(); - - /* Make tests for each TA functions. */ - #define DO_TEST(func,str) \ - { \ - printf( "%50s: Testing....", str ); \ - fflush(stdout); \ - showFeedback(); \ - TA_SetCompatibility( TA_COMPATIBILITY_DEFAULT ); \ - retValue = func( &history ); \ - if( retValue != TA_TEST_PASS ) \ - return retValue; \ - hideFeedback(); \ - printf( "done.\n" ); \ - fflush(stdout); \ - } - DO_TEST( test_func_1in_1out, "MATH,VECTOR,DCPERIOD/PHASE,TRENDLINE/MODE" ); - DO_TEST( test_func_ma, "All Moving Averages" ); - DO_TEST( test_func_per_hl, "AROON,CORREL,BETA" ); - DO_TEST( test_func_per_hlc, "CCI,WILLR,ULTOSC,NATR" ); - DO_TEST( test_func_per_ohlc, "BOP,AVGPRICE" ); - DO_TEST( test_func_rsi, "RSI,CMO" ); - DO_TEST( test_func_imi, "IMI" ); - DO_TEST( test_func_minmax, "MIN,MAX,MININDEX,MAXINDEX,MINMAX,MINMAXINDEX" ); - DO_TEST( test_func_po, "PO,APO" ); - DO_TEST( test_func_adx, "ADX,ADXR,DI,DM,DX" ); - DO_TEST( test_func_sar, "SAR,SAREXT" ); - DO_TEST( test_func_stoch, "STOCH,STOCHF,STOCHRSI" ); - DO_TEST( test_func_per_hlcv, "MFI,AD,ADOSC" ); - DO_TEST( test_func_1in_2out, "PHASOR,SINE" ); - DO_TEST( test_func_per_ema, "TRIX" ); - DO_TEST( test_func_macd, "MACD,MACDFIX,MACDEXT" ); - DO_TEST( test_func_mom_roc, "MOM,ROC,ROCP,ROCR,ROCR100" ); - DO_TEST( test_func_trange, "TRANGE,ATR" ); - DO_TEST( test_func_stddev, "STDDEV,VAR" ); - DO_TEST( test_func_avgdev, "AVGDEV" ); - DO_TEST( test_func_bbands, "BBANDS" ); - DO_TEST( test_candlestick, "All Candlesticks" ); - - return TA_TEST_PASS; /* All tests succeeded. */ -} - -static void printUsage(void) -{ - printf( "Usage: ta_regtest [-p]\n" ); - printf( "\n" ); - printf( " No parameter needed for regression testing.\n" ); - printf( "\n" ); - printf( " This tool will execute a series of tests to\n" ); - printf( " make sure that the library is behaving as\n" ); - printf( " expected.\n"); - printf( "\n" ); - printf( " ** Must be run from the 'bin' directory.\n" ); - printf( "\n" ); - printf( " OPTION:\n" ); - printf( " -p Only generate profiling data on stdout. This is\n" ); - printf( " intended only for the TA-Lib developers. It is\n" ); - printf( " not further documented for general use.\n" ); - printf( "\n" ); - printf( " On success, the exit code is 0.\n" ); - printf( " On failure, the exit code is a number that can be\n" ); - printf( " found in c/src/tools/ta_regtest/ta_error_number.h\n" ); -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func.h b/src/ta-lib/src/tools/ta_regtest/ta_test_func.h deleted file mode 100644 index 8fdf8c924..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef TA_TEST_FUNC_H -#define TA_TEST_FUNC_H - -ErrorNumber test_candlestick ( TA_History *history ); -ErrorNumber test_func_adx ( TA_History *history ); -ErrorNumber test_func_ma ( TA_History *history ); -ErrorNumber test_func_trange ( TA_History *history ); -ErrorNumber test_func_rsi ( TA_History *history ); -ErrorNumber test_func_po ( TA_History *history ); -ErrorNumber test_func_macd ( TA_History *history ); -ErrorNumber test_func_stddev ( TA_History *history ); -ErrorNumber test_func_bbands ( TA_History *history ); -ErrorNumber test_func_mom_roc ( TA_History *history ); -ErrorNumber test_func_stoch ( TA_History *history ); -ErrorNumber test_func_minmax ( TA_History *history ); -ErrorNumber test_func_per_ema ( TA_History *history ); -ErrorNumber test_func_per_hl ( TA_History *history ); -ErrorNumber test_func_per_hlc ( TA_History *history ); -ErrorNumber test_func_per_hlcv( TA_History *history ); -ErrorNumber test_func_per_ohlc( TA_History *history ); -ErrorNumber test_func_per ( TA_History *history ); -ErrorNumber test_func_sar ( TA_History *history ); -ErrorNumber test_func_1in_1out( TA_History *history ); -ErrorNumber test_func_1in_2out( TA_History *history ); -ErrorNumber test_func_avgdev ( TA_History *history ); -ErrorNumber test_func_imi ( TA_History *history ); - -#endif diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c deleted file mode 100644 index 6d3375230..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_1out.c +++ /dev/null @@ -1,507 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 020203 MF First version. - * - */ - -/* Description: - * - * Test functions which have the following - * characterisic: - * - have one input and one output - * - there is no optional parameters - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { - TA_HT_DCPERIOD_TEST, - TA_HT_DCPHASE_TEST, - TA_HT_TRENDLINE_TEST, - TA_HT_TRENDMODE_TEST, - TA_SIN_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *price; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /********************************/ - /* Some Hilbert Transform Tests */ - /********************************/ - { 1, TA_HT_TRENDMODE_TEST, 0, 0, 251, TA_SUCCESS, 0, 1.0, 63, 252-63 }, /* First Value */ - - { 1, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 0, 88.257, 63, 252-63 }, /* First Value */ - { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 0, 88.257, 63, 252-63 }, - { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 252-66, 109.69, 63, 252-63 }, - { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 252-65, 110.18, 63, 252-63 }, - { 0, TA_HT_TRENDLINE_TEST, 0, 0, 251, TA_SUCCESS, 252-64, 110.46, 63, 252-63 }, /* Last Value */ - - { 1, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 0, 22.1495, 63, 252-63 }, /* First Value */ - { 0, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 252-66, -31.182, 63, 252-63 }, - { 0, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 252-65, 23.2691, 63, 252-63 }, - { 0, TA_HT_DCPHASE_TEST, 0, 0, 251, TA_SUCCESS, 252-64, 47.2765, 63, 252-63 }, /* Last Value */ - - { 1, TA_HT_DCPERIOD_TEST, 0, 0, 251, TA_SUCCESS, 0, 15.5527, 32, 252-32 }, /* First Value */ - { 0, TA_HT_DCPERIOD_TEST, 0, 0, 251, TA_SUCCESS, 252-33, 18.6140, 32, 252-32 }, /* Last Value */ - - /*********************************/ - /* Trigonometric and Vector Math */ - /*********************************/ - { 1, TA_SIN_TEST, 0, 0, 251, TA_SUCCESS, 0, -0.38371, 0, 252 }, /* First Value */ - { 0, TA_SIN_TEST, 0, 0, 251, TA_SUCCESS, 251, 0.870319, 0, 252 } /* Last Value */ - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_1in_1out( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Integer *intBuffer; - int size, i; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - switch( testParam->test->theFunction ) - { - case TA_HT_DCPERIOD_TEST: - retCode = TA_HT_DCPERIOD( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_HT_DCPERIOD_Lookback(); - break; - case TA_HT_DCPHASE_TEST: - retCode = TA_HT_DCPHASE( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_HT_DCPHASE_Lookback(); - break; - case TA_HT_TRENDLINE_TEST: - retCode = TA_HT_TRENDLINE( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_HT_TRENDLINE_Lookback(); - break; - case TA_HT_TRENDMODE_TEST: - /* Trendmode returns integers, but this test - * is comparing real, so a translation is done - * here. - */ - #define PRE_SENTINEL ((TA_Integer)0xABABFEDC) - #define POST_SENTINEL ((TA_Integer)0xEFABCDFF) - #define ALLOC_INT_BUFFER(varSize) \ - { \ - intBuffer = TA_Malloc(sizeof(TA_Integer)*(varSize+2)); \ - intBuffer[0] = PRE_SENTINEL; \ - intBuffer[varSize+1] = POST_SENTINEL; \ - } - - size = endIdx-startIdx+1; \ - ALLOC_INT_BUFFER(size); - retCode = TA_HT_TRENDMODE( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - &intBuffer[1] ); - *lookback = TA_HT_TRENDMODE_Lookback(); - - #define FREE_INT_BUFFER( destBuffer, varNbElement ) \ - { \ - if( intBuffer[0] != PRE_SENTINEL ) \ - { \ - retCode = TA_INTERNAL_ERROR(138); \ - } \ - else if( intBuffer[size+1] != POST_SENTINEL ) \ - { \ - retCode = TA_INTERNAL_ERROR(139); \ - } \ - else \ - { \ - for( i=0; i < varNbElement; i++ ) \ - destBuffer[i] = (double)intBuffer[i+1]; \ - } \ - TA_Free( intBuffer ); \ - } - - FREE_INT_BUFFER( outputBuffer, *outNbElement ); - break; - case TA_SIN_TEST: - retCode = TA_SIN( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_SIN_Lookback(); - break; - default: - retCode = TA_INTERNAL_ERROR(132); - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - const TA_Real *referenceInput; - - TA_Integer *intBuffer; - int size, i; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - - /* Change the input to MEDPRICE for some tests. */ - switch( test->theFunction ) - { - case TA_HT_DCPERIOD_TEST: - case TA_HT_DCPHASE_TEST: - case TA_HT_TRENDLINE_TEST: - case TA_HT_TRENDMODE_TEST: - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[0].in ); - - /* Will be use as reference */ - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[1].in ); - - referenceInput = gBuffer[1].in; - break; - default: - referenceInput = history->close; - } - - /* Make a simple first call. */ - size = (test->endIdx-test->startIdx)+1; - - switch( test->theFunction ) - { - case TA_HT_DCPERIOD_TEST: - retCode = TA_HT_DCPERIOD( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_HT_DCPHASE_TEST: - retCode = TA_HT_DCPHASE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - case TA_HT_TRENDLINE_TEST: - retCode = TA_HT_TRENDLINE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - case TA_HT_TRENDMODE_TEST: - ALLOC_INT_BUFFER(size); - retCode = TA_HT_TRENDMODE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - &intBuffer[1] ); - FREE_INT_BUFFER( gBuffer[0].out0, outNbElement ); - break; - case TA_SIN_TEST: - retCode = TA_SIN( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - default: - retCode = TA_INTERNAL_ERROR(133); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, referenceInput, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output - * are the same buffer. - */ - switch( test->theFunction ) - { - case TA_HT_DCPERIOD_TEST: - retCode = TA_HT_DCPERIOD( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - - case TA_HT_DCPHASE_TEST: - retCode = TA_HT_DCPHASE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - case TA_HT_TRENDLINE_TEST: - retCode = TA_HT_TRENDLINE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - case TA_HT_TRENDMODE_TEST: - ALLOC_INT_BUFFER(size); - retCode = TA_HT_TRENDMODE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - &intBuffer[1] - ); - FREE_INT_BUFFER( gBuffer[0].in, outNbElement ); - break; - case TA_SIN_TEST: - retCode = TA_SIN( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - default: - retCode = TA_INTERNAL_ERROR(134); - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.price = referenceInput; - - if( test->doRangeTestFlag ) - { - switch( test->theFunction ) - { - case TA_HT_DCPERIOD_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_HT_DCPERIOD, - (void *)&testParam, 1, 0 ); - break; - - case TA_HT_DCPHASE_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_HT_DCPHASE, - (void *)&testParam, 1, 360 ); - break; - - case TA_HT_TRENDLINE_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_HT_TRENDLINE, - (void *)&testParam, 1, 0 ); - break; - - case TA_HT_TRENDMODE_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_HT_TRENDMODE, - (void *)&testParam, 1, 0 ); - break; - - default: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - } - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c deleted file mode 100644 index edcf0d4e3..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_1in_2out.c +++ /dev/null @@ -1,469 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 020203 MF First version. - * - */ - -/* Description: - * - * Test functions which have the following - * characterisic: - * - have one input and two outputs - * - there is no optional parameters - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { - TA_HT_PHASOR_TEST, - TA_HT_SINE_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer oneOfTheExpectedOutRealIndex1; - TA_Real oneOfTheExpectedOutReal1; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *price; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /********************************/ - /* Some Hilbert Transform Tests */ - /********************************/ - { 1, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 0, 0.38, - 0, 0.92, - 63, 252-63 }, - { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 1, 0.77, - 1, 1.00, - 63, 252-63 }, - - { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 5, 0.65, - 5, -0.08, - 63, 252-63 }, - - { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 252-67, -0.94, - 252-67, -0.44, - 63, 252-63 }, - - { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 252-66, -0.52, - 252-66, 0.24, - 63, 252-63 }, - - { 0, TA_HT_SINE_TEST, 0, 0, 251, TA_SUCCESS, 252-64, 0.73, - 252-64, 1.00, - 63, 252-63 }, - - { 1, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 0, 0.9456, - 0, 5.2143, - 32, 252-32 }, /* First Value */ - - { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 1, 2.7539, - 1, 2.4129, - 32, 252-32 }, - - { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 9, -0.7235, - 9, -5.9336, - 32, 252-32 }, - - { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 252-34, 0.8386, - 252-34, -0.8913, - 32, 252-32 }, - - { 0, TA_HT_PHASOR_TEST, 0, 0, 251, TA_SUCCESS, 252-33, 0.3258, - 252-33, -0.9447, - 32, 252-32 }, /* Last Value */ - - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_1in_2out( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - - for( i=0; i < NB_TEST; i++ ) - { - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *out1; - TA_Real *out2; - TA_Real *dummyOutput; - - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - dummyOutput = TA_Malloc( (endIdx-startIdx+1) * sizeof(TA_Real) ); - - if( outputNb == 0 ) - { - out1 = outputBuffer; - out2 = dummyOutput; - } - else - { - out1 = dummyOutput; - out2 = outputBuffer; - } - - switch( testParam->test->theFunction ) - { - case TA_HT_PHASOR_TEST: - retCode = TA_HT_PHASOR( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - out1, out2 ); - *lookback = TA_HT_PHASOR_Lookback(); - break; - case TA_HT_SINE_TEST: - retCode = TA_HT_SINE( startIdx, - endIdx, - testParam->price, - outBegIdx, - outNbElement, - out1, out2 ); - *lookback = TA_HT_SINE_Lookback(); - break; - default: - retCode = TA_INTERNAL_ERROR(132); - } - - TA_Free(dummyOutput); - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - const TA_Real *referenceInput; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - - /* Change the input to MEDPRICE for some tests. */ - switch( test->theFunction ) - { - case TA_HT_PHASOR_TEST: - case TA_HT_SINE_TEST: - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[0].in ); - - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[1].in ); - - /* Will be use as reference */ - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[2].in ); - - referenceInput = gBuffer[2].in; - break; - default: - referenceInput = history->close; - } - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_HT_PHASOR_TEST: - retCode = TA_HT_PHASOR( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1 ); - break; - case TA_HT_SINE_TEST: - retCode = TA_HT_SINE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1 ); - break; - default: - retCode = TA_INTERNAL_ERROR(133); - } - - /* Check that the inputs were preserved. */ - errNb = checkDataSame( gBuffer[0].in, referenceInput, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkDataSame( gBuffer[1].in, referenceInput, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output - * are the same buffer. - */ - switch( test->theFunction ) - { - case TA_HT_PHASOR_TEST: - retCode = TA_HT_PHASOR( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in, - gBuffer[1].out1 - ); - break; - case TA_HT_SINE_TEST: - retCode = TA_HT_SINE( test->startIdx, - test->endIdx, - gBuffer[0].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in, - gBuffer[1].out1 - ); - break; - default: - retCode = TA_INTERNAL_ERROR(134); - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkSameContent( gBuffer[0].out1, gBuffer[1].out1 ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); - - /* Make another call where the input and the output - * are the same buffer. - */ - switch( test->theFunction ) - { - case TA_HT_PHASOR_TEST: - retCode = TA_HT_PHASOR( test->startIdx, - test->endIdx, - gBuffer[1].in, - &outBegIdx, - &outNbElement, - gBuffer[1].out0, - gBuffer[1].in - ); - break; - case TA_HT_SINE_TEST: - retCode = TA_HT_SINE( test->startIdx, - test->endIdx, - gBuffer[1].in, - &outBegIdx, - &outNbElement, - gBuffer[1].out0, - gBuffer[1].in - ); - break; - default: - retCode = TA_INTERNAL_ERROR(134); - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out1, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].out0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out0, 0 ); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.price = referenceInput; - - if( test->doRangeTestFlag ) - { - switch( test->theFunction ) - { - case TA_HT_PHASOR_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_HT_PHASOR, - (void *)&testParam, 1, 0 ); - break; - case TA_HT_SINE_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_HT_SINE, - (void *)&testParam, 1, 10 ); - break; - - default: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - } - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c deleted file mode 100644 index 170605bb1..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_adx.c +++ /dev/null @@ -1,682 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Test all the directional movement functions. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum -{ - TST_MINUS_DM, - TST_MINUS_DI, - TST_PLUS_DM, - TST_PLUS_DI, - TST_DX, - TST_ADX, - TST_ADXR -} TestId; - -typedef struct -{ - TestId id; - - TA_Integer doRangeTestFlag; - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /* Test the fixes for Bug#1089506 */ - { TST_MINUS_DI, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 0.0, 1, 252-1 }, - { TST_PLUS_DI, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 0.478, 1, 252-1 }, - { TST_MINUS_DM, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 0.0, 1, 252-1 }, - { TST_PLUS_DM, 1, 0, 0, 251, 1, TA_SUCCESS, 0, 1.69, 1, 252-1 }, - - /* Normal regression tests. */ - { TST_ADXR,1, 0, 0, 251, 14, TA_SUCCESS, 0, 19.8666, 40, 252-40 }, /* First Value */ - { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 1, 18.9092, 40, 252-40 }, - - { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 210, 21.5972, 40, 252-40 }, - { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 211, 20.4920, 40, 252-40 }, /* Last Value */ - - { TST_PLUS_DM, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 10.28, 13, 252-13 }, /* First Value */ - { TST_PLUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 10.317, 13, 252-13 }, - { TST_PLUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 238, 9.58, 13, 252-13 }, /* Last Value */ - - { TST_PLUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 20.3781, 14, 252-14 }, /* First Value */ - - { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 13, 22.1073, 14, 252-14 }, - { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 20.3746, 14, 252-14 }, - { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.0000, 14, 252-14 }, /* Last Value */ - - { TST_MINUS_DM, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 12.995, 13, 252-13 }, /* First Value */ - { TST_MINUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 8.33, 13, 252-13 }, - { TST_MINUS_DM, 0, 0, 0, 251, 14, TA_SUCCESS, 238, 9.672, 13, 252-13 }, /* Last Value */ - - { TST_MINUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 30.1684, 14, 252-14 }, /* First Value */ - { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 24.969182, 14, 252-14 }, - { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.1988, 14, 252-14 }, /* Last Value */ - - { TST_DX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 19.3689, 14, 252-14 }, /* First Value */ - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 9.7131, 14, 252-14 }, - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 2, 17.2905, 14, 252-14 }, - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 236, 10.6731, 14, 252-14 }, - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 0.4722, 14, 252-14 }, /* Last Value */ - - { TST_ADX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 23.0000, 27, 252-27 }, /* First Value */ - { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 22.0802, 27, 252-27 }, - { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 223, 16.6840, 27, 252-27 }, - { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 224, 15.5260, 27, 252-27 } /* Last Value */ - -#if 0 - /*These were the values when using integer rounding in the logic */ - { TST_ADXR,1, 0, 0, 251, 14, TA_SUCCESS, 0, 19.0, 40, 252-40 }, /* First Value */ - { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 1, 18.0, 40, 252-40 }, - { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 210, 22.0, 40, 252-40 }, - { TST_ADXR,0, 0, 0, 251, 14, TA_SUCCESS, 211, 21.0, 40, 252-40 }, /* Last Value */ - - { TST_PLUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 20.0, 14, 252-14 }, /* First Value */ - { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 13, 22.0, 14, 252-14 }, - { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 20.0, 14, 252-14 }, - { TST_PLUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.0, 14, 252-14 }, /* Last Value */ - - { TST_MINUS_DI, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 30.0, 14, 252-14 }, /* First Value */ - { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 14, 25.0, 14, 252-14 }, - { TST_MINUS_DI, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 21.0, 14, 252-14 }, /* Last Value */ - - { TST_DX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 20.0, 14, 252-14 }, /* First Value */ - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 9.0, 14, 252-14 }, - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 2, 18.0, 14, 252-14 }, - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 236, 10.0, 14, 252-14 }, - { TST_DX, 0, 0, 0, 251, 14, TA_SUCCESS, 237, 0.0, 14, 252-14 }, /* Last Value */ - - { TST_ADX, 1, 0, 0, 251, 14, TA_SUCCESS, 0, 23.0, 27, 252-27 }, /* First Value */ - { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 1, 22.0, 27, 252-27 }, - { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 223, 17.0, 27, 252-27 }, - { TST_ADX, 0, 0, 0, 251, 14, TA_SUCCESS, 224, 16.0, 27, 252-27 } /* Last Value */ -#endif -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_adx( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - switch( testParam->test->id ) - { - case TST_MINUS_DM: - retCode = TA_MINUS_DM( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_MINUS_DM_Lookback( testParam->test->optInTimePeriod ); - break; - - case TST_MINUS_DI: - retCode = TA_MINUS_DI( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_MINUS_DI_Lookback( testParam->test->optInTimePeriod ); - break; - - case TST_DX: - retCode = TA_DX( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_DX_Lookback( testParam->test->optInTimePeriod ); - break; - - case TST_ADX: - retCode = TA_ADX( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_ADX_Lookback( testParam->test->optInTimePeriod ); - break; - - case TST_PLUS_DM: - retCode = TA_PLUS_DM( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_PLUS_DM_Lookback( testParam->test->optInTimePeriod ); - break; - - case TST_PLUS_DI: - retCode = TA_PLUS_DI( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_PLUS_DI_Lookback( testParam->test->optInTimePeriod ); - break; - - case TST_ADXR: - retCode = TA_ADXR( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_ADXR_Lookback( testParam->test->optInTimePeriod ); - break; - default: - retCode = TA_BAD_PARAM; - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - setInputBuffer( 3, history->high, history->nbBars ); - - /* Make a simple first call. */ - switch( test->id ) - { - case TST_MINUS_DM: - retCode = TA_SetUnstablePeriod( - TA_FUNC_UNST_MINUS_DM, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_MINUS_DM( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TST_MINUS_DI: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_MINUS_DI, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_MINUS_DI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TST_DX: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_DX, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_DX( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TST_ADX: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_ADX, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_ADX( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TST_PLUS_DM: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_PLUS_DM, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_PLUS_DM( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TST_PLUS_DI: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_PLUS_DI, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_PLUS_DI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TST_ADXR: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_ADX, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - retCode = TA_ADXR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - default: - retCode = TA_BAD_PARAM; - } - - /* Verify that the inputs were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->id ) - { - case TST_MINUS_DM: - retCode = TA_MINUS_DM( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - - case TST_MINUS_DI: - retCode = TA_MINUS_DI( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - - case TST_DX: - retCode = TA_DX( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - - case TST_ADX: - retCode = TA_ADX( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - - case TST_PLUS_DM: - retCode = TA_PLUS_DM( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - - case TST_PLUS_DI: - retCode = TA_PLUS_DI( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - - case TST_ADXR: - retCode = TA_ADXR( test->startIdx, - test->endIdx, - gBuffer[3].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - default: - retCode = TA_BAD_PARAM; - } - - /* Verify that the inputs were preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[3].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[3].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - switch( test->id ) - { - case TST_MINUS_DM: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_MINUS_DM, - (void *)&testParam, 1, 0 ); - break; - - case TST_MINUS_DI: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_MINUS_DI, - (void *)&testParam, 1, 2 ); - break; - - case TST_DX: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_DX, - (void *)&testParam, 1, 2 ); - break; - - case TST_ADX: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_ADX, - (void *)&testParam, 1, 2 ); - break; - - case TST_PLUS_DM: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_PLUS_DM, - (void *)&testParam, 1, 0 ); - break; - - case TST_PLUS_DI: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_PLUS_DI, - (void *)&testParam, 1, 2 ); - break; - - case TST_ADXR: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_ADX, - (void *)&testParam, 1, 2 ); - break; - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c deleted file mode 100644 index 49bf28067..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_avgdev.c +++ /dev/null @@ -1,256 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AB Anatoliy Belsky - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 AB First version. - * - */ - -/* Description: - * Test AVGDEV function. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*************************/ - /* AVGDEV TEST */ - /*************************/ - { 1, 0, 251, 5, TA_SUCCESS, 0, 1.0184, 4, 252-4 }, /* First Value */ - { 0, 0, 251, 5, TA_SUCCESS, 1, 0.3684, 4, 252-4 }, - { 0, 0, 251, 5, TA_SUCCESS, 252-5, 0.5952, 4, 252-4 }, /* Last Value */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_avgdev( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - retCode = TA_AVGDEV( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - - *lookback = TA_AVGDEV_Lookback( testParam->test->optInTimePeriod ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - - /* Make a simple first call. */ - retCode = TA_AVGDEV( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - - errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_AVGDEV( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( - rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c deleted file mode 100644 index bf85e6a17..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_bbands.c +++ /dev/null @@ -1,533 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Regression test of Bollinger Bands (BBANDS). - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - TA_Real optInNbDevUp; - TA_Real optInNbDevDn; - TA_Integer optInMethod_3; - TA_Integer compatibility; - - TA_RetCode expectedRetCode; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer oneOfTheExpectedOutRealIndex1; - TA_Real oneOfTheExpectedOutReal1; - - TA_Integer oneOfTheExpectedOutRealIndex2; - TA_Real oneOfTheExpectedOutReal2; - -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ -static TA_Test tableTest[] = -{ - - /****************************/ - /* BBANDS - CLASSIC - EMA */ - /****************************/ - - /* No multiplier */ - /* With upper band multiplier only. */ - /* With lower band multiplier only. */ - /* With identical upper/lower multiplier. */ - { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, - 19, 252-19, - 13, 93.674, /* Upper */ - 13, 87.679, /* Middle */ - 13, 81.685 }, /* Lower */ - - { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, - 19, 252-19, - 0, 98.0734, /* Upper */ - 0, 92.8910, /* Middle */ - 0, 87.7086 }, /* Lower */ - /* With distinctive upper/lower multiplier. */ - - /****************************/ - /* BBANDS - CLASSIC - SMA */ - /****************************/ - /* No multiplier */ - /* With upper band multiplier only. */ - /* With lower band multiplier only. */ - /* With identical upper/lower multiplier. */ - { 1, 0, 251, 20, 2.0, 2.0, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, - 19, 252-19, - 0, 98.0734, /* Upper */ - 0, 92.8910, /* Middle */ - 0, 87.7086 }, /* Lower */ - /* With distinctive upper/lower multiplier. */ - - - /******************************/ - /* BBANDS - METASTOCK - SMA */ - /******************************/ - - /* No multiplier */ - /* With upper band multiplier only. */ - /* With lower band multiplier only. */ - - /* With identical upper/lower multiplier. */ - { 1, 0, 251, 20, 2.0, 2.0, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 0, 98.0734, /* Upper */ - 0, 92.8910, /* Middle */ - 0, 87.7086 }, /* Lower */ - - /* With distinctive upper/lower multiplier. */ - - /******************************/ - /* BBANDS - METASTOCK - EMA */ - /******************************/ - - /* No multiplier */ - { 1, 0, 251, 20, 1.0, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 0, 94.6914, /* Upper */ - 0, 92.1002, /* Middle */ - 0, 89.5090 }, /* Lower */ - { 0, 0, 251, 20, 1.0, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 3, 94.0477, /* Upper */ - 3, 90.7270, /* Middle */ - 3, 87.4063 }, /* Lower */ - { 0, 0, 251, 20, 1.0, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 252-20, 111.5415, /* Upper */ - 252-20, 108.5265, /* Middle */ - 252-20, 105.5115 }, /* Lower */ - - /* With upper band multiplier only. */ - { 0, 0, 251, 20, 1.5, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 0, 95.9870, /* Upper */ - 0, 92.1002, /* Middle */ - 0, 89.5090}, /* Lower */ - { 0, 0, 251, 20, 1.5, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 3, 95.7080, /* Upper */ - 3, 90.7270, /* Middle */ - 3, 87.4063}, /* Lower */ - { 0, 0, 251, 20, 1.5, 1.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 252-20, 113.0490, /* Upper */ - 252-20, 108.5265, /* Middle */ - 252-20, 105.5115 }, /* Lower */ - - /* With lower band multiplier only. */ - { 1, 0, 251, 20, 1.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 0, 94.6914, /* Upper */ - 0, 92.1002, /* Middle */ - 0, 88.2134 }, /* Lower */ - { 0, 0, 251, 20, 1.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 3, 94.0477, /* Upper */ - 3, 90.7270, /* Middle */ - 3, 85.7460}, /* Lower */ - { 0, 0, 251, 20, 1.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 252-20, 111.5415, /* Upper */ - 252-20, 108.5265, /* Middle */ - 252-20, 104.0040}, /* Lower */ - - /* With identical upper/lower multiplier. */ - { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 0, 97.2826, /* Upper */ - 0, 92.1002, /* Middle */ - 0, 86.9178}, /* Lower */ - { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 1, 97.2637, /* Upper */ - 1, 91.7454, /* Middle */ - 1, 86.2271}, /* Lower */ - { 0, 0, 251, 20, 2.0, 2.0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 252-20, 114.5564, /* Upper */ - 252-20, 108.5265, /* Middle */ - 252-20, 102.4965}, /* Lower */ - - /* With distinctive upper/lower multiplier. */ - { 0, 0, 251, 20, 2.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 0, 97.2826, /* Upper */ - 0, 92.1002, /* Middle */ - 0, 88.2134 }, /* Lower */ - { 0, 0, 251, 20, 2.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 3, 97.3684, /* Upper */ - 3, 90.7270, /* Middle */ - 3, 85.7460}, /* Lower */ - { 0, 0, 251, 20, 2.0, 1.5, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, - 19, 252-19, - 252-20, 114.5564, /* Upper */ - 252-20, 108.5265, /* Middle */ - 252-20, 104.0040} /* Lower */ - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_bbands( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, - tableTest[i].expectedNbElement, - history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *dummyBuffer1, *dummyBuffer2; - TA_Real *out1, *out2, *out3; - - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - dummyBuffer1 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer1 ) - return TA_ALLOC_ERR; - - dummyBuffer2 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer2 ) - { - TA_Free( dummyBuffer1 ); - return TA_ALLOC_ERR; - } - - switch( outputNb ) - { - case 0: - out1 = outputBuffer; - out2 = dummyBuffer1; - out3 = dummyBuffer2; - break; - case 1: - out2 = outputBuffer; - out1 = dummyBuffer1; - out3 = dummyBuffer2; - break; - case 2: - out3 = outputBuffer; - out2 = dummyBuffer1; - out1 = dummyBuffer2; - break; - default: - TA_Free( dummyBuffer1 ); - TA_Free( dummyBuffer2 ); - return TA_BAD_PARAM; - } - - retCode = TA_BBANDS( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - testParam->test->optInNbDevUp, - testParam->test->optInNbDevDn, - (TA_MAType)testParam->test->optInMethod_3, - outBegIdx, outNbElement, - out1, out2, out3 ); - - *lookback = TA_BBANDS_Lookback( testParam->test->optInTimePeriod, - testParam->test->optInNbDevUp, - testParam->test->optInNbDevDn, - (TA_MAType)testParam->test->optInMethod_3 ); - - TA_Free( dummyBuffer1 ); - TA_Free( dummyBuffer2 ); - - return retCode; -} - - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 0 ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - setInputBuffer( 3, history->close, history->nbBars ); - - TA_SetCompatibility( (TA_Compatibility)test->compatibility ); - - /* Make a simple first call. */ - retCode = TA_BBANDS( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - test->optInNbDevUp, - test->optInNbDevDn, - (TA_MAType)test->optInMethod_3, - - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1, - gBuffer[0].out2 ); - - errNb = checkDataSame( gBuffer[0].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[0].out2, 2 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_BBANDS( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - test->optInNbDevUp, - test->optInNbDevDn, - (TA_MAType)test->optInMethod_3, - &outBegIdx, &outNbElement, - gBuffer[1].in, gBuffer[1].out1, gBuffer[1].out2 ); - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out2, 2 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_BBANDS( test->startIdx, - test->endIdx, - gBuffer[2].in, - test->optInTimePeriod, - test->optInNbDevUp, - test->optInNbDevDn, - (TA_MAType)test->optInMethod_3, - &outBegIdx, &outNbElement, - gBuffer[2].out1, - gBuffer[2].in, - gBuffer[2].out2 ); - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[1].out1, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].out1, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[2].in, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[2].out2, 2 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_BBANDS( test->startIdx, - test->endIdx, - gBuffer[3].in, - test->optInTimePeriod, - test->optInNbDevUp, - test->optInNbDevDn, - (TA_MAType)test->optInMethod_3, - &outBegIdx, &outNbElement, - gBuffer[3].out0, - gBuffer[3].out1, - gBuffer[3].in ); - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[2].out2, gBuffer[3].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[3].out0, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[3].out1, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[3].in, 2 ); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - if( test->optInMethod_3 == TA_MAType_EMA ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_EMA, - (void *)&testParam, 3, 0 ); - } - else - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 3, 0 ); - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c deleted file mode 100644 index 87473fea9..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_candlestick.c +++ /dev/null @@ -1,744 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 082304 MF First version. - * 041305 MF Add latest list of function. - */ - -/* Description: - * Test functions for candlestick. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -#define MAX_OPTIN_PARAM 5 -#define MAX_TESTED_OUTPUT 3 - -TA_RetCode TA_SetCandleSettings( TA_CandleSettingType settingType, - TA_RangeType rangeType, - int avgPeriod, - double factor ); - -typedef struct -{ - TA_RangeType bodyLong_type; - int bodyLong_avg; - double bodyLong_factor; - TA_RangeType bodyVeryLong_type; - int bodyVeryLong_avg; - double bodyVeryLong_factor; - TA_RangeType bodyShort_type; - int bodyShort_avg; - double bodyShort_factor; - TA_RangeType bodyDoji_type; - int bodyDoji_avg; - double bodyDoji_factor; - TA_RangeType shadowLong_type; - int shadowLong_avg; - double shadowLong_factor; - TA_RangeType shadowVeryLong_type; - int shadowVeryLong_avg; - double shadowVeryLong_factor; - TA_RangeType shadowShort_type; - int shadowShort_avg; - double shadowShort_factor; - TA_RangeType shadowVeryShort_type; - int shadowVeryShort_avg; - double shadowVeryShort_factor; - TA_RangeType near_type; - int near_avg; - double near_factor; - TA_RangeType far_type; - int far_avg; - double far_factor; -} TA_CDLGlobals; - -typedef struct -{ - int index; - int value; -} TA_ExpectedOutput; - - -typedef struct -{ - /* Indicate which function will be called */ - const char *name; - - /* Indicate if ranging test should be done. - * (These tests are very time consuming). - */ - int doRangeTestFlag; - - /* Range for the function call. - * When both value are -1 a series of automated range - * tests are performed. - */ - TA_Integer startIdx; - TA_Integer endIdx; - - /* Up to 5 parameters depending of functions. - * Will be converted to integer when input is integer. - */ - TA_Real params[MAX_OPTIN_PARAM]; - - /* The expected return code. */ - TA_RetCode expectedRetCode; - - /* When return code is TA_SUCCESS, the following output's - * element are verified. - */ - TA_ExpectedOutput output[MAX_TESTED_OUTPUT]; -} TA_Test; - - -typedef struct -{ - /* Allows to pass key information as an - * opaque parameter for doRangeTest. - */ - const TA_Test *test; - const TA_Real *open; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; - - TA_ParamHolder *paramHolder; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -static ErrorNumber callCandlestick( TA_ParamHolder **paramHolderPtr, - const char *name, - int startIdx, - int endIdx, - const double *inOpen, - const double *inHigh, - const double *inLow, - const double *inClose, - const double optInArray[], - int *outBegIdx, - int *outNbElement, - int outInteger[], - int *lookback, - TA_RetCode *retCode ); -/**** Local variables definitions. ****/ - -/* Some set of globals */ - -/* List of test to perform. */ -static TA_Test tableTest[] = -{ - { "CDL2CROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDL3BLACKCROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDL3INSIDE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDL3LINESTRIKE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDL3OUTSIDE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDL3STARSINSOUTH",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDL3WHITESOLDIERS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLABANDONEDBABY",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLADVANCEBLOCK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLBELTHOLD",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLBREAKAWAY",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLCLOSINGMARUBOZU",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLCONCEALBABYSWALL",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLCOUNTERATTACK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLDARKCLOUDCOVER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLDOJISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLDRAGONFLYDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLENGULFING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLEVENINGDOJISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLEVENINGSTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLGAPSIDESIDEWHITE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLGRAVESTONEDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHAMMER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHANGINGMAN",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHARAMI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHARAMICROSS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHIKKAKE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHIKKAKEMOD",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHIGHWAVE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLHOMINGPIGEON",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLIDENTICAL3CROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLINNECK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLINVERTEDHAMMER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLKICKING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLKICKINGBYLENGTH",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLLADDERBOTTOM",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLLONGLEGGEDDOJI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLLONGLINE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLMARUBOZU",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLMATCHINGLOW",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLMATHOLD",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLMORNINGDOJISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLMORNINGSTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLONNECK",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLPIERCING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLRICKSHAWMAN",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLRISEFALL3METHODS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLSEPARATINGLINES",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLSHOOTINGSTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLSHORTLINE",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLSPINNINGTOP",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLSTALLEDPATTERN",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLSTICKSANDWICH",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLTAKURI",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLTASUKIGAP",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLTHRUSTING",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLTRISTAR",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLUNIQUE3RIVER",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLUPSIDEGAP2CROWS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }}, - { "CDLXSIDEGAP3METHODS",1, 0, 0, {0.0,0.0}, TA_SUCCESS, { {0,0}, {1,1} }} -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_candlestick( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Initialize all the unstable period with a large number that would - * break the logic if a candlestick unexpectably use a function affected - * by an unstable period. - */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 20000 ); - - /* Perform sequentialy all the tests. */ - for( i=0; i < NB_TEST; i++ ) - { - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d for %s (retValue=%d)\n", i, tableTest[i].name, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All tests succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ - -/* Abstract call for all candlestick functions. - * - * Call the function by 'name'. - * - * Optional inputs are pass as an array of double. - * Elements will be converted to integer as needed. - * - * All outputs are returned in the remaining parameters. - * - * 'lookback' is the return value of the corresponding Lookback function. - * taFuncRetCode is the return code from the call of the TA function. - * - */ -static ErrorNumber callCandlestick( TA_ParamHolder **paramHolderPtr, - const char *name, - int startIdx, - int endIdx, - const double *inOpen, - const double *inHigh, - const double *inLow, - const double *inClose, - const double optInArray[], - int *outBegIdx, - int *outNbElement, - int outInteger[], - int *lookback, - TA_RetCode *taFuncRetCode ) -{ - - /* Use the abstract interface to call the function by name. */ - TA_ParamHolder *paramHolder; - const TA_FuncHandle *handle; - const TA_FuncInfo *funcInfo; - const TA_InputParameterInfo *inputInfo; - const TA_OutputParameterInfo *outputInfo; - - TA_RetCode retCode; - - (void)optInArray; - - /* Speed optimization if paramHolder is already initialized. */ - paramHolder = *paramHolderPtr; - if( !paramHolder ) - { - retCode = TA_GetFuncHandle( name, &handle ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't get the function handle [%d]\n", retCode ); - return TA_TSTCDL_GETFUNCHANDLE_FAIL; - } - - retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't allocate the param holder [%d]\n", retCode ); - return TA_TSTCDL_PARAMHOLDERALLOC_FAIL; - } - - *paramHolderPtr = paramHolder; - TA_GetFuncInfo( handle, &funcInfo ); - - /* Verify that the input are only OHLC. */ - if( funcInfo->nbInput != 1 ) - { - printf( "Candlestick are expected to use only OHLC as input.\n" ); - return TA_TSTCDL_NBINPUT_WRONG; - } - - TA_GetInputParameterInfo( handle, 0, &inputInfo ); - - if( inputInfo->type != TA_Input_Price ) - { - printf( "Candlestick are expected to use only OHLC as input.\n" ); - return TA_TSTCDL_INPUT_TYPE_WRONG; - } - - if( inputInfo->flags != (TA_IN_PRICE_OPEN | - TA_IN_PRICE_HIGH | - TA_IN_PRICE_LOW | - TA_IN_PRICE_CLOSE) ) - { - printf( "Candlestick are expected to use only OHLC as input.\n" ); - return TA_TSTCDL_INPUT_FLAG_WRONG; - } - - /* Set the optional inputs. */ - - /* Verify that there is only one output. */ - if( funcInfo->nbOutput != 1 ) - { - printf( "Candlestick are expected to have only one output array.\n" ); - return TA_TSTCDL_NBOUTPUT_WRONG; - } - - TA_GetOutputParameterInfo( handle, 0, &outputInfo ); - if( outputInfo->type != TA_Output_Integer ) - { - printf( "Candlestick are expected to have only one output array of type integer.\n" ); - return TA_TSTCDL_OUTPUT_TYPE_WRONG; - } - - /* !!!!!!!!!!!!! TO BE DONE !!!!!!!!!!!!!!!!!! - * For now all candlestick functions will be called with default optional parameter. - */ - } - - /* Set the input buffers. */ - TA_SetInputParamPricePtr( paramHolder, 0, - inOpen, inHigh, inLow, inClose, NULL, NULL ); - - TA_SetOutputParamIntegerPtr(paramHolder,0,outInteger); - - - /* Do the function call. */ - *taFuncRetCode = TA_CallFunc(paramHolder,startIdx,endIdx,outBegIdx,outNbElement); - - if( *taFuncRetCode != TA_SUCCESS ) - { - printf( "TA_CallFunc() failed [%d]\n", *taFuncRetCode ); - TA_ParamHolderFree( paramHolder ); - return TA_TSTCDL_CALLFUNC_FAIL; - } - - /* Do the lookback function call. */ - retCode = TA_GetLookback( paramHolder, lookback ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_GetLookback() failed [%d]\n", retCode ); - TA_ParamHolderFree( paramHolder ); - return TA_TSTCDL_GETLOOKBACK_FAIL; - } - - return TA_TEST_PASS; -} - -/* rangeTestFunction is a different way to call any of - * the TA function. - * - * This is called by doRangeTest found in test_util.c - * - * The doRangeTest verifies behavior that should be common - * for ALL TA functions. It detects bugs like: - * - outBegIdx, outNbElement and lookback inconsistency. - * - off-by-one writes to output. - * - output inconsistency for different start/end index. - * - ... many other limit cases... - * - * In the case of candlestick, the output is integer and - * should be put in outputBufferInt, and outputBuffer is - * ignored. - */ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RangeTestParam *testParam1; - const TA_Test *testParam2; - ErrorNumber errNb; - - TA_RetCode retCode; - - (void)outputBuffer; - (void)outputNb; - - testParam1 = (TA_RangeTestParam *)opaqueData; - testParam2 = (const TA_Test *)testParam1->test; - - *isOutputInteger = 1; /* Must be != 0 */ - - retCode = TA_INTERNAL_ERROR(166); - - /* Call the TA function by name */ - errNb = callCandlestick( &testParam1->paramHolder, - testParam2->name, - startIdx, endIdx, - testParam1->open, - testParam1->high, - testParam1->low, - testParam1->close, - testParam2->params, - outBegIdx, - outNbElement, - outputBufferInt, - lookback, - &retCode ); - - if( errNb != TA_TEST_PASS ) - retCode = TA_INTERNAL_ERROR(168); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RangeTestParam testParam; - ErrorNumber errNb; - TA_RetCode retCode; - - (void)test; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->open, history->nbBars ); - setInputBuffer( 1, history->high, history->nbBars ); - setInputBuffer( 2, history->low, history->nbBars ); - setInputBuffer( 3, history->close, history->nbBars ); - - -#if 0 - /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ - /* Test for specific value not yet implemented */ - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_CCI_TEST: - retCode = TA_CCI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_WILLR_TEST: - retCode = TA_WILLR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - default: - retCode = TA_INTERNAL_ERROR(133); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_CCI_TEST: - retCode = TA_CCI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - case TA_WILLR_TEST: - retCode = TA_WILLR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(134); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call to TA_MA should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - setInputBuffer( 0, history->high, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_CCI_TEST: - retCode = TA_CCI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_WILLR_TEST: - retCode = TA_WILLR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(135); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - setInputBuffer( 1, history->low, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_CCI_TEST: - retCode = TA_CCI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - case TA_WILLR_TEST: - retCode = TA_WILLR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(136); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call to TA_MA should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); - setInputBuffer( 2, history->close, history->nbBars ); -#endif - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.open = history->open; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - testParam.paramHolder = NULL; - - if( test->doRangeTestFlag ) - { - - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - - if( testParam.paramHolder ) - { - retCode = TA_ParamHolderFree( testParam.paramHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_ParamHolderFree failed [%d]\n", retCode ); - return TA_TSTCDL_PARAMHOLDERFREE_FAIL; - } - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c deleted file mode 100644 index ebc8ca14e..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_imi.c +++ /dev/null @@ -1,293 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * AB Anatoliy Belsky - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 AB First version. - * - */ - -/* Description: - * Test AVGDEV function. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; - const TA_Real *open; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*************************/ - /* AVGDEV TEST */ - /*************************/ - { 1, 0, 0, 251, 5, TA_SUCCESS, 0, 55.9194, 4, 252-4 }, /* First Value */ - { 0, 0, 0, 251, 5, TA_SUCCESS, 1, 64.6143, 4, 252-4 }, - { 0, 0, 0, 251, 5, TA_SUCCESS, 252-5, 7.730673, 4, 252-4 }, /* Last Value */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_imi( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - retCode = TA_IMI( - startIdx, - endIdx, - testParam->open, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - - *lookback = TA_IMI_Lookback( testParam->test->optInTimePeriod ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->open, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - setInputBuffer( 2, history->open, history->nbBars ); - - retCode = TA_SetUnstablePeriod( - TA_FUNC_UNST_IMI, - test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - /* Make a simple first call. */ - retCode = TA_IMI( - test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - - /* Verify that the inputs were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkDataSame( gBuffer[1].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_IMI( - test->startIdx, - test->endIdx, - gBuffer[2].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - - /* Verify that the inputs were preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - - - // TODO: Review remaining code, unexpectable fails, the test might be wrong!? - return TA_TEST_PASS; - -#if 0 - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - testParam.open = history->open; -// XXX FAIL HERE - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( - rangeTestFunction, - TA_FUNC_UNST_IMI, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -#endif -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c deleted file mode 100644 index f7673355f..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_ma.c +++ /dev/null @@ -1,816 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 031707 MF Add TA_MAVP tests. - */ - -/* Description: - * Test all MA (Moving Average) functions. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { - TA_ANY_MA_TEST, - TA_MAMA_TEST, - TA_FAMA_TEST -} TA_TestId; - - -typedef struct -{ - TA_Integer doRangeTestFlag; - TA_TestId id; - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - TA_Integer optInTimePeriod; - TA_Integer optInMAType_1; - TA_Integer compatibility; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex; - TA_Real oneOfTheExpectedOutReal; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; - const TA_Real *mavpPeriod; - int testMAVP; /* Boolean */ -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test_ma( const TA_History *history, - const TA_Test *test, - int testMAVP /* Boolean */ ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /************/ - /* T3 TEST */ - /************/ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 85.73, 24, 252-24 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 84.37, 24, 252-24 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-26, 109.03, 24, 252-24 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 5, TA_MAType_T3, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-25, 108.88, 24, 252-24 }, /* Last Value */ - - /***************/ - /* TRIMA TEST */ - /***************/ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.6043, 9, 252-9 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 93.4252, 9, 252-9 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-11, 109.1850, 9, 252-9 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-10, 109.1407, 9, 252-9 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 9, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.8176, 8, 252-8 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 9, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-9, 109.1312, 8, 252-8 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 12, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.5329, 11, 252-11 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 12, TA_MAType_TRIMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-12, 109.1157, 11, 252-11 }, /* Last Value */ - - - - /************* - * MAMA TEST * - *************/ - { 1, TA_MAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 85.3643, 32, 252-32 }, /* First Value */ - { 0, TA_MAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-33, 110.1116, 32, 252-32 }, /* Last Value */ - - { 0, TA_FAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 81.88, 32, 252-32 }, /* First Value */ - { 0, TA_FAMA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-33, 108.82, 32, 252-32 }, /* Last Value */ - - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 85.3643, 32, 252-32 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_MAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-33, 110.1116, 32, 252-32 }, /* Last Value */ - - /***************************/ - /* KAMA TEST - Classic */ - /***************************/ - - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0}, -#ifndef TA_FUNC_NO_RANGE_CHECK - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* Test with period 10 */ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 92.6575, 10, 252-10 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 92.7783, 10, 252-10 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_KAMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-11, 109.294, 10, 252-10 }, /* Last Value */ - - - /*****************************************/ - /* SMA TEST - CLASSIC/METASTOCK */ - /*****************************************/ - -#ifndef TA_FUNC_NO_RANGE_CHECK - /* Test with invalid parameters */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, -1, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* Test suppose to succeed. */ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.15, 1, 252-1 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 94.59, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 94.73, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 250, 108.31, 1, 252-1 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 90.42, 29, 252-29 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 90.21, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 89.96, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 29, 87.12, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 221, 107.95, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 222, 108.42, 29, 252-29 }, /* Last Value */ - - /* Same test and result as TA_COMPATIBILITY_DEFAULT */ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.15, 1, 252-1 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.59, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 94.73, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250, 108.31, 1, 252-1 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 90.42, 29, 252-29 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 90.21, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 89.96, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 29, 87.12, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 221, 107.95, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 222, 108.42, 29, 252-29 }, /* Last Value */ - - - /*******************************/ - /* WMA TEST - CLASSIC */ - /*******************************/ - -#ifndef TA_FUNC_NO_RANGE_CHECK - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* One value tests. */ - { 0, TA_ANY_MA_TEST, 0, 2, 2, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 94.52, 2, 1 }, - - /* Misc tests: period 2, 30 */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.71, 1, 252-1 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 94.52, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 94.85, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 250, 108.16, 1, 252-1 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 88.567, 29, 252-29 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 88.233, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 88.034, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 29, 87.191, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 221, 109.3413, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 222, 109.3466, 29, 252-29 }, /* Last Value */ - - /*******************************/ - /* WMA TEST - METASTOCK */ - /*******************************/ - - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, -#ifndef TA_FUNC_NO_RANGE_CHECK - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* One value tests. */ - { 0, TA_ANY_MA_TEST, 0, 2, 2, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 94.52, 2, 1 }, - - /* Misc tests: period 2, 30 */ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.71, 1, 252-1 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.52, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 94.85, 1, 252-1 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250, 108.16, 1, 252-1 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 88.567, 29, 252-29 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 88.233, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 88.034, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 29, 87.191, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 221, 109.3413, 29, 252-29 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 30, TA_MAType_WMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 222, 109.3466, 29, 252-29 }, /* Last Value */ - - /*******************************/ - /* EMA TEST - Classic */ - /*******************************/ - - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0}, -#ifndef TA_FUNC_NO_RANGE_CHECK - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* Misc tests: period 2, 10 */ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.15, 1, 251 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 93.96, 1, 251 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 250, 108.21, 1, 251 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 93.22, 9, 243 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 93.75, 9, 243 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 20, 86.46, 9, 243 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 242, 108.97, 9, 243 }, /* Last Value */ - - /*******************************/ - /* EMA TEST - Metastock */ - /*******************************/ - - - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, -#ifndef TA_FUNC_NO_RANGE_CHECK - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* Test with 1 unstable price bar. Test for period 2, 10 */ - { 1, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 94.15, 1+1, 251-1 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.78, 1+1, 251-1 }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250-1, 108.21, 1+1, 251-1 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.24, 9+1, 243-1 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 93.97, 9+1, 243-1 }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 20, 86.23, 9+1, 243-1 }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 242-1, 108.97, 9+1, 243-1 }, /* Last Value */ - - /* Test with 2 unstable price bar. Test for period 2, 10 */ - { 0, TA_ANY_MA_TEST, 2, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 94.78, 1+2, 251-2 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 2, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.11, 1+2, 251-2 }, - { 0, TA_ANY_MA_TEST, 2, 0, 251, 2, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 250-2, 108.21, 1+2, 251-2 }, /* Last Value */ - - { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.97, 9+2, 243-2 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.79, 9+2, 243-2 }, - { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 20, 86.39, 9+2, 243-2 }, - { 0, TA_ANY_MA_TEST, 2, 0, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 242-2, 108.97, 9+2, 243-2 }, /* Last Value */ - - /* Last 3 value with 1 unstable, period 10 */ - { 0, TA_ANY_MA_TEST, 1, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 109.22, 249, 3 }, - { 0, TA_ANY_MA_TEST, 1, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 108.97, 249, 3 }, - - /* Last 3 value with 2 unstable, period 10 */ - { 0, TA_ANY_MA_TEST, 2, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 108.97, 249, 3 }, - - /* Last 3 value with 3 unstable, period 10 */ - { 0, TA_ANY_MA_TEST, 3, 249, 251, 10, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 108.97, 249, 3 }, - - /*******************************/ - /* DEMA TEST - Metastock */ - /*******************************/ - - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, -#ifndef TA_FUNC_NO_RANGE_CHECK - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* Test with period 14 */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 83.785, 26, 252-26 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 84.768, 26, 252-26 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-27, 109.467, 26, 252-26 }, /* Last Value */ - - /* Test with 1 unstable price bar. Test for period 2, 14 */ - { 1, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 93.960, 4, 252-4 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 94.522, 4, 252-4 }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 2, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-5, 107.94, 4, 252-4 }, /* Last Value */ - - { 1, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 84.91, (13*2)+2, 252-((13*2)+2) }, /* First Value */ - { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 84.97, (13*2)+2, 252-((13*2)+2) }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 84.80, (13*2)+2, 252-((13*2)+2) }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 3, 85.14, (13*2)+2, 252-((13*2)+2) }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 20, 89.83, (13*2)+2, 252-((13*2)+2) }, - { 0, TA_ANY_MA_TEST, 1, 0, 251, 14, TA_MAType_DEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-((13*2)+2+1), 109.4676, (13*2)+2, 252-((13*2)+2) }, /* Last Value */ - - /*******************************/ - /* TEMA TEST - Metastock */ - /*******************************/ - /* No output value. */ - { 0, TA_ANY_MA_TEST, 0, 1, 1, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, -#ifndef TA_FUNC_NO_RANGE_CHECK - { 0, TA_ANY_MA_TEST, 0, 0, 251, 0, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_BAD_PARAM, 0, 0, 0, 0 }, -#endif - - /* Test with period 14 */ - { 1, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 84.721, 39, 252-39 }, /* First Value */ - { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 84.089, 39, 252-39 }, - { 0, TA_ANY_MA_TEST, 0, 0, 251, 14, TA_MAType_TEMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-40, 108.418, 39, 252-39 }, /* Last Value */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_ma( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "TA_MA Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test_ma( history, &tableTest[i], 0 ); - if( retValue != 0 ) - { - printf( "TA_MA Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - - /* If TA_ANY_MA_TEST. repeat test with TA_MAVP */ - if( tableTest[i].id == TA_ANY_MA_TEST ) - { - retValue = do_test_ma( history, &tableTest[i], 1 ); - if( retValue != 0 ) - { - printf( "TA_MAVP Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *dummyBuffer; - - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - switch( testParam->test->optInMAType_1 ) - { - case TA_MAType_MAMA: - dummyBuffer = TA_Malloc( sizeof(TA_Real)*(endIdx-startIdx+600) ); - if( outputNb == 0 ) - { - retCode = TA_MAMA( startIdx, - endIdx, - testParam->close, - 0.5, 0.05, - outBegIdx, - outNbElement, - outputBuffer, - &dummyBuffer[300] ); - } - else - { - retCode = TA_MAMA( startIdx, - endIdx, - testParam->close, - 0.5, 0.05, - outBegIdx, - outNbElement, - &dummyBuffer[300], - outputBuffer ); - } - TA_Free( dummyBuffer ); - *lookback = TA_MAMA_Lookback( 0.5, 0.05 ); - break; - default: - if( testParam->testMAVP ) - { - retCode = TA_MAVP( startIdx, - endIdx, - testParam->close, - testParam->mavpPeriod, - 2,testParam->test->optInTimePeriod, - (TA_MAType)testParam->test->optInMAType_1, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_MAVP_Lookback( 2, testParam->test->optInTimePeriod, - (TA_MAType)testParam->test->optInMAType_1 ); - } - else - { - /* Test for the TA_MA function. All the MA can be done - * through that function. - */ - retCode = TA_MA( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - (TA_MAType)testParam->test->optInMAType_1, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_MA_Lookback( testParam->test->optInTimePeriod, - (TA_MAType)testParam->test->optInMAType_1 ); - } - break; - } - - return retCode; -} - -static ErrorNumber do_test_ma( const TA_History *history, - const TA_Test *test, - int testMAVP ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - TA_Integer temp, temp2; - const TA_Real *referenceInput; - - /* TA_MAVP is tested only for TA_ANY_MA_TEST */ - if( testMAVP && (test->id != TA_ANY_MA_TEST) ) - { - return TA_TEST_PASS; - } - - TA_SetCompatibility( (TA_Compatibility)test->compatibility ); - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - if( testMAVP ) - { - setInputBufferValue( 2, test->optInTimePeriod, history->nbBars ); - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* Set the unstable period requested for that test. */ - switch( test->optInMAType_1 ) - { - case TA_MAType_TEMA: - case TA_MAType_DEMA: - case TA_MAType_EMA: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, test->unstablePeriod ); - break; - case TA_MAType_KAMA: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_KAMA, test->unstablePeriod ); - break; - case TA_MAType_MAMA: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_MAMA, test->unstablePeriod ); - break; - case TA_MAType_T3: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_T3, test->unstablePeriod ); - break; - default: - retCode = TA_SUCCESS; - break; - } - - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - /* Transform the inputs for MAMA (it is an AVGPRICE in John Ehlers book). */ - if( test->optInMAType_1 == TA_MAType_MAMA ) - { - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[0].in ); - - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[1].in ); - - /* Will be use as reference */ - TA_MEDPRICE( 0, history->nbBars-1, history->high, history->low, - &outBegIdx, &outNbElement, gBuffer[2].in ); - referenceInput = gBuffer[2].in; - } - else - referenceInput = history->close; - - - - /* Make a simple first call. */ - switch( test->id ) - { - case TA_ANY_MA_TEST: - if(testMAVP) - { - retCode = TA_MAVP( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[2].in, - 2, test->optInTimePeriod, - (TA_MAType)test->optInMAType_1, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - else - { - retCode = TA_MA( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - (TA_MAType)test->optInMAType_1, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - break; - case TA_MAMA_TEST: - retCode = TA_MAMA( test->startIdx, - test->endIdx, - gBuffer[0].in, - 0.5, 0.05, - &outBegIdx, - &outNbElement, - gBuffer[0].out0, - gBuffer[0].out2 ); - - break; - case TA_FAMA_TEST: - retCode = TA_MAMA( test->startIdx, - test->endIdx, - gBuffer[0].in, - 0.5, 0.05, - &outBegIdx, - &outNbElement, - gBuffer[0].out2, - gBuffer[0].out0 ); - - break; - } - - errNb = checkDataSame( gBuffer[0].in, referenceInput, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[0].out0, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->id ) - { - case TA_ANY_MA_TEST: - if(testMAVP) - { - retCode = TA_MAVP( test->startIdx, - test->endIdx, - gBuffer[1].in, - gBuffer[2].in, - 2,test->optInTimePeriod, - (TA_MAType)test->optInMAType_1, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - else - { - retCode = TA_MA( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - (TA_MAType)test->optInMAType_1, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - break; - case TA_MAMA_TEST: - retCode = TA_MAMA( test->startIdx, - test->endIdx, - gBuffer[1].in, - 0.5, 0.05, - &outBegIdx, - &outNbElement, - gBuffer[1].in, - gBuffer[0].out2 ); - break; - case TA_FAMA_TEST: - retCode = TA_MAMA( test->startIdx, - test->endIdx, - gBuffer[1].in, - 0.5, 0.05, - &outBegIdx, - &outNbElement, - gBuffer[0].out2, - gBuffer[1].in ); - break; - } - - /* The previous call to TA_MA should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[1].in, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Verify that the "all-purpose" TA_MA_Lookback is consistent - * with the corresponding moving average lookback function. - */ - if( test->optInTimePeriod >= 2 ) - { - switch( test->optInMAType_1 ) - { - case TA_MAType_WMA: - temp = TA_WMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_SMA: - temp = TA_SMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_EMA: - temp = TA_EMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_DEMA: - temp = TA_DEMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_TEMA: - temp = TA_TEMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_KAMA: - temp = TA_KAMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_MAMA: - temp = TA_MAMA_Lookback( 0.5, 0.05 ); - break; - - case TA_MAType_TRIMA: - temp = TA_TRIMA_Lookback( test->optInTimePeriod ); - break; - - case TA_MAType_T3: - temp = TA_T3_Lookback( test->optInTimePeriod, 0.7 ); - break; - - default: - return TA_TEST_TFRR_BAD_MA_TYPE; - } - - temp2 = TA_MA_Lookback( test->optInTimePeriod, (TA_MAType)test->optInMAType_1 ); - - if( temp != temp2 ) - { - printf( "\nFailed for MA Type #%d for period %d\n", test->optInMAType_1, test->optInTimePeriod ); - return TA_TEST_TFFR_BAD_MA_LOOKBACK; - } - } - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = referenceInput; - testParam.testMAVP = testMAVP; - testParam.mavpPeriod = gBuffer[2].in; - - if( test->doRangeTestFlag ) - { - switch( test->optInMAType_1 ) - { - case TA_MAType_TEMA: - case TA_MAType_DEMA: - case TA_MAType_EMA: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_EMA, - (void *)&testParam, 1, 0 ); - break; - case TA_MAType_T3: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_T3, - (void *)&testParam, 1, 0 ); - break; - case TA_MAType_KAMA: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_KAMA, - (void *)&testParam, 1, 0 ); - break; - case TA_MAType_MAMA: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_MAMA, - (void *)&testParam, 2, 0 ); - break; - default: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c deleted file mode 100644 index dbe2731ac..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_macd.c +++ /dev/null @@ -1,603 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Regression test of MACD. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_MACD_TEST, -TA_MACDFIX_TEST, -TA_MACDEXT_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - TA_TestId testId; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInFastPeriod; - TA_Integer optInSlowPeriod; - TA_Integer optInSignalPeriod_2; - TA_Integer compatibility; - - TA_RetCode expectedRetCode; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer oneOfTheExpectedOutRealIndex1; - TA_Real oneOfTheExpectedOutReal1; - - TA_Integer oneOfTheExpectedOutRealIndex2; - TA_Real oneOfTheExpectedOutReal2; - -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ -static TA_Test tableTest[] = -{ - - /*********************/ - /* MACD - CLASSIC */ - /*********************/ - { 0, TA_MACD_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ - 0, -1.9738, /* MACD */ - 0, -2.7071, /* Signal */ - 0, (-1.9738)-(-2.7071) }, /* Histogram */ - - /* Test period inversion */ - { 0, TA_MACD_TEST, 0, 251, 26, 12, 9, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ - 0, -1.9738, /* MACD */ - 0, -2.7071, /* Signal */ - 0, (-1.9738)-(-2.7071) }, /* Histogram */ - - /***********************/ - /* MACD - METASTOCK */ - /***********************/ - - /*******************************/ - /* MACDEXT - MIMIC CLASSIC */ - /*******************************/ - { 0, TA_MACDEXT_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ - 0, -1.9738, /* MACD */ - 0, -2.7071, /* Signal */ - 0, (-1.9738)-(-2.7071)}, /* Histogram */ - - /***************************/ - /* MACD FIX - CLASSIC */ - /***************************/ - - /***************************/ - /* MACD FIX - METASTOCK */ - /***************************/ - { 1, TA_MACDFIX_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 33, 252-33, /* 25, 252-25,*/ - 0, -1.2185, /* MACD */ - 0, -1.7119, /* Signal */ - 0, (-1.2185)-(-1.7119) }, /* Histogram */ - - { 0, TA_MACDFIX_TEST, 0, 251, 12, 26, 9, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 33, 252-33, - 252-34, 0.8764, /* MACD */ - 252-34, 1.3533, /* Signal */ - 252-34, (0.8764)-(1.3533)}, /* Histogram */ - /* Test period inversion */ - { 0, TA_MACDFIX_TEST, 0, 251, 26, 12, 9, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 33, 252-33, - 252-34, 0.8764, /* MACD */ - 252-34, 1.3533, /* Signal */ - 252-34, (0.8764)-(1.3533)} /* Histogram */ - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_macd( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "TA_MACD Failed Bad Parameter for Test #%d (%d,%d)\n", - i, - tableTest[i].expectedNbElement, - history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "TA_MACD Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *dummyBuffer1, *dummyBuffer2; - TA_Real *out1, *out2, *out3; - - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - dummyBuffer1 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer1 ) - return TA_ALLOC_ERR; - - dummyBuffer2 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer2 ) - { - TA_Free( dummyBuffer1 ); - return TA_ALLOC_ERR; - } - - switch( outputNb ) - { - case 0: - out1 = outputBuffer; - out2 = dummyBuffer1; - out3 = dummyBuffer2; - break; - case 1: - out2 = outputBuffer; - out1 = dummyBuffer1; - out3 = dummyBuffer2; - break; - case 2: - out3 = outputBuffer; - out2 = dummyBuffer1; - out1 = dummyBuffer2; - break; - default: - TA_Free( dummyBuffer1 ); - TA_Free( dummyBuffer2 ); - return TA_BAD_PARAM; - } - - switch( testParam->test->testId ) - { - case TA_MACDFIX_TEST: - retCode = TA_MACDFIX( startIdx, - endIdx, - testParam->close, - testParam->test->optInSignalPeriod_2, - outBegIdx, outNbElement, - out1, out2, out3 ); - *lookback = TA_MACDFIX_Lookback( testParam->test->optInSignalPeriod_2 ); - break; - case TA_MACD_TEST: - retCode = TA_MACD( startIdx, - endIdx, - testParam->close, - testParam->test->optInFastPeriod, - testParam->test->optInSlowPeriod, - testParam->test->optInSignalPeriod_2, - outBegIdx, outNbElement, - out1, out2, out3 ); - - *lookback = TA_MACD_Lookback( testParam->test->optInFastPeriod, - testParam->test->optInSlowPeriod, - testParam->test->optInSignalPeriod_2 ); - break; - case TA_MACDEXT_TEST: - retCode = TA_MACDEXT( startIdx, - endIdx, - testParam->close, - testParam->test->optInFastPeriod, - TA_MAType_EMA, - testParam->test->optInSlowPeriod, - TA_MAType_EMA, - testParam->test->optInSignalPeriod_2, - TA_MAType_EMA, - outBegIdx, outNbElement, - out1, out2, out3 ); - - *lookback = TA_MACDEXT_Lookback( testParam->test->optInFastPeriod, - TA_MAType_EMA, - testParam->test->optInSlowPeriod, - TA_MAType_EMA, - testParam->test->optInSignalPeriod_2, - TA_MAType_EMA ); - break; - default: - retCode = TA_BAD_PARAM; - } - - TA_Free( dummyBuffer1 ); - TA_Free( dummyBuffer2 ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 0 ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - TA_SetCompatibility( (TA_Compatibility)test->compatibility ); - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - setInputBuffer( 3, history->close, history->nbBars ); - - CLEAR_EXPECTED_VALUE(0); - CLEAR_EXPECTED_VALUE(1); - CLEAR_EXPECTED_VALUE(2); - - /* Make a simple first call. */ - switch( test->testId ) - { - case TA_MACDFIX_TEST: - retCode = TA_MACDFIX( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1, - gBuffer[0].out2 ); - break; - case TA_MACD_TEST: - retCode = TA_MACD(test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInFastPeriod, - test->optInSlowPeriod, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1, - gBuffer[0].out2 ); - break; - case TA_MACDEXT_TEST: - retCode = TA_MACDEXT( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInFastPeriod, - TA_MAType_EMA, - test->optInSlowPeriod, - TA_MAType_EMA, - test->optInSignalPeriod_2, - TA_MAType_EMA, - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1, - gBuffer[0].out2 ); - break; - } - - - errNb = checkDataSame( gBuffer[0].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[0].out2, 2 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->testId ) - { - case TA_MACDFIX_TEST: - retCode = TA_MACDFIX( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[1].in, - gBuffer[1].out1, - gBuffer[1].out2 ); - break; - case TA_MACD_TEST: - retCode = TA_MACD(test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInFastPeriod, - test->optInSlowPeriod, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[1].in, - gBuffer[1].out1, - gBuffer[1].out2 ); - break; - case TA_MACDEXT_TEST: - retCode = TA_MACDEXT( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInFastPeriod, - TA_MAType_EMA, - test->optInSlowPeriod, - TA_MAType_EMA, - test->optInSignalPeriod_2, - TA_MAType_EMA, - &outBegIdx, &outNbElement, - gBuffer[1].in, - gBuffer[1].out1, - gBuffer[1].out2 ); - break; - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out2, 2 ); - - outBegIdx = outNbElement = 0; - - CLEAR_EXPECTED_VALUE(0); - CLEAR_EXPECTED_VALUE(1); - CLEAR_EXPECTED_VALUE(2); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->testId ) - { - case TA_MACDFIX_TEST: - retCode = TA_MACDFIX( - test->startIdx, - test->endIdx, - gBuffer[2].in, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[2].out1, - gBuffer[2].in, - gBuffer[2].out2 ); - break; - - case TA_MACD_TEST: - retCode = TA_MACD( - test->startIdx, - test->endIdx, - gBuffer[2].in, - test->optInFastPeriod, - test->optInSlowPeriod, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[2].out1, - gBuffer[2].in, - gBuffer[2].out2 ); - break; - case TA_MACDEXT_TEST: - retCode = TA_MACDEXT( - test->startIdx, - test->endIdx, - gBuffer[2].in, - test->optInFastPeriod, - TA_MAType_EMA, - test->optInSlowPeriod, - TA_MAType_EMA, - test->optInSignalPeriod_2, - TA_MAType_EMA, - &outBegIdx, &outNbElement, - gBuffer[2].out1, - gBuffer[2].in, - gBuffer[2].out2 ); - break; - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[1].out1, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].out1, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[2].in, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[2].out2, 2 ); - - outBegIdx = outNbElement = 0; - - CLEAR_EXPECTED_VALUE(0); - CLEAR_EXPECTED_VALUE(1); - CLEAR_EXPECTED_VALUE(2); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->testId ) - { - case TA_MACDFIX_TEST: - retCode = TA_MACDFIX( test->startIdx, - test->endIdx, - gBuffer[3].in, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[3].out1, - gBuffer[3].out2, - gBuffer[3].in ); - break; - case TA_MACD_TEST: - retCode = TA_MACD(test->startIdx, - test->endIdx, - gBuffer[3].in, - test->optInFastPeriod, - test->optInSlowPeriod, - test->optInSignalPeriod_2, - &outBegIdx, &outNbElement, - gBuffer[3].out1, - gBuffer[3].out2, - gBuffer[3].in ); - break; - case TA_MACDEXT_TEST: - retCode = TA_MACDEXT( test->startIdx, - test->endIdx, - gBuffer[3].in, - test->optInFastPeriod, - TA_MAType_EMA, - test->optInSlowPeriod, - TA_MAType_EMA, - test->optInSignalPeriod_2, - TA_MAType_EMA, - &outBegIdx, &outNbElement, - gBuffer[3].out1, - gBuffer[3].out2, - gBuffer[3].in ); - break; - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[2].out2, gBuffer[3].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[3].out1, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[3].out2, 1 ); - CHECK_EXPECTED_VALUE( gBuffer[3].in, 2 ); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_EMA, - (void *)&testParam, 3, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c deleted file mode 100644 index 58897482d..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_minmax.c +++ /dev/null @@ -1,833 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 122506 MF Add tests for MININDEX,MAXINDEX,MINMAX and MINMAXINDEX. - */ - -/* Description: - * Test the min/max related functions. - * - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_MIN_TEST, -TA_MAX_TEST, -TA_MINMAX_TEST, -TA_MININDEX_TEST, -TA_MAXINDEX_TEST, -TA_MINMAXINDEX_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Real *input; - unsigned int nbElement; -} TA_RefTest; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -static TA_RetCode referenceMin( TA_Integer startIdx, - TA_Integer endIdx, - const TA_Real inReal[], - TA_Integer optInTimePeriod, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Real outReal[] ); - -static TA_RetCode referenceMax( TA_Integer startIdx, - TA_Integer endIdx, - const TA_Real inReal[], - TA_Integer optInTimePeriod, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Real outReal[] ); - -static ErrorNumber testCompareToReference( const TA_Real *input, int nbElement ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /**********************/ - /* MIN TEST */ - /**********************/ - - /* No output value. */ - { 0, TA_MIN_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_MIN_TEST, 14, 14, 14, TA_SUCCESS, 0, 91.125, 14, 1}, - - /* Index too low test. */ - { 0, TA_MIN_TEST, 0, 15, 14, TA_SUCCESS, 0, 91.125, 13, 3}, - { 0, TA_MIN_TEST, 1, 15, 14, TA_SUCCESS, 0, 91.125, 13, 3}, - { 0, TA_MIN_TEST, 2, 16, 14, TA_SUCCESS, 0, 91.125, 13, 4}, - { 0, TA_MIN_TEST, 2, 16, 14, TA_SUCCESS, 1, 91.125, 13, 4}, - { 0, TA_MIN_TEST, 2, 16, 14, TA_SUCCESS, 2, 91.125, 13, 4}, - { 0, TA_MIN_TEST, 0, 14, 14, TA_SUCCESS, 0, 91.125, 13, 2}, - { 0, TA_MIN_TEST, 0, 13, 14, TA_SUCCESS, 0, 91.125, 13, 1}, - - /* Middle of data test. */ - { 0, TA_MIN_TEST, 20, 21, 14, TA_SUCCESS, 0, 89.345, 20, 2 }, - { 0, TA_MIN_TEST, 20, 21, 14, TA_SUCCESS, 1, 87.94, 20, 2 }, - - /* Misc tests: 2 and 14 periods */ - { 1, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, /* First Value */ - { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 1, 91.125, 13, 252-13 }, - { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 2, 91.125, 13, 252-13 }, - { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 3, 91.125, 13, 252-13 }, - { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 4, 89.75, 13, 252-13 }, - { 0, TA_MIN_TEST, 0, 251, 14, TA_SUCCESS, 252-14, 107.75, 13, 252-13 }, /* Last Value */ - - { 1, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 0, 91.5, 1, 252-1 }, /* First Value */ - { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 1, 91.5, 1, 252-1 }, - { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 2, 93.97, 1, 252-1 }, - { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 3, 93.97, 1, 252-1 }, - { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 4, 94.5, 1, 252-1 }, - { 0, TA_MIN_TEST, 0, 251, 2, TA_SUCCESS, 252-2, 109.19, 1, 252-1 }, /* Last Value */ - - /**********************/ - /* MAX TEST */ - /**********************/ - - /* One value tests. */ - { 0, TA_MAX_TEST, 14, 14, 14, TA_SUCCESS, 0, 98.815, 14, 1}, - - /* Index too low test. */ - { 0, TA_MAX_TEST, 0, 15, 14, TA_SUCCESS, 0, 98.815, 13, 3}, - { 0, TA_MAX_TEST, 1, 15, 14, TA_SUCCESS, 0, 98.815, 13, 3}, - { 0, TA_MAX_TEST, 2, 16, 14, TA_SUCCESS, 0, 98.815, 13, 4}, - { 0, TA_MAX_TEST, 2, 16, 14, TA_SUCCESS, 1, 98.815, 13, 4}, - { 0, TA_MAX_TEST, 2, 16, 14, TA_SUCCESS, 2, 98.815, 13, 4}, - { 0, TA_MAX_TEST, 0, 14, 14, TA_SUCCESS, 0, 98.815, 13, 2}, - { 0, TA_MAX_TEST, 0, 13, 14, TA_SUCCESS, 0, 98.815, 13, 1}, - - /* Middle of data test. */ - { 0, TA_MAX_TEST, 20, 21, 14, TA_SUCCESS, 0, 98.815, 20, 2 }, - { 0, TA_MAX_TEST, 20, 21, 14, TA_SUCCESS, 1, 98.815, 20, 2 }, - { 0, TA_MAX_TEST, 20, 99, 14, TA_SUCCESS, 6, 93.405, 20, 80 }, - { 0, TA_MAX_TEST, 20, 99, 14, TA_SUCCESS, 6, 93.405, 20, 80 }, - { 0, TA_MAX_TEST, 20, 99, 14, TA_SUCCESS, 13, 89.78, 20, 80 }, - - /* Misc tests: 1, 2 and 14 periods */ - { 1, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 0, 98.815, 13, 252-13 }, /* First Value */ - { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 1, 98.815, 13, 252-13 }, - { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 2, 98.815, 13, 252-13 }, - { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 3, 98.815, 13, 252-13 }, - { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 4, 98.815, 13, 252-13 }, - { 0, TA_MAX_TEST, 0, 251, 14, TA_SUCCESS, 252-14, 110.69, 13, 252-13 }, /* Last Value */ - - { 1, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 0, 92.5, 1, 252-1 }, /* First Value */ - { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 1, 95.155, 1, 252-1 }, - { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 2, 95.155, 1, 252-1 }, - { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 3, 95.5, 1, 252-1 }, - { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 4, 95.5, 1, 252-1 }, - { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 5, 95.0, 1, 252-1 }, - { 0, TA_MAX_TEST, 0, 251, 2, TA_SUCCESS, 252-2, 109.69, 1, 252-1 }, /* Last Value */ - - /*************************************/ - /* MINMAX and INDEX Functions tests */ - /*************************************/ - - /* Note: for now only range tests done on these */ - { 1, TA_MINMAX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, - { 1, TA_MINMAXINDEX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, - { 1, TA_MININDEX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 }, - { 1, TA_MAXINDEX_TEST, 0, 251, 14, TA_SUCCESS, 0, 91.125, 13, 252-13 } -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -static TA_Real testSerie1[] = {9,8,7,6,5}; -static TA_Real testSerie2[] = {3,7,9,10,15,33,50}; -static TA_Real testSerie3[] = {0,0,0,1,2,0,0,0}; -static TA_Real testSerie4[] = {0,0,0,2,1,0,0,0}; -static TA_Real testSerie5[] = {2,0,0,0,0,0,0,0}; -static TA_Real testSerie6[] = {0,0,0,0,0,0,0,1}; -static TA_Real testSerie7[] = {-3,2}; -static TA_Real testSerie8[] = {2,-2}; -static TA_Real testSerie9[] = {4,2,3}; -static TA_Real testSerie10[] = {3,3,-3,2,-1,0,2}; - -static TA_RefTest tableRefTest[] = -{ - {testSerie1, sizeof(testSerie1)/sizeof(TA_Real)}, - {testSerie2, sizeof(testSerie2)/sizeof(TA_Real)}, - {testSerie3, sizeof(testSerie3)/sizeof(TA_Real)}, - {testSerie4, sizeof(testSerie4)/sizeof(TA_Real)}, - {testSerie5, sizeof(testSerie5)/sizeof(TA_Real)}, - {testSerie6, sizeof(testSerie6)/sizeof(TA_Real)}, - {testSerie7, sizeof(testSerie7)/sizeof(TA_Real)}, - {testSerie8, sizeof(testSerie8)/sizeof(TA_Real)}, - {testSerie9, sizeof(testSerie10)/sizeof(TA_Real)} -}; - -#define NB_TEST_REF (sizeof(tableRefTest)/sizeof(TA_RefTest)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_minmax( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* Do tests against a local reference which is the non-optimized implementation */ - for( i=0; i < NB_TEST_REF; i++ ) - { - retValue = testCompareToReference( tableRefTest[i].input, - tableRefTest[i].nbElement ); - if( retValue != 0 ) - { - printf( "%s Failed Ref Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *dummyBufferReal; - TA_Real *out1Real; - TA_Real *out2Real; - - TA_Integer *dummyBufferInt; - TA_Integer *out1Int; - TA_Integer *out2Int; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - dummyBufferReal = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBufferReal ) - return TA_ALLOC_ERR; - - dummyBufferInt = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Integer)); - if( !dummyBufferInt ) - { - TA_Free( dummyBufferReal ); - return TA_ALLOC_ERR; - } - - switch( outputNb ) - { - case 0: - out1Real = outputBuffer; - out2Real = dummyBufferReal; - out1Int = outputBufferInt; - out2Int = dummyBufferInt; - break; - case 1: - out1Real = dummyBufferReal; - out2Real = outputBuffer; - out1Int = dummyBufferInt; - out2Int = outputBufferInt; - break; - default: - TA_Free( dummyBufferReal ); - return TA_BAD_PARAM; - } - - switch( testParam->test->theFunction ) - { - case TA_MIN_TEST: - retCode = TA_MIN( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_MIN_Lookback( testParam->test->optInTimePeriod ); - break; - - case TA_MAX_TEST: - retCode = TA_MAX( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_MAX_Lookback( testParam->test->optInTimePeriod ); - break; - - case TA_MINMAX_TEST: - retCode = TA_MINMAX( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - out1Real, out2Real ); - *lookback = TA_MINMAX_Lookback( testParam->test->optInTimePeriod ); - break; - - case TA_MINMAXINDEX_TEST: - retCode = TA_MINMAXINDEX( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - out1Int, out2Int ); - *lookback = TA_MINMAXINDEX_Lookback( testParam->test->optInTimePeriod ); - *isOutputInteger = 1; - break; - - case TA_MININDEX_TEST: - retCode = TA_MININDEX( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - out1Int ); - *lookback = TA_MININDEX_Lookback( testParam->test->optInTimePeriod ); - *isOutputInteger = 1; - break; - - case TA_MAXINDEX_TEST: - retCode = TA_MAXINDEX( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - out1Int ); - *lookback = TA_MAXINDEX_Lookback( testParam->test->optInTimePeriod ); - *isOutputInteger = 1; - break; - - default: - retCode = TA_INTERNAL_ERROR(129); - break; - } - - TA_Free( dummyBufferReal ); - TA_Free( dummyBufferInt ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->open, history->nbBars ); - setInputBuffer( 1, history->open, history->nbBars ); - - CLEAR_EXPECTED_VALUE(0); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - - /* Make a simple first call. */ - if( test->theFunction == TA_MIN_TEST ) - { - retCode = TA_MIN( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - else if( test->theFunction == TA_MAX_TEST ) - { - retCode = TA_MAX( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - else - { - /* For now, tests only MIN and MAX. Only range check tests implemented. */ - return TA_TEST_PASS; - } - - errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - CLEAR_EXPECTED_VALUE(0); - if( test->theFunction == TA_MIN_TEST ) - { - retCode = TA_MIN( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - else if( test->theFunction == TA_MAX_TEST ) - { - retCode = TA_MAX( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - - return TA_TEST_PASS; -} - - -/* These reference functions were the original non-optimized - * version of TA_MIN and TA_MAX. - * - * TA-Lib might implement a faster algorithm, at the cost - * of complexity. Consequently, it is important to verify the - * equivalence between the optimize and non-optimized version. - */ -static TA_RetCode referenceMin( TA_Integer startIdx, - TA_Integer endIdx, - const TA_Real inReal[], - TA_Integer optInTimePeriod, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Real outReal[] ) -{ - TA_Real lowest, tmp; - TA_Integer outIdx, nbInitialElementNeeded; - TA_Integer trailingIdx, today, i; - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - *outBegIdx = 0; - *outNbElement = 0; - return TA_SUCCESS; - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - - while( today <= endIdx ) - { - lowest = inReal[trailingIdx++]; - for( i=trailingIdx; i <= today; i++ ) - { - tmp = inReal[i]; - if( tmp < lowest) lowest= tmp; - } - - outReal[outIdx++] = lowest; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - *outBegIdx = startIdx; - *outNbElement = outIdx; - - return TA_SUCCESS; -} - -static TA_RetCode referenceMax( TA_Integer startIdx, - TA_Integer endIdx, - const TA_Real inReal[], - TA_Integer optInTimePeriod, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Real outReal[] ) -{ - /* Insert local variables here. */ - TA_Real highest, tmp; - TA_Integer outIdx, nbInitialElementNeeded; - TA_Integer trailingIdx, today, i; - - -#ifndef TA_FUNC_NO_RANGE_CHECK - - /* Validate the requested output range. */ - if( startIdx < 0 ) - return TA_OUT_OF_RANGE_START_INDEX; - if( (endIdx < 0) || (endIdx < startIdx)) - return TA_OUT_OF_RANGE_END_INDEX; - - /* Validate the parameters. */ - if( !inReal ) return TA_BAD_PARAM; - /* min/max are checked for optInTimePeriod. */ - if( optInTimePeriod == TA_INTEGER_DEFAULT ) - optInTimePeriod = 30; - - if( outReal == NULL ) - return TA_BAD_PARAM; - -#endif /* TA_FUNC_NO_RANGE_CHECK */ - - /* Insert TA function code here. */ - - /* Identify the minimum number of price bar needed - * to identify at least one output over the specified - * period. - */ - nbInitialElementNeeded = (optInTimePeriod-1); - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < nbInitialElementNeeded ) - startIdx = nbInitialElementNeeded; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - *outBegIdx = 0; - *outNbElement = 0; - return TA_SUCCESS; - } - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - today = startIdx; - trailingIdx = startIdx-nbInitialElementNeeded; - - while( today <= endIdx ) - { - highest = inReal[trailingIdx++]; - for( i=trailingIdx; i <= today; i++ ) - { - tmp = inReal[i]; - if( tmp > highest ) highest = tmp; - } - - outReal[outIdx++] = highest; - today++; - } - - /* Keep the outBegIdx relative to the - * caller input before returning. - */ - *outBegIdx = startIdx; - *outNbElement = outIdx; - - return TA_SUCCESS; -} - -static ErrorNumber testCompareToReference( const TA_Real *input, int nbElement ) -{ - TA_Integer outBegIdx, outNbElement; - TA_RetCode retCode; - - TA_Integer outBegIdxRef, outNbElementRef; - TA_RetCode retCodeRef; - - int period, startIdx, endIdx, testNb; - - ErrorNumber errNb; - - outBegIdxRef = outNbElementRef = -1; - - /* Do a systematic tests, even for failure cases. */ - for( testNb=0; testNb <= 1; testNb++ ) /* 0=TA_MIN, 1=TA_MAX */ - { - for( period=2; period <= nbElement; period++ ) - { - for( startIdx=0; startIdx < nbElement; startIdx++ ) - { - for( endIdx=0; (endIdx < nbElement) && (startIdx <= endIdx); endIdx++ ) - { - /* Set to NAN all the elements of the gBuffers. - * Note: These buffer are used as an attempt to detect - * out-of-bound writing in the output. - */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, input, nbElement ); - - /* Get the reference output. */ - if( testNb == 0 ) - retCodeRef = referenceMin( startIdx, endIdx, input, period, - &outBegIdxRef, &outNbElementRef, gBuffer[0].out0 ); - else - retCodeRef = referenceMax( startIdx, endIdx, input, period, - &outBegIdxRef, &outNbElementRef, gBuffer[0].out0 ); - - /* Verify that the input was preserved */ - errNb = checkDataSame( gBuffer[0].in, input, nbElement ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Get the TA-Lib implementation output. */ - if( testNb == 0 ) - retCode = TA_MIN( startIdx, endIdx, input, period, - &outBegIdx, &outNbElement, gBuffer[1].out0 ); - else - retCode = TA_MAX( startIdx, endIdx, input, period, - &outBegIdx, &outNbElement, gBuffer[1].out0 ); - - /* Verify that the input was preserved */ - errNb = checkDataSame( gBuffer[0].in, input, nbElement ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The reference and TA-LIB should have the same output. */ - if( retCode != retCodeRef ) - { - printf( "Failure: retCode != retCodeRef\n" ); - return TA_REGTEST_OPTIMIZATION_REF_ERROR; - } - - if( outBegIdx != outBegIdxRef ) - { - printf( "Failure: outBegIdx != outBegIdxRef\n" ); - return TA_REGTEST_OPTIMIZATION_REF_ERROR; - } - - if( outNbElement != outNbElementRef ) - { - printf( "Failure: outNbElement != outNbElementRef\n" ); - return TA_REGTEST_OPTIMIZATION_REF_ERROR; - } - - /* checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].out0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - - if( retCode == TA_SUCCESS ) - { - /* Make another test using the same input/output buffer. - * The output should still be the same. - */ - if( testNb == 0 ) - retCode = TA_MIN( startIdx, endIdx, gBuffer[0].in, period, - &outBegIdx, &outNbElement, gBuffer[0].in ); - else - retCode = TA_MAX( startIdx, endIdx, gBuffer[0].in, period, - &outBegIdx, &outNbElement, gBuffer[0].in ); - - /* The reference and TA-LIB should have the same output. */ - if( retCode != retCodeRef ) - { - printf( "Failure: retCode != retCodeRef (2)\n" ); - return TA_REGTEST_OPTIMIZATION_REF_ERROR; - } - - if( outBegIdx != outBegIdxRef ) - { - printf( "Failure: outBegIdx != outBegIdxRef (2)\n" ); - return TA_REGTEST_OPTIMIZATION_REF_ERROR; - } - - if( outNbElement != outNbElementRef ) - { - printf( "Failure: outNbElement != outNbElementRef (2)\n" ); - return TA_REGTEST_OPTIMIZATION_REF_ERROR; - } - - /* checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - } - } - } - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c deleted file mode 100644 index d6b9e37c5..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_mom.c +++ /dev/null @@ -1,553 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Test the momentum functions - * - * The interpretation of the rate of change varies widely depending - * which software and/or books you are refering to. - * - * The following is the table of Rate-Of-Change implemented in TA-LIB: - * MOM = (price - prevPrice) [Momentum] - * ROC = ((price/prevPrice)-1)*100 [Rate of change] - * ROCP = (price-prevPrice)/prevPrice [Rate of change Percentage] - * ROCR = (price/prevPrice) [Rate of change ratio] - * ROCR100 = (price/prevPrice)*100 [Rate of change ratio 100 Scale] - * - * Here are the equivalent function in other software: - * TA-Lib | Tradestation | Metastock - * ================================================= - * MOM | Momentum | ROC (Point) - * ROC | ROC | ROC (Percent) - * ROCP | PercentChange | - - * ROCR | - | - - * ROCR100 | - | MO - * - * The MOM function is the only one who is not normalized, and thus - * should be avoided for comparing different time serie of prices. - * - * ROC and ROCP are centered at zero and can have positive and negative - * value. Here are some equivalence: - * ROC = ROCP/100 - * = ((price-prevPrice)/prevPrice)/100 - * = ((price/prevPrice)-1)*100 - * - * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are - * always positive values. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_MOM_TEST, -TA_ROC_TEST, -TA_ROCP_TEST, -TA_ROCR_TEST, -TA_ROCR100_TEST } TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - TA_TestId theFunction; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /**********************/ - /* MOM TEST */ - /**********************/ - -#ifndef TA_FUNC_NO_RANGE_CHECK - /* Test out of range. */ - { 0, TA_MOM_TEST, -1, 3, 14, TA_OUT_OF_RANGE_START_INDEX, 0, 0, 0, 0}, - { 0, TA_MOM_TEST, 3, -1, 14, TA_OUT_OF_RANGE_END_INDEX, 0, 0, 0, 0}, - { 0, TA_MOM_TEST, 4, 3, 14, TA_OUT_OF_RANGE_END_INDEX, 0, 0, 0, 0}, -#endif - - { 1, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 0, -0.50, 14, 252-14 }, /* First Value */ - { 0, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 1, -2.00, 14, 252-14 }, - { 0, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 2, -5.22, 14, 252-14 }, - { 0, TA_MOM_TEST, 0, 251, 14, TA_SUCCESS, 252-15, -1.13, 14, 252-14 }, /* Last Value */ - - /* No output value. */ - { 0, TA_MOM_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_MOM_TEST, 14, 14, 14, TA_SUCCESS, 0, -0.50, 14, 1}, - - /* Index too low test. */ - { 0, TA_MOM_TEST, 0, 15, 14, TA_SUCCESS, 0, -0.50, 14, 2}, - { 0, TA_MOM_TEST, 1, 15, 14, TA_SUCCESS, 0, -0.50, 14, 2}, - { 0, TA_MOM_TEST, 2, 16, 14, TA_SUCCESS, 0, -0.50, 14, 3}, - { 0, TA_MOM_TEST, 2, 16, 14, TA_SUCCESS, 1, -2.00, 14, 3}, - { 0, TA_MOM_TEST, 2, 16, 14, TA_SUCCESS, 2, -5.22, 14, 3}, - { 0, TA_MOM_TEST, 0, 14, 14, TA_SUCCESS, 0, -0.50, 14, 1}, - { 0, TA_MOM_TEST, 0, 13, 14, TA_SUCCESS, 0, -0.50, 14, 0}, - - /* Middle of data test. */ - { 0, TA_MOM_TEST, 20, 21, 14, TA_SUCCESS, 0, -4.15, 20, 2 }, - { 0, TA_MOM_TEST, 20, 21, 14, TA_SUCCESS, 1, -5.12, 20, 2 }, - - /**********************/ - /* ROC TEST */ - /**********************/ - { 1, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 0, -0.546, 14, 252-14 }, /* First Value */ - { 0, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 1, -2.109, 14, 252-14 }, - { 0, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 2, -5.53, 14, 252-14 }, - { 0, TA_ROC_TEST, 0, 251, 14, TA_SUCCESS, 252-15, -1.0367, 14, 252-14 }, /* Last Value */ - - /* No output value. */ - { 0, TA_ROC_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_ROC_TEST, 14, 14, 14, TA_SUCCESS, 0, -0.546, 14, 1}, - - /* Index too low test. */ - { 0, TA_ROC_TEST, 0, 15, 14, TA_SUCCESS, 0, -0.546, 14, 2}, - { 0, TA_ROC_TEST, 1, 15, 14, TA_SUCCESS, 0, -0.546, 14, 2}, - { 0, TA_ROC_TEST, 2, 16, 14, TA_SUCCESS, 0, -0.546, 14, 3}, - { 0, TA_ROC_TEST, 2, 16, 14, TA_SUCCESS, 1, -2.109, 14, 3}, - { 0, TA_ROC_TEST, 2, 16, 14, TA_SUCCESS, 2, -5.53, 14, 3}, - { 0, TA_ROC_TEST, 0, 14, 14, TA_SUCCESS, 0, -0.546, 14, 1}, - { 0, TA_ROC_TEST, 0, 13, 14, TA_SUCCESS, 0, -0.546, 14, 0}, - - /* Middle of data test. */ - { 0, TA_ROC_TEST, 20, 21, 14, TA_SUCCESS, 0, -4.49, 20, 2 }, - { 0, TA_ROC_TEST, 20, 21, 14, TA_SUCCESS, 1, -5.5256, 20, 2 }, - - - /**********************/ - /* ROCR TEST */ - /**********************/ - { 1, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 0, 0.994536, 14, 252-14 }, /* First Value */ - { 0, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 1, 0.978906, 14, 252-14 }, - { 0, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 2, 0.944689, 14, 252-14 }, - { 0, TA_ROCR_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 0.989633, 14, 252-14 }, /* Last Value */ - - /* No output value. */ - { 0, TA_ROCR_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_ROCR_TEST, 14, 14, 14, TA_SUCCESS, 0, 0.994536, 14, 1}, - - /* Index too low test. */ - { 0, TA_ROCR_TEST, 0, 15, 14, TA_SUCCESS, 0, 0.994536, 14, 2}, - { 0, TA_ROCR_TEST, 1, 15, 14, TA_SUCCESS, 0, 0.994536, 14, 2}, - { 0, TA_ROCR_TEST, 2, 16, 14, TA_SUCCESS, 0, 0.994536, 14, 3}, - { 0, TA_ROCR_TEST, 2, 16, 14, TA_SUCCESS, 1, 0.978906, 14, 3}, - { 0, TA_ROCR_TEST, 2, 16, 14, TA_SUCCESS, 2, 0.944689, 14, 3}, - { 0, TA_ROCR_TEST, 0, 14, 14, TA_SUCCESS, 0, 0.994536, 14, 1}, - { 0, TA_ROCR_TEST, 0, 13, 14, TA_SUCCESS, 0, 0.994536, 14, 0}, - - /* Middle of data test. */ - { 0, TA_ROCR_TEST, 20, 21, 14, TA_SUCCESS, 0, 0.955096, 20, 2 }, - { 0, TA_ROCR_TEST, 20, 21, 14, TA_SUCCESS, 1, 0.944744, 20, 2 }, - - /**********************/ - /* ROCR100 TEST */ - /**********************/ - { 1, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 0, 99.4536, 14, 252-14 }, /* First Value */ - { 0, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 1, 97.8906, 14, 252-14 }, - { 0, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 2, 94.4689, 14, 252-14 }, - { 0, TA_ROCR100_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 98.9633, 14, 252-14 }, /* Last Value */ - - /* No output value. */ - { 0, TA_ROCR100_TEST, 1, 1, 14, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_ROCR100_TEST, 14, 14, 14, TA_SUCCESS, 0, 99.4536, 14, 1}, - - /* Index too low test. */ - { 0, TA_ROCR100_TEST, 0, 15, 14, TA_SUCCESS, 0, 99.4536, 14, 2}, - { 0, TA_ROCR100_TEST, 1, 15, 14, TA_SUCCESS, 0, 99.4536, 14, 2}, - { 0, TA_ROCR100_TEST, 2, 16, 14, TA_SUCCESS, 0, 99.4536, 14, 3}, - { 0, TA_ROCR100_TEST, 2, 16, 14, TA_SUCCESS, 1, 97.8906, 14, 3}, - { 0, TA_ROCR100_TEST, 2, 16, 14, TA_SUCCESS, 2, 94.4689, 14, 3}, - { 0, TA_ROCR100_TEST, 0, 14, 14, TA_SUCCESS, 0, 99.4536, 14, 1}, - { 0, TA_ROCR100_TEST, 0, 13, 14, TA_SUCCESS, 0, 99.4536, 14, 0}, - - /* Middle of data test. */ - { 0, TA_ROCR100_TEST, 20, 21, 14, TA_SUCCESS, 0, 95.5096, 20, 2 }, - { 0, TA_ROCR100_TEST, 20, 21, 14, TA_SUCCESS, 1, 94.4744, 20, 2 } - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_mom_roc( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - switch( testParam->test->theFunction ) - { - case TA_MOM_TEST: - retCode = TA_MOM( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_MOM_Lookback(testParam->test->optInTimePeriod ); - break; - case TA_ROC_TEST: - retCode = TA_ROC( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ROC_Lookback(testParam->test->optInTimePeriod ); - break; - case TA_ROCR_TEST: - retCode = TA_ROCR( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ROCR_Lookback(testParam->test->optInTimePeriod ); - break; - case TA_ROCR100_TEST: - retCode = TA_ROCR100( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ROCR100_Lookback(testParam->test->optInTimePeriod ); - break; - case TA_ROCP_TEST: - retCode = TA_ROCP( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ROCP_Lookback(testParam->test->optInTimePeriod ); - break; - default: - retCode = TA_INTERNAL_ERROR(130); - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - - CLEAR_EXPECTED_VALUE(0); - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_MOM_TEST: - retCode = TA_MOM( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_ROC_TEST: - retCode = TA_ROC( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - case TA_ROCR_TEST: - retCode = TA_ROCR( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - case TA_ROCR100_TEST: - retCode = TA_ROCR100( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_ROCP_TEST: - retCode = TA_ROCP( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - default: - retCode = TA_BAD_PARAM; - } - - errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - CLEAR_EXPECTED_VALUE(0); - switch( test->theFunction ) - { - case TA_MOM_TEST: - retCode = TA_MOM( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_ROC_TEST: - retCode = TA_ROC( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_ROCR_TEST: - retCode = TA_ROCR( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_ROCR100_TEST: - retCode = TA_ROCR100( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_ROCP_TEST: - retCode = TA_ROCP( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - } - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( - rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c deleted file mode 100644 index 0dd5004e0..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ema.c +++ /dev/null @@ -1,307 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Test functions that have one output and takes a period and - * basically use only an EMA in its algorithm. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_TRIX_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex; - TA_Real oneOfTheExpectedOutReal; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test_per_ema( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /****************/ - /* TRIX TEST */ - /****************/ - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 0, 0.2589, 13, 252-13 }, /* First Value */ - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 1, 0.010495, 13, 252-13 }, - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-15, -0.058, 13, 252-13 }, - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-14, -0.095, 13, 252-13 }, /* Last Value */ - -#if 0 - /* Metastock values. */ - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 0, 0.221, 13, 252-13 }, /* First Value */ - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 1, -0.009, 13, 252-13 }, - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-15, -0.058, 13, 252-13 }, - { 0, TA_TRIX_TEST, 0, 0, 251, 5, TA_SUCCESS, 252-14, -0.095, 13, 252-13 }, /* Last Value */ -#endif - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_per_ema( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "TA_MA Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test_per_ema( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "TA_MA Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - switch( testParam->test->theFunction ) - { - case TA_TRIX_TEST: - retCode = TA_TRIX( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_TRIX_Lookback( testParam->test->optInTimePeriod ); - break; - default: - retCode = TA_INTERNAL_ERROR(131); - } - - return retCode; -} - -static ErrorNumber do_test_per_ema( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - - /* Set the unstable period requested for that test. */ - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_TRIX_TEST: - retCode = TA_TRIX( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - - } - - errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[0].out0, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_TRIX_TEST: - retCode = TA_TRIX( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - - /* The previous call to TA_MA should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[1].in, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_EMA, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c deleted file mode 100644 index f3236de95..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hl.c +++ /dev/null @@ -1,640 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 020203 MF First version. - * 122506 MF Add TA_BETA tests. - */ - -/* Description: - * - * Test functions which have the following characterisic: - * - two inputs are needed (high and low are used here). - * - has zero or one parameter being a period. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_AROON_UP_TEST, -TA_AROON_DOWN_TEST, -TA_AROONOSC_TEST, -TA_CORREL_TEST, -TA_BETA_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer startIdx; - TA_Integer endIdx; - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *high; - const TA_Real *low; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*****************/ - /* BETA TEST */ - /*****************/ - - /* Uncomment following to enable tons of tests. Replace 999.99 with the first - * value you are expecting. - */ - - { 1, TA_BETA_TEST, 0, 251, 5, TA_SUCCESS, 0, 0.62907, 5, 252-5 }, - { 0, TA_BETA_TEST, 0, 251, 5, TA_SUCCESS, 1, 0.83604, 5, 252-5 }, - - /*****************/ - /* CORREL TEST */ - /*****************/ - { 1, TA_CORREL_TEST, 0, 251, 20, TA_SUCCESS, 0, 0.9401569, 19, 252-19 }, /* First Value */ - { 0, TA_CORREL_TEST, 0, 251, 20, TA_SUCCESS, 1, 0.9471812, 19, 252-19 }, - { 0, TA_CORREL_TEST, 0, 251, 20, TA_SUCCESS, 252-20, 0.8866901, 19, 252-19 }, /* Last Value */ - - - /*******************/ - /* AROON UP TEST */ - /*******************/ - { 1, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 0, 78.571, 14, 252-14 }, /* First Value */ - { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 1, 71.429, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 2, 64.2857, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 3, 57.143, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 4, 50.000, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 5, 42.857, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 6, 35.714, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 7, 28.571, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 8, 21.429, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 9, 14.286, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 10, 7.1429, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 11, 0.0000, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 12, 0.0000, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 13, 21.429, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 14, 14.286, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 15, 7.1429, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 16, 0.0000, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 17, 14.286, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 20, 0.00, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 21, 92.857, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 27, 50.000, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 28, 42.857, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 13, 251, 14, TA_SUCCESS, 29,100.000, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 1, 251, 14, TA_SUCCESS, 252-16, 0.0, 14, 252-14 }, - { 0, TA_AROON_UP_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 7.1429, 14, 252-14 }, /* Last Value */ - - /*******************/ - /* AROON DOWN TEST */ - /*******************/ - { 1, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 0, 100.0, 14, 252-14 }, /* First Value */ - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 1, 92.857, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 2, 85.714, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 3, 78.571, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 4, 71.429, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 5, 64.286, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 6, 57.143, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 7,100.000, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 8,100.000, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 9,100.000, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 10,100.000, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 11,100.000, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 12, 92.857, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 13, 85.714, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 14, 78.571, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 15, 71.429, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 16, 64.286, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 17, 57.143, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 18, 50.000, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 19, 42.857, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 20, 35.714, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 21, 28.571, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 22, 21.429, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 23, 14.286, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 24, 7.1429, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 25, 0.0, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 26, 0.0, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 27, 92.857, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 13, 251, 14, TA_SUCCESS, 28, 85.714, 14, 252-14 }, - - { 0, TA_AROON_DOWN_TEST, 4, 251, 14, TA_SUCCESS, 252-16, 28.571, 14, 252-14 }, - { 0, TA_AROON_DOWN_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 21.429, 14, 252-14 }, /* Last Value */ - - /******************/ - /* AROON OSC TEST */ - /******************/ - { 0, TA_AROONOSC_TEST, 13, 251, 14, TA_SUCCESS, 0, -21.4285, 14, 252-14 }, /* First Value */ - { 0, TA_AROONOSC_TEST, 13, 251, 14, TA_SUCCESS, 6, -21.4285, 14, 252-14 }, - { 0, TA_AROONOSC_TEST, 13, 251, 14, TA_SUCCESS, 7, -71.4285, 14, 252-14 }, - { 0, TA_AROONOSC_TEST, 0, 251, 14, TA_SUCCESS, 252-16, -28.5714, 14, 252-14 }, - { 0, TA_AROONOSC_TEST, 0, 251, 14, TA_SUCCESS, 252-15, -14.28571, 14, 252-14 }, /* Last Value */ - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_per_hl( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - double *dummyBuffer; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - /* Allocate a buffer for the output who is going - * to be ignored (make it slightly larger to play - * safe) - */ - dummyBuffer = TA_Malloc( sizeof(double) * (endIdx-startIdx+100) ); - switch( testParam->test->theFunction ) - { - case TA_AROON_UP_TEST: - retCode = TA_AROON( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - &dummyBuffer[20], - outputBuffer ); - - *lookback = TA_AROON_Lookback( testParam->test->optInTimePeriod ); - break; - case TA_AROON_DOWN_TEST: - retCode = TA_AROON( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer, - &dummyBuffer[20] - ); - *lookback = TA_AROON_Lookback( testParam->test->optInTimePeriod ); - break; - case TA_AROONOSC_TEST: - retCode = TA_AROONOSC( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_AROONOSC_Lookback( testParam->test->optInTimePeriod ); - break; - case TA_CORREL_TEST: - retCode = TA_CORREL( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_CORREL_Lookback( testParam->test->optInTimePeriod ); - break; - - case TA_BETA_TEST: - retCode = TA_BETA( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->test->optInTimePeriod, /* time period */ - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_BETA_Lookback(testParam->test->optInTimePeriod); - break; - - default: - retCode = TA_INTERNAL_ERROR(132); - } - - TA_Free( dummyBuffer ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_AROON_UP_TEST: - retCode = TA_AROON( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].out0, - gBuffer[0].out0 - ); - break; - - case TA_AROON_DOWN_TEST: - retCode = TA_AROON( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0, - gBuffer[1].out0 - ); - break; - - case TA_AROONOSC_TEST: - retCode = TA_AROONOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 - ); - break; - - case TA_CORREL_TEST: - retCode = TA_CORREL( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 - ); - break; - - case TA_BETA_TEST: - retCode = TA_BETA( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 - ); - break; - - default: - retCode = TA_INTERNAL_ERROR(133); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where one of the input and one of the output - * are the same buffer. - */ - switch( test->theFunction ) - { - case TA_AROON_UP_TEST: - retCode = TA_AROON( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].out1, - gBuffer[0].in - ); - break; - - case TA_AROON_DOWN_TEST: - retCode = TA_AROON( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in, - gBuffer[1].out1 - ); - break; - - case TA_AROONOSC_TEST: - retCode = TA_AROONOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - - case TA_CORREL_TEST: - retCode = TA_CORREL( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - - case TA_BETA_TEST: - retCode = TA_BETA( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in - ); - break; - - default: - retCode = TA_INTERNAL_ERROR(134); - } - - /* Check that the other input was preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkSameContent( gBuffer[1].out1, gBuffer[1].out0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_AROON_UP_TEST: - retCode = TA_AROON( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].out2, - gBuffer[1].in - ); - break; - - case TA_AROON_DOWN_TEST: - retCode = TA_AROON( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in, - gBuffer[1].out2 - ); - break; - - case TA_AROONOSC_TEST: - retCode = TA_AROONOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in - ); - break; - - case TA_CORREL_TEST: - retCode = TA_CORREL( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in - ); - break; - - case TA_BETA_TEST: - retCode = TA_BETA( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in - ); - break; - - default: - retCode = TA_INTERNAL_ERROR(135); - } - - /* Check that the other input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.high = history->high; - testParam.low = history->low; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c deleted file mode 100644 index 3b17a6083..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlc.c +++ /dev/null @@ -1,651 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 061904 MF Add test to detect cumulative errors in CCI algorithm - * when some values were close to zero (epsilon). - * 021106 MF Add tests for ULTOSC. - * 042206 MF Add tests for NATR - * 120507 MF Add tests for ACCBANDS - * - */ - -/* Description: - * - * Test functions which have the following characteristic: - * - the input arrays are high, low and close. - * - the only parameter is a period. - * - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_CCI_TEST, -TA_WILLR_TEST, -TA_ULTOSC_TEST, -TA_NATR_TEST, -TA_ACCBANDS_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod1; - TA_Integer optInTimePeriod2; - TA_Integer optInTimePeriod3; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*****************/ - /* ACCBANDS TEST */ - /*****************/ - { 1, TA_ACCBANDS_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 0, 93.8575, 13, 252-13 }, - - /****************/ - /* NATR TEST */ - /****************/ - /* TODO Analyze further why NATR requires a very large unstable period. - * for now, just disable range testing. - */ - { 0, TA_NATR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 0, 3.9321, 14, 252-14 }, - { 0, TA_NATR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 1, 3.7576, 14, 252-14 }, - { 0, TA_NATR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 252-15, 3.0229, 14, 252-14 }, - - /****************/ - /* ULTOSC TEST */ - /****************/ - { 0, TA_ULTOSC_TEST, 0, 251, 7, 14, 28, TA_SUCCESS, 0, 47.1713, 28, 252-28 }, - { 0, TA_ULTOSC_TEST, 0, 251, 7, 14, 28, TA_SUCCESS, 1, 46.2802, 28, 252-28 }, - { 1, TA_ULTOSC_TEST, 0, 251, 7, 14, 28, TA_SUCCESS, 252-29, 40.0854, 28, 252-28 }, - - - /****************/ - /* WILLR TEST */ - /****************/ - { 0, TA_WILLR_TEST, 13, 251, 14, 0, 0, TA_SUCCESS, 1, -66.9903, 13, 252-13 }, /* First Value */ - { 1, TA_WILLR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 0, -90.1943, 13, 252-13 }, - { 0, TA_WILLR_TEST, 0, 251, 14, 0, 0, TA_SUCCESS, 112, 0.0, 13, 252-13 }, - - { 0, TA_WILLR_TEST, 24, 24, 14, 0, 0, TA_SUCCESS, 0, -89.2857, 24, 1 }, - { 0, TA_WILLR_TEST, 25, 25, 14, 0, 0, TA_SUCCESS, 0, -97.2602, 25, 1 }, - { 0, TA_WILLR_TEST, 26, 26, 14, 0, 0, TA_SUCCESS, 0, -71.5482, 26, 1 }, - - { 0, TA_WILLR_TEST, 251, 251, 14, 0, 0, TA_SUCCESS, 0, -59.1515, 251, 1 }, - { 0, TA_WILLR_TEST, 14, 251, 14, 0, 0, TA_SUCCESS, 252-15, -59.1515, 14, 252-14 }, - - /****************/ - /* CCI TEST */ - /****************/ - - /* The following two should always be identical. */ - { 0, TA_CCI_TEST, 186,187, 2, 0, 0, TA_SUCCESS, 1, 0.0, 186, 2 }, - { 0, TA_CCI_TEST, 187,187, 2, 0, 0, TA_SUCCESS, 0, 0.0, 187, 1 }, - - /* Test period 2, 5 and 11 */ - { 0, TA_CCI_TEST, 0, 251, 2, 0, 0, TA_SUCCESS, 0, 66.666, 1, 252-1 }, - { 1, TA_CCI_TEST, 0, 251, 5, 0, 0, TA_SUCCESS, 0, 18.857, 4, 252-4 }, - - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 0, 87.927, 10, 252-10 }, /* First Value */ - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 1, 180.005, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 2, 143.5190963, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 3, -113.8669783, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 4, -111.064497, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 5, -26.77393309, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 6, -70.77933765, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 7, -83.15662884, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 8, -41.14421073, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 9, -49.63059589, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 10, -86.45142995, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 11, -105.6275799, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 12, -157.698269, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 13, -190.5251436, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 14, -142.8364298, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 15, -122.4448056, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 16, -79.95100041, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 17, 22.03829204, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 18, 7.765575065, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 19, 32.38905945, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 20, -0.005587727, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 21, 43.84607294, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 22, 40.35152301, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 23, 92.89237535, 10, 252-10 }, - { 0, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 24, 113.4778681, 10, 252-10 }, - { 1, TA_CCI_TEST, 0, 251, 11, 0, 0, TA_SUCCESS, 252-11, -169.65514, 10, 252-10 }, /* Last Value */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_per_hlc( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *dummyBuffer1, *dummyBuffer2; - TA_Real *out1, *out2, *out3; - - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - if( testParam->test->theFunction != TA_ACCBANDS_TEST ) - { - out1 = out2 = out3 = NULL; - dummyBuffer1 = NULL; - dummyBuffer2 = NULL; - } - else - { - dummyBuffer1 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer1 ) - return TA_ALLOC_ERR; - - dummyBuffer2 = TA_Malloc( ((endIdx-startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer2 ) - { - TA_Free( dummyBuffer1 ); - return TA_ALLOC_ERR; - } - - switch( outputNb ) - { - case 0: - out1 = outputBuffer; - out2 = dummyBuffer1; - out3 = dummyBuffer2; - break; - case 1: - out2 = outputBuffer; - out1 = dummyBuffer1; - out3 = dummyBuffer2; - break; - case 2: - out3 = outputBuffer; - out2 = dummyBuffer1; - out1 = dummyBuffer2; - break; - default: - TA_Free( dummyBuffer1 ); - TA_Free( dummyBuffer2 ); - return TA_BAD_PARAM; - } - } - - switch( testParam->test->theFunction ) - { - case TA_NATR_TEST: - retCode = TA_NATR( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod1, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_NATR_Lookback( testParam->test->optInTimePeriod1 ); - break; - - case TA_CCI_TEST: - retCode = TA_CCI( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod1, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_CCI_Lookback( testParam->test->optInTimePeriod1 ); - break; - case TA_WILLR_TEST: - retCode = TA_WILLR( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod1, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_WILLR_Lookback( testParam->test->optInTimePeriod1 ); - break; - - case TA_ULTOSC_TEST: - retCode = TA_ULTOSC( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod1, - testParam->test->optInTimePeriod2, - testParam->test->optInTimePeriod3, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ULTOSC_Lookback( testParam->test->optInTimePeriod1, - testParam->test->optInTimePeriod2, - testParam->test->optInTimePeriod3 ); - break; - case TA_ACCBANDS_TEST: - retCode = TA_ACCBANDS( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod1, - outBegIdx, - outNbElement, - out1, out2, out3 ); - *lookback = TA_ACCBANDS_Lookback( testParam->test->optInTimePeriod1 ); - break; - - default: - retCode = TA_INTERNAL_ERROR(132); - } - - FREE_IF_NOT_NULL( dummyBuffer1 ); - FREE_IF_NOT_NULL( dummyBuffer2 ); - return retCode; -} - -static TA_RetCode do_call( const TA_Test *test, - const double high[], - const double low[], - const double close[], - int *outBegIdx, - int *outNbElement, - double output[] ) -{ - TA_RetCode retCode; - TA_Real *dummyBuffer1, *dummyBuffer2; - - if( test->theFunction != TA_ACCBANDS_TEST ) - { - dummyBuffer1 = NULL; - dummyBuffer2 = NULL; - } - else - { - dummyBuffer1 = TA_Malloc( ((test->endIdx-test->startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer1 ) - return TA_ALLOC_ERR; - - dummyBuffer2 = TA_Malloc( ((test->endIdx-test->startIdx)+1)*sizeof(TA_Real)); - if( !dummyBuffer2 ) - { - TA_Free( dummyBuffer1 ); - return TA_ALLOC_ERR; - } - } - - switch( test->theFunction ) - { - case TA_NATR_TEST: - retCode = TA_NATR( test->startIdx, - test->endIdx, - high, low, close, - test->optInTimePeriod1, - outBegIdx, - outNbElement, - output ); - break; - - case TA_CCI_TEST: - retCode = TA_CCI( test->startIdx, - test->endIdx, - high, low, close, - test->optInTimePeriod1, - outBegIdx, - outNbElement, - output ); - break; - - case TA_WILLR_TEST: - retCode = TA_WILLR( test->startIdx, - test->endIdx, - high, low, close, - test->optInTimePeriod1, - outBegIdx, - outNbElement, - output ); - break; - - case TA_ULTOSC_TEST: - retCode = TA_ULTOSC( test->startIdx, - test->endIdx, - high, low, close, - test->optInTimePeriod1, - test->optInTimePeriod2, - test->optInTimePeriod3, - outBegIdx, - outNbElement, - output ); - break; - - case TA_ACCBANDS_TEST: - /* TODO: replace dummy with real for more complete tests. */ - retCode = TA_ACCBANDS( test->startIdx, - test->endIdx, - high, low, close, - test->optInTimePeriod1, - outBegIdx, - outNbElement, - dummyBuffer1, output, dummyBuffer2 ); - break; - - default: - retCode = TA_INTERNAL_ERROR(133); - } - - FREE_IF_NOT_NULL( dummyBuffer1 ); - FREE_IF_NOT_NULL( dummyBuffer2 ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - - /* Make a simple first call. */ - retCode = do_call( test, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = do_call( test, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - setInputBuffer( 0, history->high, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = do_call( test, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - setInputBuffer( 1, history->low, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = do_call( test, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); - setInputBuffer( 2, history->close, history->nbBars ); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - switch( test->theFunction ) - { - case TA_NATR_TEST: - /* Special case: Unstable period to test */ - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NATR, - (void *)&testParam, 1, 0 ); - break; - - case TA_ACCBANDS_TEST: - /* Special case: 3 outputs to test */ - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 3, 0 ); - break; - - default: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - break; - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c deleted file mode 100644 index 1348ac53d..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_hlcv.c +++ /dev/null @@ -1,710 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 011103 MF First version. - * 111705 MF Add test for Fix#1359452 (AD Function). - * 110206 AC Change volume and open interest to double - */ - -/* Description: - * - * Test functions which have the following - * characterisic: - * - the inputs are high,low, close and volume. - * - have one output of type real. - * - might have an optional parameter. - * - * - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_MFI_TEST, -TA_AD_TEST, -TA_ADOSC_3_10_TEST, -TA_ADOSC_5_2_TEST, -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer startIdx; - TA_Integer endIdx; - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; - const TA_Real *volume; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*************/ - /* AD TEST */ - /*************/ - /* Note: the period field is ignored. The period is irrelevant */ - { 1, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 0, -1631000.00, 0, 252 }, /* First Value */ - { 0, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 1, 2974412.02, 0, 252 }, - { 0, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 250, 8707691.07, 0, 252 }, - { 0, TA_AD_TEST, 0, 251, -1, TA_SUCCESS, 251, 8328944.54, 0, 252 }, /* Last Value */ - - /****************/ - /* ADOSC TEST */ - /****************/ - /* Note: the period field is ignored. The periods are always 3 and 10 */ - { 1, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 0, 841238.32, 9, 243 }, /* First Value */ - { 0, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 1, 2255663.07, 9, 243 }, - { 0, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 241, -526700.32, 9, 243 }, - { 0, TA_ADOSC_3_10_TEST, 0, 251, -1, TA_SUCCESS, 242, -1139932.729, 9, 243 }, /* Last Value */ - - /* Note: the period field is ignored. The periods are always 2 and 5 */ - { 1, TA_ADOSC_5_2_TEST, 0, 251, -1, TA_SUCCESS, 0, 585361.28, 4, 248 }, /* First Value */ - - /**************/ - /* MFI TEST */ - /**************/ - { 0, TA_MFI_TEST, 0, 251, 14, TA_SUCCESS, 0, 42.8923, 14, 252-14 }, /* First Value */ - { 0, TA_MFI_TEST, 0, 251, 14, TA_SUCCESS, 1, 45.6072, 14, 252-14 }, - { 0, TA_MFI_TEST, 0, 251, 14, TA_SUCCESS, 252-15, 53.1997, 14, 252-14 }, /* Last Value */ - - { 1, TA_MFI_TEST, 0, 251, 49, TA_SUCCESS, 0, 44.7902, 49, 252-49 }, /* First Value */ - { 0, TA_MFI_TEST, 0, 251, 49, TA_SUCCESS, 1, 43.1963, 49, 252-49 }, - { 0, TA_MFI_TEST, 0, 251, 49, TA_SUCCESS, 252-50, 57.4806, 49, 252-49 }, /* Last Value */ - - { 1, TA_MFI_TEST, 0, 251, 50, TA_SUCCESS, 0, 44.2414, 50, 252-50 }, /* First Value */ - { 0, TA_MFI_TEST, 0, 251, 50, TA_SUCCESS, 1, 42.1108, 50, 252-50 }, - { 0, TA_MFI_TEST, 0, 251, 50, TA_SUCCESS, 252-51, 50.5905, 50, 252-50 }, /* Last Value */ - - { 1, TA_MFI_TEST, 0, 251, 51, TA_SUCCESS, 0, 43.1496, 51, 252-51 }, /* First Value */ - { 0, TA_MFI_TEST, 0, 251, 51, TA_SUCCESS, 1, 40.7692, 51, 252-51 }, - { 0, TA_MFI_TEST, 0, 251, 51, TA_SUCCESS, 252-52, 51.7265, 51, 252-51 }, /* Last Value */ - - { 1, TA_MFI_TEST, 0, 251, 100, TA_SUCCESS, 0, 50.0166, 100, 252-100 }, /* First Value */ - { 0, TA_MFI_TEST, 0, 251, 100, TA_SUCCESS, 1, 50.2648, 100, 252-100 }, - { 0, TA_MFI_TEST, 0, 251, 100, TA_SUCCESS, 252-101, 48.4264, 100, 252-100 } /* Last Value */ - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_per_hlcv( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - - for( i=0; i < NB_TEST; i++ ) - { - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - switch( testParam->test->theFunction ) - { - case TA_MFI_TEST: - retCode = TA_MFI( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->volume, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_MFI_Lookback( testParam->test->optInTimePeriod ); - break; - - case TA_AD_TEST: - retCode = TA_AD( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->volume, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_AD_Lookback(); - break; - - case TA_ADOSC_3_10_TEST: - retCode = TA_ADOSC( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->volume, - 3, 10, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ADOSC_Lookback(3,10); - break; - - case TA_ADOSC_5_2_TEST: - retCode = TA_ADOSC( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->volume, - 5, 2, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ADOSC_Lookback(5,2); - break; - - default: - retCode = TA_INTERNAL_ERROR(132); - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - - /* Clear the unstable periods from previous tests. */ - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_MFI, 0 ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_MFI_TEST: - retCode = TA_MFI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - case TA_AD_TEST: - retCode = TA_AD( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_ADOSC_3_10_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 3, 10, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_ADOSC_5_2_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 5, 2, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - default: - retCode = TA_INTERNAL_ERROR(133); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_MFI_TEST: - retCode = TA_MFI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - case TA_AD_TEST: - retCode = TA_AD( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - case TA_ADOSC_3_10_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 3, 10, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - case TA_ADOSC_5_2_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 5, 2, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(134); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - setInputBuffer( 0, history->high, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_MFI_TEST: - retCode = TA_MFI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_AD_TEST: - retCode = TA_AD( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_ADOSC_3_10_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 3, 10, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_ADOSC_5_2_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 5, 2, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(135); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call to TA_MA should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - setInputBuffer( 1, history->low, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_MFI_TEST: - retCode = TA_MFI( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - case TA_AD_TEST: - retCode = TA_AD( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - case TA_ADOSC_3_10_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 3, 10, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - case TA_ADOSC_5_2_TEST: - retCode = TA_ADOSC( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - 5, 2, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(136); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); - setInputBuffer( 2, history->close, history->nbBars ); - - if( test->doRangeTestFlag ) - { - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - testParam.volume = history->volume; - - switch( test->theFunction ) - { - case TA_MFI_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_MFI, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - break; - case TA_AD_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, - TA_DO_NOT_COMPARE ); - if( errNb != TA_TEST_PASS ) - return errNb; - break; - case TA_ADOSC_3_10_TEST: - case TA_ADOSC_5_2_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_EMA, - (void *)&testParam, 1, - TA_DO_NOT_COMPARE ); - if( errNb != TA_TEST_PASS ) - return errNb; - break; - default: - break; - } - } - - /* Check for fix #1359452 - AD RAnge not working as expected. */ - if( test->theFunction == TA_AD_TEST ) - { - gBuffer[0].out0[0] = -1.0; - gBuffer[0].out0[1] = -1.0; - retCode = TA_AD( 0, - 0, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - &outBegIdx, - &outNbElement, - &gBuffer[0].out0[0] ); - if( retCode != TA_SUCCESS ) - { - printf( "Failed AD call for fix #1359452 [%d]\n", retCode ); - return TA_TEST_FAIL_BUG1359452_1; - } - if( gBuffer[0].out0[0] == -1.0 ) - { - printf( "Failed AD call for fix #1359452 out0[0] == -1\n" ); - return TA_TEST_FAIL_BUG1359452_2; - } - - retCode = TA_AD( 1, - 1, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - history->volume, - &outBegIdx, - &outNbElement, - &gBuffer[0].out0[1] ); - if( retCode != TA_SUCCESS ) - { - printf( "Failed AD call for fix #1359452 [%d]\n", retCode ); - return TA_TEST_FAIL_BUG1359452_3; - } - if( gBuffer[0].out0[1] == -1.0 ) - { - printf( "Failed AD call for fix #1359452 out0[1] == -1\n" ); - return TA_TEST_FAIL_BUG1359452_4; - } - - /* The two values are to be different. */ - if( gBuffer[0].out0[1] == gBuffer[0].out0[0] ) - { - printf( "Failed AD logic for fix #1359452\n" ); - return TA_TEST_FAIL_BUG1359452_5; - } - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c deleted file mode 100644 index 41eefcea0..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_per_ohlc.c +++ /dev/null @@ -1,527 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112405 MF First version. - * - */ - -/* Description: - * - * Test functions which have the following - * characterisic: - * - have one output - * - zero or one parameter being a period. - * - the input is open, high, low and close. - * - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_AVGPRICE_TEST, -TA_BOP_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer startIdx; - TA_Integer endIdx; - TA_Integer optInTimePeriod; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *open; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*******************/ - /* AVGPRICE TEST */ - /*******************/ - { 0, TA_AVGPRICE_TEST, 0, 251, 0, TA_SUCCESS, 0, 92.0, 0, 252 }, - { 1, TA_AVGPRICE_TEST, 0, 251, 0, TA_SUCCESS, 1, 93.17, 0, 252 }, - - /*************/ - /* BOP TEST */ - /*************/ - - /* The following two should always be identical. */ - { 0, TA_BOP_TEST, 0, 251, 0, TA_SUCCESS, 0, -0.40, 0, 252 }, - { 1, TA_BOP_TEST, 0, 251, 0, TA_SUCCESS, 1, 0.94, 0, 252 } - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_per_ohlc( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - switch( testParam->test->theFunction ) - { - case TA_BOP_TEST: - retCode = TA_BOP( startIdx, - endIdx, - testParam->open, - testParam->high, - testParam->low, - testParam->close, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_BOP_Lookback(); - break; - case TA_AVGPRICE_TEST: - retCode = TA_AVGPRICE( startIdx, - endIdx, - testParam->open, - testParam->high, - testParam->low, - testParam->close, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_AVGPRICE_Lookback(); - break; - default: - retCode = TA_INTERNAL_ERROR(171); - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->open, history->nbBars ); - setInputBuffer( 1, history->high, history->nbBars ); - setInputBuffer( 2, history->low, history->nbBars ); - setInputBuffer( 3, history->close, history->nbBars ); - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_BOP_TEST: - retCode = TA_BOP( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - case TA_AVGPRICE_TEST: - retCode = TA_AVGPRICE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - - default: - retCode = TA_INTERNAL_ERROR(172); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->low,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[3].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_BOP_TEST: - retCode = TA_BOP( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - case TA_AVGPRICE_TEST: - retCode = TA_AVGPRICE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(173); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->low,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[3].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - setInputBuffer( 0, history->open, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_BOP_TEST: - retCode = TA_BOP( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_AVGPRICE_TEST: - retCode = TA_AVGPRICE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(174); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->low,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[3].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - setInputBuffer( 1, history->high, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_BOP_TEST: - retCode = TA_BOP( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - case TA_AVGPRICE_TEST: - retCode = TA_AVGPRICE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[2].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(175); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[3].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[2].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[2].in, 0 ); - setInputBuffer( 2, history->low, history->nbBars ); - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_BOP_TEST: - retCode = TA_BOP( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - case TA_AVGPRICE_TEST: - retCode = TA_AVGPRICE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - gBuffer[3].in, - &outBegIdx, - &outNbElement, - gBuffer[3].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(176); - } - - /* Check that the input were preserved. */ - errNb = checkDataSame( gBuffer[0].in, history->open,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->high, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[3].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[3].in, 0 ); - setInputBuffer( 3, history->close, history->nbBars ); - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.open = history->open; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c deleted file mode 100644 index d38c7e03d..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_po.c +++ /dev/null @@ -1,440 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AA Andrew Atkinson - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 020605 MF Add regression test with inverted slow/fast period. - * 020805 AA Fix one of the TA_PPO call (wrong buffer was pass). - */ - -/* Description: - * Regression test of APO(Absolute Price Oscillator). - * Regression test of PPO (Percentage Price Oscillator). - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_Integer doPercentage; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInFastPeriod; /* From 1 to 200 */ - TA_Integer optInSlowPeriod; /* From 1 to 200 */ - TA_Integer optInMethod_2; - TA_Integer compatibility; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex; - TA_Real oneOfTheExpectedOutReal; - - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ -static TA_Test tableTest[] = -{ - /**********************************/ - /* APO TEST - SIMPLE - CLASSIC */ - /**********************************/ - { 1, 0, 0, 251, 26, 12, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -3.3124, 25, 252-25 }, /* First Value */ - { 1, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -3.3124, 25, 252-25 }, /* First Value */ - { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -3.5876, 25, 252-25 }, - { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-26, -0.1667, 25, 252-25 }, /* Last Value */ - - { 0, 0, 0, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 0, 1, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 0, 25, 25, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -3.3124, 25, 1 }, /* First/Last Value */ - { 0, 0, 250, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -0.1667, 250, 2 }, /* Last Value */ - - /************************************/ - /* APO TEST - SIMPLE - METASTOCK */ - /************************************/ - { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.3124, 25, 252-25 }, /* First Value */ - { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -3.5876, 25, 252-25 }, - { 0, 0, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, -0.1667, 25, 252-25 }, /* Last Value */ - - { 0, 0, 0, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 0, 1, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 0, 25, 25, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.3124, 25, 1 }, /* First/Last Value */ - { 0, 0, 250, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.1667, 250, 2 }, /* Last Value */ - - - /***************************************/ - /* APO TEST - EXPONENTIAL - CLASSIC */ - /***************************************/ - /* !!! To be done. */ - - /*****************************************/ - /* APO TEST - EXPONENTIAL - METASTOCK */ - /*****************************************/ - { 1, 0, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4193, 25, 252-25 }, /* First Value */ - { 0, 0, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -2.4367, 25, 252-25 }, - { 0, 0, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, 0.90401, 25, 252-25 }, /* Last Value */ - - { 0, 0, 0, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 0, 1, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 0, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4193, 25, 1 }, - { 0, 0, 250, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 0.90401, 250, 2 }, /* Last Value */ - - { 0, 0, 251, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0.90401, 251, 1 }, /* Last Value */ - { 0, 0, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4193, 25, 1 }, /* Just enough to calculate first. */ - { 0, 0, 26, 26, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.4367, 26, 1 }, /* Just enough to calculate second. */ - - /**********************************/ - /* PPO TEST - SIMPLE - CLASSIC */ - /**********************************/ - { 1, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 1.10264, 2, 252-2 }, /* First Value */ - { 0, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -0.02813, 2, 252-2 }, - { 0, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 249, -0.21191, 2, 252-2 }, /* Last Value */ - - { 0, 1, 0, 1, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 1, 1, 1, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 1, 2, 2, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 1.10264, 2, 1 }, /* First/Last Value */ - { 0, 1, 250, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, -0.21191, 250, 2 }, /* Last Value */ - - /************************************/ - /* PPO TEST - SIMPLE - METASTOCK */ - /************************************/ - { 0, 1, 0, 251, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 1.10264, 2, 252-2 }, /* First Value */ - { 0, 1, 0, 251, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.02813, 2, 252-2 }, - { 0, 1, 0, 251, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 249, -0.21191, 2, 252-2 }, /* Last Value */ - - { 0, 1, 0, 1, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 1, 1, 1, 1, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 1, 1, 2, 2, 2, 3, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 1.10264, 2, 1 }, /* First/Last Value */ - { 0, 1, 250, 251, 3, 2, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.21191, 250, 2 }, /* Last Value */ - - { 0, 1, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.6393, 25, 252-25 }, /* First Value */ - { 0, 1, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -3.9534, 25, 252-25 }, - { 0, 1, 0, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, -0.15281, 25, 252-25 }, /* Last Value */ - - { 0, 1, 0, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 1, 1, 1, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 1, 25, 25, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -3.6393, 25, 1 }, /* First/Last Value */ - { 0, 1, 250, 251, 12, 26, TA_MAType_SMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -0.15281, 250, 2 }, /* Last Value */ - - /***************************************/ - /* PPO TEST - EXPONENTIAL - CLASSIC */ - /***************************************/ - /* !!! To be done. */ - - /*****************************************/ - /* PPO TEST - EXPONENTIAL - METASTOCK */ - /*****************************************/ - { 1, 1, 0, 251, 26, 12, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7083, 25, 252-25 }, /* First Value */ - { 0, 1, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, -2.7390, 25, 252-25 }, - { 0, 1, 0, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-26, 0.83644, 25, 252-25 }, /* Last Value */ - - { 0, 1, 0, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 1, 1, 1, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0 }, /* Out of range value */ - { 0, 1, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7083, 25, 1 }, - { 0, 1, 250, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 0.83644, 250, 2 }, /* Last Value */ - - { 0, 1, 251, 251, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0.83644, 251, 1 }, /* Last Value */ - { 0, 1, 25, 25, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7083, 25, 1 }, /* Just enough to calculate first. */ - { 0, 1, 26, 26, 12, 26, TA_MAType_EMA, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -2.7390, 26, 1 }, /* Just enough to calculate second. */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_po( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "TA_APO/TA_PPO Failed Bad Parameter for Test #%d (%d,%d)\n", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "TA_APO/TA_PPO Failed Test #%d (Code=%d)\n", i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - if( testParam->test->doPercentage ) - { - retCode = TA_PPO( startIdx, - endIdx, - testParam->close, - testParam->test->optInFastPeriod, - testParam->test->optInSlowPeriod, - (TA_MAType)testParam->test->optInMethod_2, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_PPO_Lookback( testParam->test->optInFastPeriod, - testParam->test->optInSlowPeriod, - (TA_MAType)testParam->test->optInMethod_2 ); - } - else - { - retCode = TA_APO( startIdx, - endIdx, - testParam->close, - testParam->test->optInFastPeriod, - testParam->test->optInSlowPeriod, - (TA_MAType)testParam->test->optInMethod_2, - outBegIdx, - outNbElement, - outputBuffer ); - - - *lookback = TA_APO_Lookback( testParam->test->optInFastPeriod, - testParam->test->optInSlowPeriod, - (TA_MAType)testParam->test->optInMethod_2 ); - } - - return retCode; -} - - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - TA_SetCompatibility( (TA_Compatibility)test->compatibility ); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - - TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, 0 ); - - /* Make a simple first call. */ - if( test->doPercentage ) - { - retCode = TA_PPO( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInFastPeriod, - test->optInSlowPeriod, - (TA_MAType)test->optInMethod_2, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - else - { - retCode = TA_APO( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInFastPeriod, - test->optInSlowPeriod, - (TA_MAType)test->optInMethod_2, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - - errNb = checkDataSame( gBuffer[0].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[0].out0, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - if( test->doPercentage ) - { - retCode = TA_PPO( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInFastPeriod, - test->optInSlowPeriod, - (TA_MAType)test->optInMethod_2, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - else - { - retCode = TA_APO( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInFastPeriod, - test->optInSlowPeriod, - (TA_MAType)test->optInMethod_2, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - } - - /* The previous call should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[1].in, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - - if( test->optInMethod_2 == TA_MAType_EMA ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_EMA, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - else - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c deleted file mode 100644 index 6c71587a5..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_rsi.c +++ /dev/null @@ -1,507 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * 112605 MF Add CMO test. - */ - -/* Description: - * Test RSI/CMO function. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum { -TA_RSI_TEST, -TA_CMO_TEST -} TA_TestId; - -typedef struct -{ - TA_Integer doRangeTestFlag; - - TA_TestId theFunction; - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - TA_Integer compatibility; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /**********************/ - /* RSI TEST */ - /**********************/ - { 1, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 252-14 }, /* First Value */ - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 52.32, 14, 252-14 }, - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 46.07, 14, 252-14 }, - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-15, 49.63, 14, 252-14 }, /* Last Value */ - - /* No output value. */ - { 0, TA_RSI_TEST, 0, 1, 1, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_RSI_TEST, 0, 14, 14, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 1}, - - /* Index too low test. */ - { 0, TA_RSI_TEST, 0, 0, 15, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 2}, - { 0, TA_RSI_TEST, 0, 1, 15, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 2}, - { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 3}, - { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 52.32, 14, 3}, - { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 2, 46.07, 14, 3}, - { 0, TA_RSI_TEST, 0, 0, 14, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 1}, - { 0, TA_RSI_TEST, 0, 0, 13, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 49.14, 14, 0}, - - /* Test with 1 unstable price bar. Test for period 1, 2, 14 */ - { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 52.32, 15, 252-(14+1) }, - { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 1, 46.07, 15, 252-(14+1) }, - { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-(15+1), 49.63, 15, 252-(14+1) }, /* Last Value */ - - /* Test with 2 unstable price bar. Test for period 1, 2, 14 */ - { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, 46.07, 16, 252-(14+2) }, - { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 252-(15+2), 49.63, 16, 252-(14+2) }, /* Last Value */ - - - /**********************/ - /* RSI Metastock TEST */ - /**********************/ - { 1, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 252-13 }, /* First Value */ - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 49.14, 13, 252-13 }, - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 52.32, 13, 252-13 }, - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 3, 46.07, 13, 252-13 }, - { 0, TA_RSI_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-14, 49.63, 13, 252-13 }, /* Last Value */ - - /* No output value. */ - { 0, TA_RSI_TEST, 0, 1, 1, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 0, 0, 0}, - - /* One value tests. */ - { 0, TA_RSI_TEST, 0, 13, 13, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 1}, - { 0, TA_RSI_TEST, 0, 13, 13, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 1}, - - /* Index too low test. */ - { 0, TA_RSI_TEST, 0, 0, 15, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 3}, - { 0, TA_RSI_TEST, 0, 1, 15, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 3}, - { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 4}, - { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 49.14, 13, 4}, - { 0, TA_RSI_TEST, 0, 2, 16, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 2, 52.32, 13, 4}, - { 0, TA_RSI_TEST, 0, 0, 14, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 2}, - { 0, TA_RSI_TEST, 0, 0, 13, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 1}, - { 0, TA_RSI_TEST, 0, 0, 12, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 47.11, 13, 0}, - - /* Test with 1 unstable price bar. Test for period 1, 2, 14 */ - { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 49.14, 14, 252-(13+1) }, - { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 1, 52.32, 14, 252-(13+1) }, - { 0, TA_RSI_TEST, 1, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-(14+1), 49.63, 14, 252-(13+1) }, /* Last Value */ - - /* Test with 2 unstable price bar. Test for period 1, 2, 14 */ - { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, 52.32, 15, 252-(13+2) }, - { 0, TA_RSI_TEST, 2, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 252-(14+2), 49.63, 15, 252-(13+2) }, /* Last Value */ - - /**********************/ - /* CMO TEST */ - /**********************/ - { 1, TA_CMO_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_DEFAULT, TA_SUCCESS, 0, -1.70, 14, 252-14 }, - { 1, TA_CMO_TEST, 0, 0, 251, 14, TA_COMPATIBILITY_METASTOCK, TA_SUCCESS, 0, -5.76, 13, 252-13 }, - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_rsi( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - - switch( testParam->test->theFunction ) - { - case TA_RSI_TEST: - retCode = TA_RSI( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_RSI_Lookback( testParam->test->optInTimePeriod); - break; - case TA_CMO_TEST: - retCode = TA_CMO( startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_CMO_Lookback( testParam->test->optInTimePeriod); - break; - default: - retCode = TA_INTERNAL_ERROR(177); - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - const TA_FuncHandle *funcHandle; - const TA_FuncInfo *funcInfo; - TA_ParamHolder *params; - - retCode = TA_SUCCESS; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - TA_SetCompatibility( (TA_Compatibility)test->compatibility ); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - - /* Set the unstable period requested for that test. */ - switch( test->theFunction ) - { - case TA_RSI_TEST: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_RSI, test->unstablePeriod ); - break; - case TA_CMO_TEST: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_CMO, test->unstablePeriod ); - break; - } - - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - - /* Make a simple first call. */ - switch( test->theFunction ) - { - case TA_RSI_TEST: - retCode = TA_RSI( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - case TA_CMO_TEST: - retCode = TA_CMO( test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - break; - default: - retCode = TA_INTERNAL_ERROR(178); - } - - errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->theFunction ) - { - case TA_RSI_TEST: - retCode = TA_RSI( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - case TA_CMO_TEST: - retCode = TA_CMO( test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - break; - default: - retCode = TA_INTERNAL_ERROR(179); - } - - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Make a call using the abstract interface. */ - switch( test->theFunction ) - { - case TA_RSI_TEST: - retCode = TA_GetFuncHandle( "RSI", &funcHandle ); - break; - case TA_CMO_TEST: - retCode = TA_GetFuncHandle( "CMO", &funcHandle ); - break; - default: - retCode = TA_INTERNAL_ERROR(180); - } - - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_GetFuncHandle with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_GETFUNCHANDLE; - } - - retCode = TA_GetFuncInfo( funcHandle, &funcInfo ); - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_GetFuncInfo with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_GETFUNCINFO; - } - - retCode = TA_ParamHolderAlloc( funcHandle, ¶ms ); - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_ParamHolderAlloc with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; - } - - retCode = TA_SetInputParamRealPtr( params, 0, gBuffer[0].in ); - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_SetInputParamRealPtr with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_PARAMREALPTR; - } - - retCode = TA_SetOptInputParamInteger( params, 0, test->optInTimePeriod ); - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_SetOptInputParamInteger with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_SetOutputParamRealPtr( params, 0, gBuffer[1].out0 ); - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_SetOutputParamRealPtr with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_SETOUTPUTPARAMREALPTR; - } - - retCode = TA_CallFunc( params, - test->startIdx, - test->endIdx, - &outBegIdx, - &outNbElement ); - - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_CallFunc with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_CALLFUNC; - } - - retCode = TA_ParamHolderFree( params ); - if( retCode != TA_SUCCESS ) - { - printf( "Fail: TA_GetFuncHandle with retCode = %d\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERFREE; - } - - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].out0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].out0, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - switch( test->theFunction ) - { - case TA_RSI_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_RSI, - (void *)&testParam, 1, 0 ); - break; - case TA_CMO_TEST: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_CMO, - (void *)&testParam, 1, 0 ); - break; - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c deleted file mode 100644 index 6d60dc090..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_sar.c +++ /dev/null @@ -1,301 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Test Parabolic SAR function using the example given - * in Wilder's book. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer useWilderData; - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Real optInAcceleration; - TA_Real optInMaximum; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Real wilderHigh[] = -{ -51.12, -52.35,52.1,51.8,52.1,52.5,52.8,52.5,53.5,53.5,53.8,54.2,53.4,53.5, -54.4,55.2,55.7,57,57.5,58,57.7,58,57.5,57,56.7,57.5, -56.70,56.00,56.20,54.80,55.50,54.70,54.00,52.50,51.00,51.50,51.70,53.00 -}; - -static TA_Real wilderLow[] = -{ -50.0, -51.5,51,50.5,51.25,51.7,51.85,51.5,52.3,52.5,53,53.5,52.5,52.1,53, -54,55,56,56.5,57,56.5,57.3,56.7,56.3,56.2,56, -55.50,55.00,54.90,54.00,54.50,53.80,53.00,51.50,50.00,50.50,50.20,51.50 -}; - -#define WILDER_NB_BAR (sizeof(wilderLow)/sizeof(TA_Real)) - -static TA_Test tableTest[] = -{ - /**************************************/ - /* SAR TEST WITH WILDER DATA */ - /**************************************/ - { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 0, 50.00, 1, (WILDER_NB_BAR-1) }, /* First Value */ - { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 1, 50.047, 1, (WILDER_NB_BAR-1) }, - { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 4, 50.182, 1, (WILDER_NB_BAR-1) }, - { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 35, 52.93, 1, (WILDER_NB_BAR-1) }, - { 1, 0, (WILDER_NB_BAR-1), 0.02, 0.20, TA_SUCCESS, 36, 50.00, 1, (WILDER_NB_BAR-1) } /* Last value */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_sar( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Set all the unstable period to a weird value. This is to make sure - * that no unstable period affects the SAR. - */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 124 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - - const TA_Real *highPtr; - const TA_Real *lowPtr; - TA_Integer nbPriceBar; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - if( test->useWilderData ) - { - highPtr = wilderHigh; - lowPtr = wilderLow; - nbPriceBar = WILDER_NB_BAR; - } - else - { - highPtr = history->high; - lowPtr = history->low; - nbPriceBar = history->nbBars; - } - - setInputBuffer( 0, highPtr, nbPriceBar ); - setInputBuffer( 1, lowPtr, nbPriceBar ); - - /* Make a simple first call. */ - retCode = TA_SAR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInAcceleration, - test->optInMaximum, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - - errNb = checkDataSame( gBuffer[0].in, highPtr, nbPriceBar ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, lowPtr, nbPriceBar ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_SAR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInAcceleration, - test->optInMaximum, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Make sure the other input is untouched. */ - errNb = checkDataSame( gBuffer[0].in, highPtr, nbPriceBar ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Repeat that last test but with the first parameter this time. */ - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, highPtr, nbPriceBar ); - setInputBuffer( 1, lowPtr, nbPriceBar ); - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_SAR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - test->optInAcceleration, - test->optInMaximum, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Make sure the other input is untouched. */ - errNb = checkDataSame( gBuffer[1].in, lowPtr, nbPriceBar); - if( errNb != TA_TEST_PASS ) - return errNb; - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c deleted file mode 100644 index 083855b26..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stddev.c +++ /dev/null @@ -1,265 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Test STDDEV function. This tests indirectly the VAR function. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInTimePeriod; - TA_Real optInNbDeviation_1; - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /*************************/ - /* STDDEV TEST */ - /*************************/ - { 1, 0, 251, 5, 1.0, TA_SUCCESS, 0, 1.2856, 4, 252-4 }, /* First Value */ - { 0, 0, 251, 5, 1.0, TA_SUCCESS, 1, 0.4462, 4, 252-4 }, - { 0, 0, 251, 5, 1.0, TA_SUCCESS, 252-5, 0.7144, 4, 252-4 }, /* Last Value */ - - { 1, 0, 251, 5, 1.5, TA_SUCCESS, 0, 1.9285, 4, 252-4 }, /* First Value */ - { 0, 0, 251, 5, 1.5, TA_SUCCESS, 1, 0.66937, 4, 252-4 }, - { 0, 0, 251, 5, 1.5, TA_SUCCESS, 252-5, 1.075, 4, 252-4 } /* Last Value */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_stddev( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - retCode = TA_STDDEV( - startIdx, - endIdx, - testParam->close, - testParam->test->optInTimePeriod, - testParam->test->optInNbDeviation_1, - outBegIdx, - outNbElement, - outputBuffer ); - - - *lookback = TA_STDDEV_Lookback( testParam->test->optInTimePeriod, - testParam->test->optInNbDeviation_1 ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->close, history->nbBars ); - setInputBuffer( 1, history->close, history->nbBars ); - - /* Make a simple first call. */ - retCode = TA_STDDEV( - test->startIdx, - test->endIdx, - gBuffer[0].in, - test->optInTimePeriod, - test->optInNbDeviation_1, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - - errNb = checkDataSame( gBuffer[0].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - retCode = TA_STDDEV( - test->startIdx, - test->endIdx, - gBuffer[1].in, - test->optInTimePeriod, - test->optInNbDeviation_1, - &outBegIdx, - &outNbElement, - gBuffer[1].in ); - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].in, 0 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( - rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c deleted file mode 100644 index c228c7d27..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_stoch.c +++ /dev/null @@ -1,794 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 122101 MF First version. - * 111603 MF Add test of TA_STOCHRSI - */ - -/* Description: - * Test the Stochastic function. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" -#include "ta_memory.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum -{ - TEST_STOCH, - TEST_STOCHF, - TEST_STOCHRSI -} TestId; - -typedef struct -{ - TestId testId; - - TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer optInPeriod_0; - TA_Integer optInPeriod_1; - TA_Integer optInMAType_1; - TA_Integer optInPeriod_2; - TA_Integer optInMAType_2; - - TA_RetCode expectedRetCode; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; - - TA_Integer oneOfTheExpectedOutRealIndex0; - TA_Real oneOfTheExpectedOutReal0; - - TA_Integer oneOfTheExpectedOutRealIndex1; - TA_Real oneOfTheExpectedOutReal1; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -static TA_RetCode referenceStoch( TA_Integer startIdx, - TA_Integer endIdx, - const TA_Real inHigh[], - const TA_Real inLow[], - const TA_Real inClose[], - TA_Integer optInPeriod_0, /* From 1 to TA_INTEGER_MAX */ - TA_Integer optInPeriod_1, /* From 1 to TA_INTEGER_MAX */ - TA_Integer optInMAType_1, - TA_Integer optInPeriod_2, /* From 1 to TA_INTEGER_MAX */ - TA_Integer optInMAType_2, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Real outSlowK_0[], - TA_Real outSlowD_1[] ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /**************/ - /* STOCH TEST */ - /**************/ - { TEST_STOCH, 1, 0, 9, 9, 5, 3, TA_MAType_SMA, 4, TA_MAType_SMA, TA_SUCCESS, 9, 1, - 0, 38.139, - 0, 36.725 }, /* Test one value */ - - - { TEST_STOCH, 0, 0, 0, 251, 5, 3, TA_MAType_SMA, 3, TA_MAType_SMA, TA_SUCCESS, 8, 252-8, - 0, 24.0128, - 0, 36.254, }, /* First Value */ - - { TEST_STOCH, 0, 0, 0, 251, 5, 3, TA_MAType_SMA, 4, TA_MAType_SMA, TA_SUCCESS, 9, 252-9, - 252-10, 30.194, - 252-10, 46.641, }, /* Last Value */ - - { TEST_STOCH, 0, 0, 0, 251, 5, 3, TA_MAType_SMA, 3, TA_MAType_SMA, TA_SUCCESS, 8, 252-8, - 252-9, 30.194, - 252-9, 43.69, }, /* Last Value */ - - /*****************/ - /* STOCHRSI TEST */ - /*****************/ - { TEST_STOCHRSI, 0, 0, 27, 27, 14, 14, -1, 1, TA_MAType_SMA, TA_SUCCESS, 27, 1, - 0, 94.156709, - 0, 94.156709 }, /* Test one Value */ - - { TEST_STOCHRSI, 1, 0, 0, 251, 14, 14, -1, 1, TA_MAType_SMA, TA_SUCCESS, 27, 252-27, - 0, 94.156709, - 0, 94.156709 }, /* First Value */ - - { TEST_STOCHRSI, 0, 0, 0, 251, 14, 14, -1, 1, TA_MAType_SMA, TA_SUCCESS, 27, 252-27, - 251-27, 0.0, - 251-27, 0.0 }, /* Last Value */ - - { TEST_STOCHRSI, 0, 0, 0, 251, 14, 45, -1, 1, TA_MAType_SMA, TA_SUCCESS, 58, 252-58, - 0, 79.729186, - 0, 79.729186 }, /* First Value */ - - { TEST_STOCHRSI, 0, 0, 0, 251, 14, 45, -1, 1, TA_MAType_SMA, TA_SUCCESS, 58, 252-58, - 251-58, 48.1550743, - 251-58, 48.1550743 }, /* Last Value */ - - - { TEST_STOCHRSI, 1, 0, 0, 251, 11, 13, -1, 16, TA_MAType_SMA, TA_SUCCESS, 38, 252-38, - 0, 5.25947, - 0, 57.1711}, /* First Value */ - - { TEST_STOCHRSI, 0, 0, 0, 251, 11, 13, -1, 16, TA_MAType_SMA, TA_SUCCESS, 38, 252-38, - 251-38, 0.0, - 251-38, 15.7303 }, /* Last Value */ - - /* More test needed!!! */ -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_stoch( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", __FILE__, - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", __FILE__, - i, retValue ); - return retValue; - } - } - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - TA_Real *dummyOutput; - - (void)outputBufferInt; - - *isOutputInteger = 0; - - retCode = TA_NOT_SUPPORTED; - - testParam = (TA_RangeTestParam *)opaqueData; - - - dummyOutput = TA_Malloc( (endIdx-startIdx+1) * sizeof(TA_Real) ); - - switch( testParam->test->testId ) - { - case TEST_STOCH: - if( outputNb == 0 ) - { - retCode = TA_STOCH( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - (TA_MAType)testParam->test->optInMAType_1, - testParam->test->optInPeriod_2, - (TA_MAType)testParam->test->optInMAType_2, - outBegIdx, outNbElement, - outputBuffer, - dummyOutput ); - - } - else - { - retCode = TA_STOCH( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - (TA_MAType)testParam->test->optInMAType_1, - testParam->test->optInPeriod_2, - (TA_MAType)testParam->test->optInMAType_2, - outBegIdx, outNbElement, - dummyOutput, - outputBuffer ); - } - - *lookback = TA_STOCH_Lookback( testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - (TA_MAType)testParam->test->optInMAType_1, - testParam->test->optInPeriod_2, - (TA_MAType)testParam->test->optInMAType_2 ); - break; - case TEST_STOCHF: - if( outputNb == 0 ) - { - retCode = TA_STOCHF( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - (TA_MAType)testParam->test->optInMAType_1, - outBegIdx, outNbElement, - outputBuffer, - dummyOutput ); - - } - else - { - retCode = TA_STOCHF( startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - (TA_MAType)testParam->test->optInMAType_1, - outBegIdx, outNbElement, - dummyOutput, - outputBuffer ); - } - - *lookback = TA_STOCHF_Lookback( testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - (TA_MAType)testParam->test->optInMAType_1 ); - break; - - case TEST_STOCHRSI: - if( outputNb == 0 ) - { - retCode = TA_STOCHRSI( startIdx, - endIdx, - testParam->close, - testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - testParam->test->optInPeriod_2, - (TA_MAType)testParam->test->optInMAType_2, - outBegIdx, outNbElement, - outputBuffer, - dummyOutput ); - - } - else - { - retCode = TA_STOCHRSI( startIdx, - endIdx, - testParam->close, - testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - testParam->test->optInPeriod_2, - (TA_MAType)testParam->test->optInMAType_2, - outBegIdx, outNbElement, - dummyOutput, - outputBuffer ); - } - - *lookback = TA_STOCHRSI_Lookback( testParam->test->optInPeriod_0, - testParam->test->optInPeriod_1, - testParam->test->optInPeriod_2, - (TA_MAType)testParam->test->optInMAType_2 ); - break; - } - - TA_Free( dummyOutput ); - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - retCode = TA_NOT_SUPPORTED; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - - /* Re-initialize all the unstable period to zero. */ - TA_SetUnstablePeriod( TA_FUNC_UNST_ALL, 0 ); - - /* Set the unstable period requested for that test. */ - switch( test->optInMAType_1 ) - { - case TA_MAType_EMA: - retCode = TA_SetUnstablePeriod( TA_FUNC_UNST_EMA, test->unstablePeriod ); - if( retCode != TA_SUCCESS ) - return TA_TEST_TFRR_SETUNSTABLE_PERIOD_FAIL; - break; - default: - /* No unstable period for other methods. */ - break; - } - - /* Make a simple first call. */ - switch( test->testId ) - { - case TEST_STOCH: - retCode = TA_STOCH( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - (TA_MAType)test->optInMAType_1, - test->optInPeriod_2, - (TA_MAType)test->optInMAType_2, - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1 ); - break; - case TEST_STOCHF: - retCode = TA_STOCHF( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - (TA_MAType)test->optInMAType_1, - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1 ); - break; - case TEST_STOCHRSI: - retCode = TA_STOCHRSI( test->startIdx, - test->endIdx, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - test->optInPeriod_2, - (TA_MAType)test->optInMAType_2, - &outBegIdx, &outNbElement, - gBuffer[0].out0, - gBuffer[0].out1 ); - break; - } - - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].out0, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[0].out1, 1 ); - - outBegIdx = outNbElement = 0; - - if( test->testId == TEST_STOCH ) - { - /* Call a local non-optimized version of the function. - * This way, we make sure that the currently speed optimized - * version in TA-Lib is not broken. - */ - retCode = referenceStoch( - test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - test->optInMAType_1, - test->optInPeriod_2, - test->optInMAType_2, - &outBegIdx, &outNbElement, - gBuffer[1].out0, - gBuffer[1].out1 ); - - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[1].out0, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[1].out1, 1 ); - - /* The non-optimized reference shall be identical to the optimized - * TA-Lib implementation. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[1].out0, gBuffer[0].out0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkSameContent( gBuffer[1].out1, gBuffer[0].out1 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - /* Make another call where the input and the output are the - * same buffer. - */ - switch( test->testId ) - { - case TEST_STOCH: - retCode = TA_STOCH( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - (TA_MAType)test->optInMAType_1, - test->optInPeriod_2, - (TA_MAType)test->optInMAType_2, - &outBegIdx, &outNbElement, - gBuffer[0].in, - gBuffer[1].in ); - break; - case TEST_STOCHF: - retCode = TA_STOCHF( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - (TA_MAType)test->optInMAType_1, - &outBegIdx, &outNbElement, - gBuffer[0].in, - gBuffer[1].in ); - break; - case TEST_STOCHRSI: - retCode = TA_STOCHRSI( test->startIdx, - test->endIdx, - gBuffer[2].in, - test->optInPeriod_0, - test->optInPeriod_1, - test->optInPeriod_2, - (TA_MAType)test->optInMAType_2, - &outBegIdx, &outNbElement, - gBuffer[0].in, - gBuffer[1].in ); - break; - - } - - /* The previous call should have the same output as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkSameContent( gBuffer[0].out1, gBuffer[1].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - CHECK_EXPECTED_VALUE( gBuffer[0].in, 0 ); - CHECK_EXPECTED_VALUE( gBuffer[1].in, 1 ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - switch( test->testId ) - { - case TEST_STOCH: - case TEST_STOCHF: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_NONE, - (void *)&testParam, 2, 0 ); - break; - case TEST_STOCHRSI: - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_RSI, - (void *)&testParam, 2, 0 ); - break; - } - - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} - - -/* This is an un-optimized version of the STOCH function */ -static TA_RetCode referenceStoch( TA_Integer startIdx, - TA_Integer endIdx, - const TA_Real inHigh[], - const TA_Real inLow[], - const TA_Real inClose[], - TA_Integer optInPeriod_0, /* From 1 to TA_INTEGER_MAX */ - TA_Integer optInPeriod_1, /* From 1 to TA_INTEGER_MAX */ - TA_Integer optInMAType_1, - TA_Integer optInPeriod_2, /* From 1 to TA_INTEGER_MAX */ - TA_Integer optInMAType_2, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Real outSlowK_0[], - TA_Real outSlowD_1[] ) -{ - TA_RetCode retCode; - double Lt, Ht, tmp, *tempBuffer; - int outIdx; - int lookbackTotal, lookbackK, lookbackKSlow, lookbackDSlow; - int trailingIdx, today, i, bufferIsAllocated; - - /* Identify the lookback needed. */ - lookbackK = optInPeriod_0-1; - lookbackKSlow = TA_MA_Lookback( optInPeriod_1, (TA_MAType)optInMAType_1 ); - lookbackDSlow = TA_MA_Lookback( optInPeriod_2, (TA_MAType)optInMAType_2 ); - lookbackTotal = lookbackK + lookbackDSlow + lookbackKSlow; - - /* Move up the start index if there is not - * enough initial data. - */ - if( startIdx < lookbackTotal ) - startIdx = lookbackTotal; - - /* Make sure there is still something to evaluate. */ - if( startIdx > endIdx ) - { - /* Succeed... but no data in the output. */ - *outBegIdx = 0; - *outNbElement = 0; - return TA_SUCCESS; - } - - /* Do the K calculation: - * - * Kt = 100 x ((Ct-Lt)/(Ht-Lt)) - * - * Kt is today stochastic - * Ct is today closing price. - * Lt is the lowest price of the last K Period (including today) - * Ht is the highest price of the last K Period (including today) - */ - - /* Proceed with the calculation for the requested range. - * Note that this algorithm allows the input and - * output to be the same buffer. - */ - outIdx = 0; - - /* Calculate just enough K for ending up with the caller - * requested range. (The range of k must consider all - * the lookback involve with the smoothing). - */ - trailingIdx = startIdx-lookbackTotal; - today = trailingIdx+lookbackK; - - /* Allocate a temporary buffer large enough to - * store the K. - * - * If the output is the same as the input, great - * we just save ourself one memory allocation. - */ - bufferIsAllocated = 0; - if( (outSlowK_0 == inHigh) || - (outSlowK_0 == inLow) || - (outSlowK_0 == inClose) ) - { - tempBuffer = outSlowK_0; - } - else if( (outSlowD_1 == inHigh) || - (outSlowD_1 == inLow) || - (outSlowD_1 == inClose) ) - { - tempBuffer = outSlowD_1; - } - else - { - bufferIsAllocated = 1; - tempBuffer = TA_Malloc( (endIdx-today+1)*sizeof(TA_Real) ); - } - - /* Do the K calculation */ - while( today <= endIdx ) - { - /* Find Lt and Ht for the requested K period. */ - Lt = inLow [trailingIdx]; - Ht = inHigh[trailingIdx]; - trailingIdx++; - for( i=trailingIdx; i <= today; i++ ) - { - tmp = inLow[i]; - if( tmp < Lt ) Lt = tmp; - tmp = inHigh[i]; - if( tmp > Ht ) Ht = tmp; - } - - /* Calculate stochastic. */ - tmp = Ht-Lt; - if( tmp > 0.0 ) - tempBuffer[outIdx++] = 100.0*((inClose[today]-Lt)/tmp); - else - tempBuffer[outIdx++] = 100.0; - - today++; - } - - /* Un-smoothed K calculation completed. This K calculation is not returned - * to the caller. It is always smoothed and then return. - * Some documentation will refer to the smoothed version as being - * "K-Slow", but often this end up to be shorten to "K". - */ - retCode = TA_MA( 0, outIdx-1, - tempBuffer, optInPeriod_1, - (TA_MAType)optInMAType_1, - outBegIdx, outNbElement, tempBuffer ); - - - if( (retCode != TA_SUCCESS) || (*outNbElement == 0) ) - { - if( bufferIsAllocated ) - TA_Free( tempBuffer ); - /* Something wrong happen? No further data? */ - *outBegIdx = 0; - *outNbElement = 0; - return retCode; - } - - /* Calculate the %D which is simply a moving average of - * the already smoothed %K. - */ - retCode = TA_MA( 0, (*outNbElement)-1, - tempBuffer, optInPeriod_2, - (TA_MAType)optInMAType_2, - outBegIdx, outNbElement, outSlowD_1 ); - - /* Copy tempBuffer into the caller buffer. - * (Calculation could not be done directly in the - * caller buffer because more input data then the - * requested range was needed for doing %D). - */ - memmove( outSlowK_0, &tempBuffer[lookbackDSlow], (*outNbElement) * sizeof(TA_Real) ); - - /* Don't need K anymore, free it if it was allocated here. */ - if( bufferIsAllocated ) - TA_Free( tempBuffer ); - - if( retCode != TA_SUCCESS ) - { - /* Something wrong happen while processing %D? */ - *outBegIdx = 0; - *outNbElement = 0; - return retCode; - } - - /* Note: Keep the outBegIdx relative to the - * caller input before returning. - */ - *outBegIdx = startIdx; - - return TA_SUCCESS; -} - - diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c b/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c deleted file mode 100644 index c5a707fd0..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_func/test_trange.c +++ /dev/null @@ -1,349 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Test TRANGE and ATR function. - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_test_func.h" -#include "ta_utility.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef struct -{ - TA_Integer doRangeTestFlag; /* One will do a call to doRangeTest */ - - TA_Integer unstablePeriod; - - TA_Integer startIdx; - TA_Integer endIdx; - - TA_Integer doAverage; /* 1 indicate ATR, else TRANGE. */ - TA_Integer optInTimePeriod; /* Meaningful only for ATR. */ - - TA_RetCode expectedRetCode; - - TA_Integer oneOfTheExpectedOutRealIndex; - TA_Real oneOfTheExpectedOutReal; - - TA_Integer expectedBegIdx; - TA_Integer expectedNbElement; -} TA_Test; - -typedef struct -{ - const TA_Test *test; - const TA_Real *high; - const TA_Real *low; - const TA_Real *close; -} TA_RangeTestParam; - -/**** Local functions declarations. ****/ -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ); - -/**** Local variables definitions. ****/ - -static TA_Test tableTest[] = -{ - /* TRANGE TEST */ - { 1, 0, 0, 251, 0, 0, TA_SUCCESS, 0, 3.535, 1, 251 }, /* First Value */ - { 0, 0, 0, 251, 0, 0, TA_SUCCESS, 12, 9.685, 1, 251 }, - { 0, 0, 0, 251, 0, 0, TA_SUCCESS, 40, 5.125, 1, 251 }, - { 0, 0, 0, 251, 0, 0, TA_SUCCESS, 250, 2.88, 1, 251 }, /* Last Value */ - - /* ATR TEST */ - { 1, 0, 0, 251, 1, 1, TA_SUCCESS, 0, 3.535, 1, 251 }, /* First Value */ - { 0, 0, 0, 251, 1, 1, TA_SUCCESS, 12, 9.685, 1, 251 }, - { 0, 0, 0, 251, 1, 1, TA_SUCCESS, 40, 5.125, 1, 251 }, - { 0, 0, 0, 251, 1, 1, TA_SUCCESS, 250, 2.88, 1, 251 }, /* Last Value */ - - { 0, 1, 14, 15, 1, 14, TA_SUCCESS, 0, 3.4876, 15, 1 }, - { 0, 1, 15, 16, 1, 14, TA_SUCCESS, 0, 3.4876, 15, 2 }, - - { 1, 0, 0, 251, 1, 14, TA_SUCCESS, 0, 3.578, 14, 252-14 }, /* First Value */ - { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 1, 3.4876, 14, 252-14 }, - { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 2, 3.55, 14, 252-14 }, - { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 12, 3.245, 14, 252-14 }, - { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 13, 3.394, 14, 252-14 }, - { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 14, 3.413, 14, 252-14 }, - { 0, 0, 0, 251, 1, 14, TA_SUCCESS, 237, 3.26, 14, 252-14 }, /* Last Value */ - -}; - -#define NB_TEST (sizeof(tableTest)/sizeof(TA_Test)) - -/**** Global functions definitions. ****/ -ErrorNumber test_func_trange( TA_History *history ) -{ - unsigned int i; - ErrorNumber retValue; - - for( i=0; i < NB_TEST; i++ ) - { - if( (int)tableTest[i].expectedNbElement > (int)history->nbBars ) - { - printf( "%s Failed Bad Parameter for Test #%d (%d,%d)\n", - tableTest[i].doAverage? "TA_ATR":"TA_TRANGE", - i, tableTest[i].expectedNbElement, history->nbBars ); - return TA_TESTUTIL_TFRR_BAD_PARAM; - } - - retValue = do_test( history, &tableTest[i] ); - if( retValue != 0 ) - { - printf( "%s Failed Test #%d (Code=%d)\n", - tableTest[i].doAverage? "TA_ATR":"TA_TRANGE", - i, retValue ); - return retValue; - } - } - - - /* All test succeed. */ - return TA_TEST_PASS; -} - -/**** Local functions definitions. ****/ -static TA_RetCode rangeTestFunction( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - TA_RetCode retCode; - TA_RangeTestParam *testParam; - - (void)outputNb; - (void)outputBufferInt; - - *isOutputInteger = 0; - - testParam = (TA_RangeTestParam *)opaqueData; - - - if( testParam->test->doAverage ) - { - retCode = TA_ATR( - startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - testParam->test->optInTimePeriod, - outBegIdx, - outNbElement, - outputBuffer ); - *lookback = TA_ATR_Lookback( testParam->test->optInTimePeriod ); - } - else - { - retCode = TA_TRANGE( - startIdx, - endIdx, - testParam->high, - testParam->low, - testParam->close, - outBegIdx, - outNbElement, - outputBuffer ); - - *lookback = TA_TRANGE_Lookback(); - } - - return retCode; -} - -static ErrorNumber do_test( const TA_History *history, - const TA_Test *test ) -{ - TA_RetCode retCode; - ErrorNumber errNb; - TA_Integer outBegIdx; - TA_Integer outNbElement; - TA_RangeTestParam testParam; - - /* Set to NAN all the elements of the gBuffers. */ - clearAllBuffers(); - - /* Build the input. */ - setInputBuffer( 0, history->high, history->nbBars ); - setInputBuffer( 1, history->low, history->nbBars ); - setInputBuffer( 2, history->close, history->nbBars ); - - if( test->doAverage ) - { - TA_SetUnstablePeriod( TA_FUNC_UNST_ATR, test->unstablePeriod ); - retCode = TA_ATR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - else - { - retCode = TA_TRANGE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - &outBegIdx, - &outNbElement, - gBuffer[0].out0 ); - } - - errNb = checkDataSame( gBuffer[0].in, history->high,history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[1].in, history->low, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - errNb = checkDataSame( gBuffer[2].in, history->close, history->nbBars ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[0].out0, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - outBegIdx = outNbElement = 0; - - /* Make another call where the input and the output are the - * same buffer. - */ - if( test->doAverage ) - { - TA_SetUnstablePeriod( TA_FUNC_UNST_ATR, test->unstablePeriod ); - retCode = TA_ATR( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - test->optInTimePeriod, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - } - else - { - retCode = TA_TRANGE( test->startIdx, - test->endIdx, - gBuffer[0].in, - gBuffer[1].in, - gBuffer[2].in, - &outBegIdx, - &outNbElement, - gBuffer[0].in ); - } - - /* The previous call to TA_MA should have the same output - * as this call. - * - * checkSameContent verify that all value different than NAN in - * the first parameter is identical in the second parameter. - */ - errNb = checkSameContent( gBuffer[0].out0, gBuffer[0].in ); - if( errNb != TA_TEST_PASS ) - return errNb; - - errNb = checkExpectedValue( gBuffer[0].in, - retCode, test->expectedRetCode, - outBegIdx, test->expectedBegIdx, - outNbElement, test->expectedNbElement, - test->oneOfTheExpectedOutReal, - test->oneOfTheExpectedOutRealIndex ); - if( errNb != TA_TEST_PASS ) - return errNb; - - /* Do a systematic test of most of the - * possible startIdx/endIdx range. - */ - testParam.test = test; - testParam.high = history->high; - testParam.low = history->low; - testParam.close = history->close; - - if( test->doRangeTestFlag ) - { - errNb = doRangeTest( rangeTestFunction, - TA_FUNC_UNST_ATR, - (void *)&testParam, 1, 0 ); - if( errNb != TA_TEST_PASS ) - return errNb; - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/ta_test_priv.h b/src/ta-lib/src/tools/ta_regtest/ta_test_priv.h deleted file mode 100644 index 435f06758..000000000 --- a/src/ta-lib/src/tools/ta_regtest/ta_test_priv.h +++ /dev/null @@ -1,210 +0,0 @@ -#ifndef TA_TEST_PRIV_H -#define TA_TEST_PRIV_H - -#ifndef TA_LIBC_H - #include "ta_libc.h" -#endif - -#ifndef TA_ERROR_NUMBER_H - #include "ta_error_number.h" -#endif - -typedef struct -{ - unsigned int nbBars; /* Nb of element into the following arrays. */ - - /* The arrays containing data. Unused array are set to NULL. */ - TA_Real *open; - TA_Real *high; - TA_Real *low; - TA_Real *close; - TA_Real *volume; - TA_Real *openInterest; -} TA_History; - -ErrorNumber test_internals( void ); -ErrorNumber test_abstract( void ); - -ErrorNumber freeLib( void ); -ErrorNumber allocLib( void ); - -void reportError( const char *str, TA_RetCode retCode ); - -/* Global Temporary Used by the ta_func_xxx function. */ - - -typedef struct -{ - TA_Real *in; - - TA_Real *out0; - TA_Real *out1; - TA_Real *out2; -} TestBuffer; - - -/* That's quite a lot of global data, but who cares for - * regression testing... it simplify memory alloc/dealloc. - */ -#define NB_GLOBAL_BUFFER 5 -extern TestBuffer gBuffer[NB_GLOBAL_BUFFER]; - -/* Maximum number of element that can be written - * at a gBuffer[n].ptr - */ -#define MAX_NB_TEST_ELEMENT 280 - -/* Must be called once to initialize the gBuffer. */ -void initGlobalBuffer( void ); - -/* Will set to NAN all elements of gBuffer. */ -void clearAllBuffers( void ); - -/* Initialize the 'gBuffer[i].in' with the provided data. */ -void setInputBuffer( unsigned int i, const TA_Real *data, unsigned int nbElement ); - -/* Same as setInputBuffer but fill with a single value. */ -void setInputBufferValue( unsigned int i, const TA_Real data, unsigned int nbElement ); - -/* Check that a buffer (within a TestBuffer) is not containing - * NAN within the specified range (it also checks that all value - * outside the range are untouched). - * - * Return TA_TEST_PASS if all ok. - */ -ErrorNumber checkForNAN( const TA_Real *buffer, - unsigned int nbElement ); - -/* Check that the 'data' is equal to the provided - * originalInput. - * - * The data must be one of the 'gBuffer[n].buffer'. - * - * It is also checked that all value outside of the - * nbElement range are not-a-number. - * - * Return TA_TEST_PASS if no difference are found. - */ -ErrorNumber checkDataSame( const TA_Real *data, - const TA_Real *originalInput, - unsigned int nbElement ); - -/* Check that the content of the first buffer - * is found in the second buffer (when the elements - * in the first buffer is NAN, no check is done for - * this paricular element). - * - * Return TA_TEST_PASS if no difference are found. - */ -ErrorNumber checkSameContent( TA_Real *buffer1, - TA_Real *buffer2 ); - -ErrorNumber checkExpectedValue( const TA_Real *data, - TA_RetCode retCode, TA_RetCode expectedRetCode, - unsigned int outBegIdx, unsigned int expectedBegIdx, - unsigned int outNbElement, unsigned int expectedNbElement, - TA_Real oneOfTheExpectedOutReal, - unsigned int oneOfTheExpectedOutRealIndex ); - -#define CHECK_EXPECTED_VALUE(bufid,id) \ - { \ - errNb = checkExpectedValue( bufid, \ - retCode, test->expectedRetCode, \ - outBegIdx, test->expectedBegIdx, \ - outNbElement, test->expectedNbElement, \ - test->oneOfTheExpectedOutReal##id, \ - test->oneOfTheExpectedOutRealIndex##id ); \ - if( errNb != TA_TEST_PASS ) \ - { \ - printf( "Fail for output id=%d\n", id ); \ - return errNb; \ - } \ - } - -#define CLEAR_EXPECTED_VALUE(id) \ - { \ - retCode = TA_INTERNAL_ERROR(127); \ - outBegIdx = 0;\ - outNbElement = 0;\ - } - - -/* A systematic test can be done for most of the possible - * range that a TA function can be called with. This test - * is common to all TA function and can be easily done - * with a RangeTestFunction. - * - * The RangeTestFunction is making abstraction of the - * TA function (handles the inputs, the parameters etc...) - * The RangeTestFunction must call the TA function for - * the requested startIdx/endIdx range and put the output - * in the provided buffer. - * - * The RangeTestFunction must also set the outBegIdx and - * outNbElement for verification. - * - * Opaque data (for mostly passing optional parameters) are - * pass through the pointer 'void * opaqueData'. - * - * The output of the function must be put in the outputBuffer - * or outputBufferInt depending of the return type. - */ -#define MAX_RANGE_SIZE 252 -#define MAX_RANGE_END (MAX_RANGE_SIZE-1) - -typedef TA_RetCode (*RangeTestFunction)( TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ); - -/* This is the function starting the range tests. - * The parameter 'nbOutput' allows to repeat the - * tests indepedently for each outputs. - * - * A lot of coherency tests are performed, - * including comparing that the same value are - * returned even when using a different startIdx - * and endIdx. - * - * Because of the complexity added by algorithm that - * have an unstable period, the comparison is - * done using a tolerance algorithm (see test_util.c). - * - * Comparison can be ignored by specifiying - * an integerTolerance == TA_DO_NOT_COMPARE - * - * Even without comparison, a lot of coherency - * tests are still performed (like making sure the - * lookback function is coherent with its TA function). - * - * In the case that the TA function output are - * integer, the integerTolerance indicate by how much - * the value can vary for a function having an - * unstable period. Example: If 2 is pass, the - * value can vary of no more or less 2. - * When passing zero, the tolerance is done using - * a "reasonable" logic using double calculation (see - * test_util.c for more info). - */ -#define TA_DO_NOT_COMPARE 0xFFFFFFFF -ErrorNumber doRangeTest( RangeTestFunction testFunction, - TA_FuncUnstId unstId, - void *opaqueData, - unsigned int nbOutput, - unsigned int integerTolerance ); - -/* Print out info about a retCode */ -void printRetCode( TA_RetCode retCode ); - -/* Function to print character to show that the software is still alive. */ -void showFeedback(void); -void hideFeedback(void); - -#endif - diff --git a/src/ta-lib/src/tools/ta_regtest/test_abstract.c b/src/ta-lib/src/tools/ta_regtest/test_abstract.c deleted file mode 100644 index b8d304974..000000000 --- a/src/ta-lib/src/tools/ta_regtest/test_abstract.c +++ /dev/null @@ -1,788 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * AC Angelo Ciceri - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112703 MF First version. - * 030104 MF Add tests for TA_GetLookback - * 062504 MF Add test_default_calls. - * 110206 AC Change volume and open interest to double - * 082607 MF Add profiling feature. - */ - -/* Description: - * Regression testing of the functionality provided - * by the ta_abstract module. - * - * Also perform call to all functions for the purpose - * of profiling (doExtensiveProfiling option). - */ - -/**** Headers ****/ -#ifdef WIN32 - #include "windows.h" -#else - #include "time.h" -#endif - -#include -#include -#include -#include -#include "ta_test_priv.h" - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -extern int doExtensiveProfiling; - -extern double gDataOpen[]; -extern double gDataHigh[]; -extern double gDataLow[]; -extern double gDataClose[]; - -extern int nbProfiledCall; -extern double timeInProfiledCall; -extern double worstProfiledCall; -extern int insufficientClockPrecision; - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -typedef enum -{ - PROFILING_10000, - PROFILING_8000, - PROFILING_5000, - PROFILING_2000, - PROFILING_1000, - PROFILING_500, - PROFILING_100 -} ProfilingType; - -/**** Local functions declarations. ****/ -static ErrorNumber testLookback(TA_ParamHolder *paramHolder ); -static ErrorNumber test_default_calls(void); -static ErrorNumber callWithDefaults( const char *funcName, - const double *input, - const int *input_int, int size ); -static ErrorNumber callAndProfile( const char *funcName, ProfilingType type ); - -/**** Local variables definitions. ****/ -static double inputNegData[100]; -static double inputZeroData[100]; -static double inputRandFltEpsilon[100]; -static double inputRandDblEpsilon[100]; -static double inputRandomData[2000]; - -static int inputNegData_int[100]; -static int inputZeroData_int[100]; -static int inputRandFltEpsilon_int[100]; -static int inputRandDblEpsilon_int[100]; -static int inputRandomData_int[2000]; - -static double output[10][2000]; -static int output_int[10][2000]; - -/**** Global functions definitions. ****/ -ErrorNumber test_abstract( void ) -{ - ErrorNumber retValue; - TA_RetCode retCode; - TA_ParamHolder *paramHolder; - const TA_FuncHandle *handle; - int i; - const char *xmlArray; - - printf( "Testing Abstract interface\n" ); - - retValue = allocLib(); - if( retValue != TA_TEST_PASS ) - return retValue; - - /* Verify TA_GetLookback. */ - retCode = TA_GetFuncHandle( "STOCH", &handle ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't get the function handle [%d]\n", retCode ); - return TA_ABS_TST_FAIL_GETFUNCHANDLE; - } - - retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't allocate the param holder [%d]\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; - } - - retValue = testLookback(paramHolder); - if( retValue != TA_SUCCESS ) - { - printf( "testLookback() failed [%d]\n", retValue ); - TA_ParamHolderFree( paramHolder ); - return retValue; - } - - retCode = TA_ParamHolderFree( paramHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_ParamHolderFree failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERFREE; - } - - retValue = freeLib(); - if( retValue != TA_TEST_PASS ) - return retValue; - - /* Call all the TA functions through the abstract interface. */ - retValue = allocLib(); - if( retValue != TA_TEST_PASS ) - return retValue; - - retValue = test_default_calls(); - if( retValue != TA_TEST_PASS ) - { - printf( "TA-Abstract default call failed\n" ); - return retValue; - } - - retValue = freeLib(); - if( retValue != TA_TEST_PASS ) - return retValue; - - /* Verify that the TA_FunctionDescription is null terminated - * and as at least 500 characters (less is guaranteed bad...) - */ - xmlArray = TA_FunctionDescriptionXML(); - for( i=0; i < 1000000; i++ ) - { - if( xmlArray[i] == 0x0 ) - break; - } - - if( i < 500) - { - printf( "TA_FunctionDescriptionXML failed. Size too small.\n" ); - return TA_ABS_TST_FAIL_FUNCTION_DESC_SMALL; - } - - if( i == 1000000 ) - { - printf( "TA_FunctionDescriptionXML failed. Size too large (missing null?).\n" ); - return TA_ABS_TST_FAIL_FUNCTION_DESC_LARGE; - } - - return TA_TEST_PASS; /* Succcess. */ -} - -/**** Local functions definitions. ****/ -static ErrorNumber testLookback( TA_ParamHolder *paramHolder ) -{ - TA_RetCode retCode; - int lookback; - - /* Change the parameters of STOCH and verify that TA_GetLookback respond correctly. */ - retCode = TA_SetOptInputParamInteger( paramHolder, 0, 3 ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_SetOptInputParamInteger( paramHolder, 1, 4 ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_SetOptInputParamInteger( paramHolder, 2, (TA_Integer)TA_MAType_SMA ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_SetOptInputParamInteger( paramHolder, 3, 4 ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_SetOptInputParamInteger( paramHolder, 4, (TA_Integer)TA_MAType_SMA ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_GetLookback(paramHolder,&lookback); - if( retCode != TA_SUCCESS ) - { - printf( "TA_GetLookback failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_GETLOOKBACK_CALL_1; - } - - if( lookback != 8 ) - { - printf( "TA_GetLookback failed [%d != 8]\n", lookback ); - return TA_ABS_TST_FAIL_GETLOOKBACK_1; - } - - /* Change one parameter and check again. */ - retCode = TA_SetOptInputParamInteger( paramHolder, 3, 3 ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_SetOptInputParamInteger call failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_OPTINPUTPARAMINTEGER; - } - - retCode = TA_GetLookback(paramHolder,&lookback); - if( retCode != TA_SUCCESS ) - { - printf( "TA_GetLookback failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_GETLOOKBACK_CALL_2; - } - - if( lookback != 7 ) - { - printf( "TA_GetLookback failed [%d != 7]\n", lookback ); - return TA_ABS_TST_FAIL_GETLOOKBACK_2; - } - - return TA_TEST_PASS; -} - -/* Some processings are a bit different for functions under - * the Math Operator and Math Transform category. - */ -static int isMath( const TA_FuncInfo *funcInfo ) -{ - int notMath; - notMath = (strlen(funcInfo->group) < 4) || - !((tolower(funcInfo->group[0]) == 'm') && - (tolower(funcInfo->group[1]) == 'a') && - (tolower(funcInfo->group[2]) == 't') && - (tolower(funcInfo->group[3]) == 'h')); - - return !notMath; -} - -#if 0 -// Unused for now -static int isCandlePattern( const TA_FuncInfo *funcInfo ) -{ - int notCandlePattern; - notCandlePattern = (strlen(funcInfo->group) < 3) || - !((tolower(funcInfo->name[0]) == 'c') && - (tolower(funcInfo->name[1]) == 'd') && - (tolower(funcInfo->name[2]) == 'l')); - - return !notCandlePattern; -} -#endif - -static void testDefault( const TA_FuncInfo *funcInfo, void *opaqueData ) -{ - static int nbFunctionDone = 0; - ErrorNumber *errorNumber; - errorNumber = (ErrorNumber *)opaqueData; - if( *errorNumber != TA_TEST_PASS ) - return; - -/* if( !isCandlePattern(funcInfo) ) - return;*/ - -#define CALL(x) { \ - *errorNumber = callWithDefaults( funcInfo->name, x, x##_int, sizeof(x)/sizeof(double) ); \ - if( *errorNumber != TA_TEST_PASS ) { \ - printf( "Failed for [%s][%s]\n", funcInfo->name, #x ); \ - return; \ - } \ -} - /* Do not test value outside the ]0..1[ domain for the "Math" groups. */ - if( !isMath(funcInfo) ) - { - CALL( inputNegData ); - CALL( inputZeroData ); - CALL( inputRandFltEpsilon ); - CALL( inputRandDblEpsilon ); - } - - CALL( inputRandomData ); - -#undef CALL - -#define CALL(x) { \ - *errorNumber = callAndProfile( funcInfo->name, x ); \ - if( *errorNumber != TA_TEST_PASS ) { \ - printf( "Failed for [%s][%s]\n", funcInfo->name, #x ); \ - return; \ - } \ -} - if( doExtensiveProfiling /*&& (nbFunctionDone<5)*/ ) - { - nbFunctionDone++; - printf( "%s ", funcInfo->name ); - CALL( PROFILING_100 ); - CALL( PROFILING_500 ); - CALL( PROFILING_1000 ); - CALL( PROFILING_2000 ); - CALL( PROFILING_5000 ); - CALL( PROFILING_8000 ); - CALL( PROFILING_10000 ); - printf( "\n" ); - } -} - -static ErrorNumber callWithDefaults( const char *funcName, const double *input, const int *input_int, int size ) -{ - TA_ParamHolder *paramHolder; - const TA_FuncHandle *handle; - const TA_FuncInfo *funcInfo; - const TA_InputParameterInfo *inputInfo; - const TA_OutputParameterInfo *outputInfo; - - TA_RetCode retCode; - unsigned int i; - int j; - int outBegIdx, outNbElement, lookback; - - retCode = TA_GetFuncHandle( funcName, &handle ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't get the function handle [%d]\n", retCode ); - return TA_ABS_TST_FAIL_GETFUNCHANDLE; - } - - retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't allocate the param holder [%d]\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; - } - - TA_GetFuncInfo( handle, &funcInfo ); - - for( i=0; i < funcInfo->nbInput; i++ ) - { - TA_GetInputParameterInfo( handle, i, &inputInfo ); - switch(inputInfo->type) - { - case TA_Input_Price: - TA_SetInputParamPricePtr( paramHolder, i, - inputInfo->flags&TA_IN_PRICE_OPEN?input:NULL, - inputInfo->flags&TA_IN_PRICE_HIGH?input:NULL, - inputInfo->flags&TA_IN_PRICE_LOW?input:NULL, - inputInfo->flags&TA_IN_PRICE_CLOSE?input:NULL, - inputInfo->flags&TA_IN_PRICE_VOLUME?input:NULL, NULL ); - break; - case TA_Input_Real: - TA_SetInputParamRealPtr( paramHolder, i, input ); - break; - case TA_Input_Integer: - TA_SetInputParamIntegerPtr( paramHolder, i, input_int ); - break; - } - } - - for( i=0; i < funcInfo->nbOutput; i++ ) - { - TA_GetOutputParameterInfo( handle, i, &outputInfo ); - switch(outputInfo->type) - { - case TA_Output_Real: - TA_SetOutputParamRealPtr(paramHolder,i,&output[i][0]); - for( j=0; j < 2000; j++ ) - output[i][j] = TA_REAL_MIN; - break; - case TA_Output_Integer: - TA_SetOutputParamIntegerPtr(paramHolder,i,&output_int[i][0]); - for( j=0; j < 2000; j++ ) - output_int[i][j] = TA_INTEGER_MIN; - break; - } - } - - /* Do the function call. */ - retCode = TA_CallFunc(paramHolder,0,size-1,&outBegIdx,&outNbElement); - if( retCode != TA_SUCCESS ) - { - printf( "TA_CallFunc() failed zero data test [%d]\n", retCode ); - TA_ParamHolderFree( paramHolder ); - return TA_ABS_TST_FAIL_CALLFUNC_1; - } - - /* Verify consistency with Lookback */ - retCode = TA_GetLookback( paramHolder, &lookback ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_GetLookback() failed zero data test [%d]\n", retCode ); - TA_ParamHolderFree( paramHolder ); - return TA_ABS_TST_FAIL_CALLFUNC_2; - } - - if( outBegIdx != lookback ) - { - printf( "TA_GetLookback() != outBegIdx [%d != %d]\n", lookback, outBegIdx ); - TA_ParamHolderFree( paramHolder ); - return TA_ABS_TST_FAIL_CALLFUNC_3; - } - - /* TODO Add back nan/inf tests. - for( i=0; i < funcInfo->nbOutput; i++ ) - { - switch(outputInfo->type) - { - case TA_Output_Real: - for( j=0; j < outNbElement; j++ ) - { - if( trio_isnan(output[i][j]) || - trio_isinf(output[i][j])) - { - printf( "Failed for output[%d][%d] = %e\n", i, j, output[i][j] ); - return TA_ABS_TST_FAIL_INVALID_OUTPUT; - } - } - break; - case TA_Output_Integer: - break; - } - }*/ - - /* Do another function call where startIdx == endIdx == 0. - * In that case, outBegIdx should ALWAYS be zero. - */ - retCode = TA_CallFunc(paramHolder,0,0,&outBegIdx,&outNbElement); - if( retCode != TA_SUCCESS ) - { - printf( "TA_CallFunc() failed data test 4 [%d]\n", retCode ); - TA_ParamHolderFree( paramHolder ); - return TA_ABS_TST_FAIL_CALLFUNC_4; - } - - if( outBegIdx != 0 ) - { - printf( "failed outBegIdx=%d when startIdx==endIdx==0\n", outBegIdx ); - TA_ParamHolderFree( paramHolder ); - return TA_ABS_TST_FAIL_STARTEND_ZERO; - } - - retCode = TA_ParamHolderFree( paramHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_ParamHolderFree failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERFREE; - } - - return TA_TEST_PASS; -} - -static ErrorNumber test_default_calls(void) -{ - ErrorNumber errNumber; - unsigned int i; - unsigned int sign; - double tempDouble; - - errNumber = TA_TEST_PASS; - - for( i=0; i < sizeof(inputNegData)/sizeof(double); i++ ) - { - inputNegData[i] = -((double)((int)i)); - inputNegData_int[i] = -(int)i; - } - - for( i=0; i < sizeof(inputZeroData)/sizeof(double); i++ ) - { - inputZeroData[i] = 0.0; - inputZeroData_int[i] = (int)inputZeroData[i]; - } - - for( i=0; i < sizeof(inputRandomData)/sizeof(double); i++ ) - { - /* Make 100% sure input range is ]0..1[ */ - tempDouble = (double)rand() / ((double)(RAND_MAX)+(double)(1)); - while( (tempDouble <= 0.0) || (tempDouble >= 1.0) ) - { - tempDouble = (double)rand() / ((double)(RAND_MAX)+(double)(1)); - } - inputRandomData[i] = tempDouble; - inputRandomData_int[i] = (int)inputRandomData[i]; - } - - for( i=0; i < sizeof(inputRandFltEpsilon)/sizeof(double); i++ ) - { - sign= (unsigned int)rand()%2; - inputRandFltEpsilon[i] = (sign?1.0:-1.0)*(FLT_EPSILON); - inputRandFltEpsilon_int[i] = sign?TA_INTEGER_MIN:TA_INTEGER_MAX; - } - - for( i=0; i < sizeof(inputRandFltEpsilon)/sizeof(double); i++ ) - { - sign= (unsigned int)rand()%2; - inputRandFltEpsilon[i] = (sign?1.0:-1.0)*(DBL_EPSILON); - inputRandFltEpsilon_int[i] = sign?1:-1; - } - - if( doExtensiveProfiling ) - { - printf( "\n[PROFILING START]\n" ); - } - - TA_ForEachFunc( testDefault, &errNumber ); - - if( doExtensiveProfiling ) - { - printf( "[PROFILING END]\n" ); - } - - - return errNumber; -} - -static ErrorNumber callAndProfile( const char *funcName, ProfilingType type ) -{ - TA_ParamHolder *paramHolder; - const TA_FuncHandle *handle; - const TA_FuncInfo *funcInfo; - const TA_InputParameterInfo *inputInfo; - const TA_OutputParameterInfo *outputInfo; - - TA_RetCode retCode; - int h, i, j, k; - int outBegIdx, outNbElement; - - /* Variables to control iteration and corresponding input size */ - int nbInnerLoop, nbOuterLoop; - int stepSize; - int inputSize; - - /* Variables measuring the execution time */ -#ifdef WIN32 - LARGE_INTEGER startClock; - LARGE_INTEGER endClock; -#else - clock_t startClock; - clock_t endClock; -#endif - double clockDelta; - int nbProfiledCallLocal; - double timeInProfiledCallLocal; - double worstProfiledCallLocal; - - nbProfiledCallLocal = 0; - timeInProfiledCallLocal = 0.0; - worstProfiledCallLocal = 0.0; - nbInnerLoop = nbOuterLoop = stepSize = inputSize = 0; - - switch( type ) - { - case PROFILING_10000: - nbInnerLoop = 1; - nbOuterLoop = 100; - stepSize = 10000; - inputSize = 10000; - break; - case PROFILING_8000: - nbInnerLoop = 2; - nbOuterLoop = 50; - stepSize = 2000; - inputSize = 8000; - break; - case PROFILING_5000: - nbInnerLoop = 2; - nbOuterLoop = 50; - stepSize = 5000; - inputSize = 5000; - break; - case PROFILING_2000: - nbInnerLoop = 5; - nbOuterLoop = 20; - stepSize = 2000; - inputSize = 2000; - break; - case PROFILING_1000: - nbInnerLoop = 10; - nbOuterLoop = 10; - stepSize = 1000; - inputSize = 1000; - break; - case PROFILING_500: - nbInnerLoop = 20; - nbOuterLoop = 5; - stepSize = 500; - inputSize = 500; - break; - case PROFILING_100: - nbInnerLoop = 100; - nbOuterLoop = 1; - stepSize = 100; - inputSize = 100; - break; - } - - retCode = TA_GetFuncHandle( funcName, &handle ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't get the function handle [%d]\n", retCode ); - return TA_ABS_TST_FAIL_GETFUNCHANDLE; - } - - retCode = TA_ParamHolderAlloc( handle, ¶mHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "Can't allocate the param holder [%d]\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERALLOC; - } - - TA_GetFuncInfo( handle, &funcInfo ); - - for( i=0; i < (int)funcInfo->nbOutput; i++ ) - { - TA_GetOutputParameterInfo( handle, i, &outputInfo ); - switch(outputInfo->type) - { - case TA_Output_Real: - TA_SetOutputParamRealPtr(paramHolder,i,&output[i][0]); - for( j=0; j < 2000; j++ ) - output[i][j] = TA_REAL_MIN; - break; - case TA_Output_Integer: - TA_SetOutputParamIntegerPtr(paramHolder,i,&output_int[i][0]); - for( j=0; j < 2000; j++ ) - output_int[i][j] = TA_INTEGER_MIN; - break; - } - } - - for( h=0; h < 2; h++ ) - { - for( i=0; i < nbOuterLoop; i++ ) - { - for( j=0; j < nbInnerLoop; j++ ) - { - /* Prepare input. */ - for( k=0; k < (int)funcInfo->nbInput; k++ ) - { - TA_GetInputParameterInfo( handle, k, &inputInfo ); - switch(inputInfo->type) - { - case TA_Input_Price: - TA_SetInputParamPricePtr( paramHolder, k, - inputInfo->flags&TA_IN_PRICE_OPEN?&gDataOpen[j*stepSize]:NULL, - inputInfo->flags&TA_IN_PRICE_HIGH?&gDataHigh[j*stepSize]:NULL, - inputInfo->flags&TA_IN_PRICE_LOW?&gDataLow[j*stepSize]:NULL, - inputInfo->flags&TA_IN_PRICE_CLOSE?&gDataClose[j*stepSize]:NULL, - inputInfo->flags&TA_IN_PRICE_VOLUME?&gDataClose[j*stepSize]:NULL, NULL ); - break; - case TA_Input_Real: - TA_SetInputParamRealPtr( paramHolder, k, &gDataClose[j*stepSize] ); - break; - case TA_Input_Integer: - printf( "\nError: Integer input not yet supported for profiling.\n" ); - return TA_ABS_TST_FAIL_CALLFUNC_1; - } - } - - #ifdef WIN32 - QueryPerformanceCounter(&startClock); - #else - startClock = clock(); - #endif - - /* Do the function call. */ - retCode = TA_CallFunc(paramHolder,0,inputSize-1,&outBegIdx,&outNbElement); - if( retCode != TA_SUCCESS ) - { - printf( "TA_CallFunc() failed zero data test [%d]\n", retCode ); - TA_ParamHolderFree( paramHolder ); - return TA_ABS_TST_FAIL_CALLFUNC_1; - } - - #ifdef WIN32 - QueryPerformanceCounter(&endClock); - clockDelta = (double)((__int64)endClock.QuadPart - (__int64) startClock.QuadPart); - #else - endClock = clock(); - clockDelta = (double)(endClock - startClock); - #endif - - /* Setup global profiling info. */ - if( clockDelta <= 0 ) - { - printf( "Error: Insufficient timer precision to perform benchmarking on this platform.\n" ); - return TA_ABS_TST_FAIL_CALLFUNC_1; - } - else - { - if( clockDelta > worstProfiledCall ) - worstProfiledCall = clockDelta; - timeInProfiledCall += clockDelta; - nbProfiledCall++; - } - - /* Setup local profiling info for this particular function. */ - if( clockDelta > worstProfiledCallLocal ) - worstProfiledCallLocal = clockDelta; - timeInProfiledCallLocal += clockDelta; - nbProfiledCallLocal++; - } - } - } - - /* Output statistic (remove worst call, average the others. */ - printf( "%g ", (timeInProfiledCallLocal-worstProfiledCallLocal)/(double)(nbProfiledCallLocal-1)); - - retCode = TA_ParamHolderFree( paramHolder ); - if( retCode != TA_SUCCESS ) - { - printf( "TA_ParamHolderFree failed [%d]\n", retCode ); - return TA_ABS_TST_FAIL_PARAMHOLDERFREE; - } - - return TA_TEST_PASS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/test_data.c b/src/ta-lib/src/tools/ta_regtest/test_data.c deleted file mode 100644 index c4400e043..000000000 --- a/src/ta-lib/src/tools/ta_regtest/test_data.c +++ /dev/null @@ -1,145 +0,0 @@ -/* Input price data used to do regression tests. */ -#include "ta_libc.h" - -/* Market data used for profiling (10000 price bars). */ -#include "ta_gDataOpen.c" -#include "ta_gDataHigh.c" -#include "ta_gDataLow.c" -#include "ta_gDataClose.c" - -/* Market data used for regression tests (252 price bars). */ -TA_Real TA_SREF_open_daily_ref_0_PRIV[252] = {92.500000,91.500000,95.155000,93.970000,95.500000,94.500000,95.000000,91.500000,91.815000,91.125000,93.875000, -97.500000,98.815000,92.000000,91.125000,91.875000,93.405000,89.750000,89.345000,92.250000,89.780000, -87.940000,87.595000,85.220000,83.500000,83.500000,81.250000,85.125000,88.125000,87.500000,85.250000, -86.000000,87.190000,86.125000,89.000000,88.625000,86.000000,85.500000,84.750000,85.250000,84.250000, -86.750000,86.940000,89.315000,89.940000,90.815000,91.190000,91.345000,89.595000,91.000000,89.750000, -88.750000,88.315000,84.345000,83.500000,84.000000,86.000000,85.530000,87.500000,88.500000,90.000000, -88.655000,89.500000,91.565000,92.000000,93.000000,92.815000,91.750000,92.000000,91.375000,89.750000, -88.750000,85.440000,83.500000,84.875000,98.625000,96.690000,102.375000,106.000000,104.625000,102.500000, -104.250000,104.000000,106.125000,106.065000,105.940000,105.625000,108.625000,110.250000,110.565000,117.000000, -120.750000,118.000000,119.125000,119.125000,117.815000,116.375000,115.155000,111.250000,111.500000,116.690000, -116.000000,113.620000,111.750000,114.560000,113.620000,118.120000,119.870000,116.620000,115.870000,115.060000, -115.870000,117.500000,119.870000,119.250000,120.190000,122.870000,123.870000,122.250000,123.120000,123.310000, -124.000000,123.000000,124.810000,130.000000,130.880000,132.500000,131.000000,132.500000,134.000000,137.440000, -135.750000,138.310000,138.000000,136.380000,136.500000,132.000000,127.500000,127.620000,124.000000,123.620000, -125.000000,126.370000,126.250000,125.940000,124.000000,122.750000,120.000000,120.000000,122.000000,123.620000, -121.500000,120.120000,123.750000,122.750000,125.000000,128.500000,128.380000,123.870000,124.370000,122.750000, -123.370000,122.000000,122.620000,125.000000,124.250000,124.370000,125.620000,126.500000,128.380000,128.880000, -131.500000,132.500000,137.500000,134.630000,132.000000,134.000000,132.000000,131.380000,126.500000,128.750000, -127.190000,127.500000,120.500000,126.620000,123.000000,122.060000,121.000000,121.000000,118.000000,122.000000, -122.250000,119.120000,115.000000,113.500000,114.000000,110.810000,106.500000,106.440000,108.000000,107.000000, -108.620000,93.000000,93.750000,94.250000,94.870000,95.500000,94.500000,97.000000,98.500000,96.750000, -95.870000,94.440000,92.750000,90.500000,95.060000,94.620000,97.500000,96.000000,96.000000,94.620000, -94.870000,94.000000,99.000000,105.500000,108.810000,105.000000,105.940000,104.940000,103.690000,102.560000, -103.440000,109.810000,113.000000,117.000000,116.250000,120.500000,111.620000,108.120000,110.190000,107.750000, -108.000000,110.690000,109.060000,108.500000,109.870000,109.120000,109.690000,109.560000,110.440000,109.690000, -109.190000}; - -TA_Real TA_SREF_high_daily_ref_0_PRIV[252] = {93.250000,94.940000,96.375000,96.190000,96.000000,94.720000,95.000000,93.720000,92.470000,92.750000,96.250000, -99.625000,99.125000,92.750000,91.315000,93.250000,93.405000,90.655000,91.970000,92.250000,90.345000, -88.500000,88.250000,85.500000,84.440000,84.750000,84.440000,89.405000,88.125000,89.125000,87.155000, -87.250000,87.375000,88.970000,90.000000,89.845000,86.970000,85.940000,84.750000,85.470000,84.470000, -88.500000,89.470000,90.000000,92.440000,91.440000,92.970000,91.720000,91.155000,91.750000,90.000000, -88.875000,89.000000,85.250000,83.815000,85.250000,86.625000,87.940000,89.375000,90.625000,90.750000, -88.845000,91.970000,93.375000,93.815000,94.030000,94.030000,91.815000,92.000000,91.940000,89.750000, -88.750000,86.155000,84.875000,85.940000,99.375000,103.280000,105.375000,107.625000,105.250000,104.500000, -105.500000,106.125000,107.940000,106.250000,107.000000,108.750000,110.940000,110.940000,114.220000,123.000000, -121.750000,119.815000,120.315000,119.375000,118.190000,116.690000,115.345000,113.000000,118.315000,116.870000, -116.750000,113.870000,114.620000,115.310000,116.000000,121.690000,119.870000,120.870000,116.750000,116.500000, -116.000000,118.310000,121.500000,122.000000,121.440000,125.750000,127.750000,124.190000,124.440000,125.750000, -124.690000,125.310000,132.000000,131.310000,132.250000,133.880000,133.500000,135.500000,137.440000,138.690000, -139.190000,138.500000,138.130000,137.500000,138.880000,132.130000,129.750000,128.500000,125.440000,125.120000, -126.500000,128.690000,126.620000,126.690000,126.000000,123.120000,121.870000,124.000000,127.000000,124.440000, -122.500000,123.750000,123.810000,124.500000,127.870000,128.560000,129.630000,124.870000,124.370000,124.870000, -123.620000,124.060000,125.870000,125.190000,125.620000,126.000000,128.500000,126.750000,129.750000,132.690000, -133.940000,136.500000,137.690000,135.560000,133.560000,135.000000,132.380000,131.440000,130.880000,129.630000, -127.250000,127.810000,125.000000,126.810000,124.750000,122.810000,122.250000,121.060000,120.000000,123.250000, -122.750000,119.190000,115.060000,116.690000,114.870000,110.870000,107.250000,108.870000,109.000000,108.500000, -113.060000,93.000000,94.620000,95.120000,96.000000,95.560000,95.310000,99.000000,98.810000,96.810000, -95.940000,94.440000,92.940000,93.940000,95.500000,97.060000,97.500000,96.250000,96.370000,95.000000, -94.870000,98.250000,105.120000,108.440000,109.870000,105.000000,106.000000,104.940000,104.500000,104.440000, -106.310000,112.870000,116.500000,119.190000,121.000000,122.120000,111.940000,112.750000,110.190000,107.940000, -109.690000,111.060000,110.440000,110.120000,110.310000,110.440000,110.000000,110.750000,110.500000,110.500000, -109.500000}; - -TA_Real TA_SREF_low_daily_ref_0_PRIV[252] = {90.750000,91.405000,94.250000,93.500000,92.815000,93.500000,92.000000,89.750000,89.440000,90.625000,92.750000, -96.315000,96.030000,88.815000,86.750000,90.940000,88.905000,88.780000,89.250000,89.750000,87.500000, -86.530000,84.625000,82.280000,81.565000,80.875000,81.250000,84.065000,85.595000,85.970000,84.405000, -85.095000,85.500000,85.530000,87.875000,86.565000,84.655000,83.250000,82.565000,83.440000,82.530000, -85.065000,86.875000,88.530000,89.280000,90.125000,90.750000,89.000000,88.565000,90.095000,89.000000, -86.470000,84.000000,83.315000,82.000000,83.250000,84.750000,85.280000,87.190000,88.440000,88.250000, -87.345000,89.280000,91.095000,89.530000,91.155000,92.000000,90.530000,89.970000,88.815000,86.750000, -85.065000,82.030000,81.500000,82.565000,96.345000,96.470000,101.155000,104.250000,101.750000,101.720000, -101.720000,103.155000,105.690000,103.655000,104.000000,105.530000,108.530000,108.750000,107.750000,117.000000, -118.000000,116.000000,118.500000,116.530000,116.250000,114.595000,110.875000,110.500000,110.720000,112.620000, -114.190000,111.190000,109.440000,111.560000,112.440000,117.500000,116.060000,116.560000,113.310000,112.560000, -114.000000,114.750000,118.870000,119.000000,119.750000,122.620000,123.000000,121.750000,121.560000,123.120000, -122.190000,122.750000,124.370000,128.000000,129.500000,130.810000,130.630000,132.130000,133.880000,135.380000, -135.750000,136.190000,134.500000,135.380000,133.690000,126.060000,126.870000,123.500000,122.620000,122.750000, -123.560000,125.810000,124.620000,124.370000,121.810000,118.190000,118.060000,117.560000,121.000000,121.120000, -118.940000,119.810000,121.000000,122.000000,124.500000,126.560000,123.500000,121.250000,121.060000,122.310000, -121.000000,120.870000,122.060000,122.750000,122.690000,122.870000,125.500000,124.250000,128.000000,128.380000, -130.690000,131.630000,134.380000,132.000000,131.940000,131.940000,129.560000,123.750000,126.000000,126.250000, -124.370000,121.440000,120.440000,121.370000,121.690000,120.000000,119.620000,115.500000,116.750000,119.060000, -119.060000,115.060000,111.060000,113.120000,110.000000,105.000000,104.690000,103.870000,104.690000,105.440000, -107.000000,89.000000,92.500000,92.120000,94.620000,92.810000,94.250000,96.250000,96.370000,93.690000, -93.500000,90.000000,90.190000,90.500000,92.120000,94.120000,94.870000,93.000000,93.870000,93.000000, -92.620000,93.560000,98.370000,104.440000,106.000000,101.810000,104.120000,103.370000,102.120000,102.250000, -103.370000,107.940000,112.500000,115.440000,115.500000,112.250000,107.560000,106.560000,106.870000,104.500000, -105.750000,108.620000,107.750000,108.060000,108.000000,108.190000,108.120000,109.060000,108.750000,108.560000, -106.620000}; - -TA_Real TA_SREF_close_daily_ref_0_PRIV[252] = {91.500000,94.815000,94.375000,95.095000,93.780000,94.625000,92.530000,92.750000,90.315000,92.470000,96.125000, -97.250000,98.500000,89.875000,91.000000,92.815000,89.155000,89.345000,91.625000,89.875000,88.375000, -87.625000,84.780000,83.000000,83.500000,81.375000,84.440000,89.250000,86.375000,86.250000,85.250000, -87.125000,85.815000,88.970000,88.470000,86.875000,86.815000,84.875000,84.190000,83.875000,83.375000, -85.500000,89.190000,89.440000,91.095000,90.750000,91.440000,89.000000,91.000000,90.500000,89.030000, -88.815000,84.280000,83.500000,82.690000,84.750000,85.655000,86.190000,88.940000,89.280000,88.625000, -88.500000,91.970000,91.500000,93.250000,93.500000,93.155000,91.720000,90.000000,89.690000,88.875000, -85.190000,83.375000,84.875000,85.940000,97.250000,99.875000,104.940000,106.000000,102.500000,102.405000, -104.595000,106.125000,106.000000,106.065000,104.625000,108.625000,109.315000,110.500000,112.750000,123.000000, -119.625000,118.750000,119.250000,117.940000,116.440000,115.190000,111.875000,110.595000,118.125000,116.000000, -116.000000,112.000000,113.750000,112.940000,116.000000,120.500000,116.620000,117.000000,115.250000,114.310000, -115.500000,115.870000,120.690000,120.190000,120.750000,124.750000,123.370000,122.940000,122.560000,123.120000, -122.560000,124.620000,129.250000,131.000000,132.250000,131.000000,132.810000,134.000000,137.380000,137.810000, -137.880000,137.250000,136.310000,136.250000,134.630000,128.250000,129.000000,123.870000,124.810000,123.000000, -126.250000,128.380000,125.370000,125.690000,122.250000,119.370000,118.500000,123.190000,123.500000,122.190000, -119.310000,123.310000,121.120000,123.370000,127.370000,128.500000,123.870000,122.940000,121.750000,124.440000, -122.000000,122.370000,122.940000,124.000000,123.190000,124.560000,127.250000,125.870000,128.860000,132.000000, -130.750000,134.750000,135.000000,132.380000,133.310000,131.940000,130.000000,125.370000,130.130000,127.120000, -125.190000,122.000000,125.000000,123.000000,123.500000,120.060000,121.000000,117.750000,119.870000,122.000000, -119.190000,116.370000,113.500000,114.250000,110.000000,105.060000,107.000000,107.870000,107.000000,107.120000, -107.000000,91.000000,93.940000,93.870000,95.500000,93.000000,94.940000,98.250000,96.750000,94.810000, -94.370000,91.560000,90.250000,93.940000,93.620000,97.000000,95.000000,95.870000,94.060000,94.620000, -93.750000,98.000000,103.940000,107.870000,106.060000,104.500000,105.000000,104.190000,103.060000,103.420000, -105.270000,111.870000,116.000000,116.620000,118.280000,113.370000,109.000000,109.700000,109.250000,107.000000, -109.190000,110.000000,109.200000,110.120000,108.000000,108.620000,109.750000,109.810000,109.000000,108.750000, -107.870000}; - -TA_Real TA_SREF_volume_daily_ref_0_PRIV[252] = {4077500,4955900,4775300,4155300,4593100,3631300,3382800,4954200,4500000,3397500,4204500, -6321400,10203600,19043900,11692000,9553300,8920300,5970900,5062300,3705600,5865600, -5603000,5811900,8483800,5995200,5408800,5430500,6283800,5834800,4515500,4493300, -4346100,3700300,4600200,4557200,4323600,5237500,7404100,4798400,4372800,3872300, -10750800,5804800,3785500,5014800,3507700,4298800,4842500,3952200,3304700,3462000, -7253900,9753100,5953000,5011700,5910800,4916900,4135000,4054200,3735300,2921900, -2658400,4624400,4372200,5831600,4268600,3059200,4495500,3425000,3630800,4168100, -5966900,7692800,7362500,6581300,19587700,10378600,9334700,10467200,5671400,5645000, -4518600,4519500,5569700,4239700,4175300,4995300,4776600,4190000,6035300,12168900, -9040800,5780300,4320800,3899100,3221400,3455500,4304200,4703900,8316300,10553900, -6384800,7163300,7007800,5114100,5263800,6666100,7398400,5575000,4852300,4298100, -4900500,4887700,6964800,4679200,9165000,6469800,6792000,4423800,5231900,4565600, -6235200,5225900,8261400,5912500,3545600,5714500,6653900,6094500,4799200,5050800, -5648900,4726300,5585600,5124800,7630200,14311600,8793600,8874200,6966600,5525500, -6515500,5291900,5711700,4327700,4568000,6859200,5757500,7367000,6144100,4052700, -5849700,5544700,5032200,4400600,4894100,5140000,6610900,7585200,5963100,6045500, -8443300,6464700,6248300,4357200,4774700,6216900,6266900,5584800,5284500,7554500, -7209500,8424800,5094500,4443600,4591100,5658400,6094100,14862200,7544700,6985600, -8093000,7590000,7451300,7078000,7105300,8778800,6643900,10563900,7043100,6438900, -8057700,14240000,17872300,7831100,8277700,15017800,14183300,13921100,9683000,9187300, -11380500,69447300,26673600,13768400,11371600,9872200,9450500,11083300,9552800,11108400, -10374200,16701900,13741900,8523600,9551900,8680500,7151700,9673100,6264700,8541600, -8358000,18720800,19683100,13682500,10668100,9710600,3113100,5682000,5763600,5340000, -6220800,14680500,9933000,11329500,8145300,16644700,12593800,7138100,7442300,9442300, -7123600,7680600,4839800,4775500,4008800,4533600,3741100,4084800,2685200,3438000, -2870500}; - diff --git a/src/ta-lib/src/tools/ta_regtest/test_internals.c b/src/ta-lib/src/tools/ta_regtest/test_internals.c deleted file mode 100644 index 30d162026..000000000 --- a/src/ta-lib/src/tools/ta_regtest/test_internals.c +++ /dev/null @@ -1,274 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 070401 MF First version. - * 050104 MF Add TA_RegressionTest calls. - * 080605 MF Add tests for pseudo-random generator. - * 091705 MF Add tests for TA_AddTimeToTimestamp (Fix#1293953). - * 110906 MF Remove pseudo-random to eliminate dependencies. - */ - -/* Description: - * Regression testing of some internal utility like: - * - collections: List/Stack/Circular buffer. - * - Memory allocation mechanism. - * etc... - */ - -/**** Headers ****/ -#include -#include - -#include "ta_test_priv.h" -#include "ta_memory.h" -#include "ta_defs.h" -#include "ta_common.h" - - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -/* None */ - -/**** Global variables definitions. ****/ -/* None */ - -/**** Local declarations. ****/ -/* None */ - -/**** Local functions declarations. ****/ -static ErrorNumber testCircularBuffer( void ); - -static TA_RetCode circBufferFillFrom0ToSize( int size, int *buffer ); - - -/**** Local variables definitions. ****/ -/* None */ - -/**** Global functions definitions. ****/ -/* None */ - -/**** Local functions definitions. ****/ -ErrorNumber test_internals( void ) -{ - ErrorNumber retValue; - - printf( "Testing utility functions\n" ); - - retValue = testCircularBuffer(); - if( retValue != TA_TEST_PASS ) - { - printf( "\nFailed: Circular buffer tests (%d)\n", retValue ); - return retValue; - } - - return TA_TEST_PASS; /* Success. */ -} - -static ErrorNumber testCircularBuffer( void ) -{ - TA_RetCode retCode; - int i; - int buffer[20]; - ErrorNumber retValue; - - /* Initialize the library. */ - retValue = allocLib(); - if( retValue != TA_TEST_PASS ) - { - printf( "\nFailed: Can't initialize the library\n" ); - return retValue; - } - - /* The following function is supose to fill - * the buffer with the value 0 to 8 sequentialy, - * if somehow it is not 0 to 8, there is a bug! - */ - memset( buffer, 0xFF, sizeof(buffer) ); - retCode = circBufferFillFrom0ToSize( 1, buffer ); - if( retCode != TA_SUCCESS ) - { - printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); - return TA_INTERNAL_CIRC_BUFF_FAIL_0; - } - for( i=0; i < (1+3); i++ ) - { - if( buffer[i] != i ) - { - printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); - return TA_INTERNAL_CIRC_BUFF_FAIL_1; - } - } - - memset( buffer, 0xFF, sizeof(buffer) ); - retCode = circBufferFillFrom0ToSize( 2, buffer ); - if( retCode != TA_SUCCESS ) - { - printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); - return TA_INTERNAL_CIRC_BUFF_FAIL_0; - } - for( i=0; i < (2+3); i++ ) - { - if( buffer[i] != i ) - { - printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); - return TA_INTERNAL_CIRC_BUFF_FAIL_2; - } - } - - memset( buffer, 0xFF, sizeof(buffer) ); - retCode = circBufferFillFrom0ToSize( 3, buffer ); - if( retCode != TA_SUCCESS ) - { - printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); - return TA_INTERNAL_CIRC_BUFF_FAIL_0; - } - for( i=0; i < (3+3); i++ ) - { - if( buffer[i] != i ) - { - printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); - return TA_INTERNAL_CIRC_BUFF_FAIL_3; - } - } - - memset( buffer, 0xFF, sizeof(buffer) ); - retCode = circBufferFillFrom0ToSize( 4, buffer ); - if( retCode != TA_SUCCESS ) - { - printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); - return TA_INTERNAL_CIRC_BUFF_FAIL_0; - } - for( i=0; i < (4+3); i++ ) - { - if( buffer[i] != i ) - { - printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); - return TA_INTERNAL_CIRC_BUFF_FAIL_4; - } - } - - memset( buffer, 0xFF, sizeof(buffer) ); - retCode = circBufferFillFrom0ToSize( 5, buffer ); - if( retCode != TA_SUCCESS ) - { - printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); - return TA_INTERNAL_CIRC_BUFF_FAIL_0; - } - for( i=0; i < (5+3); i++ ) - { - if( buffer[i] != i ) - { - printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); - return TA_INTERNAL_CIRC_BUFF_FAIL_5; - } - } - - memset( buffer, 0xFF, sizeof(buffer) ); - retCode = circBufferFillFrom0ToSize( 6, buffer ); - if( retCode != TA_SUCCESS ) - { - printf( "\nFailed circular buffer test RetCode = %d\n", retCode ); - return TA_INTERNAL_CIRC_BUFF_FAIL_0; - } - for( i=0; i < (6+3); i++ ) - { - if( buffer[i] != i ) - { - printf( "\nFailed circular buffer test (%d != %d)\n", buffer[i], i ); - return TA_INTERNAL_CIRC_BUFF_FAIL_6; - } - } - - retValue = freeLib(); - if( retValue != TA_TEST_PASS ) - return retValue; - - return TA_TEST_PASS; /* Success. */ -} - -/* This function is suppose to fill the buffer - * with values going from 0 to 'size'. - * The filling is done using the CIRCBUF macros. - */ -static TA_RetCode circBufferFillFrom0ToSize( int size, int *buffer ) -{ - CIRCBUF_PROLOG(MyBuf,int,4); - int i, value; - int outIdx; - - CIRCBUF_INIT(MyBuf,int,size); - - outIdx = 0; - - // 1st Loop: Fill MyBuf with initial values - // (must be done). - value = 0; - for( i=0; i < size; i++ ) - { - MyBuf[MyBuf_Idx] = value++; - CIRCBUF_NEXT(MyBuf); - } - - // 2nd Loop: Get and Add subsequent values - // in MyBuf (optional) - for( i=0; i < 3; i++ ) - { - buffer[outIdx++] = MyBuf[MyBuf_Idx]; - MyBuf[MyBuf_Idx] = value++; - CIRCBUF_NEXT(MyBuf); - } - - // 3rd Loop: Empty MyBuf (optional) - for( i=0; i < size; i++ ) - { - buffer[outIdx++] = MyBuf[MyBuf_Idx]; - CIRCBUF_NEXT(MyBuf); - } - - CIRCBUF_DESTROY(MyBuf); - - return TA_SUCCESS; -} diff --git a/src/ta-lib/src/tools/ta_regtest/test_util.c b/src/ta-lib/src/tools/ta_regtest/test_util.c deleted file mode 100644 index 098077b3e..000000000 --- a/src/ta-lib/src/tools/ta_regtest/test_util.c +++ /dev/null @@ -1,1338 +0,0 @@ -/* TA-LIB Copyright (c) 1999-2024, Mario Fortier - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * - Neither name of author nor the names of its contributors - * may be used to endorse or promote products derived from this - * software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* List of contributors: - * - * Initial Name/description - * ------------------------------------------------------------------- - * MF Mario Fortier - * - * - * Change history: - * - * MMDDYY BY Description - * ------------------------------------------------------------------- - * 112400 MF First version. - * - */ - -/* Description: - * Provide utility function internally used in ta_regtest only. - */ - -/**** Headers ****/ -#ifdef WIN32 - #include "windows.h" -#endif - -#include -#include -#include -#include -#include "ta_test_priv.h" -#include "ta_utility.h" -#include "ta_memory.h" - - -/**** External functions declarations. ****/ -/* None */ - -/**** External variables declarations. ****/ -extern int nbProfiledCall; -extern double timeInProfiledCall; -extern double worstProfiledCall; -extern int insufficientClockPrecision; - -/**** Global variables definitions. ****/ - -/* Global temporary buffers used while testing. */ -#define RESV_PATTERN_MEMGUARD_1 (2.4789205E-150) -#define RESV_PATTERN_MEMGUARD_2 (4.2302468E-165) - -#define RESV_PATTERN_PREFIX (9.1349043E-200) -#define RESV_PATTERN_SUFFIX (8.1489031E-158) -#define RESV_PATTERN_IMPROBABLE (-2.849284E-199) - -#define RESV_PATTERN_PREFIX_INT (TA_INTEGER_DEFAULT) -#define RESV_PATTERN_SUFFIX_INT (TA_INTEGER_DEFAULT) -#define RESV_PATTERN_IMPROBABLE_INT (TA_INTEGER_DEFAULT) - -#define TA_BUF_PREFIX 100 -#define TA_BUF_SUFFIX 100 -#define TA_BUF_SIZE (TA_BUF_PREFIX+MAX_NB_TEST_ELEMENT+TA_BUF_SUFFIX) - -#define TA_NB_OUT 3 -#define TA_NB_IN 1 -#define TA_NB_OUT_IN (TA_NB_OUT+TA_NB_IN) - -TA_Real memoryGuard1 = RESV_PATTERN_MEMGUARD_1; /* Magic number to detect problem. */ -TA_Real buf[NB_GLOBAL_BUFFER][TA_NB_OUT_IN][TA_BUF_SIZE]; /* The global buffers. */ -TA_Real memoryGuard2 = RESV_PATTERN_MEMGUARD_2; /* Magic number to detect problem. */ - -#define NB_TOTAL_ELEMENTS (sizeof(buf)/sizeof(TA_Real)) - -TestBuffer gBuffer[5]; /* See initGlobalBuffer. */ - -/**** Local declarations. ****/ -/* None */ - -/**** Local functions declarations. ****/ -static ErrorNumber doRangeTestFixSize( RangeTestFunction testFunction, - void *opaqueData, - TA_Integer refOutBeg, - TA_Integer refOutNbElement, - TA_Integer refLookback, - const TA_Real *refBuffer, - const TA_Integer *refBufferInt, - TA_FuncUnstId unstId, - TA_Integer fixSize, - unsigned int outputNb, - unsigned int integerTolerance ); - -static int dataWithinReasonableRange( TA_Real val1, TA_Real val2, - unsigned int outputPosition, - TA_FuncUnstId unstId, - unsigned int integerTolerance ); - -static ErrorNumber doRangeTestForOneOutput( RangeTestFunction testFunction, - TA_FuncUnstId unstId, - void *opaqueData, - unsigned int outputNb, - unsigned int integerTolerance ); - -static TA_RetCode CallTestFunction( RangeTestFunction testFunction, - TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ); - -/**** Local variables definitions. ****/ -/* None */ - -/**** Global functions definitions. ****/ -static int ta_g_val = 0; -static const char *ta_g_wheel = "-\\|/"; -void showFeedback() -{ - if( ta_g_wheel[ta_g_val] == '\0' ) - ta_g_val = 0; - putchar('\b'); - putchar(ta_g_wheel[ta_g_val]); - fflush(stdout); - ta_g_val++; -} - -void hideFeedback() -{ - putchar('\b'); - fflush(stdout); - ta_g_val = 0; -} - -ErrorNumber allocLib() -{ - TA_RetCode retCode; - - /* Initialize the library. */ - retCode = TA_Initialize(); - if( retCode != TA_SUCCESS ) - { - printf( "TA_Initialize failed [%d]\n", retCode ); - return TA_TESTUTIL_INIT_FAILED; - } - - return TA_TEST_PASS; -} - -ErrorNumber freeLib() -{ - TA_RetCode retCode; - - /* For testing purpose */ - /* TA_FATAL_RET( "Test again", 100, 200, 0 ); */ - - retCode = TA_Shutdown(); - if( retCode != TA_SUCCESS ) - { - printf( "TA_Shutdown failed [%d]\n", retCode ); - return TA_TESTUTIL_SHUTDOWN_FAILED; - } - - return TA_TEST_PASS; -} - -void reportError( const char *str, TA_RetCode retCode ) -{ - TA_RetCodeInfo retCodeInfo; - - TA_SetRetCodeInfo( retCode, &retCodeInfo ); - - printf( "%s,%d==%s\n", str, retCode, retCodeInfo.enumStr ); - printf( "[%s]\n", retCodeInfo.infoStr ); -} - -/* Need to be called only once. */ -void initGlobalBuffer( void ) -{ - gBuffer[0].in = &buf[0][0][TA_BUF_PREFIX]; - gBuffer[0].out0 = &buf[0][1][TA_BUF_PREFIX]; - gBuffer[0].out1 = &buf[0][2][TA_BUF_PREFIX]; - gBuffer[0].out2 = &buf[0][3][TA_BUF_PREFIX]; - - gBuffer[1].in = &buf[1][0][TA_BUF_PREFIX]; - gBuffer[1].out0 = &buf[1][1][TA_BUF_PREFIX]; - gBuffer[1].out1 = &buf[1][2][TA_BUF_PREFIX]; - gBuffer[1].out2 = &buf[1][3][TA_BUF_PREFIX]; - - gBuffer[2].in = &buf[2][0][TA_BUF_PREFIX]; - gBuffer[2].out0 = &buf[2][1][TA_BUF_PREFIX]; - gBuffer[2].out1 = &buf[2][2][TA_BUF_PREFIX]; - gBuffer[2].out2 = &buf[2][3][TA_BUF_PREFIX]; - - gBuffer[3].in = &buf[3][0][TA_BUF_PREFIX]; - gBuffer[3].out0 = &buf[3][1][TA_BUF_PREFIX]; - gBuffer[3].out1 = &buf[3][2][TA_BUF_PREFIX]; - gBuffer[3].out2 = &buf[3][3][TA_BUF_PREFIX]; - - gBuffer[4].in = &buf[4][0][TA_BUF_PREFIX]; - gBuffer[4].out0 = &buf[4][1][TA_BUF_PREFIX]; - gBuffer[4].out1 = &buf[4][2][TA_BUF_PREFIX]; - gBuffer[4].out2 = &buf[4][3][TA_BUF_PREFIX]; -} - -/* Will set some values in the buffers allowing - * to detect later if the function is writing - * out-of-bound (and to make sure the - * function is writing exactly the number - * of values it pretends to do). - */ -void clearAllBuffers( void ) -{ - unsigned int i,j,k; - - for( i=0; i < NB_GLOBAL_BUFFER; i++ ) - { - for( j=0; j < TA_NB_OUT_IN; j++ ) - { - for( k=0; k < TA_BUF_PREFIX; k++ ) - buf[i][j][k] = RESV_PATTERN_PREFIX; - for( ; k < TA_BUF_SIZE; k++ ) - buf[i][j][k] = RESV_PATTERN_SUFFIX; - } - } -} - -void setInputBuffer( unsigned int i, const TA_Real *data, unsigned int nbElement ) -{ - unsigned int j; - for( j=0; j < nbElement; j++ ) - buf[i][0][j+TA_BUF_PREFIX] = data[j]; -} - -void setInputBufferValue( unsigned int i, const TA_Real data, unsigned int nbElement ) -{ - unsigned int j; - for( j=0; j < nbElement; j++ ) - buf[i][0][j+TA_BUF_PREFIX] = data; - -} - -/* Check that a buffer (within a TestBuffer) is not containing - * NAN (or any reserved "impossible" value) within the specified - * range (it also checks that all out-of-bound values are untouch). - * - * Return 1 on success. - */ -ErrorNumber checkForNAN( const TA_Real *buffer, - unsigned int nbElement ) -{ - unsigned int i; - unsigned int idx; - - const TA_Real *theBuffer; - theBuffer = buffer - TA_BUF_PREFIX; - - /* Check that the prefix are all still untouch. */ - for( idx=0; idx < TA_BUF_PREFIX; idx++ ) - { - if( theBuffer[idx] != RESV_PATTERN_PREFIX ) - { - printf( "Fail: Out of range writing in prefix buffer (%d,%f)\n", idx, theBuffer[idx] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_0; - } - } - - if( nbElement > MAX_NB_TEST_ELEMENT ) - { - printf( "Fail: outNbElement is out of range 0 (%d)\n", nbElement ); - return TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE; - } - - /* Check that no NAN (or reserved "impossible" value) exist - * in the specified range. - */ - for( i=0; i < nbElement; i++,idx++ ) - { - /* TODO Add back some nan/inf checking - if( trio_isnan(theBuffer[idx]) ) - { - printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_1; - } - - if( trio_isinf(theBuffer[idx]) ) - { - printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_2; - }*/ - - if( theBuffer[idx] == RESV_PATTERN_PREFIX ) - { - printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_3; - } - - if( theBuffer[idx] == RESV_PATTERN_SUFFIX ) - { - printf( "Fail: Not a number find within the data (%d,%f)\n", i, theBuffer[idx] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_4; - } - } - - /* Make sure that the remaining of the buffer is untouch. */ - for( ; idx < TA_BUF_SIZE; idx++ ) - { - if( theBuffer[idx] != RESV_PATTERN_SUFFIX ) - { - printf( "Fail: Out of range writing in suffix buffer (%d,%f)\n", idx, theBuffer[idx] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_5; - } - - idx++; - } - - /* Make sure the global memory guard are untouch. */ - if( memoryGuard1 != RESV_PATTERN_MEMGUARD_1 ) - { - printf( "Fail: MemoryGuard1 have been modified (%f,%f)\n", memoryGuard1, RESV_PATTERN_MEMGUARD_1 ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_6; - } - - if( memoryGuard2 != RESV_PATTERN_MEMGUARD_2 ) - { - printf( "Fail: MemoryGuard2 have been modified (%f,%f)\n", memoryGuard2, RESV_PATTERN_MEMGUARD_2 ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_7; - } - - /* Everything looks good! */ - return TA_TEST_PASS; -} - -/* Return 1 on success */ -ErrorNumber checkSameContent( TA_Real *buffer1, - TA_Real *buffer2 ) -{ - const TA_Real *theBuffer1; - const TA_Real *theBuffer2; - - unsigned int i; - - theBuffer1 = buffer1 - TA_BUF_PREFIX; - theBuffer2 = buffer2 - TA_BUF_PREFIX; - - for( i=0; i < TA_BUF_SIZE; i++ ) - { - /* TODO Add back nan/inf checking - (!trio_isnan(theBuffer1[i])) && - (!trio_isinf(theBuffer1[i])) && - */ - - if( (theBuffer1[i] != RESV_PATTERN_SUFFIX) && - (theBuffer1[i] != RESV_PATTERN_PREFIX) ) - { - - if(!TA_REAL_EQ( theBuffer1[i], theBuffer2[i], 0.000001)) - { - printf( "Fail: Large difference found between two value expected identical (%f,%f,%d)\n", - theBuffer1[i], theBuffer2[i], i ); - return TA_TEST_TFRR_CHECK_SAME_CONTENT; - } - } - } - - return TA_TEST_PASS; -} - -ErrorNumber checkDataSame( const TA_Real *data, - const TA_Real *originalInput, - unsigned int nbElement ) -{ - unsigned int i; - ErrorNumber errNb; - - errNb = checkForNAN( data, nbElement ); - - if( errNb != TA_TEST_PASS ) - return errNb; - - if( nbElement > MAX_NB_TEST_ELEMENT ) - { - printf( "Fail: outNbElement is out of range 1 (%d)\n", nbElement ); - return TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE; - } - - for( i=0; i < nbElement; i++ ) - { - if( originalInput[i] != data[i] ) - { - printf( "Fail: Data was wrongly modified (%f,%f,%d)\n", - originalInput[i], - data[i], i ); - return TA_TEST_TFRR_INPUT_HAS_BEEN_MODIFIED; - } - } - - return TA_TEST_PASS; -} - -ErrorNumber checkExpectedValue( const TA_Real *data, - TA_RetCode retCode, TA_RetCode expectedRetCode, - unsigned int outBegIdx, unsigned int expectedBegIdx, - unsigned int outNbElement, unsigned int expectedNbElement, - TA_Real oneOfTheExpectedOutReal, - unsigned int oneOfTheExpectedOutRealIndex ) -{ - if( retCode != expectedRetCode ) - { - printf( "Fail: RetCode %d different than expected %d\n", retCode, expectedRetCode ); - return TA_TESTUTIL_TFRR_BAD_RETCODE; - } - - if( retCode != TA_SUCCESS ) - { - /* An error did occured, but it - * was expected. No need to go - * further. - */ - return TA_TEST_PASS; - } - - if( outNbElement > MAX_NB_TEST_ELEMENT ) - { - printf( "Fail: outNbElement is out of range 2 (%d)\n", outNbElement ); - return TA_TEST_TFRR_NB_ELEMENT_OUT_OF_RANGE; - } - - - /* Make sure the range of output does not contains NAN. */ - /* TODO Add back nan/inf checking - for( i=0; i < outNbElement; i++ ) - { - if( trio_isnan(data[i]) ) - { - printf( "Fail: Not a number find within the data (%d,%f)\n", i, data[i] ); - return TA_TEST_TFRR_OVERLAP_OR_NAN_3; - } - }*/ - - /* Verify that the expected output is there. */ - - if( outNbElement != expectedNbElement ) - { - printf( "Fail: outNbElement expected %d but got %d\n", - expectedNbElement, outNbElement ); - return TA_TESTUTIL_TFRR_BAD_OUTNBELEMENT; - } - - if( expectedNbElement > 0 ) - { - if( !TA_REAL_EQ( oneOfTheExpectedOutReal, data[oneOfTheExpectedOutRealIndex], 0.01 ) ) - { - printf( "Fail: For index %d, Expected value = %f but calculate value is %f\n", - oneOfTheExpectedOutRealIndex, - oneOfTheExpectedOutReal, - data[oneOfTheExpectedOutRealIndex] ); - return TA_TESTUTIL_TFRR_BAD_CALCULATION; - } - - if( expectedBegIdx != outBegIdx ) - { - printf( "Fail: outBegIdx expected %d but got %d\n", expectedBegIdx, outBegIdx ); - return TA_TESTUTIL_TFRR_BAD_BEGIDX; - } - } - - /* Succeed. */ - return TA_TEST_PASS; -} - - -ErrorNumber doRangeTest( RangeTestFunction testFunction, - TA_FuncUnstId unstId, - void *opaqueData, - unsigned int nbOutput, - unsigned int integerTolerance ) -{ - unsigned int outputNb; - ErrorNumber errNb; - - /* Test all the outputs individually. */ - for( outputNb=0; outputNb < nbOutput; outputNb++ ) - { - errNb = doRangeTestForOneOutput( testFunction, - unstId, - opaqueData, - outputNb, - integerTolerance ); - if( errNb != TA_TEST_PASS ) - { - printf( "Failed: For output #%d of %d\n", outputNb+1, nbOutput ); - return errNb; - } - } - - return TA_TEST_PASS; -} - -void printRetCode( TA_RetCode retCode ) -{ - TA_RetCodeInfo retCodeInfo; - - TA_SetRetCodeInfo( retCode, &retCodeInfo ); - printf( "\nFailed: ErrorCode %d=%s:[%s]\n", retCode, - retCodeInfo.enumStr, - retCodeInfo.infoStr ); -} - - - -/**** Local functions definitions. ****/ -static ErrorNumber doRangeTestForOneOutput( RangeTestFunction testFunction, - TA_FuncUnstId unstId, - void *opaqueData, - unsigned int outputNb, - unsigned int integerTolerance ) -{ - TA_RetCode retCode; - TA_Integer refOutBeg, refOutNbElement, refLookback; - TA_Integer fixSize; - TA_Real *refBuffer; - TA_Integer *refBufferInt; - ErrorNumber errNb; - TA_Integer unstablePeriod, temp; - unsigned int outputIsInteger; - - showFeedback(); - - /* Caculate the whole range. This is going - * to be the reference for all subsequent test. - */ - refBuffer = (TA_Real *)TA_Malloc( MAX_RANGE_SIZE * sizeof( TA_Real ) ); - - if( !refBuffer ) - return TA_TESTUTIL_DRT_ALLOC_ERR; - - refBufferInt = (TA_Integer *)TA_Malloc( MAX_RANGE_SIZE * sizeof( TA_Integer ) ); - - if( !refBufferInt ) - { - TA_Free( refBuffer ); - return TA_TESTUTIL_DRT_ALLOC_ERR; - } - - if( unstId != TA_FUNC_UNST_NONE ) - { - /* Caller wish to test for a range of unstable - * period values. But the reference is calculated - * on the whole range by keeping that unstable period - * to zero. - */ - TA_SetUnstablePeriod( unstId, 0 ); - } - - outputIsInteger = 0; - retCode = CallTestFunction( testFunction, 0, MAX_RANGE_END, refBuffer, refBufferInt, - &refOutBeg, &refOutNbElement, &refLookback, - opaqueData, outputNb, &outputIsInteger ); - - if( retCode != TA_SUCCESS ) - { - printf( "Fail: doRangeTest whole range failed (%d)\n", retCode ); - TA_Free( refBuffer ); - TA_Free( refBufferInt ); - return TA_TESTUTIL_DRT_REF_FAILED; - } - - /* When calculating for the whole range, the lookback and the - * refOutBeg are supppose to be equal. - */ - if( refLookback != refOutBeg ) - { - printf( "Fail: doRangeTest refLookback != refOutBeg (%d != %d)\n", refLookback, refOutBeg ); - TA_Free( refBuffer ); - TA_Free( refBufferInt ); - return TA_TESTUTIL_DRT_LOOKBACK_INCORRECT; - } - - temp = MAX_RANGE_SIZE-refLookback; - if( temp != refOutNbElement ) - { - printf( "Fail: doRangeTest either refOutNbElement or refLookback bad (%d,%d)\n", temp, refOutNbElement ); - TA_Free( refBuffer ); - TA_Free( refBufferInt ); - return TA_TESTUTIL_DRT_REF_OUTPUT_INCORRECT; - } - - /* Calculate each value ONE by ONE and make sure it is identical - * to the reference. - * - * Then repeat the test but calculate TWO by TWO and so on... - */ - for( fixSize=1; fixSize <= MAX_RANGE_SIZE; fixSize++ ) - { - /* When a function has an unstable period, verify some - * unstable period between 0 and MAX_RANGE_SIZE. - */ - if( unstId == TA_FUNC_UNST_NONE ) - { - errNb = doRangeTestFixSize( testFunction, opaqueData, - refOutBeg, refOutNbElement, refLookback, - refBuffer, refBufferInt, - unstId, fixSize, outputNb, integerTolerance ); - if( errNb != TA_TEST_PASS) - { - TA_Free( refBuffer ); - TA_Free( refBufferInt ); - return errNb; - } - } - else - { - for( unstablePeriod=0; unstablePeriod <= MAX_RANGE_SIZE; unstablePeriod++ ) - { - TA_SetUnstablePeriod( unstId, unstablePeriod ); - - errNb = doRangeTestFixSize( testFunction, opaqueData, - refOutBeg, refOutNbElement, refLookback, - refBuffer, refBufferInt, - unstId, fixSize, outputNb, integerTolerance ); - if( errNb != TA_TEST_PASS) - { - printf( "Fail: Using unstable period %d\n", unstablePeriod ); - TA_Free( refBuffer ); - TA_Free( refBufferInt ); - return errNb; - } - - /* Randomly skip the test of some unstable period (limit case are - * always tested though). - */ - if( (unstablePeriod > 5) && (unstablePeriod < 240) ) - { - /* Randomly skips from 0 to 239 tests. Never - * make unstablePeriod exceed 240. - */ - temp = (rand() % 240); - unstablePeriod += temp; - if( unstablePeriod > 240 ) - unstablePeriod = 240; - } - } - - /* Because the tests with an unstable period are very intensive - * and kinda repetitive, skip the test of some fixSize (limit - * case are always tested though). - */ - if( (fixSize > 5) && (fixSize < 240) ) - { - /* Randomly skips from 0 to 239 tests. Never - * make fixSize exceed 240. - */ - temp = (rand() % 239); - fixSize += temp; - if( fixSize > 240 ) - fixSize = 240; - } - } - } - - TA_Free( refBuffer ); - TA_Free( refBufferInt ); - return TA_TEST_PASS; -} - -static ErrorNumber doRangeTestFixSize( RangeTestFunction testFunction, - void *opaqueData, - TA_Integer refOutBeg, - TA_Integer refOutNbElement, - TA_Integer refLookback, - const TA_Real *refBuffer, - const TA_Integer *refBufferInt, - TA_FuncUnstId unstId, - TA_Integer fixSize, - unsigned int outputNb, - unsigned int integerTolerance ) -{ - TA_RetCode retCode; - TA_Real *outputBuffer; - TA_Real val1, val2; - TA_Integer i, temp; - TA_Integer outputBegIdx, outputNbElement, lookback; - TA_Integer startIdx, endIdx, relativeIdx, outputSizeByOptimalLogic; - TA_Integer *outputBufferInt; - unsigned int outputIsInteger; - - (void)refLookback; - - /* Allocate the output buffer (+prefix and suffix memory guard). */ - outputBuffer = (TA_Real *)TA_Malloc( (fixSize+2) * sizeof( TA_Real ) ); - - if( !outputBuffer ) - return TA_TESTUTIL_DRT_ALLOC_ERR; - - outputBufferInt = (TA_Integer *)TA_Malloc( (fixSize+2) * sizeof( TA_Integer ) ); - - if( !refBufferInt ) - { - TA_Free( outputBuffer ); - return TA_TESTUTIL_DRT_ALLOC_ERR; - } - - outputBuffer[0] = RESV_PATTERN_PREFIX; - outputBuffer[fixSize+1] = RESV_PATTERN_SUFFIX; - - outputBufferInt[0] = RESV_PATTERN_PREFIX_INT; - outputBufferInt[fixSize+1] = RESV_PATTERN_SUFFIX_INT; - - /* Initialize the outputs with improbable values. */ - for( i=1; i <= fixSize; i++ ) - { - outputBuffer[i] = RESV_PATTERN_IMPROBABLE; - outputBufferInt[i] = RESV_PATTERN_IMPROBABLE_INT; - } - - /* Test for a large number of possible startIdx */ - for( startIdx=0; startIdx <= (MAX_RANGE_SIZE-fixSize); startIdx++ ) - { - /* Call the TA function. */ - endIdx = startIdx+fixSize-1; - retCode = CallTestFunction( testFunction, startIdx, endIdx, - &outputBuffer[1], &outputBufferInt[1], - &outputBegIdx, &outputNbElement, &lookback, - opaqueData, outputNb, &outputIsInteger ); - - if( retCode != TA_SUCCESS ) - { - /* No call shall never fail here. When the range - * is "out-of-range" the function shall still return - * TA_SUCCESS with the outNbElement equal to zero. - */ - printf( "Fail: doRangeTestFixSize testFunction return error=(%d) (%d,%d)\n", retCode, fixSize, startIdx ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_RETCODE_ERR; - } - else - { - /* Possible startIdx gap of the output shall be always the - * same regardless of the range. - */ - if( outputNbElement == 0 ) - { - /* Trap cases where there is no output. */ - if( (startIdx > lookback) || (endIdx > lookback) ) - { - /* Whenever startIdx is greater than lookback, some data - * shall be return. Same idea with endIdx. - * - * Note: - * some output will never start at the startIdx, particularly - * when a TA function have multiple output. Usually, the first output - * will be between startIdx/endIdx and other outputs may have a "gap" - * from the startIdx. - * - * Example: - * Stochastic %K is between startIdx/endIdx, but %D output will - * have less data because it is a MA of %K. A gap will then - * exist for the %D output. - */ - printf( "Fail: doRangeTestFixSize data missing (%d,%d,%d)\n", startIdx, endIdx, lookback ); - - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_MISSING_DATA; - } - } - else - { - /* Some output was returned. Are the returned index correct? */ - if( (outputBegIdx < startIdx) || (outputBegIdx > endIdx) || (outputBegIdx < refOutBeg)) - { - printf( "Fail: doRangeTestFixSize bad outBegIdx\n" ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_BAD_OUTBEGIDX; - } - - if( (outputNbElement > fixSize) || (outputNbElement > refOutNbElement) ) - { - printf( "Fail: doRangeTestFixSize Incorrect outputNbElement\n" ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - return TA_TESTUTIL_DRT_BAD_OUTNBLEMENT; - } - - /* Is the calculated lookback too high? */ - if( outputBegIdx < lookback ) - { - printf( "Fail: doRangeTestFixSize Lookback calculation too high? (%d)\n", lookback ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_LOOKBACK_TOO_HIGH; - } - - /* Is the output identical to the reference? */ - relativeIdx = outputBegIdx-refOutBeg; - for( i=0; i < outputNbElement; i++ ) - { - if( outputIsInteger ) - { - if( outputBufferInt[1+i] != refBufferInt[relativeIdx+i] ) - { - printf( "Fail: doRangeTestFixSize diff data for idx=%d (%d,%d)\n", i, - outputBufferInt[1+i], refBufferInt[relativeIdx+i] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_DATA_DIFF_INT; - } - } - else - { - val1 = outputBuffer[1+i]; - val2 = refBuffer[relativeIdx+i]; - if( !dataWithinReasonableRange( val1, val2, i, unstId, integerTolerance ) ) - { - printf( "Fail: doRangeTestFixSize diff data for idx=%d (%e,%e)\n", i, val1, val2 ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - if( val1 != 0.0 ) - printf( "Fail: Diff %g %%\n", ((val2-val1)/val1)*100.0 ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_DATA_DIFF; - } - } - - /* Randomly skip the verification of some value. Limit - * cases are always checked though. - */ - if( outputNbElement > 30 ) - { - temp = outputNbElement-20; - if( (i > 20) && (i < temp) ) - { - /* Randomly skips from 0 to 200 verification. - * Never make it skip the last 20 values. - */ - i += (rand() % 200); - if( i > temp ) - i = temp; - } - } - } - - /* Verify out-of-bound writing in the output buffer. */ - outputSizeByOptimalLogic = max(lookback,startIdx); - if( outputSizeByOptimalLogic > endIdx ) - outputSizeByOptimalLogic = 0; - else - outputSizeByOptimalLogic = endIdx-outputSizeByOptimalLogic+1; - - if( (fixSize != outputNbElement) && (outputBuffer[1+outputSizeByOptimalLogic] != RESV_PATTERN_IMPROBABLE) ) - { - printf( "Fail: doRangeTestFixSize out-of-bound output (%e)\n", outputBuffer[1+outputSizeByOptimalLogic] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT; - } - - if( (fixSize != outputNbElement) && (outputBufferInt[1+outputSizeByOptimalLogic] != RESV_PATTERN_IMPROBABLE_INT) ) - { - printf( "Fail: doRangeTestFixSize out-of-bound output (%d)\n", outputBufferInt[1+outputSizeByOptimalLogic] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_OUT_OF_BOUND_OUT_INT; - } - - /* Verify that the memory guard were preserved. */ - if( outputBuffer[0] != RESV_PATTERN_PREFIX ) - { - printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_PREFIX (%e)\n", outputBuffer[0] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_BAD_PREFIX; - } - - if( outputBufferInt[0] != RESV_PATTERN_PREFIX_INT ) - { - printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_PREFIX_INT (%d)\n", outputBufferInt[0] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_BAD_PREFIX; - } - - if( outputBuffer[fixSize+1] != RESV_PATTERN_SUFFIX ) - { - printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_SUFFIX (%e)\n", outputBuffer[fixSize+1] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_BAD_SUFFIX; - } - - if( outputBufferInt[fixSize+1] != RESV_PATTERN_SUFFIX_INT ) - { - printf( "Fail: doRangeTestFixSize bad RESV_PATTERN_SUFFIX_INT (%d)\n", outputBufferInt[fixSize+1] ); - printf( "Fail: doRangeTestFixSize (%d,%d,%d,%d,%d)\n", startIdx, endIdx, outputBegIdx, outputNbElement, fixSize ); - printf( "Fail: doRangeTestFixSize refOutBeg,refOutNbElement (%d,%d)\n", refOutBeg, refOutNbElement ); - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TESTUTIL_DRT_BAD_SUFFIX; - } - - /* Clean-up for next test. */ - if( outputIsInteger ) - { - for( i=1; i <= fixSize; i++ ) - outputBufferInt[i] = RESV_PATTERN_IMPROBABLE_INT; - } - else - { - for( i=1; i <= fixSize; i++ ) - outputBuffer[i] = RESV_PATTERN_IMPROBABLE; - } - } - - /* Skip some startIdx at random. Limit case are still - * tested though. - */ - if( (startIdx > 30) && ((startIdx+100) <= (MAX_RANGE_SIZE-fixSize)) ) - { - /* Randomly skips from 40 to 100 tests. */ - temp = (rand() % 100)+40; - startIdx += temp; - } - } - - /* Loop and move forward for the next startIdx to test. */ - } - - TA_Free( outputBuffer ); - TA_Free( outputBufferInt ); - return TA_TEST_PASS; -} - -/* This function compares two value. - * The value is determined to be equal - * if it is within a certain error range. - */ -static int dataWithinReasonableRange( TA_Real val1, TA_Real val2, - unsigned int outputPosition, - TA_FuncUnstId unstId, - unsigned int integerTolerance ) -{ - TA_Real difference, tolerance, temp; - unsigned int val1_int, val2_int, tempInt, periodToIgnore; - - if( integerTolerance == TA_DO_NOT_COMPARE ) - return 1; /* Don't compare, says that everything is fine */ - - /* If the function does not have an unstable period, - * the compared value shall be identical. - * - * Because the algo may vary slightly allow for - * a small epsilon error because of the nature - * of floating point operations. - */ - if( unstId == TA_FUNC_UNST_NONE ) - return TA_REAL_EQ( val1, val2, 0.000000001 ); - - /* In the context of the TA functions, all value - * below 0.00001 are considered equal to zero and - * are considered to be equal within a reasonable range. - * (the percentage difference might be large, but - * unsignificant at that level, so no tolerance - * check is being done). - */ - if( (val1 < 0.00001) && (val2 < 0.00001) ) - return 1; - - /* When the function is unstable, the comparison - * tolerate at first a large difference. - * - * As the number of "outputPosition" is higher - * the tolerance is reduced. - * - * In the same way, as the unstable period - * increase, the tolerance is reduced (that's - * what the unstable period is for... reducing - * difference). - * - * When dealing with an unstable period, the - * first 100 values are ignored. - * - * Following 100, the tolerance is - * progressively reduced as follow: - * - * 1 == 0.5/1 == 50 % - * 2 == 0.5/2 == 25 % - * ... - * 100 == 0.5/100 == 0.005 % - * ... - * - * Overall, the following is a fair estimation: - * When using a unstable period of 200, you - * can expect the output to not vary more - * than 0.005 % - * - * The logic is sligthly different if the - * output are rounded integer, but it is - * the same idea. - * - * The following describe the special meaning of - * the integerTolerance: - * - * Value 10 -> A tolerance of 1/10 is used. - * - * Value 100 -> A tolerance of 1/100 is used. - * - * Value 1000 -> A tolerance of 1/1000 is used. - * - * Value 360 -> Useful when the output are - * degrees. In that case, a fix - * tolerance of 1 degree is used. - * - * Value TA_DO_NOT_COMPARE -> - * Indicate that NO COMPARISON take - * place. This is useful for functions - * that cannot be compare when changing - * the range (like the accumulative - * algorithm used for TA_AD and TA_ADOSC). - */ - - - /* Some functions requires a longer unstable period. - * These are trap here. - */ - switch( unstId ) - { - case TA_FUNC_UNST_T3: - periodToIgnore = 200; - break; - default: - periodToIgnore = 100; - break; - } - - if( integerTolerance == 1000 ) - { - /* Check for no difference of more - * than 1/1000 - */ - if( val1 > val2 ) - difference = (val1-val2); - else - difference = (val2-val1); - - difference *= 1000.0; - - temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; - if( temp <= periodToIgnore ) - { - /* Pretend it is fine. */ - return 1; - } - else if( (int)difference > 1 ) - { - printf( "\nFail: Value diffferent by more than 1/1000 (%f)\n", difference ); - return 0; - } - } - else if( integerTolerance == 100 ) - { - /* Check for no difference of more - * than 1/1000 - */ - if( val1 > val2 ) - difference = (val1-val2); - else - difference = (val2-val1); - - difference *= 100.0; - - temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; - if( temp <= periodToIgnore ) - { - /* Pretend it is fine. */ - return 1; - } - else if( (int)difference > 1 ) - { - printf( "\nFail: Value diffferent by more than 1/100 (%f)\n", difference ); - return 0; - } - } - else if( integerTolerance == 10 ) - { - /* Check for no difference of more - * than 1/1000 - */ - if( val1 > val2 ) - difference = (val1-val2); - else - difference = (val2-val1); - - difference *= 10.0; - - temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; - if( temp <= periodToIgnore ) - { - /* Pretend it is fine. */ - return 1; - } - else if( (int)difference > 1 ) - { - printf( "\nFail: Value diffferent by more than 1/10 (%f)\n", difference ); - return 0; - } - } - else if( integerTolerance == 360 ) - { - /* Check for no difference of no more - * than 10% when the value is higher than - * 1 degree. - * - * Difference of less than 1 degree are not significant. - */ - val1_int = (unsigned int)val1; - val2_int = (unsigned int)val2; - if( val1_int > val2_int ) - tempInt = val1_int - val2_int; - else - tempInt = val2_int - val1_int; - - if( val1 > val2 ) - difference = (val1-val2)/val1; - else - difference = (val2-val1)/val2; - - temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; - if( temp <= periodToIgnore ) - { - /* Pretend it is fine. */ - return 1; - } - else if( (tempInt > 1) && (difference > 0.10) ) - { - printf( "\nFail: Value diffferent by more than 10 percent over 1 degree (%d)\n", tempInt ); - return 0; - } - } - else if( integerTolerance ) - { - /* Check that the integer part of the value - * is not different more than the specified - * integerTolerance. - */ - val1_int = (unsigned int)val1; - val2_int = (unsigned int)val2; - if( val1_int > val2_int ) - tempInt = val1_int - val2_int; - else - tempInt = val2_int - val1_int; - - temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; - if( temp <= periodToIgnore ) - { - /* Pretend it is fine. */ - return 1; - } - else if( temp < 100 ) - { - if( tempInt >= 3*integerTolerance ) - { - printf( "\nFail: Value out of 3*tolerance range (%d,%d)\n", tempInt, integerTolerance ); - return 0; /* Value considered different */ - } - } - else if( temp < 150 ) - { - if( tempInt >= 2*integerTolerance ) - { - printf( "\nFail: Value out of 2*tolerance range (%d,%d)\n", tempInt, integerTolerance ); - return 0; /* Value considered different */ - } - } - else if( temp < 200 ) - { - if( tempInt >= integerTolerance ) - { - printf( "\nFail: Value out of tolerance range (%d,%d)\n", tempInt, integerTolerance ); - return 0; /* Value considered different */ - } - } - else if( tempInt >= 1 ) - { - printf( "\nFail: Value not equal (difference is %d)\n", tempInt ); - return 0; /* Value considered different */ - } - } - else - { - if( val1 > val2 ) - difference = (val1-val2)/val1; - else - difference = (val2-val1)/val2; - - temp = outputPosition+TA_GetUnstablePeriod(unstId)+1; - if( temp <= periodToIgnore ) - { - /* Pretend it is fine. */ - return 1; - } - else - { - temp -= periodToIgnore; - tolerance = 0.5/temp; - } - - if( difference > tolerance ) - { - printf( "\nFail: Value out of tolerance range (%g,%g)\n", difference, tolerance ); - return 0; /* Out of tolerance... values are not equal. */ - } - } - - return 1; /* Value equal within tolerance. */ -} - -static TA_RetCode CallTestFunction( RangeTestFunction testFunction, - TA_Integer startIdx, - TA_Integer endIdx, - TA_Real *outputBuffer, - TA_Integer *outputBufferInt, - TA_Integer *outBegIdx, - TA_Integer *outNbElement, - TA_Integer *lookback, - void *opaqueData, - unsigned int outputNb, - unsigned int *isOutputInteger ) -{ - /* Call the function and do profiling. */ - TA_RetCode retCode; - double clockDelta; - -#ifdef WIN32 - LARGE_INTEGER startClock; - LARGE_INTEGER endClock; -#else - clock_t startClock; - clock_t endClock; -#endif - -#ifdef WIN32 - QueryPerformanceCounter(&startClock); -#else - startClock = clock(); -#endif - retCode = testFunction( startIdx, - endIdx, - outputBuffer, - outputBufferInt, - outBegIdx, - outNbElement, - lookback, - opaqueData, - outputNb, - isOutputInteger ); - - /* Profile only functions producing at least 20 values. */ - if( *outNbElement < 20 ) - { - return retCode; - } - -#ifdef WIN32 - QueryPerformanceCounter(&endClock); - clockDelta = (double)((__int64)endClock.QuadPart - (__int64) startClock.QuadPart); -#else - endClock = clock(); - clockDelta = (double)(endClock - startClock); -#endif - - if( clockDelta <= 0 ) - { - insufficientClockPrecision = 1; - } - else - { - if( clockDelta > worstProfiledCall ) - worstProfiledCall = clockDelta; - timeInProfiledCall += clockDelta; - nbProfiledCall++; - } - - return retCode; -} diff --git a/src/ta-lib/ta-lib.dpkg.in b/src/ta-lib/ta-lib.dpkg.in deleted file mode 100644 index d41b81b2c..000000000 --- a/src/ta-lib/ta-lib.dpkg.in +++ /dev/null @@ -1,16 +0,0 @@ -Package: ta-lib -Version: @VERSION@ -Section: dev-libs -Priority: optional -Architecture: i686 -Essential: no -Depends: -Pre-Depends: -Recommends: -Suggests: -Installed-Size: 3700000 -Maintainer: Mario Fortier [mfortier@ta-lib.org] -Conflicts: -Replaces: -Provides: -Description: TA-Lib provides common functions for the technical analysis of stock/future/commodity market data. diff --git a/src/ta-lib/ta-lib.pc.in b/src/ta-lib/ta-lib.pc.in deleted file mode 100644 index b0a8ebd30..000000000 --- a/src/ta-lib/ta-lib.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/ta-lib - -Name: ta-lib -Description: TA-Lib : Technical Analysis Library -URL: https://github.com/TA-Lib/ta-lib -Version: @PACKAGE_VERSION@ -Cflags: -I${includedir} -Libs: -L${libdir} -lta-lib diff --git a/src/ta-lib/ta-lib.spec.in b/src/ta-lib/ta-lib.spec.in deleted file mode 100644 index aaf6c45c4..000000000 --- a/src/ta-lib/ta-lib.spec.in +++ /dev/null @@ -1,70 +0,0 @@ -# List of contributors: -# -# Initial Name/description -# ------------------------------------------------------------------- -# MW Michael Williamson -# JS John Sheehy -# MF Mario Fortier - -# Change history: -# MMDDYY BY Description -# ------------------------------------------------------------------- -# 082104 MW Initial Version -# 012908 JS Enhancement + add x86_64 support -# 011024 MF Change source to Github, add URL - -%define ta_ver 0.6.4 - -Summary: Technical Analysis Library -Name: ta-lib -Version: %{ta_ver} -Release: 1 -License: BSD -Group: Development/Libraries -URL: https://github.com/ta-lib/ta-lib -Source: https://github.com/ta-lib/ta-lib/releases/download/v%{ta_ver}/ta-lib-%{ta_ver}-src.tar.gz -Prefix: /usr -Buildroot: %{_tmppath}/%{name}-%{version} - -%description - - TA-Lib provides common functions for the technical analysis of - stock/future/commodity market data. - - TA-Lib is intended for software developers looking to add technical - analysis functionality to their application. It is a library of more than - 150 functions that can be integrated in your application. It is not an - application by itself. - - - - -%prep -%setup -n %{name} - -%build - ./autogen.sh -%ifarch x86_64 - CFLAGS="-g0 -O2 -pipe" ./configure --prefix=%{prefix} --libdir=%{prefix}/lib64 -%else - CFLAGS="-g0 -O2 -pipe" ./configure --prefix=%{prefix} -%endif - make - -%install - [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} - make DESTDIR=${RPM_BUILD_ROOT} install - -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - -%clean - [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} - -%files - %defattr(-,root,root) - %{prefix}/bin/* - %{prefix}/lib/* - %{prefix}/include/* - %{prefix}/share/* - From e2c16118ef6d2b8636f2251da43202ffda553123 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:37:57 +0200 Subject: [PATCH 003/166] :hammer: Expanded Makefile * The Makefile now builds api.h and init.c - This should ease the development process in the beginning. --- Makefile | 1 + api.h | 9 +++++ src/api.h | 7 ++-- src/init.c | 17 ++++------ src/lib.h | 2 +- tools/generate_API.sh | 77 +++++++++++++++++++++++++++++++++++++++++++ tools/generate_FFI.sh | 67 +++++++++++++++++++++++++++++++++++++ 7 files changed, 165 insertions(+), 15 deletions(-) create mode 100644 api.h create mode 100755 tools/generate_API.sh create mode 100755 tools/generate_FFI.sh diff --git a/Makefile b/Makefile index e8cdf5b22..9928c7bc4 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ help: build: ## Build the R package @Rscript -e "devtools::document()" > /dev/null 2>&1 + @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c @R CMD build . && R CMD INSTALL $(tarball_location) check: diff --git a/api.h b/api.h new file mode 100644 index 000000000..111560ed1 --- /dev/null +++ b/api.h @@ -0,0 +1,9 @@ +#ifndef _API_H_ +#define _API_H_ + +#include + +SEXP c_average_price(SEXP const x); +SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, SEXP maType); + +#endif diff --git a/src/api.h b/src/api.h index 2221bb9cc..111560ed1 100644 --- a/src/api.h +++ b/src/api.h @@ -3,8 +3,7 @@ #include -SEXP c_average_price(const SEXP x); -SEXP c_bollinger_bands(SEXP x, SEXP timePeriod, SEXP nbDevUp, SEXP nbDevDn, - SEXP maType); +SEXP c_average_price(SEXP const x); +SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, SEXP maType); -#endif \ No newline at end of file +#endif diff --git a/src/init.c b/src/init.c index 02fcf9822..6373c35d7 100644 --- a/src/init.c +++ b/src/init.c @@ -1,16 +1,13 @@ #include #include -#include +#include -/* Declaration of the wrapper */ #include "api.h" -static const R_CallMethodDef CallEntries[] = { - {"c_average_price", (DL_FUNC)&c_average_price, 1}, - {"c_bollinger_bands", (DL_FUNC)&c_bollinger_bands, 5}, - {NULL, NULL, 0}}; +#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} -void R_init_talib(DllInfo *dll) { - R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); - R_useDynamicSymbols(dll, FALSE); -} +static const R_CallMethodDef CallEntries[] = { + CALLDEF(c_average_price, 1), + CALLDEF(c_bollinger_bands, 5), + {NULL, NULL, 0} +}; diff --git a/src/lib.h b/src/lib.h index d6f9ea35c..f25189567 100644 --- a/src/lib.h +++ b/src/lib.h @@ -15,7 +15,7 @@ // Redifne integers to abvoid // R definition clashes #define Int32 TA_Lib_Int32 -#include + #include #undef Int32 static void ensure_ta_initialized(void) { diff --git a/tools/generate_API.sh b/tools/generate_API.sh new file mode 100755 index 000000000..73c5dc9ce --- /dev/null +++ b/tools/generate_API.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' + +usage() { + cat <&2 +Usage: ${0##*/} [SRC_DIR] [OUT_FILE] + SRC_DIR Directory with .c sources (default: src) + OUT_FILE Header file to generate (default: api.h) +EOF + exit 1 +} + +if [[ $# -gt 2 ]]; then + usage +fi + +SRC_DIR="${1:-src}" +OUT_FILE="${2:-api.h}" + +print_header() { + cat <<'EOF' +#ifndef _API_H_ +#define _API_H_ + +#include + +EOF +} + +extract_signatures() { + awk ' + /^[[:space:]]*(static[[:space:]]+)?SEXP[[:space:]]+/ { + sig = $0 + + while (sig !~ /\{/ && sig !~ /;/) { + if (getline <= 0) break + sig = sig " " $0 + } + + if (sig ~ /\{/) { + + left = gsub(/\(/,"&",sig) + right = gsub(/\)/,"&",sig) + if (left == right) { + + sub(/\{.*$/,"",sig) + + gsub(/[[:space:]]+/, " ", sig) + sub(/^[[:space:]]+/, "", sig) + sub(/[[:space:]]+$/, "", sig) + gsub(/\( /, "(", sig) + gsub(/ \)/, ")", sig) + printf("%s;\n", sig) + } + } + } + ' "${SRC_DIR}"/*.c | sort -u +} + +print_footer() { + cat <<'EOF' + +#endif +EOF +} + +# === Main driver === +main() { + echo "Generating ${OUT_FILE} from C sources in ${SRC_DIR}/..." + print_header > "${OUT_FILE}" + extract_signatures >> "${OUT_FILE}" + print_footer >> "${OUT_FILE}" + echo "Done: ${OUT_FILE}" +} + +main diff --git a/tools/generate_FFI.sh b/tools/generate_FFI.sh new file mode 100755 index 000000000..a08883c58 --- /dev/null +++ b/tools/generate_FFI.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' + +if [[ $# -gt 2 ]]; then + usage +fi + +API_HEADER="${1:-api.h}" +OUT_FILE="${2:-init.c}" + +print_header() { + cat <<'EOF' +#include +#include +#include + +#include "api.h" + +#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} + +static const R_CallMethodDef CallEntries[] = { +EOF +} + +generate_entries() { + awk ' + # Match prototype lines + /^SEXP[[:space:]]+/ { + sig = $0 + sub(/^SEXP[[:space:]]+/, "", sig) + sub(/;[[:space:]]*$/, "", sig) + + # split name and argument list + split(sig, parts, /\(/) + name = parts[1] + args = parts[2] + sub(/\)$/, "", args) + + # count arguments: commas + 1 (or 0 if empty) + if (args ~ /^[[:space:]]*$/) { + n = 0 + } else { + tmp = args + n = gsub(/,/, ",", tmp) + 1 + } + printf(" CALLDEF(%s, %d),\n", name, n) + } + ' "$API_HEADER" + echo " {NULL, NULL, 0}" +} + +print_footer() { + cat <<'EOF' +}; +EOF +} + +main() { + echo "Generating ${OUT_FILE} from ${API_HEADER}..." + print_header > "$OUT_FILE" + generate_entries >> "$OUT_FILE" + print_footer >> "$OUT_FILE" + echo "Done: $OUT_FILE" +} + +main \ No newline at end of file From 1f3553ab7f907f35271ab77779cc46c23ed24636 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 3 Aug 2025 22:57:09 +0200 Subject: [PATCH 004/166] :hammer: Modified Bollinger Bands * Added 'const' keyword where applicable. * Refactored the MA parser --- src/api.h | 2 +- src/bollinger_bands.c | 42 +++++++++-------------------------------- src/lib.h | 44 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 34 deletions(-) diff --git a/src/api.h b/src/api.h index 111560ed1..f4be0b98e 100644 --- a/src/api.h +++ b/src/api.h @@ -4,6 +4,6 @@ #include SEXP c_average_price(SEXP const x); -SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, SEXP maType); +SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, const SEXP maType); #endif diff --git a/src/bollinger_bands.c b/src/bollinger_bands.c index e7fa0c54c..b2f927536 100644 --- a/src/bollinger_bands.c +++ b/src/bollinger_bands.c @@ -3,39 +3,15 @@ */ #include "lib.h" -// Map user-supplied MA type string to TA_MAType enum. Defaults to SMA. -static TA_MAType parse_ma_type(SEXP maTypeSEXP) { - if (maTypeSEXP == R_NilValue || !isString(maTypeSEXP) || - LENGTH(maTypeSEXP) < 1) - return TA_MAType_SMA; - - const char *s = CHAR(STRING_ELT(maTypeSEXP, 0)); - if (strcasecmp(s, "SMA") == 0) - return TA_MAType_SMA; - if (strcasecmp(s, "EMA") == 0) - return TA_MAType_EMA; - if (strcasecmp(s, "WMA") == 0) - return TA_MAType_WMA; - if (strcasecmp(s, "DEMA") == 0) - return TA_MAType_DEMA; - if (strcasecmp(s, "TEMA") == 0) - return TA_MAType_TEMA; - if (strcasecmp(s, "TRIMA") == 0) - return TA_MAType_TRIMA; - if (strcasecmp(s, "KAMA") == 0) - return TA_MAType_KAMA; - if (strcasecmp(s, "MAMA") == 0) - return TA_MAType_MAMA; - if (strcasecmp(s, "T3") == 0) - return TA_MAType_T3; - // fallback - return TA_MAType_SMA; -} - // .Call interface: x, timePeriod (int scalar or NA), nbDevUp (double or NA), // nbDevDn, maType (string) -SEXP c_bollinger_bands(SEXP x, SEXP timePeriod, SEXP nbDevUp, SEXP nbDevDn, - SEXP maType) { +SEXP c_bollinger_bands( + const SEXP x, + const SEXP timePeriod, + const SEXP nbDevUp, + const SEXP nbDevDn, + const SEXP maType) { + static int ta_initialized = 0; if (!ta_initialized) { if (TA_Initialize() != TA_SUCCESS) @@ -78,7 +54,7 @@ SEXP c_bollinger_bands(SEXP x, SEXP timePeriod, SEXP nbDevUp, SEXP nbDevDn, optInNbDevDn = v; } - optInMAType = parse_ma_type(maType); + optInMAType = map_moving_average(maType); // Compute lookback int lookback = TA_BBANDS_Lookback(optInTimePeriod, optInNbDevUp, optInNbDevDn, @@ -162,6 +138,6 @@ SEXP c_bollinger_bands(SEXP x, SEXP timePeriod, SEXP nbDevUp, SEXP nbDevDn, SET_STRING_ELT(names, 4, mkChar("outNBElement")); setAttrib(res, R_NamesSymbol, names); - UNPROTECT(6); // upper,middle,lower + outBegIdx + outNBElement + res names + UNPROTECT(6); return res; } \ No newline at end of file diff --git a/src/lib.h b/src/lib.h index f25189567..3ddd116c0 100644 --- a/src/lib.h +++ b/src/lib.h @@ -28,4 +28,48 @@ static void ensure_ta_initialized(void) { } } + + +// maps strings to MA enums +// +// args +// x: string, character +static TA_MAType map_moving_average(const SEXP x) { + + // 1) check input validity + // on C-side instead of R side + // as this function will be used frequently + // across the library. + // + // fallback: simple moving average + if (x == R_NilValue || !isString(x) || LENGTH(x) < 1) + return TA_MAType_SMA; + + // 2) map string to enum + // TODO: this might be better + // to implement as switch-statement + const char *s = CHAR(STRING_ELT(x, 0)); + if (strcasecmp(s, "SMA") == 0) + return TA_MAType_SMA; + if (strcasecmp(s, "EMA") == 0) + return TA_MAType_EMA; + if (strcasecmp(s, "WMA") == 0) + return TA_MAType_WMA; + if (strcasecmp(s, "DEMA") == 0) + return TA_MAType_DEMA; + if (strcasecmp(s, "TEMA") == 0) + return TA_MAType_TEMA; + if (strcasecmp(s, "TRIMA") == 0) + return TA_MAType_TRIMA; + if (strcasecmp(s, "KAMA") == 0) + return TA_MAType_KAMA; + if (strcasecmp(s, "MAMA") == 0) + return TA_MAType_MAMA; + if (strcasecmp(s, "T3") == 0) + return TA_MAType_T3; + + // 3) fallback: simple moving average + return TA_MAType_SMA; +} + #endif // _LIB_H_ \ No newline at end of file From f73d00374d4a5edc46ea958b2e23277247a3ad05 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 3 Aug 2025 23:09:32 +0200 Subject: [PATCH 005/166] :wastebin: Removed common.h * Everything will be in lib.h * Refactored lib.h --- src/common.h | 37 ------------------------------------- src/lib.h | 2 -- 2 files changed, 39 deletions(-) delete mode 100644 src/common.h diff --git a/src/common.h b/src/common.h deleted file mode 100644 index 69e6fc6ce..000000000 --- a/src/common.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Common functionality - * - */ -#ifndef _COMMON_H_ -#define _COMMON_H_ - -// Parse moving average types -// Example: Bollinger Bands -static TA_MAType parse_ma_type(SEXP maTypeSEXP) { - if (maTypeSEXP == R_NilValue || !isString(maTypeSEXP) || - LENGTH(maTypeSEXP) < 1) - return TA_MAType_SMA; - - const char *s = CHAR(STRING_ELT(maTypeSEXP, 0)); - if (strcasecmp(s, "SMA") == 0) - return TA_MAType_SMA; - if (strcasecmp(s, "EMA") == 0) - return TA_MAType_EMA; - if (strcasecmp(s, "WMA") == 0) - return TA_MAType_WMA; - if (strcasecmp(s, "DEMA") == 0) - return TA_MAType_DEMA; - if (strcasecmp(s, "TEMA") == 0) - return TA_MAType_TEMA; - if (strcasecmp(s, "TRIMA") == 0) - return TA_MAType_TRIMA; - if (strcasecmp(s, "KAMA") == 0) - return TA_MAType_KAMA; - if (strcasecmp(s, "MAMA") == 0) - return TA_MAType_MAMA; - if (strcasecmp(s, "T3") == 0) - return TA_MAType_T3; - // fallback - return TA_MAType_SMA; -} - -#endif //_COMMON_H_ \ No newline at end of file diff --git a/src/lib.h b/src/lib.h index 3ddd116c0..a9ad54e35 100644 --- a/src/lib.h +++ b/src/lib.h @@ -28,8 +28,6 @@ static void ensure_ta_initialized(void) { } } - - // maps strings to MA enums // // args From 9a1d68d0ed00948316cf35f7ff5d44f3980c4507 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 08:13:04 +0200 Subject: [PATCH 006/166] :hammer: Changed build order * If there is changes to the C code, make build will fail as it is trying to document before building. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9928c7bc4..344b9da89 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ help: | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}' build: ## Build the R package - @Rscript -e "devtools::document()" > /dev/null 2>&1 @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c + @Rscript -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD INSTALL $(tarball_location) check: From 4f9172552991484b8526b9f21a4249dd30713e3c Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 08:13:49 +0200 Subject: [PATCH 007/166] :fire: New features * WMA, KAMA and CCI. - Currently skeletons. --- NAMESPACE | 3 +++ R/commodity_channel_index.R | 11 ++++++++ R/kama.R | 8 ++++++ R/weighted_moving_average.R | 6 +++++ man/commodity_channel_index.Rd | 14 ++++++++++ man/kaufman_adaptive_moving_average.Rd | 11 ++++++++ man/weighted_moving_average.Rd | 11 ++++++++ src/api.h | 3 +++ src/commodity_channel_index.c | 34 ++++++++++++++++++++++++ src/init.c | 3 +++ src/kama.c | 28 ++++++++++++++++++++ src/weighted_moving_average.c | 36 ++++++++++++++++++++++++++ 12 files changed, 168 insertions(+) create mode 100644 R/commodity_channel_index.R create mode 100644 R/kama.R create mode 100644 R/weighted_moving_average.R create mode 100644 man/commodity_channel_index.Rd create mode 100644 man/kaufman_adaptive_moving_average.Rd create mode 100644 man/weighted_moving_average.Rd create mode 100644 src/commodity_channel_index.c create mode 100644 src/kama.c create mode 100644 src/weighted_moving_average.c diff --git a/NAMESPACE b/NAMESPACE index 315b3b78f..7dfd0ef27 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,4 +2,7 @@ export(average_price) export(bollinger_bands) +export(commodity_channel_index) +export(kaufman_adaptive_moving_average) +export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/commodity_channel_index.R b/R/commodity_channel_index.R new file mode 100644 index 000000000..aa10eff3f --- /dev/null +++ b/R/commodity_channel_index.R @@ -0,0 +1,11 @@ +#' @title Commodity Channel Index +#' +#' @description +#' +#' +#' @author Serkan Korkmaz +#' +#' @export +commodity_channel_index <- function(x, lag) { + .Call("c_commodity_channel_index", x[,2], x[,3], x[,4], as.integer(lag)) +} \ No newline at end of file diff --git a/R/kama.R b/R/kama.R new file mode 100644 index 000000000..a25328af8 --- /dev/null +++ b/R/kama.R @@ -0,0 +1,8 @@ +#' @title Kaufman Adaptive Moving Average +#' +#' @description +#' +#' @export +kaufman_adaptive_moving_average <- function(x, lag) { + .Call("c_kaufman_adaptive_moving_average", x, as.integer(lag)) +} \ No newline at end of file diff --git a/R/weighted_moving_average.R b/R/weighted_moving_average.R new file mode 100644 index 000000000..579d44f28 --- /dev/null +++ b/R/weighted_moving_average.R @@ -0,0 +1,6 @@ +#' @title Weighted Moving Average +#' +#' @export +weighted_moving_average <- function(x, n) { + .Call("c_weighted_moving_average", as.numeric(x), as.integer(n)) +} \ No newline at end of file diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd new file mode 100644 index 000000000..5b46168a1 --- /dev/null +++ b/man/commodity_channel_index.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/commodity_channel_index.R +\name{commodity_channel_index} +\alias{commodity_channel_index} +\title{Commodity Channel Index} +\usage{ +commodity_channel_index(x, lag) +} +\description{ +Commodity Channel Index +} +\author{ +Serkan Korkmaz +} diff --git a/man/kaufman_adaptive_moving_average.Rd b/man/kaufman_adaptive_moving_average.Rd new file mode 100644 index 000000000..75d3e82a6 --- /dev/null +++ b/man/kaufman_adaptive_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/kama.R +\name{kaufman_adaptive_moving_average} +\alias{kaufman_adaptive_moving_average} +\title{Kaufman Adaptive Moving Average} +\usage{ +kaufman_adaptive_moving_average(x, lag) +} +\description{ +Kaufman Adaptive Moving Average +} diff --git a/man/weighted_moving_average.Rd b/man/weighted_moving_average.Rd new file mode 100644 index 000000000..945033e68 --- /dev/null +++ b/man/weighted_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/weighted_moving_average.R +\name{weighted_moving_average} +\alias{weighted_moving_average} +\title{Weighted Moving Average} +\usage{ +weighted_moving_average(x, n) +} +\description{ +Weighted Moving Average +} diff --git a/src/api.h b/src/api.h index f4be0b98e..66f1fc350 100644 --- a/src/api.h +++ b/src/api.h @@ -5,5 +5,8 @@ SEXP c_average_price(SEXP const x); SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, const SEXP maType); +SEXP c_commodity_channel_index(const SEXP high, const SEXP low, const SEXP close, const SEXP period); +SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period); +SEXP c_weighted_moving_average(const SEXP x, const SEXP lag); #endif diff --git a/src/commodity_channel_index.c b/src/commodity_channel_index.c new file mode 100644 index 000000000..6c9fe2c08 --- /dev/null +++ b/src/commodity_channel_index.c @@ -0,0 +1,34 @@ +#include "lib.h" + +SEXP c_commodity_channel_index(const SEXP high, const SEXP low, const SEXP close, const SEXP period) { + const int timePeriod = asInteger(period); + const int len = length(high); // assume low and close are same length + const double * __restrict__ h = REAL(high); + const double * __restrict__ l = REAL(low); + const double * __restrict__ c = REAL(close); + int outBegIdx = 0, outNBElement = 0; + + // TA-LIB output buffer (max size = len) + double * __restrict__ outReal = (double *) R_alloc((size_t)len, sizeof(double)); + + // Call TA-LIB CCI: startIdx=0, endIdx=len-1 + TA_RetCode ret = TA_CCI(0, len - 1, h, l, c, timePeriod, &outBegIdx, &outNBElement, outReal); + + // Prepare full-length output with leading/trailing NA + SEXP ans = PROTECT(allocVector(REALSXP, len)); + double *ans_d = REAL(ans); + + // Default everything to NA first (covers error case and trailing) + for (int i = 0; i < len; ++i) + ans_d[i] = NA_REAL; + + if (ret == TA_SUCCESS && outNBElement > 0) { + // Leading NAs are already in place up to outBegIdx-1 + // Copy computed CCI values + memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + } + // else: leave as NA (failure or no output) + + UNPROTECT(1); + return ans; +} \ No newline at end of file diff --git a/src/init.c b/src/init.c index 6373c35d7..c1c7e4303 100644 --- a/src/init.c +++ b/src/init.c @@ -9,5 +9,8 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(c_average_price, 1), CALLDEF(c_bollinger_bands, 5), + CALLDEF(c_commodity_channel_index, 4), + CALLDEF(c_kaufman_adaptive_moving_average, 2), + CALLDEF(c_weighted_moving_average, 2), {NULL, NULL, 0} }; diff --git a/src/kama.c b/src/kama.c new file mode 100644 index 000000000..8a1b1658b --- /dev/null +++ b/src/kama.c @@ -0,0 +1,28 @@ +#include "lib.h" + +SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period) { + const int timePeriod = asInteger(period); + const int len = length(x); + const double * __restrict__ inReal = REAL(x); + int outBegIdx = 0, outNBElement = 0; + + // TA-LIB output buffer (max size = len) + double * __restrict__ outReal = (double *) R_alloc((size_t)len, sizeof(double)); + + // Direct call to KAMA: startIdx=0, endIdx=len-1 + TA_RetCode ret = TA_KAMA(0, len - 1, inReal, timePeriod, &outBegIdx, &outNBElement, outReal); + + // Prepare result vector with NAs + SEXP ans = PROTECT(allocVector(REALSXP, len)); + double *ans_d = REAL(ans); + for (int i = 0; i < len; ++i) // fill with NA (covers lookback and failure) + ans_d[i] = NA_REAL; + + if (ret == TA_SUCCESS && outNBElement > 0) { + // copy computed KAMA values at their proper offset + memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + } + + UNPROTECT(1); + return ans; +} \ No newline at end of file diff --git a/src/weighted_moving_average.c b/src/weighted_moving_average.c new file mode 100644 index 000000000..a9beb696f --- /dev/null +++ b/src/weighted_moving_average.c @@ -0,0 +1,36 @@ +#include "lib.h" + +SEXP c_weighted_moving_average(const SEXP x, const SEXP lag) { + const int timePeriod = asInteger(lag); + const int len = length(x); + const double * __restrict__ x_data = REAL(x); + int outBegIdx = 0, outNBElement = 0; + + // Output buffer: at most len elements; R_alloc is fast and GC-managed + double * __restrict__ outReal = (double*) R_alloc((size_t)len, sizeof(double)); + + // Call TA-LIB WMA: startIdx=0, endIdx=len-1 + TA_RetCode ret = TA_WMA(0, len - 1, x_data, timePeriod, &outBegIdx, &outNBElement, outReal); + + // Prepare full-length vector with leading NAs (lookback) + SEXP ans = PROTECT(allocVector(REALSXP, len)); + double *ans_d = REAL(ans); + + if (ret != TA_SUCCESS || outNBElement <= 0) { + // Failure: fill with NA + for (int i = 0; i < len; ++i) ans_d[i] = NA_REAL; + UNPROTECT(1); + return ans; + } + + // Leading NA for lookback + for (int i = 0; i < outBegIdx; ++i) ans_d[i] = NA_REAL; + + // Copy the computed WMA results + memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + + // (Trailing part should naturally be filled by outNBElement; since endIdx = len-1, no further action) + + UNPROTECT(1); + return ans; +} \ No newline at end of file From 3fb950d8df1db7dbb3a36486ea6592afc1756b09 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 08:19:21 +0200 Subject: [PATCH 008/166] :wastebin: Deleted stray c-file --- api.h | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 api.h diff --git a/api.h b/api.h deleted file mode 100644 index 111560ed1..000000000 --- a/api.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _API_H_ -#define _API_H_ - -#include - -SEXP c_average_price(SEXP const x); -SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, SEXP maType); - -#endif From b489f0c1d9fe5f2069bfbebddf46c4b1cec6559b Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 08:19:34 +0200 Subject: [PATCH 009/166] :books: Updated README --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1cd37e62..4a5051616 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ -# curly-giggle -R bindings for TA-Lib +# {talib}: R bindings for TA-lib + +## Installation + +### Stable + +```R +pak::pak("talib") +``` + +### Development + +```console +git clone --recurse-submodules https://github.com/serkor1/curly-giggle.git +``` + +```make +make build +``` \ No newline at end of file From 07cec741190d27a7af67ccc72f2f361b21157ea1 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:48:28 +0200 Subject: [PATCH 010/166] :hammer: Refactored average_price() --- src/average_price.c | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 src/average_price.c diff --git a/src/average_price.c b/src/average_price.c new file mode 100644 index 000000000..2c35a54f4 --- /dev/null +++ b/src/average_price.c @@ -0,0 +1,80 @@ +// Interface to TA_AVGPRICE +// +// Parameters +// x: A OHLCV-matrix +// +// Description +// `x` needs to have at least OHLC. +#include "lib.h" + +SEXP c_average_price(const SEXP x) { + + // 1) extract dimensions + // form `x` + SEXP x_dimension = GET_DIM(x); + + // 1.1) assert dimension + // availability + if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { + Rf_error("`x` must have 'dim' attribute"); + } + const int nrow = INTEGER(x_dimension)[0]; + const int ncol = INTEGER(x_dimension)[1]; + + // 2) construct OHLC + // matrix and extract + // values + double *OHLC = REAL(x); + const double *inOpen = OHLC + 0 * nrow; + const double *inHigh = OHLC + 1 * nrow; + const double *inLow = OHLC + 2 * nrow; + const double *inClose = OHLC + 3 * nrow; + + const int startIdx = 0; + const int endIdx = nrow - 1; + const int outBegIdx = 0, outNBElement = 0; + const int maxSize = endIdx - startIdx + 1; + double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); + + // clang-format off + // 3) call TA_AVGPRICE + // which returns a code + TA_RetCode ret = TA_AVGPRICE( + startIdx, + endIdx, + inOpen, + inHigh, + inLow, + inClose, + &outBegIdx, + &outNBElement, + outReal); + // clang-format on + + // 3.1) assert success + // of function. If it + // fails here its a bug + if (ret != TA_SUCCESS) { + Rf_error("`TA_AVGPRICE()` failed with code %d.", ret); + } + + // 4) prepare output + // for R + SEXP output = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); + double *output_ptr = REAL(output); + + // 4.1) initialize to NA + // to ensure size(input) == size(output) + for (int i = 0; i < nrow; ++i) { + output_ptr[i] = NA_REAL; + } + + // 4.2) populate output + // vector + for (int i = 0; i < outNBElement; ++i) { + output_ptr[outBegIdx + i] = outReal[i]; + } + + UNPROTECT(1); + return output; +} From fcda4c5768f91ad02b99052f1f65c87f85fac222 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:09:30 +0200 Subject: [PATCH 011/166] :hammer: Reworked configure * The configure now works if TA-lib exists on the system. --- configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c8b6b8775..b71ce8591 100755 --- a/configure +++ b/configure @@ -13,9 +13,14 @@ PKG_LIBS="" ## If TA-Lib provides a pkg-config file, use it for canonical flags. if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists ta-lib; then PKG_CPPFLAGS="$(pkg-config --cflags ta-lib)" + LIBDIRS=$(pkg-config --libs-only-L ta-lib | sed 's/-L//g') PKG_LIBS="$(pkg-config --libs ta-lib)" + for d in $LIBDIRS; do + PKG_LIBS="$PKG_LIBS -Wl,-rpath,$d" + done + USE_SYSTEM=1 - echo "configure: using system TA-Lib via pkg-config" + echo "configure: using system TA-Lib via pkg-config with rpath to: $LIBDIRS" else ## 3) Probe system TA-Lib by compile/link test ## Fallback: compile a tiny program against -lta-lib to detect presence. From a01abcf18f484b4db4048e737b4b4e3622c73c4e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:10:17 +0200 Subject: [PATCH 012/166] :hammer: Reworked package * Added candlestick patterns, median_price, etc --- NAMESPACE | 7 ++ R/average_price.R | 51 +++++++------- R/cdl3blackcrows.R | 40 +++++++++++ R/median_price.R | 33 +++++++++ R/moving_average_convergence_divergence.R | 22 ++++++ R/utils.R | 6 ++ man-roxygen/description.R | 16 +++++ man/average_price.Rd | 15 +++- man/median_price.Rd | 23 +++++++ man/moving_average_convergence_divergence.Rd | 23 +++++++ man/three_black_crows.Rd | 23 +++++++ src/Makevars | 4 +- src/api.h | 5 +- src/average_price.c | 9 ++- src/bollinger_bands.c | 10 ++- src/cdl_three_black_crows.c | 50 ++++++++++++++ src/commodity_channel_index.c | 52 +++++++------- src/init.c | 3 + src/kama.c | 28 -------- src/kaufman_adaptive_moving_average.c | 31 +++++++++ src/lib.h | 4 +- src/median_price.c | 72 ++++++++++++++++++++ src/moving_average_convergence_divergence.c | 66 ++++++++++++++++++ src/ta_avgprice.c | 67 ------------------ src/weighted_moving_average.c | 60 ++++++++-------- 25 files changed, 531 insertions(+), 189 deletions(-) create mode 100644 R/cdl3blackcrows.R create mode 100644 R/median_price.R create mode 100644 R/moving_average_convergence_divergence.R create mode 100644 R/utils.R create mode 100644 man-roxygen/description.R create mode 100644 man/median_price.Rd create mode 100644 man/moving_average_convergence_divergence.Rd create mode 100644 man/three_black_crows.Rd create mode 100644 src/cdl_three_black_crows.c delete mode 100644 src/kama.c create mode 100644 src/kaufman_adaptive_moving_average.c create mode 100644 src/median_price.c create mode 100644 src/moving_average_convergence_divergence.c delete mode 100644 src/ta_avgprice.c diff --git a/NAMESPACE b/NAMESPACE index 7dfd0ef27..0af9b9e1d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,8 +1,15 @@ # Generated by roxygen2: do not edit by hand +S3method(average_price,default) +S3method(median_price,default) +S3method(moving_average_convergence_divergence,default) +S3method(three_black_crows,default) export(average_price) export(bollinger_bands) export(commodity_channel_index) export(kaufman_adaptive_moving_average) +export(median_price) +export(moving_average_convergence_divergence) +export(three_black_crows) export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/average_price.R b/R/average_price.R index 8a0f9f44b..1602f1424 100644 --- a/R/average_price.R +++ b/R/average_price.R @@ -1,32 +1,33 @@ -#' @title Average price +#' @title NULL +#' @usage NULL #' -#' @description -#' Calculate the average price +#' @template description #' -#' -#' @author Serkan Korkmaz +#' @templateVar .title Average Price +#' @templateVar .type multivariate +#' @templateVar .fun average_price +#' @templateVar .author Serkan Korkmaz +#' +#' @returns Something #' @export -average_price <- function(x) { +average_price <- function(x, ...) { + UseMethod( + generic = "average_price" + ) +} - m <- as.matrix(x) - if (!is.numeric(m)) stop("Input must be numeric or coercible to numeric matrix.") - if (ncol(m) != 4L) { - stop("Input must have 4 columns: Open, High, Low, Close.") - } - - if (!is.null(colnames(m))) { - cn <- tolower(colnames(m)) - wanted <- c("open", "high", "low", "close") - if (all(wanted %in% cn)) { - m <- m[, match(wanted, cn), drop = FALSE] - } else { - } - } +#' @export +average_price.default <- function(x, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. - res <- .Call("c_average_price", m, PACKAGE = "talib") - if (!is.numeric(res) || length(res) != nrow(m)) { - stop("Unexpected result from native call.") - } + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + x <- as.matrix(x); assert(is.numeric(x)) - res + .Call("c_average_price", x[,1:4]) } \ No newline at end of file diff --git a/R/cdl3blackcrows.R b/R/cdl3blackcrows.R new file mode 100644 index 000000000..ec847d202 --- /dev/null +++ b/R/cdl3blackcrows.R @@ -0,0 +1,40 @@ +#' @title NULL +#' @usage NULL +#' +#' @template description +#' +#' @templateVar .title Three Black Crows +#' @templateVar .type multivariate +#' @templateVar .fun three_black_crows +#' @templateVar .author Serkan Korkmaz +#' +#' @returns Something +#' +#' @export +three_black_crows <- function(x, ...) { + UseMethod( + generic = "three_black_crows" + ) +} + +#' @export +three_black_crows.default <- function(x, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + x <- as.matrix(x); assert(is.numeric(x)) + + .Call("c_cdl3blackcrows", + as.numeric(x[,1]), + as.numeric(x[,2]), + as.numeric(x[,3]), + as.numeric(x[,4])) +} + + diff --git a/R/median_price.R b/R/median_price.R new file mode 100644 index 000000000..11ee794d1 --- /dev/null +++ b/R/median_price.R @@ -0,0 +1,33 @@ +#' @title NULL +#' @usage NULL +#' +#' @template description +#' +#' @templateVar .title Median Price +#' @templateVar .type multivariate +#' @templateVar .fun median_price +#' @templateVar .author Serkan Korkmaz +#' +#' @returns Something +#' @export +median_price <- function(x, ...) { + UseMethod( + generic = "median_price" + ) +} + +#' @export +median_price.default <- function(x, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + x <- as.matrix(x); assert(is.numeric(x)) + + .Call("c_median_price", x[,1:4]) +} \ No newline at end of file diff --git a/R/moving_average_convergence_divergence.R b/R/moving_average_convergence_divergence.R new file mode 100644 index 000000000..28adbea68 --- /dev/null +++ b/R/moving_average_convergence_divergence.R @@ -0,0 +1,22 @@ +#' @title NULL +#' @usage NULL +#' +#' @template description +#' +#' @templateVar .title Moving Average Convergence/Divergence +#' @templateVar .type multivariate +#' @templateVar .fun moving_average_convergence_divergence +#' @templateVar .author Serkan Korkmaz +#' +#' @returns Something +#' @export +moving_average_convergence_divergence <- function(x, fast = 12L, slow = 26L, signal = 9L, ...) { + UseMethod( + generic = "moving_average_convergence_divergence" + ) +} + +#' @export +moving_average_convergence_divergence.default <- function(x, fast = 12L, slow = 26L, signal = 9L, ...) { + .Call("c_moving_average_convergence_divergence", as.numeric(x), as.integer(fast), as.integer(slow), as.integer(signal)) +} \ No newline at end of file diff --git a/R/utils.R b/R/utils.R new file mode 100644 index 000000000..689278eaa --- /dev/null +++ b/R/utils.R @@ -0,0 +1,6 @@ +## script: utilities +assert <- function(exprs) { + eval.parent( + substitute(stopifnot(exprs = exprs)) + ) + } diff --git a/man-roxygen/description.R b/man-roxygen/description.R new file mode 100644 index 000000000..46a6a2657 --- /dev/null +++ b/man-roxygen/description.R @@ -0,0 +1,16 @@ +#' @title <%= tools::toTitleCase(.title) %> +#' +#' @description +#' A generic S3 function to compute the <%= tolower(.title) %>. The function assumes that <%= if(.type == "multivariate") "the input [matrix] `x` is Open (`x[,1]`), High (`x[,2]`), Low (`x[,3]`), Close (`x[,4]`) and Volume (`x[,5]`)" else "the input [vector] `x` is [double]" %>. +#' +#' @usage +#' ## Generic default S3 method +#' ## for <%= tools::toTitleCase(.title) %> +#' <%= .fun %>(...) +#' +#' @author <%= .author %> +#' +#' @concept finance +#' @concept technical analysis +#' @concept trading +#' @concept algorithmic trading diff --git a/man/average_price.Rd b/man/average_price.Rd index dbb168af2..df7c0fda8 100644 --- a/man/average_price.Rd +++ b/man/average_price.Rd @@ -2,13 +2,22 @@ % Please edit documentation in R/average_price.R \name{average_price} \alias{average_price} -\title{Average price} +\title{Average Price} \usage{ -average_price(x) +## Generic default S3 method +## for Average Price +average_price(...) +} +\value{ +Something } \description{ -Calculate the average price +A generic S3 function to compute the average price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). } \author{ Serkan Korkmaz } +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/median_price.Rd b/man/median_price.Rd new file mode 100644 index 000000000..94dd4b7b8 --- /dev/null +++ b/man/median_price.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/median_price.R +\name{median_price} +\alias{median_price} +\title{Median Price} +\usage{ +## Generic default S3 method +## for Median Price +median_price(...) +} +\value{ +Something +} +\description{ +A generic S3 function to compute the median price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). +} +\author{ +Serkan Korkmaz +} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd new file mode 100644 index 000000000..c8394151a --- /dev/null +++ b/man/moving_average_convergence_divergence.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/moving_average_convergence_divergence.R +\name{moving_average_convergence_divergence} +\alias{moving_average_convergence_divergence} +\title{Moving Average Convergence/Divergence} +\usage{ +## Generic default S3 method +## for Moving Average Convergence/Divergence +moving_average_convergence_divergence(...) +} +\value{ +Something +} +\description{ +A generic S3 function to compute the moving average convergence/divergence. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). +} +\author{ +Serkan Korkmaz +} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd new file mode 100644 index 000000000..52751570d --- /dev/null +++ b/man/three_black_crows.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cdl3blackcrows.R +\name{three_black_crows} +\alias{three_black_crows} +\title{Three Black Crows} +\usage{ +## Generic default S3 method +## for Three Black Crows +three_black_crows(...) +} +\value{ +Something +} +\description{ +A generic S3 function to compute the three black crows. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). +} +\author{ +Serkan Korkmaz +} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/src/Makevars b/src/Makevars index f16d6d9f7..796c1a623 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1,3 +1,3 @@ # autogenerated by configure -PKG_CPPFLAGS = -I/home/serkor/Documents/Projects/Software/curly-giggle/src/ta-lib/local/include -PKG_LIBS = /home/serkor/Documents/Projects/Software/curly-giggle/src/ta-lib/local/lib/libta-lib.a -lpthread -ldl +PKG_CPPFLAGS = -I/usr/local/include/ta-lib +PKG_LIBS = -L/usr/local/lib -lta-lib -Wl,-rpath,/usr/local/lib diff --git a/src/api.h b/src/api.h index 66f1fc350..e86b4f851 100644 --- a/src/api.h +++ b/src/api.h @@ -3,10 +3,13 @@ #include -SEXP c_average_price(SEXP const x); +SEXP c_average_price(const SEXP x); SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, const SEXP maType); +SEXP c_cdl3blackcrows(const SEXP open, const SEXP high, const SEXP low, const SEXP close); SEXP c_commodity_channel_index(const SEXP high, const SEXP low, const SEXP close, const SEXP period); SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period); +SEXP c_median_price(const SEXP x); +SEXP c_moving_average_convergence_divergence(SEXP x, SEXP fastPeriod, SEXP slowPeriod, SEXP signalPeriod); SEXP c_weighted_moving_average(const SEXP x, const SEXP lag); #endif diff --git a/src/average_price.c b/src/average_price.c index 2c35a54f4..324739894 100644 --- a/src/average_price.c +++ b/src/average_price.c @@ -5,7 +5,12 @@ // // Description // `x` needs to have at least OHLC. -#include "lib.h" +#include "R_ext/Arith.h" +#include "R_ext/Memory.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "ta_defs.h" +#include "ta_func.h" SEXP c_average_price(const SEXP x) { @@ -16,7 +21,7 @@ SEXP c_average_price(const SEXP x) { // 1.1) assert dimension // availability if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { - Rf_error("`x` must have 'dim' attribute"); + Rf_error("`x` must have dim attribute"); } const int nrow = INTEGER(x_dimension)[0]; const int ncol = INTEGER(x_dimension)[1]; diff --git a/src/bollinger_bands.c b/src/bollinger_bands.c index b2f927536..17e2e546d 100644 --- a/src/bollinger_bands.c +++ b/src/bollinger_bands.c @@ -5,12 +5,9 @@ // .Call interface: x, timePeriod (int scalar or NA), nbDevUp (double or NA), // nbDevDn, maType (string) -SEXP c_bollinger_bands( - const SEXP x, - const SEXP timePeriod, - const SEXP nbDevUp, - const SEXP nbDevDn, - const SEXP maType) { +SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, + const SEXP nbDevDn, const SEXP maType) { + static int ta_initialized = 0; if (!ta_initialized) { @@ -137,6 +134,7 @@ SEXP c_bollinger_bands( SET_STRING_ELT(names, 3, mkChar("outBegIdx")); SET_STRING_ELT(names, 4, mkChar("outNBElement")); setAttrib(res, R_NamesSymbol, names); + UNPROTECT(6); return res; diff --git a/src/cdl_three_black_crows.c b/src/cdl_three_black_crows.c new file mode 100644 index 000000000..faf7ffccc --- /dev/null +++ b/src/cdl_three_black_crows.c @@ -0,0 +1,50 @@ +#include "lib.h" + +SEXP c_cdl3blackcrows(const SEXP open, const SEXP high, const SEXP low, + const SEXP close) { + const int len = length(open); // assume all four are same length + const double *__restrict__ inOpen = REAL(open); + const double *__restrict__ inHigh = REAL(high); + const double *__restrict__ inLow = REAL(low); + const double *__restrict__ inClose = REAL(close); + + // Determine lookback so we know where the first output will land. + int lookback = TA_CDL3BLACKCROWS_Lookback(); // number of bars consumed before + // first output + + // Prepare result vector and initialize to NA_INTEGER for lookback/trailing. + SEXP ans = PROTECT(allocVector(INTSXP, len)); + int *ans_i = INTEGER(ans); + for (int i = 0; i < len; ++i) + ans_i[i] = NA_INTEGER; + + // If there is not enough data to produce any output, just return all-NA. + if (len <= lookback) { + UNPROTECT(1); + return ans; + } + + int outBegIdx = 0, outNBElement = 0; + + // Call TA-LIB starting at the lookback index so we already know outBegIdx == + // lookback. + TA_RetCode ret = TA_CDL3BLACKCROWS( + lookback, // startIdx + len - 1, // endIdx + inOpen, inHigh, inLow, inClose, &outBegIdx, &outNBElement, + /* output buffer pointed into the R vector to avoid copy: */ + ans_i + lookback // fills ans_i[lookback .. lookback+outNBElement-1] + ); + + // Sanity: if TA-LIB failed or produced nothing, leave ans as all NAs. + if (ret != TA_SUCCESS || outNBElement <= 0) { + UNPROTECT(1); + return ans; + } + + // (Optional) Could verify outBegIdx == lookback and outNBElement == (len - + // lookback), but we're skipping extra branching for speed per your directive. + + UNPROTECT(1); + return ans; +} \ No newline at end of file diff --git a/src/commodity_channel_index.c b/src/commodity_channel_index.c index 6c9fe2c08..6ad220987 100644 --- a/src/commodity_channel_index.c +++ b/src/commodity_channel_index.c @@ -1,34 +1,36 @@ #include "lib.h" -SEXP c_commodity_channel_index(const SEXP high, const SEXP low, const SEXP close, const SEXP period) { - const int timePeriod = asInteger(period); - const int len = length(high); // assume low and close are same length - const double * __restrict__ h = REAL(high); - const double * __restrict__ l = REAL(low); - const double * __restrict__ c = REAL(close); - int outBegIdx = 0, outNBElement = 0; +SEXP c_commodity_channel_index(const SEXP high, const SEXP low, + const SEXP close, const SEXP period) { + const int timePeriod = asInteger(period); + const int len = length(high); // assume low and close are same length + const double *__restrict__ h = REAL(high); + const double *__restrict__ l = REAL(low); + const double *__restrict__ c = REAL(close); + int outBegIdx = 0, outNBElement = 0; - // TA-LIB output buffer (max size = len) - double * __restrict__ outReal = (double *) R_alloc((size_t)len, sizeof(double)); + // TA-LIB output buffer (max size = len) + double *__restrict__ outReal = (double *)R_alloc((size_t)len, sizeof(double)); - // Call TA-LIB CCI: startIdx=0, endIdx=len-1 - TA_RetCode ret = TA_CCI(0, len - 1, h, l, c, timePeriod, &outBegIdx, &outNBElement, outReal); + // Call TA-LIB CCI: startIdx=0, endIdx=len-1 + TA_RetCode ret = TA_CCI(0, len - 1, h, l, c, timePeriod, &outBegIdx, + &outNBElement, outReal); - // Prepare full-length output with leading/trailing NA - SEXP ans = PROTECT(allocVector(REALSXP, len)); - double *ans_d = REAL(ans); + // Prepare full-length output with leading/trailing NA + SEXP ans = PROTECT(allocVector(REALSXP, len)); + double *ans_d = REAL(ans); - // Default everything to NA first (covers error case and trailing) - for (int i = 0; i < len; ++i) - ans_d[i] = NA_REAL; + // Default everything to NA first (covers error case and trailing) + for (int i = 0; i < len; ++i) + ans_d[i] = NA_REAL; - if (ret == TA_SUCCESS && outNBElement > 0) { - // Leading NAs are already in place up to outBegIdx-1 - // Copy computed CCI values - memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - } - // else: leave as NA (failure or no output) + if (ret == TA_SUCCESS && outNBElement > 0) { + // Leading NAs are already in place up to outBegIdx-1 + // Copy computed CCI values + memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + } + // else: leave as NA (failure or no output) - UNPROTECT(1); - return ans; + UNPROTECT(1); + return ans; } \ No newline at end of file diff --git a/src/init.c b/src/init.c index c1c7e4303..223c80d63 100644 --- a/src/init.c +++ b/src/init.c @@ -9,8 +9,11 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(c_average_price, 1), CALLDEF(c_bollinger_bands, 5), + CALLDEF(c_cdl3blackcrows, 4), CALLDEF(c_commodity_channel_index, 4), CALLDEF(c_kaufman_adaptive_moving_average, 2), + CALLDEF(c_median_price, 1), + CALLDEF(c_moving_average_convergence_divergence, 4), CALLDEF(c_weighted_moving_average, 2), {NULL, NULL, 0} }; diff --git a/src/kama.c b/src/kama.c deleted file mode 100644 index 8a1b1658b..000000000 --- a/src/kama.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "lib.h" - -SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period) { - const int timePeriod = asInteger(period); - const int len = length(x); - const double * __restrict__ inReal = REAL(x); - int outBegIdx = 0, outNBElement = 0; - - // TA-LIB output buffer (max size = len) - double * __restrict__ outReal = (double *) R_alloc((size_t)len, sizeof(double)); - - // Direct call to KAMA: startIdx=0, endIdx=len-1 - TA_RetCode ret = TA_KAMA(0, len - 1, inReal, timePeriod, &outBegIdx, &outNBElement, outReal); - - // Prepare result vector with NAs - SEXP ans = PROTECT(allocVector(REALSXP, len)); - double *ans_d = REAL(ans); - for (int i = 0; i < len; ++i) // fill with NA (covers lookback and failure) - ans_d[i] = NA_REAL; - - if (ret == TA_SUCCESS && outNBElement > 0) { - // copy computed KAMA values at their proper offset - memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - } - - UNPROTECT(1); - return ans; -} \ No newline at end of file diff --git a/src/kaufman_adaptive_moving_average.c b/src/kaufman_adaptive_moving_average.c new file mode 100644 index 000000000..7340e2f62 --- /dev/null +++ b/src/kaufman_adaptive_moving_average.c @@ -0,0 +1,31 @@ +#include "lib.h" + +SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period) { + + // 0) parameters + const int window = asInteger(period); + const int len = length(x); + const double *__restrict__ inReal = REAL(x); + int outBegIdx = 0, outNBElement = 0; + + // TA-LIB output buffer (max size = len) + double *__restrict__ outReal = (double *)R_alloc((size_t)len, sizeof(double)); + + // Direct call to KAMA: startIdx=0, endIdx=len-1 + TA_RetCode ret = + TA_KAMA(0, len - 1, inReal, window, &outBegIdx, &outNBElement, outReal); + + // Prepare result vector with NAs + SEXP ans = PROTECT(allocVector(REALSXP, len)); + double *ans_d = REAL(ans); + for (int i = 0; i < len; ++i) // fill with NA (covers lookback and failure) + ans_d[i] = NA_REAL; + + if (ret == TA_SUCCESS && outNBElement > 0) { + // copy computed KAMA values at their proper offset + memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + } + + UNPROTECT(1); + return ans; +} \ No newline at end of file diff --git a/src/lib.h b/src/lib.h index a9ad54e35..7473d13c0 100644 --- a/src/lib.h +++ b/src/lib.h @@ -15,7 +15,7 @@ // Redifne integers to abvoid // R definition clashes #define Int32 TA_Lib_Int32 - #include +#include #undef Int32 static void ensure_ta_initialized(void) { @@ -29,7 +29,7 @@ static void ensure_ta_initialized(void) { } // maps strings to MA enums -// +// // args // x: string, character static TA_MAType map_moving_average(const SEXP x) { diff --git a/src/median_price.c b/src/median_price.c new file mode 100644 index 000000000..3f1fcd5ff --- /dev/null +++ b/src/median_price.c @@ -0,0 +1,72 @@ +// Interface to TA_MEDPRICE +// +// Parameters +// x: A OHLCV-matrix +// +// Description +// `x` needs to have at least High and Low. +#include "R_ext/Arith.h" +#include "R_ext/Memory.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "ta_defs.h" +#include "ta_func.h" + +SEXP c_median_price(const SEXP x) { + + // 1) extract dimensions + // from `x` + SEXP x_dimension = GET_DIM(x); + + // 1.1) assert dimension availability + if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { + Rf_error("`x` must have dim attribute"); + } + const int nrow = INTEGER(x_dimension)[0]; + const int ncol = INTEGER(x_dimension)[1]; + + // 2) extract High and Low + double *HL = REAL(x); + const double *inHigh = HL + 1 * nrow; + const double *inLow = HL + 2 * nrow; + + const int startIdx = 0; + const int endIdx = nrow - 1; + int outBegIdx = 0, outNBElement = 0; + const int maxSize = endIdx - startIdx + 1; + double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); + + // clang-format off + // 3) call TA_MEDPRICE + TA_RetCode ret = TA_MEDPRICE( + startIdx, + endIdx, + inHigh, + inLow, + &outBegIdx, + &outNBElement, + outReal); + // clang-format on + + // 3.1) assert success + if (ret != TA_SUCCESS) { + Rf_error("`TA_MEDPRICE()` failed with code %d.", ret); + } + + // 4) prepare output for R + SEXP output = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); + double *output_ptr = REAL(output); + + // 4.1) initialize to NA + for (int i = 0; i < nrow; ++i) { + output_ptr[i] = NA_REAL; + } + + // 4.2) populate output vector + for (int i = 0; i < outNBElement; ++i) { + output_ptr[outBegIdx + i] = outReal[i]; + } + + UNPROTECT(1); + return output; +} \ No newline at end of file diff --git a/src/moving_average_convergence_divergence.c b/src/moving_average_convergence_divergence.c new file mode 100644 index 000000000..abf3024dc --- /dev/null +++ b/src/moving_average_convergence_divergence.c @@ -0,0 +1,66 @@ +#include "lib.h" + +SEXP c_moving_average_convergence_divergence(SEXP x, SEXP fastPeriod, + SEXP slowPeriod, + SEXP signalPeriod) { + const int fastP = asInteger(fastPeriod); + const int slowP = asInteger(slowPeriod); + const int signalP = asInteger(signalPeriod); + const int len = length(x); + const double *__restrict__ inReal = REAL(x); + + int outBegIdx = 0, outNBElement = 0; + + // TA-LIB output scratch buffers (max size len) + double *__restrict__ outMACD = (double *)R_alloc((size_t)len, sizeof(double)); + double *__restrict__ outSignal = + (double *)R_alloc((size_t)len, sizeof(double)); + double *__restrict__ outHistogram = + (double *)R_alloc((size_t)len, sizeof(double)); + + // Call TA-LIB MACD: full range + TA_RetCode ret = + TA_MACD(0, len - 1, inReal, fastP, slowP, signalP, &outBegIdx, + &outNBElement, outMACD, outSignal, outHistogram); + + // Prepare R output objects: three REALSXP vectors of length len + SEXP macd_vec = PROTECT(allocVector(REALSXP, len)); + SEXP signal_vec = PROTECT(allocVector(REALSXP, len)); + SEXP hist_vec = PROTECT(allocVector(REALSXP, len)); + + double *macd_d = REAL(macd_vec); + double *signal_d = REAL(signal_vec); + double *hist_d = REAL(hist_vec); + + // Initialize all to NA (covers lookback + error cases) + for (int i = 0; i < len; ++i) { + macd_d[i] = NA_REAL; + signal_d[i] = NA_REAL; + hist_d[i] = NA_REAL; + } + + if (ret == TA_SUCCESS && outNBElement > 0) { + // Copy computed outputs into place, respecting outBegIdx + memcpy(macd_d + outBegIdx, outMACD, (size_t)outNBElement * sizeof(double)); + memcpy(signal_d + outBegIdx, outSignal, + (size_t)outNBElement * sizeof(double)); + memcpy(hist_d + outBegIdx, outHistogram, + (size_t)outNBElement * sizeof(double)); + } + + // Bundle into a named list: list(macd=..., signal=..., hist=...) + SEXP ans = PROTECT(allocVector(VECSXP, 3)); + SET_VECTOR_ELT(ans, 0, macd_vec); + SET_VECTOR_ELT(ans, 1, signal_vec); + SET_VECTOR_ELT(ans, 2, hist_vec); + + // Set names + SEXP names = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(names, 0, mkChar("macd")); + SET_STRING_ELT(names, 1, mkChar("signal")); + SET_STRING_ELT(names, 2, mkChar("hist")); + setAttrib(ans, R_NamesSymbol, names); + + UNPROTECT(5); // macd_vec, signal_vec, hist_vec, ans, names + return ans; +} \ No newline at end of file diff --git a/src/ta_avgprice.c b/src/ta_avgprice.c deleted file mode 100644 index 20ffd379f..000000000 --- a/src/ta_avgprice.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Average Price - * - * Function Description - * - * x: An object coercible to double matrix on the form Open, High, Low, Close - * and Volume - * - * - * - * - */ -#include "lib.h" - -SEXP c_average_price(SEXP const x) { - if (TYPEOF(x) != REALSXP) - Rf_error("Input must be a numeric (double) matrix."); - SEXP dim = GET_DIM(x); - if (dim == R_NilValue || LENGTH(dim) < 2) - Rf_error("Input must have a dim attribute."); - int nrow = INTEGER(dim)[0]; - int ncol = INTEGER(dim)[1]; - if (ncol != 4) - Rf_error("Input matrix must have 4 columns: Open, High, Low, Close."); - - double *mat = REAL(x); - const double *inOpen = mat + 0 * nrow; - const double *inHigh = mat + 1 * nrow; - const double *inLow = mat + 2 * nrow; - const double *inClose = mat + 3 * nrow; - - ensure_ta_initialized(); - - int startIdx = 0; - int endIdx = nrow - 1; - int outBegIdx = 0, outNBElement = 0; - int maxSize = endIdx - startIdx + 1; - double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); - - TA_RetCode ret = TA_AVGPRICE(startIdx, endIdx, inOpen, inHigh, inLow, inClose, - &outBegIdx, &outNBElement, outReal); - if (ret != TA_SUCCESS) { - Rf_error("TA_AVGPRICE failed with code %d.", ret); - } - - SEXP result = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); - double *res = REAL(result); - - /* initialize to NA */ - for (int i = 0; i < nrow; ++i) - res[i] = NA_REAL; - - /* sanity-check the returned window before copying */ - if (outNBElement > 0) { - if (outBegIdx < 0 || outBegIdx + outNBElement > nrow) { - UNPROTECT(1); - Rf_error("TA_AVGPRICE returned invalid outBegIdx/outNBElement: " - "outBegIdx=%d outNBElement=%d", - outBegIdx, outNBElement); - } - for (int i = 0; i < outNBElement; ++i) { - res[outBegIdx + i] = outReal[i]; - } - } - - UNPROTECT(1); - return result; -} diff --git a/src/weighted_moving_average.c b/src/weighted_moving_average.c index a9beb696f..54b260f15 100644 --- a/src/weighted_moving_average.c +++ b/src/weighted_moving_average.c @@ -1,36 +1,40 @@ #include "lib.h" SEXP c_weighted_moving_average(const SEXP x, const SEXP lag) { - const int timePeriod = asInteger(lag); - const int len = length(x); - const double * __restrict__ x_data = REAL(x); - int outBegIdx = 0, outNBElement = 0; - - // Output buffer: at most len elements; R_alloc is fast and GC-managed - double * __restrict__ outReal = (double*) R_alloc((size_t)len, sizeof(double)); - - // Call TA-LIB WMA: startIdx=0, endIdx=len-1 - TA_RetCode ret = TA_WMA(0, len - 1, x_data, timePeriod, &outBegIdx, &outNBElement, outReal); - - // Prepare full-length vector with leading NAs (lookback) - SEXP ans = PROTECT(allocVector(REALSXP, len)); - double *ans_d = REAL(ans); - - if (ret != TA_SUCCESS || outNBElement <= 0) { - // Failure: fill with NA - for (int i = 0; i < len; ++i) ans_d[i] = NA_REAL; - UNPROTECT(1); - return ans; - } + const int timePeriod = asInteger(lag); + const int len = length(x); + const double *__restrict__ x_data = REAL(x); + int outBegIdx = 0, outNBElement = 0; + + // Output buffer: at most len elements; R_alloc is fast and GC-managed + double *__restrict__ outReal = (double *)R_alloc((size_t)len, sizeof(double)); + + // Call TA-LIB WMA: startIdx=0, endIdx=len-1 + TA_RetCode ret = TA_WMA(0, len - 1, x_data, timePeriod, &outBegIdx, + &outNBElement, outReal); + + // Prepare full-length vector with leading NAs (lookback) + SEXP ans = PROTECT(allocVector(REALSXP, len)); + double *ans_d = REAL(ans); + + if (ret != TA_SUCCESS || outNBElement <= 0) { + // Failure: fill with NA + for (int i = 0; i < len; ++i) + ans_d[i] = NA_REAL; + UNPROTECT(1); + return ans; + } - // Leading NA for lookback - for (int i = 0; i < outBegIdx; ++i) ans_d[i] = NA_REAL; + // Leading NA for lookback + for (int i = 0; i < outBegIdx; ++i) + ans_d[i] = NA_REAL; - // Copy the computed WMA results - memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + // Copy the computed WMA results + memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - // (Trailing part should naturally be filled by outNBElement; since endIdx = len-1, no further action) + // (Trailing part should naturally be filled by outNBElement; since endIdx = + // len-1, no further action) - UNPROTECT(1); - return ans; + UNPROTECT(1); + return ans; } \ No newline at end of file From f07106f0557f5c3bd0c0bcf2f139e02fe1347feb Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:24:22 +0200 Subject: [PATCH 013/166] :hammer: Updated the DESCRIPTION * It now includes License, Versions, Authors and Description. - Some of it are just temporary. --- DESCRIPTION | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index f6c87d382..c4e02e09d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,14 +1,23 @@ Package: talib -Title: What the Package Does (One Line, Title Case) -Version: 0.0.0.9000 -Authors@R: - person("First", "Last", , "first.last@example.com", role = c("aut", "cre")) -Description: What the package does (one paragraph). -License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a - license +Title: Bindings to the Technical Analysis Library (TA-lib) +Version: 0.0-1 +Authors@R: c( + person( + given = "Serkan", + family = "Korkmaz", + email = "serkor1@duck.com", + role = c("cre", "aut", "cph"), + comment = c(ORCID = "0000-0002-5052-0982") + ) + ) +Description: TA-lib offers 200+ technical trading indicators, including candlestick pattern recognition. +License: BSD_3_Clause + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Suggests: testthat (>= 3.0.0) Config/testthat/edition: 3 +Depends: + R (>= 3.5) +LazyData: true From f570a3ab2475fa010286f7f0a7fbb07d25e1c3b5 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:25:28 +0200 Subject: [PATCH 014/166] :hammer: Added data * BTC from {cryptoQuotes} * SPY from {quantmod} NOTE: It needs to be documented at a later point. --- data-raw/BTC.R | 29 +++++++++++++++++++++++++++++ data-raw/SPY.R | 37 +++++++++++++++++++++++++++++++++++++ data/BTC.rda | Bin 0 -> 4545 bytes data/SPY.rda | Bin 0 -> 64910 bytes 4 files changed, 66 insertions(+) create mode 100644 data-raw/BTC.R create mode 100644 data-raw/SPY.R create mode 100644 data/BTC.rda create mode 100644 data/SPY.rda diff --git a/data-raw/BTC.R b/data-raw/BTC.R new file mode 100644 index 000000000..6144976f3 --- /dev/null +++ b/data-raw/BTC.R @@ -0,0 +1,29 @@ +## script: BTC +## objective: Generate BTC +## data for the R package +## using {cryptoQuotes} +## +## 0) load data +BTC <- cryptoQuotes::get_quote( + ticker = "BTCUSDC", + futures = FALSE, + interval = "15m" +) + +## 1) convert to matrix +BTC <- matrix( + data = BTC[,1:5], + ncol = 5, + dimnames = list( + rownames(BTC), + colnames(BTC) + ) +) + +## 2) store data +usethis::use_data( + BTC, + overwrite = TRUE +) + + diff --git a/data-raw/SPY.R b/data-raw/SPY.R new file mode 100644 index 000000000..14473e633 --- /dev/null +++ b/data-raw/SPY.R @@ -0,0 +1,37 @@ +## script: SPY +## objective: Generate SPY +## data for the R package +## using {quantmod} +## +## 0) load data +SPY <- quantmod::getSymbols( + Symbols = "SPY", + auto.assign = FALSE +)[,1:5] + +## 1) rename columns +colnames(SPY) <- c( + "open", + "high" , + "low", + "close", + "volume" +) + +## 2) convert to matrix +SPY <- matrix( + data = SPY[,1:5], + ncol = 5, + dimnames = list( + rownames(SPY), + colnames(SPY) + ) +) + +## 3) store data +usethis::use_data( + SPY, + overwrite = TRUE +) + + diff --git a/data/BTC.rda b/data/BTC.rda new file mode 100644 index 0000000000000000000000000000000000000000..032d96115d301a4be7bd526505a5258959f86cb4 GIT binary patch literal 4545 zcmV;y5kBrhT4*^jL0KkKS#r?=IRFQH|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0|NsC0 z|NsC0|Nr0(9QpAGsrGk$UwZqo@Bj_VUE5k^vWMNawJUq=-UmV&giQoBPZZiuDf*_= z@eL!?ZA~=D)6~(Ln@O2ZNs;8p6VasbrpSk;G?U4R=+xBHX_RIXZ3(p+Z7~?9k%SK> zig+S=o|J_E8Z{VCMyH~B zo~DK))ZUbA)X6;!PYN?h?L!)#6*sBmr|GJ1O;hxv^&@(xsrp38qeh>lAEh+%Xxc$D z)M!l`NNk#z)W(5`k0{z8YDSQgGM=WJ)gDl3>OHCe#-mJ|Mvy%;)Mx>rpaz>!kN_HO zCe&yF>N02=Jxv+_G&BGYNCBYG02*iyP-tjq^%{9YK-D}zCW2s6fB*mu000dD0B8UJ z(VzeWKr{dVXaE2J05kvwhJXM7&;S4inn@-}p`aQ74X6W8NB}ed13=Jd02%-Q8Vxi6 z0MIajpa3)t02(wj003wJ0009(k|;=xG{TshNu~^h$+bO3)HDW+O*AmnGCc;Np{J+= zL(qnsLSs|)G>lBqHju#@27@C^n(a#p{9))0Q3kLo{_ZFUX`fr0mCl%5n~pZ zT$`KeBHI=L}oBXe(_k>3t-#HH8BAjijlNA_HjhRIWq7dx}S9K{3%HQV{$m zhCS^8xYJmakjIABOSCJVI% zzUvAS0(F6p4=oOEN+`xfN1~pr|N>g&+b#kVsOB zK`2TnDp3gps;LD^lnPZz3IHSks;CqY3aBIkKm@n^JG7s#r{rie)gTnmU6TB>Lmd%Siy^;(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N>);>+0V!k;D2c1Y_`8MPpC54^tOgO+5ft{{4rQo0 zE(2;v2ms^ix?AyN5+r4+ms^~fI~l@Tloyv(>}$n*<3@@?l_XDOtq?+^472K_z$r4m zmc0he(} zC7U)ZM$L%WkA!R=Ut1@MT|*Mv6FnMUJb3?;u8xulU7?WWm8g#N*u5eMfJ6~NK_n0) zfSm`9k%EeMQ_mB(e}$8Ce}xZinT#FnOEye{B*YIvGD1eBN|Z~bSxUCc-CmBHJsM{| z{2YUfgeJ4oZ&|0T_azBZwh2N?K#l5R>j7^&nsJ`YFyH7*N6MxeD@i)R0X86DU{et> z6A2h3!UhEiuF`n3v@Ik_xpcwnvqi2An+^*^!}K2! NcO+AV2@Nvf#K2x*s*C^t literal 0 HcmV?d00001 From c5f743c02082aa8db38b56277d3cf88d2dce4b88 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:26:39 +0200 Subject: [PATCH 015/166] :hammer: Updated pkg * Each C-file follows the same structure as the TA-lib, including naming. --- .gitignore | 3 ++ NAMESPACE | 4 ++ R/average_price.R | 21 +++++++- R/ta_AROON.R | 9 ++++ R/ta_MIDPRICE.R | 33 ++++++++++++ man/average_price.Rd | 18 ++++++- man/midpoint_price.Rd | 23 ++++++++ src/api.h | 5 +- src/bollinger_bands.c | 2 - src/init.c | 5 +- src/ta_APO.c | 62 ++++++++++++++++++++++ src/ta_AROON.c | 72 ++++++++++++++++++++++++++ src/ta_AROONOSC.c | 57 ++++++++++++++++++++ src/{average_price.c => ta_AVGPRICE.c} | 5 +- src/{median_price.c => ta_MEDPRICE.c} | 0 src/ta_MIDPRICE.c | 72 ++++++++++++++++++++++++++ 16 files changed, 382 insertions(+), 9 deletions(-) create mode 100644 R/ta_AROON.R create mode 100644 R/ta_MIDPRICE.R create mode 100644 man/midpoint_price.Rd create mode 100644 src/ta_APO.c create mode 100644 src/ta_AROON.c create mode 100644 src/ta_AROONOSC.c rename src/{average_price.c => ta_AVGPRICE.c} (95%) rename src/{median_price.c => ta_MEDPRICE.c} (100%) create mode 100644 src/ta_MIDPRICE.c diff --git a/.gitignore b/.gitignore index 7cc8b6a31..7311fafa8 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,6 @@ po/*~ # RStudio Connect folder rsconnect/ .Rproj.user + +# Building nots +NOTES.md \ No newline at end of file diff --git a/NAMESPACE b/NAMESPACE index 0af9b9e1d..44e322266 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,13 +2,17 @@ S3method(average_price,default) S3method(median_price,default) +S3method(midpoint_price,default) S3method(moving_average_convergence_divergence,default) S3method(three_black_crows,default) +export(aroon) +export(aroonosc) export(average_price) export(bollinger_bands) export(commodity_channel_index) export(kaufman_adaptive_moving_average) export(median_price) +export(midpoint_price) export(moving_average_convergence_divergence) export(three_black_crows) export(weighted_moving_average) diff --git a/R/average_price.R b/R/average_price.R index 1602f1424..48cb44278 100644 --- a/R/average_price.R +++ b/R/average_price.R @@ -8,7 +8,21 @@ #' @templateVar .fun average_price #' @templateVar .author Serkan Korkmaz #' -#' @returns Something +#' @param x An object coercible to [matrix]. +#' @param ... Arguments passed into other methods. +#' +#' ## Title +#' This function calculates the average price of +#' of a financial asset +#' +#' @returns +#' A [double]-vector of [lenght] N of average prices. +#' +#' @examples +#' ## calculate average +#' ## price +#' average_price(BTC) +#' #' @export average_price <- function(x, ...) { UseMethod( @@ -29,5 +43,8 @@ average_price.default <- function(x, ...) { ## met x <- as.matrix(x); assert(is.numeric(x)) - .Call("c_average_price", x[,1:4]) + ## 1) pass `x` assuming that + ## it follows Open (x[,1]), High (x[,2]) + ## Low (x[,3]) and Close (x[,4]) + .Call("impl_TA_AVGPRICE", x[,1:4]) } \ No newline at end of file diff --git a/R/ta_AROON.R b/R/ta_AROON.R new file mode 100644 index 000000000..28648727d --- /dev/null +++ b/R/ta_AROON.R @@ -0,0 +1,9 @@ +#' @export +aroon <- function(x, n) { + .Call("impl_ta_AROON",x[,2], x[,3], as.integer(n)) +} + +#' @export +aroonosc <- function(x, n) { + .Call("impl_ta_AROONOSC",x[,2], x[,3], as.integer(n)) +} \ No newline at end of file diff --git a/R/ta_MIDPRICE.R b/R/ta_MIDPRICE.R new file mode 100644 index 000000000..a80d6c70a --- /dev/null +++ b/R/ta_MIDPRICE.R @@ -0,0 +1,33 @@ +#' @title NULL +#' @usage NULL +#' +#' @template description +#' +#' @templateVar .title Midpoint Price +#' @templateVar .type multivariate +#' @templateVar .fun midpoint_price +#' @templateVar .author Serkan Korkmaz +#' +#' @returns Something +#' @export +midpoint_price <- function(x, n, ...) { + UseMethod( + generic = "midpoint_price" + ) +} + +#' @export +midpoint_price.default <- function(x, n, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + x <- as.matrix(x); assert(is.numeric(x)) + + .Call("impl_MIDPRICE", x[,1:4], as.integer(n)) +} \ No newline at end of file diff --git a/man/average_price.Rd b/man/average_price.Rd index df7c0fda8..1a8fc52eb 100644 --- a/man/average_price.Rd +++ b/man/average_price.Rd @@ -8,11 +8,27 @@ ## for Average Price average_price(...) } +\arguments{ +\item{x}{An object coercible to \link{matrix}.} + +\item{...}{Arguments passed into other methods. +\subsection{Title}{ + +This function calculates the average price of +of a financial asset +}} +} \value{ -Something +A \link{double}-vector of \link{lenght} N of average prices. } \description{ A generic S3 function to compute the average price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). +} +\examples{ +## calculate average +## price +average_price(BTC) + } \author{ Serkan Korkmaz diff --git a/man/midpoint_price.Rd b/man/midpoint_price.Rd new file mode 100644 index 000000000..605204287 --- /dev/null +++ b/man/midpoint_price.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MIDPRICE.R +\name{midpoint_price} +\alias{midpoint_price} +\title{Midpoint Price} +\usage{ +## Generic default S3 method +## for Midpoint Price +midpoint_price(...) +} +\value{ +Something +} +\description{ +A generic S3 function to compute the midpoint price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). +} +\author{ +Serkan Korkmaz +} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/src/api.h b/src/api.h index e86b4f851..7037c8179 100644 --- a/src/api.h +++ b/src/api.h @@ -3,7 +3,6 @@ #include -SEXP c_average_price(const SEXP x); SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, const SEXP maType); SEXP c_cdl3blackcrows(const SEXP open, const SEXP high, const SEXP low, const SEXP close); SEXP c_commodity_channel_index(const SEXP high, const SEXP low, const SEXP close, const SEXP period); @@ -11,5 +10,9 @@ SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period); SEXP c_median_price(const SEXP x); SEXP c_moving_average_convergence_divergence(SEXP x, SEXP fastPeriod, SEXP slowPeriod, SEXP signalPeriod); SEXP c_weighted_moving_average(const SEXP x, const SEXP lag); +SEXP impl_MIDPRICE(const SEXP x, const SEXP n); +SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); +SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); +SEXP impl_TA_AVGPRICE(const SEXP x); #endif diff --git a/src/bollinger_bands.c b/src/bollinger_bands.c index 17e2e546d..8731c46f3 100644 --- a/src/bollinger_bands.c +++ b/src/bollinger_bands.c @@ -8,7 +8,6 @@ SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, const SEXP maType) { - static int ta_initialized = 0; if (!ta_initialized) { if (TA_Initialize() != TA_SUCCESS) @@ -134,7 +133,6 @@ SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, SET_STRING_ELT(names, 3, mkChar("outBegIdx")); SET_STRING_ELT(names, 4, mkChar("outNBElement")); setAttrib(res, R_NamesSymbol, names); - UNPROTECT(6); return res; diff --git a/src/init.c b/src/init.c index 223c80d63..02d201278 100644 --- a/src/init.c +++ b/src/init.c @@ -7,7 +7,6 @@ #define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} static const R_CallMethodDef CallEntries[] = { - CALLDEF(c_average_price, 1), CALLDEF(c_bollinger_bands, 5), CALLDEF(c_cdl3blackcrows, 4), CALLDEF(c_commodity_channel_index, 4), @@ -15,5 +14,9 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(c_median_price, 1), CALLDEF(c_moving_average_convergence_divergence, 4), CALLDEF(c_weighted_moving_average, 2), + CALLDEF(impl_MIDPRICE, 2), + CALLDEF(impl_ta_AROONOSC, 3), + CALLDEF(impl_ta_AROON, 3), + CALLDEF(impl_TA_AVGPRICE, 1), {NULL, NULL, 0} }; diff --git a/src/ta_APO.c b/src/ta_APO.c new file mode 100644 index 000000000..e75077279 --- /dev/null +++ b/src/ta_APO.c @@ -0,0 +1,62 @@ +// Interface to ta_APO.c +// +// Parameters +// inReal : Numeric vector of input values. +// fastPeriod : Integer, period for the fast moving average. +// slowPeriod : Integer, period for the slow moving average. +// maType : Integer, TA-Lib MA type (e.g., SMA, EMA). +// +// Description +// Computes the Absolute Price Oscillator (APO), i.e. the difference +// between two moving averages of the input. Returns a numeric vector +// of the same length as input; positions before the lookback are set to NA. +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, + SEXP slowPeriodSEXP, SEXP maTypeSEXP) { + // Protect the output vector from garbage collection + R_xlen_t n = xlength(inRealSEXP); + int fastPeriod = asInteger(fastPeriodSEXP); + int slowPeriod = asInteger(slowPeriodSEXP); + int maType = asInteger(maTypeSEXP); + + // Allocate result vector + SEXP outRealSEXP = PROTECT(allocVector(REALSXP, n)); + double *restrict outReal = REAL(outRealSEXP); + const double *restrict inReal = REAL(inRealSEXP); + + // Call TA-Lib + int outBegIdx = 0, outNBElement = 0; + TA_RetCode ret = TA_APO( + 0, // start index + (int)n - 1, // end index + inReal, // input array + fastPeriod, // fast MA period + slowPeriod, // slow MA period + maType, // MA type + &outBegIdx, // first valid output index + &outNBElement, // number of elements computed + outReal // output array (length ≥ n) + ); + if (ret != TA_SUCCESS) { + UNPROTECT(1); + error("TA_APO failed with error code %d", ret); + } + + // Initialize first outBegIdx values to NA + for (int i = 0; i < outBegIdx; ++i) + outReal[i] = NA_REAL; + + // Shift valid outputs into place + memmove(outReal + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + + // Fill trailing values with NA + for (int i = outBegIdx + outNBElement; i < n; ++i) + outReal[i] = NA_REAL; + + UNPROTECT(1); + return outRealSEXP; +} diff --git a/src/ta_AROON.c b/src/ta_AROON.c new file mode 100644 index 000000000..9a11ba551 --- /dev/null +++ b/src/ta_AROON.c @@ -0,0 +1,72 @@ +// Interface to ta_AROON.c +// +// Parameters +// inHigh : Numeric vector of high prices. +// inLow : Numeric vector of low prices. +// timePeriod : Integer, look-back period for Aroon. +// +// Description +// Computes the Aroon indicator, which returns two series: +// AroonDown and AroonUp. Returns an n×2 matrix (columns in order: +// "aroondown", "aroonup"), with positions before lookback set to NA. +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { + R_xlen_t n = xlength(inHighSEXP); + if (xlength(inLowSEXP) != n) + error("inHigh and inLow must have the same length"); + + int timePeriod = asInteger(timePeriodSEXP); + const double *restrict inHigh = REAL(inHighSEXP); + const double *restrict inLow = REAL(inLowSEXP); + + // Allocate an n×2 matrix + SEXP outMat = PROTECT(allocMatrix(REALSXP, n, 2)); + double *restrict outDown = REAL(outMat); // column 0 + double *restrict outUp = REAL(outMat) + n; // column 1 + + // Set up dimnames for columns: lowercase names + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dimnames, 0, R_NilValue); // no row names + SEXP colNames = PROTECT(allocVector(STRSXP, 2)); + SET_STRING_ELT(colNames, 0, mkChar("aroondown")); + SET_STRING_ELT(colNames, 1, mkChar("aroonup")); + SET_VECTOR_ELT(dimnames, 1, colNames); + setAttrib(outMat, R_DimNamesSymbol, dimnames); + + // Call TA-Lib + int outBegIdx = 0, outNBElement = 0; + TA_RetCode ret = TA_AROON( + 0, (int)n - 1, + inHigh, inLow, + timePeriod, + &outBegIdx, &outNBElement, + outDown, outUp + ); + if (ret != TA_SUCCESS) { + UNPROTECT(3); + error("TA_AROON failed with error code %d", ret); + } + + // Fill invalid leading positions with NA + for (int i = 0; i < outBegIdx; ++i) { + outDown[i] = NA_REAL; + outUp[i] = NA_REAL; + } + + // Shift valid values into place + memmove(outDown + outBegIdx, outDown, (size_t)outNBElement * sizeof(double)); + memmove(outUp + outBegIdx, outUp, (size_t)outNBElement * sizeof(double)); + + // Fill trailing positions with NA + for (int i = outBegIdx + outNBElement; i < n; ++i) { + outDown[i] = NA_REAL; + outUp[i] = NA_REAL; + } + + UNPROTECT(3); + return outMat; +} diff --git a/src/ta_AROONOSC.c b/src/ta_AROONOSC.c new file mode 100644 index 000000000..b3e976981 --- /dev/null +++ b/src/ta_AROONOSC.c @@ -0,0 +1,57 @@ +// Interface to ta_AROONOSC.c +// +// Parameters +// inHigh : Numeric vector of high prices. +// inLow : Numeric vector of low prices. +// timePeriod : Integer, look-back period. +// +// Description +// Computes the Aroon Oscillator (difference between AroonUp and +// AroonDown). Returns a numeric vector of same length as input; +// positions before lookback are NA. +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { + R_xlen_t n = xlength(inHighSEXP); + if (xlength(inLowSEXP) != n) + error("inHigh and inLow must have the same length"); + + int timePeriod = asInteger(timePeriodSEXP); + const double *restrict inHigh = REAL(inHighSEXP); + const double *restrict inLow = REAL(inLowSEXP); + + // Allocate output vector + SEXP outOscSEXP = PROTECT(allocVector(REALSXP, n)); + double *restrict outOsc = REAL(outOscSEXP); + + // Call TA-Lib + int outBegIdx = 0, outNBElement = 0; + TA_RetCode ret = TA_AROONOSC( + 0, (int)n - 1, + inHigh, inLow, + timePeriod, + &outBegIdx, &outNBElement, + outOsc + ); + if (ret != TA_SUCCESS) { + UNPROTECT(1); + error("TA_AROONOSC failed with error code %d", ret); + } + + // Leading NAs + for (int i = 0; i < outBegIdx; ++i) + outOsc[i] = NA_REAL; + + // Shift valid outputs + memmove(outOsc + outBegIdx, outOsc, (size_t)outNBElement * sizeof(double)); + + // Trailing NAs + for (int i = outBegIdx + outNBElement; i < n; ++i) + outOsc[i] = NA_REAL; + + UNPROTECT(1); + return outOscSEXP; +} diff --git a/src/average_price.c b/src/ta_AVGPRICE.c similarity index 95% rename from src/average_price.c rename to src/ta_AVGPRICE.c index 324739894..e39c3776e 100644 --- a/src/average_price.c +++ b/src/ta_AVGPRICE.c @@ -12,7 +12,7 @@ #include "ta_defs.h" #include "ta_func.h" -SEXP c_average_price(const SEXP x) { +SEXP impl_TA_AVGPRICE(const SEXP x) { // 1) extract dimensions // form `x` @@ -23,6 +23,7 @@ SEXP c_average_price(const SEXP x) { if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { Rf_error("`x` must have dim attribute"); } + const int nrow = INTEGER(x_dimension)[0]; const int ncol = INTEGER(x_dimension)[1]; @@ -37,7 +38,7 @@ SEXP c_average_price(const SEXP x) { const int startIdx = 0; const int endIdx = nrow - 1; - const int outBegIdx = 0, outNBElement = 0; + int outBegIdx = 0, outNBElement = 0; const int maxSize = endIdx - startIdx + 1; double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); diff --git a/src/median_price.c b/src/ta_MEDPRICE.c similarity index 100% rename from src/median_price.c rename to src/ta_MEDPRICE.c diff --git a/src/ta_MIDPRICE.c b/src/ta_MIDPRICE.c new file mode 100644 index 000000000..9c3b0618d --- /dev/null +++ b/src/ta_MIDPRICE.c @@ -0,0 +1,72 @@ +// Interface to ta_MIDPRICE.c +// +// Parameters +// x: A OHLC matrix +// +#include "R_ext/Error.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "ta_func.h" + +SEXP impl_MIDPRICE(const SEXP x, const SEXP n) { + + // 1) extract dimensions + // from `x` + SEXP x_dimension = GET_DIM(x); + + // 1.1) assert dimensiona availability + if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { + Rf_error("`x` must have dim attribute"); + } + const int nrow = INTEGER(x_dimension)[0]; + const int ncol = INTEGER(x_dimension)[1]; + + // 2) extract High and Low + double *HL = REAL(x); + const double *inHigh = HL + 1 * nrow; + const double *inLow = HL + 2 * nrow; + + // 2.1) extract time period + const int *optInTimePeriod = INTEGER(n); + + const int startIdx = 0; + const int endIdx = nrow - 1; + int outBegIdx = 0, outNBElement = 0; + const int maxSize = endIdx - startIdx + 1; + double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); + + // clang-format off + // 3) call TA_MEDPRICE + TA_RetCode ret = TA_MIDPRICE( + startIdx, + endIdx, + inHigh, + inLow, + optInTimePeriod[0], + &outBegIdx, + &outNBElement, + outReal); + // clang-format on + + // 3.1) assert success + if (ret != TA_SUCCESS) { + Rf_error("`TA_MEDPRICE()` failed with code %d.", ret); + } + + // 4) prepare output for R + SEXP output = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); + double *output_ptr = REAL(output); + + // 4.1) initialize to NA + for (int i = 0; i < nrow; ++i) { + output_ptr[i] = NA_REAL; + } + + // 4.2) populate output vector + for (int i = 0; i < outNBElement; ++i) { + output_ptr[outBegIdx + i] = outReal[i]; + } + + UNPROTECT(1); + return output; +} \ No newline at end of file From f02249dbd57508a3a68a456004afa5b174513685 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:35:58 +0200 Subject: [PATCH 016/166] :hammer: New functionality * Acceleration Bands * Bollinger Bands * MACD * Relative Strength Index --- src/ta_ACCBANDS.c | 61 +++++++++++++++++++++++++++++++++++++++++++++ src/ta_BBANDS.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++ src/ta_MACD.c | 56 +++++++++++++++++++++++++++++++++++++++++ src/ta_RSI.c | 36 +++++++++++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 src/ta_ACCBANDS.c create mode 100644 src/ta_BBANDS.c create mode 100644 src/ta_MACD.c create mode 100644 src/ta_RSI.c diff --git a/src/ta_ACCBANDS.c b/src/ta_ACCBANDS.c new file mode 100644 index 000000000..1380d7e8f --- /dev/null +++ b/src/ta_ACCBANDS.c @@ -0,0 +1,61 @@ +// Interface to ta_ACCBANDS (Acceleration Bands) +// +// Parameters +// inHigh : numeric vector of high prices. +// inLow : numeric vector of low prices. +// inClose : numeric vector of close prices. +// optTimePeriod : integer, lookback period (From 2 to 100000). +// +// Description +// Computes acceleration bands (upper, middle, lower) over the input series. +// Returns an n × 3 matrix with columns "upper","middle","lower", padded +// with NA_REAL where the bands are undefined. + +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, + SEXP optTimePeriod) +{ + int n = LENGTH(inHigh); // assume all three are same length + double *restrict highs = REAL(inHigh); // pointer to high prices + double *restrict lows = REAL(inLow); // pointer to low prices + double *restrict closes = REAL(inClose); // pointer to close prices + int period = INTEGER(optTimePeriod)[0]; // lookback period + + // allocate result matrix: n rows × 3 cols + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *upper = REAL(result); // col 1 + double *middle = upper + n; // col 2 + double *lower = upper + 2*n; // col 3 + + int outBeg, outNb; + TA_RetCode ret = TA_ACCBANDS(0, n-1, + highs, lows, closes, + period, + &outBeg, &outNb, + upper + outBeg, + middle + outBeg, + lower + outBeg); + + // fill leading/trailing NAs for undefined ranges + for(int i = 0; i < outBeg; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; + for(int i = outBeg + outNb; i < n; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; + + // set column names to lowercase as requested + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("upper")); + SET_STRING_ELT(cnames, 1, mkChar("middle")); + SET_STRING_ELT(cnames, 2, mkChar("lower")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; +} diff --git a/src/ta_BBANDS.c b/src/ta_BBANDS.c new file mode 100644 index 000000000..ac6f4ed83 --- /dev/null +++ b/src/ta_BBANDS.c @@ -0,0 +1,63 @@ +// Interface to ta_BBANDS (Bollinger Bands) +// +// Parameters +// inReal : numeric vector of source prices. +// optTimePeriod : integer, lookback period (e.g. 20). +// optNbDevUp : double, number of standard deviations for upper band. +// optNbDevDn : double, number of standard deviations for lower band. +// optMAType : integer code of TA_MAType (e.g. TA_MAType_SMA). +// +// Description +// Computes the upper, middle, and lower Bollinger Bands over the input +// series. Returns an n × 3 matrix (columns "upper","middle","lower") +// padded with NA_REAL for values where the bands are undefined. + +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, + SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType) +{ + int n = LENGTH(inReal); // input length + double *restrict src = REAL(inReal); // pointer to input data + int period = INTEGER(optTimePeriod)[0]; // lookback + double nbUp = REAL(optNbDevUp)[0]; // std dev up + double nbDn = REAL(optNbDevDn)[0]; // std dev down + int maType = INTEGER(optMAType)[0]; // MA type enum + + // allocate result matrix n rows × 3 cols + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *upper = REAL(result); // column 1 + double *middle = upper + n; // column 2 + double *lower = upper + 2*n; // column 3 + + // call TA-Lib function + int outBeg, outNb; + TA_RetCode ret = TA_BBANDS(0, n-1, src, + period, nbUp, nbDn, maType, + &outBeg, &outNb, + upper + outBeg, + middle + outBeg, + lower + outBeg); + + // fill leading/trailing NAs + for(int i = 0; i < outBeg; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; + for(int i = outBeg + outNb; i < n; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; + + // set column names: c("upper","middle","lower") + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("upper")); + SET_STRING_ELT(cnames, 1, mkChar("middle")); + SET_STRING_ELT(cnames, 2, mkChar("lower")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; +} diff --git a/src/ta_MACD.c b/src/ta_MACD.c new file mode 100644 index 000000000..8f9a1f1e7 --- /dev/null +++ b/src/ta_MACD.c @@ -0,0 +1,56 @@ +// Interface to ta_MACD (Moving Average Convergence/Divergence) +// +// Parameters +// inReal : numeric vector of source prices. +// optFastPeriod : integer, fast EMA period. +// optSlowPeriod : integer, slow EMA period. +// optSignalPeriod: integer, signal‐line EMA period. +// +// Description +// Computes the MACD line, its signal‐line, and the MACD histogram. +// Returns an n × 3 matrix with columns "macd","signal","histogram". + +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, + SEXP optSlowPeriod, SEXP optSignalPeriod) +{ + int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + int fastP = INTEGER(optFastPeriod)[0]; + int slowP = INTEGER(optSlowPeriod)[0]; + int signalP = INTEGER(optSignalPeriod)[0]; + + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *macd = REAL(result); + double *signal = macd + n; + double *histogram = macd + 2*n; + + int outBeg, outNb; + TA_RetCode ret = TA_MACD(0, n-1, src, + fastP, slowP, signalP, + &outBeg, &outNb, + macd + outBeg, + signal + outBeg, + histogram + outBeg); + + for(int i = 0; i < outBeg; ++i) + macd[i] = signal[i] = histogram[i] = NA_REAL; + for(int i = outBeg + outNb; i < n; ++i) + macd[i] = signal[i] = histogram[i] = NA_REAL; + + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames,0,mkChar("macd")); + SET_STRING_ELT(cnames,1,mkChar("signal")); + SET_STRING_ELT(cnames,2,mkChar("histogram")); + SET_VECTOR_ELT(dims,0,R_NilValue); + SET_VECTOR_ELT(dims,1,cnames); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; +} diff --git a/src/ta_RSI.c b/src/ta_RSI.c new file mode 100644 index 000000000..17ec1148e --- /dev/null +++ b/src/ta_RSI.c @@ -0,0 +1,36 @@ +// Interface to ta_RSI (Relative Strength Index) +// +// Parameters +// inReal : numeric vector of source prices. +// optTimePeriod : integer, lookback period (commonly 14). +// +// Description +// Computes the single‐output RSI over the series. Returns an +// unnamed numeric vector of length n, padded with NA_REAL. + +#include "lib.h" +#include +#include +#include + +SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod) +{ + int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + int period = INTEGER(optTimePeriod)[0]; + + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *rsi = REAL(result); + + int outBeg, outNb; + TA_RetCode ret = TA_RSI(0, n-1, src, + period, &outBeg, &outNb, rsi + outBeg); + + for(int i = 0; i < outBeg; ++i) + rsi[i] = NA_REAL; + for(int i = outBeg + outNb; i < n; ++i) + rsi[i] = NA_REAL; + + UNPROTECT(1); + return result; +} From 11ae0c76fd2196abd39e09866d56ae36d1fc25d3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:00:24 +0200 Subject: [PATCH 017/166] :hammer: Updated Functions --- Makefile | 2 +- NAMESPACE | 9 +++- R/bollinger_bands.R | 16 ------ R/moving_average_convergence_divergence.R | 22 -------- R/ta_ACCBANDS.R | 34 ++++++++++++ R/ta_AROON.R | 33 +++++++++--- R/ta_AROONOSC.R | 30 +++++++++++ R/ta_BBANDS.R | 34 ++++++++++++ R/ta_MACD.R | 56 ++++++++++++++++++++ R/ta_RSI.R | 32 +++++++++++ R/utils.R | 8 +++ man/acceleration_bands.Rd | 11 ++++ man/aroon.Rd | 11 ++++ man/aroon_oscillator.Rd | 11 ++++ man/bollinger_bands.Rd | 9 ++-- man/moving_average_convergence_divergence.Rd | 2 +- man/relative_strength_index.Rd | 11 ++++ src/api.h | 5 ++ src/init.c | 5 ++ src/ta_RSI.c | 10 +++- 20 files changed, 296 insertions(+), 55 deletions(-) delete mode 100644 R/bollinger_bands.R delete mode 100644 R/moving_average_convergence_divergence.R create mode 100644 R/ta_ACCBANDS.R create mode 100644 R/ta_AROONOSC.R create mode 100644 R/ta_BBANDS.R create mode 100644 R/ta_MACD.R create mode 100644 R/ta_RSI.R create mode 100644 man/acceleration_bands.Rd create mode 100644 man/aroon.Rd create mode 100644 man/aroon_oscillator.Rd create mode 100644 man/relative_strength_index.Rd diff --git a/Makefile b/Makefile index 344b9da89..12a05c8a3 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ build: ## Build the R package @Rscript -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD INSTALL $(tarball_location) -check: +check: ## Check the R package @Rscript -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD check $(tarball_location) diff --git a/NAMESPACE b/NAMESPACE index 44e322266..361c38c1e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,12 +1,18 @@ # Generated by roxygen2: do not edit by hand +S3method(acceleration_bands,default) +S3method(aroon,default) +S3method(aroon_oscillator,default) S3method(average_price,default) +S3method(bollinger_bands,default) S3method(median_price,default) S3method(midpoint_price,default) S3method(moving_average_convergence_divergence,default) +S3method(relative_strength_index,default) S3method(three_black_crows,default) +export(acceleration_bands) export(aroon) -export(aroonosc) +export(aroon_oscillator) export(average_price) export(bollinger_bands) export(commodity_channel_index) @@ -14,6 +20,7 @@ export(kaufman_adaptive_moving_average) export(median_price) export(midpoint_price) export(moving_average_convergence_divergence) +export(relative_strength_index) export(three_black_crows) export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/bollinger_bands.R b/R/bollinger_bands.R deleted file mode 100644 index 723529487..000000000 --- a/R/bollinger_bands.R +++ /dev/null @@ -1,16 +0,0 @@ -#' @title Bollinger Bands -#' -#' @description -#' Calculate Bollinger Bands -#' -#' @param x an object -#' -#' @export -bollinger_bands <- function(a, b, c, d, e) { - .Call("c_bollinger_bands", - as.numeric(a), - as.integer(b), - as.numeric(c), - as.numeric(d), - e) -} \ No newline at end of file diff --git a/R/moving_average_convergence_divergence.R b/R/moving_average_convergence_divergence.R deleted file mode 100644 index 28adbea68..000000000 --- a/R/moving_average_convergence_divergence.R +++ /dev/null @@ -1,22 +0,0 @@ -#' @title NULL -#' @usage NULL -#' -#' @template description -#' -#' @templateVar .title Moving Average Convergence/Divergence -#' @templateVar .type multivariate -#' @templateVar .fun moving_average_convergence_divergence -#' @templateVar .author Serkan Korkmaz -#' -#' @returns Something -#' @export -moving_average_convergence_divergence <- function(x, fast = 12L, slow = 26L, signal = 9L, ...) { - UseMethod( - generic = "moving_average_convergence_divergence" - ) -} - -#' @export -moving_average_convergence_divergence.default <- function(x, fast = 12L, slow = 26L, signal = 9L, ...) { - .Call("c_moving_average_convergence_divergence", as.numeric(x), as.integer(fast), as.integer(slow), as.integer(signal)) -} \ No newline at end of file diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R new file mode 100644 index 000000000..f8602595a --- /dev/null +++ b/R/ta_ACCBANDS.R @@ -0,0 +1,34 @@ +#' @title Acceleration Bands +#' @export +acceleration_bands <- function(x, n = 10, ...) { + UseMethod( + genberic = "acceleration_bands" + ) +} + +#' @export +acceleration_bands.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)); assert(n >= 2); + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( + .NAME = "impl_ta_ACCBANDS", + .high(x), + .low(x), + .close(x), + as.integer(n) + ) +} \ No newline at end of file diff --git a/R/ta_AROON.R b/R/ta_AROON.R index 28648727d..9d6ea24e4 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -1,9 +1,30 @@ +#' @title Aroon #' @export -aroon <- function(x, n) { - .Call("impl_ta_AROON",x[,2], x[,3], as.integer(n)) -} +aroon <- function(x, n, ...) { + UseMethod( + generic = "aroon" + ) +} #' @export -aroonosc <- function(x, n) { - .Call("impl_ta_AROONOSC",x[,2], x[,3], as.integer(n)) -} \ No newline at end of file +aroon.default <- function(x, n, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)) + + ## 1) pass `x` assuming that + ## it follows Open (x[,1]), High (x[,2]) + ## Low (x[,3]) and Close (x[,4]) + .Call("impl_ta_AROON",.high(x), .low(x), as.integer(n)) +} + diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R new file mode 100644 index 000000000..888a87202 --- /dev/null +++ b/R/ta_AROONOSC.R @@ -0,0 +1,30 @@ +#' @title Aroon Oscillator +#' @export +aroon_oscillator <- function(x, n, ...) { + UseMethod( + generic = "aroon_oscillator" + ) +} + +#' @export +aroon_oscillator.default <- function(x, n, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)) + + ## 1) pass `x` assuming that + ## it follows Open (x[,1]), High (x[,2]) + ## Low (x[,3]) and Close (x[,4]) + + .Call("impl_ta_AROONOSC",.high(x), .low(x), as.integer(n)) +} \ No newline at end of file diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R new file mode 100644 index 000000000..4358c344d --- /dev/null +++ b/R/ta_BBANDS.R @@ -0,0 +1,34 @@ +#' @title Bollinger Bands +#' @export +bollinger_bands <- function(x, n = 10, ...) { + UseMethod( + generic = "bollinger_bands" + ) +} + +#' @export +bollinger_bands.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)); assert(n >= 2); + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( + .NAME = "impl_ta_BBANDS", + .high(x), + .low(x), + .close(x), + as.integer(n) + ) +} \ No newline at end of file diff --git a/R/ta_MACD.R b/R/ta_MACD.R new file mode 100644 index 000000000..677091f10 --- /dev/null +++ b/R/ta_MACD.R @@ -0,0 +1,56 @@ +#' @title NULL +#' @usage NULL +#' +#' @template description +#' +#' @templateVar .title Moving Average Convergence/Divergence +#' @templateVar .type multivariate +#' @templateVar .fun moving_average_convergence_divergence +#' @templateVar .author Serkan Korkmaz +#' +#' @returns Something +#' @export +moving_average_convergence_divergence <- function( + x, + fast = 12, + slow = 26, + signal = 9, + ...) { + + UseMethod( + generic = "moving_average_convergence_divergence" + ) +} + +#' @export +moving_average_convergence_divergence.default <- function( + x, + fast = 12, + slow = 26, + signal = 9, + ...) { + + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(fast >= 2); + assert(slow >= 2); assert(signal >= 1); + + .Call( + .NAME = "impl_ta_MACD", + x, + as.integer(fast), + as.integer(slow), + as.integer(signal) + ) +} \ No newline at end of file diff --git a/R/ta_RSI.R b/R/ta_RSI.R new file mode 100644 index 000000000..2880dad60 --- /dev/null +++ b/R/ta_RSI.R @@ -0,0 +1,32 @@ +#' @title Relative Strength Index +#' @export +relative_strength_index <- function(x, n, ...) { + UseMethod( + "relative_strength_index" + ) +} + +#' @export +relative_strength_index.default <- function(x, n, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + .NAME = "impl_ta_RSI", + x, + as.integer(n) + ) +} \ No newline at end of file diff --git a/R/utils.R b/R/utils.R index 689278eaa..e212c46e2 100644 --- a/R/utils.R +++ b/R/utils.R @@ -4,3 +4,11 @@ assert <- function(exprs) { substitute(stopifnot(exprs = exprs)) ) } + + +## extractors +.open <- function(x) {x[,1]} +.high <- function(x) {x[,2]} +.low <- function(x) {x[,3]} +.close <- function(x) {x[,4]} +.volume <- function(x) {x[,5]} diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd new file mode 100644 index 000000000..f700a21d1 --- /dev/null +++ b/man/acceleration_bands.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_ACCBANDS.R +\name{acceleration_bands} +\alias{acceleration_bands} +\title{Acceleration Bands} +\usage{ +acceleration_bands(x, n, ...) +} +\description{ +Acceleration Bands +} diff --git a/man/aroon.Rd b/man/aroon.Rd new file mode 100644 index 000000000..edde79660 --- /dev/null +++ b/man/aroon.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_AROON.R +\name{aroon} +\alias{aroon} +\title{Aroon} +\usage{ +aroon(x, n, ...) +} +\description{ +Aroon +} diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd new file mode 100644 index 000000000..c4b4750ba --- /dev/null +++ b/man/aroon_oscillator.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_AROONOSC.R +\name{aroon_oscillator} +\alias{aroon_oscillator} +\title{Aroon Oscillator} +\usage{ +aroon_oscillator(x, n, ...) +} +\description{ +Aroon Oscillator +} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index f40d4619f..7aeed3fb4 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -1,14 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bollinger_bands.R +% Please edit documentation in R/ta_BBANDS.R \name{bollinger_bands} \alias{bollinger_bands} \title{Bollinger Bands} \usage{ -bollinger_bands(a, b, c, d, e) -} -\arguments{ -\item{x}{an object} +bollinger_bands(x, n = 10, ...) } \description{ -Calculate Bollinger Bands +Bollinger Bands } diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index c8394151a..19efd2acf 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/moving_average_convergence_divergence.R +% Please edit documentation in R/ta_MACD.R \name{moving_average_convergence_divergence} \alias{moving_average_convergence_divergence} \title{Moving Average Convergence/Divergence} diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd new file mode 100644 index 000000000..ab6f959fa --- /dev/null +++ b/man/relative_strength_index.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_RSI.R +\name{relative_strength_index} +\alias{relative_strength_index} +\title{Relative Strength Index} +\usage{ +relative_strength_index(x, n, ...) +} +\description{ +Relative Strength Index +} diff --git a/src/api.h b/src/api.h index 7037c8179..de7627539 100644 --- a/src/api.h +++ b/src/api.h @@ -11,8 +11,13 @@ SEXP c_median_price(const SEXP x); SEXP c_moving_average_convergence_divergence(SEXP x, SEXP fastPeriod, SEXP slowPeriod, SEXP signalPeriod); SEXP c_weighted_moving_average(const SEXP x, const SEXP lag); SEXP impl_MIDPRICE(const SEXP x, const SEXP n); +SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); +SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_TA_AVGPRICE(const SEXP x); +SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); +SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); +SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); #endif diff --git a/src/init.c b/src/init.c index 02d201278..6be298b7a 100644 --- a/src/init.c +++ b/src/init.c @@ -15,8 +15,13 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(c_moving_average_convergence_divergence, 4), CALLDEF(c_weighted_moving_average, 2), CALLDEF(impl_MIDPRICE, 2), + CALLDEF(impl_ta_ACCBANDS, 4), + CALLDEF(impl_ta_APO, 4), CALLDEF(impl_ta_AROONOSC, 3), CALLDEF(impl_ta_AROON, 3), CALLDEF(impl_TA_AVGPRICE, 1), + CALLDEF(impl_ta_BBANDS, 5), + CALLDEF(impl_ta_MACD, 4), + CALLDEF(impl_ta_RSI, 2), {NULL, NULL, 0} }; diff --git a/src/ta_RSI.c b/src/ta_RSI.c index 17ec1148e..5613218ec 100644 --- a/src/ta_RSI.c +++ b/src/ta_RSI.c @@ -23,8 +23,14 @@ SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod) double *rsi = REAL(result); int outBeg, outNb; - TA_RetCode ret = TA_RSI(0, n-1, src, - period, &outBeg, &outNb, rsi + outBeg); + TA_RetCode ret = TA_RSI( + 0, + n-1, + src, + period, + &outBeg, + &outNb, + rsi); for(int i = 0; i < outBeg; ++i) rsi[i] = NA_REAL; From 95d28ee8a6b88ed16c59f5dd0768f13c11149025 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:13:38 +0200 Subject: [PATCH 018/166] :fire: New features --- src/ta_STOCH.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ src/ta_STOCHF.c | 67 ++++++++++++++++++++++++++++++++++++++++++ src/ta_STOCHRSI.c | 68 +++++++++++++++++++++++++++++++++++++++++++ src/ta_ULTOSC.c | 63 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 272 insertions(+) create mode 100644 src/ta_STOCH.c create mode 100644 src/ta_STOCHF.c create mode 100644 src/ta_STOCHRSI.c create mode 100644 src/ta_ULTOSC.c diff --git a/src/ta_STOCH.c b/src/ta_STOCH.c new file mode 100644 index 000000000..9c60c2853 --- /dev/null +++ b/src/ta_STOCH.c @@ -0,0 +1,74 @@ +// Interface to ta_STOCH.c (Slow Stochastic) +// +// Parameters +// high – numeric vector of 'High' prices +// low – numeric vector of 'Low' prices +// close – numeric vector of 'Close' prices +// fastk_period – integer lookback for %K +// slowk_period – integer smoothing for %K +// slowk_matype – integer MA type for %K +// slowd_period – integer lookback for %D +// slowd_matype – integer MA type for %D +// +// Description +// Returns an N×2 matrix with columns 'slowk' and 'slowd', NA-filled +// for initial lookback. +#include "lib.h" +#include +#include +#include "ta_libc.h" + +SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, + SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, + SEXP slowd_period, SEXP slowd_matype) { + int pCount = 0; + high = PROTECT(coerceVector(high, REALSXP)); pCount++; + low = PROTECT(coerceVector(low, REALSXP)); pCount++; + close = PROTECT(coerceVector(close, REALSXP)); pCount++; + fastk_period = PROTECT(coerceVector(fastk_period, INTSXP));pCount++; + slowk_period = PROTECT(coerceVector(slowk_period, INTSXP));pCount++; + slowk_matype = PROTECT(coerceVector(slowk_matype, INTSXP));pCount++; + slowd_period = PROTECT(coerceVector(slowd_period, INTSXP));pCount++; + slowd_matype = PROTECT(coerceVector(slowd_matype, INTSXP));pCount++; + + int n = length(high); + const double * __restrict__ inHigh = REAL(high); + const double * __restrict__ inLow = REAL(low); + const double * __restrict__ inClose = REAL(close); + int kP = INTEGER(fastk_period)[0]; + int sk = INTEGER(slowk_period)[0]; + int sm = INTEGER(slowk_matype)[0]; + int dP = INTEGER(slowd_period)[0]; + int dm = INTEGER(slowd_matype)[0]; + + int outBeg, outNB; + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); pCount++; + double * __restrict__ mat = REAL(result); + double * __restrict__ outSlowK = mat; + double * __restrict__ outSlowD = mat + n; + + TA_RetCode ret = TA_STOCH(0, n - 1, + inHigh, inLow, inClose, + kP, sk, sm, dP, dm, + &outBeg, &outNB, + outSlowK + outBeg, + outSlowD + outBeg); + if (ret != TA_SUCCESS) { + UNPROTECT(pCount); + error("TA_STOCH failed: return code %d", ret); + } + for (register int i = 0; i < outBeg; ++i) { + outSlowK[i] = NA_REAL; + outSlowD[i] = NA_REAL; + } + SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; + SET_STRING_ELT(colnames, 0, mkChar("slowk")); + SET_STRING_ELT(colnames, 1, mkChar("slowd")); + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, colnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(pCount); + return result; +} \ No newline at end of file diff --git a/src/ta_STOCHF.c b/src/ta_STOCHF.c new file mode 100644 index 000000000..84632dbe4 --- /dev/null +++ b/src/ta_STOCHF.c @@ -0,0 +1,67 @@ +// Interface to ta_STOCHF.c (Fast Stochastic) +// +// Parameters +// high – numeric vector of 'High' prices +// low – numeric vector of 'Low' prices +// close – numeric vector of 'Close' prices +// fastk_period – integer lookback for %K +// fastd_period – integer lookback for %D +// fastd_matype – integer MA type for %D +// +// Description +// Returns an N×2 matrix with columns 'fastk' and 'fastd', NA-filled +// for initial lookback. +#include "lib.h" +#include +#include +#include "ta_libc.h" + +SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, + SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype) { + int pCount = 0; + high = PROTECT(coerceVector(high, REALSXP)); pCount++; + low = PROTECT(coerceVector(low, REALSXP)); pCount++; + close = PROTECT(coerceVector(close, REALSXP)); pCount++; + fastk_period = PROTECT(coerceVector(fastk_period, INTSXP));pCount++; + fastd_period = PROTECT(coerceVector(fastd_period, INTSXP));pCount++; + fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP));pCount++; + + int n = length(high); + const double * __restrict__ inHigh = REAL(high); + const double * __restrict__ inLow = REAL(low); + const double * __restrict__ inClose = REAL(close); + int kP = INTEGER(fastk_period)[0]; + int dP = INTEGER(fastd_period)[0]; + int dm = INTEGER(fastd_matype)[0]; + + int outBeg, outNB; + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); pCount++; + double * __restrict__ mat = REAL(result); + double * __restrict__ outFastK = mat; + double * __restrict__ outFastD = mat + n; + + TA_RetCode ret = TA_STOCHF(0, n - 1, + inHigh, inLow, inClose, + kP, dP, dm, + &outBeg, &outNB, + outFastK + outBeg, + outFastD + outBeg); + if (ret != TA_SUCCESS) { + UNPROTECT(pCount); + error("TA_STOCHF failed: return code %d", ret); + } + for (register int i = 0; i < outBeg; ++i) { + outFastK[i] = NA_REAL; + outFastD[i] = NA_REAL; + } + SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; + SET_STRING_ELT(colnames, 0, mkChar("fastk")); + SET_STRING_ELT(colnames, 1, mkChar("fastd")); + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, colnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(pCount); + return result; +} diff --git a/src/ta_STOCHRSI.c b/src/ta_STOCHRSI.c new file mode 100644 index 000000000..be0958b06 --- /dev/null +++ b/src/ta_STOCHRSI.c @@ -0,0 +1,68 @@ +// Interface to ta_STOCHRSI.c (Stochastic RSI) +// +// Parameters +// real – numeric vector of RSI values +// timeperiod – integer lookback for RSI calculation +// fastk_period – integer period for %K of StochRSI +// fastd_period – integer period for %D smoothing +// fastd_matype – integer MA type for %D smoothing +// +// Description +// Returns an N×2 matrix with columns 'fastk' and 'fastd', both +// of the same length as input, with NA for initial lookback. +#include "lib.h" +#include +#include +#include "ta_libc.h" + +SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, + SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype) { + int pCount = 0; + real = PROTECT(coerceVector(real, REALSXP)); pCount++; + timeperiod = PROTECT(coerceVector(timeperiod, INTSXP)); pCount++; + fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); pCount++; + fastd_period = PROTECT(coerceVector(fastd_period, INTSXP)); pCount++; + fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP)); pCount++; + + int n = length(real); + const double * __restrict__ inReal = REAL(real); + int tp = INTEGER(timeperiod)[0]; + int kP = INTEGER(fastk_period)[0]; + int dP = INTEGER(fastd_period)[0]; + int dM = INTEGER(fastd_matype)[0]; + + int outBeg, outNB; + // Allocate matrix N×2 + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); pCount++; + double * __restrict__ mat = REAL(result); + // Column pointers + double * __restrict__ outFastK = mat; + double * __restrict__ outFastD = mat + n; + + TA_RetCode ret = TA_STOCHRSI(0, n - 1, + inReal, tp, + kP, dP, dM, + &outBeg, &outNB, + outFastK + outBeg, + outFastD + outBeg); + if (ret != TA_SUCCESS) { + UNPROTECT(pCount); + error("TA_STOCHRSI failed: return code %d", ret); + } + // Fill initial lookback rows with NA + for (register int i = 0; i < outBeg; ++i) { + outFastK[i] = NA_REAL; + outFastD[i] = NA_REAL; + } + // Set column names + SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; + SET_STRING_ELT(colnames, 0, mkChar("fastk")); + SET_STRING_ELT(colnames, 1, mkChar("fastd")); + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, colnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(pCount); + return result; +} \ No newline at end of file diff --git a/src/ta_ULTOSC.c b/src/ta_ULTOSC.c new file mode 100644 index 000000000..e18c56b59 --- /dev/null +++ b/src/ta_ULTOSC.c @@ -0,0 +1,63 @@ +// Interface to ta_ULTOSC.c (Ultimate Oscillator) +// +// Parameters +// high – numeric vector of 'High' prices +// low – numeric vector of 'Low' prices +// close – numeric vector of 'Close' prices +// timeperiod1 – integer SEXP for first lookback (e.g. 7) +// timeperiod2 – integer SEXP for second lookback (e.g. 14) +// timeperiod3 – integer SEXP for third lookback (e.g. 28) +// +// Description +// Returns a numeric vector of the same length as inputs containing +// the Ultimate Oscillator, with NA for indices before the lookback. +#include "lib.h" +#include +#include +#include "ta_libc.h" + +SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, + SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3) { + int pCount = 0; + // Coerce inputs to REALSXP/INTSXP and protect + high = PROTECT(coerceVector(high, REALSXP)); pCount++; + low = PROTECT(coerceVector(low, REALSXP)); pCount++; + close = PROTECT(coerceVector(close, REALSXP)); pCount++; + timeperiod1 = PROTECT(coerceVector(timeperiod1, INTSXP)); pCount++; + timeperiod2 = PROTECT(coerceVector(timeperiod2, INTSXP)); pCount++; + timeperiod3 = PROTECT(coerceVector(timeperiod3, INTSXP)); pCount++; + + int n = length(high); + // Extract C pointers with restrict qualifier for speed + const double * __restrict__ inHigh = REAL(high); + const double * __restrict__ inLow = REAL(low); + const double * __restrict__ inClose = REAL(close); + int p1 = INTEGER(timeperiod1)[0]; + int p2 = INTEGER(timeperiod2)[0]; + int p3 = INTEGER(timeperiod3)[0]; + + int outBeg, outNB; + // Allocate output vector of full length + SEXP result = PROTECT(allocVector(REALSXP, n)); pCount++; + double * __restrict__ out = REAL(result); + + // Call TA-Lib function + TA_RetCode ret = TA_ULTOSC(0, n - 1, + inHigh, inLow, inClose, + p1, p2, p3, + &outBeg, &outNB, + out + outBeg); + if (ret != TA_SUCCESS) { + UNPROTECT(pCount); + error("TA_ULTOSC failed: return code %d", ret); + } + // Fill initial lookback positions with NA + for (register int i = 0; i < outBeg; ++i) + out[i] = NA_REAL; + + UNPROTECT(pCount); + return result; +} + + + From a4d90524e5807ef3d75e88c9b57651c136335282 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:17:10 +0200 Subject: [PATCH 019/166] :hammer: Reworked Library It is now more in line with TA-lib, TTR and R --- Makefile | 7 +- NAMESPACE | 44 ++++- R/average_price.R | 50 ----- R/cdl3blackcrows.R | 40 ---- R/commodity_channel_index.R | 11 -- R/kama.R | 8 - R/median_price.R | 33 ---- R/ta_MA.R | 206 ++++++++++++++++++++ R/ta_MIDPRICE.R | 33 ---- R/ta_STOCH.R | 32 +++ R/ta_STOCHF.R | 28 +++ R/ta_STOCHRSI.R | 27 +++ R/ta_ULTOSC.R | 39 ++++ R/utils.R | 29 +++ R/weighted_moving_average.R | 6 - man/acceleration_bands.Rd | 2 +- man/average_price.Rd | 39 ---- man/commodity_channel_index.Rd | 14 -- man/double_exponential_moving_average.Rd | 11 ++ man/exponential_moving_average.Rd | 11 ++ man/fast_stochastic.Rd | 11 ++ man/kaufman_adaptive_moving_average.Rd | 8 +- man/median_price.Rd | 23 --- man/mesa_adaptive_moving_average.Rd | 11 ++ man/midpoint_price.Rd | 23 --- man/simple_moving_average.Rd | 11 ++ man/stochastic.Rd | 11 ++ man/stochastic_relative_strength_index.Rd | 17 ++ man/t3_moving_average.Rd | 11 ++ man/three_black_crows.Rd | 23 --- man/triangular_moving_average.Rd | 11 ++ man/triple_exponential_moving_average.Rd | 11 ++ man/ultimate_oscillator.Rd | 11 ++ man/weighted_moving_average.Rd | 8 +- src/api.h | 13 +- src/bollinger_bands.c | 139 ------------- src/cdl_three_black_crows.c | 50 ----- src/commodity_channel_index.c | 36 ---- src/init.c | 13 +- src/kaufman_adaptive_moving_average.c | 31 --- src/lib.h | 43 ++++ src/moving_average_convergence_divergence.c | 66 ------- src/ta_ACCBANDS.c | 67 +++---- src/ta_APO.c | 75 ++++--- src/ta_AROON.c | 87 ++++----- src/ta_AROONOSC.c | 71 ++++--- src/ta_AVGPRICE.c | 86 -------- src/ta_BBANDS.c | 72 ++++--- src/ta_MA.c | 63 ++++++ src/ta_MACD.c | 62 +++--- src/ta_MEDPRICE.c | 72 ------- src/ta_MIDPRICE.c | 72 ------- src/ta_RSI.c | 38 ++-- src/ta_STOCH.c | 107 ++++++---- src/ta_STOCHF.c | 97 ++++----- src/ta_STOCHRSI.c | 102 +++++----- src/ta_ULTOSC.c | 83 ++++---- 57 files changed, 1089 insertions(+), 1316 deletions(-) delete mode 100644 R/average_price.R delete mode 100644 R/cdl3blackcrows.R delete mode 100644 R/commodity_channel_index.R delete mode 100644 R/kama.R delete mode 100644 R/median_price.R create mode 100644 R/ta_MA.R delete mode 100644 R/ta_MIDPRICE.R create mode 100644 R/ta_STOCH.R create mode 100644 R/ta_STOCHF.R create mode 100644 R/ta_STOCHRSI.R create mode 100644 R/ta_ULTOSC.R delete mode 100644 R/weighted_moving_average.R delete mode 100644 man/average_price.Rd delete mode 100644 man/commodity_channel_index.Rd create mode 100644 man/double_exponential_moving_average.Rd create mode 100644 man/exponential_moving_average.Rd create mode 100644 man/fast_stochastic.Rd delete mode 100644 man/median_price.Rd create mode 100644 man/mesa_adaptive_moving_average.Rd delete mode 100644 man/midpoint_price.Rd create mode 100644 man/simple_moving_average.Rd create mode 100644 man/stochastic.Rd create mode 100644 man/stochastic_relative_strength_index.Rd create mode 100644 man/t3_moving_average.Rd delete mode 100644 man/three_black_crows.Rd create mode 100644 man/triangular_moving_average.Rd create mode 100644 man/triple_exponential_moving_average.Rd create mode 100644 man/ultimate_oscillator.Rd delete mode 100644 src/bollinger_bands.c delete mode 100644 src/cdl_three_black_crows.c delete mode 100644 src/commodity_channel_index.c delete mode 100644 src/kaufman_adaptive_moving_average.c delete mode 100644 src/moving_average_convergence_divergence.c delete mode 100644 src/ta_AVGPRICE.c create mode 100644 src/ta_MA.c delete mode 100644 src/ta_MEDPRICE.c delete mode 100644 src/ta_MIDPRICE.c diff --git a/Makefile b/Makefile index 12a05c8a3..ed7e65ea3 100644 --- a/Makefile +++ b/Makefile @@ -12,20 +12,21 @@ help: build: ## Build the R package @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c - @Rscript -e "devtools::document()" > /dev/null 2>&1 + @Rscript --verbose -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD INSTALL $(tarball_location) check: ## Check the R package - @Rscript -e "devtools::document()" > /dev/null 2>&1 + @Rscript --verbose -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD check $(tarball_location) test: ## Run tests - @Rscript -e "testthat::test_local()" + @Rscript --verbose -e "testthat::test_local()" clean: ## Remove artifacts @rm -rf src/*.o @rm -rf src/*.so @rm -rf $(tarball_location) + @rm -rf src/Makevars fmt: ## Formate code (change -style=$1 for other styleguides) @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h diff --git a/NAMESPACE b/NAMESPACE index 361c38c1e..c1f4535af 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -3,24 +3,50 @@ S3method(acceleration_bands,default) S3method(aroon,default) S3method(aroon_oscillator,default) -S3method(average_price,default) S3method(bollinger_bands,default) -S3method(median_price,default) -S3method(midpoint_price,default) +S3method(double_exponential_moving_average,default) +S3method(exponential_moving_average,default) +S3method(fast_stochastic,default) +S3method(kaufman_adaptive_moving_average,default) +S3method(mesa_adaptive_moving_average,default) S3method(moving_average_convergence_divergence,default) S3method(relative_strength_index,default) -S3method(three_black_crows,default) +S3method(simple_moving_average,default) +S3method(stochastic,default) +S3method(stochastic_relative_strength_index,default) +S3method(t3_moving_average,default) +S3method(triangular_moving_average,default) +S3method(triple_exponential_moving_average,default) +S3method(ultimate_oscillator,default) +S3method(weighted_moving_average,default) +export(DEMA) +export(EMA) +export(KAMA) +export(MAMA) +export(SMA) +export(STOCHF) +export(STOCHRSI) +export(T3) +export(TEMA) +export(TRIMA) +export(WMA) export(acceleration_bands) export(aroon) export(aroon_oscillator) -export(average_price) export(bollinger_bands) -export(commodity_channel_index) +export(double_exponential_moving_average) +export(exponential_moving_average) +export(fast_stochastic) export(kaufman_adaptive_moving_average) -export(median_price) -export(midpoint_price) +export(mesa_adaptive_moving_average) export(moving_average_convergence_divergence) export(relative_strength_index) -export(three_black_crows) +export(simple_moving_average) +export(stochastic) +export(stochastic_relative_strength_index) +export(t3_moving_average) +export(triangular_moving_average) +export(triple_exponential_moving_average) +export(ultimate_oscillator) export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/average_price.R b/R/average_price.R deleted file mode 100644 index 48cb44278..000000000 --- a/R/average_price.R +++ /dev/null @@ -1,50 +0,0 @@ -#' @title NULL -#' @usage NULL -#' -#' @template description -#' -#' @templateVar .title Average Price -#' @templateVar .type multivariate -#' @templateVar .fun average_price -#' @templateVar .author Serkan Korkmaz -#' -#' @param x An object coercible to [matrix]. -#' @param ... Arguments passed into other methods. -#' -#' ## Title -#' This function calculates the average price of -#' of a financial asset -#' -#' @returns -#' A [double]-vector of [lenght] N of average prices. -#' -#' @examples -#' ## calculate average -#' ## price -#' average_price(BTC) -#' -#' @export -average_price <- function(x, ...) { - UseMethod( - generic = "average_price" - ) -} - -#' @export -average_price.default <- function(x, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - x <- as.matrix(x); assert(is.numeric(x)) - - ## 1) pass `x` assuming that - ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) - .Call("impl_TA_AVGPRICE", x[,1:4]) -} \ No newline at end of file diff --git a/R/cdl3blackcrows.R b/R/cdl3blackcrows.R deleted file mode 100644 index ec847d202..000000000 --- a/R/cdl3blackcrows.R +++ /dev/null @@ -1,40 +0,0 @@ -#' @title NULL -#' @usage NULL -#' -#' @template description -#' -#' @templateVar .title Three Black Crows -#' @templateVar .type multivariate -#' @templateVar .fun three_black_crows -#' @templateVar .author Serkan Korkmaz -#' -#' @returns Something -#' -#' @export -three_black_crows <- function(x, ...) { - UseMethod( - generic = "three_black_crows" - ) -} - -#' @export -three_black_crows.default <- function(x, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - x <- as.matrix(x); assert(is.numeric(x)) - - .Call("c_cdl3blackcrows", - as.numeric(x[,1]), - as.numeric(x[,2]), - as.numeric(x[,3]), - as.numeric(x[,4])) -} - - diff --git a/R/commodity_channel_index.R b/R/commodity_channel_index.R deleted file mode 100644 index aa10eff3f..000000000 --- a/R/commodity_channel_index.R +++ /dev/null @@ -1,11 +0,0 @@ -#' @title Commodity Channel Index -#' -#' @description -#' -#' -#' @author Serkan Korkmaz -#' -#' @export -commodity_channel_index <- function(x, lag) { - .Call("c_commodity_channel_index", x[,2], x[,3], x[,4], as.integer(lag)) -} \ No newline at end of file diff --git a/R/kama.R b/R/kama.R deleted file mode 100644 index a25328af8..000000000 --- a/R/kama.R +++ /dev/null @@ -1,8 +0,0 @@ -#' @title Kaufman Adaptive Moving Average -#' -#' @description -#' -#' @export -kaufman_adaptive_moving_average <- function(x, lag) { - .Call("c_kaufman_adaptive_moving_average", x, as.integer(lag)) -} \ No newline at end of file diff --git a/R/median_price.R b/R/median_price.R deleted file mode 100644 index 11ee794d1..000000000 --- a/R/median_price.R +++ /dev/null @@ -1,33 +0,0 @@ -#' @title NULL -#' @usage NULL -#' -#' @template description -#' -#' @templateVar .title Median Price -#' @templateVar .type multivariate -#' @templateVar .fun median_price -#' @templateVar .author Serkan Korkmaz -#' -#' @returns Something -#' @export -median_price <- function(x, ...) { - UseMethod( - generic = "median_price" - ) -} - -#' @export -median_price.default <- function(x, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - x <- as.matrix(x); assert(is.numeric(x)) - - .Call("c_median_price", x[,1:4]) -} \ No newline at end of file diff --git a/R/ta_MA.R b/R/ta_MA.R new file mode 100644 index 000000000..bbec9a2f4 --- /dev/null +++ b/R/ta_MA.R @@ -0,0 +1,206 @@ +#' @title Simple Moving Average (SMA) +#' @export +simple_moving_average <- function(x, n, ...) { + UseMethod( + "simple_moving_average" + ) +} + +#' @export +simple_moving_average.default <- function(x, n, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) +} + +#' @export +SMA <- simple_moving_average + +#' @title Exponential Moving Average (EMA) +#' @export +exponential_moving_average <- function(x, n, ...) { + UseMethod( + "exponential_moving_average" + ) +} + +#' @export +exponential_moving_average.default <- function(x, n, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 1L + ) +} + +#' @export +EMA <- exponential_moving_average + +#' @title Weighted Moving Average (WMA) +#' @export +weighted_moving_average <- function(x, n, ...) { + UseMethod( + "weighted_moving_average" + ) +} + +#' @export +weighted_moving_average.default <- function(x, n, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 2L + ) +} + +#' @export +WMA <- weighted_moving_average + +#' @title Double Exponential Moving Average (DEMA) +#' @export +double_exponential_moving_average <- function(x, n, ...) { + UseMethod("double_exponential_moving_average") +} + +#' @export +double_exponential_moving_average.default <- function(x, n, ...) { + if (!is.null(dim(x))) stop("`x` must be a numeric vector") + assert(is.numeric(x)); assert(n >= 2) + .Call("impl_ta_MA", x, as.integer(n), 3L) +} + +#' @export +DEMA <- double_exponential_moving_average + +#' @title Triple Exponential Moving Average (TEMA) +#' @export +triple_exponential_moving_average <- function(x, n, ...) { + UseMethod("triple_exponential_moving_average") +} + +#' @export +triple_exponential_moving_average.default <- function(x, n, ...) { + if (!is.null(dim(x))) stop("`x` must be a numeric vector") + assert(is.numeric(x)); assert(n >= 2) + .Call("impl_ta_MA", x, as.integer(n), 4L) +} + +#' @export +TEMA <- triple_exponential_moving_average + +#' @title Triangular Moving Average (TRIMA) +#' @export +triangular_moving_average <- function(x, n, ...) { + UseMethod("triangular_moving_average") +} + +#' @export +triangular_moving_average.default <- function(x, n, ...) { + if (!is.null(dim(x))) stop("`x` must be a numeric vector") + assert(is.numeric(x)); assert(n >= 2) + .Call("impl_ta_MA", x, as.integer(n), 5L) +} + +#' @export +TRIMA <- triangular_moving_average + +#' @title Kaufman’s Adaptive Moving Average (KAMA) +#' @export +kaufman_adaptive_moving_average <- function(x, n, ...) { + UseMethod("kaufman_adaptive_moving_average") +} + +#' @export +kaufman_adaptive_moving_average.default <- function(x, n, ...) { + if (!is.null(dim(x))) stop("`x` must be a numeric vector") + assert(is.numeric(x)); assert(n >= 2) + .Call("impl_ta_MA", x, as.integer(n), 6L) +} + +#' @export +KAMA <- kaufman_adaptive_moving_average + +#' @title Mesa Adaptive Moving Average (MAMA) +#' @export +mesa_adaptive_moving_average <- function(x, n, ...) { + UseMethod("mesa_adaptive_moving_average") +} + +#' @export +mesa_adaptive_moving_average.default <- function(x, n, ...) { + if (!is.null(dim(x))) stop("`x` must be a numeric vector") + assert(is.numeric(x)); assert(n >= 2) + .Call("impl_ta_MA", x, as.integer(n), 7L) +} + +#' @export +MAMA <- mesa_adaptive_moving_average + +#' @title T3 Moving Average (T3) +#' @export +t3_moving_average <- function(x, n, ...) { + UseMethod("t3_moving_average") +} + +#' @export +t3_moving_average.default <- function(x, n, ...) { + if (!is.null(dim(x))) stop("`x` must be a numeric vector") + assert(is.numeric(x)); assert(n >= 2) + .Call("impl_ta_MA", x, as.integer(n), 8L) +} + +#' @export +T3 <- t3_moving_average \ No newline at end of file diff --git a/R/ta_MIDPRICE.R b/R/ta_MIDPRICE.R deleted file mode 100644 index a80d6c70a..000000000 --- a/R/ta_MIDPRICE.R +++ /dev/null @@ -1,33 +0,0 @@ -#' @title NULL -#' @usage NULL -#' -#' @template description -#' -#' @templateVar .title Midpoint Price -#' @templateVar .type multivariate -#' @templateVar .fun midpoint_price -#' @templateVar .author Serkan Korkmaz -#' -#' @returns Something -#' @export -midpoint_price <- function(x, n, ...) { - UseMethod( - generic = "midpoint_price" - ) -} - -#' @export -midpoint_price.default <- function(x, n, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - x <- as.matrix(x); assert(is.numeric(x)) - - .Call("impl_MIDPRICE", x[,1:4], as.integer(n)) -} \ No newline at end of file diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R new file mode 100644 index 000000000..972049b6f --- /dev/null +++ b/R/ta_STOCH.R @@ -0,0 +1,32 @@ +#' @title Stochastic +#' @export +stochastic <- function(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) { + UseMethod( + "stochastic" + ) +} + +#' @export +stochastic.default <- function( + x, + fastk, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ...) { + + slowk_ma <- map_maType_call(substitute(slowk)) + slowd_ma <- map_maType_call(substitute(slowd)) + + .Call( + "impl_ta_STOCH", + .high(x), + .low(x), + .close(x), + as.integer(fastk), # 4. optInFastK_Period + as.integer(slowk_ma$n), # 5. optInSlowK_Period + as.integer(slowk_ma$maType), # 6. optInSlowK_MAType + as.integer(slowd_ma$n), # 7. optInSlowD_Period + as.integer(slowd_ma$maType) # 8. optInSlowD_MAType + + ) +} \ No newline at end of file diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R new file mode 100644 index 000000000..55de670f6 --- /dev/null +++ b/R/ta_STOCHF.R @@ -0,0 +1,28 @@ +#' @title Fast Stochastic +#' @export +fast_stochastic <- function( + x, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + UseMethod( + "fast_stochastic" + ) +} + +#' @export +STOCHF <- fast_stochastic + +#' @export +fast_stochastic.default <- function( + x, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + + .Call( + "impl_ta_STOCHF", + .high(x), + .low(x), + .close(x), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) +} \ No newline at end of file diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R new file mode 100644 index 000000000..7581601a8 --- /dev/null +++ b/R/ta_STOCHRSI.R @@ -0,0 +1,27 @@ +#' @title Stochastic Relative Strength Index +#' @export +stochastic_relative_strength_index <- function( + x, n, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + UseMethod( + "stochastic_relative_strength_index" + ) +} + +#' @export +STOCHRSI <- stochastic_relative_strength_index + +#' @export +stochastic_relative_strength_index.default <- function( + x, n, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + + .Call( + "impl_ta_STOCHRSI", + x, + as.integer(n), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) +} \ No newline at end of file diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R new file mode 100644 index 000000000..d7768cf9b --- /dev/null +++ b/R/ta_ULTOSC.R @@ -0,0 +1,39 @@ +#' @title Ultimate Oscillator +#' @export +ultimate_oscillator <- function(x, n = c(7, 14, 28),...) { + UseMethod( + "ultimate_oscillator" + ) +} + +#' @export +ultimate_oscillator.default <- function(x, n = c(7, 14, 28),...) { + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + if (!length(n) < 3) { + stop("`n` has to be a vector of length 3") + } + assert(is.numeric(x)); assert(all(n >= 1)); + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( + .NAME = "impl_ta_ULTOSC", + .high(x), + .low(x), + .close(x), + as.integer(n[1]), + as.integer(n[2]), + as.integer(n[3]), + ) +} \ No newline at end of file diff --git a/R/utils.R b/R/utils.R index e212c46e2..95f4e2507 100644 --- a/R/utils.R +++ b/R/utils.R @@ -12,3 +12,32 @@ assert <- function(exprs) { .low <- function(x) {x[,3]} .close <- function(x) {x[,4]} .volume <- function(x) {x[,5]} + +## map MAs +map_maType_call <- function(call_expr) { + ## strip off the head and args + args <- as.list(call_expr)[-1L] + head_chr <- as.character(call_expr[[1L]]) + fun_name <- tail(head_chr, 1L) + + maType <- switch( + fun_name, + SMA = 0L, + EMA = 1L, + WMA = 2L, + DEMA = 3L, + TEMA = 4L, + TRIMA = 5L, + KAMA = 6L, + MAMA = 7L, + T3 = 8L, + stop(sprintf("Unknown MA type: %s", fun_name)) + ) + + n_val <- args[["n"]] + + list( + n = as.integer(n_val), + maType = maType + ) +} \ No newline at end of file diff --git a/R/weighted_moving_average.R b/R/weighted_moving_average.R deleted file mode 100644 index 579d44f28..000000000 --- a/R/weighted_moving_average.R +++ /dev/null @@ -1,6 +0,0 @@ -#' @title Weighted Moving Average -#' -#' @export -weighted_moving_average <- function(x, n) { - .Call("c_weighted_moving_average", as.numeric(x), as.integer(n)) -} \ No newline at end of file diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index f700a21d1..2bb6e417d 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -4,7 +4,7 @@ \alias{acceleration_bands} \title{Acceleration Bands} \usage{ -acceleration_bands(x, n, ...) +acceleration_bands(x, n = 10, ...) } \description{ Acceleration Bands diff --git a/man/average_price.Rd b/man/average_price.Rd deleted file mode 100644 index 1a8fc52eb..000000000 --- a/man/average_price.Rd +++ /dev/null @@ -1,39 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/average_price.R -\name{average_price} -\alias{average_price} -\title{Average Price} -\usage{ -## Generic default S3 method -## for Average Price -average_price(...) -} -\arguments{ -\item{x}{An object coercible to \link{matrix}.} - -\item{...}{Arguments passed into other methods. -\subsection{Title}{ - -This function calculates the average price of -of a financial asset -}} -} -\value{ -A \link{double}-vector of \link{lenght} N of average prices. -} -\description{ -A generic S3 function to compute the average price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). -} -\examples{ -## calculate average -## price -average_price(BTC) - -} -\author{ -Serkan Korkmaz -} -\concept{algorithmic trading} -\concept{finance} -\concept{technical analysis} -\concept{trading} diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd deleted file mode 100644 index 5b46168a1..000000000 --- a/man/commodity_channel_index.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/commodity_channel_index.R -\name{commodity_channel_index} -\alias{commodity_channel_index} -\title{Commodity Channel Index} -\usage{ -commodity_channel_index(x, lag) -} -\description{ -Commodity Channel Index -} -\author{ -Serkan Korkmaz -} diff --git a/man/double_exponential_moving_average.Rd b/man/double_exponential_moving_average.Rd new file mode 100644 index 000000000..5e9111628 --- /dev/null +++ b/man/double_exponential_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{double_exponential_moving_average} +\alias{double_exponential_moving_average} +\title{Double Exponential Moving Average (DEMA)} +\usage{ +double_exponential_moving_average(x, n, ...) +} +\description{ +Double Exponential Moving Average (DEMA) +} diff --git a/man/exponential_moving_average.Rd b/man/exponential_moving_average.Rd new file mode 100644 index 000000000..ad23063c3 --- /dev/null +++ b/man/exponential_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{exponential_moving_average} +\alias{exponential_moving_average} +\title{Exponential Moving Average (EMA)} +\usage{ +exponential_moving_average(x, n, ...) +} +\description{ +Exponential Moving Average (EMA) +} diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd new file mode 100644 index 000000000..8bbeb937f --- /dev/null +++ b/man/fast_stochastic.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_STOCHF.R +\name{fast_stochastic} +\alias{fast_stochastic} +\title{Fast Stochastic} +\usage{ +fast_stochastic(x, fast_k, fast_d_MAtype = SMA(n = 10), ...) +} +\description{ +Fast Stochastic +} diff --git a/man/kaufman_adaptive_moving_average.Rd b/man/kaufman_adaptive_moving_average.Rd index 75d3e82a6..1567c23c4 100644 --- a/man/kaufman_adaptive_moving_average.Rd +++ b/man/kaufman_adaptive_moving_average.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/kama.R +% Please edit documentation in R/ta_MA.R \name{kaufman_adaptive_moving_average} \alias{kaufman_adaptive_moving_average} -\title{Kaufman Adaptive Moving Average} +\title{Kaufman’s Adaptive Moving Average (KAMA)} \usage{ -kaufman_adaptive_moving_average(x, lag) +kaufman_adaptive_moving_average(x, n, ...) } \description{ -Kaufman Adaptive Moving Average +Kaufman’s Adaptive Moving Average (KAMA) } diff --git a/man/median_price.Rd b/man/median_price.Rd deleted file mode 100644 index 94dd4b7b8..000000000 --- a/man/median_price.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/median_price.R -\name{median_price} -\alias{median_price} -\title{Median Price} -\usage{ -## Generic default S3 method -## for Median Price -median_price(...) -} -\value{ -Something -} -\description{ -A generic S3 function to compute the median price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). -} -\author{ -Serkan Korkmaz -} -\concept{algorithmic trading} -\concept{finance} -\concept{technical analysis} -\concept{trading} diff --git a/man/mesa_adaptive_moving_average.Rd b/man/mesa_adaptive_moving_average.Rd new file mode 100644 index 000000000..2216defca --- /dev/null +++ b/man/mesa_adaptive_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{mesa_adaptive_moving_average} +\alias{mesa_adaptive_moving_average} +\title{Mesa Adaptive Moving Average (MAMA)} +\usage{ +mesa_adaptive_moving_average(x, n, ...) +} +\description{ +Mesa Adaptive Moving Average (MAMA) +} diff --git a/man/midpoint_price.Rd b/man/midpoint_price.Rd deleted file mode 100644 index 605204287..000000000 --- a/man/midpoint_price.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MIDPRICE.R -\name{midpoint_price} -\alias{midpoint_price} -\title{Midpoint Price} -\usage{ -## Generic default S3 method -## for Midpoint Price -midpoint_price(...) -} -\value{ -Something -} -\description{ -A generic S3 function to compute the midpoint price. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). -} -\author{ -Serkan Korkmaz -} -\concept{algorithmic trading} -\concept{finance} -\concept{technical analysis} -\concept{trading} diff --git a/man/simple_moving_average.Rd b/man/simple_moving_average.Rd new file mode 100644 index 000000000..7cff35ed3 --- /dev/null +++ b/man/simple_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{simple_moving_average} +\alias{simple_moving_average} +\title{Simple Moving Average (SMA)} +\usage{ +simple_moving_average(x, n, ...) +} +\description{ +Simple Moving Average (SMA) +} diff --git a/man/stochastic.Rd b/man/stochastic.Rd new file mode 100644 index 000000000..238afc561 --- /dev/null +++ b/man/stochastic.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_STOCH.R +\name{stochastic} +\alias{stochastic} +\title{Stochastic} +\usage{ +stochastic(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) +} +\description{ +Stochastic +} diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd new file mode 100644 index 000000000..7e85deff3 --- /dev/null +++ b/man/stochastic_relative_strength_index.Rd @@ -0,0 +1,17 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_STOCHRSI.R +\name{stochastic_relative_strength_index} +\alias{stochastic_relative_strength_index} +\title{Stochastic Relative Strength Index} +\usage{ +stochastic_relative_strength_index( + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... +) +} +\description{ +Stochastic Relative Strength Index +} diff --git a/man/t3_moving_average.Rd b/man/t3_moving_average.Rd new file mode 100644 index 000000000..92d8775d8 --- /dev/null +++ b/man/t3_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{t3_moving_average} +\alias{t3_moving_average} +\title{T3 Moving Average (T3)} +\usage{ +t3_moving_average(x, n, ...) +} +\description{ +T3 Moving Average (T3) +} diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd deleted file mode 100644 index 52751570d..000000000 --- a/man/three_black_crows.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cdl3blackcrows.R -\name{three_black_crows} -\alias{three_black_crows} -\title{Three Black Crows} -\usage{ -## Generic default S3 method -## for Three Black Crows -three_black_crows(...) -} -\value{ -Something -} -\description{ -A generic S3 function to compute the three black crows. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). -} -\author{ -Serkan Korkmaz -} -\concept{algorithmic trading} -\concept{finance} -\concept{technical analysis} -\concept{trading} diff --git a/man/triangular_moving_average.Rd b/man/triangular_moving_average.Rd new file mode 100644 index 000000000..103d7b44f --- /dev/null +++ b/man/triangular_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{triangular_moving_average} +\alias{triangular_moving_average} +\title{Triangular Moving Average (TRIMA)} +\usage{ +triangular_moving_average(x, n, ...) +} +\description{ +Triangular Moving Average (TRIMA) +} diff --git a/man/triple_exponential_moving_average.Rd b/man/triple_exponential_moving_average.Rd new file mode 100644 index 000000000..e7e3cdb78 --- /dev/null +++ b/man/triple_exponential_moving_average.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{triple_exponential_moving_average} +\alias{triple_exponential_moving_average} +\title{Triple Exponential Moving Average (TEMA)} +\usage{ +triple_exponential_moving_average(x, n, ...) +} +\description{ +Triple Exponential Moving Average (TEMA) +} diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd new file mode 100644 index 000000000..e98b86998 --- /dev/null +++ b/man/ultimate_oscillator.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_ULTOSC.R +\name{ultimate_oscillator} +\alias{ultimate_oscillator} +\title{Ultimate Oscillator} +\usage{ +ultimate_oscillator(x, n = c(7, 14, 28), ...) +} +\description{ +Ultimate Oscillator +} diff --git a/man/weighted_moving_average.Rd b/man/weighted_moving_average.Rd index 945033e68..f00b7ee83 100644 --- a/man/weighted_moving_average.Rd +++ b/man/weighted_moving_average.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/weighted_moving_average.R +% Please edit documentation in R/ta_MA.R \name{weighted_moving_average} \alias{weighted_moving_average} -\title{Weighted Moving Average} +\title{Weighted Moving Average (WMA)} \usage{ -weighted_moving_average(x, n) +weighted_moving_average(x, n, ...) } \description{ -Weighted Moving Average +Weighted Moving Average (WMA) } diff --git a/src/api.h b/src/api.h index de7627539..a69866c24 100644 --- a/src/api.h +++ b/src/api.h @@ -3,21 +3,18 @@ #include -SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, const SEXP nbDevDn, const SEXP maType); -SEXP c_cdl3blackcrows(const SEXP open, const SEXP high, const SEXP low, const SEXP close); -SEXP c_commodity_channel_index(const SEXP high, const SEXP low, const SEXP close, const SEXP period); -SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period); -SEXP c_median_price(const SEXP x); -SEXP c_moving_average_convergence_divergence(SEXP x, SEXP fastPeriod, SEXP slowPeriod, SEXP signalPeriod); SEXP c_weighted_moving_average(const SEXP x, const SEXP lag); -SEXP impl_MIDPRICE(const SEXP x, const SEXP n); SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); -SEXP impl_TA_AVGPRICE(const SEXP x); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); +SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); +SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); +SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); +SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype); +SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3); #endif diff --git a/src/bollinger_bands.c b/src/bollinger_bands.c deleted file mode 100644 index 8731c46f3..000000000 --- a/src/bollinger_bands.c +++ /dev/null @@ -1,139 +0,0 @@ -/* Bollinger Bands - * - */ -#include "lib.h" - -// .Call interface: x, timePeriod (int scalar or NA), nbDevUp (double or NA), -// nbDevDn, maType (string) -SEXP c_bollinger_bands(const SEXP x, const SEXP timePeriod, const SEXP nbDevUp, - const SEXP nbDevDn, const SEXP maType) { - - static int ta_initialized = 0; - if (!ta_initialized) { - if (TA_Initialize() != TA_SUCCESS) - error("TA_Initialize failed"); - ta_initialized = 1; - } - - if (!isReal(x)) - error("Input vector x must be numeric (double)."); - - int n = LENGTH(x); - double *inReal = REAL(x); - - // Parameters with defaults - int optInTimePeriod = 20; - double optInNbDevUp = 2.0; - double optInNbDevDn = 2.0; - TA_MAType optInMAType = TA_MAType_SMA; - - if (timePeriod != R_NilValue && isInteger(timePeriod) && - LENGTH(timePeriod) >= 1) { - int tp = INTEGER(timePeriod)[0]; - if (tp != NA_INTEGER) - optInTimePeriod = tp; - } else if (timePeriod != R_NilValue && isReal(timePeriod) && - LENGTH(timePeriod) >= 1) { - double tp_d = REAL(timePeriod)[0]; - if (!ISNA(tp_d)) - optInTimePeriod = (int)tp_d; - } - - if (nbDevUp != R_NilValue && isReal(nbDevUp) && LENGTH(nbDevUp) >= 1) { - double v = REAL(nbDevUp)[0]; - if (!ISNA(v)) - optInNbDevUp = v; - } - if (nbDevDn != R_NilValue && isReal(nbDevDn) && LENGTH(nbDevDn) >= 1) { - double v = REAL(nbDevDn)[0]; - if (!ISNA(v)) - optInNbDevDn = v; - } - - optInMAType = map_moving_average(maType); - - // Compute lookback - int lookback = TA_BBANDS_Lookback(optInTimePeriod, optInNbDevUp, optInNbDevDn, - optInMAType); - if (lookback < 0) - error("Invalid parameters for lookback."); - - // Allocate output vectors of length n (we will pad front with NA) - SEXP upper = PROTECT(allocVector(REALSXP, n)); - SEXP middle = PROTECT(allocVector(REALSXP, n)); - SEXP lower = PROTECT(allocVector(REALSXP, n)); - double *upper_p = REAL(upper); - double *middle_p = REAL(middle); - double *lower_p = REAL(lower); - - // Initialize output to NA - for (int i = 0; i < n; ++i) { - upper_p[i] = NA_REAL; - middle_p[i] = NA_REAL; - lower_p[i] = NA_REAL; - } - - // If not enough data, return early with all NAs and outNBElement=0 - if (n == 0 || n - 1 < lookback) { - SEXP outBegIdx = PROTECT(ScalarInteger(NA_INTEGER)); - SEXP outNBElement = PROTECT(ScalarInteger(0)); - SEXP res = PROTECT(allocVector(VECSXP, 5)); - SET_VECTOR_ELT(res, 0, upper); - SET_VECTOR_ELT(res, 1, middle); - SET_VECTOR_ELT(res, 2, lower); - SET_VECTOR_ELT(res, 3, outBegIdx); - SET_VECTOR_ELT(res, 4, outNBElement); - SEXP names = PROTECT(allocVector(STRSXP, 5)); - SET_STRING_ELT(names, 0, mkChar("upper")); - SET_STRING_ELT(names, 1, mkChar("middle")); - SET_STRING_ELT(names, 2, mkChar("lower")); - SET_STRING_ELT(names, 3, mkChar("outBegIdx")); - SET_STRING_ELT(names, 4, mkChar("outNBElement")); - setAttrib(res, R_NamesSymbol, names); - UNPROTECT(6); - return res; - } - - // Temporary buffers of size at least n (TA will only fill outNBElement - // entries) - int outBegIdx = 0; - int outNBElement = 0; - - TA_RetCode ret = TA_BBANDS( - 0, // startIdx - n - 1, // endIdx - inReal, optInTimePeriod, optInNbDevUp, optInNbDevDn, optInMAType, - &outBegIdx, &outNBElement, - upper_p + outBegIdx, // trick: TA writes starting at 0, so we copy later. - // Simpler to use temporary arrays. - middle_p + outBegIdx, lower_p + outBegIdx); - - if (ret != TA_SUCCESS) { - error("TA_BBANDS failed with code %d", ret); - } - - // Note: TA_BBANDS writes output starting from index 0 in its provided output - // arrays. We passed pointers offset by outBegIdx so valid data is already - // in-place. However TA_BBANDS expects output arrays big enough; we gave - // full-length with shift. - - // Prepare return list - SEXP outBegIdx_SEXP = PROTECT(ScalarInteger(outBegIdx)); - SEXP outNBElement_SEXP = PROTECT(ScalarInteger(outNBElement)); - SEXP res = PROTECT(allocVector(VECSXP, 5)); - SET_VECTOR_ELT(res, 0, upper); - SET_VECTOR_ELT(res, 1, middle); - SET_VECTOR_ELT(res, 2, lower); - SET_VECTOR_ELT(res, 3, outBegIdx_SEXP); - SET_VECTOR_ELT(res, 4, outNBElement_SEXP); - SEXP names = PROTECT(allocVector(STRSXP, 5)); - SET_STRING_ELT(names, 0, mkChar("upper")); - SET_STRING_ELT(names, 1, mkChar("middle")); - SET_STRING_ELT(names, 2, mkChar("lower")); - SET_STRING_ELT(names, 3, mkChar("outBegIdx")); - SET_STRING_ELT(names, 4, mkChar("outNBElement")); - setAttrib(res, R_NamesSymbol, names); - - UNPROTECT(6); - return res; -} \ No newline at end of file diff --git a/src/cdl_three_black_crows.c b/src/cdl_three_black_crows.c deleted file mode 100644 index faf7ffccc..000000000 --- a/src/cdl_three_black_crows.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "lib.h" - -SEXP c_cdl3blackcrows(const SEXP open, const SEXP high, const SEXP low, - const SEXP close) { - const int len = length(open); // assume all four are same length - const double *__restrict__ inOpen = REAL(open); - const double *__restrict__ inHigh = REAL(high); - const double *__restrict__ inLow = REAL(low); - const double *__restrict__ inClose = REAL(close); - - // Determine lookback so we know where the first output will land. - int lookback = TA_CDL3BLACKCROWS_Lookback(); // number of bars consumed before - // first output - - // Prepare result vector and initialize to NA_INTEGER for lookback/trailing. - SEXP ans = PROTECT(allocVector(INTSXP, len)); - int *ans_i = INTEGER(ans); - for (int i = 0; i < len; ++i) - ans_i[i] = NA_INTEGER; - - // If there is not enough data to produce any output, just return all-NA. - if (len <= lookback) { - UNPROTECT(1); - return ans; - } - - int outBegIdx = 0, outNBElement = 0; - - // Call TA-LIB starting at the lookback index so we already know outBegIdx == - // lookback. - TA_RetCode ret = TA_CDL3BLACKCROWS( - lookback, // startIdx - len - 1, // endIdx - inOpen, inHigh, inLow, inClose, &outBegIdx, &outNBElement, - /* output buffer pointed into the R vector to avoid copy: */ - ans_i + lookback // fills ans_i[lookback .. lookback+outNBElement-1] - ); - - // Sanity: if TA-LIB failed or produced nothing, leave ans as all NAs. - if (ret != TA_SUCCESS || outNBElement <= 0) { - UNPROTECT(1); - return ans; - } - - // (Optional) Could verify outBegIdx == lookback and outNBElement == (len - - // lookback), but we're skipping extra branching for speed per your directive. - - UNPROTECT(1); - return ans; -} \ No newline at end of file diff --git a/src/commodity_channel_index.c b/src/commodity_channel_index.c deleted file mode 100644 index 6ad220987..000000000 --- a/src/commodity_channel_index.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "lib.h" - -SEXP c_commodity_channel_index(const SEXP high, const SEXP low, - const SEXP close, const SEXP period) { - const int timePeriod = asInteger(period); - const int len = length(high); // assume low and close are same length - const double *__restrict__ h = REAL(high); - const double *__restrict__ l = REAL(low); - const double *__restrict__ c = REAL(close); - int outBegIdx = 0, outNBElement = 0; - - // TA-LIB output buffer (max size = len) - double *__restrict__ outReal = (double *)R_alloc((size_t)len, sizeof(double)); - - // Call TA-LIB CCI: startIdx=0, endIdx=len-1 - TA_RetCode ret = TA_CCI(0, len - 1, h, l, c, timePeriod, &outBegIdx, - &outNBElement, outReal); - - // Prepare full-length output with leading/trailing NA - SEXP ans = PROTECT(allocVector(REALSXP, len)); - double *ans_d = REAL(ans); - - // Default everything to NA first (covers error case and trailing) - for (int i = 0; i < len; ++i) - ans_d[i] = NA_REAL; - - if (ret == TA_SUCCESS && outNBElement > 0) { - // Leading NAs are already in place up to outBegIdx-1 - // Copy computed CCI values - memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - } - // else: leave as NA (failure or no output) - - UNPROTECT(1); - return ans; -} \ No newline at end of file diff --git a/src/init.c b/src/init.c index 6be298b7a..64f143384 100644 --- a/src/init.c +++ b/src/init.c @@ -7,21 +7,18 @@ #define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} static const R_CallMethodDef CallEntries[] = { - CALLDEF(c_bollinger_bands, 5), - CALLDEF(c_cdl3blackcrows, 4), - CALLDEF(c_commodity_channel_index, 4), - CALLDEF(c_kaufman_adaptive_moving_average, 2), - CALLDEF(c_median_price, 1), - CALLDEF(c_moving_average_convergence_divergence, 4), CALLDEF(c_weighted_moving_average, 2), - CALLDEF(impl_MIDPRICE, 2), CALLDEF(impl_ta_ACCBANDS, 4), CALLDEF(impl_ta_APO, 4), CALLDEF(impl_ta_AROONOSC, 3), CALLDEF(impl_ta_AROON, 3), - CALLDEF(impl_TA_AVGPRICE, 1), CALLDEF(impl_ta_BBANDS, 5), CALLDEF(impl_ta_MACD, 4), + CALLDEF(impl_ta_MA, 3), CALLDEF(impl_ta_RSI, 2), + CALLDEF(impl_ta_STOCHF, 6), + CALLDEF(impl_ta_STOCHRSI, 5), + CALLDEF(impl_ta_STOCH, 8), + CALLDEF(impl_ta_ULTOSC, 6), {NULL, NULL, 0} }; diff --git a/src/kaufman_adaptive_moving_average.c b/src/kaufman_adaptive_moving_average.c deleted file mode 100644 index 7340e2f62..000000000 --- a/src/kaufman_adaptive_moving_average.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "lib.h" - -SEXP c_kaufman_adaptive_moving_average(const SEXP x, const SEXP period) { - - // 0) parameters - const int window = asInteger(period); - const int len = length(x); - const double *__restrict__ inReal = REAL(x); - int outBegIdx = 0, outNBElement = 0; - - // TA-LIB output buffer (max size = len) - double *__restrict__ outReal = (double *)R_alloc((size_t)len, sizeof(double)); - - // Direct call to KAMA: startIdx=0, endIdx=len-1 - TA_RetCode ret = - TA_KAMA(0, len - 1, inReal, window, &outBegIdx, &outNBElement, outReal); - - // Prepare result vector with NAs - SEXP ans = PROTECT(allocVector(REALSXP, len)); - double *ans_d = REAL(ans); - for (int i = 0; i < len; ++i) // fill with NA (covers lookback and failure) - ans_d[i] = NA_REAL; - - if (ret == TA_SUCCESS && outNBElement > 0) { - // copy computed KAMA values at their proper offset - memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - } - - UNPROTECT(1); - return ans; -} \ No newline at end of file diff --git a/src/lib.h b/src/lib.h index 7473d13c0..fceb29462 100644 --- a/src/lib.h +++ b/src/lib.h @@ -70,4 +70,47 @@ static TA_MAType map_moving_average(const SEXP x) { return TA_MAType_SMA; } +// shift_array +// +// Description +// This function shifts arrays to the right +// and pads the array with leading NA_REAL +// +// +static void shift_array(double *arr, int len, int shift) { + // 0) edge-case: + // If the shift is greater than + // the length of the array, or the shift + // is lte 0, everything is NA. + // + // **NOTE:** this is highly unlikely but + // added just in case to avoid crashes. + // + // It could probably be a better idea just + // terminate the function instead. + if (shift <= 0 || shift >= len) { + for (int i = 0; i < len; ++i) { + arr[i] = NA_REAL; + } + return; + } + + // 1) shift the arrayy + // in place + memmove( + /*dest:*/ arr + shift, // NOTE: arr + shift advances pointer, ie. shifts + // the entire array in memory. So an array of + // {0,1,2} shifted with 1 does {garbage value, 1, + // 2}, a shift by 0 just returns the {0,1,2} array + /*src*/ arr, + /*n*/ (size_t)(len - shift) * sizeof(double)); + + // 2) add leading NAs + // as NA_REAL for + // type compatibility + for (int i = 0; i < shift; ++i) { + arr[i] = NA_REAL; + } +} + #endif // _LIB_H_ \ No newline at end of file diff --git a/src/moving_average_convergence_divergence.c b/src/moving_average_convergence_divergence.c deleted file mode 100644 index abf3024dc..000000000 --- a/src/moving_average_convergence_divergence.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "lib.h" - -SEXP c_moving_average_convergence_divergence(SEXP x, SEXP fastPeriod, - SEXP slowPeriod, - SEXP signalPeriod) { - const int fastP = asInteger(fastPeriod); - const int slowP = asInteger(slowPeriod); - const int signalP = asInteger(signalPeriod); - const int len = length(x); - const double *__restrict__ inReal = REAL(x); - - int outBegIdx = 0, outNBElement = 0; - - // TA-LIB output scratch buffers (max size len) - double *__restrict__ outMACD = (double *)R_alloc((size_t)len, sizeof(double)); - double *__restrict__ outSignal = - (double *)R_alloc((size_t)len, sizeof(double)); - double *__restrict__ outHistogram = - (double *)R_alloc((size_t)len, sizeof(double)); - - // Call TA-LIB MACD: full range - TA_RetCode ret = - TA_MACD(0, len - 1, inReal, fastP, slowP, signalP, &outBegIdx, - &outNBElement, outMACD, outSignal, outHistogram); - - // Prepare R output objects: three REALSXP vectors of length len - SEXP macd_vec = PROTECT(allocVector(REALSXP, len)); - SEXP signal_vec = PROTECT(allocVector(REALSXP, len)); - SEXP hist_vec = PROTECT(allocVector(REALSXP, len)); - - double *macd_d = REAL(macd_vec); - double *signal_d = REAL(signal_vec); - double *hist_d = REAL(hist_vec); - - // Initialize all to NA (covers lookback + error cases) - for (int i = 0; i < len; ++i) { - macd_d[i] = NA_REAL; - signal_d[i] = NA_REAL; - hist_d[i] = NA_REAL; - } - - if (ret == TA_SUCCESS && outNBElement > 0) { - // Copy computed outputs into place, respecting outBegIdx - memcpy(macd_d + outBegIdx, outMACD, (size_t)outNBElement * sizeof(double)); - memcpy(signal_d + outBegIdx, outSignal, - (size_t)outNBElement * sizeof(double)); - memcpy(hist_d + outBegIdx, outHistogram, - (size_t)outNBElement * sizeof(double)); - } - - // Bundle into a named list: list(macd=..., signal=..., hist=...) - SEXP ans = PROTECT(allocVector(VECSXP, 3)); - SET_VECTOR_ELT(ans, 0, macd_vec); - SET_VECTOR_ELT(ans, 1, signal_vec); - SET_VECTOR_ELT(ans, 2, hist_vec); - - // Set names - SEXP names = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(names, 0, mkChar("macd")); - SET_STRING_ELT(names, 1, mkChar("signal")); - SET_STRING_ELT(names, 2, mkChar("hist")); - setAttrib(ans, R_NamesSymbol, names); - - UNPROTECT(5); // macd_vec, signal_vec, hist_vec, ans, names - return ans; -} \ No newline at end of file diff --git a/src/ta_ACCBANDS.c b/src/ta_ACCBANDS.c index 1380d7e8f..92d87c695 100644 --- a/src/ta_ACCBANDS.c +++ b/src/ta_ACCBANDS.c @@ -17,45 +17,40 @@ #include SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, - SEXP optTimePeriod) -{ - int n = LENGTH(inHigh); // assume all three are same length - double *restrict highs = REAL(inHigh); // pointer to high prices - double *restrict lows = REAL(inLow); // pointer to low prices - double *restrict closes = REAL(inClose); // pointer to close prices - int period = INTEGER(optTimePeriod)[0]; // lookback period + SEXP optTimePeriod) { + int n = LENGTH(inHigh); // assume all three are same length + double *restrict highs = REAL(inHigh); // pointer to high prices + double *restrict lows = REAL(inLow); // pointer to low prices + double *restrict closes = REAL(inClose); // pointer to close prices + int period = INTEGER(optTimePeriod)[0]; // lookback period - // allocate result matrix: n rows × 3 cols - SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); - double *upper = REAL(result); // col 1 - double *middle = upper + n; // col 2 - double *lower = upper + 2*n; // col 3 + // allocate result matrix: n rows × 3 cols + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *upper = REAL(result); // col 1 + double *middle = upper + n; // col 2 + double *lower = upper + 2 * n; // col 3 - int outBeg, outNb; - TA_RetCode ret = TA_ACCBANDS(0, n-1, - highs, lows, closes, - period, - &outBeg, &outNb, - upper + outBeg, - middle + outBeg, - lower + outBeg); + int outBeg, outNb; + TA_RetCode ret = + TA_ACCBANDS(0, n - 1, highs, lows, closes, period, &outBeg, &outNb, + upper + outBeg, middle + outBeg, lower + outBeg); - // fill leading/trailing NAs for undefined ranges - for(int i = 0; i < outBeg; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; - for(int i = outBeg + outNb; i < n; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; + // fill leading/trailing NAs for undefined ranges + for (int i = 0; i < outBeg; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; + for (int i = outBeg + outNb; i < n; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; - // set column names to lowercase as requested - SEXP dims = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("upper")); - SET_STRING_ELT(cnames, 1, mkChar("middle")); - SET_STRING_ELT(cnames, 2, mkChar("lower")); - SET_VECTOR_ELT(dims, 0, R_NilValue); - SET_VECTOR_ELT(dims, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dims); + // set column names to lowercase as requested + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("upper")); + SET_STRING_ELT(cnames, 1, mkChar("middle")); + SET_STRING_ELT(cnames, 2, mkChar("lower")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dims); - UNPROTECT(3); - return result; + UNPROTECT(3); + return result; } diff --git a/src/ta_APO.c b/src/ta_APO.c index e75077279..6d564969b 100644 --- a/src/ta_APO.c +++ b/src/ta_APO.c @@ -15,48 +15,47 @@ #include #include -SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, - SEXP slowPeriodSEXP, SEXP maTypeSEXP) { - // Protect the output vector from garbage collection - R_xlen_t n = xlength(inRealSEXP); - int fastPeriod = asInteger(fastPeriodSEXP); - int slowPeriod = asInteger(slowPeriodSEXP); - int maType = asInteger(maTypeSEXP); +SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, + SEXP maTypeSEXP) { + // Protect the output vector from garbage collection + R_xlen_t n = xlength(inRealSEXP); + int fastPeriod = asInteger(fastPeriodSEXP); + int slowPeriod = asInteger(slowPeriodSEXP); + int maType = asInteger(maTypeSEXP); - // Allocate result vector - SEXP outRealSEXP = PROTECT(allocVector(REALSXP, n)); - double *restrict outReal = REAL(outRealSEXP); - const double *restrict inReal = REAL(inRealSEXP); + // Allocate result vector + SEXP outRealSEXP = PROTECT(allocVector(REALSXP, n)); + double *restrict outReal = REAL(outRealSEXP); + const double *restrict inReal = REAL(inRealSEXP); - // Call TA-Lib - int outBegIdx = 0, outNBElement = 0; - TA_RetCode ret = TA_APO( - 0, // start index - (int)n - 1, // end index - inReal, // input array - fastPeriod, // fast MA period - slowPeriod, // slow MA period - maType, // MA type - &outBegIdx, // first valid output index - &outNBElement, // number of elements computed - outReal // output array (length ≥ n) - ); - if (ret != TA_SUCCESS) { - UNPROTECT(1); - error("TA_APO failed with error code %d", ret); - } + // Call TA-Lib + int outBegIdx = 0, outNBElement = 0; + TA_RetCode ret = TA_APO(0, // start index + (int)n - 1, // end index + inReal, // input array + fastPeriod, // fast MA period + slowPeriod, // slow MA period + maType, // MA type + &outBegIdx, // first valid output index + &outNBElement, // number of elements computed + outReal // output array (length ≥ n) + ); + if (ret != TA_SUCCESS) { + UNPROTECT(1); + error("TA_APO failed with error code %d", ret); + } - // Initialize first outBegIdx values to NA - for (int i = 0; i < outBegIdx; ++i) - outReal[i] = NA_REAL; + // Initialize first outBegIdx values to NA + for (int i = 0; i < outBegIdx; ++i) + outReal[i] = NA_REAL; - // Shift valid outputs into place - memmove(outReal + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); + // Shift valid outputs into place + memmove(outReal + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - // Fill trailing values with NA - for (int i = outBegIdx + outNBElement; i < n; ++i) - outReal[i] = NA_REAL; + // Fill trailing values with NA + for (int i = outBegIdx + outNBElement; i < n; ++i) + outReal[i] = NA_REAL; - UNPROTECT(1); - return outRealSEXP; + UNPROTECT(1); + return outRealSEXP; } diff --git a/src/ta_AROON.c b/src/ta_AROON.c index 9a11ba551..e052b0eaf 100644 --- a/src/ta_AROON.c +++ b/src/ta_AROON.c @@ -15,58 +15,53 @@ #include SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { - R_xlen_t n = xlength(inHighSEXP); - if (xlength(inLowSEXP) != n) - error("inHigh and inLow must have the same length"); + R_xlen_t n = xlength(inHighSEXP); + if (xlength(inLowSEXP) != n) + error("inHigh and inLow must have the same length"); - int timePeriod = asInteger(timePeriodSEXP); - const double *restrict inHigh = REAL(inHighSEXP); - const double *restrict inLow = REAL(inLowSEXP); + int timePeriod = asInteger(timePeriodSEXP); + const double *restrict inHigh = REAL(inHighSEXP); + const double *restrict inLow = REAL(inLowSEXP); - // Allocate an n×2 matrix - SEXP outMat = PROTECT(allocMatrix(REALSXP, n, 2)); - double *restrict outDown = REAL(outMat); // column 0 - double *restrict outUp = REAL(outMat) + n; // column 1 + // Allocate an n×2 matrix + SEXP outMat = PROTECT(allocMatrix(REALSXP, n, 2)); + double *restrict outDown = REAL(outMat); // column 0 + double *restrict outUp = REAL(outMat) + n; // column 1 - // Set up dimnames for columns: lowercase names - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); - SET_VECTOR_ELT(dimnames, 0, R_NilValue); // no row names - SEXP colNames = PROTECT(allocVector(STRSXP, 2)); - SET_STRING_ELT(colNames, 0, mkChar("aroondown")); - SET_STRING_ELT(colNames, 1, mkChar("aroonup")); - SET_VECTOR_ELT(dimnames, 1, colNames); - setAttrib(outMat, R_DimNamesSymbol, dimnames); + // Set up dimnames for columns: lowercase names + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); + SET_VECTOR_ELT(dimnames, 0, R_NilValue); // no row names + SEXP colNames = PROTECT(allocVector(STRSXP, 2)); + SET_STRING_ELT(colNames, 0, mkChar("aroondown")); + SET_STRING_ELT(colNames, 1, mkChar("aroonup")); + SET_VECTOR_ELT(dimnames, 1, colNames); + setAttrib(outMat, R_DimNamesSymbol, dimnames); - // Call TA-Lib - int outBegIdx = 0, outNBElement = 0; - TA_RetCode ret = TA_AROON( - 0, (int)n - 1, - inHigh, inLow, - timePeriod, - &outBegIdx, &outNBElement, - outDown, outUp - ); - if (ret != TA_SUCCESS) { - UNPROTECT(3); - error("TA_AROON failed with error code %d", ret); - } + // Call TA-Lib + int outBegIdx = 0, outNBElement = 0; + TA_RetCode ret = TA_AROON(0, (int)n - 1, inHigh, inLow, timePeriod, + &outBegIdx, &outNBElement, outDown, outUp); + if (ret != TA_SUCCESS) { + UNPROTECT(3); + error("TA_AROON failed with error code %d", ret); + } - // Fill invalid leading positions with NA - for (int i = 0; i < outBegIdx; ++i) { - outDown[i] = NA_REAL; - outUp[i] = NA_REAL; - } + // Fill invalid leading positions with NA + for (int i = 0; i < outBegIdx; ++i) { + outDown[i] = NA_REAL; + outUp[i] = NA_REAL; + } - // Shift valid values into place - memmove(outDown + outBegIdx, outDown, (size_t)outNBElement * sizeof(double)); - memmove(outUp + outBegIdx, outUp, (size_t)outNBElement * sizeof(double)); + // Shift valid values into place + memmove(outDown + outBegIdx, outDown, (size_t)outNBElement * sizeof(double)); + memmove(outUp + outBegIdx, outUp, (size_t)outNBElement * sizeof(double)); - // Fill trailing positions with NA - for (int i = outBegIdx + outNBElement; i < n; ++i) { - outDown[i] = NA_REAL; - outUp[i] = NA_REAL; - } + // Fill trailing positions with NA + for (int i = outBegIdx + outNBElement; i < n; ++i) { + outDown[i] = NA_REAL; + outUp[i] = NA_REAL; + } - UNPROTECT(3); - return outMat; + UNPROTECT(3); + return outMat; } diff --git a/src/ta_AROONOSC.c b/src/ta_AROONOSC.c index b3e976981..7c6a46429 100644 --- a/src/ta_AROONOSC.c +++ b/src/ta_AROONOSC.c @@ -15,43 +15,38 @@ #include SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { - R_xlen_t n = xlength(inHighSEXP); - if (xlength(inLowSEXP) != n) - error("inHigh and inLow must have the same length"); - - int timePeriod = asInteger(timePeriodSEXP); - const double *restrict inHigh = REAL(inHighSEXP); - const double *restrict inLow = REAL(inLowSEXP); - - // Allocate output vector - SEXP outOscSEXP = PROTECT(allocVector(REALSXP, n)); - double *restrict outOsc = REAL(outOscSEXP); - - // Call TA-Lib - int outBegIdx = 0, outNBElement = 0; - TA_RetCode ret = TA_AROONOSC( - 0, (int)n - 1, - inHigh, inLow, - timePeriod, - &outBegIdx, &outNBElement, - outOsc - ); - if (ret != TA_SUCCESS) { - UNPROTECT(1); - error("TA_AROONOSC failed with error code %d", ret); - } - - // Leading NAs - for (int i = 0; i < outBegIdx; ++i) - outOsc[i] = NA_REAL; - - // Shift valid outputs - memmove(outOsc + outBegIdx, outOsc, (size_t)outNBElement * sizeof(double)); - - // Trailing NAs - for (int i = outBegIdx + outNBElement; i < n; ++i) - outOsc[i] = NA_REAL; - + R_xlen_t n = xlength(inHighSEXP); + if (xlength(inLowSEXP) != n) + error("inHigh and inLow must have the same length"); + + int timePeriod = asInteger(timePeriodSEXP); + const double *restrict inHigh = REAL(inHighSEXP); + const double *restrict inLow = REAL(inLowSEXP); + + // Allocate output vector + SEXP outOscSEXP = PROTECT(allocVector(REALSXP, n)); + double *restrict outOsc = REAL(outOscSEXP); + + // Call TA-Lib + int outBegIdx = 0, outNBElement = 0; + TA_RetCode ret = TA_AROONOSC(0, (int)n - 1, inHigh, inLow, timePeriod, + &outBegIdx, &outNBElement, outOsc); + if (ret != TA_SUCCESS) { UNPROTECT(1); - return outOscSEXP; + error("TA_AROONOSC failed with error code %d", ret); + } + + // Leading NAs + for (int i = 0; i < outBegIdx; ++i) + outOsc[i] = NA_REAL; + + // Shift valid outputs + memmove(outOsc + outBegIdx, outOsc, (size_t)outNBElement * sizeof(double)); + + // Trailing NAs + for (int i = outBegIdx + outNBElement; i < n; ++i) + outOsc[i] = NA_REAL; + + UNPROTECT(1); + return outOscSEXP; } diff --git a/src/ta_AVGPRICE.c b/src/ta_AVGPRICE.c deleted file mode 100644 index e39c3776e..000000000 --- a/src/ta_AVGPRICE.c +++ /dev/null @@ -1,86 +0,0 @@ -// Interface to TA_AVGPRICE -// -// Parameters -// x: A OHLCV-matrix -// -// Description -// `x` needs to have at least OHLC. -#include "R_ext/Arith.h" -#include "R_ext/Memory.h" -#include "Rdefines.h" -#include "Rinternals.h" -#include "ta_defs.h" -#include "ta_func.h" - -SEXP impl_TA_AVGPRICE(const SEXP x) { - - // 1) extract dimensions - // form `x` - SEXP x_dimension = GET_DIM(x); - - // 1.1) assert dimension - // availability - if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { - Rf_error("`x` must have dim attribute"); - } - - const int nrow = INTEGER(x_dimension)[0]; - const int ncol = INTEGER(x_dimension)[1]; - - // 2) construct OHLC - // matrix and extract - // values - double *OHLC = REAL(x); - const double *inOpen = OHLC + 0 * nrow; - const double *inHigh = OHLC + 1 * nrow; - const double *inLow = OHLC + 2 * nrow; - const double *inClose = OHLC + 3 * nrow; - - const int startIdx = 0; - const int endIdx = nrow - 1; - int outBegIdx = 0, outNBElement = 0; - const int maxSize = endIdx - startIdx + 1; - double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); - - // clang-format off - // 3) call TA_AVGPRICE - // which returns a code - TA_RetCode ret = TA_AVGPRICE( - startIdx, - endIdx, - inOpen, - inHigh, - inLow, - inClose, - &outBegIdx, - &outNBElement, - outReal); - // clang-format on - - // 3.1) assert success - // of function. If it - // fails here its a bug - if (ret != TA_SUCCESS) { - Rf_error("`TA_AVGPRICE()` failed with code %d.", ret); - } - - // 4) prepare output - // for R - SEXP output = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); - double *output_ptr = REAL(output); - - // 4.1) initialize to NA - // to ensure size(input) == size(output) - for (int i = 0; i < nrow; ++i) { - output_ptr[i] = NA_REAL; - } - - // 4.2) populate output - // vector - for (int i = 0; i < outNBElement; ++i) { - output_ptr[outBegIdx + i] = outReal[i]; - } - - UNPROTECT(1); - return output; -} diff --git a/src/ta_BBANDS.c b/src/ta_BBANDS.c index ac6f4ed83..98629381d 100644 --- a/src/ta_BBANDS.c +++ b/src/ta_BBANDS.c @@ -17,47 +17,43 @@ #include #include -SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, - SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType) -{ - int n = LENGTH(inReal); // input length - double *restrict src = REAL(inReal); // pointer to input data - int period = INTEGER(optTimePeriod)[0]; // lookback - double nbUp = REAL(optNbDevUp)[0]; // std dev up - double nbDn = REAL(optNbDevDn)[0]; // std dev down - int maType = INTEGER(optMAType)[0]; // MA type enum +SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, + SEXP optNbDevDn, SEXP optMAType) { + int n = LENGTH(inReal); // input length + double *restrict src = REAL(inReal); // pointer to input data + int period = INTEGER(optTimePeriod)[0]; // lookback + double nbUp = REAL(optNbDevUp)[0]; // std dev up + double nbDn = REAL(optNbDevDn)[0]; // std dev down + int maType = INTEGER(optMAType)[0]; // MA type enum - // allocate result matrix n rows × 3 cols - SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); - double *upper = REAL(result); // column 1 - double *middle = upper + n; // column 2 - double *lower = upper + 2*n; // column 3 + // allocate result matrix n rows × 3 cols + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *upper = REAL(result); // column 1 + double *middle = upper + n; // column 2 + double *lower = upper + 2 * n; // column 3 - // call TA-Lib function - int outBeg, outNb; - TA_RetCode ret = TA_BBANDS(0, n-1, src, - period, nbUp, nbDn, maType, - &outBeg, &outNb, - upper + outBeg, - middle + outBeg, - lower + outBeg); + // call TA-Lib function + int outBeg, outNb; + TA_RetCode ret = + TA_BBANDS(0, n - 1, src, period, nbUp, nbDn, maType, &outBeg, &outNb, + upper + outBeg, middle + outBeg, lower + outBeg); - // fill leading/trailing NAs - for(int i = 0; i < outBeg; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; - for(int i = outBeg + outNb; i < n; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; + // fill leading/trailing NAs + for (int i = 0; i < outBeg; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; + for (int i = outBeg + outNb; i < n; ++i) + upper[i] = middle[i] = lower[i] = NA_REAL; - // set column names: c("upper","middle","lower") - SEXP dims = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("upper")); - SET_STRING_ELT(cnames, 1, mkChar("middle")); - SET_STRING_ELT(cnames, 2, mkChar("lower")); - SET_VECTOR_ELT(dims, 0, R_NilValue); - SET_VECTOR_ELT(dims, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dims); + // set column names: c("upper","middle","lower") + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("upper")); + SET_STRING_ELT(cnames, 1, mkChar("middle")); + SET_STRING_ELT(cnames, 2, mkChar("lower")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dims); - UNPROTECT(3); - return result; + UNPROTECT(3); + return result; } diff --git a/src/ta_MA.c b/src/ta_MA.c new file mode 100644 index 000000000..e30dbced1 --- /dev/null +++ b/src/ta_MA.c @@ -0,0 +1,63 @@ +// Interface to TA_MA (moving average) +// +// Parameters +// real – numeric vector of inputs +// timeperiod – integer SEXP for MA period (1 to 100000) +// matype – integer SEXP for MAType (0=SMA … 8=T3) +// +// Description +// Returns a numeric vector of the same length as `real`, +// with NA_REAL for the first lookback samples, then the +// moving‐average values thereafter. +#include "lib.h" +#include "ta_libc.h" +#include +#include + +SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype) { + int pc = 0; + real = PROTECT(coerceVector(real, REALSXP)); + pc++; + timeperiod = PROTECT(coerceVector(timeperiod, INTSXP)); + pc++; + matype = PROTECT(coerceVector(matype, INTSXP)); + pc++; + + int n = length(real); + const double *__restrict__ in = REAL(real); + int tp = INTEGER(timeperiod)[0]; + int mt_int = INTEGER(matype)[0]; + + // Validate inputs + if (tp < 1 || tp > 100000) + error("Invalid timeperiod %d; must be 1 to 100000", tp); + if (mt_int < TA_MAType_SMA || mt_int > TA_MAType_T3) + error("Invalid MAType %d; must be between %d (SMA) and %d (T3)", mt_int, + TA_MAType_SMA, TA_MAType_T3); + TA_MAType mt = (TA_MAType)mt_int; + + // Prepare R output vector, NA-fill + SEXP result = PROTECT(allocVector(REALSXP, n)); + pc++; + double *__restrict__ out = REAL(result); + for (int i = 0; i < n; i++) + out[i] = NA_REAL; + + // Temporary buffer for TA_MA output + double *temp = (double *)R_alloc(n, sizeof(double)); + + int outBeg, outNb; + TA_RetCode ret = TA_MA(0, n - 1, in, tp, mt, &outBeg, &outNb, temp); + if (ret != TA_SUCCESS) { + UNPROTECT(pc); + error("TA_MA failed: return code %d", ret); + } + + // Copy the valid outputs into aligned positions + for (int i = 0; i < outNb; i++) { + out[outBeg + i] = temp[i]; + } + + UNPROTECT(pc); + return result; +} diff --git a/src/ta_MACD.c b/src/ta_MACD.c index 8f9a1f1e7..23efb5c42 100644 --- a/src/ta_MACD.c +++ b/src/ta_MACD.c @@ -15,42 +15,38 @@ #include #include -SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, - SEXP optSlowPeriod, SEXP optSignalPeriod) -{ - int n = LENGTH(inReal); - double *restrict src = REAL(inReal); - int fastP = INTEGER(optFastPeriod)[0]; - int slowP = INTEGER(optSlowPeriod)[0]; - int signalP = INTEGER(optSignalPeriod)[0]; +SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, + SEXP optSignalPeriod) { + int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + int fastP = INTEGER(optFastPeriod)[0]; + int slowP = INTEGER(optSlowPeriod)[0]; + int signalP = INTEGER(optSignalPeriod)[0]; - SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); - double *macd = REAL(result); - double *signal = macd + n; - double *histogram = macd + 2*n; + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *macd = REAL(result); + double *signal = macd + n; + double *histogram = macd + 2 * n; - int outBeg, outNb; - TA_RetCode ret = TA_MACD(0, n-1, src, - fastP, slowP, signalP, - &outBeg, &outNb, - macd + outBeg, - signal + outBeg, - histogram + outBeg); + int outBeg, outNb; + TA_RetCode ret = + TA_MACD(0, n - 1, src, fastP, slowP, signalP, &outBeg, &outNb, + macd + outBeg, signal + outBeg, histogram + outBeg); - for(int i = 0; i < outBeg; ++i) - macd[i] = signal[i] = histogram[i] = NA_REAL; - for(int i = outBeg + outNb; i < n; ++i) - macd[i] = signal[i] = histogram[i] = NA_REAL; + for (int i = 0; i < outBeg; ++i) + macd[i] = signal[i] = histogram[i] = NA_REAL; + for (int i = outBeg + outNb; i < n; ++i) + macd[i] = signal[i] = histogram[i] = NA_REAL; - SEXP dims = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames,0,mkChar("macd")); - SET_STRING_ELT(cnames,1,mkChar("signal")); - SET_STRING_ELT(cnames,2,mkChar("histogram")); - SET_VECTOR_ELT(dims,0,R_NilValue); - SET_VECTOR_ELT(dims,1,cnames); - setAttrib(result, R_DimNamesSymbol, dims); + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("macd")); + SET_STRING_ELT(cnames, 1, mkChar("signal")); + SET_STRING_ELT(cnames, 2, mkChar("histogram")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dims); - UNPROTECT(3); - return result; + UNPROTECT(3); + return result; } diff --git a/src/ta_MEDPRICE.c b/src/ta_MEDPRICE.c deleted file mode 100644 index 3f1fcd5ff..000000000 --- a/src/ta_MEDPRICE.c +++ /dev/null @@ -1,72 +0,0 @@ -// Interface to TA_MEDPRICE -// -// Parameters -// x: A OHLCV-matrix -// -// Description -// `x` needs to have at least High and Low. -#include "R_ext/Arith.h" -#include "R_ext/Memory.h" -#include "Rdefines.h" -#include "Rinternals.h" -#include "ta_defs.h" -#include "ta_func.h" - -SEXP c_median_price(const SEXP x) { - - // 1) extract dimensions - // from `x` - SEXP x_dimension = GET_DIM(x); - - // 1.1) assert dimension availability - if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { - Rf_error("`x` must have dim attribute"); - } - const int nrow = INTEGER(x_dimension)[0]; - const int ncol = INTEGER(x_dimension)[1]; - - // 2) extract High and Low - double *HL = REAL(x); - const double *inHigh = HL + 1 * nrow; - const double *inLow = HL + 2 * nrow; - - const int startIdx = 0; - const int endIdx = nrow - 1; - int outBegIdx = 0, outNBElement = 0; - const int maxSize = endIdx - startIdx + 1; - double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); - - // clang-format off - // 3) call TA_MEDPRICE - TA_RetCode ret = TA_MEDPRICE( - startIdx, - endIdx, - inHigh, - inLow, - &outBegIdx, - &outNBElement, - outReal); - // clang-format on - - // 3.1) assert success - if (ret != TA_SUCCESS) { - Rf_error("`TA_MEDPRICE()` failed with code %d.", ret); - } - - // 4) prepare output for R - SEXP output = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); - double *output_ptr = REAL(output); - - // 4.1) initialize to NA - for (int i = 0; i < nrow; ++i) { - output_ptr[i] = NA_REAL; - } - - // 4.2) populate output vector - for (int i = 0; i < outNBElement; ++i) { - output_ptr[outBegIdx + i] = outReal[i]; - } - - UNPROTECT(1); - return output; -} \ No newline at end of file diff --git a/src/ta_MIDPRICE.c b/src/ta_MIDPRICE.c deleted file mode 100644 index 9c3b0618d..000000000 --- a/src/ta_MIDPRICE.c +++ /dev/null @@ -1,72 +0,0 @@ -// Interface to ta_MIDPRICE.c -// -// Parameters -// x: A OHLC matrix -// -#include "R_ext/Error.h" -#include "Rdefines.h" -#include "Rinternals.h" -#include "ta_func.h" - -SEXP impl_MIDPRICE(const SEXP x, const SEXP n) { - - // 1) extract dimensions - // from `x` - SEXP x_dimension = GET_DIM(x); - - // 1.1) assert dimensiona availability - if (x_dimension == R_NilValue || LENGTH(x_dimension) < 2) { - Rf_error("`x` must have dim attribute"); - } - const int nrow = INTEGER(x_dimension)[0]; - const int ncol = INTEGER(x_dimension)[1]; - - // 2) extract High and Low - double *HL = REAL(x); - const double *inHigh = HL + 1 * nrow; - const double *inLow = HL + 2 * nrow; - - // 2.1) extract time period - const int *optInTimePeriod = INTEGER(n); - - const int startIdx = 0; - const int endIdx = nrow - 1; - int outBegIdx = 0, outNBElement = 0; - const int maxSize = endIdx - startIdx + 1; - double *outReal = (double *)R_alloc((size_t)maxSize, sizeof(double)); - - // clang-format off - // 3) call TA_MEDPRICE - TA_RetCode ret = TA_MIDPRICE( - startIdx, - endIdx, - inHigh, - inLow, - optInTimePeriod[0], - &outBegIdx, - &outNBElement, - outReal); - // clang-format on - - // 3.1) assert success - if (ret != TA_SUCCESS) { - Rf_error("`TA_MEDPRICE()` failed with code %d.", ret); - } - - // 4) prepare output for R - SEXP output = PROTECT(allocVector(REALSXP, (R_xlen_t)nrow)); - double *output_ptr = REAL(output); - - // 4.1) initialize to NA - for (int i = 0; i < nrow; ++i) { - output_ptr[i] = NA_REAL; - } - - // 4.2) populate output vector - for (int i = 0; i < outNBElement; ++i) { - output_ptr[outBegIdx + i] = outReal[i]; - } - - UNPROTECT(1); - return output; -} \ No newline at end of file diff --git a/src/ta_RSI.c b/src/ta_RSI.c index 5613218ec..4fc826bdc 100644 --- a/src/ta_RSI.c +++ b/src/ta_RSI.c @@ -7,36 +7,28 @@ // Description // Computes the single‐output RSI over the series. Returns an // unnamed numeric vector of length n, padded with NA_REAL. - #include "lib.h" +#include "ta_defs.h" #include #include #include -SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod) -{ - int n = LENGTH(inReal); - double *restrict src = REAL(inReal); - int period = INTEGER(optTimePeriod)[0]; +SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod) { + int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + int period = INTEGER(optTimePeriod)[0]; - SEXP result = PROTECT(allocVector(REALSXP, n)); - double *rsi = REAL(result); + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *rsi = REAL(result); - int outBeg, outNb; - TA_RetCode ret = TA_RSI( - 0, - n-1, - src, - period, - &outBeg, - &outNb, - rsi); + int outBeg, outNb; + TA_RetCode ret = TA_RSI(0, n - 1, src, period, &outBeg, &outNb, rsi); - for(int i = 0; i < outBeg; ++i) - rsi[i] = NA_REAL; - for(int i = outBeg + outNb; i < n; ++i) - rsi[i] = NA_REAL; + for (int i = 0; i < outBeg; ++i) + rsi[i] = NA_REAL; + for (int i = outBeg + outNb; i < n; ++i) + rsi[i] = NA_REAL; - UNPROTECT(1); - return result; + UNPROTECT(1); + return result; } diff --git a/src/ta_STOCH.c b/src/ta_STOCH.c index 9c60c2853..ac76a4d88 100644 --- a/src/ta_STOCH.c +++ b/src/ta_STOCH.c @@ -14,57 +14,86 @@ // Returns an N×2 matrix with columns 'slowk' and 'slowd', NA-filled // for initial lookback. #include "lib.h" +#include "ta_defs.h" +#include "ta_libc.h" #include #include -#include "ta_libc.h" -SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, - SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, - SEXP slowd_period, SEXP slowd_matype) { - int pCount = 0; - high = PROTECT(coerceVector(high, REALSXP)); pCount++; - low = PROTECT(coerceVector(low, REALSXP)); pCount++; - close = PROTECT(coerceVector(close, REALSXP)); pCount++; - fastk_period = PROTECT(coerceVector(fastk_period, INTSXP));pCount++; - slowk_period = PROTECT(coerceVector(slowk_period, INTSXP));pCount++; - slowk_matype = PROTECT(coerceVector(slowk_matype, INTSXP));pCount++; - slowd_period = PROTECT(coerceVector(slowd_period, INTSXP));pCount++; - slowd_matype = PROTECT(coerceVector(slowd_matype, INTSXP));pCount++; +SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, + SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, + SEXP slowd_matype) { + + + int pCount = 0; + high = PROTECT(coerceVector(high, REALSXP)); + pCount++; + low = PROTECT(coerceVector(low, REALSXP)); + pCount++; + close = PROTECT(coerceVector(close, REALSXP)); + pCount++; + fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); + pCount++; + slowk_period = PROTECT(coerceVector(slowk_period, INTSXP)); + pCount++; + slowk_matype = PROTECT(coerceVector(slowk_matype, INTSXP)); + pCount++; + slowd_period = PROTECT(coerceVector(slowd_period, INTSXP)); + pCount++; + slowd_matype = PROTECT(coerceVector(slowd_matype, INTSXP)); + pCount++; + + int n = length(high); + const double *__restrict__ inHigh = REAL(high); + const double *__restrict__ inLow = REAL(low); + const double *__restrict__ inClose = REAL(close); + int kP = INTEGER(fastk_period)[0]; + int sk = INTEGER(slowk_period)[0]; + int sm = INTEGER(slowk_matype)[0]; + TA_MAType sm_ma = (TA_MAType)sm; + int dP = INTEGER(slowd_period)[0]; + int dm = INTEGER(slowd_matype)[0]; + TA_MAType dm_ma = (TA_MAType)dm; - int n = length(high); - const double * __restrict__ inHigh = REAL(high); - const double * __restrict__ inLow = REAL(low); - const double * __restrict__ inClose = REAL(close); - int kP = INTEGER(fastk_period)[0]; - int sk = INTEGER(slowk_period)[0]; - int sm = INTEGER(slowk_matype)[0]; - int dP = INTEGER(slowd_period)[0]; - int dm = INTEGER(slowd_matype)[0]; + int outBeg, outNB; + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); + pCount++; + double *__restrict__ mat = REAL(result); + double *__restrict__ outSlowK = mat; + double *__restrict__ outSlowD = mat + n; - int outBeg, outNB; - SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); pCount++; - double * __restrict__ mat = REAL(result); - double * __restrict__ outSlowK = mat; - double * __restrict__ outSlowD = mat + n; + // clang-format off +TA_RetCode ret = TA_STOCH( + 0, + n - 1, + inHigh, + inLow, + inClose, + kP, + sk, + sm_ma, + dP, + dm_ma, + &outBeg, + &outNB, + outSlowK + outBeg, + outSlowD + outBeg +); +// clang-format off - TA_RetCode ret = TA_STOCH(0, n - 1, - inHigh, inLow, inClose, - kP, sk, sm, dP, dm, - &outBeg, &outNB, - outSlowK + outBeg, - outSlowD + outBeg); if (ret != TA_SUCCESS) { UNPROTECT(pCount); error("TA_STOCH failed: return code %d", ret); } - for (register int i = 0; i < outBeg; ++i) { - outSlowK[i] = NA_REAL; - outSlowD[i] = NA_REAL; - } - SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; + + // shift array and pad + // with leading NAs + shift_array(outSlowK, n, outBeg); + shift_array(outSlowD, n, outBeg); + + SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; SET_STRING_ELT(colnames, 0, mkChar("slowk")); SET_STRING_ELT(colnames, 1, mkChar("slowd")); - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; SET_VECTOR_ELT(dimnames, 0, R_NilValue); SET_VECTOR_ELT(dimnames, 1, colnames); setAttrib(result, R_DimNamesSymbol, dimnames); diff --git a/src/ta_STOCHF.c b/src/ta_STOCHF.c index 84632dbe4..416855b15 100644 --- a/src/ta_STOCHF.c +++ b/src/ta_STOCHF.c @@ -12,56 +12,63 @@ // Returns an N×2 matrix with columns 'fastk' and 'fastd', NA-filled // for initial lookback. #include "lib.h" +#include "ta_libc.h" #include #include -#include "ta_libc.h" -SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, - SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype) { - int pCount = 0; - high = PROTECT(coerceVector(high, REALSXP)); pCount++; - low = PROTECT(coerceVector(low, REALSXP)); pCount++; - close = PROTECT(coerceVector(close, REALSXP)); pCount++; - fastk_period = PROTECT(coerceVector(fastk_period, INTSXP));pCount++; - fastd_period = PROTECT(coerceVector(fastd_period, INTSXP));pCount++; - fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP));pCount++; +SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, + SEXP fastd_period, SEXP fastd_matype) { + int pCount = 0; + high = PROTECT(coerceVector(high, REALSXP)); + pCount++; + low = PROTECT(coerceVector(low, REALSXP)); + pCount++; + close = PROTECT(coerceVector(close, REALSXP)); + pCount++; + fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); + pCount++; + fastd_period = PROTECT(coerceVector(fastd_period, INTSXP)); + pCount++; + fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP)); + pCount++; - int n = length(high); - const double * __restrict__ inHigh = REAL(high); - const double * __restrict__ inLow = REAL(low); - const double * __restrict__ inClose = REAL(close); - int kP = INTEGER(fastk_period)[0]; - int dP = INTEGER(fastd_period)[0]; - int dm = INTEGER(fastd_matype)[0]; + int n = length(high); + const double *__restrict__ inHigh = REAL(high); + const double *__restrict__ inLow = REAL(low); + const double *__restrict__ inClose = REAL(close); + int kP = INTEGER(fastk_period)[0]; + int dP = INTEGER(fastd_period)[0]; + int dm = INTEGER(fastd_matype)[0]; - int outBeg, outNB; - SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); pCount++; - double * __restrict__ mat = REAL(result); - double * __restrict__ outFastK = mat; - double * __restrict__ outFastD = mat + n; - - TA_RetCode ret = TA_STOCHF(0, n - 1, - inHigh, inLow, inClose, - kP, dP, dm, - &outBeg, &outNB, - outFastK + outBeg, - outFastD + outBeg); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_STOCHF failed: return code %d", ret); - } - for (register int i = 0; i < outBeg; ++i) { - outFastK[i] = NA_REAL; - outFastD[i] = NA_REAL; - } - SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; - SET_STRING_ELT(colnames, 0, mkChar("fastk")); - SET_STRING_ELT(colnames, 1, mkChar("fastd")); - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, colnames); - setAttrib(result, R_DimNamesSymbol, dimnames); + int outBeg, outNB; + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); + pCount++; + double *__restrict__ mat = REAL(result); + double *__restrict__ outFastK = mat; + double *__restrict__ outFastD = mat + n; + TA_RetCode ret = + TA_STOCHF(0, n - 1, inHigh, inLow, inClose, kP, dP, dm, &outBeg, &outNB, + outFastK + outBeg, outFastD + outBeg); + if (ret != TA_SUCCESS) { UNPROTECT(pCount); - return result; + error("TA_STOCHF failed: return code %d", ret); + } + + // shift array and pad + // with leading NAs + shift_array(outFastK, n, outBeg); + shift_array(outFastD, n, outBeg); + SEXP colnames = PROTECT(allocVector(STRSXP, 2)); + pCount++; + SET_STRING_ELT(colnames, 0, mkChar("fastk")); + SET_STRING_ELT(colnames, 1, mkChar("fastd")); + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); + pCount++; + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, colnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(pCount); + return result; } diff --git a/src/ta_STOCHRSI.c b/src/ta_STOCHRSI.c index be0958b06..0048bc6d9 100644 --- a/src/ta_STOCHRSI.c +++ b/src/ta_STOCHRSI.c @@ -11,58 +11,66 @@ // Returns an N×2 matrix with columns 'fastk' and 'fastd', both // of the same length as input, with NA for initial lookback. #include "lib.h" +#include "ta_libc.h" #include #include -#include "ta_libc.h" - -SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, - SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype) { - int pCount = 0; - real = PROTECT(coerceVector(real, REALSXP)); pCount++; - timeperiod = PROTECT(coerceVector(timeperiod, INTSXP)); pCount++; - fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); pCount++; - fastd_period = PROTECT(coerceVector(fastd_period, INTSXP)); pCount++; - fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP)); pCount++; - int n = length(real); - const double * __restrict__ inReal = REAL(real); - int tp = INTEGER(timeperiod)[0]; - int kP = INTEGER(fastk_period)[0]; - int dP = INTEGER(fastd_period)[0]; - int dM = INTEGER(fastd_matype)[0]; +SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, + SEXP fastd_period, SEXP fastd_matype) { + int pCount = 0; + real = PROTECT(coerceVector(real, REALSXP)); + pCount++; + timeperiod = PROTECT(coerceVector(timeperiod, INTSXP)); + pCount++; + fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); + pCount++; + fastd_period = PROTECT(coerceVector(fastd_period, INTSXP)); + pCount++; + fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP)); + pCount++; - int outBeg, outNB; - // Allocate matrix N×2 - SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); pCount++; - double * __restrict__ mat = REAL(result); - // Column pointers - double * __restrict__ outFastK = mat; - double * __restrict__ outFastD = mat + n; + int n = length(real); + const double *__restrict__ inReal = REAL(real); + int tp = INTEGER(timeperiod)[0]; + int kP = INTEGER(fastk_period)[0]; + int dP = INTEGER(fastd_period)[0]; + int dM = INTEGER(fastd_matype)[0]; - TA_RetCode ret = TA_STOCHRSI(0, n - 1, - inReal, tp, - kP, dP, dM, - &outBeg, &outNB, - outFastK + outBeg, - outFastD + outBeg); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_STOCHRSI failed: return code %d", ret); - } - // Fill initial lookback rows with NA - for (register int i = 0; i < outBeg; ++i) { - outFastK[i] = NA_REAL; - outFastD[i] = NA_REAL; - } - // Set column names - SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; - SET_STRING_ELT(colnames, 0, mkChar("fastk")); - SET_STRING_ELT(colnames, 1, mkChar("fastd")); - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, colnames); - setAttrib(result, R_DimNamesSymbol, dimnames); + int outBeg, outNB; + // Allocate matrix N×2 + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); + pCount++; + double *__restrict__ mat = REAL(result); + // Column pointers + double *__restrict__ outFastK = mat; + double *__restrict__ outFastD = mat + n; + TA_RetCode ret = TA_STOCHRSI(0, n - 1, inReal, tp, kP, dP, dM, &outBeg, + &outNB, outFastK + outBeg, outFastD + outBeg); + if (ret != TA_SUCCESS) { UNPROTECT(pCount); - return result; + error("TA_STOCHRSI failed: return code %d", ret); + } + // Fill initial lookback rows with NA + for (register int i = 0; i < outBeg; ++i) { + outFastK[i] = NA_REAL; + outFastD[i] = NA_REAL; + } + + shift_array(outFastK, n, outBeg); + shift_array(outFastD, n, outBeg); + + // Set column names + SEXP colnames = PROTECT(allocVector(STRSXP, 2)); + pCount++; + SET_STRING_ELT(colnames, 0, mkChar("fastk")); + SET_STRING_ELT(colnames, 1, mkChar("fastd")); + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); + pCount++; + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, colnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(pCount); + return result; } \ No newline at end of file diff --git a/src/ta_ULTOSC.c b/src/ta_ULTOSC.c index e18c56b59..ebc92769c 100644 --- a/src/ta_ULTOSC.c +++ b/src/ta_ULTOSC.c @@ -12,52 +12,53 @@ // Returns a numeric vector of the same length as inputs containing // the Ultimate Oscillator, with NA for indices before the lookback. #include "lib.h" +#include "ta_libc.h" #include #include -#include "ta_libc.h" -SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, - SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3) { - int pCount = 0; - // Coerce inputs to REALSXP/INTSXP and protect - high = PROTECT(coerceVector(high, REALSXP)); pCount++; - low = PROTECT(coerceVector(low, REALSXP)); pCount++; - close = PROTECT(coerceVector(close, REALSXP)); pCount++; - timeperiod1 = PROTECT(coerceVector(timeperiod1, INTSXP)); pCount++; - timeperiod2 = PROTECT(coerceVector(timeperiod2, INTSXP)); pCount++; - timeperiod3 = PROTECT(coerceVector(timeperiod3, INTSXP)); pCount++; +SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, + SEXP timeperiod2, SEXP timeperiod3) { + int pCount = 0; + // Coerce inputs to REALSXP/INTSXP and protect + high = PROTECT(coerceVector(high, REALSXP)); + pCount++; + low = PROTECT(coerceVector(low, REALSXP)); + pCount++; + close = PROTECT(coerceVector(close, REALSXP)); + pCount++; + timeperiod1 = PROTECT(coerceVector(timeperiod1, INTSXP)); + pCount++; + timeperiod2 = PROTECT(coerceVector(timeperiod2, INTSXP)); + pCount++; + timeperiod3 = PROTECT(coerceVector(timeperiod3, INTSXP)); + pCount++; - int n = length(high); - // Extract C pointers with restrict qualifier for speed - const double * __restrict__ inHigh = REAL(high); - const double * __restrict__ inLow = REAL(low); - const double * __restrict__ inClose = REAL(close); - int p1 = INTEGER(timeperiod1)[0]; - int p2 = INTEGER(timeperiod2)[0]; - int p3 = INTEGER(timeperiod3)[0]; + int n = length(high); + // Extract C pointers with restrict qualifier for speed + const double *__restrict__ inHigh = REAL(high); + const double *__restrict__ inLow = REAL(low); + const double *__restrict__ inClose = REAL(close); + int p1 = INTEGER(timeperiod1)[0]; + int p2 = INTEGER(timeperiod2)[0]; + int p3 = INTEGER(timeperiod3)[0]; - int outBeg, outNB; - // Allocate output vector of full length - SEXP result = PROTECT(allocVector(REALSXP, n)); pCount++; - double * __restrict__ out = REAL(result); - - // Call TA-Lib function - TA_RetCode ret = TA_ULTOSC(0, n - 1, - inHigh, inLow, inClose, - p1, p2, p3, - &outBeg, &outNB, - out + outBeg); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_ULTOSC failed: return code %d", ret); - } - // Fill initial lookback positions with NA - for (register int i = 0; i < outBeg; ++i) - out[i] = NA_REAL; + int outBeg, outNB; + // Allocate output vector of full length + SEXP result = PROTECT(allocVector(REALSXP, n)); + pCount++; + double *__restrict__ out = REAL(result); + // Call TA-Lib function + TA_RetCode ret = TA_ULTOSC(0, n - 1, inHigh, inLow, inClose, p1, p2, p3, + &outBeg, &outNB, out + outBeg); + if (ret != TA_SUCCESS) { UNPROTECT(pCount); - return result; -} - - + error("TA_ULTOSC failed: return code %d", ret); + } + // Fill initial lookback positions with NA + for (register int i = 0; i < outBeg; ++i) + out[i] = NA_REAL; + UNPROTECT(pCount); + return result; +} From af54bb4df85768e71e37a5d5377c2666d6e05af3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:58:59 +0200 Subject: [PATCH 020/166] :hammer: Added Candlestick Patterns * Needs rework -- all GPT generated. --- NAMESPACE | 12 ++++ R/ta_CDLDOJI.R | 21 +++++++ R/ta_CDLDOJISTAR.R | 21 +++++++ R/ta_CDLDRAGONFLYDOJI.R | 21 +++++++ R/ta_CDLEVENINGDOJISTAR.R | 22 +++++++ man/doji.Rd | 11 ++++ man/doji_star.Rd | 11 ++++ man/dragonfly_doji.Rd | 11 ++++ man/evening_doji_star.Rd | 11 ++++ src/api.h | 4 ++ src/init.c | 4 ++ src/ta_CDLDOJI.c | 120 ++++++++++++++++++++++++++++++++++++ src/ta_CDLDOJISTAR.c | 89 ++++++++++++++++++++++++++ src/ta_CDLDRAGONFLYDOJI.c | 89 ++++++++++++++++++++++++++ src/ta_CDLEVENINGDOJISTAR.c | 111 +++++++++++++++++++++++++++++++++ 15 files changed, 558 insertions(+) create mode 100644 R/ta_CDLDOJI.R create mode 100644 R/ta_CDLDOJISTAR.R create mode 100644 R/ta_CDLDRAGONFLYDOJI.R create mode 100644 R/ta_CDLEVENINGDOJISTAR.R create mode 100644 man/doji.Rd create mode 100644 man/doji_star.Rd create mode 100644 man/dragonfly_doji.Rd create mode 100644 man/evening_doji_star.Rd create mode 100644 src/ta_CDLDOJI.c create mode 100644 src/ta_CDLDOJISTAR.c create mode 100644 src/ta_CDLDRAGONFLYDOJI.c create mode 100644 src/ta_CDLEVENINGDOJISTAR.c diff --git a/NAMESPACE b/NAMESPACE index c1f4535af..50a8cf64a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,7 +4,11 @@ S3method(acceleration_bands,default) S3method(aroon,default) S3method(aroon_oscillator,default) S3method(bollinger_bands,default) +S3method(doji,default) +S3method(doji_star,default) S3method(double_exponential_moving_average,default) +S3method(dragonfly_doji,default) +S3method(evening_doji_star,default) S3method(exponential_moving_average,default) S3method(fast_stochastic,default) S3method(kaufman_adaptive_moving_average,default) @@ -19,6 +23,10 @@ S3method(triangular_moving_average,default) S3method(triple_exponential_moving_average,default) S3method(ultimate_oscillator,default) S3method(weighted_moving_average,default) +export(CDLDOJI) +export(CDLDOJISTAR) +export(CDLDRAGONFLYDOJI) +export(CDLEVENINGDOJISTAR) export(DEMA) export(EMA) export(KAMA) @@ -34,7 +42,11 @@ export(acceleration_bands) export(aroon) export(aroon_oscillator) export(bollinger_bands) +export(doji) +export(doji_star) export(double_exponential_moving_average) +export(dragonfly_doji) +export(evening_doji_star) export(exponential_moving_average) export(fast_stochastic) export(kaufman_adaptive_moving_average) diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R new file mode 100644 index 000000000..bbd9e6342 --- /dev/null +++ b/R/ta_CDLDOJI.R @@ -0,0 +1,21 @@ +#' @title Doji +#' @export +doji <- function(x, ...) { + UseMethod( + "doji" + ) +} + +#' @export +CDLDOJI <- doji + +#' @export +doji.default <- function(x, ...) { + .Call( + "impl_ta_CDLDOJI", + .open(x), + .high(x), + .low(x), + .close(x) + ) +} \ No newline at end of file diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R new file mode 100644 index 000000000..9e947a75a --- /dev/null +++ b/R/ta_CDLDOJISTAR.R @@ -0,0 +1,21 @@ +#' @title Doji Star +#' @export +doji_star <- function(x, ...) { + UseMethod( + "doji_star" + ) +} + +#' @export +CDLDOJISTAR <- doji_star + +#' @export +doji_star.default <- function(x, ...) { + .Call( + "impl_ta_CDLDOJISTAR", + .open(x), + .high(x), + .low(x), + .close(x) + ) +} \ No newline at end of file diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R new file mode 100644 index 000000000..37e192133 --- /dev/null +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -0,0 +1,21 @@ +#' @title Dragonfly Doji +#' @export +dragonfly_doji <- function(x, ...) { + UseMethod( + "dragonfly_doji" + ) +} + +#' @export +CDLDRAGONFLYDOJI <- dragonfly_doji + +#' @export +dragonfly_doji.default <- function(x, ...) { + .Call( + "impl_ta_CDLDRAGONFLYDOJI", + .open(x), + .high(x), + .low(x), + .close(x) + ) +} \ No newline at end of file diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R new file mode 100644 index 000000000..d11dbddf4 --- /dev/null +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -0,0 +1,22 @@ +#' @title Evening Doji Star +#' @export +evening_doji_star <- function(x, penetration, ...) { + UseMethod( + "evening_doji_star" + ) +} + +#' @export +CDLEVENINGDOJISTAR <- evening_doji_star + +#' @export +evening_doji_star.default <- function(x, penetration, ...) { + .Call( + "impl_ta_CDLEVENINGDOJISTAR", + .open(x), + .high(x), + .low(x), + .close(x), + penetration + ) +} \ No newline at end of file diff --git a/man/doji.Rd b/man/doji.Rd new file mode 100644 index 000000000..37db570f8 --- /dev/null +++ b/man/doji.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLDOJI.R +\name{doji} +\alias{doji} +\title{Doji} +\usage{ +doji(x, ...) +} +\description{ +Doji +} diff --git a/man/doji_star.Rd b/man/doji_star.Rd new file mode 100644 index 000000000..bf08ee177 --- /dev/null +++ b/man/doji_star.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLDOJISTAR.R +\name{doji_star} +\alias{doji_star} +\title{Doji Star} +\usage{ +doji_star(x, ...) +} +\description{ +Doji Star +} diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd new file mode 100644 index 000000000..30ac0244d --- /dev/null +++ b/man/dragonfly_doji.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLDRAGONFLYDOJI.R +\name{dragonfly_doji} +\alias{dragonfly_doji} +\title{Dragonfly Doji} +\usage{ +dragonfly_doji(x, ...) +} +\description{ +Dragonfly Doji +} diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd new file mode 100644 index 000000000..9e4150a76 --- /dev/null +++ b/man/evening_doji_star.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLEVENINGDOJISTAR.R +\name{evening_doji_star} +\alias{evening_doji_star} +\title{Evening Doji Star} +\usage{ +evening_doji_star(x, penetration, ...) +} +\description{ +Evening Doji Star +} diff --git a/src/api.h b/src/api.h index a69866c24..c668dead5 100644 --- a/src/api.h +++ b/src/api.h @@ -9,6 +9,10 @@ SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); +SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close); +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close); +SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close); +SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration); SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); diff --git a/src/init.c b/src/init.c index 64f143384..be4950786 100644 --- a/src/init.c +++ b/src/init.c @@ -13,6 +13,10 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_AROONOSC, 3), CALLDEF(impl_ta_AROON, 3), CALLDEF(impl_ta_BBANDS, 5), + CALLDEF(impl_ta_CDLDOJI, 4), + CALLDEF(impl_ta_CDLDOJISTAR, 4), + CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 4), + CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 5), CALLDEF(impl_ta_MACD, 4), CALLDEF(impl_ta_MA, 3), CALLDEF(impl_ta_RSI, 2), diff --git a/src/ta_CDLDOJI.c b/src/ta_CDLDOJI.c new file mode 100644 index 000000000..234936383 --- /dev/null +++ b/src/ta_CDLDOJI.c @@ -0,0 +1,120 @@ +// Interface to TA_CDLDOJI +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// +// Description +// Identifies "Doji" candlestick patterns, where the open and close prices are nearly equal, indicating market indecision. +// Returns an integer vector of the same length as the inputs, with 100 for each index where a Doji pattern is detected (0 otherwise). +// Leading NA values are padded for periods before the first output can be computed (if any). +#include "lib.h" +#include +#include + +SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { + // Ensure input types are numeric (double); coerce if necessary for safety + int protect_count = 0; + if(TYPEOF(open) != REALSXP) { + open = PROTECT(coerceVector(open, REALSXP)); + protect_count++; + } + if(TYPEOF(high) != REALSXP) { + high = PROTECT(coerceVector(high, REALSXP)); + protect_count++; + } + if(TYPEOF(low) != REALSXP) { + low = PROTECT(coerceVector(low, REALSXP)); + protect_count++; + } + if(TYPEOF(close) != REALSXP) { + close = PROTECT(coerceVector(close, REALSXP)); + protect_count++; + } + + // All price vectors must have the same length + R_xlen_t n = XLENGTH(open); + if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); + } + + // If no data points, return an empty integer vector (length 0) + if(n == 0) { + SEXP result = PROTECT(allocVector(INTSXP, 0)); + if(protect_count > 0) UNPROTECT(protect_count); + UNPROTECT(1); + return result; + } + + // TA-Lib uses 32-bit indexing; check for overflow of input length + if(n > INT_MAX) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; // safe to cast after checking + + // Get pointers to the input data (treated as double arrays for TA-Lib) + const double * restrict open_ptr = REAL(open); + const double * restrict high_ptr = REAL(high); + const double * restrict low_ptr = REAL(low); + const double * restrict close_ptr = REAL(close); + + // Allocate an integer output vector of length n for the result + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int * restrict out_ptr = INTEGER(result); + + // Prepare variables to receive output range from TA-Lib + int out_beg_idx = 0; + int out_nb_elem = 0; + + // Call TA-Lib function TA_CDLDOJI to compute the pattern indicator + TA_RetCode ret_code = TA_CDLDOJI( + 0, // start index (beginning of data) + len - 1, // end index (last data point) + open_ptr, high_ptr, low_ptr, close_ptr, // input price arrays + &out_beg_idx, // where the first computed output starts + &out_nb_elem, // number of output values computed + out_ptr // output buffer (integer results) + ); + + // Check for errors from TA-Lib computation + if(ret_code != TA_SUCCESS) { + if(protect_count > 0) UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + + // If TA-Lib reports no output values (e.g., not enough data for even one pattern) + if(out_nb_elem == 0) { + // Fill entire output with NA (no pattern values could be computed) + for(R_xlen_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + // Unprotect and return the result vector + if(protect_count > 0) UNPROTECT(protect_count); + return result; + } + + // Shift the computed results to align with original data indices. + // `out_beg_idx` tells how many initial elements have no valid output. + if(out_beg_idx > 0) { + // Move the computed results to start at index `out_beg_idx` in the output array. + // Using memmove allows safe in-place overlapping copy. + memmove( + /* dest: */ out_ptr + out_beg_idx, + /* src: */ out_ptr, + /* n: */ (n - out_beg_idx) * sizeof(int) + ); + // Pad the leading part of the output with NA values for periods with no output + for(int i = 0; i < out_beg_idx; ++i) { + out_ptr[i] = NA_INTEGER; // NA for integer type + } + } + + // Unprotect protected objects and return the result + if(protect_count > 0) UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c new file mode 100644 index 000000000..53c7ba1e2 --- /dev/null +++ b/src/ta_CDLDOJISTAR.c @@ -0,0 +1,89 @@ +// Interface to TA_CDLDOJISTAR +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// +// Description +// Identifies the "Doji Star" candlestick pattern, which is a two-day pattern where a Doji candle appears after a long candle (gap-up or gap-down). +// Returns an integer vector of the same length, with +100 indicating a bullish Doji Star pattern and -100 indicating a bearish Doji Star (0 if no pattern). +// Leading NA values are padded for periods before the first pattern can be detected. +#include "lib.h" +#include +#include + +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { + int protect_count = 0; + if(TYPEOF(open) != REALSXP) { + open = PROTECT(coerceVector(open, REALSXP)); + protect_count++; + } + if(TYPEOF(high) != REALSXP) { + high = PROTECT(coerceVector(high, REALSXP)); + protect_count++; + } + if(TYPEOF(low) != REALSXP) { + low = PROTECT(coerceVector(low, REALSXP)); + protect_count++; + } + if(TYPEOF(close) != REALSXP) { + close = PROTECT(coerceVector(close, REALSXP)); + protect_count++; + } + + R_xlen_t n = XLENGTH(open); + if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); + } + if(n == 0) { + SEXP result = PROTECT(allocVector(INTSXP, 0)); + if(protect_count > 0) UNPROTECT(protect_count); + UNPROTECT(1); + return result; + } + if(n > INT_MAX) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; + + const double * restrict open_ptr = REAL(open); + const double * restrict high_ptr = REAL(high); + const double * restrict low_ptr = REAL(low); + const double * restrict close_ptr = REAL(close); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int * restrict out_ptr = INTEGER(result); + + int out_beg_idx = 0; + int out_nb_elem = 0; + TA_RetCode ret_code = TA_CDLDOJISTAR( + 0, len - 1, + open_ptr, high_ptr, low_ptr, close_ptr, + &out_beg_idx, &out_nb_elem, + out_ptr + ); + if(ret_code != TA_SUCCESS) { + if(protect_count > 0) UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + if(out_nb_elem == 0) { + for(R_xlen_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + if(protect_count > 0) UNPROTECT(protect_count); + return result; + } + if(out_beg_idx > 0) { + memmove(out_ptr + out_beg_idx, out_ptr, (n - out_beg_idx) * sizeof(int)); + for(int i = 0; i < out_beg_idx; ++i) { + out_ptr[i] = NA_INTEGER; + } + } + if(protect_count > 0) UNPROTECT(protect_count); + return result; +} \ No newline at end of file diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c new file mode 100644 index 000000000..a6dbe21d3 --- /dev/null +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -0,0 +1,89 @@ +// Interface to TA_CDLDRAGONFLYDOJI +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// +// Description +// Identifies the "Dragonfly Doji" candlestick pattern, characterized by a Doji with a long lower shadow and virtually no upper shadow. +// Returns an integer vector of the same length, with 100 for each index where a Dragonfly Doji pattern is found (0 if no pattern). +// Leading NA values are padded for periods before the first pattern can be detected. +#include "lib.h" +#include +#include + +SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { + int protect_count = 0; + if(TYPEOF(open) != REALSXP) { + open = PROTECT(coerceVector(open, REALSXP)); + protect_count++; + } + if(TYPEOF(high) != REALSXP) { + high = PROTECT(coerceVector(high, REALSXP)); + protect_count++; + } + if(TYPEOF(low) != REALSXP) { + low = PROTECT(coerceVector(low, REALSXP)); + protect_count++; + } + if(TYPEOF(close) != REALSXP) { + close = PROTECT(coerceVector(close, REALSXP)); + protect_count++; + } + + R_xlen_t n = XLENGTH(open); + if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); + } + if(n == 0) { + SEXP result = PROTECT(allocVector(INTSXP, 0)); + if(protect_count > 0) UNPROTECT(protect_count); + UNPROTECT(1); + return result; + } + if(n > INT_MAX) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; + + const double * restrict open_ptr = REAL(open); + const double * restrict high_ptr = REAL(high); + const double * restrict low_ptr = REAL(low); + const double * restrict close_ptr = REAL(close); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int * restrict out_ptr = INTEGER(result); + + int out_beg_idx = 0; + int out_nb_elem = 0; + TA_RetCode ret_code = TA_CDLDRAGONFLYDOJI( + 0, len - 1, + open_ptr, high_ptr, low_ptr, close_ptr, + &out_beg_idx, &out_nb_elem, + out_ptr + ); + if(ret_code != TA_SUCCESS) { + if(protect_count > 0) UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + if(out_nb_elem == 0) { + for(R_xlen_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + if(protect_count > 0) UNPROTECT(protect_count); + return result; + } + if(out_beg_idx > 0) { + memmove(out_ptr + out_beg_idx, out_ptr, (n - out_beg_idx) * sizeof(int)); + for(int i = 0; i < out_beg_idx; ++i) { + out_ptr[i] = NA_INTEGER; + } + } + if(protect_count > 0) UNPROTECT(protect_count); + return result; +} \ No newline at end of file diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c new file mode 100644 index 000000000..d64f4a723 --- /dev/null +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -0,0 +1,111 @@ +// Interface to TA_CDLEVENINGDOJISTAR +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// penetration: numeric scalar specifying the percentage penetration of the third candle into the first candle's body (for pattern confirmation) +// +// Description +// Identifies the "Evening Doji Star" candlestick pattern, a three-day bearish reversal pattern (a long bullish candle, followed by a Doji that gaps up, then a bearish candle closing well into the first candle's body). +// Returns an integer vector of the same length, with -100 at each index where an Evening Doji Star pattern is detected (0 if no pattern). +// The `penetration` parameter is a percentage (typically 0–100%) that defines how deeply the third candle should penetrate into the first candle's body for confirmation (e.g., 30 for 30%). +// Leading NA values are padded for the initial period before any pattern can occur. +#include "lib.h" +#include +#include + +SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration) { + int protect_count = 0; + if(TYPEOF(open) != REALSXP) { + open = PROTECT(coerceVector(open, REALSXP)); + protect_count++; + } + if(TYPEOF(high) != REALSXP) { + high = PROTECT(coerceVector(high, REALSXP)); + protect_count++; + } + if(TYPEOF(low) != REALSXP) { + low = PROTECT(coerceVector(low, REALSXP)); + protect_count++; + } + if(TYPEOF(close) != REALSXP) { + close = PROTECT(coerceVector(close, REALSXP)); + protect_count++; + } + + // Validate and extract the penetration parameter + double pen = 0.0; + if(penetration == R_NilValue) { + // If no penetration provided (should not happen in .Call, but just in case), use default 0 + pen = 0.0; + } else { + if((TYPEOF(penetration) != REALSXP && TYPEOF(penetration) != INTSXP) || XLENGTH(penetration) != 1) { + // Ensure penetration is a single numeric value + if(protect_count > 0) UNPROTECT(protect_count); + error("Parameter 'penetration' must be a numeric scalar"); + } + pen = asReal(penetration); // extract as double (accepts int or real SEXP) + if(pen < 0.0) { + // Penetration percentage should not be negative + if(protect_count > 0) UNPROTECT(protect_count); + error("'penetration' must be a non-negative percentage"); + } + } + + R_xlen_t n = XLENGTH(open); + if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); + } + if(n == 0) { + SEXP result = PROTECT(allocVector(INTSXP, 0)); + if(protect_count > 0) UNPROTECT(protect_count); + UNPROTECT(1); + return result; + } + if(n > INT_MAX) { + if(protect_count > 0) UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; + + const double * restrict open_ptr = REAL(open); + const double * restrict high_ptr = REAL(high); + const double * restrict low_ptr = REAL(low); + const double * restrict close_ptr = REAL(close); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int * restrict out_ptr = INTEGER(result); + + int out_beg_idx = 0; + int out_nb_elem = 0; + TA_RetCode ret_code = TA_CDLEVENINGDOJISTAR( + 0, len - 1, + open_ptr, high_ptr, low_ptr, close_ptr, + pen, // penetration percentage for pattern confirmation + &out_beg_idx, &out_nb_elem, + out_ptr + ); + if(ret_code != TA_SUCCESS) { + if(protect_count > 0) UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + if(out_nb_elem == 0) { + for(R_xlen_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + if(protect_count > 0) UNPROTECT(protect_count); + return result; + } + if(out_beg_idx > 0) { + memmove(out_ptr + out_beg_idx, out_ptr, (n - out_beg_idx) * sizeof(int)); + for(int i = 0; i < out_beg_idx; ++i) { + out_ptr[i] = NA_INTEGER; + } + } + if(protect_count > 0) UNPROTECT(protect_count); + return result; +} \ No newline at end of file From 751397e1d1a26b3ea1008cd1bb803d9c324afba1 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:08:21 +0200 Subject: [PATCH 021/166] :hammer: Deleted old files and Makevars --- src/Makevars | 3 --- src/weighted_moving_average.c | 40 ----------------------------------- 2 files changed, 43 deletions(-) delete mode 100644 src/Makevars delete mode 100644 src/weighted_moving_average.c diff --git a/src/Makevars b/src/Makevars deleted file mode 100644 index 796c1a623..000000000 --- a/src/Makevars +++ /dev/null @@ -1,3 +0,0 @@ -# autogenerated by configure -PKG_CPPFLAGS = -I/usr/local/include/ta-lib -PKG_LIBS = -L/usr/local/lib -lta-lib -Wl,-rpath,/usr/local/lib diff --git a/src/weighted_moving_average.c b/src/weighted_moving_average.c deleted file mode 100644 index 54b260f15..000000000 --- a/src/weighted_moving_average.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "lib.h" - -SEXP c_weighted_moving_average(const SEXP x, const SEXP lag) { - const int timePeriod = asInteger(lag); - const int len = length(x); - const double *__restrict__ x_data = REAL(x); - int outBegIdx = 0, outNBElement = 0; - - // Output buffer: at most len elements; R_alloc is fast and GC-managed - double *__restrict__ outReal = (double *)R_alloc((size_t)len, sizeof(double)); - - // Call TA-LIB WMA: startIdx=0, endIdx=len-1 - TA_RetCode ret = TA_WMA(0, len - 1, x_data, timePeriod, &outBegIdx, - &outNBElement, outReal); - - // Prepare full-length vector with leading NAs (lookback) - SEXP ans = PROTECT(allocVector(REALSXP, len)); - double *ans_d = REAL(ans); - - if (ret != TA_SUCCESS || outNBElement <= 0) { - // Failure: fill with NA - for (int i = 0; i < len; ++i) - ans_d[i] = NA_REAL; - UNPROTECT(1); - return ans; - } - - // Leading NA for lookback - for (int i = 0; i < outBegIdx; ++i) - ans_d[i] = NA_REAL; - - // Copy the computed WMA results - memcpy(ans_d + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - - // (Trailing part should naturally be filled by outNBElement; since endIdx = - // len-1, no further action) - - UNPROTECT(1); - return ans; -} \ No newline at end of file From f8826f5dbde9121f46b2dde912c7fa2ca0f63e6e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:08:57 +0200 Subject: [PATCH 022/166] :hammer: Updated Makevars --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 7311fafa8..8cf9c3c9d 100644 --- a/.gitignore +++ b/.gitignore @@ -49,5 +49,8 @@ po/*~ rsconnect/ .Rproj.user +# Makevars +src/Makevars + # Building nots NOTES.md \ No newline at end of file From 524eefe15bfa43bd5e882915a958b9184cd75360 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 15:12:34 +0200 Subject: [PATCH 023/166] :hammer: Generated comments to api.h and init.c --- src/api.h | 2 +- src/init.c | 2 +- tools/generate_API.sh | 1 + tools/generate_FFI.sh | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api.h b/src/api.h index c668dead5..1dfcefded 100644 --- a/src/api.h +++ b/src/api.h @@ -1,9 +1,9 @@ +// Generated from tools/generate_API.sh #ifndef _API_H_ #define _API_H_ #include -SEXP c_weighted_moving_average(const SEXP x, const SEXP lag); SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); diff --git a/src/init.c b/src/init.c index be4950786..660c220a0 100644 --- a/src/init.c +++ b/src/init.c @@ -1,3 +1,4 @@ +// Generated from tools/generate_FFI.sh #include #include #include @@ -7,7 +8,6 @@ #define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} static const R_CallMethodDef CallEntries[] = { - CALLDEF(c_weighted_moving_average, 2), CALLDEF(impl_ta_ACCBANDS, 4), CALLDEF(impl_ta_APO, 4), CALLDEF(impl_ta_AROONOSC, 3), diff --git a/tools/generate_API.sh b/tools/generate_API.sh index 73c5dc9ce..3bf0c117c 100755 --- a/tools/generate_API.sh +++ b/tools/generate_API.sh @@ -20,6 +20,7 @@ OUT_FILE="${2:-api.h}" print_header() { cat <<'EOF' +// Generated from tools/generate_API.sh #ifndef _API_H_ #define _API_H_ diff --git a/tools/generate_FFI.sh b/tools/generate_FFI.sh index a08883c58..ebc0dff8f 100755 --- a/tools/generate_FFI.sh +++ b/tools/generate_FFI.sh @@ -11,6 +11,7 @@ OUT_FILE="${2:-init.c}" print_header() { cat <<'EOF' +// Generated from tools/generate_FFI.sh #include #include #include From a397ac0fb2129552b2fe30b71fee89e8e257db66 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:00:34 +0200 Subject: [PATCH 024/166] :hammer: Cleaned up files --- src/lib.h | 43 +----------------- src/shift.h | 89 +++++++++++++++++++++++++++++++++++++ src/ta_CDLDOJI.c | 77 ++++++-------------------------- src/ta_CDLDOJISTAR.c | 43 ++---------------- src/ta_CDLDRAGONFLYDOJI.c | 43 ++---------------- src/ta_CDLEVENINGDOJISTAR.c | 63 +++----------------------- 6 files changed, 117 insertions(+), 241 deletions(-) create mode 100644 src/shift.h diff --git a/src/lib.h b/src/lib.h index fceb29462..97e9418fc 100644 --- a/src/lib.h +++ b/src/lib.h @@ -11,6 +11,7 @@ // C Headers #include +#include "shift.h" // Redifne integers to abvoid // R definition clashes @@ -70,47 +71,5 @@ static TA_MAType map_moving_average(const SEXP x) { return TA_MAType_SMA; } -// shift_array -// -// Description -// This function shifts arrays to the right -// and pads the array with leading NA_REAL -// -// -static void shift_array(double *arr, int len, int shift) { - // 0) edge-case: - // If the shift is greater than - // the length of the array, or the shift - // is lte 0, everything is NA. - // - // **NOTE:** this is highly unlikely but - // added just in case to avoid crashes. - // - // It could probably be a better idea just - // terminate the function instead. - if (shift <= 0 || shift >= len) { - for (int i = 0; i < len; ++i) { - arr[i] = NA_REAL; - } - return; - } - - // 1) shift the arrayy - // in place - memmove( - /*dest:*/ arr + shift, // NOTE: arr + shift advances pointer, ie. shifts - // the entire array in memory. So an array of - // {0,1,2} shifted with 1 does {garbage value, 1, - // 2}, a shift by 0 just returns the {0,1,2} array - /*src*/ arr, - /*n*/ (size_t)(len - shift) * sizeof(double)); - - // 2) add leading NAs - // as NA_REAL for - // type compatibility - for (int i = 0; i < shift; ++i) { - arr[i] = NA_REAL; - } -} #endif // _LIB_H_ \ No newline at end of file diff --git a/src/shift.h b/src/shift.h new file mode 100644 index 000000000..c4efb9bed --- /dev/null +++ b/src/shift.h @@ -0,0 +1,89 @@ +#ifndef _SHIFT_H +#define _SHIFT_H +// Shift Arrays +// +// This program creates a generic function +// that shifts an array. Its like function overloading +// and templates, but with extra steps. +// +// See: https://gist.github.com/barosl/e0af4a92b2b8cabd05a7 +// See: https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c +// See: https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c/25026358#25026358 +#include "R_ext/Arith.h" +#include + +static void shift_double_array(double *arr, int len, int shift) { + // 0) edge-case: + // If the shift is greater than + // the length of the array, or the shift + // is lte 0, everything is NA. + // + // **NOTE:** this is highly unlikely but + // added just in case to avoid crashes. + // + // It could probably be a better idea just + // terminate the function instead. + if (shift <= 0 || shift >= len) { + for (int i = 0; i < len; ++i) { + arr[i] = NA_REAL; + } + return; + } + + // 1) shift the arrayy + // in place + memmove( + /*dest:*/ arr + shift, // NOTE: arr + shift advances pointer, ie. shifts + // the entire array in memory. So an array of + // {0,1,2} shifted with 1 does {garbage value, 1, + // 2}, a shift by 0 just returns the {0,1,2} array + /*src*/ arr, + /*n*/ (size_t)(len - shift) * sizeof(double)); + + // 2) add leading NAs + // as NA_REAL for + // type compatibility + for (int i = 0; i < shift; ++i) { + arr[i] = NA_REAL; + } +} + +static void shift_int_array(int *arr, int len, int shift) { + // 0) edge-case: + // If the shift is greater than + // the length of the array, or the shift + // is lte 0, everything is NA. + // + // **NOTE:** this is highly unlikely but + // added just in case to avoid crashes. + // + // It could probably be a better idea just + // terminate the function instead. + if (shift < 0 || shift >= len) { // Possible bug: If there is no shift, then this would fill it with NAs. Same geos for the double versions + for (int i = 0; i < len; ++i) { + arr[i] = NA_INTEGER; + } + return; + } + + // 1) shift the arrayy + // in place + memmove( + /*dest:*/ arr + shift, // NOTE: arr + shift advances pointer, ie. shifts + // the entire array in memory. So an array of + // {0,1,2} shifted with 1 does {garbage value, 1, + // 2}, a shift by 0 just returns the {0,1,2} array + /*src*/ arr, + /*n*/ (size_t)(len - shift) * sizeof(int)); + + // 2) add leading NAs + // as NA_REAL for + // type compatibility + for (int i = 0; i < shift; ++i) { + arr[i] = NA_INTEGER; + } +} + +#define shift_array(arr, len, shift) _Generic((arr), int*: shift_int_array, double*: shift_double_array)(arr, len, shift) + +#endif // _SHIFT_H \ No newline at end of file diff --git a/src/ta_CDLDOJI.c b/src/ta_CDLDOJI.c index 234936383..9991d3b07 100644 --- a/src/ta_CDLDOJI.c +++ b/src/ta_CDLDOJI.c @@ -11,45 +11,15 @@ // Returns an integer vector of the same length as the inputs, with 100 for each index where a Doji pattern is detected (0 otherwise). // Leading NA values are padded for periods before the first output can be computed (if any). #include "lib.h" +#include "shift.h" #include #include SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { - // Ensure input types are numeric (double); coerce if necessary for safety - int protect_count = 0; - if(TYPEOF(open) != REALSXP) { - open = PROTECT(coerceVector(open, REALSXP)); - protect_count++; - } - if(TYPEOF(high) != REALSXP) { - high = PROTECT(coerceVector(high, REALSXP)); - protect_count++; - } - if(TYPEOF(low) != REALSXP) { - low = PROTECT(coerceVector(low, REALSXP)); - protect_count++; - } - if(TYPEOF(close) != REALSXP) { - close = PROTECT(coerceVector(close, REALSXP)); - protect_count++; - } - // All price vectors must have the same length R_xlen_t n = XLENGTH(open); - if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); - } - - // If no data points, return an empty integer vector (length 0) - if(n == 0) { - SEXP result = PROTECT(allocVector(INTSXP, 0)); - if(protect_count > 0) UNPROTECT(protect_count); - UNPROTECT(1); - return result; - } + int protect_count = 0; - // TA-Lib uses 32-bit indexing; check for overflow of input length if(n > INT_MAX) { if(protect_count > 0) UNPROTECT(protect_count); error("Number of observations exceeds maximum supported by TA-Lib"); @@ -73,12 +43,15 @@ SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { // Call TA-Lib function TA_CDLDOJI to compute the pattern indicator TA_RetCode ret_code = TA_CDLDOJI( - 0, // start index (beginning of data) - len - 1, // end index (last data point) - open_ptr, high_ptr, low_ptr, close_ptr, // input price arrays - &out_beg_idx, // where the first computed output starts - &out_nb_elem, // number of output values computed - out_ptr // output buffer (integer results) + 0, + len - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &out_beg_idx, + &out_nb_elem, + out_ptr ); // Check for errors from TA-Lib computation @@ -87,34 +60,10 @@ SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { error("TA-Lib computation failed with error code %d", ret_code); } - // If TA-Lib reports no output values (e.g., not enough data for even one pattern) - if(out_nb_elem == 0) { - // Fill entire output with NA (no pattern values could be computed) - for(R_xlen_t i = 0; i < n; ++i) { - out_ptr[i] = NA_INTEGER; - } - // Unprotect and return the result vector - if(protect_count > 0) UNPROTECT(protect_count); - return result; - } - - // Shift the computed results to align with original data indices. - // `out_beg_idx` tells how many initial elements have no valid output. - if(out_beg_idx > 0) { - // Move the computed results to start at index `out_beg_idx` in the output array. - // Using memmove allows safe in-place overlapping copy. - memmove( - /* dest: */ out_ptr + out_beg_idx, - /* src: */ out_ptr, - /* n: */ (n - out_beg_idx) * sizeof(int) - ); - // Pad the leading part of the output with NA values for periods with no output - for(int i = 0; i < out_beg_idx; ++i) { - out_ptr[i] = NA_INTEGER; // NA for integer type - } - } + shift_array(out_ptr, n, out_beg_idx); // Unprotect protected objects and return the result if(protect_count > 0) UNPROTECT(protect_count); + return result; } diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index 53c7ba1e2..3e985d19d 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -16,34 +16,10 @@ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { int protect_count = 0; - if(TYPEOF(open) != REALSXP) { - open = PROTECT(coerceVector(open, REALSXP)); - protect_count++; - } - if(TYPEOF(high) != REALSXP) { - high = PROTECT(coerceVector(high, REALSXP)); - protect_count++; - } - if(TYPEOF(low) != REALSXP) { - low = PROTECT(coerceVector(low, REALSXP)); - protect_count++; - } - if(TYPEOF(close) != REALSXP) { - close = PROTECT(coerceVector(close, REALSXP)); - protect_count++; - } + R_xlen_t n = XLENGTH(open); - if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); - } - if(n == 0) { - SEXP result = PROTECT(allocVector(INTSXP, 0)); - if(protect_count > 0) UNPROTECT(protect_count); - UNPROTECT(1); - return result; - } + if(n > INT_MAX) { if(protect_count > 0) UNPROTECT(protect_count); error("Number of observations exceeds maximum supported by TA-Lib"); @@ -71,19 +47,8 @@ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { if(protect_count > 0) UNPROTECT(protect_count); error("TA-Lib computation failed with error code %d", ret_code); } - if(out_nb_elem == 0) { - for(R_xlen_t i = 0; i < n; ++i) { - out_ptr[i] = NA_INTEGER; - } - if(protect_count > 0) UNPROTECT(protect_count); - return result; - } - if(out_beg_idx > 0) { - memmove(out_ptr + out_beg_idx, out_ptr, (n - out_beg_idx) * sizeof(int)); - for(int i = 0; i < out_beg_idx; ++i) { - out_ptr[i] = NA_INTEGER; - } - } + shift_array(out_ptr, n, out_beg_idx); + if(protect_count > 0) UNPROTECT(protect_count); return result; } \ No newline at end of file diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c index a6dbe21d3..214bc6707 100644 --- a/src/ta_CDLDRAGONFLYDOJI.c +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -16,34 +16,9 @@ SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { int protect_count = 0; - if(TYPEOF(open) != REALSXP) { - open = PROTECT(coerceVector(open, REALSXP)); - protect_count++; - } - if(TYPEOF(high) != REALSXP) { - high = PROTECT(coerceVector(high, REALSXP)); - protect_count++; - } - if(TYPEOF(low) != REALSXP) { - low = PROTECT(coerceVector(low, REALSXP)); - protect_count++; - } - if(TYPEOF(close) != REALSXP) { - close = PROTECT(coerceVector(close, REALSXP)); - protect_count++; - } - + R_xlen_t n = XLENGTH(open); - if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); - } - if(n == 0) { - SEXP result = PROTECT(allocVector(INTSXP, 0)); - if(protect_count > 0) UNPROTECT(protect_count); - UNPROTECT(1); - return result; - } + if(n > INT_MAX) { if(protect_count > 0) UNPROTECT(protect_count); error("Number of observations exceeds maximum supported by TA-Lib"); @@ -71,19 +46,7 @@ SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { if(protect_count > 0) UNPROTECT(protect_count); error("TA-Lib computation failed with error code %d", ret_code); } - if(out_nb_elem == 0) { - for(R_xlen_t i = 0; i < n; ++i) { - out_ptr[i] = NA_INTEGER; - } - if(protect_count > 0) UNPROTECT(protect_count); - return result; - } - if(out_beg_idx > 0) { - memmove(out_ptr + out_beg_idx, out_ptr, (n - out_beg_idx) * sizeof(int)); - for(int i = 0; i < out_beg_idx; ++i) { - out_ptr[i] = NA_INTEGER; - } - } + shift_array(out_ptr, n, out_beg_idx); if(protect_count > 0) UNPROTECT(protect_count); return result; } \ No newline at end of file diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c index d64f4a723..f492e3c3f 100644 --- a/src/ta_CDLEVENINGDOJISTAR.c +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -13,58 +13,20 @@ // The `penetration` parameter is a percentage (typically 0–100%) that defines how deeply the third candle should penetrate into the first candle's body for confirmation (e.g., 30 for 30%). // Leading NA values are padded for the initial period before any pattern can occur. #include "lib.h" +#include "shift.h" #include #include SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration) { int protect_count = 0; - if(TYPEOF(open) != REALSXP) { - open = PROTECT(coerceVector(open, REALSXP)); - protect_count++; - } - if(TYPEOF(high) != REALSXP) { - high = PROTECT(coerceVector(high, REALSXP)); - protect_count++; - } - if(TYPEOF(low) != REALSXP) { - low = PROTECT(coerceVector(low, REALSXP)); - protect_count++; - } - if(TYPEOF(close) != REALSXP) { - close = PROTECT(coerceVector(close, REALSXP)); - protect_count++; - } + // Validate and extract the penetration parameter - double pen = 0.0; - if(penetration == R_NilValue) { - // If no penetration provided (should not happen in .Call, but just in case), use default 0 - pen = 0.0; - } else { - if((TYPEOF(penetration) != REALSXP && TYPEOF(penetration) != INTSXP) || XLENGTH(penetration) != 1) { - // Ensure penetration is a single numeric value - if(protect_count > 0) UNPROTECT(protect_count); - error("Parameter 'penetration' must be a numeric scalar"); - } - pen = asReal(penetration); // extract as double (accepts int or real SEXP) - if(pen < 0.0) { - // Penetration percentage should not be negative - if(protect_count > 0) UNPROTECT(protect_count); - error("'penetration' must be a non-negative percentage"); - } - } + double pen = REAL(penetration)[0]; + R_xlen_t n = XLENGTH(open); - if(XLENGTH(high) != n || XLENGTH(low) != n || XLENGTH(close) != n) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Input vectors 'open', 'high', 'low', 'close' must have the same length"); - } - if(n == 0) { - SEXP result = PROTECT(allocVector(INTSXP, 0)); - if(protect_count > 0) UNPROTECT(protect_count); - UNPROTECT(1); - return result; - } + if(n > INT_MAX) { if(protect_count > 0) UNPROTECT(protect_count); error("Number of observations exceeds maximum supported by TA-Lib"); @@ -93,19 +55,8 @@ SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP if(protect_count > 0) UNPROTECT(protect_count); error("TA-Lib computation failed with error code %d", ret_code); } - if(out_nb_elem == 0) { - for(R_xlen_t i = 0; i < n; ++i) { - out_ptr[i] = NA_INTEGER; - } - if(protect_count > 0) UNPROTECT(protect_count); - return result; - } - if(out_beg_idx > 0) { - memmove(out_ptr + out_beg_idx, out_ptr, (n - out_beg_idx) * sizeof(int)); - for(int i = 0; i < out_beg_idx; ++i) { - out_ptr[i] = NA_INTEGER; - } - } + shift_array(out_ptr, n, out_beg_idx); + if(protect_count > 0) UNPROTECT(protect_count); return result; } \ No newline at end of file From 0141b4a329c0807aebd276c9ba116c70fffe13e7 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:58:40 +0200 Subject: [PATCH 025/166] :hammer: Cleaned up shift.h * Documented the program. --- src/shift.h | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/src/shift.h b/src/shift.h index c4efb9bed..ae0245a4f 100644 --- a/src/shift.h +++ b/src/shift.h @@ -1,14 +1,29 @@ -#ifndef _SHIFT_H -#define _SHIFT_H -// Shift Arrays +// shift_array +// +// Parameters +// arr: the array to be shifted. Double or int pointer +// len: the size of the input array. Int. +// shift: the amount of shifting. Int. +// +// Description +// This function shifts an array to the right, or down in memory, and adds +// leading NAs from 0 to the shift value. // -// This program creates a generic function -// that shifts an array. Its like function overloading -// and templates, but with extra steps. +// Details +// arr + shift advances pointer, ie. shifts +// the entire array in memory. So an array of +// {0,1,2} shifted with 1 does {garbage value, 1, +// 2}, a shift by 0 just returns the {0,1,2} array // +// Note // See: https://gist.github.com/barosl/e0af4a92b2b8cabd05a7 -// See: https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c -// See: https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c/25026358#25026358 +// See: +// https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c +// See: +// https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c/25026358#25026358 +#ifndef _SHIFT_H +#define _SHIFT_H + #include "R_ext/Arith.h" #include @@ -23,7 +38,7 @@ static void shift_double_array(double *arr, int len, int shift) { // // It could probably be a better idea just // terminate the function instead. - if (shift <= 0 || shift >= len) { + if (shift < 0 || shift >= len) { for (int i = 0; i < len; ++i) { arr[i] = NA_REAL; } @@ -33,10 +48,7 @@ static void shift_double_array(double *arr, int len, int shift) { // 1) shift the arrayy // in place memmove( - /*dest:*/ arr + shift, // NOTE: arr + shift advances pointer, ie. shifts - // the entire array in memory. So an array of - // {0,1,2} shifted with 1 does {garbage value, 1, - // 2}, a shift by 0 just returns the {0,1,2} array + /*dest:*/ arr + shift, /*src*/ arr, /*n*/ (size_t)(len - shift) * sizeof(double)); @@ -59,7 +71,7 @@ static void shift_int_array(int *arr, int len, int shift) { // // It could probably be a better idea just // terminate the function instead. - if (shift < 0 || shift >= len) { // Possible bug: If there is no shift, then this would fill it with NAs. Same geos for the double versions + if (shift < 0 || shift >= len) { for (int i = 0; i < len; ++i) { arr[i] = NA_INTEGER; } @@ -69,10 +81,7 @@ static void shift_int_array(int *arr, int len, int shift) { // 1) shift the arrayy // in place memmove( - /*dest:*/ arr + shift, // NOTE: arr + shift advances pointer, ie. shifts - // the entire array in memory. So an array of - // {0,1,2} shifted with 1 does {garbage value, 1, - // 2}, a shift by 0 just returns the {0,1,2} array + /*dest:*/ arr + shift, /*src*/ arr, /*n*/ (size_t)(len - shift) * sizeof(int)); @@ -84,6 +93,7 @@ static void shift_int_array(int *arr, int len, int shift) { } } -#define shift_array(arr, len, shift) _Generic((arr), int*: shift_int_array, double*: shift_double_array)(arr, len, shift) +#define shift_array(arr, len, shift) \ + _Generic((arr), int*: shift_int_array, double*: shift_double_array)(arr, len, shift) #endif // _SHIFT_H \ No newline at end of file From 219c493d720dba6be57b5763d419ad774ad044cd Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 21:59:00 +0200 Subject: [PATCH 026/166] :hammer: Ran make fmt --- src/api.h | 28 +++++++---- src/init.c | 38 +++++++------- src/lib.h | 3 +- src/ta_CDLDOJI.c | 83 +++++++++++++++---------------- src/ta_CDLDOJISTAR.c | 70 +++++++++++++------------- src/ta_CDLDRAGONFLYDOJI.c | 70 +++++++++++++------------- src/ta_CDLEVENINGDOJISTAR.c | 99 +++++++++++++++++++------------------ src/ta_STOCH.c | 1 - src/ta_STOCHF.c | 8 +-- 9 files changed, 207 insertions(+), 193 deletions(-) diff --git a/src/api.h b/src/api.h index 1dfcefded..7132921ee 100644 --- a/src/api.h +++ b/src/api.h @@ -4,21 +4,31 @@ #include -SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); -SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); +SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, + SEXP optTimePeriod); +SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, + SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); -SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); +SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, + SEXP optNbDevDn, SEXP optMAType); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close); SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close); -SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration); -SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); +SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP penetration); +SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, + SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); -SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); -SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); -SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype); -SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3); +SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, + SEXP fastd_period, SEXP fastd_matype); +SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, + SEXP fastd_period, SEXP fastd_matype); +SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, + SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, + SEXP slowd_matype); +SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, + SEXP timeperiod2, SEXP timeperiod3); #endif diff --git a/src/init.c b/src/init.c index 660c220a0..a444e2248 100644 --- a/src/init.c +++ b/src/init.c @@ -5,24 +5,24 @@ #include "api.h" -#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} +#define CALLDEF(name, n) \ + { #name, (DL_FUNC)&name, n } static const R_CallMethodDef CallEntries[] = { - CALLDEF(impl_ta_ACCBANDS, 4), - CALLDEF(impl_ta_APO, 4), - CALLDEF(impl_ta_AROONOSC, 3), - CALLDEF(impl_ta_AROON, 3), - CALLDEF(impl_ta_BBANDS, 5), - CALLDEF(impl_ta_CDLDOJI, 4), - CALLDEF(impl_ta_CDLDOJISTAR, 4), - CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 4), - CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 5), - CALLDEF(impl_ta_MACD, 4), - CALLDEF(impl_ta_MA, 3), - CALLDEF(impl_ta_RSI, 2), - CALLDEF(impl_ta_STOCHF, 6), - CALLDEF(impl_ta_STOCHRSI, 5), - CALLDEF(impl_ta_STOCH, 8), - CALLDEF(impl_ta_ULTOSC, 6), - {NULL, NULL, 0} -}; + CALLDEF(impl_ta_ACCBANDS, 4), + CALLDEF(impl_ta_APO, 4), + CALLDEF(impl_ta_AROONOSC, 3), + CALLDEF(impl_ta_AROON, 3), + CALLDEF(impl_ta_BBANDS, 5), + CALLDEF(impl_ta_CDLDOJI, 4), + CALLDEF(impl_ta_CDLDOJISTAR, 4), + CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 4), + CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 5), + CALLDEF(impl_ta_MACD, 4), + CALLDEF(impl_ta_MA, 3), + CALLDEF(impl_ta_RSI, 2), + CALLDEF(impl_ta_STOCHF, 6), + CALLDEF(impl_ta_STOCHRSI, 5), + CALLDEF(impl_ta_STOCH, 8), + CALLDEF(impl_ta_ULTOSC, 6), + {NULL, NULL, 0}}; diff --git a/src/lib.h b/src/lib.h index 97e9418fc..35c0985c2 100644 --- a/src/lib.h +++ b/src/lib.h @@ -10,8 +10,8 @@ #include // C Headers -#include #include "shift.h" +#include // Redifne integers to abvoid // R definition clashes @@ -71,5 +71,4 @@ static TA_MAType map_moving_average(const SEXP x) { return TA_MAType_SMA; } - #endif // _LIB_H_ \ No newline at end of file diff --git a/src/ta_CDLDOJI.c b/src/ta_CDLDOJI.c index 9991d3b07..c4d797953 100644 --- a/src/ta_CDLDOJI.c +++ b/src/ta_CDLDOJI.c @@ -7,9 +7,11 @@ // close: numeric vector of closing prices // // Description -// Identifies "Doji" candlestick patterns, where the open and close prices are nearly equal, indicating market indecision. -// Returns an integer vector of the same length as the inputs, with 100 for each index where a Doji pattern is detected (0 otherwise). -// Leading NA values are padded for periods before the first output can be computed (if any). +// Identifies "Doji" candlestick patterns, where the open and close prices are +// nearly equal, indicating market indecision. Returns an integer vector of +// the same length as the inputs, with 100 for each index where a Doji pattern +// is detected (0 otherwise). Leading NA values are padded for periods before +// the first output can be computed (if any). #include "lib.h" #include "shift.h" #include @@ -17,53 +19,48 @@ SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { - R_xlen_t n = XLENGTH(open); - int protect_count = 0; + R_xlen_t n = XLENGTH(open); + int protect_count = 0; - if(n > INT_MAX) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; // safe to cast after checking + if (n > INT_MAX) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; // safe to cast after checking - // Get pointers to the input data (treated as double arrays for TA-Lib) - const double * restrict open_ptr = REAL(open); - const double * restrict high_ptr = REAL(high); - const double * restrict low_ptr = REAL(low); - const double * restrict close_ptr = REAL(close); + // Get pointers to the input data (treated as double arrays for TA-Lib) + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); - // Allocate an integer output vector of length n for the result - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; - int * restrict out_ptr = INTEGER(result); + // Allocate an integer output vector of length n for the result + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); - // Prepare variables to receive output range from TA-Lib - int out_beg_idx = 0; - int out_nb_elem = 0; + // Prepare variables to receive output range from TA-Lib + int out_beg_idx = 0; + int out_nb_elem = 0; - // Call TA-Lib function TA_CDLDOJI to compute the pattern indicator - TA_RetCode ret_code = TA_CDLDOJI( - 0, - len - 1, - open_ptr, - high_ptr, - low_ptr, - close_ptr, - &out_beg_idx, - &out_nb_elem, - out_ptr - ); + // Call TA-Lib function TA_CDLDOJI to compute the pattern indicator + TA_RetCode ret_code = + TA_CDLDOJI(0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &out_beg_idx, &out_nb_elem, out_ptr); - // Check for errors from TA-Lib computation - if(ret_code != TA_SUCCESS) { - if(protect_count > 0) UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } + // Check for errors from TA-Lib computation + if (ret_code != TA_SUCCESS) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } - shift_array(out_ptr, n, out_beg_idx); + shift_array(out_ptr, n, out_beg_idx); - // Unprotect protected objects and return the result - if(protect_count > 0) UNPROTECT(protect_count); + // Unprotect protected objects and return the result + if (protect_count > 0) + UNPROTECT(protect_count); - return result; + return result; } diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index 3e985d19d..edfce6566 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -7,48 +7,50 @@ // close: numeric vector of closing prices // // Description -// Identifies the "Doji Star" candlestick pattern, which is a two-day pattern where a Doji candle appears after a long candle (gap-up or gap-down). -// Returns an integer vector of the same length, with +100 indicating a bullish Doji Star pattern and -100 indicating a bearish Doji Star (0 if no pattern). -// Leading NA values are padded for periods before the first pattern can be detected. +// Identifies the "Doji Star" candlestick pattern, which is a two-day pattern +// where a Doji candle appears after a long candle (gap-up or gap-down). +// Returns an integer vector of the same length, with +100 indicating a +// bullish Doji Star pattern and -100 indicating a bearish Doji Star (0 if no +// pattern). Leading NA values are padded for periods before the first pattern +// can be detected. #include "lib.h" #include #include SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { - int protect_count = 0; - + int protect_count = 0; - R_xlen_t n = XLENGTH(open); - - if(n > INT_MAX) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; + R_xlen_t n = XLENGTH(open); - const double * restrict open_ptr = REAL(open); - const double * restrict high_ptr = REAL(high); - const double * restrict low_ptr = REAL(low); - const double * restrict close_ptr = REAL(close); + if (n > INT_MAX) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; - int * restrict out_ptr = INTEGER(result); + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); - int out_beg_idx = 0; - int out_nb_elem = 0; - TA_RetCode ret_code = TA_CDLDOJISTAR( - 0, len - 1, - open_ptr, high_ptr, low_ptr, close_ptr, - &out_beg_idx, &out_nb_elem, - out_ptr - ); - if(ret_code != TA_SUCCESS) { - if(protect_count > 0) UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } - shift_array(out_ptr, n, out_beg_idx); + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); - if(protect_count > 0) UNPROTECT(protect_count); - return result; + int out_beg_idx = 0; + int out_nb_elem = 0; + TA_RetCode ret_code = + TA_CDLDOJISTAR(0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &out_beg_idx, &out_nb_elem, out_ptr); + if (ret_code != TA_SUCCESS) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + shift_array(out_ptr, n, out_beg_idx); + + if (protect_count > 0) + UNPROTECT(protect_count); + return result; } \ No newline at end of file diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c index 214bc6707..e1c56facf 100644 --- a/src/ta_CDLDRAGONFLYDOJI.c +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -7,46 +7,48 @@ // close: numeric vector of closing prices // // Description -// Identifies the "Dragonfly Doji" candlestick pattern, characterized by a Doji with a long lower shadow and virtually no upper shadow. -// Returns an integer vector of the same length, with 100 for each index where a Dragonfly Doji pattern is found (0 if no pattern). -// Leading NA values are padded for periods before the first pattern can be detected. +// Identifies the "Dragonfly Doji" candlestick pattern, characterized by a +// Doji with a long lower shadow and virtually no upper shadow. Returns an +// integer vector of the same length, with 100 for each index where a +// Dragonfly Doji pattern is found (0 if no pattern). Leading NA values are +// padded for periods before the first pattern can be detected. #include "lib.h" #include #include SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { - int protect_count = 0; - - R_xlen_t n = XLENGTH(open); - - if(n > INT_MAX) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; + int protect_count = 0; - const double * restrict open_ptr = REAL(open); - const double * restrict high_ptr = REAL(high); - const double * restrict low_ptr = REAL(low); - const double * restrict close_ptr = REAL(close); + R_xlen_t n = XLENGTH(open); - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; - int * restrict out_ptr = INTEGER(result); + if (n > INT_MAX) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; - int out_beg_idx = 0; - int out_nb_elem = 0; - TA_RetCode ret_code = TA_CDLDRAGONFLYDOJI( - 0, len - 1, - open_ptr, high_ptr, low_ptr, close_ptr, - &out_beg_idx, &out_nb_elem, - out_ptr - ); - if(ret_code != TA_SUCCESS) { - if(protect_count > 0) UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } - shift_array(out_ptr, n, out_beg_idx); - if(protect_count > 0) UNPROTECT(protect_count); - return result; + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + int out_beg_idx = 0; + int out_nb_elem = 0; + TA_RetCode ret_code = + TA_CDLDRAGONFLYDOJI(0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &out_beg_idx, &out_nb_elem, out_ptr); + if (ret_code != TA_SUCCESS) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + shift_array(out_ptr, n, out_beg_idx); + if (protect_count > 0) + UNPROTECT(protect_count); + return result; } \ No newline at end of file diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c index f492e3c3f..1ecc9a4f6 100644 --- a/src/ta_CDLEVENINGDOJISTAR.c +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -5,58 +5,63 @@ // high: numeric vector of high prices // low: numeric vector of low prices // close: numeric vector of closing prices -// penetration: numeric scalar specifying the percentage penetration of the third candle into the first candle's body (for pattern confirmation) +// penetration: numeric scalar specifying the percentage penetration of the +// third candle into the first candle's body (for pattern confirmation) // // Description -// Identifies the "Evening Doji Star" candlestick pattern, a three-day bearish reversal pattern (a long bullish candle, followed by a Doji that gaps up, then a bearish candle closing well into the first candle's body). -// Returns an integer vector of the same length, with -100 at each index where an Evening Doji Star pattern is detected (0 if no pattern). -// The `penetration` parameter is a percentage (typically 0–100%) that defines how deeply the third candle should penetrate into the first candle's body for confirmation (e.g., 30 for 30%). -// Leading NA values are padded for the initial period before any pattern can occur. +// Identifies the "Evening Doji Star" candlestick pattern, a three-day bearish +// reversal pattern (a long bullish candle, followed by a Doji that gaps up, +// then a bearish candle closing well into the first candle's body). Returns +// an integer vector of the same length, with -100 at each index where an +// Evening Doji Star pattern is detected (0 if no pattern). The `penetration` +// parameter is a percentage (typically 0–100%) that defines how deeply the +// third candle should penetrate into the first candle's body for confirmation +// (e.g., 30 for 30%). Leading NA values are padded for the initial period +// before any pattern can occur. #include "lib.h" #include "shift.h" #include #include -SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration) { - int protect_count = 0; - - - // Validate and extract the penetration parameter - double pen = REAL(penetration)[0]; - - - R_xlen_t n = XLENGTH(open); - - if(n > INT_MAX) { - if(protect_count > 0) UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; - - const double * restrict open_ptr = REAL(open); - const double * restrict high_ptr = REAL(high); - const double * restrict low_ptr = REAL(low); - const double * restrict close_ptr = REAL(close); - - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; - int * restrict out_ptr = INTEGER(result); - - int out_beg_idx = 0; - int out_nb_elem = 0; - TA_RetCode ret_code = TA_CDLEVENINGDOJISTAR( - 0, len - 1, - open_ptr, high_ptr, low_ptr, close_ptr, - pen, // penetration percentage for pattern confirmation - &out_beg_idx, &out_nb_elem, - out_ptr - ); - if(ret_code != TA_SUCCESS) { - if(protect_count > 0) UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } - shift_array(out_ptr, n, out_beg_idx); - - if(protect_count > 0) UNPROTECT(protect_count); - return result; +SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP penetration) { + int protect_count = 0; + + // Validate and extract the penetration parameter + double pen = REAL(penetration)[0]; + + R_xlen_t n = XLENGTH(open); + + if (n > INT_MAX) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("Number of observations exceeds maximum supported by TA-Lib"); + } + int len = (int)n; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + int out_beg_idx = 0; + int out_nb_elem = 0; + TA_RetCode ret_code = TA_CDLEVENINGDOJISTAR( + 0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, + pen, // penetration percentage for pattern confirmation + &out_beg_idx, &out_nb_elem, out_ptr); + if (ret_code != TA_SUCCESS) { + if (protect_count > 0) + UNPROTECT(protect_count); + error("TA-Lib computation failed with error code %d", ret_code); + } + shift_array(out_ptr, n, out_beg_idx); + + if (protect_count > 0) + UNPROTECT(protect_count); + return result; } \ No newline at end of file diff --git a/src/ta_STOCH.c b/src/ta_STOCH.c index ac76a4d88..d247abe92 100644 --- a/src/ta_STOCH.c +++ b/src/ta_STOCH.c @@ -23,7 +23,6 @@ SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype) { - int pCount = 0; high = PROTECT(coerceVector(high, REALSXP)); pCount++; diff --git a/src/ta_STOCHF.c b/src/ta_STOCHF.c index 416855b15..770d4911f 100644 --- a/src/ta_STOCHF.c +++ b/src/ta_STOCHF.c @@ -54,11 +54,11 @@ SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, UNPROTECT(pCount); error("TA_STOCHF failed: return code %d", ret); } - + // shift array and pad - // with leading NAs - shift_array(outFastK, n, outBeg); - shift_array(outFastD, n, outBeg); + // with leading NAs + shift_array(outFastK, n, outBeg); + shift_array(outFastD, n, outBeg); SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; SET_STRING_ELT(colnames, 0, mkChar("fastk")); From 6a69311eec6256c0eb764acda777dd8be2cc3aa9 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:30:29 +0200 Subject: [PATCH 027/166] :hammer: Updated generate_FFI.sh * The function now adds a clang-format ignore of the definitions. * Make build now formats api.h and init.c after its built to avoid having to recommit. Maybe everything should be formatted upon build really. But this is what we do for now. --- Makefile | 6 +++++- src/init.c | 5 +++-- tools/generate_FFI.sh | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ed7e65ea3..ead5a12a4 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ help: | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}' build: ## Build the R package - @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c + @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt-default @Rscript --verbose -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD INSTALL $(tarball_location) @@ -28,6 +28,10 @@ clean: ## Remove artifacts @rm -rf $(tarball_location) @rm -rf src/Makevars +fmt-default: ## Format "api.h" and "init.c". Should only be invoked via $make build. + @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h + @rm -rf ./.clang-format + fmt: ## Formate code (change -style=$1 for other styleguides) @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h @rm -rf ./.clang-format \ No newline at end of file diff --git a/src/init.c b/src/init.c index a444e2248..df3a95d33 100644 --- a/src/init.c +++ b/src/init.c @@ -5,8 +5,9 @@ #include "api.h" -#define CALLDEF(name, n) \ - { #name, (DL_FUNC)&name, n } +// clang-format off +#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} +// clang-format on static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_ACCBANDS, 4), diff --git a/tools/generate_FFI.sh b/tools/generate_FFI.sh index ebc0dff8f..275815266 100755 --- a/tools/generate_FFI.sh +++ b/tools/generate_FFI.sh @@ -18,7 +18,9 @@ print_header() { #include "api.h" -#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} +// clang-format off +#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} +// clang-format on static const R_CallMethodDef CallEntries[] = { EOF From 41d0182619047f7d63b4fcd295e3a01bb715d63d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:33:54 +0200 Subject: [PATCH 028/166] :hammer: Fuck that - we format everything, everytime. --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ead5a12a4..bac8f1f32 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ help: | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}' build: ## Build the R package - @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt-default + @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt @Rscript --verbose -e "devtools::document()" > /dev/null 2>&1 @R CMD build . && R CMD INSTALL $(tarball_location) @@ -28,10 +28,6 @@ clean: ## Remove artifacts @rm -rf $(tarball_location) @rm -rf src/Makevars -fmt-default: ## Format "api.h" and "init.c". Should only be invoked via $make build. - @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h - @rm -rf ./.clang-format - -fmt: ## Formate code (change -style=$1 for other styleguides) +fmt: ## Format code @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h @rm -rf ./.clang-format \ No newline at end of file From 74abc2861f030b302d771e552a0082a2acaa2075 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:55:03 +0200 Subject: [PATCH 029/166] :hammer: lib.h cleaned up * The MA mapper has been ditched. Its useless. --- src/lib.h | 56 +++++++++---------------------------------------------- 1 file changed, 9 insertions(+), 47 deletions(-) diff --git a/src/lib.h b/src/lib.h index 35c0985c2..5cdbb2583 100644 --- a/src/lib.h +++ b/src/lib.h @@ -1,6 +1,8 @@ -/* - -*/ +// lib.h +// +// Description +// Common high-level TA-lib agnostic functionality +// and other implementations #ifndef _LIB_H_ #define _LIB_H_ @@ -13,11 +15,13 @@ #include "shift.h" #include -// Redifne integers to abvoid +// Redifne integers to avoid // R definition clashes +// clang-format off #define Int32 TA_Lib_Int32 -#include + #include #undef Int32 +// clang-format on static void ensure_ta_initialized(void) { static int inited = 0; @@ -29,46 +33,4 @@ static void ensure_ta_initialized(void) { } } -// maps strings to MA enums -// -// args -// x: string, character -static TA_MAType map_moving_average(const SEXP x) { - - // 1) check input validity - // on C-side instead of R side - // as this function will be used frequently - // across the library. - // - // fallback: simple moving average - if (x == R_NilValue || !isString(x) || LENGTH(x) < 1) - return TA_MAType_SMA; - - // 2) map string to enum - // TODO: this might be better - // to implement as switch-statement - const char *s = CHAR(STRING_ELT(x, 0)); - if (strcasecmp(s, "SMA") == 0) - return TA_MAType_SMA; - if (strcasecmp(s, "EMA") == 0) - return TA_MAType_EMA; - if (strcasecmp(s, "WMA") == 0) - return TA_MAType_WMA; - if (strcasecmp(s, "DEMA") == 0) - return TA_MAType_DEMA; - if (strcasecmp(s, "TEMA") == 0) - return TA_MAType_TEMA; - if (strcasecmp(s, "TRIMA") == 0) - return TA_MAType_TRIMA; - if (strcasecmp(s, "KAMA") == 0) - return TA_MAType_KAMA; - if (strcasecmp(s, "MAMA") == 0) - return TA_MAType_MAMA; - if (strcasecmp(s, "T3") == 0) - return TA_MAType_T3; - - // 3) fallback: simple moving average - return TA_MAType_SMA; -} - #endif // _LIB_H_ \ No newline at end of file From c7d002727dd7e1c98b7980909c01d9228c46ef90 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 07:01:13 +0200 Subject: [PATCH 030/166] :hammer: Normalize.h * A normalization header in-place * Added clang-format off. --- src/normalize.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/shift.h | 5 +++-- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 src/normalize.h diff --git a/src/normalize.h b/src/normalize.h new file mode 100644 index 000000000..b33fd22ef --- /dev/null +++ b/src/normalize.h @@ -0,0 +1,45 @@ +// normalize +// +// Parameters +// arr: The array to be normalized. Double or int pointer +// n: The size of the input array. Int. +// factor: The factor to normalize by. Double or int. +// shift: the amount of shifting. Int. Set to 0 +// if no shifts +// +// Descriptions +// This function modifies the array in-place by scaling with +// a factor. The shifting parameter sets the starting point +// of the iterator. +// Its necesseary because the ta_CDL*.c programs returns -100, 0, 100 +// which is not R agnostic. +// +// Note +// This function adds a 10% overhead on 1e7 arrays (ish). In either case +// it might be a better approach to make the normalization optional. +#ifndef _NORMALIZE_H +#define _NORMALIZE_H + +#include + +// normalize double arrays +static inline void normalize_double(double *arr, int n, double factor, + int shift) { + for (size_t i = shift; i < n; ++i) { + arr[i] /= factor; + } +} + +// normalize int arrays +static inline void normalize_int(int *arr, int n, int factor, int shift) { + + for (size_t i = shift; i < n; ++i) { + arr[i] /= factor; + } +} + +// clang-format off +#define normalize(arr, n, factor, shift) _Generic((arr), double*: normalize_double, int*: normalize_int)((arr),(n),(factor), (shift)) +// clang-format on + +#endif /* _NORMALIZE_H */ \ No newline at end of file diff --git a/src/shift.h b/src/shift.h index ae0245a4f..d839cb421 100644 --- a/src/shift.h +++ b/src/shift.h @@ -93,7 +93,8 @@ static void shift_int_array(int *arr, int len, int shift) { } } -#define shift_array(arr, len, shift) \ - _Generic((arr), int*: shift_int_array, double*: shift_double_array)(arr, len, shift) +// clang-format off +#define shift_array(arr, len, shift) _Generic((arr), int*: shift_int_array, double*: shift_double_array)(arr, len, shift) +// clang-format on #endif // _SHIFT_H \ No newline at end of file From 2f7e6d607dd96130a8501a53ee167b525bc8ace8 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 07:02:49 +0200 Subject: [PATCH 031/166] :hammer: Implemented normalize in one function --- src/init.c | 2 +- src/ta_CDLDOJISTAR.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/init.c b/src/init.c index df3a95d33..8d0a73372 100644 --- a/src/init.c +++ b/src/init.c @@ -6,7 +6,7 @@ #include "api.h" // clang-format off -#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} +#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} // clang-format on static const R_CallMethodDef CallEntries[] = { diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index edfce6566..0756ebb65 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -14,6 +14,7 @@ // pattern). Leading NA values are padded for periods before the first pattern // can be detected. #include "lib.h" +#include "normalize.h" #include #include @@ -49,6 +50,7 @@ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { error("TA-Lib computation failed with error code %d", ret_code); } shift_array(out_ptr, n, out_beg_idx); + normalize(out_ptr, n, 100, out_beg_idx); if (protect_count > 0) UNPROTECT(protect_count); From 03c36ec830e80ed9e6313d29d2b228646b7bf9e2 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 07:28:19 +0200 Subject: [PATCH 032/166] :hammer: Added options * The candlesticks (Only one, currently) have a an option to normalize the output. --- R/ta_CDLDOJISTAR.R | 3 ++- src/api.h | 2 +- src/init.c | 2 +- src/ta_CDLDOJISTAR.c | 12 ++++++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index 9e947a75a..f1feddf62 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -16,6 +16,7 @@ doji_star.default <- function(x, ...) { .open(x), .high(x), .low(x), - .close(x) + .close(x), + as.logical(getOption("talib.normalize", TRUE)) ) } \ No newline at end of file diff --git a/src/api.h b/src/api.h index 7132921ee..e32ce8351 100644 --- a/src/api.h +++ b/src/api.h @@ -13,7 +13,7 @@ SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close); -SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close); +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration); diff --git a/src/init.c b/src/init.c index 8d0a73372..95eaefaa4 100644 --- a/src/init.c +++ b/src/init.c @@ -16,7 +16,7 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_AROON, 3), CALLDEF(impl_ta_BBANDS, 5), CALLDEF(impl_ta_CDLDOJI, 4), - CALLDEF(impl_ta_CDLDOJISTAR, 4), + CALLDEF(impl_ta_CDLDOJISTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 4), CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 5), CALLDEF(impl_ta_MACD, 4), diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index 0756ebb65..c26baebeb 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -13,12 +13,15 @@ // bullish Doji Star pattern and -100 indicating a bearish Doji Star (0 if no // pattern). Leading NA values are padded for periods before the first pattern // can be detected. +#include "R_ext/Boolean.h" +#include "Rinternals.h" #include "lib.h" #include "normalize.h" #include #include -SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { int protect_count = 0; R_xlen_t n = XLENGTH(open); @@ -49,8 +52,13 @@ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close) { UNPROTECT(protect_count); error("TA-Lib computation failed with error code %d", ret_code); } + shift_array(out_ptr, n, out_beg_idx); - normalize(out_ptr, n, 100, out_beg_idx); + + int is_true = Rf_asLogical(normalize_flag); + if (is_true == 1) { + normalize(out_ptr, n, 100, out_beg_idx); + } if (protect_count > 0) UNPROTECT(protect_count); From c567a78b65ba718bfe4a61bda4fea7a2fe1a3767 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 07:44:53 +0200 Subject: [PATCH 033/166] :hammer: DOJISTART cleanup --- src/api.h | 3 ++- src/ta_CDLDOJISTAR.c | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/api.h b/src/api.h index e32ce8351..84d7c22ba 100644 --- a/src/api.h +++ b/src/api.h @@ -13,7 +13,8 @@ SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close); -SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP flag); +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration); diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index c26baebeb..080eca438 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -5,6 +5,7 @@ // high: numeric vector of high prices // low: numeric vector of low prices // close: numeric vector of closing prices +// normalize_flag: Boolean. If TRUE normalize output by a factor // // Description // Identifies the "Doji Star" candlestick pattern, which is a two-day pattern @@ -22,15 +23,9 @@ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag) { - int protect_count = 0; + int protect_count = 0; R_xlen_t n = XLENGTH(open); - - if (n > INT_MAX) { - if (protect_count > 0) - UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } int len = (int)n; const double *restrict open_ptr = REAL(open); @@ -44,23 +39,43 @@ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, int out_beg_idx = 0; int out_nb_elem = 0; - TA_RetCode ret_code = - TA_CDLDOJISTAR(0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, - &out_beg_idx, &out_nb_elem, out_ptr); + // clang-format off + TA_RetCode ret_code = TA_CDLDOJISTAR( + 0, + len - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &out_beg_idx, + &out_nb_elem, + out_ptr + ); + // clang-format on + + // check if the returned + // value is sensible if (ret_code != TA_SUCCESS) { - if (protect_count > 0) + if (protect_count > 0) { UNPROTECT(protect_count); + } error("TA-Lib computation failed with error code %d", ret_code); } - + + // shift the array and + // and by leading NAs shift_array(out_ptr, n, out_beg_idx); + // the results are given in the range -100 and 100 + // if normalized it returns -1 and 1 int is_true = Rf_asLogical(normalize_flag); if (is_true == 1) { normalize(out_ptr, n, 100, out_beg_idx); } - if (protect_count > 0) + if (protect_count > 0) { UNPROTECT(protect_count); + } + return result; } \ No newline at end of file From 575c3bbd188b672537f1b0ecada648bb27192cc6 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 09:29:38 +0200 Subject: [PATCH 034/166] :hammer: Unit-tests * Took the first steps towards proper unit-testing --- tests/testthat/test-average_price.R | 24 ------------------ tests/testthat/test-ta_ACCBANDS.R | 17 +++++++++++++ tests/testthat/test-ta_CDLDOJISTAR.R | 37 ++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 24 deletions(-) delete mode 100644 tests/testthat/test-average_price.R create mode 100644 tests/testthat/test-ta_ACCBANDS.R create mode 100644 tests/testthat/test-ta_CDLDOJISTAR.R diff --git a/tests/testthat/test-average_price.R b/tests/testthat/test-average_price.R deleted file mode 100644 index 5634b2ced..000000000 --- a/tests/testthat/test-average_price.R +++ /dev/null @@ -1,24 +0,0 @@ -## script: Average Price -## author: Serkan Korkmaz -## objective: -## -## -testthat::test_that(desc = "average_price()", code = { - - ## 1) generate matrix - ohlc <- data.frame( - Open = c(1,2,3), - High = c(2,3,4), - Low = c(0.5,1.5,2.5), - Close = c(1.5,2.5,3.5) - ) - - avg <- average_price(ohlc) - - ## 2) check values - testthat::expect_equal( - object = avg, - expected = c(1.25, 2.25, 3.25) - ) - -}) \ No newline at end of file diff --git a/tests/testthat/test-ta_ACCBANDS.R b/tests/testthat/test-ta_ACCBANDS.R new file mode 100644 index 000000000..51521142e --- /dev/null +++ b/tests/testthat/test-ta_ACCBANDS.R @@ -0,0 +1,17 @@ +## script: ACCBANDS +## author: Serkan Korkmaz +testthat::test_that(desc = "Acceleration Bands", code = { + + ## 1) calculate values + ## with and without alias + output <- acceleration_bands(SPY) + alias <- ACCBANDS(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + +}) \ No newline at end of file diff --git a/tests/testthat/test-ta_CDLDOJISTAR.R b/tests/testthat/test-ta_CDLDOJISTAR.R new file mode 100644 index 000000000..f7524bc4a --- /dev/null +++ b/tests/testthat/test-ta_CDLDOJISTAR.R @@ -0,0 +1,37 @@ +## script: DOJISTAR +## author: Serkan Korkmaz +testthat::test_that(desc = "Doji Star", code = { + + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- doji_star(SPY) + alias <- CDLDOJISTAR(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check that the range + ## is in [-100, 100] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) + ) + + ## 1.3) recalculate with + ## normalization and check + ## range is in [-1, 1] + options(talib.normalize = TRUE) + output <- CDLDOJISTAR(SPY) + + ## 1.4) check that the range + ## is in [-1, 1] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-1 ,1)) + ) + +}) \ No newline at end of file From 5c33313f3e2c58ded73ac67f5b53574ba83d8b7d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 09:30:15 +0200 Subject: [PATCH 035/166] :hammer: ACCBANDS alias --- NAMESPACE | 1 + R/ta_ACCBANDS.R | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 50a8cf64a..8ac932168 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -23,6 +23,7 @@ S3method(triangular_moving_average,default) S3method(triple_exponential_moving_average,default) S3method(ultimate_oscillator,default) S3method(weighted_moving_average,default) +export(ACCBANDS) export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index f8602595a..047828856 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -1,11 +1,12 @@ #' @title Acceleration Bands #' @export acceleration_bands <- function(x, n = 10, ...) { - UseMethod( - genberic = "acceleration_bands" - ) + UseMethod("acceleration_bands") } +#' @export +ACCBANDS <- acceleration_bands + #' @export acceleration_bands.default <- function(x, n = 10, ...) { ## default behaviour is to @@ -25,7 +26,7 @@ acceleration_bands.default <- function(x, n = 10, ...) { ## 1) pass `x` assuming that it ## follows OHLC-V structure .Call( - .NAME = "impl_ta_ACCBANDS", + "impl_ta_ACCBANDS", .high(x), .low(x), .close(x), From d944a013f3543516d4f9528d760984e62f2189f6 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 16:03:11 +0200 Subject: [PATCH 036/166] :hammer: Updated make-command * The original command was incorrect. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bac8f1f32..00132e07a 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ check: ## Check the R package @R CMD build . && R CMD check $(tarball_location) test: ## Run tests - @Rscript --verbose -e "testthat::test_local()" + @Rscript --verbose -e "library(talib); testthat::test_dir('tests/testthat')" clean: ## Remove artifacts @rm -rf src/*.o From b2573b78e62e8053fe126548782b8362c7ccf81d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 16:43:06 +0200 Subject: [PATCH 037/166] :hammer: Updated tests * The candlestick patterns needs to be revised. * A bollinger bands unit-test have been added. --- tests/testthat/test-ta_BBANDS.R | 17 ++++++++++ tests/testthat/test-ta_CDLDOJI.R | 37 +++++++++++++++++++++ tests/testthat/test-ta_CDLDOJISTAR.R | 2 +- tests/testthat/test-ta_CDLDRAGONFLYDOJI.R | 37 +++++++++++++++++++++ tests/testthat/test-ta_CDLEVENINGDOJISTAR.R | 37 +++++++++++++++++++++ 5 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/test-ta_BBANDS.R create mode 100644 tests/testthat/test-ta_CDLDOJI.R create mode 100644 tests/testthat/test-ta_CDLDRAGONFLYDOJI.R create mode 100644 tests/testthat/test-ta_CDLEVENINGDOJISTAR.R diff --git a/tests/testthat/test-ta_BBANDS.R b/tests/testthat/test-ta_BBANDS.R new file mode 100644 index 000000000..9f48058c6 --- /dev/null +++ b/tests/testthat/test-ta_BBANDS.R @@ -0,0 +1,17 @@ +## script: ta_BBANDS +## author: Serkan Korkmaz +testthat::test_that(desc = "Bollinger Bands", code = { + + ## 1) calculate values + ## with and without alias + output <- bollinger_bands(SPY) + alias <- BBANDS(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + +}) \ No newline at end of file diff --git a/tests/testthat/test-ta_CDLDOJI.R b/tests/testthat/test-ta_CDLDOJI.R new file mode 100644 index 000000000..be2d57d6a --- /dev/null +++ b/tests/testthat/test-ta_CDLDOJI.R @@ -0,0 +1,37 @@ +## script: Doji +## author: Serkan Korkmaz +testthat::test_that(desc = "Doji", code = { + + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- doji(SPY) + alias <- CDLDOJI(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check that the range + ## is in [0, 100] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(100)) + ) + + ## 1.3) recalculate with + ## normalization and check + ## range is in [0, 1] + options(talib.normalize = TRUE) + output <- CDLDOJI(SPY) + + ## 1.4) check that the range + ## is in [-1, 1] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(1)) + ) + +}) \ No newline at end of file diff --git a/tests/testthat/test-ta_CDLDOJISTAR.R b/tests/testthat/test-ta_CDLDOJISTAR.R index f7524bc4a..758ecf153 100644 --- a/tests/testthat/test-ta_CDLDOJISTAR.R +++ b/tests/testthat/test-ta_CDLDOJISTAR.R @@ -1,4 +1,4 @@ -## script: DOJISTAR +## script: Doji Star ## author: Serkan Korkmaz testthat::test_that(desc = "Doji Star", code = { diff --git a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R new file mode 100644 index 000000000..19892b417 --- /dev/null +++ b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R @@ -0,0 +1,37 @@ +## script: DRAGONFLYDOJI +## author: Serkan Korkmaz +testthat::test_that(desc = "Dragonfly Doji", code = { + + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- dragonfly_doji(SPY) + alias <- CDLDRAGONFLYDOJI(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check that the range + ## is in [-100, 100] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) + ) + + ## 1.3) recalculate with + ## normalization and check + ## range is in [-1, 1] + options(talib.normalize = TRUE) + output <- CDLDRAGONFLYDOJI(SPY) + + ## 1.4) check that the range + ## is in [-1, 1] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-1 ,1)) + ) + +}) \ No newline at end of file diff --git a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R new file mode 100644 index 000000000..9c6b5dd93 --- /dev/null +++ b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R @@ -0,0 +1,37 @@ +## script: Evening Doji Star +## author: Serkan Korkmaz +testthat::test_that(desc = "Evening Doji Star", code = { + + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- evening_doji_star(SPY) + alias <- CDLEVENINGDOJISTAR(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check that the range + ## is in [-100, 0] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-100)) + ) + + ## 1.3) recalculate with + ## normalization and check + ## range is in [-1, 0] + options(talib.normalize = TRUE) + output <- CDLEVENINGDOJISTAR(SPY) + + ## 1.4) check that the range + ## is in [-1, 0] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-1)) + ) + +}) \ No newline at end of file From abea3c503167c2be44ba7de835d86ee197a4e148 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 16:44:34 +0200 Subject: [PATCH 038/166] :hammer: Added normalization flags to CDL* --- R/ta_CDLDOJI.R | 3 ++- R/ta_CDLDRAGONFLYDOJI.R | 3 ++- R/ta_CDLEVENINGDOJISTAR.R | 7 ++++--- man/evening_doji_star.Rd | 2 +- src/ta_CDLDOJI.c | 10 +++++++++- src/ta_CDLDRAGONFLYDOJI.c | 11 ++++++++++- src/ta_CDLEVENINGDOJISTAR.c | 9 ++++++++- 7 files changed, 36 insertions(+), 9 deletions(-) diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index bbd9e6342..211c77835 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -16,6 +16,7 @@ doji.default <- function(x, ...) { .open(x), .high(x), .low(x), - .close(x) + .close(x), + as.logical(getOption("talib.normalize", TRUE)) ) } \ No newline at end of file diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index 37e192133..a574bb22b 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -16,6 +16,7 @@ dragonfly_doji.default <- function(x, ...) { .open(x), .high(x), .low(x), - .close(x) + .close(x), + as.logical(getOption("talib.normalize", TRUE)) ) } \ No newline at end of file diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index d11dbddf4..51a0a951c 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -1,6 +1,6 @@ #' @title Evening Doji Star #' @export -evening_doji_star <- function(x, penetration, ...) { +evening_doji_star <- function(x, penetration = 0.1, ...) { UseMethod( "evening_doji_star" ) @@ -10,13 +10,14 @@ evening_doji_star <- function(x, penetration, ...) { CDLEVENINGDOJISTAR <- evening_doji_star #' @export -evening_doji_star.default <- function(x, penetration, ...) { +evening_doji_star.default <- function(x, penetration = 0.1, ...) { .Call( "impl_ta_CDLEVENINGDOJISTAR", .open(x), .high(x), .low(x), .close(x), - penetration + penetration, + as.logical(getOption("talib.normalize", TRUE)) ) } \ No newline at end of file diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 9e4150a76..5634c4004 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -4,7 +4,7 @@ \alias{evening_doji_star} \title{Evening Doji Star} \usage{ -evening_doji_star(x, penetration, ...) +evening_doji_star(x, penetration = 0.1, ...) } \description{ Evening Doji Star diff --git a/src/ta_CDLDOJI.c b/src/ta_CDLDOJI.c index c4d797953..9c8a12588 100644 --- a/src/ta_CDLDOJI.c +++ b/src/ta_CDLDOJI.c @@ -13,11 +13,13 @@ // is detected (0 otherwise). Leading NA values are padded for periods before // the first output can be computed (if any). #include "lib.h" +#include "normalize.h" #include "shift.h" #include #include -SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { +SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { R_xlen_t n = XLENGTH(open); int protect_count = 0; @@ -57,6 +59,12 @@ SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { } shift_array(out_ptr, n, out_beg_idx); + // the results are given in the range -100 and 100 + // if normalized it returns -1 and 1 + int is_true = Rf_asLogical(normalize_flag); + if (is_true == 1) { + normalize(out_ptr, n, 100, out_beg_idx); + } // Unprotect protected objects and return the result if (protect_count > 0) diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c index e1c56facf..0fe618a4e 100644 --- a/src/ta_CDLDRAGONFLYDOJI.c +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -13,10 +13,12 @@ // Dragonfly Doji pattern is found (0 if no pattern). Leading NA values are // padded for periods before the first pattern can be detected. #include "lib.h" +#include "normalize.h" #include #include -SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { +SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { int protect_count = 0; R_xlen_t n = XLENGTH(open); @@ -48,6 +50,13 @@ SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close) { error("TA-Lib computation failed with error code %d", ret_code); } shift_array(out_ptr, n, out_beg_idx); + // the results are given in the range -100 and 100 + // if normalized it returns -1 and 1 + int is_true = Rf_asLogical(normalize_flag); + if (is_true == 1) { + normalize(out_ptr, n, 100, out_beg_idx); + } + if (protect_count > 0) UNPROTECT(protect_count); return result; diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c index 1ecc9a4f6..d37e5a375 100644 --- a/src/ta_CDLEVENINGDOJISTAR.c +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -19,12 +19,13 @@ // (e.g., 30 for 30%). Leading NA values are padded for the initial period // before any pattern can occur. #include "lib.h" +#include "normalize.h" #include "shift.h" #include #include SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP penetration) { + SEXP penetration, SEXP normalize_flag) { int protect_count = 0; // Validate and extract the penetration parameter @@ -60,6 +61,12 @@ SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, error("TA-Lib computation failed with error code %d", ret_code); } shift_array(out_ptr, n, out_beg_idx); + // the results are given in the range -100 and 100 + // if normalized it returns -1 and 1 + int is_true = Rf_asLogical(normalize_flag); + if (is_true == 1) { + normalize(out_ptr, n, 100, out_beg_idx); + } if (protect_count > 0) UNPROTECT(protect_count); From d7ee9dd8abbf4edb553b1286fc562334f4cbfd5a Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 16:45:36 +0200 Subject: [PATCH 039/166] :hammer: Updated BBANDS and ACCBANDS * Both functions had bugs and erros. --- NAMESPACE | 2 ++ R/ta_BBANDS.R | 21 +++++++++++------- man/bollinger_bands.Rd | 2 +- src/api.h | 8 ++++--- src/init.c | 6 +++--- src/ta_ACCBANDS.c | 49 +++++++++++++++++++++++++++++++----------- src/ta_BBANDS.c | 30 +++++++++++++++++++------- 7 files changed, 82 insertions(+), 36 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 8ac932168..02323974f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -24,6 +24,7 @@ S3method(triple_exponential_moving_average,default) S3method(ultimate_oscillator,default) S3method(weighted_moving_average,default) export(ACCBANDS) +export(BBANDS) export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) @@ -52,6 +53,7 @@ export(exponential_moving_average) export(fast_stochastic) export(kaufman_adaptive_moving_average) export(mesa_adaptive_moving_average) +export(move) export(moving_average_convergence_divergence) export(relative_strength_index) export(simple_moving_average) diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 4358c344d..a6e81d7f7 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -1,17 +1,21 @@ #' @title Bollinger Bands #' @export -bollinger_bands <- function(x, n = 10, ...) { +bollinger_bands <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { UseMethod( generic = "bollinger_bands" ) } #' @export -bollinger_bands.default <- function(x, n = 10, ...) { +BBANDS <- bollinger_bands + +#' @export +bollinger_bands.default <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { ## default behaviour is to ## coerce to a `matrix` check that ## it is double and then pass to ## C-side. + ma <- map_maType_call(substitute(ma)) ## 0) validate input ## and stop the script @@ -20,15 +24,16 @@ bollinger_bands.default <- function(x, n = 10, ...) { if (!is.matrix(x)) { x <- as.matrix(x) } - assert(is.numeric(x)); assert(n >= 2); + assert(is.numeric(x)); assert(ma$n >= 2); ## 1) pass `x` assuming that it ## follows OHLC-V structure .Call( - .NAME = "impl_ta_BBANDS", - .high(x), - .low(x), - .close(x), - as.integer(n) + "impl_ta_BBANDS", + x, + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) ) } \ No newline at end of file diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index 7aeed3fb4..3bb133238 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -4,7 +4,7 @@ \alias{bollinger_bands} \title{Bollinger Bands} \usage{ -bollinger_bands(x, n = 10, ...) +bollinger_bands(x, ma = SMA(n = 10), up = 2, down = 2, ...) } \description{ Bollinger Bands diff --git a/src/api.h b/src/api.h index 84d7c22ba..c5315e8d5 100644 --- a/src/api.h +++ b/src/api.h @@ -12,12 +12,14 @@ SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); -SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close); +SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag); SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); -SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close); +SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP penetration); + SEXP penetration, SEXP normalize_flag); SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype); diff --git a/src/init.c b/src/init.c index 95eaefaa4..6042c9c59 100644 --- a/src/init.c +++ b/src/init.c @@ -15,10 +15,10 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_AROONOSC, 3), CALLDEF(impl_ta_AROON, 3), CALLDEF(impl_ta_BBANDS, 5), - CALLDEF(impl_ta_CDLDOJI, 4), + CALLDEF(impl_ta_CDLDOJI, 5), CALLDEF(impl_ta_CDLDOJISTAR, 5), - CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 4), - CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 5), + CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), + CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 6), CALLDEF(impl_ta_MACD, 4), CALLDEF(impl_ta_MA, 3), CALLDEF(impl_ta_RSI, 2), diff --git a/src/ta_ACCBANDS.c b/src/ta_ACCBANDS.c index 92d87c695..ad2f5e9a1 100644 --- a/src/ta_ACCBANDS.c +++ b/src/ta_ACCBANDS.c @@ -12,13 +12,15 @@ // with NA_REAL where the bands are undefined. #include "lib.h" +#include "shift.h" #include #include #include SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod) { - int n = LENGTH(inHigh); // assume all three are same length + + int n = LENGTH(inHigh); double *restrict highs = REAL(inHigh); // pointer to high prices double *restrict lows = REAL(inLow); // pointer to low prices double *restrict closes = REAL(inClose); // pointer to close prices @@ -26,20 +28,41 @@ SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, // allocate result matrix: n rows × 3 cols SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); - double *upper = REAL(result); // col 1 - double *middle = upper + n; // col 2 - double *lower = upper + 2 * n; // col 3 + double *upper = REAL(result); + double *middle = upper + n; + double *lower = upper + 2 * n; int outBeg, outNb; - TA_RetCode ret = - TA_ACCBANDS(0, n - 1, highs, lows, closes, period, &outBeg, &outNb, - upper + outBeg, middle + outBeg, lower + outBeg); - - // fill leading/trailing NAs for undefined ranges - for (int i = 0; i < outBeg; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; - for (int i = outBeg + outNb; i < n; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; + // clang-format off + TA_RetCode ret = TA_ACCBANDS( + 0, + n - 1, + highs, + lows, + closes, + period, + &outBeg, + &outNb, + upper + outBeg, + middle + outBeg, + lower + outBeg + ); + // clang-format on + + // shift each array + // + // NOTE: There is most likely a better + // way to do this. But as it is, + // this move costs 3 x 5.33 ms for a + // normally distributed double vector of + // of length 1e7; the SMA costs 57ms + // its 10% overhead, which is alot. But + // if anyone is doing calculations on 1e7 + // they probably have bigger thing to worry + // about. + shift_array(upper, n, outBeg); + shift_array(middle, n, outBeg); + shift_array(lower, n, outBeg); // set column names to lowercase as requested SEXP dims = PROTECT(allocVector(VECSXP, 2)); diff --git a/src/ta_BBANDS.c b/src/ta_BBANDS.c index 98629381d..98444bce2 100644 --- a/src/ta_BBANDS.c +++ b/src/ta_BBANDS.c @@ -13,6 +13,7 @@ // padded with NA_REAL for values where the bands are undefined. #include "lib.h" +#include "ta-lib/include/ta_defs.h" #include #include #include @@ -25,6 +26,7 @@ SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, double nbUp = REAL(optNbDevUp)[0]; // std dev up double nbDn = REAL(optNbDevDn)[0]; // std dev down int maType = INTEGER(optMAType)[0]; // MA type enum + TA_MAType to_ma = (TA_MAType)maType; // allocate result matrix n rows × 3 cols SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); @@ -34,15 +36,27 @@ SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, // call TA-Lib function int outBeg, outNb; - TA_RetCode ret = - TA_BBANDS(0, n - 1, src, period, nbUp, nbDn, maType, &outBeg, &outNb, - upper + outBeg, middle + outBeg, lower + outBeg); + // clang-format off + TA_RetCode ret = TA_BBANDS( + 0, + n - 1, + src, + period, + nbUp, + nbDn, + to_ma, + &outBeg, + &outNb, + upper + outBeg, + middle + outBeg, + lower + outBeg + ); + // clang-format on - // fill leading/trailing NAs - for (int i = 0; i < outBeg; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; - for (int i = outBeg + outNb; i < n; ++i) - upper[i] = middle[i] = lower[i] = NA_REAL; + // shift arrays + shift_array(upper, n, outBeg); + shift_array(middle, n, outBeg); + shift_array(lower, n, outBeg); // set column names: c("upper","middle","lower") SEXP dims = PROTECT(allocVector(VECSXP, 2)); From 41985682e4c99741c852321037c567a926813134 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 21:31:28 +0200 Subject: [PATCH 040/166] :hammer: Added maType header * This header file finds all relevant Enums from SEXP --- NAMESPACE | 1 - src/MAType.h | 18 ++++++++++++++++++ src/ta_BBANDS.c | 8 ++++---- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 src/MAType.h diff --git a/NAMESPACE b/NAMESPACE index 02323974f..2dd5ebff4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -53,7 +53,6 @@ export(exponential_moving_average) export(fast_stochastic) export(kaufman_adaptive_moving_average) export(mesa_adaptive_moving_average) -export(move) export(moving_average_convergence_divergence) export(relative_strength_index) export(simple_moving_average) diff --git a/src/MAType.h b/src/MAType.h new file mode 100644 index 000000000..dd1932adf --- /dev/null +++ b/src/MAType.h @@ -0,0 +1,18 @@ +#ifndef _LIB_H_ +#define _LIB_H_ +// as_MAType +// +// Parameters: +// x: SEXP +// Description +// Syntactic sugar for mapping SEXP +// to TA_MAType +#include "Rinternals.h" +#include "ta_defs.h" + +static TA_MAType as_MAType(SEXP x) { + int x_ = INTEGER(x)[0]; + return (TA_MAType)x_; +} + +#endif // _LIB_H_ diff --git a/src/ta_BBANDS.c b/src/ta_BBANDS.c index 98444bce2..4b4bf67ef 100644 --- a/src/ta_BBANDS.c +++ b/src/ta_BBANDS.c @@ -12,9 +12,10 @@ // series. Returns an n × 3 matrix (columns "upper","middle","lower") // padded with NA_REAL for values where the bands are undefined. +#include "MAType.h" #include "lib.h" +#include "shift.h" #include "ta-lib/include/ta_defs.h" -#include #include #include @@ -25,8 +26,7 @@ SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, int period = INTEGER(optTimePeriod)[0]; // lookback double nbUp = REAL(optNbDevUp)[0]; // std dev up double nbDn = REAL(optNbDevDn)[0]; // std dev down - int maType = INTEGER(optMAType)[0]; // MA type enum - TA_MAType to_ma = (TA_MAType)maType; + TA_MAType maType = as_MAType(optMAType); // allocate result matrix n rows × 3 cols SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); @@ -44,7 +44,7 @@ SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, period, nbUp, nbDn, - to_ma, + maType, &outBeg, &outNb, upper + outBeg, From a798cf40da29c1a73fb1083b65f59a428f4d02ff Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 21:48:09 +0200 Subject: [PATCH 041/166] :hammer: Cleaned up code and added shift/message --- src/ta_APO.c | 40 +++++++++++++++++++--------------------- src/ta_AROON.c | 36 +++++++++++++++++++----------------- src/ta_AROONOSC.c | 28 ++++++++++++++++------------ src/ta_MA.c | 14 +++++++++++++- src/ta_MACD.c | 27 ++++++++++++++++++++------- src/ta_RSI.c | 18 +++++++++++++----- 6 files changed, 100 insertions(+), 63 deletions(-) diff --git a/src/ta_APO.c b/src/ta_APO.c index 6d564969b..5e65bf1e3 100644 --- a/src/ta_APO.c +++ b/src/ta_APO.c @@ -10,8 +10,10 @@ // Computes the Absolute Price Oscillator (APO), i.e. the difference // between two moving averages of the input. Returns a numeric vector // of the same length as input; positions before the lookback are set to NA. +#include "MAType.h" #include "lib.h" -#include +#include "shift.h" +#include "ta_defs.h" #include #include @@ -21,7 +23,7 @@ SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, R_xlen_t n = xlength(inRealSEXP); int fastPeriod = asInteger(fastPeriodSEXP); int slowPeriod = asInteger(slowPeriodSEXP); - int maType = asInteger(maTypeSEXP); + TA_MAType maType = as_MAType(maTypeSEXP); // Allocate result vector SEXP outRealSEXP = PROTECT(allocVector(REALSXP, n)); @@ -30,31 +32,27 @@ SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, // Call TA-Lib int outBegIdx = 0, outNBElement = 0; - TA_RetCode ret = TA_APO(0, // start index - (int)n - 1, // end index - inReal, // input array - fastPeriod, // fast MA period - slowPeriod, // slow MA period - maType, // MA type - &outBegIdx, // first valid output index - &outNBElement, // number of elements computed - outReal // output array (length ≥ n) + // clang-format off + TA_RetCode ret = TA_APO( + 0, + (int)n - 1, + inReal, + fastPeriod, + slowPeriod, + maType, + &outBegIdx, + &outNBElement, + outReal ); + // clang-format on + if (ret != TA_SUCCESS) { UNPROTECT(1); error("TA_APO failed with error code %d", ret); } - // Initialize first outBegIdx values to NA - for (int i = 0; i < outBegIdx; ++i) - outReal[i] = NA_REAL; - - // Shift valid outputs into place - memmove(outReal + outBegIdx, outReal, (size_t)outNBElement * sizeof(double)); - - // Fill trailing values with NA - for (int i = outBegIdx + outNBElement; i < n; ++i) - outReal[i] = NA_REAL; + // shift + shift_array(outReal, n, outBegIdx); UNPROTECT(1); return outRealSEXP; diff --git a/src/ta_AROON.c b/src/ta_AROON.c index e052b0eaf..5555e1d28 100644 --- a/src/ta_AROON.c +++ b/src/ta_AROON.c @@ -10,6 +10,7 @@ // AroonDown and AroonUp. Returns an n×2 matrix (columns in order: // "aroondown", "aroonup"), with positions before lookback set to NA. #include "lib.h" +#include "shift.h" #include #include #include @@ -39,28 +40,29 @@ SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { // Call TA-Lib int outBegIdx = 0, outNBElement = 0; - TA_RetCode ret = TA_AROON(0, (int)n - 1, inHigh, inLow, timePeriod, - &outBegIdx, &outNBElement, outDown, outUp); + + // clang-format off + TA_RetCode ret = TA_AROON( + 0, + (int)n - 1, + inHigh, + inLow, + timePeriod, + &outBegIdx, + &outNBElement, + outDown, + outUp + ); + // clang-format on + if (ret != TA_SUCCESS) { UNPROTECT(3); error("TA_AROON failed with error code %d", ret); } - // Fill invalid leading positions with NA - for (int i = 0; i < outBegIdx; ++i) { - outDown[i] = NA_REAL; - outUp[i] = NA_REAL; - } - - // Shift valid values into place - memmove(outDown + outBegIdx, outDown, (size_t)outNBElement * sizeof(double)); - memmove(outUp + outBegIdx, outUp, (size_t)outNBElement * sizeof(double)); - - // Fill trailing positions with NA - for (int i = outBegIdx + outNBElement; i < n; ++i) { - outDown[i] = NA_REAL; - outUp[i] = NA_REAL; - } + // shift + shift_array(outDown, n, outBegIdx); + shift_array(outUp, n, outBegIdx); UNPROTECT(3); return outMat; diff --git a/src/ta_AROONOSC.c b/src/ta_AROONOSC.c index 7c6a46429..7dfa2ac86 100644 --- a/src/ta_AROONOSC.c +++ b/src/ta_AROONOSC.c @@ -10,6 +10,7 @@ // AroonDown). Returns a numeric vector of same length as input; // positions before lookback are NA. #include "lib.h" +#include "shift.h" #include #include #include @@ -29,23 +30,26 @@ SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { // Call TA-Lib int outBegIdx = 0, outNBElement = 0; - TA_RetCode ret = TA_AROONOSC(0, (int)n - 1, inHigh, inLow, timePeriod, - &outBegIdx, &outNBElement, outOsc); + // clang-format off + TA_RetCode ret = TA_AROONOSC( + 0, + (int)n - 1, + inHigh, + inLow, + timePeriod, + &outBegIdx, + &outNBElement, + outOsc + ); + // clang-format on + if (ret != TA_SUCCESS) { UNPROTECT(1); error("TA_AROONOSC failed with error code %d", ret); } - // Leading NAs - for (int i = 0; i < outBegIdx; ++i) - outOsc[i] = NA_REAL; - - // Shift valid outputs - memmove(outOsc + outBegIdx, outOsc, (size_t)outNBElement * sizeof(double)); - - // Trailing NAs - for (int i = outBegIdx + outNBElement; i < n; ++i) - outOsc[i] = NA_REAL; + // shift + shift_array(outOsc, n, outBegIdx); UNPROTECT(1); return outOscSEXP; diff --git a/src/ta_MA.c b/src/ta_MA.c index e30dbced1..511171061 100644 --- a/src/ta_MA.c +++ b/src/ta_MA.c @@ -47,7 +47,19 @@ SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype) { double *temp = (double *)R_alloc(n, sizeof(double)); int outBeg, outNb; - TA_RetCode ret = TA_MA(0, n - 1, in, tp, mt, &outBeg, &outNb, temp); + // clang-format off + TA_RetCode ret = TA_MA( + 0, + n - 1, + in, + tp, + mt, + &outBeg, + &outNb, + temp + ); + // clang-format on + if (ret != TA_SUCCESS) { UNPROTECT(pc); error("TA_MA failed: return code %d", ret); diff --git a/src/ta_MACD.c b/src/ta_MACD.c index 23efb5c42..d504ce8be 100644 --- a/src/ta_MACD.c +++ b/src/ta_MACD.c @@ -11,6 +11,7 @@ // Returns an n × 3 matrix with columns "macd","signal","histogram". #include "lib.h" +#include "shift.h" #include #include #include @@ -29,14 +30,26 @@ SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, double *histogram = macd + 2 * n; int outBeg, outNb; - TA_RetCode ret = - TA_MACD(0, n - 1, src, fastP, slowP, signalP, &outBeg, &outNb, - macd + outBeg, signal + outBeg, histogram + outBeg); + // clang-format off + TA_RetCode ret = TA_MACD( + 0, + n - 1, + src, + fastP, + slowP, + signalP, + &outBeg, + &outNb, + macd + outBeg, + signal + outBeg, + histogram + outBeg + ); + // clang-format on - for (int i = 0; i < outBeg; ++i) - macd[i] = signal[i] = histogram[i] = NA_REAL; - for (int i = outBeg + outNb; i < n; ++i) - macd[i] = signal[i] = histogram[i] = NA_REAL; + // shift + shift_array(macd, n, outBeg); + shift_array(signal, n, outBeg); + shift_array(histogram, n, outBeg); SEXP dims = PROTECT(allocVector(VECSXP, 2)); SEXP cnames = PROTECT(allocVector(STRSXP, 3)); diff --git a/src/ta_RSI.c b/src/ta_RSI.c index 4fc826bdc..a81874f52 100644 --- a/src/ta_RSI.c +++ b/src/ta_RSI.c @@ -22,12 +22,20 @@ SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod) { double *rsi = REAL(result); int outBeg, outNb; - TA_RetCode ret = TA_RSI(0, n - 1, src, period, &outBeg, &outNb, rsi); + // clang-format off + TA_RetCode ret = TA_RSI( + 0, + n - 1, + src, + period, + &outBeg, + &outNb, + rsi + ); + // clang-format on - for (int i = 0; i < outBeg; ++i) - rsi[i] = NA_REAL; - for (int i = outBeg + outNb; i < n; ++i) - rsi[i] = NA_REAL; + // shift + shift_array(rsi, n, outBeg); UNPROTECT(1); return result; From bed32e12ac0b93223bfdff612a21557cc833a984 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 8 Aug 2025 22:38:35 +0200 Subject: [PATCH 042/166] :hammer: Simplified MA * Added unit-tests * Made code more efficient * Commented code --- R/ta_MA.R | 174 +++++++++++++++---- man/double_exponential_moving_average.Rd | 2 +- man/exponential_moving_average.Rd | 2 +- man/kaufman_adaptive_moving_average.Rd | 2 +- man/mesa_adaptive_moving_average.Rd | 2 +- man/simple_moving_average.Rd | 2 +- man/t3_moving_average.Rd | 2 +- man/triangular_moving_average.Rd | 2 +- man/triple_exponential_moving_average.Rd | 2 +- man/weighted_moving_average.Rd | 2 +- src/api.h | 2 +- src/ta_MA.c | 73 ++++---- tests/testthat/test-ta_MA.R | 208 +++++++++++++++++++++++ 13 files changed, 391 insertions(+), 84 deletions(-) create mode 100644 tests/testthat/test-ta_MA.R diff --git a/R/ta_MA.R b/R/ta_MA.R index bbec9a2f4..233ab1dcb 100644 --- a/R/ta_MA.R +++ b/R/ta_MA.R @@ -1,13 +1,13 @@ #' @title Simple Moving Average (SMA) #' @export -simple_moving_average <- function(x, n, ...) { +simple_moving_average <- function(x, n = 10, ...) { UseMethod( "simple_moving_average" ) } #' @export -simple_moving_average.default <- function(x, n, ...) { +simple_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -37,14 +37,14 @@ SMA <- simple_moving_average #' @title Exponential Moving Average (EMA) #' @export -exponential_moving_average <- function(x, n, ...) { +exponential_moving_average <- function(x, n = 10, ...) { UseMethod( "exponential_moving_average" ) } #' @export -exponential_moving_average.default <- function(x, n, ...) { +exponential_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -74,14 +74,14 @@ EMA <- exponential_moving_average #' @title Weighted Moving Average (WMA) #' @export -weighted_moving_average <- function(x, n, ...) { +weighted_moving_average <- function(x, n = 10, ...) { UseMethod( "weighted_moving_average" ) } #' @export -weighted_moving_average.default <- function(x, n, ...) { +weighted_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -111,15 +111,34 @@ WMA <- weighted_moving_average #' @title Double Exponential Moving Average (DEMA) #' @export -double_exponential_moving_average <- function(x, n, ...) { +double_exponential_moving_average <- function(x, n = 10, ...) { UseMethod("double_exponential_moving_average") } #' @export -double_exponential_moving_average.default <- function(x, n, ...) { - if (!is.null(dim(x))) stop("`x` must be a numeric vector") +double_exponential_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } assert(is.numeric(x)); assert(n >= 2) - .Call("impl_ta_MA", x, as.integer(n), 3L) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 3L + ) } #' @export @@ -127,15 +146,34 @@ DEMA <- double_exponential_moving_average #' @title Triple Exponential Moving Average (TEMA) #' @export -triple_exponential_moving_average <- function(x, n, ...) { +triple_exponential_moving_average <- function(x, n = 10, ...) { UseMethod("triple_exponential_moving_average") } #' @export -triple_exponential_moving_average.default <- function(x, n, ...) { - if (!is.null(dim(x))) stop("`x` must be a numeric vector") +triple_exponential_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } assert(is.numeric(x)); assert(n >= 2) - .Call("impl_ta_MA", x, as.integer(n), 4L) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 4L + ) } #' @export @@ -143,15 +181,34 @@ TEMA <- triple_exponential_moving_average #' @title Triangular Moving Average (TRIMA) #' @export -triangular_moving_average <- function(x, n, ...) { +triangular_moving_average <- function(x, n = 10, ...) { UseMethod("triangular_moving_average") } #' @export -triangular_moving_average.default <- function(x, n, ...) { - if (!is.null(dim(x))) stop("`x` must be a numeric vector") +triangular_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } assert(is.numeric(x)); assert(n >= 2) - .Call("impl_ta_MA", x, as.integer(n), 5L) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 5L + ) } #' @export @@ -159,15 +216,34 @@ TRIMA <- triangular_moving_average #' @title Kaufman’s Adaptive Moving Average (KAMA) #' @export -kaufman_adaptive_moving_average <- function(x, n, ...) { +kaufman_adaptive_moving_average <- function(x, n = 10, ...) { UseMethod("kaufman_adaptive_moving_average") } #' @export -kaufman_adaptive_moving_average.default <- function(x, n, ...) { - if (!is.null(dim(x))) stop("`x` must be a numeric vector") +kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } assert(is.numeric(x)); assert(n >= 2) - .Call("impl_ta_MA", x, as.integer(n), 6L) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 6L + ) } #' @export @@ -175,15 +251,34 @@ KAMA <- kaufman_adaptive_moving_average #' @title Mesa Adaptive Moving Average (MAMA) #' @export -mesa_adaptive_moving_average <- function(x, n, ...) { +mesa_adaptive_moving_average <- function(x, n = 10, ...) { UseMethod("mesa_adaptive_moving_average") } #' @export -mesa_adaptive_moving_average.default <- function(x, n, ...) { - if (!is.null(dim(x))) stop("`x` must be a numeric vector") +mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } assert(is.numeric(x)); assert(n >= 2) - .Call("impl_ta_MA", x, as.integer(n), 7L) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 7L + ) } #' @export @@ -191,15 +286,34 @@ MAMA <- mesa_adaptive_moving_average #' @title T3 Moving Average (T3) #' @export -t3_moving_average <- function(x, n, ...) { +t3_moving_average <- function(x, n = 10, ...) { UseMethod("t3_moving_average") } #' @export -t3_moving_average.default <- function(x, n, ...) { - if (!is.null(dim(x))) stop("`x` must be a numeric vector") +t3_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } assert(is.numeric(x)); assert(n >= 2) - .Call("impl_ta_MA", x, as.integer(n), 8L) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 8L + ) } #' @export diff --git a/man/double_exponential_moving_average.Rd b/man/double_exponential_moving_average.Rd index 5e9111628..a357848ec 100644 --- a/man/double_exponential_moving_average.Rd +++ b/man/double_exponential_moving_average.Rd @@ -4,7 +4,7 @@ \alias{double_exponential_moving_average} \title{Double Exponential Moving Average (DEMA)} \usage{ -double_exponential_moving_average(x, n, ...) +double_exponential_moving_average(x, n = 10, ...) } \description{ Double Exponential Moving Average (DEMA) diff --git a/man/exponential_moving_average.Rd b/man/exponential_moving_average.Rd index ad23063c3..223d80e3d 100644 --- a/man/exponential_moving_average.Rd +++ b/man/exponential_moving_average.Rd @@ -4,7 +4,7 @@ \alias{exponential_moving_average} \title{Exponential Moving Average (EMA)} \usage{ -exponential_moving_average(x, n, ...) +exponential_moving_average(x, n = 10, ...) } \description{ Exponential Moving Average (EMA) diff --git a/man/kaufman_adaptive_moving_average.Rd b/man/kaufman_adaptive_moving_average.Rd index 1567c23c4..aec84e8a5 100644 --- a/man/kaufman_adaptive_moving_average.Rd +++ b/man/kaufman_adaptive_moving_average.Rd @@ -4,7 +4,7 @@ \alias{kaufman_adaptive_moving_average} \title{Kaufman’s Adaptive Moving Average (KAMA)} \usage{ -kaufman_adaptive_moving_average(x, n, ...) +kaufman_adaptive_moving_average(x, n = 10, ...) } \description{ Kaufman’s Adaptive Moving Average (KAMA) diff --git a/man/mesa_adaptive_moving_average.Rd b/man/mesa_adaptive_moving_average.Rd index 2216defca..cd185c127 100644 --- a/man/mesa_adaptive_moving_average.Rd +++ b/man/mesa_adaptive_moving_average.Rd @@ -4,7 +4,7 @@ \alias{mesa_adaptive_moving_average} \title{Mesa Adaptive Moving Average (MAMA)} \usage{ -mesa_adaptive_moving_average(x, n, ...) +mesa_adaptive_moving_average(x, n = 10, ...) } \description{ Mesa Adaptive Moving Average (MAMA) diff --git a/man/simple_moving_average.Rd b/man/simple_moving_average.Rd index 7cff35ed3..36177c558 100644 --- a/man/simple_moving_average.Rd +++ b/man/simple_moving_average.Rd @@ -4,7 +4,7 @@ \alias{simple_moving_average} \title{Simple Moving Average (SMA)} \usage{ -simple_moving_average(x, n, ...) +simple_moving_average(x, n = 10, ...) } \description{ Simple Moving Average (SMA) diff --git a/man/t3_moving_average.Rd b/man/t3_moving_average.Rd index 92d8775d8..38d8457b1 100644 --- a/man/t3_moving_average.Rd +++ b/man/t3_moving_average.Rd @@ -4,7 +4,7 @@ \alias{t3_moving_average} \title{T3 Moving Average (T3)} \usage{ -t3_moving_average(x, n, ...) +t3_moving_average(x, n = 10, ...) } \description{ T3 Moving Average (T3) diff --git a/man/triangular_moving_average.Rd b/man/triangular_moving_average.Rd index 103d7b44f..c875de0cc 100644 --- a/man/triangular_moving_average.Rd +++ b/man/triangular_moving_average.Rd @@ -4,7 +4,7 @@ \alias{triangular_moving_average} \title{Triangular Moving Average (TRIMA)} \usage{ -triangular_moving_average(x, n, ...) +triangular_moving_average(x, n = 10, ...) } \description{ Triangular Moving Average (TRIMA) diff --git a/man/triple_exponential_moving_average.Rd b/man/triple_exponential_moving_average.Rd index e7e3cdb78..e57096c96 100644 --- a/man/triple_exponential_moving_average.Rd +++ b/man/triple_exponential_moving_average.Rd @@ -4,7 +4,7 @@ \alias{triple_exponential_moving_average} \title{Triple Exponential Moving Average (TEMA)} \usage{ -triple_exponential_moving_average(x, n, ...) +triple_exponential_moving_average(x, n = 10, ...) } \description{ Triple Exponential Moving Average (TEMA) diff --git a/man/weighted_moving_average.Rd b/man/weighted_moving_average.Rd index f00b7ee83..156f17196 100644 --- a/man/weighted_moving_average.Rd +++ b/man/weighted_moving_average.Rd @@ -4,7 +4,7 @@ \alias{weighted_moving_average} \title{Weighted Moving Average (WMA)} \usage{ -weighted_moving_average(x, n, ...) +weighted_moving_average(x, n = 10, ...) } \description{ Weighted Moving Average (WMA) diff --git a/src/api.h b/src/api.h index c5315e8d5..0067a912d 100644 --- a/src/api.h +++ b/src/api.h @@ -22,7 +22,7 @@ SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); -SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype); +SEXP impl_ta_MA(SEXP x, SEXP lag, SEXP matype); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); diff --git a/src/ta_MA.c b/src/ta_MA.c index 511171061..e3eccb410 100644 --- a/src/ta_MA.c +++ b/src/ta_MA.c @@ -2,74 +2,59 @@ // // Parameters // real – numeric vector of inputs -// timeperiod – integer SEXP for MA period (1 to 100000) +// lag – integer SEXP for MA period (1 to 100000) // matype – integer SEXP for MAType (0=SMA … 8=T3) // // Description // Returns a numeric vector of the same length as `real`, // with NA_REAL for the first lookback samples, then the // moving‐average values thereafter. +#include "MAType.h" #include "lib.h" +#include "shift.h" +#include "ta-lib/include/ta_defs.h" #include "ta_libc.h" -#include #include -SEXP impl_ta_MA(SEXP real, SEXP timeperiod, SEXP matype) { - int pc = 0; - real = PROTECT(coerceVector(real, REALSXP)); - pc++; - timeperiod = PROTECT(coerceVector(timeperiod, INTSXP)); - pc++; - matype = PROTECT(coerceVector(matype, INTSXP)); - pc++; +SEXP impl_ta_MA(SEXP x, SEXP lag, SEXP matype) { + // TODO: A robust input validation + // of maType enums, and time periods - int n = length(real); - const double *__restrict__ in = REAL(real); - int tp = INTEGER(timeperiod)[0]; - int mt_int = INTEGER(matype)[0]; + // protection counter + int protection_count = 0; - // Validate inputs - if (tp < 1 || tp > 100000) - error("Invalid timeperiod %d; must be 1 to 100000", tp); - if (mt_int < TA_MAType_SMA || mt_int > TA_MAType_T3) - error("Invalid MAType %d; must be between %d (SMA) and %d (T3)", mt_int, - TA_MAType_SMA, TA_MAType_T3); - TA_MAType mt = (TA_MAType)mt_int; + // values + int n = length(x); + const double *__restrict__ x_ptr = REAL(x); - // Prepare R output vector, NA-fill - SEXP result = PROTECT(allocVector(REALSXP, n)); - pc++; - double *__restrict__ out = REAL(result); - for (int i = 0; i < n; i++) - out[i] = NA_REAL; + int timeperiod = INTEGER(lag)[0]; + TA_MAType MA = as_MAType(matype); - // Temporary buffer for TA_MA output - double *temp = (double *)R_alloc(n, sizeof(double)); + SEXP result = PROTECT(allocVector(REALSXP, n)); + protection_count++; + double *result_ptr = REAL(result); - int outBeg, outNb; // clang-format off - TA_RetCode ret = TA_MA( + int outBeg, outNb; + TA_RetCode output = TA_MA( 0, n - 1, - in, - tp, - mt, + x_ptr, + timeperiod, + MA, &outBeg, &outNb, - temp + result_ptr ); // clang-format on - if (ret != TA_SUCCESS) { - UNPROTECT(pc); - error("TA_MA failed: return code %d", ret); + if (output != TA_SUCCESS) { + UNPROTECT(protection_count); + error("TA_MA failed: return code %d", output); } - // Copy the valid outputs into aligned positions - for (int i = 0; i < outNb; i++) { - out[outBeg + i] = temp[i]; - } + shift_array(result_ptr, n, outBeg); - UNPROTECT(pc); + UNPROTECT(protection_count); return result; -} +} \ No newline at end of file diff --git a/tests/testthat/test-ta_MA.R b/tests/testthat/test-ta_MA.R new file mode 100644 index 000000000..0936481f2 --- /dev/null +++ b/tests/testthat/test-ta_MA.R @@ -0,0 +1,208 @@ +## script: MA +## author: Serkan Korkmaz +testthat::test_that(desc = "Simple Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- simple_moving_average(SPY[,1]) + alias <- SMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Exponential Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- exponential_moving_average(SPY[,1]) + alias <- EMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Weighted Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- weighted_moving_average(SPY[,1]) + alias <- WMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Double Exponential Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- double_exponential_moving_average(SPY[,1]) + alias <- DEMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Triple Exponential Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- triple_exponential_moving_average(SPY[,1]) + alias <- TEMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Triangular Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- triangular_moving_average(SPY[,1]) + alias <- TRIMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Kaufman’s Adaptive Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- kaufman_adaptive_moving_average(SPY[,1]) + alias <- KAMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "Mesa Adaptive Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- mesa_adaptive_moving_average(SPY[,1]) + alias <- MAMA(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) + +testthat::test_that(desc = "T3 Moving Average", code = { + + ## 1) calculate values + ## with and without alias + output <- t3_moving_average(SPY[,1]) + alias <- T3(SPY[,1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) + +}) \ No newline at end of file From e624be1f58f0ee8f428015533cf07d8fd1a32204 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 00:35:40 +0200 Subject: [PATCH 043/166] :hammer: Expanded MACD --- NAMESPACE | 3 ++ R/ta_MACD.R | 103 ++++++++++++++++++++++++++++++++++++++++++----- R/utils.R | 4 ++ src/api.h | 4 ++ src/init.c | 2 + src/ta_MACDEXT.c | 86 +++++++++++++++++++++++++++++++++++++++ src/ta_MACDFIX.c | 69 +++++++++++++++++++++++++++++++ 7 files changed, 261 insertions(+), 10 deletions(-) create mode 100644 src/ta_MACDEXT.c create mode 100644 src/ta_MACDFIX.c diff --git a/NAMESPACE b/NAMESPACE index 2dd5ebff4..bf1e8edf2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -32,6 +32,9 @@ export(CDLEVENINGDOJISTAR) export(DEMA) export(EMA) export(KAMA) +export(MACD) +export(MACDEXT) +export(MACDFIX) export(MAMA) export(SMA) export(STOCHF) diff --git a/R/ta_MACD.R b/R/ta_MACD.R index 677091f10..04adf591b 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -43,14 +43,97 @@ moving_average_convergence_divergence.default <- function( if (!is.null(dim(x))) { stop("`x` has to be a double vector") } - assert(is.numeric(x)); assert(fast >= 2); - assert(slow >= 2); assert(signal >= 1); - - .Call( - .NAME = "impl_ta_MACD", - x, - as.integer(fast), - as.integer(slow), - as.integer(signal) + assert(is.numeric(x)); + + if (is.number(fast) && is.number(slow) && is.number(signal)) { + if (fast == 12 & slow == 26) { + + return ( + .Call( + "impl_ta_MACDFIX", + x, + as.integer(signal) + ) + ) + + } else { + + return( +.Call( + "impl_ta_MACD", + x, + as.integer(fast), + as.integer(slow), + as.integer(signal) + ) + ) + + } + } + + fast_call <- if (is.call(fast)) fast else substitute(fast) + slow_call <- if (is.call(slow)) slow else substitute(slow) + signal_call <- if (is.call(signal)) signal else substitute(signal) + + fast_ma <- map_maType_call(fast_call) + slow_ma <- map_maType_call(slow_call) + signal_ma <- map_maType_call(signal_call) + + .Call( + "impl_ta_MACDEXT", + x, + fast_ma$n, + fast_ma$maType, + slow_ma$n, + slow_ma$maType, + signal_ma$n, + signal_ma$maType + ) +} + +#' @export +MACD <- function(x, +fast = 12, + slow = 26, + signal = 9, + ...) { + + moving_average_convergence_divergence( + x, + fast, + slow, + signal + ) + +} + +#' @export +MACDFIX <- function(x, + signal = 9, + ...) { + + moving_average_convergence_divergence( + x, + 12, + 26, + signal + ) + +} + +#' @export +MACDEXT <- function( + x, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9), + ... +) { + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... ) -} \ No newline at end of file +} diff --git a/R/utils.R b/R/utils.R index 95f4e2507..ca7708d2c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -40,4 +40,8 @@ map_maType_call <- function(call_expr) { n = as.integer(n_val), maType = maType ) +} + +is.number <- function(x) { + is.numeric(x) || is.integer(x) } \ No newline at end of file diff --git a/src/api.h b/src/api.h index 0067a912d..23ba32796 100644 --- a/src/api.h +++ b/src/api.h @@ -20,6 +20,10 @@ SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); +SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, + SEXP optSlowPeriod, SEXP optSlowMAType, + SEXP optSignalPeriod, SEXP optSignalMAType); +SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod); SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP x, SEXP lag, SEXP matype); diff --git a/src/init.c b/src/init.c index 6042c9c59..475ea20c7 100644 --- a/src/init.c +++ b/src/init.c @@ -19,6 +19,8 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_CDLDOJISTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 6), + CALLDEF(impl_ta_MACDEXT, 7), + CALLDEF(impl_ta_MACDFIX, 2), CALLDEF(impl_ta_MACD, 4), CALLDEF(impl_ta_MA, 3), CALLDEF(impl_ta_RSI, 2), diff --git a/src/ta_MACDEXT.c b/src/ta_MACDEXT.c new file mode 100644 index 000000000..6847017c4 --- /dev/null +++ b/src/ta_MACDEXT.c @@ -0,0 +1,86 @@ +// ta_MACDEXT.c +// Interface to TA-Lib’s TA_MACDEXT (MACD with controllable MA types) +// +// Parameters +// inReal : numeric vector of source prices (length n). +// optFastPeriod : integer, fast MA period. +// optFastMAType : integer MAType code for fast MA. +// optSlowPeriod : integer, slow MA period. +// optSlowMAType : integer MAType code for slow MA. +// optSignalPeriod : integer, signal MA period. +// optSignalMAType : integer MAType code for signal MA. +// +// Description +// Computes MACD line, its signal line, and the MACD histogram +// with user-specified moving average types. Returns an n×3 matrix +// with columns "macd", "signal", "histogram" (all lower-case). + +#include "MAType.h" +#include "lib.h" +#include "shift.h" +#include +#include + +SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, + SEXP optSlowPeriod, SEXP optSlowMAType, + SEXP optSignalPeriod, SEXP optSignalMAType) { + // 1) Prepare inputs + int n = LENGTH(inReal); + const double *restrict src = REAL(inReal); + int fastP = INTEGER(optFastPeriod)[0]; + TA_MAType fastT = as_MAType(optFastMAType); + int slowP = INTEGER(optSlowPeriod)[0]; + TA_MAType slowT = as_MAType(optSlowMAType); + int signalP = INTEGER(optSignalPeriod)[0]; + TA_MAType signalT = as_MAType(optSignalMAType); + + // 2) Allocate output matrix (n rows × 3 cols) + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *restrict macd = REAL(result); + double *restrict signal = macd + n; + double *restrict histogram = macd + 2 * n; + + // 3) Call underlying TA function + int outBeg, outNb; + // clang-format off + TA_RetCode ret = TA_MACDEXT( + 0, + n - 1, + src, + fastP, + fastT, + slowP, + slowT, + signalP, + signalT, + &outBeg, + &outNb, + macd + outBeg, + signal + outBeg, + histogram + outBeg + ); + // clang-format on + + if (ret != TA_SUCCESS) { + UNPROTECT(1); + error("TA_MACDEXT failed with code %d", ret); + } + + // 4) Shift each output down by outBeg, padding with NA + shift_array(macd, n, outBeg); + shift_array(signal, n, outBeg); + shift_array(histogram, n, outBeg); + + // 5) Attach column names + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("macd")); + SET_STRING_ELT(cnames, 1, mkChar("signal")); + SET_STRING_ELT(cnames, 2, mkChar("histogram")); + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(3); + return result; +} diff --git a/src/ta_MACDFIX.c b/src/ta_MACDFIX.c new file mode 100644 index 000000000..cc190cf99 --- /dev/null +++ b/src/ta_MACDFIX.c @@ -0,0 +1,69 @@ +// ta_MACDFIX.c +// Interface to TA-Lib’s TA_MACDFIX (MACD fixed 12/26) +// +// Parameters +// inReal : numeric vector of source prices (length n). +// optSignalPeriod : integer, signal MA period. +// +// Description +// Computes MACD line (EMA12–EMA26), its signal line, and the histogram +// using the fixed 12/26 EMA and user-specified signal period. Returns +// an n×3 matrix with columns "macd", "signal", "histogram". +#include "MAType.h" +#include "lib.h" +#include "shift.h" +#include +#include +#include + +SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod) { + // 1) Prepare inputs + int n = LENGTH(inReal); + const double *restrict src = REAL(inReal); + int signalP = INTEGER(optSignalPeriod)[0]; + + // 2) Allocate output matrix (n rows × 3 cols) + SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + double *restrict macd = REAL(result); + double *restrict signal = macd + n; + double *restrict histogram = macd + 2 * n; + + // 3) Call underlying TA function + int outBeg, outNb; + // clang-format off + TA_RetCode ret = TA_MACDFIX( + 0, + n - 1, + src, + signalP, + &outBeg, + &outNb, + macd + outBeg, + signal + outBeg, + histogram + outBeg + ); + // clang-format on + + if (ret != TA_SUCCESS) { + UNPROTECT(1); + error("TA_MACDFIX failed with code %d", ret); + } + + // 4) Shift each output down by outBeg, padding with NA + shift_array(macd, n, outBeg); + shift_array(signal, n, outBeg); + shift_array(histogram, n, outBeg); + + // 5) Attach column names + SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); + SEXP cnames = PROTECT(allocVector(STRSXP, 3)); + SET_STRING_ELT(cnames, 0, mkChar("macd")); + SET_STRING_ELT(cnames, 1, mkChar("signal")); + SET_STRING_ELT(cnames, 2, mkChar("histogram")); + SET_VECTOR_ELT(dimnames, 0, R_NilValue); + SET_VECTOR_ELT(dimnames, 1, cnames); + setAttrib(result, R_DimNamesSymbol, dimnames); + + UNPROTECT(3); + return result; +} From 15196a2c742ef74fa613f4fdda358bb738b942e8 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 00:35:54 +0200 Subject: [PATCH 044/166] :hammer: Verbose wont matter if garbaged --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 00132e07a..e5a0129ee 100644 --- a/Makefile +++ b/Makefile @@ -12,11 +12,11 @@ help: build: ## Build the R package @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt - @Rscript --verbose -e "devtools::document()" > /dev/null 2>&1 + @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD INSTALL $(tarball_location) check: ## Check the R package - @Rscript --verbose -e "devtools::document()" > /dev/null 2>&1 + @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD check $(tarball_location) test: ## Run tests From 073734ac63f93784c4a0236fcf9d8c8030552bfd Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 00:36:15 +0200 Subject: [PATCH 045/166] :hammer: Updated Headers --- src/MAType.h | 6 +++--- src/lib.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/MAType.h b/src/MAType.h index dd1932adf..b828267e7 100644 --- a/src/MAType.h +++ b/src/MAType.h @@ -1,5 +1,5 @@ -#ifndef _LIB_H_ -#define _LIB_H_ +#ifndef _MATYPE_H +#define _MATYPE_H // as_MAType // // Parameters: @@ -15,4 +15,4 @@ static TA_MAType as_MAType(SEXP x) { return (TA_MAType)x_; } -#endif // _LIB_H_ +#endif // _MATYPE_H diff --git a/src/lib.h b/src/lib.h index 5cdbb2583..0f81525c1 100644 --- a/src/lib.h +++ b/src/lib.h @@ -6,11 +6,14 @@ #ifndef _LIB_H_ #define _LIB_H_ +#define R_RANDOM_H // R Headers #include #include #include +#undef R_RANDOM_H + // C Headers #include "shift.h" #include From b836748faacfcebad3c7365046a74f66c7ab32ee Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 09:09:11 +0200 Subject: [PATCH 046/166] :hammer: Unit-tests for MACD * The unit-tests checks for equivalence. --- tests/testthat/test-ta_MACD.R | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/testthat/test-ta_MACD.R diff --git a/tests/testthat/test-ta_MACD.R b/tests/testthat/test-ta_MACD.R new file mode 100644 index 000000000..c55097d56 --- /dev/null +++ b/tests/testthat/test-ta_MACD.R @@ -0,0 +1,49 @@ +## script: MACD +## author: Serkan Korkmaz +testthat::test_that(desc = "MACD", code = { + + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence(SPY[,1]) + alias <- MACD(SPY[,1]) + + ## 1.1) check if the values + ## are equal is by default + testthat::expect_equal( + object = output, + expected = alias + ) + +}) + +testthat::test_that(desc = "MACDFIX", code = { + + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence(SPY[,1]) + alias <- MACDFIX(SPY[,1]) + + ## 1.1) check if the values + ## are equal is by default + testthat::expect_equal( + object = output, + expected = alias + ) + +}) + +testthat::test_that(desc = "MACDEXT", code = { + + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence(SPY[,1], EMA(n = 12), EMA(n = 26), EMA(n =9)) + alias <- MACDEXT(SPY[,1]) + + ## 1.1) check if the values + ## are equal is by default + testthat::expect_equal( + object = output, + expected = alias + ) + +}) \ No newline at end of file From bfd873f705cbf8af2d61817d3221ab3093daf778 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 22:51:37 +0200 Subject: [PATCH 047/166] :hammer: Updated MACD and utils --- .gitignore | 3 +- R/ta_MACD.R | 137 ++++++++----------- R/utils.R | 44 +++++- man/moving_average_convergence_divergence.Rd | 18 +-- 4 files changed, 103 insertions(+), 99 deletions(-) diff --git a/.gitignore b/.gitignore index 8cf9c3c9d..fef0a1cdd 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,5 @@ rsconnect/ src/Makevars # Building nots -NOTES.md \ No newline at end of file +NOTES.md +using_call.R diff --git a/R/ta_MACD.R b/R/ta_MACD.R index 04adf591b..a9d998c86 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -1,14 +1,4 @@ -#' @title NULL -#' @usage NULL -#' -#' @template description -#' -#' @templateVar .title Moving Average Convergence/Divergence -#' @templateVar .type multivariate -#' @templateVar .fun moving_average_convergence_divergence -#' @templateVar .author Serkan Korkmaz -#' -#' @returns Something +#' @title Moving Average Convergence Divergence #' @export moving_average_convergence_divergence <- function( x, @@ -17,9 +7,8 @@ moving_average_convergence_divergence <- function( signal = 9, ...) { - UseMethod( - generic = "moving_average_convergence_divergence" - ) + UseMethod("moving_average_convergence_divergence") + } #' @export @@ -27,98 +16,83 @@ moving_average_convergence_divergence.default <- function( x, fast = 12, slow = 26, - signal = 9, + signal = 9, ...) { + + if (!is.null(dim(x)) && !is.numeric(x)) { + stop("`x` has to be a double vector", call. = FALSE) + } - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## ) check args + ## for calls + env <- parent.frame() + exprs <- substitute(list(fast = fast, slow = slow, signal = signal))[-1L] + is_calls <- vapply(exprs, .is_ma_spec, logical(1L), env = env) - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)); + if (!(all(is_calls) || all(!is_calls))) { + stop("Either all of `fast`, `slow` and `signal` is specified as calls, or none at all. See examples for more details.") + } - if (is.number(fast) && is.number(slow) && is.number(signal)) { - if (fast == 12 & slow == 26) { - - return ( - .Call( - "impl_ta_MACDFIX", - x, - as.integer(signal) - ) - ) - - } else { - - return( -.Call( - "impl_ta_MACD", - x, - as.integer(fast), - as.integer(slow), - as.integer(signal) - ) - ) - - } + if (!all(is_calls)) { + fast_i <- .eval_int(exprs$fast, env) + slow_i <- .eval_int(exprs$slow, env) + signal_i <- .eval_int(exprs$signal, env) + + if (fast_i == 12L && slow_i == 26L) { + return(.Call("impl_ta_MACDFIX", x, signal_i)) } - fast_call <- if (is.call(fast)) fast else substitute(fast) - slow_call <- if (is.call(slow)) slow else substitute(slow) - signal_call <- if (is.call(signal)) signal else substitute(signal) + return(.Call("impl_ta_MACD", x, fast_i, slow_i, signal_i)) + } + + fast_call <- .normalize_ma_arg_expr(exprs$fast, env) + slow_call <- .normalize_ma_arg_expr(exprs$slow, env) + signal_call <- .normalize_ma_arg_expr(exprs$signal, env) fast_ma <- map_maType_call(fast_call) slow_ma <- map_maType_call(slow_call) signal_ma <- map_maType_call(signal_call) - .Call( + .Call( "impl_ta_MACDEXT", x, - fast_ma$n, + fast_ma$n, fast_ma$maType, slow_ma$n, slow_ma$maType, signal_ma$n, signal_ma$maType - ) + ) } #' @export -MACD <- function(x, -fast = 12, +MACD <- function( + x, + fast = 12, slow = 26, signal = 9, ...) { - moving_average_convergence_divergence( x, - fast, - slow, - signal + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... ) - } #' @export -MACDFIX <- function(x, +MACDFIX <- function( + x, signal = 9, ...) { - moving_average_convergence_divergence( - x, - 12, - 26, - signal + x, + 12, + 26, + signal, + ... ) - } #' @export @@ -127,13 +101,12 @@ MACDEXT <- function( fast = EMA(n = 12), slow = EMA(n = 26), signal = EMA(n = 9), - ... -) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... - ) -} + ...) { + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... + ) +} \ No newline at end of file diff --git a/R/utils.R b/R/utils.R index ca7708d2c..92230e129 100644 --- a/R/utils.R +++ b/R/utils.R @@ -15,7 +15,6 @@ assert <- function(exprs) { ## map MAs map_maType_call <- function(call_expr) { - ## strip off the head and args args <- as.list(call_expr)[-1L] head_chr <- as.character(call_expr[[1L]]) fun_name <- tail(head_chr, 1L) @@ -44,4 +43,47 @@ map_maType_call <- function(call_expr) { is.number <- function(x) { is.numeric(x) || is.integer(x) +} + +.unwrap_meta <- function(expr, env) { + repeat { + if (!is.call(expr)) break + head <- expr[[1L]] + if (is.symbol(head) && as.character(head) %in% c("substitute", "quote")) { + expr <- eval(expr, envir = env, enclos = env) + } else { + break + } + } + expr +} + +.is_ma_spec <- function(expr, env) { + expr1 <- .unwrap_meta(expr, env) + if (is.call(expr1)) return(TRUE) + if (is.symbol(expr1)) { + v <- try(get(as.character(expr1), envir = env, inherits = TRUE), silent = TRUE) + return(!inherits(v, "try-error") && is.language(v)) + } + FALSE +} + +# Normalize one MA argument to a CALL, without forcing promises. +.normalize_ma_arg_expr <- function(expr, env) { + expr1 <- .unwrap_meta(expr, env) + if (is.call(expr1)) return(expr1) + if (is.symbol(expr1)) { + v <- get(as.character(expr1), envir = env, inherits = TRUE) + if (is.language(v)) return(v) + } + stop("Expected an MA spec like EMA(n = 12).", call. = FALSE) +} + +# Safe integer eval for the numeric path (after unwrapping). +.eval_int <- function(expr, env) { + expr1 <- .unwrap_meta(expr, env) + v <- eval(expr1, envir = env, enclos = env) + if (!is.number(v) || length(v) != 1L || !is.finite(v)) + stop("fast/slow/signal must be finite numeric scalars.", call. = FALSE) + as.integer(v) } \ No newline at end of file diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index 19efd2acf..7bbb60d53 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -2,22 +2,10 @@ % Please edit documentation in R/ta_MACD.R \name{moving_average_convergence_divergence} \alias{moving_average_convergence_divergence} -\title{Moving Average Convergence/Divergence} +\title{Moving Average Convergence Divergence} \usage{ -## Generic default S3 method -## for Moving Average Convergence/Divergence -moving_average_convergence_divergence(...) -} -\value{ -Something +moving_average_convergence_divergence(x, fast = 12, slow = 26, signal = 9, ...) } \description{ -A generic S3 function to compute the moving average convergence/divergence. The function assumes that the input \link{matrix} \code{x} is Open (\code{x[,1]}), High (\code{x[,2]}), Low (\code{x[,3]}), Close (\code{x[,4]}) and Volume (\code{x[,5]}). -} -\author{ -Serkan Korkmaz +Moving Average Convergence Divergence } -\concept{algorithmic trading} -\concept{finance} -\concept{technical analysis} -\concept{trading} From 970a320aa4a466861fd6a4107d515e0e85c9e3a6 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 23:33:52 +0200 Subject: [PATCH 048/166] :hammer: Split MACD files * This follows the TA-Lib implemenation --- R/ta_MACD.R | 30 ------------------------------ R/ta_MACDEXT.R | 16 ++++++++++++++++ R/ta_MACDFIX.R | 14 ++++++++++++++ 3 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 R/ta_MACDEXT.R create mode 100644 R/ta_MACDFIX.R diff --git a/R/ta_MACD.R b/R/ta_MACD.R index a9d998c86..c432cc57d 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -80,33 +80,3 @@ MACD <- function( ... ) } - -#' @export -MACDFIX <- function( - x, - signal = 9, - ...) { - moving_average_convergence_divergence( - x, - 12, - 26, - signal, - ... - ) -} - -#' @export -MACDEXT <- function( - x, - fast = EMA(n = 12), - slow = EMA(n = 26), - signal = EMA(n = 9), - ...) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... - ) -} \ No newline at end of file diff --git a/R/ta_MACDEXT.R b/R/ta_MACDEXT.R new file mode 100644 index 000000000..64db3f070 --- /dev/null +++ b/R/ta_MACDEXT.R @@ -0,0 +1,16 @@ + +#' @export +MACDEXT <- function( + x, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9), + ...) { + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... + ) +} \ No newline at end of file diff --git a/R/ta_MACDFIX.R b/R/ta_MACDFIX.R new file mode 100644 index 000000000..666007708 --- /dev/null +++ b/R/ta_MACDFIX.R @@ -0,0 +1,14 @@ + +#' @export +MACDFIX <- function( + x, + signal = 9, + ...) { + moving_average_convergence_divergence( + x, + 12, + 26, + signal, + ... + ) +} \ No newline at end of file From 96e5769f9eb13dd51fc717f9a441cbcc92c2cfa7 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 9 Aug 2025 23:40:15 +0200 Subject: [PATCH 049/166] :hammer: Added format options to api.h --- src/api.h | 45 +++++++++++++++---------------------------- tools/generate_API.sh | 4 +++- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/api.h b/src/api.h index 23ba32796..aedb90225 100644 --- a/src/api.h +++ b/src/api.h @@ -4,38 +4,25 @@ #include -SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, - SEXP optTimePeriod); -SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, - SEXP maTypeSEXP); +// clang-format off +SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); +SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); -SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, - SEXP optNbDevDn, SEXP optMAType); -SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag); -SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag); -SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag); -SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP penetration, SEXP normalize_flag); -SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, - SEXP optSlowPeriod, SEXP optSlowMAType, - SEXP optSignalPeriod, SEXP optSignalMAType); +SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); +SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); +SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, SEXP optSlowPeriod, SEXP optSlowMAType, SEXP optSignalPeriod, SEXP optSignalMAType); SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod); -SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, - SEXP optSignalPeriod); +SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP x, SEXP lag, SEXP matype); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); -SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, - SEXP fastd_period, SEXP fastd_matype); -SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, - SEXP fastd_period, SEXP fastd_matype); -SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, - SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, - SEXP slowd_matype); -SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, - SEXP timeperiod2, SEXP timeperiod3); +SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); +SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); +SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype); +SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3); +// clang-format on -#endif +#endif //_API_H diff --git a/tools/generate_API.sh b/tools/generate_API.sh index 3bf0c117c..d860b8d3a 100755 --- a/tools/generate_API.sh +++ b/tools/generate_API.sh @@ -26,6 +26,7 @@ print_header() { #include +// clang-format off EOF } @@ -61,8 +62,9 @@ extract_signatures() { print_footer() { cat <<'EOF' +// clang-format on -#endif +#endif //_API_H EOF } From 01eeea62b43f21087c4e3f45c6301ee2f8c1643e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 10 Aug 2025 10:03:16 +0200 Subject: [PATCH 050/166] :hammer: Chaikin Line and Oscillators * Fully implemented --- NAMESPACE | 6 +++ R/ta_AD.R | 21 +++++++++ R/ta_ADOSC.R | 23 ++++++++++ man/chaikin_AD_line.Rd | 11 +++++ man/chaikin_AD_oscillator.Rd | 11 +++++ src/api.h | 2 + src/init.c | 2 + src/ta_AD.c | 75 ++++++++++++++++++++++++++++++ src/ta_ADOSC.c | 88 ++++++++++++++++++++++++++++++++++++ 9 files changed, 239 insertions(+) create mode 100644 R/ta_AD.R create mode 100644 R/ta_ADOSC.R create mode 100644 man/chaikin_AD_line.Rd create mode 100644 man/chaikin_AD_oscillator.Rd create mode 100644 src/ta_AD.c create mode 100644 src/ta_ADOSC.c diff --git a/NAMESPACE b/NAMESPACE index bf1e8edf2..b852c9859 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,6 +4,8 @@ S3method(acceleration_bands,default) S3method(aroon,default) S3method(aroon_oscillator,default) S3method(bollinger_bands,default) +S3method(chaikin_AD_line,default) +S3method(chaikin_AD_oscillator,default) S3method(doji,default) S3method(doji_star,default) S3method(double_exponential_moving_average,default) @@ -24,6 +26,8 @@ S3method(triple_exponential_moving_average,default) S3method(ultimate_oscillator,default) S3method(weighted_moving_average,default) export(ACCBANDS) +export(AD) +export(ADOSC) export(BBANDS) export(CDLDOJI) export(CDLDOJISTAR) @@ -47,6 +51,8 @@ export(acceleration_bands) export(aroon) export(aroon_oscillator) export(bollinger_bands) +export(chaikin_AD_line) +export(chaikin_AD_oscillator) export(doji) export(doji_star) export(double_exponential_moving_average) diff --git a/R/ta_AD.R b/R/ta_AD.R new file mode 100644 index 000000000..9369247c6 --- /dev/null +++ b/R/ta_AD.R @@ -0,0 +1,21 @@ +#' @title Chaikin A/D Line +#' @export +chaikin_AD_line <- function(x, ...) { + UseMethod( + "chaikin_AD_line" + ) +} + +#' @export +AD <- chaikin_AD_line + +#' @export +chaikin_AD_line.default <- function(x, ...) { + .Call( + "impl_ta_AD", + .high(x), + .low(x), + .close(x), + .volume(x) + ) +} \ No newline at end of file diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R new file mode 100644 index 000000000..424fa233c --- /dev/null +++ b/R/ta_ADOSC.R @@ -0,0 +1,23 @@ +#' @title Chaikin A/D Oscillator +#' @export +chaikin_AD_oscillator <- function(x, fast = 3, slow = 10, ...) { + UseMethod( + "chaikin_AD_oscillator" + ) +} + +#' @export +ADOSC <- chaikin_AD_oscillator + +#' @export +chaikin_AD_oscillator.default <- function(x, fast = 3, slow = 10, ...) { + .Call( + "impl_ta_ADOSC", + .high(x), + .low(x), + .close(x), + .volume(x), + as.integer(fast), + as.integer(slow) + ) +} \ No newline at end of file diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd new file mode 100644 index 000000000..83a50b183 --- /dev/null +++ b/man/chaikin_AD_line.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_AD.R +\name{chaikin_AD_line} +\alias{chaikin_AD_line} +\title{Chaikin A/D Line} +\usage{ +chaikin_AD_line(x, ...) +} +\description{ +Chaikin A/D Line +} diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd new file mode 100644 index 000000000..ff24b1116 --- /dev/null +++ b/man/chaikin_AD_oscillator.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_ADOSC.R +\name{chaikin_AD_oscillator} +\alias{chaikin_AD_oscillator} +\title{Chaikin A/D Oscillator} +\usage{ +chaikin_AD_oscillator(x, fast = 3, slow = 10, ...) +} +\description{ +Chaikin A/D Oscillator +} diff --git a/src/api.h b/src/api.h index aedb90225..dc679ae69 100644 --- a/src/api.h +++ b/src/api.h @@ -6,6 +6,8 @@ // clang-format off SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); +SEXP impl_ta_ADOSC(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume, SEXP optFastPeriod, SEXP optSlowPeriod); +SEXP impl_ta_AD(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume); SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); diff --git a/src/init.c b/src/init.c index 475ea20c7..16a7e5851 100644 --- a/src/init.c +++ b/src/init.c @@ -11,6 +11,8 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_ACCBANDS, 4), + CALLDEF(impl_ta_ADOSC, 6), + CALLDEF(impl_ta_AD, 4), CALLDEF(impl_ta_APO, 4), CALLDEF(impl_ta_AROONOSC, 3), CALLDEF(impl_ta_AROON, 3), diff --git a/src/ta_AD.c b/src/ta_AD.c new file mode 100644 index 000000000..bd7768b4a --- /dev/null +++ b/src/ta_AD.c @@ -0,0 +1,75 @@ +// Interface to ta_AD (Chaikin A/D Line) +// +// Parameters +// inHigh : numeric vector of highs (length n) +// inLow : numeric vector of lows (length n) +// inClose : numeric vector of closes (length n) +// inVolume : numeric vector of volumes (length n) +// +// Description +// Computes the cumulative Chaikin A/D Line. +// Returns a numeric vector of length n (unnamed). +// +// Notes +// - TA_AD has zero lookback and writes a contiguous output segment, +// reported via outBegIdx/outNbElement. We write from index 0 and +// then pad leading NAs by a single in-place shift for O(n) work. +// - See TA-Lib API calling pattern (startIdx/endIdx/outBegIdx/outNbElement). +// This wrapper follows that pattern and then normalizes to full length. +// (Docs: C/C++ API; Function list & AD) +// Reference: https://ta-lib.org/api/ , https://ta-lib.org/functions/ . +// (Also exposed in TA-Lib “volume” group.) +#include "lib.h" +#include "shift.h" +#include +#include +#include + +SEXP impl_ta_AD(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume) { + const int n = LENGTH(inHigh); + + // 0) Fast length sanity: all inputs must match; empty -> empty. + if (n == 0) + return allocVector(REALSXP, 0); + if (LENGTH(inLow) != n || LENGTH(inClose) != n || LENGTH(inVolume) != n) { + Rf_error("AD: input lengths must match."); + } + + // 1) Alias input buffers with restrict for better alias analysis. + const double *restrict high = REAL(inHigh); + const double *restrict low = REAL(inLow); + const double *restrict close = REAL(inClose); + const double *restrict volume = REAL(inVolume); + + // 2) Allocate full-length output; unnamed vector by contract. + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *restrict out = REAL(result); + + // 3) Call TA-Lib over the whole range; write from index 0. + int outBeg = 0, outNb = 0; + // clang-format off + const TA_RetCode ret = TA_AD( + 0, + n - 1, + high, + low, + close, + volume, + &outBeg, + &outNb, + out +); + // clang-format on + + if (ret != TA_SUCCESS) { + UNPROTECT(1); + Rf_error("TA_AD failed (code %d).", (int)ret); + } + + // 4) Normalize to input length by padding leading NAs. + // This shifts [0..outNb-1] to start at index outBeg. + shift_array(out, n, outBeg); + + UNPROTECT(1); + return result; +} diff --git a/src/ta_ADOSC.c b/src/ta_ADOSC.c new file mode 100644 index 000000000..b5124e451 --- /dev/null +++ b/src/ta_ADOSC.c @@ -0,0 +1,88 @@ +// Interface to ta_ADOSC (Chaikin A/D Oscillator) +// +// Parameters +// inHigh : numeric vector of highs (length n) +// inLow : numeric vector of lows (length n) +// inClose : numeric vector of closes (length n) +// inVolume : numeric vector of volumes (length n) +// optFastPeriod : integer fast EMA period (default 3 in TA-Lib) +// optSlowPeriod : integer slow EMA period (default 10 in TA-Lib) +// +// Description +// ADOSC = EMA_fast(AD) - EMA_slow(AD). +// Returns a numeric vector of length n (unnamed). Leading NAs equal +// to TA_ADOSC lookback (EMA of the slower of the two periods) are padded. +// +// Notes +// - TA-Lib’s ADOSC defaults and definition per docs (volume group). +// The lookback equals EMA lookback of the slower period. +// References: TA-Lib API and volume indicator docs. +// https://ta-lib.org/api/ , +// https://ta-lib.github.io/ta-lib-python/func_groups/volume_indicators.html +// - Implementation writes from index 0 and then performs one in-place +// shift to insert NA padding at the front. +// +// Micro-optimizations +// * Restrict-qualified pointers for better alias analysis +// * Single allocation, single pass over the output +// * Early empty/length checks avoid TA call on degenerate ranges +#include "lib.h" +#include "shift.h" +#include +#include +#include + +SEXP impl_ta_ADOSC(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume, + SEXP optFastPeriod, SEXP optSlowPeriod) { + const int n = LENGTH(inHigh); + + // 0) Length checks; empty → empty. + if (n == 0) + return allocVector(REALSXP, 0); + if (LENGTH(inLow) != n || LENGTH(inClose) != n || LENGTH(inVolume) != n) { + Rf_error("ADOSC: input lengths must match."); + } + + // 1) Read optional periods (no bounds check here; TA-Lib validates). + const int fastP = INTEGER(optFastPeriod)[0]; + const int slowP = INTEGER(optSlowPeriod)[0]; + + // 2) Alias inputs with restrict. + const double *restrict high = REAL(inHigh); + const double *restrict low = REAL(inLow); + const double *restrict close = REAL(inClose); + const double *restrict volume = REAL(inVolume); + + // 3) Allocate full-length output. + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *restrict out = REAL(result); + + // 4) Call TA-Lib from index 0; write from out[0]. + int outBeg = 0, outNb = 0; + // clang-format off + const TA_RetCode ret = TA_ADOSC( + 0, + n - 1, + high, + low, + close, + volume, + fastP, + slowP, + &outBeg, + &outNb, + out +); + // clang-format on + + if (ret != TA_SUCCESS) { + UNPROTECT(1); + Rf_error("TA_ADOSC failed (code %d).", (int)ret); + } + + // 5) Normalize by padding leading NAs equal to outBeg (EMA lookback). + shift_array(out, n, outBeg); + + UNPROTECT(1); + return result; +} From ad87d97eea13723ac040d98c58ed4dd39a40bf15 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 10 Aug 2025 19:43:28 +0200 Subject: [PATCH 051/166] :hammer: Hilbert Transforms --- NAMESPACE | 12 +++++++ R/ta_HT_DCPERIOD.R | 13 ++++++++ R/ta_HT_DCPHASE.R | 13 ++++++++ R/ta_HT_PHASOR.R | 13 ++++++++ R/ta_HT_SINE.R | 13 ++++++++ R/ta_HT_TRENDLINE.R | 14 ++++++++ R/ta_HT_TRENDMODE.R | 14 ++++++++ man/ht_dcperiod.Rd | 11 ++++++ man/ht_dcphase.Rd | 11 ++++++ man/ht_phasor.Rd | 11 ++++++ man/ht_sine.Rd | 11 ++++++ man/ht_trendline.Rd | 11 ++++++ man/ht_trendmode.Rd | 11 ++++++ src/api.h | 6 ++++ src/init.c | 6 ++++ src/ta_HT_DCPERIOD.c | 63 ++++++++++++++++++++++++++++++++++ src/ta_HT_DCPHASE.c | 53 +++++++++++++++++++++++++++++ src/ta_HT_PHASOR.c | 78 +++++++++++++++++++++++++++++++++++++++++++ src/ta_HT_SINE.c | 75 +++++++++++++++++++++++++++++++++++++++++ src/ta_HT_TRENDLINE.c | 59 ++++++++++++++++++++++++++++++++ src/ta_HT_TRENDMODE.c | 58 ++++++++++++++++++++++++++++++++ 21 files changed, 556 insertions(+) create mode 100644 R/ta_HT_DCPERIOD.R create mode 100644 R/ta_HT_DCPHASE.R create mode 100644 R/ta_HT_PHASOR.R create mode 100644 R/ta_HT_SINE.R create mode 100644 R/ta_HT_TRENDLINE.R create mode 100644 R/ta_HT_TRENDMODE.R create mode 100644 man/ht_dcperiod.Rd create mode 100644 man/ht_dcphase.Rd create mode 100644 man/ht_phasor.Rd create mode 100644 man/ht_sine.Rd create mode 100644 man/ht_trendline.Rd create mode 100644 man/ht_trendmode.Rd create mode 100644 src/ta_HT_DCPERIOD.c create mode 100644 src/ta_HT_DCPHASE.c create mode 100644 src/ta_HT_PHASOR.c create mode 100644 src/ta_HT_SINE.c create mode 100644 src/ta_HT_TRENDLINE.c create mode 100644 src/ta_HT_TRENDMODE.c diff --git a/NAMESPACE b/NAMESPACE index b852c9859..14d1d11b3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -13,6 +13,12 @@ S3method(dragonfly_doji,default) S3method(evening_doji_star,default) S3method(exponential_moving_average,default) S3method(fast_stochastic,default) +S3method(ht_dcperiod,default) +S3method(ht_dcphase,default) +S3method(ht_phasor,default) +S3method(ht_sine,default) +S3method(ht_trendline,default) +S3method(ht_trendmode,default) S3method(kaufman_adaptive_moving_average,default) S3method(mesa_adaptive_moving_average,default) S3method(moving_average_convergence_divergence,default) @@ -60,6 +66,12 @@ export(dragonfly_doji) export(evening_doji_star) export(exponential_moving_average) export(fast_stochastic) +export(ht_dcperiod) +export(ht_dcphase) +export(ht_phasor) +export(ht_sine) +export(ht_trendline) +export(ht_trendmode) export(kaufman_adaptive_moving_average) export(mesa_adaptive_moving_average) export(moving_average_convergence_divergence) diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R new file mode 100644 index 000000000..07226ef88 --- /dev/null +++ b/R/ta_HT_DCPERIOD.R @@ -0,0 +1,13 @@ +#' @title Hilbert Transform - Dominant Cycle Period +#' @export +ht_dcperiod <- function(x, ...) { + UseMethod("ht_dcperiod") +} + +#' @export +ht_dcperiod.default <- function(x, ...) { + .Call( + "impl_ta_HT_DCPERIOD", + as.numeric(x) + ) +} \ No newline at end of file diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R new file mode 100644 index 000000000..15f5079ef --- /dev/null +++ b/R/ta_HT_DCPHASE.R @@ -0,0 +1,13 @@ +#' @title Hilbert Transform - Dominant Cycle Phase +#' @export +ht_dcphase <- function(x, ...) { + UseMethod("ht_dcphase") +} + +#' @export +ht_dcphase.default <- function(x, ...) { + .Call( + "impl_ta_HT_DCPHASE", + as.numeric(x) + ) +} \ No newline at end of file diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R new file mode 100644 index 000000000..5fc7f04b6 --- /dev/null +++ b/R/ta_HT_PHASOR.R @@ -0,0 +1,13 @@ +#' @title Hilbert Transform - Phasor Components +#' @export +ht_phasor <- function(x, ...) { + UseMethod("ht_phasor") +} + +#' @export +ht_phasor.default <- function(x, ...) { + .Call( + "impl_ta_HT_PHASOR", + as.numeric(x) + ) +} \ No newline at end of file diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R new file mode 100644 index 000000000..225df8aa6 --- /dev/null +++ b/R/ta_HT_SINE.R @@ -0,0 +1,13 @@ +#' @title Hilbert Transform - SineWave +#' @export +ht_sine <- function(x, ...) { + UseMethod("ht_sine") +} + +#' @export +ht_sine.default <- function(x, ...) { + .Call( + "impl_ta_HT_SINE", + as.numeric(x) + ) +} \ No newline at end of file diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R new file mode 100644 index 000000000..99eafd659 --- /dev/null +++ b/R/ta_HT_TRENDLINE.R @@ -0,0 +1,14 @@ + +#' @title Hilbert Transform - Instantaneous Trendline +#' @export +ht_trendline <- function(x, ...) { + UseMethod("ht_trendline") +} + +#' @export +ht_trendline.default <- function(x, ...) { + .Call( + "impl_ta_HT_TRENDLINE", + as.numeric(x) + ) +} \ No newline at end of file diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R new file mode 100644 index 000000000..23cccdd16 --- /dev/null +++ b/R/ta_HT_TRENDMODE.R @@ -0,0 +1,14 @@ + +#' @title Hilbert Transform - Trend vs Cycle Mode +#' @export +ht_trendmode <- function(x, ...) { + UseMethod("ht_trendmode") +} + +#' @export +ht_trendmode.default <- function(x, ...) { + .Call( + "impl_ta_HT_TRENDMODE", + as.numeric(x) + ) +} \ No newline at end of file diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd new file mode 100644 index 000000000..f2c63d09f --- /dev/null +++ b/man/ht_dcperiod.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_DCPERIOD.R +\name{ht_dcperiod} +\alias{ht_dcperiod} +\title{Hilbert Transform - Dominant Cycle Period} +\usage{ +ht_dcperiod(x, ...) +} +\description{ +Hilbert Transform - Dominant Cycle Period +} diff --git a/man/ht_dcphase.Rd b/man/ht_dcphase.Rd new file mode 100644 index 000000000..8214e8613 --- /dev/null +++ b/man/ht_dcphase.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_DCPHASE.R +\name{ht_dcphase} +\alias{ht_dcphase} +\title{Hilbert Transform - Dominant Cycle Phase} +\usage{ +ht_dcphase(x, ...) +} +\description{ +Hilbert Transform - Dominant Cycle Phase +} diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd new file mode 100644 index 000000000..458357f7f --- /dev/null +++ b/man/ht_phasor.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_PHASOR.R +\name{ht_phasor} +\alias{ht_phasor} +\title{Hilbert Transform - Phasor Components} +\usage{ +ht_phasor(x, ...) +} +\description{ +Hilbert Transform - Phasor Components +} diff --git a/man/ht_sine.Rd b/man/ht_sine.Rd new file mode 100644 index 000000000..540802754 --- /dev/null +++ b/man/ht_sine.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_SINE.R +\name{ht_sine} +\alias{ht_sine} +\title{Hilbert Transform - SineWave} +\usage{ +ht_sine(x, ...) +} +\description{ +Hilbert Transform - SineWave +} diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd new file mode 100644 index 000000000..cca37091b --- /dev/null +++ b/man/ht_trendline.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_TRENDLINE.R +\name{ht_trendline} +\alias{ht_trendline} +\title{Hilbert Transform - Instantaneous Trendline} +\usage{ +ht_trendline(x, ...) +} +\description{ +Hilbert Transform - Instantaneous Trendline +} diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd new file mode 100644 index 000000000..0c9b90f5d --- /dev/null +++ b/man/ht_trendmode.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_TRENDMODE.R +\name{ht_trendmode} +\alias{ht_trendmode} +\title{Hilbert Transform - Trend vs Cycle Mode} +\usage{ +ht_trendmode(x, ...) +} +\description{ +Hilbert Transform - Trend vs Cycle Mode +} diff --git a/src/api.h b/src/api.h index dc679ae69..4ca32f292 100644 --- a/src/api.h +++ b/src/api.h @@ -16,6 +16,12 @@ SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_ SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); +SEXP impl_ta_HT_DCPERIOD(SEXP inReal); +SEXP impl_ta_HT_DCPHASE(SEXP inReal); +SEXP impl_ta_HT_PHASOR(SEXP inReal); +SEXP impl_ta_HT_SINE(SEXP inReal); +SEXP impl_ta_HT_TRENDLINE(SEXP inReal); +SEXP impl_ta_HT_TRENDMODE(SEXP inReal); SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, SEXP optSlowPeriod, SEXP optSlowMAType, SEXP optSignalPeriod, SEXP optSignalMAType); SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod); SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); diff --git a/src/init.c b/src/init.c index 16a7e5851..27dbfa17f 100644 --- a/src/init.c +++ b/src/init.c @@ -21,6 +21,12 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_CDLDOJISTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 6), + CALLDEF(impl_ta_HT_DCPERIOD, 1), + CALLDEF(impl_ta_HT_DCPHASE, 1), + CALLDEF(impl_ta_HT_PHASOR, 1), + CALLDEF(impl_ta_HT_SINE, 1), + CALLDEF(impl_ta_HT_TRENDLINE, 1), + CALLDEF(impl_ta_HT_TRENDMODE, 1), CALLDEF(impl_ta_MACDEXT, 7), CALLDEF(impl_ta_MACDFIX, 2), CALLDEF(impl_ta_MACD, 4), diff --git a/src/ta_HT_DCPERIOD.c b/src/ta_HT_DCPERIOD.c new file mode 100644 index 000000000..f68360805 --- /dev/null +++ b/src/ta_HT_DCPERIOD.c @@ -0,0 +1,63 @@ +// Interface to ta_HT_DCPERIOD (Hilbert Transform - Dominant Cycle Period) +// +// Parameters +// inReal : numeric vector of source prices. +// +// Description +// Returns the smoothed dominant cycle period per bar as a numeric vector. +// Length equals input; leading elements are NA (padded using shift_array). +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_HT_DCPERIOD(SEXP inReal) { + // 1) Basic sizes and raw pointers (use restrict for better aliasing + // assumptions). + const int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + // 2) Allocate full-length output. We write at offset outBeg and then pad. + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *restrict out = REAL(result); + + // check wether the minimum + // required matches that of + // the input + const int minimum_lookback = TA_HT_DCPERIOD_Lookback(); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out[i] = NA_REAL; + } + + UNPROTECT(1); + return result; + } + + // 3) Call TA-Lib. We offset the output pointer by outBeg to avoid an extra + // copy. + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode ret = TA_HT_DCPERIOD( + 0, + n > 0 ? n - 1 : 0, + src, + &outBeg, + &outNb, + out + outBeg); + // clang-format on + + // 4) Shift-pad in place so the first outBeg values become NA and length stays + // n. + // This also covers ret != TA_SUCCESS by NA-padding the whole vector when + // outBeg>=n. + shift_array(out, n, outBeg); + + UNPROTECT(1); + return result; +} diff --git a/src/ta_HT_DCPHASE.c b/src/ta_HT_DCPHASE.c new file mode 100644 index 000000000..a4f0e1bee --- /dev/null +++ b/src/ta_HT_DCPHASE.c @@ -0,0 +1,53 @@ +// Interface to ta_HT_DCPHASE (Hilbert Transform - Dominant Cycle Phase) +// +// Parameters +// inReal : numeric vector of source prices. +// +// Description +// Returns dominant cycle phase (degrees) as a numeric vector. +// Length equals input; leading elements are NA (padded using shift_array). +#include "lib.h" +#include "shift.h" +#include +#include +#include + +SEXP impl_ta_HT_DCPHASE(SEXP inReal) { + const int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *restrict out = REAL(result); + + // check wether the minimum + // required matches that of + // the input + const int minimum_lookback = TA_HT_DCPHASE_Lookback(); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out[i] = NA_REAL; + } + + UNPROTECT(1); + return result; + } + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode ret = TA_HT_DCPHASE( + 0, + n > 0 ? n - 1 : 0, + src, + &outBeg, + &outNb, + out + outBeg); + // clang-format on + + shift_array(out, n, outBeg); + + UNPROTECT(1); + return result; +} diff --git a/src/ta_HT_PHASOR.c b/src/ta_HT_PHASOR.c new file mode 100644 index 000000000..9609cd911 --- /dev/null +++ b/src/ta_HT_PHASOR.c @@ -0,0 +1,78 @@ +// Interface to ta_HT_PHASOR (Hilbert Transform - Phasor Components) +// +// Parameters +// inReal : numeric vector of source prices. +// +// Description +// Returns an n × 2 matrix with columns: +// "inphase" : in-phase component, +// "quadrature" : quadrature component. +// Leading rows are NA-padded via shift_array; column names are lower-case. +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_HT_PHASOR(SEXP inReal) { + const int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + // Allocate a 2-column matrix laid out column-major: [inphase | quadrature] + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); + double *restrict inphase = REAL(result); // col 0 + double *restrict quadrature = inphase + n; // col 1 + + // check wether the minimum + // required matches that of + // the input + const int minimum_lookback = TA_HT_PHASOR_Lookback(); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + inphase[i] = quadrature[i] = NA_REAL; + } + + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cn = PROTECT(allocVector(STRSXP, 2)); + SET_STRING_ELT(cn, 0, mkChar("sine")); + SET_STRING_ELT(cn, 1, mkChar("leadsine")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cn); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; + } + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode ret = TA_HT_PHASOR( + 0, + n > 0 ? n - 1 : 0, + src, + &outBeg, + &outNb, + inphase + outBeg, + quadrature + outBeg); + // clang-format on + + // NA-pad both columns. + shift_array(inphase, n, outBeg); + shift_array(quadrature, n, outBeg); + + // Set column names (lower-case). + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cn = PROTECT(allocVector(STRSXP, 2)); + SET_STRING_ELT(cn, 0, mkChar("inphase")); + SET_STRING_ELT(cn, 1, mkChar("quadrature")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cn); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; +} diff --git a/src/ta_HT_SINE.c b/src/ta_HT_SINE.c new file mode 100644 index 000000000..14f36fb2f --- /dev/null +++ b/src/ta_HT_SINE.c @@ -0,0 +1,75 @@ +// Interface to ta_HT_SINE (Hilbert Transform - SineWave) +// +// Parameters +// inReal : numeric vector of source prices. +// +// Description +// Returns an n × 2 matrix with columns: +// "sine" : sine of dominant cycle phase, +// "leadsine" : sine of phase + 45°. +// Leading rows are NA-padded via shift_array; column names are lower-case. +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_HT_SINE(SEXP inReal) { + const int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); + double *restrict sine = REAL(result); // col 0 + double *restrict leadSine = sine + n; // col 1 + + // check wether the minimum + // required matches that of + // the input + const int minimum_lookback = TA_HT_SINE_Lookback(); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + sine[i] = leadSine[i] = NA_REAL; + } + + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cn = PROTECT(allocVector(STRSXP, 2)); + SET_STRING_ELT(cn, 0, mkChar("sine")); + SET_STRING_ELT(cn, 1, mkChar("leadsine")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cn); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; + } + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode ret = TA_HT_SINE( + 0, + n > 0 ? n - 1 : 0, + src, + &outBeg, + &outNb, + sine + outBeg, + leadSine + outBeg); + // clang-format on + + shift_array(sine, n, outBeg); + shift_array(leadSine, n, outBeg); + + SEXP dims = PROTECT(allocVector(VECSXP, 2)); + SEXP cn = PROTECT(allocVector(STRSXP, 2)); + SET_STRING_ELT(cn, 0, mkChar("sine")); + SET_STRING_ELT(cn, 1, mkChar("leadsine")); + SET_VECTOR_ELT(dims, 0, R_NilValue); + SET_VECTOR_ELT(dims, 1, cn); + setAttrib(result, R_DimNamesSymbol, dims); + + UNPROTECT(3); + return result; +} diff --git a/src/ta_HT_TRENDLINE.c b/src/ta_HT_TRENDLINE.c new file mode 100644 index 000000000..a20931fed --- /dev/null +++ b/src/ta_HT_TRENDLINE.c @@ -0,0 +1,59 @@ +// Interface to ta_HT_TRENDLINE (Hilbert Transform - Instantaneous Trendline) +// +// Parameters +// inReal : numeric vector of source prices. +// +// Description +// Returns the instantaneous trendline as a numeric vector. +// Length equals input; leading elements are NA (padded using shift_array). +#include "R_ext/Arith.h" +#include "R_ext/Error.h" +#include "R_ext/Print.h" +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include +#include + +SEXP impl_ta_HT_TRENDLINE(SEXP inReal) { + const int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + SEXP result = PROTECT(allocVector(REALSXP, n)); + double *restrict out = REAL(result); + + // check wether the minimum + // required matches that of + // the input + const int minimum_lookback = TA_HT_TRENDLINE_Lookback(); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out[i] = NA_REAL; + } + + UNPROTECT(1); + return result; + } + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode ret = TA_HT_TRENDLINE( + 0, + n > 0 ? n - 1 : 0, + src, + &outBeg, + &outNb, + out + outBeg); + // clang-format on + + // shift + shift_array(out, n, outBeg); + + UNPROTECT(1); + return result; +} diff --git a/src/ta_HT_TRENDMODE.c b/src/ta_HT_TRENDMODE.c new file mode 100644 index 000000000..c6aa2a915 --- /dev/null +++ b/src/ta_HT_TRENDMODE.c @@ -0,0 +1,58 @@ +// Interface to ta_HT_TRENDMODE (Hilbert Transform - Trend vs Cycle Mode) +// +// Parameters +// inReal : numeric vector of source prices. +// +// Description +// Returns an integer vector (0 = cycle mode, 1 = trend mode) per bar. +// Length equals input; leading elements are NA_INTEGER (padded via +// shift_array). +#include "R_ext/Arith.h" +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_HT_TRENDMODE(SEXP inReal) { + const int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + // Integer vector because TA_HT_TRENDMODE outputs int[ ]. + SEXP result = PROTECT(allocVector(INTSXP, n)); + int *restrict out = INTEGER(result); + + // check wether the minimum + // required matches that of + // the input + const int minimum_lookback = TA_HT_TRENDMODE_Lookback(); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out[i] = NA_INTEGER; + } + + UNPROTECT(1); + return result; + } + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode ret = TA_HT_TRENDMODE( + 0, + n > 0 ? n - 1 : 0, + src, + &outBeg, + &outNb, + out + outBeg); + // clang-format on + + // Pad with NA_INTEGER for the leading lookback window. + shift_array(out, n, outBeg); + + UNPROTECT(1); + return result; +} From 000ca9f1ec49de3ee8cb76706ecbf24fe016e420 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 10 Aug 2025 22:50:32 +0200 Subject: [PATCH 052/166] :hammer: Windows Build Tools * That was a rough one. --- cleanup.ucrt | 3 + configure.ucrt | 145 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 cleanup.ucrt create mode 100644 configure.ucrt diff --git a/cleanup.ucrt b/cleanup.ucrt new file mode 100644 index 000000000..6e045010d --- /dev/null +++ b/cleanup.ucrt @@ -0,0 +1,3 @@ +#!/bin/sh + +rm -rf src/Makevars \ No newline at end of file diff --git a/configure.ucrt b/configure.ucrt new file mode 100644 index 000000000..3cea8f76e --- /dev/null +++ b/configure.ucrt @@ -0,0 +1,145 @@ +#!/usr/bin/env sh +# configure.win — generate src/Makevars.win for TA-Lib on Windows (Rtools/MSYS2) + +set -eu + +echo "configure.win: start" + +# 1) Setup +TA_LIB_SRC="src/ta-lib" +USE_SYSTEM=0 +PKG_CPPFLAGS="" +PKG_LIBS="" + +# Helper: query R toolchain (per R-exts) +R_BIN="${R_HOME}/bin${R_ARCH_BIN:-}/R" +[ -x "$R_BIN" ] || R_BIN="${R_HOME}/bin/R" +CC_LINE="$("$R_BIN" CMD config CC 2>/dev/null || echo gcc)" +CXX_LINE="$("$R_BIN" CMD config CXX17 2>/dev/null || "$R_BIN" CMD config CXX 2>/dev/null || echo g++)" +CC_BIN="${CC_LINE%% *}"; CC_EXTRAS="${CC_LINE#"$CC_BIN"}"; [ "$CC_EXTRAS" = "$CC_LINE" ] && CC_EXTRAS="" +CXX_BIN="${CXX_LINE%% *}"; CXX_EXTRAS="${CXX_LINE#"$CXX_BIN"}"; [ "$CXX_EXTRAS" = "$CXX_LINE" ] && CXX_EXTRAS="" +CFLAGS_R="$("$R_BIN" CMD config CFLAGS 2>/dev/null || true)" +CXXFLAGS_R="$("$R_BIN" CMD config CXXFLAGS 2>/dev/null || true)" +CPPFLAGS_R="$("$R_BIN" CMD config CPPFLAGS 2>/dev/null || true)" +LDFLAGS_R="$("$R_BIN" CMD config LDFLAGS 2>/dev/null || true)" + +add_quote_I() { printf '%s' "-I\"$1\""; } +add_quote_L() { printf '%s' "-L\"$1\""; } + +# 2) Try system TA-Lib via pkg-config (MSYS2 provides pkgconf) +if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists ta-lib; then + PKG_CPPFLAGS="$(pkg-config --cflags ta-lib)" + PKG_LIBS="$(pkg-config --libs ta-lib)" + USE_SYSTEM=1 + echo "configure.win: using TA-Lib via pkg-config" +else + echo "configure.win: pkg-config not usable or ta-lib.pc not found; probing" +fi + +# 3) Probe typical MSYS2 prefixes (ucrt64/mingw64/mingw32) +if [ "$USE_SYSTEM" -eq 0 ]; then + CAND_PREFIXES="" + [ -n "${MINGW_PREFIX:-}" ] && CAND_PREFIXES="$MINGW_PREFIX" + CAND_PREFIXES="$CAND_PREFIXES /ucrt64 /mingw64 /mingw32" + + for pfx in $CAND_PREFIXES; do + inc1="$pfx/include/ta-lib" # canonical header dir + inc2="$pfx/include/ta-lib" # fallback path check (same as inc1 for clarity) + libd="$pfx/lib" + if [ -f "$inc1/ta_libc.h" ] || [ -f "$inc2/ta_libc.h" ]; then + incroot="$inc1"; [ -f "$inc1/ta_libc.h" ] || incroot="$inc2" + echo 'int main(void){return 0;}' > conftest.c + if "$CC_BIN" $CFLAGS_R $CPPFLAGS_R $CC_EXTRAS conftest.c -o conftest $(add_quote_L "$libd") -lta_lib >/dev/null 2>&1; then + PKG_CPPFLAGS=$(add_quote_I "$incroot") + PKG_LIBS="$(add_quote_L "$libd") -lta_lib" + USE_SYSTEM=1 + echo "configure.win: found TA-Lib under $pfx (link: -lta_lib; inc: $incroot)" + elif "$CC_BIN" $CFLAGS_R $CPPFLAGS_R $CC_EXTRAS conftest.c -o conftest $(add_quote_L "$libd") -lta-lib >/dev/null 2>&1; then + PKG_CPPFLAGS=$(add_quote_I "$incroot") + PKG_LIBS="$(add_quote_L "$libd") -lta-lib" + USE_SYSTEM=1 + echo "configure.win: found TA-Lib under $pfx (link: -lta-lib; inc: $incroot)" + fi + rm -f conftest conftest.c + [ "$USE_SYSTEM" -eq 1 ] && break + fi + done +fi + +# 4) Accept environment hints (TA_INCLUDE_PATH / TA_LIBRARY_PATH) +if [ "$USE_SYSTEM" -eq 0 ] && [ -n "${TA_INCLUDE_PATH:-}" ] && [ -n "${TA_LIBRARY_PATH:-}" ]; then + echo "configure.win: using TA_INCLUDE_PATH/TA_LIBRARY_PATH" + incroot="$TA_INCLUDE_PATH" + if [ -f "$incroot/ta_libc.h" ]; then + : # incroot is correct as-is + elif [ -f "$incroot/ta-lib/ta_libc.h" ]; then + incroot="$incroot/ta-lib" + else + echo "configure.win: warning: TA_INCLUDE_PATH does not contain ta_libc.h (or ta-lib/ta_libc.h)" + fi + PKG_CPPFLAGS=$(add_quote_I "$incroot") + echo 'int main(void){return 0;}' > conftest.c + if "$CC_BIN" $CFLAGS_R $CPPFLAGS_R $CC_EXTRAS conftest.c -o conftest $(add_quote_L "$TA_LIBRARY_PATH") -lta_lib >/dev/null 2>&1; then + PKG_LIBS="$(add_quote_L "$TA_LIBRARY_PATH") -lta_lib"; USE_SYSTEM=1 + elif "$CC_BIN" $CFLAGS_R $CPPFLAGS_R $CC_EXTRAS conftest.c -o conftest $(add_quote_L "$TA_LIBRARY_PATH") -lta-lib >/dev/null 2>&1; then + PKG_LIBS="$(add_quote_L "$TA_LIBRARY_PATH") -lta-lib"; USE_SYSTEM=1 + fi + rm -f conftest conftest.c +fi + +# 5) Vendored build fallback via CMake+Ninja (no install; link from build dir) +if [ "$USE_SYSTEM" -eq 0 ]; then + echo "configure.win: building vendored TA-Lib with CMake (Ninja) — no install" + + # Ensure the MinGW toolchain bin is on PATH (ucrt64 by default on Rtools 4.5) + if [ -n "${MINGW_PREFIX:-}" ]; then + PATH="$MINGW_PREFIX/bin:/usr/bin:$PATH" + else + PATH="/ucrt64/bin:/usr/bin:$PATH" + fi + + TA_LIB_SRC_ABS="$(cd "$TA_LIB_SRC" && pwd)" + BUILD_DIR="$TA_LIB_SRC_ABS/build" + SRC_INC="$TA_LIB_SRC_ABS/include" + rm -rf "$BUILD_DIR" && mkdir -p "$BUILD_DIR" + + export Platform=x64 # silence TA-Lib MSVC-only check + cmake -S "$TA_LIB_SRC_ABS" -B "$BUILD_DIR" -G Ninja \ + -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_DEV_TOOLS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DCMAKE_C_COMPILER="$CC_BIN" -DCMAKE_CXX_COMPILER="$CXX_BIN" \ + -DCMAKE_C_FLAGS="$CFLAGS_R $CPPFLAGS_R $CC_EXTRAS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS_R $CPPFLAGS_R $CXX_EXTRAS -Wno-extra-semi" + + cmake --build "$BUILD_DIR" --target ta-lib-static -- -j2 + + # Find the produced static archive + TA_LIB_STATIC="" + for f in "$BUILD_DIR/libta-lib-static.a" "$BUILD_DIR/lib/libta-lib-static.a" "$BUILD_DIR"/*ta-lib-static*.a; do + [ -f "$f" ] && TA_LIB_STATIC="$f" && break + done + [ -n "$TA_LIB_STATIC" ] || { echo "ERROR: ta-lib static archive not found in $BUILD_DIR"; exit 1; } + + # Create a minimal "install-like" include root: /ta-lib/*.h + SHIM_INC="$BUILD_DIR/include-compat"; mkdir -p "$SHIM_INC/ta-lib" + cp -f "$SRC_INC"/*.h "$SHIM_INC/ta-lib/" + [ -f "$SHIM_INC/ta-lib/ta_libc.h" ] || { echo "ERROR: shim header missing"; exit 1; } + + # Add BOTH include roots so either or works + PKG_CPPFLAGS="$(add_quote_I "$SHIM_INC") $(add_quote_I "$SHIM_INC/ta-lib")" + PKG_LIBS="\"$TA_LIB_STATIC\"" + + echo "configure.win: PKG_CPPFLAGS=$PKG_CPPFLAGS" + echo "configure.win: PKG_LIBS=$PKG_LIBS" +fi + +# 6) Emit src/Makevars.win +echo "configure.win: writing src/Makevars.win" +mkdir -p src +cat < src/Makevars.win +# autogenerated by configure.win +PKG_CPPFLAGS = $PKG_CPPFLAGS +PKG_LIBS = $PKG_LIBS +EOF + +echo "configure.win: done." From b806591d4160bc1c5e22c362c7807151be1ad194 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 10 Aug 2025 22:55:48 +0200 Subject: [PATCH 053/166] WIndows Tools --- configure.ucrt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ucrt b/configure.ucrt index 3cea8f76e..cf4dbf2c4 100644 --- a/configure.ucrt +++ b/configure.ucrt @@ -3,7 +3,7 @@ set -eu -echo "configure.win: start" +echo "configure.win: start!" # 1) Setup TA_LIB_SRC="src/ta-lib" From 937f548caf42d8807cf4363f61789ce56d20d8f0 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 11 Aug 2025 22:51:30 +0200 Subject: [PATCH 054/166] :hammer: Cleaned up code! --- src/api.h | 13 +++- src/init.c | 9 ++- src/names.h | 34 +++++++++ src/shift.h | 13 ++++ src/ta_ACCBANDS.c | 108 +++++++++++++++----------- src/ta_ADX.c | 86 +++++++++++++++++++++ src/ta_ADXR.c | 90 ++++++++++++++++++++++ src/ta_BBANDS.c | 119 ++++++++++++++++++++--------- src/ta_CCI.c | 85 +++++++++++++++++++++ src/ta_CDL2CROWS.c | 96 +++++++++++++++++++++++ src/ta_CDL3BLACKCROWS.c | 95 +++++++++++++++++++++++ src/ta_CDL3INSIDE.c | 83 ++++++++++++++++++++ src/ta_CDLDOJI.c | 95 ++++++++++++++--------- src/ta_CDLDOJISTAR.c | 84 +++++++++++--------- src/ta_CDLDRAGONFLYDOJI.c | 88 +++++++++++++-------- src/ta_CDLEVENINGDOJISTAR.c | 94 ++++++++++++++--------- src/ta_CMO.c | 81 ++++++++++++++++++++ src/ta_MA.c | 82 ++++++++++++++------ src/ta_MACD.c | 104 +++++++++++++++++-------- src/ta_MACDEXT.c | 126 +++++++++++++++++++----------- src/ta_MACDFIX.c | 58 ++++++++------ src/ta_RSI.c | 55 +++++++++----- src/ta_STOCH.c | 145 ++++++++++++++++++++--------------- src/ta_STOCHF.c | 147 ++++++++++++++++++++++------------- src/ta_STOCHRSI.c | 148 +++++++++++++++++++++++------------- src/ta_ULTOSC.c | 105 ++++++++++++++++--------- 26 files changed, 1676 insertions(+), 567 deletions(-) create mode 100644 src/names.h create mode 100644 src/ta_ADX.c create mode 100644 src/ta_ADXR.c create mode 100644 src/ta_CCI.c create mode 100644 src/ta_CDL2CROWS.c create mode 100644 src/ta_CDL3BLACKCROWS.c create mode 100644 src/ta_CDL3INSIDE.c create mode 100644 src/ta_CMO.c diff --git a/src/api.h b/src/api.h index 4ca32f292..64679f095 100644 --- a/src/api.h +++ b/src/api.h @@ -8,14 +8,21 @@ SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod); SEXP impl_ta_ADOSC(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume, SEXP optFastPeriod, SEXP optSlowPeriod); SEXP impl_ta_AD(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume); +SEXP impl_ta_ADXR(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); +SEXP impl_ta_ADX(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); +SEXP impl_ta_CCI(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); +SEXP impl_ta_CDL2CROWS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDL3BLACKCROWS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDL3INSIDE(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); -SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLDOJISTARSTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); +SEXP impl_ta_CMO(SEXP x, SEXP optTimePeriod); SEXP impl_ta_HT_DCPERIOD(SEXP inReal); SEXP impl_ta_HT_DCPHASE(SEXP inReal); SEXP impl_ta_HT_PHASOR(SEXP inReal); @@ -24,8 +31,8 @@ SEXP impl_ta_HT_TRENDLINE(SEXP inReal); SEXP impl_ta_HT_TRENDMODE(SEXP inReal); SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, SEXP optSlowPeriod, SEXP optSlowMAType, SEXP optSignalPeriod, SEXP optSignalMAType); SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod); -SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); -SEXP impl_ta_MA(SEXP x, SEXP lag, SEXP matype); +SEXP impl_ta_MACD(SEXP x, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); +SEXP impl_ta_MA(SEXP x, SEXP period, SEXP matype); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); diff --git a/src/init.c b/src/init.c index 27dbfa17f..ff0375e96 100644 --- a/src/init.c +++ b/src/init.c @@ -13,14 +13,21 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_ACCBANDS, 4), CALLDEF(impl_ta_ADOSC, 6), CALLDEF(impl_ta_AD, 4), + CALLDEF(impl_ta_ADXR, 4), + CALLDEF(impl_ta_ADX, 4), CALLDEF(impl_ta_APO, 4), CALLDEF(impl_ta_AROONOSC, 3), CALLDEF(impl_ta_AROON, 3), CALLDEF(impl_ta_BBANDS, 5), + CALLDEF(impl_ta_CCI, 4), + CALLDEF(impl_ta_CDL2CROWS, 5), + CALLDEF(impl_ta_CDL3BLACKCROWS, 5), + CALLDEF(impl_ta_CDL3INSIDE, 5), CALLDEF(impl_ta_CDLDOJI, 5), - CALLDEF(impl_ta_CDLDOJISTAR, 5), + CALLDEF(impl_ta_CDLDOJISTARSTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 6), + CALLDEF(impl_ta_CMO, 2), CALLDEF(impl_ta_HT_DCPERIOD, 1), CALLDEF(impl_ta_HT_DCPHASE, 1), CALLDEF(impl_ta_HT_PHASOR, 1), diff --git a/src/names.h b/src/names.h new file mode 100644 index 000000000..9a0a13a06 --- /dev/null +++ b/src/names.h @@ -0,0 +1,34 @@ +// names +// +// Description +// Set names of matrices +#ifndef _names_h +#define _names_h + +#include +#include + +static inline void column_names(SEXP x, int n_cols, + const char *const *colnames) { + + SEXP dn = PROTECT(Rf_allocVector(VECSXP, 2)); + SEXP cn = PROTECT(Rf_allocVector(STRSXP, n_cols)); + for (int j = 0; j < n_cols; ++j) { + SET_STRING_ELT(cn, j, Rf_mkCharCE(colnames[j], CE_UTF8)); + } + + SET_VECTOR_ELT(dn, 0, R_NilValue); + SET_VECTOR_ELT(dn, 1, cn); + Rf_dimnamesgets(x, dn); + UNPROTECT(2); +} + +// clang-format off +#define set_colnames(x, ...) \ + do { \ + const char *_cn_[] = {__VA_ARGS__}; \ + column_names((x), (int) (sizeof _cn_ / sizeof *_cn_), _cn_); \ + } while (0) +// clang-format on + +#endif // _names_h \ No newline at end of file diff --git a/src/shift.h b/src/shift.h index d839cb421..f027b8220 100644 --- a/src/shift.h +++ b/src/shift.h @@ -21,6 +21,19 @@ // https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c // See: // https://stackoverflow.com/questions/479207/how-to-achieve-function-overloading-in-c/25026358#25026358 +// +// +// shift each array +// +// NOTE: There is most likely a better +// way to do this. But as it is, +// this move costs 3 x 5.33 ms for a +// normally distributed double vector of +// of length 1e7; the SMA costs 57ms +// its 10% overhead, which is alot. But +// if anyone is doing calculations on 1e7 +// they probably have bigger thing to worry +// about. #ifndef _SHIFT_H #define _SHIFT_H diff --git a/src/ta_ACCBANDS.c b/src/ta_ACCBANDS.c index ad2f5e9a1..f2080cdd3 100644 --- a/src/ta_ACCBANDS.c +++ b/src/ta_ACCBANDS.c @@ -10,9 +10,21 @@ // Computes acceleration bands (upper, middle, lower) over the input series. // Returns an n × 3 matrix with columns "upper","middle","lower", padded // with NA_REAL where the bands are undefined. +// +// Implementation +// +// The function does not check for equal size of the +// of the input vectors. This is on the user. +// +// It uses lookback function to verify the validity +// of input vs lookback. If its invalid, it returns +// a warning with a NA_REAL padded matrix. +#include "R_ext/Error.h" #include "lib.h" +#include "names.h" #include "shift.h" +#include "ta_func.h" #include #include #include @@ -20,60 +32,68 @@ SEXP impl_ta_ACCBANDS(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP optTimePeriod) { + int protect_count = 0; int n = LENGTH(inHigh); - double *restrict highs = REAL(inHigh); // pointer to high prices - double *restrict lows = REAL(inLow); // pointer to low prices - double *restrict closes = REAL(inClose); // pointer to close prices - int period = INTEGER(optTimePeriod)[0]; // lookback period + double *restrict highs = REAL(inHigh); + double *restrict lows = REAL(inLow); + double *restrict closes = REAL(inClose); + int period = INTEGER(optTimePeriod)[0]; - // allocate result matrix: n rows × 3 cols SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); double *upper = REAL(result); double *middle = upper + n; double *lower = upper + 2 * n; + protect_count++; + + // check minimum lookback + const int minimum_lookback = TA_ACCBANDS_Lookback(period); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + upper[i] = middle[i] = lower[i] = NA_REAL; + } + + } else { - int outBeg, outNb; + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_ACCBANDS( + 0, + n - 1, + highs, + lows, + closes, + period, + &outBeg, + &outNb, + upper + outBeg, + middle + outBeg, + lower + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("Failed with error code %d", return_code); + } + + shift_array(upper, n, outBeg); + shift_array(middle, n, outBeg); + shift_array(lower, n, outBeg); + } + + // set column names // clang-format off - TA_RetCode ret = TA_ACCBANDS( - 0, - n - 1, - highs, - lows, - closes, - period, - &outBeg, - &outNb, - upper + outBeg, - middle + outBeg, - lower + outBeg + set_colnames( + result, + "upper", + "middle", + "lower" ); // clang-format on - // shift each array - // - // NOTE: There is most likely a better - // way to do this. But as it is, - // this move costs 3 x 5.33 ms for a - // normally distributed double vector of - // of length 1e7; the SMA costs 57ms - // its 10% overhead, which is alot. But - // if anyone is doing calculations on 1e7 - // they probably have bigger thing to worry - // about. - shift_array(upper, n, outBeg); - shift_array(middle, n, outBeg); - shift_array(lower, n, outBeg); - - // set column names to lowercase as requested - SEXP dims = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("upper")); - SET_STRING_ELT(cnames, 1, mkChar("middle")); - SET_STRING_ELT(cnames, 2, mkChar("lower")); - SET_VECTOR_ELT(dims, 0, R_NilValue); - SET_VECTOR_ELT(dims, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dims); - - UNPROTECT(3); + UNPROTECT(protect_count); return result; } diff --git a/src/ta_ADX.c b/src/ta_ADX.c new file mode 100644 index 000000000..651d801dc --- /dev/null +++ b/src/ta_ADX.c @@ -0,0 +1,86 @@ +// ta_ADX.c +// +// Interface to ta_ADX (Average Directional Movement Index) +// +// Parameters +// high : numeric vector of highs (double). +// low : numeric vector of lows (double). +// close: numeric vector of closes (double). +// optTimePeriod : integer, period (default 14 in TA-Lib). +// +// Description +// Computes ADX over H/L/C. Returns a double vector of length n (unnamed), +// with the first lookback elements padded by NA using shift_array(). + +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_ADX( + SEXP high, + SEXP low, + SEXP close, + SEXP optTimePeriod) { + // clang-format on + + int protect_count = 0; + + // period + const int period = INTEGER(optTimePeriod)[0]; + + // data + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + int n = LENGTH(high); + + // clang-format off + SEXP output = PROTECT( + allocVector(REALSXP, n) + ); protect_count++; + double *restrict output_ptr = REAL(output); + // clang-format on + + const int minimum_lookback = TA_ADX_Lookback(period); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + output_ptr[i] = NA_REAL; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_ADX( + 0, + n - 1, + high_ptr, + low_ptr, + close_ptr, + period, + &outBeg, + &outNb, + output_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_ADX failed with error code %d", return_code); + } + + shift_array(output_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return output; +} diff --git a/src/ta_ADXR.c b/src/ta_ADXR.c new file mode 100644 index 000000000..8e6e43c45 --- /dev/null +++ b/src/ta_ADXR.c @@ -0,0 +1,90 @@ +// ta_ADXR.c +// +// Interface to ta_ADXR (Average Directional Movement Index Rating) +// +// Parameters +// high : numeric vector of highs (double). +// low : numeric vector of lows (double). +// close: numeric vector of closes (double). +// optTimePeriod : integer, period (default 14 in TA-Lib). +// +// Description +// Computes ADXR over H/L/C. Returns a double vector of length n (unnamed), +// padding the leading lookback with NA using shift_array(). We write results +// at index 0 for cache-friendly contiguous stores, then shift once. +// +// Notes +// - TA_ADXR_Lookback() includes the ADX dependency + unstable period. +// - If n < lookback, we return all NA and warn. + +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_ADXR( + SEXP high, + SEXP low, + SEXP close, + SEXP optTimePeriod) { +// clang-format off + int protect_count = 0; + + // period + const int period = INTEGER(optTimePeriod)[0]; + + // data + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + int n = LENGTH(high); + + // clang-format off + SEXP output = PROTECT( + allocVector(REALSXP, n) + ); protect_count++; + double *restrict output_ptr = REAL(output); + // clang-format on + + const int minimum_lookback = TA_ADXR_Lookback(period); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + output_ptr[i] = NA_REAL; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_ADXR( + 0, + n - 1, + high_ptr, + low_ptr, + close_ptr, + period, + &outBeg, + &outNb, + output_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_ADXE failed with error code %d", return_code); + } + + shift_array(output_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return output; +} diff --git a/src/ta_BBANDS.c b/src/ta_BBANDS.c index 4b4bf67ef..75ad1ee1e 100644 --- a/src/ta_BBANDS.c +++ b/src/ta_BBANDS.c @@ -14,60 +14,103 @@ #include "MAType.h" #include "lib.h" +#include "names.h" #include "shift.h" #include "ta-lib/include/ta_defs.h" +#include "ta_func.h" #include #include -SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, - SEXP optNbDevDn, SEXP optMAType) { - int n = LENGTH(inReal); // input length - double *restrict src = REAL(inReal); // pointer to input data - int period = INTEGER(optTimePeriod)[0]; // lookback - double nbUp = REAL(optNbDevUp)[0]; // std dev up - double nbDn = REAL(optNbDevDn)[0]; // std dev down +// clang-format off +SEXP impl_ta_BBANDS( + SEXP inReal, + SEXP optTimePeriod, + SEXP optNbDevUp, + SEXP optNbDevDn, + SEXP optMAType) { +// clang-format on + + int protect_count = 0; + // determine MAs TA_MAType maType = as_MAType(optMAType); - // allocate result matrix n rows × 3 cols - SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); - double *upper = REAL(result); // column 1 - double *middle = upper + n; // column 2 - double *lower = upper + 2 * n; // column 3 + // periods and standard + // deviations + int period = INTEGER(optTimePeriod)[0]; + double nbUp = REAL(optNbDevUp)[0]; + double nbDn = REAL(optNbDevDn)[0]; + + // data + int n = LENGTH(inReal); + double *restrict src = REAL(inReal); + + // clang-format off + SEXP result = PROTECT( + allocMatrix(REALSXP, n, 3) + ); protect_count++; + double *upper = REAL(result); + double *middle = upper + n; + double *lower = upper + 2 * n; + // clang-format on - // call TA-Lib function - int outBeg, outNb; // clang-format off - TA_RetCode ret = TA_BBANDS( - 0, - n - 1, - src, + const int minimum_lookback = TA_BBANDS_Lookback( period, nbUp, nbDn, - maType, - &outBeg, - &outNb, - upper + outBeg, - middle + outBeg, - lower + outBeg + maType ); // clang-format on - // shift arrays - shift_array(upper, n, outBeg); - shift_array(middle, n, outBeg); - shift_array(lower, n, outBeg); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + upper[i] = middle[i] = lower[i] = NA_REAL; + } + + } else { - // set column names: c("upper","middle","lower") - SEXP dims = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("upper")); - SET_STRING_ELT(cnames, 1, mkChar("middle")); - SET_STRING_ELT(cnames, 2, mkChar("lower")); - SET_VECTOR_ELT(dims, 0, R_NilValue); - SET_VECTOR_ELT(dims, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dims); + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_BBANDS( + 0, + n - 1, + src, + period, + nbUp, + nbDn, + maType, + &outBeg, + &outNb, + upper + outBeg, + middle + outBeg, + lower + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("Failed with error code %d", return_code); + } + + // shift arrays + shift_array(upper, n, outBeg); + shift_array(middle, n, outBeg); + shift_array(lower, n, outBeg); + } + + // set column names + // clang-format off + set_colnames( + result, + "upper", + "middle", + "lower" + ); + // clang-format on - UNPROTECT(3); + UNPROTECT(protect_count); return result; } diff --git a/src/ta_CCI.c b/src/ta_CCI.c new file mode 100644 index 000000000..888abb030 --- /dev/null +++ b/src/ta_CCI.c @@ -0,0 +1,85 @@ +// ta_CCI.c +// +// Interface to ta_CCI (Commodity Channel Index) +// +// Parameters +// high : numeric vector of highs (double). +// low : numeric vector of lows (double). +// close: numeric vector of closes (double). +// optTimePeriod : integer, period (default 14 in TA-Lib). +// +// Description +// Computes CCI over H/L/C. Returns a double vector of length n (unnamed), +// with the first lookback elements padded by NA using shift_array(). + +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CCI( + SEXP high, + SEXP low, + SEXP close, + SEXP optTimePeriod) { + // clang-format on + int protect_count = 0; + + // period + const int period = INTEGER(optTimePeriod)[0]; + + // data + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + int n = LENGTH(high); + + // clang-format off + SEXP output = PROTECT( + allocVector(REALSXP, n) + ); protect_count++; + double *restrict output_ptr = REAL(output); + // clang-format on + + const int minimum_lookback = TA_CCI_Lookback(period); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + output_ptr[i] = NA_REAL; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CCI( + 0, + n - 1, + high_ptr, + low_ptr, + close_ptr, + period, + &outBeg, + &outNb, + output_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CCI failed with error code %d", return_code); + } + + shift_array(output_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return output; +} diff --git a/src/ta_CDL2CROWS.c b/src/ta_CDL2CROWS.c new file mode 100644 index 000000000..a639f6c6e --- /dev/null +++ b/src/ta_CDL2CROWS.c @@ -0,0 +1,96 @@ +// Interface to TA_CDL2CROWS +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// normalize_flag: logical; if TRUE, scale outputs to +/-100 consistently +// +// Description +// Identifies the bearish "Two Crows" pattern. Returns an integer vector +// the same length as inputs with -100 at indices where the pattern is +// detected (0 otherwise). Leading NA values are padded so the output +// length matches the input length. +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CDL2CROWS( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + // data + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + const int n = LENGTH(open); + + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; + int *restrict out_ptr = INTEGER(result); + // clang-format on + + const int minimum_lookback = TA_CDL2CROWS_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (int i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CDL2CROWS( + 0, + n - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &outBeg, + &outNb, + out_ptr + ); + // clang-format on + + // 6) Validate execution; bubble up TA-Lib error codes + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL2CROWS failed with error code %d", return_code); + } + + // 7) Right-shift results in-place so length matches inputs and leading + // slots (before outBeg) are NA (R-friendly) + shift_array(out_ptr, n, outBeg); + + // 8) Optional normalization to +/-100 domain (preserves zero + sign) + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDL3BLACKCROWS.c b/src/ta_CDL3BLACKCROWS.c new file mode 100644 index 000000000..86317fd3f --- /dev/null +++ b/src/ta_CDL3BLACKCROWS.c @@ -0,0 +1,95 @@ +// Interface to TA_CDL3BLACKCROWS +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// normalize_flag: logical; if TRUE, scale outputs to +/-100 consistently +// +// Description +// Identifies the bearish "Three Black Crows" pattern. Returns an integer +// vector the same length as inputs with -100 at indices where the pattern +// is detected (0 otherwise). Leading NA values are padded so the output +// length matches the input length. +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CDL3BLACKCROWS( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + // data + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + // 2) Series length (assumed equal across OHLC) + const int n = LENGTH(open); + + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; + int *restrict out_ptr = INTEGER(result); + // clang-format on + + const int minimum_lookback = TA_CDL3BLACKCROWS_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (int i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CDL3BLACKCROWS( + 0, + n - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &outBeg, + &outNb, + out_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL3BLACKCROWS failed with error code %d", return_code); + } + + // shift + shift_array(out_ptr, n, outBeg); + + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDL3INSIDE.c b/src/ta_CDL3INSIDE.c new file mode 100644 index 000000000..e25c7dfa4 --- /dev/null +++ b/src/ta_CDL3INSIDE.c @@ -0,0 +1,83 @@ +// Interface to TA_CDL3INSIDE +// +// Parameters +// open: numeric vector of opening prices +// high: numeric vector of high prices +// low: numeric vector of low prices +// close: numeric vector of closing prices +// normalize_flag: logical; if TRUE, scale outputs to +/-100 consistently +// +// Description +// Identifies "Three Inside Up/Down". Returns an integer vector the same +// length as inputs with +100 for "Three Inside Up", -100 for "Three Inside +// Down", and 0 otherwise. Leading NA values are padded so the output length +// matches the input length. +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CDL3INSIDE( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + // data + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + const int n = LENGTH(open); + + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; + int *restrict out_ptr = INTEGER(result); + // clang-format on + + const int minimum_lookback = TA_CDL3INSIDE_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + } else { + + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDL3INSIDE(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, &outBeg, + &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL3INSIDE failed with error code %d", return_code); + } + + // shift array + shift_array(out_ptr, n, outBeg); + + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLDOJI.c b/src/ta_CDLDOJI.c index 9c8a12588..ad05ef520 100644 --- a/src/ta_CDLDOJI.c +++ b/src/ta_CDLDOJI.c @@ -12,63 +12,86 @@ // the same length as the inputs, with 100 for each index where a Doji pattern // is detected (0 otherwise). Leading NA values are padded for periods before // the first output can be computed (if any). +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" #include "lib.h" #include "normalize.h" #include "shift.h" +#include "ta_func.h" #include +#include #include -SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag) { +// clang-format off +SEXP impl_ta_CDLDOJI( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on - R_xlen_t n = XLENGTH(open); int protect_count = 0; - if (n > INT_MAX) { - if (protect_count > 0) - UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; // safe to cast after checking - - // Get pointers to the input data (treated as double arrays for TA-Lib) + // data const double *restrict open_ptr = REAL(open); const double *restrict high_ptr = REAL(high); const double *restrict low_ptr = REAL(low); const double *restrict close_ptr = REAL(close); - // Allocate an integer output vector of length n for the result - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; + int n = LENGTH(open); + + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; int *restrict out_ptr = INTEGER(result); + // clang-format on + + // clang-format off + const int minimum_lookback = TA_CDLDOJI_Lookback(); + // clang-format on - // Prepare variables to receive output range from TA-Lib - int out_beg_idx = 0; - int out_nb_elem = 0; + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); - // Call TA-Lib function TA_CDLDOJI to compute the pattern indicator - TA_RetCode ret_code = - TA_CDLDOJI(0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, - &out_beg_idx, &out_nb_elem, out_ptr); + for (size_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } - // Check for errors from TA-Lib computation - if (ret_code != TA_SUCCESS) { - if (protect_count > 0) + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CDLDOJI( + 0, + n - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &outBeg, + &outNb, + out_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } + Rf_error("Failed with error code %d", return_code); + } - shift_array(out_ptr, n, out_beg_idx); - // the results are given in the range -100 and 100 - // if normalized it returns -1 and 1 - int is_true = Rf_asLogical(normalize_flag); - if (is_true == 1) { - normalize(out_ptr, n, 100, out_beg_idx); - } + // shift array + shift_array(out_ptr, n, outBeg); - // Unprotect protected objects and return the result - if (protect_count > 0) - UNPROTECT(protect_count); + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } + } + UNPROTECT(protect_count); return result; } diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index 080eca438..a8a622a8c 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -1,4 +1,4 @@ -// Interface to TA_CDLDOJISTAR +// Interface to TA_CDLDOJISTARSTAR // // Parameters // open: numeric vector of opening prices @@ -21,61 +21,69 @@ #include #include -SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag) { +SEXP impl_ta_CDLDOJISTARSTAR(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { int protect_count = 0; - R_xlen_t n = XLENGTH(open); - int len = (int)n; + // data const double *restrict open_ptr = REAL(open); const double *restrict high_ptr = REAL(high); const double *restrict low_ptr = REAL(low); const double *restrict close_ptr = REAL(close); - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; + int n = LENGTH(open); + + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; int *restrict out_ptr = INTEGER(result); + // clang-format on - int out_beg_idx = 0; - int out_nb_elem = 0; // clang-format off - TA_RetCode ret_code = TA_CDLDOJISTAR( - 0, - len - 1, - open_ptr, - high_ptr, - low_ptr, - close_ptr, - &out_beg_idx, - &out_nb_elem, - out_ptr - ); + const int minimum_lookback = TA_CDLDOJISTAR_Lookback(); // clang-format on - // check if the returned - // value is sensible - if (ret_code != TA_SUCCESS) { - if (protect_count > 0) { - UNPROTECT(protect_count); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; } - error("TA-Lib computation failed with error code %d", ret_code); - } - // shift the array and - // and by leading NAs - shift_array(out_ptr, n, out_beg_idx); + } else { - // the results are given in the range -100 and 100 - // if normalized it returns -1 and 1 - int is_true = Rf_asLogical(normalize_flag); - if (is_true == 1) { - normalize(out_ptr, n, 100, out_beg_idx); - } + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CDLDOJISTAR( + 0, + n - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &outBeg, + &outNb, + out_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("Failed with error code %d", return_code); + } + + // shift array + shift_array(out_ptr, n, outBeg); - if (protect_count > 0) { - UNPROTECT(protect_count); + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } } + UNPROTECT(protect_count); return result; } \ No newline at end of file diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c index 0fe618a4e..9f7d612a7 100644 --- a/src/ta_CDLDRAGONFLYDOJI.c +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -17,47 +17,75 @@ #include #include -SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag) { - int protect_count = 0; - - R_xlen_t n = XLENGTH(open); +// clang-format off +SEXP impl_ta_CDLDRAGONFLYDOJI( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on - if (n > INT_MAX) { - if (protect_count > 0) - UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; + int protect_count = 0; + // data const double *restrict open_ptr = REAL(open); const double *restrict high_ptr = REAL(high); const double *restrict low_ptr = REAL(low); const double *restrict close_ptr = REAL(close); - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; + int n = LENGTH(open); + + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; int *restrict out_ptr = INTEGER(result); + // clang-format on + + // clang-format off + const int minimum_lookback = TA_CDLDRAGONFLYDOJI_Lookback(); + // clang-format on - int out_beg_idx = 0; - int out_nb_elem = 0; - TA_RetCode ret_code = - TA_CDLDRAGONFLYDOJI(0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, - &out_beg_idx, &out_nb_elem, out_ptr); - if (ret_code != TA_SUCCESS) { - if (protect_count > 0) + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CDLDRAGONFLYDOJI( + 0, + n - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + &outBeg, + &outNb, + out_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } - shift_array(out_ptr, n, out_beg_idx); - // the results are given in the range -100 and 100 - // if normalized it returns -1 and 1 - int is_true = Rf_asLogical(normalize_flag); - if (is_true == 1) { - normalize(out_ptr, n, 100, out_beg_idx); + Rf_error("Failed with error code %d", return_code); + } + + // shift array + shift_array(out_ptr, n, outBeg); + + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } } - if (protect_count > 0) - UNPROTECT(protect_count); + UNPROTECT(protect_count); return result; } \ No newline at end of file diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c index d37e5a375..ae320935d 100644 --- a/src/ta_CDLEVENINGDOJISTAR.c +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -24,51 +24,77 @@ #include #include -SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP penetration, SEXP normalize_flag) { +// clang-format off +SEXP impl_ta_CDLEVENINGDOJISTAR( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP penetration, + SEXP normalize_flag) { + // clang-format on int protect_count = 0; - // Validate and extract the penetration parameter - double pen = REAL(penetration)[0]; - - R_xlen_t n = XLENGTH(open); - - if (n > INT_MAX) { - if (protect_count > 0) - UNPROTECT(protect_count); - error("Number of observations exceeds maximum supported by TA-Lib"); - } - int len = (int)n; - + // data const double *restrict open_ptr = REAL(open); const double *restrict high_ptr = REAL(high); const double *restrict low_ptr = REAL(low); const double *restrict close_ptr = REAL(close); + double penetration_ptr = REAL(penetration)[0]; + + int n = LENGTH(open); - SEXP result = PROTECT(allocVector(INTSXP, n)); - protect_count++; + // clang-format off + SEXP result = PROTECT( + allocVector(INTSXP, n) + ); protect_count++; int *restrict out_ptr = INTEGER(result); + // clang-format on + + // clang-format off + const int minimum_lookback = TA_CDLEVENINGDOJISTAR_Lookback(penetration_ptr); + // clang-format on - int out_beg_idx = 0; - int out_nb_elem = 0; - TA_RetCode ret_code = TA_CDLEVENINGDOJISTAR( - 0, len - 1, open_ptr, high_ptr, low_ptr, close_ptr, - pen, // penetration percentage for pattern confirmation - &out_beg_idx, &out_nb_elem, out_ptr); - if (ret_code != TA_SUCCESS) { - if (protect_count > 0) + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + out_ptr[i] = NA_INTEGER; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CDLEVENINGDOJISTAR( + 0, + n - 1, + open_ptr, + high_ptr, + low_ptr, + close_ptr, + penetration_ptr, + &outBeg, + &outNb, + out_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { UNPROTECT(protect_count); - error("TA-Lib computation failed with error code %d", ret_code); - } - shift_array(out_ptr, n, out_beg_idx); - // the results are given in the range -100 and 100 - // if normalized it returns -1 and 1 - int is_true = Rf_asLogical(normalize_flag); - if (is_true == 1) { - normalize(out_ptr, n, 100, out_beg_idx); + Rf_error("Failed with error code %d", return_code); + } + + // shift array + shift_array(out_ptr, n, outBeg); + + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } } - if (protect_count > 0) - UNPROTECT(protect_count); + UNPROTECT(protect_count); return result; } \ No newline at end of file diff --git a/src/ta_CMO.c b/src/ta_CMO.c new file mode 100644 index 000000000..d6d3dbbd5 --- /dev/null +++ b/src/ta_CMO.c @@ -0,0 +1,81 @@ +// ta_CMO.c +// +// Interface to ta_CMO (Chande Momentum Oscillator) +// +// Parameters +// x : numeric vector (double). +// optTimePeriod: integer, period (default 14 in TA-Lib). +// +// Description +// Computes CMO on a single price stream. Returns a double vector of length n +// (unnamed), with the first lookback elements padded by NA using +// shift_array(). + +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CMO(SEXP x, SEXP optTimePeriod) { + // protection counter + int protection_count = 0; + + // values + int n = length(x); + int lag = INTEGER(optTimePeriod)[0]; + int outBeg = 0, outNb = 0; + + // data + const double *__restrict__ x_ptr = REAL(x); + + // output vector + // clang-format off + SEXP output = PROTECT( + allocVector(REALSXP, n) + ); protection_count++; + double *output_ptr = REAL(output); + // clang-format on + + // clang-format off + const int minimum_lookback = TA_CMO_Lookback( + lag + ); + // clang-format on + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + output_ptr[i] = NA_REAL; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_CMO( + 0, + n-1, + x_ptr, + lag, + &outBeg, + &outNb, + output_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protection_count); + Rf_error("ta_CMO failed: return code %d", return_code); + } + + // shift values + shift_array(output_ptr, n, outBeg); + } + + UNPROTECT(protection_count); + return output; +} diff --git a/src/ta_MA.c b/src/ta_MA.c index e3eccb410..f4b68205a 100644 --- a/src/ta_MA.c +++ b/src/ta_MA.c @@ -10,51 +10,83 @@ // with NA_REAL for the first lookback samples, then the // moving‐average values thereafter. #include "MAType.h" +#include "R_ext/Error.h" #include "lib.h" #include "shift.h" #include "ta-lib/include/ta_defs.h" +#include "ta_defs.h" +#include "ta_func.h" #include "ta_libc.h" #include -SEXP impl_ta_MA(SEXP x, SEXP lag, SEXP matype) { - // TODO: A robust input validation - // of maType enums, and time periods +// clang-format off +SEXP impl_ta_MA( + SEXP x, + SEXP period, + SEXP matype) { + // clang-format on // protection counter int protection_count = 0; + // moving average + TA_MAType MAType = as_MAType(matype); + // values int n = length(x); - const double *__restrict__ x_ptr = REAL(x); + int lag = INTEGER(period)[0]; + int outBeg = 0, outNb = 0; - int timeperiod = INTEGER(lag)[0]; - TA_MAType MA = as_MAType(matype); + // data + const double *__restrict__ x_ptr = REAL(x); - SEXP result = PROTECT(allocVector(REALSXP, n)); - protection_count++; - double *result_ptr = REAL(result); + // output vector + // clang-format off + SEXP output = PROTECT( + allocVector(REALSXP, n) + ); protection_count++; + double *output_ptr = REAL(output); + // clang-format on // clang-format off - int outBeg, outNb; - TA_RetCode output = TA_MA( - 0, - n - 1, - x_ptr, - timeperiod, - MA, - &outBeg, - &outNb, - result_ptr + const int minimum_lookback = TA_MA_Lookback( + lag, + MAType ); // clang-format on - if (output != TA_SUCCESS) { - UNPROTECT(protection_count); - error("TA_MA failed: return code %d", output); - } + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + output_ptr[i] = NA_REAL; + } + + } else { - shift_array(result_ptr, n, outBeg); + // clang-format off + TA_RetCode return_code = TA_MA( + 0, + n - 1, + x_ptr, + lag, + MAType, + &outBeg, + &outNb, + output_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protection_count); + Rf_error("TA_MA failed: return code %d", return_code); + } + + // shift values + shift_array(output_ptr, n, outBeg); + } UNPROTECT(protection_count); - return result; + return output; } \ No newline at end of file diff --git a/src/ta_MACD.c b/src/ta_MACD.c index d504ce8be..fda99c138 100644 --- a/src/ta_MACD.c +++ b/src/ta_MACD.c @@ -1,7 +1,7 @@ // Interface to ta_MACD (Moving Average Convergence/Divergence) // // Parameters -// inReal : numeric vector of source prices. +// x : numeric vector of source prices. // optFastPeriod : integer, fast EMA period. // optSlowPeriod : integer, slow EMA period. // optSignalPeriod: integer, signal‐line EMA period. @@ -11,55 +11,95 @@ // Returns an n × 3 matrix with columns "macd","signal","histogram". #include "lib.h" +#include "names.h" #include "shift.h" +#include "ta_func.h" #include #include #include -SEXP impl_ta_MACD(SEXP inReal, SEXP optFastPeriod, SEXP optSlowPeriod, - SEXP optSignalPeriod) { - int n = LENGTH(inReal); - double *restrict src = REAL(inReal); +// clang-format off +SEXP impl_ta_MACD( + SEXP x, + SEXP optFastPeriod, + SEXP optSlowPeriod, + SEXP optSignalPeriod) { + // clang-format on + + int protect_count = 0; + // periods int fastP = INTEGER(optFastPeriod)[0]; int slowP = INTEGER(optSlowPeriod)[0]; int signalP = INTEGER(optSignalPeriod)[0]; - SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); - double *macd = REAL(result); + // data + int n = LENGTH(x); + double *restrict series = REAL(x); + + // clang-format off + SEXP output = PROTECT( + allocMatrix(REALSXP, n, 3) + ); protect_count++; + double *macd = REAL(output); double *signal = macd + n; double *histogram = macd + 2 * n; + // clang-format on - int outBeg, outNb; // clang-format off - TA_RetCode ret = TA_MACD( - 0, - n - 1, - src, + const int minimum_lookback = TA_MACD_Lookback( fastP, slowP, - signalP, - &outBeg, - &outNb, - macd + outBeg, - signal + outBeg, - histogram + outBeg + signalP ); // clang-format on - // shift - shift_array(macd, n, outBeg); - shift_array(signal, n, outBeg); - shift_array(histogram, n, outBeg); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + macd[i] = signal[i] = histogram[i] = NA_REAL; + } - SEXP dims = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("macd")); - SET_STRING_ELT(cnames, 1, mkChar("signal")); - SET_STRING_ELT(cnames, 2, mkChar("histogram")); - SET_VECTOR_ELT(dims, 0, R_NilValue); - SET_VECTOR_ELT(dims, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dims); + } else { + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_MACD( + 0, + n - 1, + series, + fastP, + slowP, + signalP, + &outBeg, + &outNb, + macd + outBeg, + signal + outBeg, + histogram + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("Failed with error code %d", return_code); + } + + // shift + shift_array(macd, n, outBeg); + shift_array(signal, n, outBeg); + shift_array(histogram, n, outBeg); + } + + // set column names + // clang-format off + set_colnames( + output, + "macd", + "signal", + "histogram" + ); + // clang-format on - UNPROTECT(3); - return result; + UNPROTECT(protect_count); + return output; } diff --git a/src/ta_MACDEXT.c b/src/ta_MACDEXT.c index 6847017c4..4f74a0410 100644 --- a/src/ta_MACDEXT.c +++ b/src/ta_MACDEXT.c @@ -17,70 +17,110 @@ #include "MAType.h" #include "lib.h" +#include "names.h" #include "shift.h" +#include "ta_func.h" #include #include -SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, - SEXP optSlowPeriod, SEXP optSlowMAType, - SEXP optSignalPeriod, SEXP optSignalMAType) { - // 1) Prepare inputs - int n = LENGTH(inReal); - const double *restrict src = REAL(inReal); - int fastP = INTEGER(optFastPeriod)[0]; +// clang-format off +SEXP impl_ta_MACDEXT( + SEXP inReal, + SEXP optFastPeriod, + SEXP optFastMAType, + SEXP optSlowPeriod, + SEXP optSlowMAType, + SEXP optSignalPeriod, + SEXP optSignalMAType) { + // clang-format on + + int protect_count = 0; + + // determine MAs TA_MAType fastT = as_MAType(optFastMAType); - int slowP = INTEGER(optSlowPeriod)[0]; TA_MAType slowT = as_MAType(optSlowMAType); - int signalP = INTEGER(optSignalPeriod)[0]; TA_MAType signalT = as_MAType(optSignalMAType); - // 2) Allocate output matrix (n rows × 3 cols) - SEXP result = PROTECT(allocMatrix(REALSXP, n, 3)); + // periods + int fastP = INTEGER(optFastPeriod)[0]; + int slowP = INTEGER(optSlowPeriod)[0]; + int signalP = INTEGER(optSignalPeriod)[0]; + + // data + int n = LENGTH(inReal); + const double *restrict src = REAL(inReal); + + // clang-format off + SEXP result = PROTECT( + allocMatrix(REALSXP, n, 3) + ); protect_count++; double *restrict macd = REAL(result); double *restrict signal = macd + n; double *restrict histogram = macd + 2 * n; + // clang-format on - // 3) Call underlying TA function - int outBeg, outNb; // clang-format off - TA_RetCode ret = TA_MACDEXT( - 0, - n - 1, - src, + const int minimum_lookback = TA_MACDEXT_Lookback( fastP, - fastT, + fastT, slowP, slowT, signalP, - signalT, - &outBeg, - &outNb, - macd + outBeg, - signal + outBeg, - histogram + outBeg + signalT ); // clang-format on - if (ret != TA_SUCCESS) { - UNPROTECT(1); - error("TA_MACDEXT failed with code %d", ret); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + macd[i] = signal[i] = histogram[i] = NA_REAL; + } + + } else { + + int outBeg, outNb; + // clang-format off + TA_RetCode return_code = TA_MACDEXT( + 0, + n - 1, + src, + fastP, + fastT, + slowP, + slowT, + signalP, + signalT, + &outBeg, + &outNb, + macd + outBeg, + signal + outBeg, + histogram + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(1); + error("TA_MACDEXT failed with code %d", return_code); + } + + // 4) Shift each output down by outBeg, padding with NA + shift_array(macd, n, outBeg); + shift_array(signal, n, outBeg); + shift_array(histogram, n, outBeg); } - // 4) Shift each output down by outBeg, padding with NA - shift_array(macd, n, outBeg); - shift_array(signal, n, outBeg); - shift_array(histogram, n, outBeg); - - // 5) Attach column names - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("macd")); - SET_STRING_ELT(cnames, 1, mkChar("signal")); - SET_STRING_ELT(cnames, 2, mkChar("histogram")); - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dimnames); - - UNPROTECT(3); + // set column names + // clang-format off + set_colnames( + result, + "macd", + "signal", + "histogram" + ); + // clang-format on + + UNPROTECT(protect_count); return result; } diff --git a/src/ta_MACDFIX.c b/src/ta_MACDFIX.c index cc190cf99..5233d6441 100644 --- a/src/ta_MACDFIX.c +++ b/src/ta_MACDFIX.c @@ -9,14 +9,16 @@ // Computes MACD line (EMA12–EMA26), its signal line, and the histogram // using the fixed 12/26 EMA and user-specified signal period. Returns // an n×3 matrix with columns "macd", "signal", "histogram". -#include "MAType.h" #include "lib.h" +#include "names.h" #include "shift.h" +#include "ta_func.h" #include #include #include SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod) { + int protect_count = 0; // 1) Prepare inputs int n = LENGTH(inReal); const double *restrict src = REAL(inReal); @@ -28,9 +30,18 @@ SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod) { double *restrict signal = macd + n; double *restrict histogram = macd + 2 * n; - // 3) Call underlying TA function - int outBeg, outNb; - // clang-format off + const int minimum_lookback = TA_MACDFIX_Lookback(signalP); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + macd[i] = signal[i] = histogram[i] = NA_REAL; + } + } else { + // 3) Call underlying TA function + int outBeg = 0, outNb = 0; + // clang-format off TA_RetCode ret = TA_MACDFIX( 0, n - 1, @@ -42,28 +53,29 @@ SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod) { signal + outBeg, histogram + outBeg ); - // clang-format on + // clang-format on - if (ret != TA_SUCCESS) { - UNPROTECT(1); - error("TA_MACDFIX failed with code %d", ret); - } + if (ret != TA_SUCCESS) { + UNPROTECT(1); + error("TA_MACDFIX failed with code %d", ret); + } - // 4) Shift each output down by outBeg, padding with NA - shift_array(macd, n, outBeg); - shift_array(signal, n, outBeg); - shift_array(histogram, n, outBeg); + // 4) Shift each output down by outBeg, padding with NA + shift_array(macd, n, outBeg); + shift_array(signal, n, outBeg); + shift_array(histogram, n, outBeg); + } - // 5) Attach column names - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); - SEXP cnames = PROTECT(allocVector(STRSXP, 3)); - SET_STRING_ELT(cnames, 0, mkChar("macd")); - SET_STRING_ELT(cnames, 1, mkChar("signal")); - SET_STRING_ELT(cnames, 2, mkChar("histogram")); - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, cnames); - setAttrib(result, R_DimNamesSymbol, dimnames); + // set column names + // clang-format off + set_colnames( + result, + "macd", + "signal", + "histogram" + ); + // clang-format on - UNPROTECT(3); + UNPROTECT(protect_count); return result; } diff --git a/src/ta_RSI.c b/src/ta_RSI.c index a81874f52..f4db1840a 100644 --- a/src/ta_RSI.c +++ b/src/ta_RSI.c @@ -8,35 +8,56 @@ // Computes the single‐output RSI over the series. Returns an // unnamed numeric vector of length n, padded with NA_REAL. #include "lib.h" +#include "names.h" #include "ta_defs.h" +#include "ta_func.h" #include #include #include SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod) { + int protect_count = 0; int n = LENGTH(inReal); double *restrict src = REAL(inReal); int period = INTEGER(optTimePeriod)[0]; SEXP result = PROTECT(allocVector(REALSXP, n)); + protect_count++; double *rsi = REAL(result); - int outBeg, outNb; - // clang-format off - TA_RetCode ret = TA_RSI( - 0, - n - 1, - src, - period, - &outBeg, - &outNb, - rsi - ); - // clang-format on - - // shift - shift_array(rsi, n, outBeg); - - UNPROTECT(1); + int minimum_lookback = TA_RSI_Lookback(period); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + rsi[i] = NA_REAL; + } + + } else { + + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_RSI( + 0, + n - 1, + src, + period, + &outBeg, + &outNb, + rsi + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("Failed with error code %d", return_code); + } + + // shift + shift_array(rsi, n, outBeg); + } + + UNPROTECT(protect_count); return result; } diff --git a/src/ta_STOCH.c b/src/ta_STOCH.c index d247abe92..3ed71ca0a 100644 --- a/src/ta_STOCH.c +++ b/src/ta_STOCH.c @@ -13,90 +13,111 @@ // Description // Returns an N×2 matrix with columns 'slowk' and 'slowd', NA-filled // for initial lookback. +#include "MAType.h" #include "lib.h" +#include "names.h" #include "ta_defs.h" +#include "ta_func.h" #include "ta_libc.h" #include #include -SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, - SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, - SEXP slowd_matype) { +// clang-format off +SEXP impl_ta_STOCH( + SEXP high, + SEXP low, + SEXP close, + SEXP fastk_period, + SEXP slowk_period, + SEXP slowk_matype, + SEXP slowd_period, + SEXP slowd_matype) { + // clang-format on + + int protect_count = 0; + // Determine MAs + TA_MAType k_MA = as_MAType(slowk_matype); + TA_MAType d_MA = as_MAType(slowd_matype); + + // periods + const int fastk = INTEGER(fastk_period)[0]; + const int slowk = INTEGER(slowk_period)[0]; + const int slowd = INTEGER(slowd_period)[0]; - int pCount = 0; - high = PROTECT(coerceVector(high, REALSXP)); - pCount++; - low = PROTECT(coerceVector(low, REALSXP)); - pCount++; - close = PROTECT(coerceVector(close, REALSXP)); - pCount++; - fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); - pCount++; - slowk_period = PROTECT(coerceVector(slowk_period, INTSXP)); - pCount++; - slowk_matype = PROTECT(coerceVector(slowk_matype, INTSXP)); - pCount++; - slowd_period = PROTECT(coerceVector(slowd_period, INTSXP)); - pCount++; - slowd_matype = PROTECT(coerceVector(slowd_matype, INTSXP)); - pCount++; + // data + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); int n = length(high); - const double *__restrict__ inHigh = REAL(high); - const double *__restrict__ inLow = REAL(low); - const double *__restrict__ inClose = REAL(close); - int kP = INTEGER(fastk_period)[0]; - int sk = INTEGER(slowk_period)[0]; - int sm = INTEGER(slowk_matype)[0]; - TA_MAType sm_ma = (TA_MAType)sm; - int dP = INTEGER(slowd_period)[0]; - int dm = INTEGER(slowd_matype)[0]; - TA_MAType dm_ma = (TA_MAType)dm; - int outBeg, outNB; - SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); - pCount++; + // clang-format off + SEXP result = PROTECT( + allocMatrix(REALSXP, n, 2) + ); protect_count++; double *__restrict__ mat = REAL(result); double *__restrict__ outSlowK = mat; double *__restrict__ outSlowD = mat + n; + // clang-format on // clang-format off -TA_RetCode ret = TA_STOCH( - 0, - n - 1, - inHigh, - inLow, - inClose, - kP, - sk, - sm_ma, - dP, - dm_ma, - &outBeg, - &outNB, - outSlowK + outBeg, - outSlowD + outBeg -); -// clang-format off + const int minimum_lookback = TA_STOCH_Lookback( + fastk, + slowk, + k_MA, + slowd, + d_MA + ); + // clang-format on + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_STOCH failed: return code %d", ret); + for (size_t i = 0; i < n; ++i) { + outSlowK[i] = outSlowK[i] = NA_REAL; + } + + } else { + int outBeg = 0, outNB = 0; + // clang-format off + TA_RetCode return_code = TA_STOCH( + 0, + n - 1, + high_ptr, + low_ptr, + close_ptr, + fastk, + slowk, + k_MA, + slowd, + d_MA, + &outBeg, + &outNB, + outSlowK + outBeg, + outSlowD + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + error("TA_STOCH failed: return code %d", return_code); } // shift array and pad // with leading NAs shift_array(outSlowK, n, outBeg); shift_array(outSlowD, n, outBeg); + } - SEXP colnames = PROTECT(allocVector(STRSXP, 2)); pCount++; - SET_STRING_ELT(colnames, 0, mkChar("slowk")); - SET_STRING_ELT(colnames, 1, mkChar("slowd")); - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); pCount++; - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, colnames); - setAttrib(result, R_DimNamesSymbol, dimnames); + // set column names + // clang-format off + set_colnames( + result, + "slowk", + "slowd" + ); + // clang-format on - UNPROTECT(pCount); - return result; + UNPROTECT(protect_count); + return result; } \ No newline at end of file diff --git a/src/ta_STOCHF.c b/src/ta_STOCHF.c index 770d4911f..1a78935f5 100644 --- a/src/ta_STOCHF.c +++ b/src/ta_STOCHF.c @@ -11,64 +11,109 @@ // Description // Returns an N×2 matrix with columns 'fastk' and 'fastd', NA-filled // for initial lookback. +#include "MAType.h" #include "lib.h" +#include "names.h" +#include "ta_defs.h" +#include "ta_func.h" #include "ta_libc.h" #include #include -SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, - SEXP fastd_period, SEXP fastd_matype) { - int pCount = 0; - high = PROTECT(coerceVector(high, REALSXP)); - pCount++; - low = PROTECT(coerceVector(low, REALSXP)); - pCount++; - close = PROTECT(coerceVector(close, REALSXP)); - pCount++; - fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); - pCount++; - fastd_period = PROTECT(coerceVector(fastd_period, INTSXP)); - pCount++; - fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP)); - pCount++; +// clang-format off +SEXP impl_ta_STOCHF( + SEXP high, + SEXP low, + SEXP close, + SEXP fastk_period, + SEXP fastd_period, + SEXP fastd_matype) { + // clang-format on + int protection_count = 0; + + // determine MAs + TA_MAType MAType = as_MAType(fastd_matype); + + // periods + const int fastk = INTEGER(fastk_period)[0]; + const int fastd = INTEGER(fastd_period)[0]; + + // data + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + + // length int n = length(high); - const double *__restrict__ inHigh = REAL(high); - const double *__restrict__ inLow = REAL(low); - const double *__restrict__ inClose = REAL(close); - int kP = INTEGER(fastk_period)[0]; - int dP = INTEGER(fastd_period)[0]; - int dm = INTEGER(fastd_matype)[0]; - - int outBeg, outNB; - SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); - pCount++; - double *__restrict__ mat = REAL(result); - double *__restrict__ outFastK = mat; - double *__restrict__ outFastD = mat + n; - - TA_RetCode ret = - TA_STOCHF(0, n - 1, inHigh, inLow, inClose, kP, dP, dm, &outBeg, &outNB, - outFastK + outBeg, outFastD + outBeg); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_STOCHF failed: return code %d", ret); + int outBeg = 0, outNB = 0; + + // output matrix + // clang-format off + SEXP output = PROTECT( + allocMatrix(REALSXP,n,2) + ); protection_count++; + double *__restrict__ output_ptr = REAL(output); + double *__restrict__ fastk_ptr = output_ptr; + double *__restrict__ fastd_ptr = output_ptr + n; + // clang-format on + + // verify lookback + // clang-format off + const int minimum_lookback = TA_STOCHF_Lookback( + fastk, + fastd, + MAType + ); + // clang-format on + + if (n < minimum_lookback) { + + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + fastk_ptr[i] = fastd_ptr[i] = NA_REAL; + } + + } else { + + // clang-format off + TA_RetCode return_code = TA_STOCHF( + 0, + n - 1, + high_ptr, + low_ptr, + close_ptr, + fastk, + fastd, + MAType, + &outBeg, + &outNB, + fastk_ptr + outBeg, + fastd_ptr + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protection_count); + error("TA_STOCHF failed: return code %d", return_code); + } + + // shift values + shift_array(fastk_ptr, n, outBeg); + shift_array(fastd_ptr, n, outBeg); } - // shift array and pad - // with leading NAs - shift_array(outFastK, n, outBeg); - shift_array(outFastD, n, outBeg); - SEXP colnames = PROTECT(allocVector(STRSXP, 2)); - pCount++; - SET_STRING_ELT(colnames, 0, mkChar("fastk")); - SET_STRING_ELT(colnames, 1, mkChar("fastd")); - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); - pCount++; - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, colnames); - setAttrib(result, R_DimNamesSymbol, dimnames); - - UNPROTECT(pCount); - return result; + // set column names + // clang-format off + set_colnames( + output, + "fastk", + "fastd" + ); + // clang-format on + + UNPROTECT(protection_count); + return output; } diff --git a/src/ta_STOCHRSI.c b/src/ta_STOCHRSI.c index 0048bc6d9..f8c386c37 100644 --- a/src/ta_STOCHRSI.c +++ b/src/ta_STOCHRSI.c @@ -10,67 +10,107 @@ // Description // Returns an N×2 matrix with columns 'fastk' and 'fastd', both // of the same length as input, with NA for initial lookback. +#include "MAType.h" #include "lib.h" +#include "names.h" +#include "ta_defs.h" +#include "ta_func.h" #include "ta_libc.h" #include #include -SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, - SEXP fastd_period, SEXP fastd_matype) { - int pCount = 0; - real = PROTECT(coerceVector(real, REALSXP)); - pCount++; - timeperiod = PROTECT(coerceVector(timeperiod, INTSXP)); - pCount++; - fastk_period = PROTECT(coerceVector(fastk_period, INTSXP)); - pCount++; - fastd_period = PROTECT(coerceVector(fastd_period, INTSXP)); - pCount++; - fastd_matype = PROTECT(coerceVector(fastd_matype, INTSXP)); - pCount++; +// clang-format off +SEXP impl_ta_STOCHRSI( + SEXP real, + SEXP timeperiod, + SEXP fastk_period, + SEXP fastd_period, + SEXP fastd_matype) { + // clang-format on + int protection_count = 0; + + // determine MAs + TA_MAType MAType = as_MAType(fastd_matype); + + // periods + const int fastk = INTEGER(fastk_period)[0]; + const int fastd = INTEGER(fastd_period)[0]; + const int lag = INTEGER(timeperiod)[0]; + + // data + const double *restrict series_ptr = REAL(real); + + // length int n = length(real); - const double *__restrict__ inReal = REAL(real); - int tp = INTEGER(timeperiod)[0]; - int kP = INTEGER(fastk_period)[0]; - int dP = INTEGER(fastd_period)[0]; - int dM = INTEGER(fastd_matype)[0]; - - int outBeg, outNB; - // Allocate matrix N×2 - SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); - pCount++; - double *__restrict__ mat = REAL(result); - // Column pointers - double *__restrict__ outFastK = mat; - double *__restrict__ outFastD = mat + n; - - TA_RetCode ret = TA_STOCHRSI(0, n - 1, inReal, tp, kP, dP, dM, &outBeg, - &outNB, outFastK + outBeg, outFastD + outBeg); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_STOCHRSI failed: return code %d", ret); - } - // Fill initial lookback rows with NA - for (register int i = 0; i < outBeg; ++i) { - outFastK[i] = NA_REAL; - outFastD[i] = NA_REAL; + int outBeg = 0, outNB = 0; + + // output matrix + // clang-format off + SEXP output = PROTECT( + allocMatrix(REALSXP,n,2) + ); protection_count++; + double *__restrict__ output_ptr = REAL(output); + double *__restrict__ fastk_ptr = output_ptr; + double *__restrict__ fastd_ptr = output_ptr + n; + // clang-format on + + // verify lookback + // clang-format off + const int minimum_lookback = TA_STOCHRSI_Lookback( + lag, + fastk, + fastd, + MAType + ); + // clang-format on + + if (n < minimum_lookback) { + + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + fastk_ptr[i] = fastd_ptr[i] = NA_REAL; + } + + } else { + + // clang-format off + TA_RetCode return_code = TA_STOCHRSI( + 0, + n - 1, + series_ptr, + lag, + fastk, + fastd, + MAType, + &outBeg, + &outNB, + fastk_ptr + outBeg, + fastd_ptr + outBeg + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protection_count); + error("TA_STOCHRSI failed: return code %d", return_code); + } + + // shift values + shift_array(fastk_ptr, n, outBeg); + shift_array(fastd_ptr, n, outBeg); } - shift_array(outFastK, n, outBeg); - shift_array(outFastD, n, outBeg); - - // Set column names - SEXP colnames = PROTECT(allocVector(STRSXP, 2)); - pCount++; - SET_STRING_ELT(colnames, 0, mkChar("fastk")); - SET_STRING_ELT(colnames, 1, mkChar("fastd")); - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); - pCount++; - SET_VECTOR_ELT(dimnames, 0, R_NilValue); - SET_VECTOR_ELT(dimnames, 1, colnames); - setAttrib(result, R_DimNamesSymbol, dimnames); - - UNPROTECT(pCount); - return result; + // set column names + // clang-format off + set_colnames( + output, + "fastk", + "fastd" + ); + // clang-format on + + UNPROTECT(protection_count); + return output; } \ No newline at end of file diff --git a/src/ta_ULTOSC.c b/src/ta_ULTOSC.c index ebc92769c..b64ea7c4c 100644 --- a/src/ta_ULTOSC.c +++ b/src/ta_ULTOSC.c @@ -12,53 +12,86 @@ // Returns a numeric vector of the same length as inputs containing // the Ultimate Oscillator, with NA for indices before the lookback. #include "lib.h" +#include "shift.h" +#include "ta_func.h" #include "ta_libc.h" #include #include -SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, - SEXP timeperiod2, SEXP timeperiod3) { - int pCount = 0; - // Coerce inputs to REALSXP/INTSXP and protect - high = PROTECT(coerceVector(high, REALSXP)); - pCount++; - low = PROTECT(coerceVector(low, REALSXP)); - pCount++; - close = PROTECT(coerceVector(close, REALSXP)); - pCount++; - timeperiod1 = PROTECT(coerceVector(timeperiod1, INTSXP)); - pCount++; - timeperiod2 = PROTECT(coerceVector(timeperiod2, INTSXP)); - pCount++; - timeperiod3 = PROTECT(coerceVector(timeperiod3, INTSXP)); - pCount++; +// clang-format off +SEXP impl_ta_ULTOSC( + SEXP high, + SEXP low, + SEXP close, + SEXP timeperiod1, + SEXP timeperiod2, + SEXP timeperiod3) { + // clang-format on - int n = length(high); - // Extract C pointers with restrict qualifier for speed - const double *__restrict__ inHigh = REAL(high); - const double *__restrict__ inLow = REAL(low); - const double *__restrict__ inClose = REAL(close); + int protect_count = 0; + + // periods int p1 = INTEGER(timeperiod1)[0]; int p2 = INTEGER(timeperiod2)[0]; int p3 = INTEGER(timeperiod3)[0]; + // data + int n = length(high); + const double *__restrict__ high_ptr = REAL(high); + const double *__restrict__ low_ptr = REAL(low); + const double *__restrict__ close_ptr = REAL(close); + int outBeg, outNB; - // Allocate output vector of full length - SEXP result = PROTECT(allocVector(REALSXP, n)); - pCount++; - double *__restrict__ out = REAL(result); + // clang-format off + SEXP output = PROTECT( + allocVector(REALSXP, n) + ); protect_count++; + double *__restrict__ output_ptr = REAL(output); + // clang-format on + + // clang-format off + int minimum_lookback = TA_ULTOSC_Lookback( + p1, + p2, + p3 + ); + // clang-format on + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + + for (size_t i = 0; i < n; ++i) { + output_ptr[i] = NA_REAL; + } + + } else { + + // clang-format off + TA_RetCode ret = TA_ULTOSC( + 0, + n - 1, + high_ptr , + low_ptr, + close_ptr, + p1, + p2, + p3, + &outBeg, + &outNB, + output_ptr + outBeg + ); + // clang-format on + + if (ret != TA_SUCCESS) { + UNPROTECT(protect_count); + error("TA_ULTOSC failed: return code %d", ret); + } - // Call TA-Lib function - TA_RetCode ret = TA_ULTOSC(0, n - 1, inHigh, inLow, inClose, p1, p2, p3, - &outBeg, &outNB, out + outBeg); - if (ret != TA_SUCCESS) { - UNPROTECT(pCount); - error("TA_ULTOSC failed: return code %d", ret); + // shift + shift_array(output_ptr, n, outBeg); } - // Fill initial lookback positions with NA - for (register int i = 0; i < outBeg; ++i) - out[i] = NA_REAL; - UNPROTECT(pCount); - return result; + UNPROTECT(protect_count); + return output; } From 1f8416eabd56131143e4d41e30004f8337ab6fd4 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 13 Aug 2025 08:54:47 +0200 Subject: [PATCH 055/166] :hammer: Added {plotly} to 'imports' * {talib} uses {plotly} by default. There is a possibility that other libraries will be added for plotting for interactive vs static plots. --- DESCRIPTION | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index c4e02e09d..a3d256f0f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,3 +21,5 @@ Config/testthat/edition: 3 Depends: R (>= 3.5) LazyData: true +Imports: + plotly From 178c4850bbf4b13d9b7225ff9e7066f0707121c9 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 13 Aug 2025 08:57:48 +0200 Subject: [PATCH 056/166] :hammer: Added 'zzz.R' * The primary role of this is initialize the plotting environment. --- R/zzz.R | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 R/zzz.R diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 000000000..d94b34baa --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,25 @@ +# script: zzz +# date: 2025-08-13 +# author: Serkan Korkmaz, serkor1@duck.com +# objective: +# script start; + +.plotting_environment <- new.env( + parent = emptyenv() +) + +.onAttach <- function( + libname, + pkgname, + ...) { + +} + +.onDetach <- function( + libpath, + ...) { + + +} + +# script end; \ No newline at end of file From 6349de9258970e3ea3e7d981b75bf32939c1d1cf Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 13 Aug 2025 15:42:04 +0200 Subject: [PATCH 057/166] :hammer: Modularized MA * One MA one file. --- NAMESPACE | 5 + R/ta_DEMA.R | 34 +++ R/ta_EMA.R | 36 +++ R/ta_KAMA.R | 34 +++ R/ta_MA.R | 320 --------------------------- R/ta_MAMA.R | 34 +++ R/ta_SMA.R | 88 ++++++++ R/ta_T3.R | 34 +++ R/ta_TEMA.R | 34 +++ R/ta_TRIMA.R | 34 +++ R/ta_WMA.R | 36 +++ man/SMA.Rd | 11 + man/simple_moving_average.Rd | 5 +- man/simple_moving_average.default.Rd | 11 + man/simple_moving_average.plotly.Rd | 11 + 15 files changed, 406 insertions(+), 321 deletions(-) create mode 100644 R/ta_DEMA.R create mode 100644 R/ta_EMA.R create mode 100644 R/ta_KAMA.R delete mode 100644 R/ta_MA.R create mode 100644 R/ta_MAMA.R create mode 100644 R/ta_SMA.R create mode 100644 R/ta_T3.R create mode 100644 R/ta_TEMA.R create mode 100644 R/ta_TRIMA.R create mode 100644 R/ta_WMA.R create mode 100644 man/SMA.Rd create mode 100644 man/simple_moving_average.default.Rd create mode 100644 man/simple_moving_average.plotly.Rd diff --git a/NAMESPACE b/NAMESPACE index 14d1d11b3..f507f88fe 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,8 +4,10 @@ S3method(acceleration_bands,default) S3method(aroon,default) S3method(aroon_oscillator,default) S3method(bollinger_bands,default) +S3method(bollinger_bands,plotly) S3method(chaikin_AD_line,default) S3method(chaikin_AD_oscillator,default) +S3method(chart,default) S3method(doji,default) S3method(doji_star,default) S3method(double_exponential_moving_average,default) @@ -24,6 +26,7 @@ S3method(mesa_adaptive_moving_average,default) S3method(moving_average_convergence_divergence,default) S3method(relative_strength_index,default) S3method(simple_moving_average,default) +S3method(simple_moving_average,plotly) S3method(stochastic,default) S3method(stochastic_relative_strength_index,default) S3method(t3_moving_average,default) @@ -59,6 +62,7 @@ export(aroon_oscillator) export(bollinger_bands) export(chaikin_AD_line) export(chaikin_AD_oscillator) +export(chart) export(doji) export(doji_star) export(double_exponential_moving_average) @@ -72,6 +76,7 @@ export(ht_phasor) export(ht_sine) export(ht_trendline) export(ht_trendmode) +export(indicator) export(kaufman_adaptive_moving_average) export(mesa_adaptive_moving_average) export(moving_average_convergence_divergence) diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R new file mode 100644 index 000000000..ae3364249 --- /dev/null +++ b/R/ta_DEMA.R @@ -0,0 +1,34 @@ +#' @title Double Exponential Moving Average (DEMA) +#' @export +double_exponential_moving_average <- function(x, n = 10, ...) { + UseMethod("double_exponential_moving_average") +} + +#' @export +double_exponential_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 3L + ) +} + +#' @export +DEMA <- double_exponential_moving_average \ No newline at end of file diff --git a/R/ta_EMA.R b/R/ta_EMA.R new file mode 100644 index 000000000..21378f73a --- /dev/null +++ b/R/ta_EMA.R @@ -0,0 +1,36 @@ +#' @title Exponential Moving Average (EMA) +#' @export +exponential_moving_average <- function(x, n = 10, ...) { + UseMethod( + "exponential_moving_average" + ) +} + +#' @export +exponential_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 1L + ) +} + +#' @export +EMA <- exponential_moving_average \ No newline at end of file diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R new file mode 100644 index 000000000..6ae0533bb --- /dev/null +++ b/R/ta_KAMA.R @@ -0,0 +1,34 @@ +#' @title Kaufman’s Adaptive Moving Average (KAMA) +#' @export +kaufman_adaptive_moving_average <- function(x, n = 10, ...) { + UseMethod("kaufman_adaptive_moving_average") +} + +#' @export +kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 6L + ) +} + +#' @export +KAMA <- kaufman_adaptive_moving_average \ No newline at end of file diff --git a/R/ta_MA.R b/R/ta_MA.R deleted file mode 100644 index 233ab1dcb..000000000 --- a/R/ta_MA.R +++ /dev/null @@ -1,320 +0,0 @@ -#' @title Simple Moving Average (SMA) -#' @export -simple_moving_average <- function(x, n = 10, ...) { - UseMethod( - "simple_moving_average" - ) -} - -#' @export -simple_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 0L - ) -} - -#' @export -SMA <- simple_moving_average - -#' @title Exponential Moving Average (EMA) -#' @export -exponential_moving_average <- function(x, n = 10, ...) { - UseMethod( - "exponential_moving_average" - ) -} - -#' @export -exponential_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 1L - ) -} - -#' @export -EMA <- exponential_moving_average - -#' @title Weighted Moving Average (WMA) -#' @export -weighted_moving_average <- function(x, n = 10, ...) { - UseMethod( - "weighted_moving_average" - ) -} - -#' @export -weighted_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 2L - ) -} - -#' @export -WMA <- weighted_moving_average - -#' @title Double Exponential Moving Average (DEMA) -#' @export -double_exponential_moving_average <- function(x, n = 10, ...) { - UseMethod("double_exponential_moving_average") -} - -#' @export -double_exponential_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 3L - ) -} - -#' @export -DEMA <- double_exponential_moving_average - -#' @title Triple Exponential Moving Average (TEMA) -#' @export -triple_exponential_moving_average <- function(x, n = 10, ...) { - UseMethod("triple_exponential_moving_average") -} - -#' @export -triple_exponential_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 4L - ) -} - -#' @export -TEMA <- triple_exponential_moving_average - -#' @title Triangular Moving Average (TRIMA) -#' @export -triangular_moving_average <- function(x, n = 10, ...) { - UseMethod("triangular_moving_average") -} - -#' @export -triangular_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 5L - ) -} - -#' @export -TRIMA <- triangular_moving_average - -#' @title Kaufman’s Adaptive Moving Average (KAMA) -#' @export -kaufman_adaptive_moving_average <- function(x, n = 10, ...) { - UseMethod("kaufman_adaptive_moving_average") -} - -#' @export -kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 6L - ) -} - -#' @export -KAMA <- kaufman_adaptive_moving_average - -#' @title Mesa Adaptive Moving Average (MAMA) -#' @export -mesa_adaptive_moving_average <- function(x, n = 10, ...) { - UseMethod("mesa_adaptive_moving_average") -} - -#' @export -mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 7L - ) -} - -#' @export -MAMA <- mesa_adaptive_moving_average - -#' @title T3 Moving Average (T3) -#' @export -t3_moving_average <- function(x, n = 10, ...) { - UseMethod("t3_moving_average") -} - -#' @export -t3_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 8L - ) -} - -#' @export -T3 <- t3_moving_average \ No newline at end of file diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R new file mode 100644 index 000000000..44e0610e5 --- /dev/null +++ b/R/ta_MAMA.R @@ -0,0 +1,34 @@ +#' @title Mesa Adaptive Moving Average (MAMA) +#' @export +mesa_adaptive_moving_average <- function(x, n = 10, ...) { + UseMethod("mesa_adaptive_moving_average") +} + +#' @export +mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 7L + ) +} + +#' @export +MAMA <- mesa_adaptive_moving_average \ No newline at end of file diff --git a/R/ta_SMA.R b/R/ta_SMA.R new file mode 100644 index 000000000..f7f221ef0 --- /dev/null +++ b/R/ta_SMA.R @@ -0,0 +1,88 @@ +#' @title Simple Moving Average (SMA) +#' +#' @description +#' A short description... +#' +#' @param x fisk +#' +#' @export +simple_moving_average <- function(x, n = 10, ...) { + UseMethod( + "simple_moving_average" + ) +} + +#' @title Simple Moving Average (SMA) +#' +#' @description +#' A short description... +#' +#' @export +simple_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) +} + +#' @title Simple Moving Average (SMA) +#' +#' @description +#' A short description... +#' +#' @export +SMA <- simple_moving_average + +#' @title Simple Moving Average (SMA) +#' +#' @description +#' A short description... +#' +#' @export +simple_moving_average.plotly <- function( + x, + n = 10, + ...) { + + ## generate SMA values + ## from C as all values + ## are pre-validated + .output <- .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) + + ## update the price chart + ## inside the plotting environment + ## if not set, the plots do not --well-- update + .plotting_environment$price_chart <- plotly::add_lines( + .plotting_environment$price_chart, + x = ~1:length(.output), + y = ~.output, + name = paste0("SMA(", n, ")"), + inherit = FALSE + ) + + .plotting_environment$price_chart +} + diff --git a/R/ta_T3.R b/R/ta_T3.R new file mode 100644 index 000000000..6b270bfb2 --- /dev/null +++ b/R/ta_T3.R @@ -0,0 +1,34 @@ +#' @title T3 Moving Average (T3) +#' @export +t3_moving_average <- function(x, n = 10, ...) { + UseMethod("t3_moving_average") +} + +#' @export +t3_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 8L + ) +} + +#' @export +T3 <- t3_moving_average \ No newline at end of file diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R new file mode 100644 index 000000000..3005a19df --- /dev/null +++ b/R/ta_TEMA.R @@ -0,0 +1,34 @@ +#' @title Triple Exponential Moving Average (TEMA) +#' @export +triple_exponential_moving_average <- function(x, n = 10, ...) { + UseMethod("triple_exponential_moving_average") +} + +#' @export +triple_exponential_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 4L + ) +} + +#' @export +TEMA <- triple_exponential_moving_average \ No newline at end of file diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R new file mode 100644 index 000000000..b1ab38aa9 --- /dev/null +++ b/R/ta_TRIMA.R @@ -0,0 +1,34 @@ +#' @title Triangular Moving Average (TRIMA) +#' @export +triangular_moving_average <- function(x, n = 10, ...) { + UseMethod("triangular_moving_average") +} + +#' @export +triangular_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 5L + ) +} + +#' @export +TRIMA <- triangular_moving_average \ No newline at end of file diff --git a/R/ta_WMA.R b/R/ta_WMA.R new file mode 100644 index 000000000..6c1876cd1 --- /dev/null +++ b/R/ta_WMA.R @@ -0,0 +1,36 @@ +#' @title Weighted Moving Average (WMA) +#' @export +weighted_moving_average <- function(x, n = 10, ...) { + UseMethod( + "weighted_moving_average" + ) +} + +#' @export +weighted_moving_average.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow + + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)); assert(n >= 2) + + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 2L + ) +} + +#' @export +WMA <- weighted_moving_average \ No newline at end of file diff --git a/man/SMA.Rd b/man/SMA.Rd new file mode 100644 index 000000000..23a8dbf47 --- /dev/null +++ b/man/SMA.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{SMA} +\alias{SMA} +\title{Simple Moving Average (SMA)} +\usage{ +SMA(x, n = 10, ...) +} +\description{ +A short description... +} diff --git a/man/simple_moving_average.Rd b/man/simple_moving_average.Rd index 36177c558..84fa9bd9c 100644 --- a/man/simple_moving_average.Rd +++ b/man/simple_moving_average.Rd @@ -6,6 +6,9 @@ \usage{ simple_moving_average(x, n = 10, ...) } +\arguments{ +\item{x}{fisk} +} \description{ -Simple Moving Average (SMA) +A short description... } diff --git a/man/simple_moving_average.default.Rd b/man/simple_moving_average.default.Rd new file mode 100644 index 000000000..1eedc7685 --- /dev/null +++ b/man/simple_moving_average.default.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{simple_moving_average.default} +\alias{simple_moving_average.default} +\title{Simple Moving Average (SMA)} +\usage{ +\method{simple_moving_average}{default}(x, n = 10, ...) +} +\description{ +A short description... +} diff --git a/man/simple_moving_average.plotly.Rd b/man/simple_moving_average.plotly.Rd new file mode 100644 index 000000000..7c200595b --- /dev/null +++ b/man/simple_moving_average.plotly.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MA.R +\name{simple_moving_average.plotly} +\alias{simple_moving_average.plotly} +\title{Simple Moving Average (SMA)} +\usage{ +\method{simple_moving_average}{plotly}(x, n = 10, ...) +} +\description{ +A short description... +} From 794e36a4b3980e7c4d1eac310792ef2967f7a9dc Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 13 Aug 2025 15:47:32 +0200 Subject: [PATCH 058/166] :hammer: Updated .gitignore * It includes the playground now. --- .gitignore | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fef0a1cdd..c03e821c4 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,9 @@ rsconnect/ # Makevars src/Makevars -# Building nots +# Building notes NOTES.md -using_call.R + +# sandbox +sandbox/** + From 2d409a0bec10070771fd8c2514adcbf1e1e69f0b Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 13 Aug 2025 15:48:12 +0200 Subject: [PATCH 059/166] :hammer: Updated Documentation --- man/SMA.Rd | 2 +- man/double_exponential_moving_average.Rd | 2 +- man/exponential_moving_average.Rd | 2 +- man/kaufman_adaptive_moving_average.Rd | 2 +- man/mesa_adaptive_moving_average.Rd | 2 +- man/simple_moving_average.Rd | 2 +- man/simple_moving_average.default.Rd | 2 +- man/simple_moving_average.plotly.Rd | 2 +- man/t3_moving_average.Rd | 2 +- man/triangular_moving_average.Rd | 2 +- man/triple_exponential_moving_average.Rd | 2 +- man/weighted_moving_average.Rd | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/man/SMA.Rd b/man/SMA.Rd index 23a8dbf47..578fb0657 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_SMA.R \name{SMA} \alias{SMA} \title{Simple Moving Average (SMA)} diff --git a/man/double_exponential_moving_average.Rd b/man/double_exponential_moving_average.Rd index a357848ec..162ecd3ae 100644 --- a/man/double_exponential_moving_average.Rd +++ b/man/double_exponential_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_DEMA.R \name{double_exponential_moving_average} \alias{double_exponential_moving_average} \title{Double Exponential Moving Average (DEMA)} diff --git a/man/exponential_moving_average.Rd b/man/exponential_moving_average.Rd index 223d80e3d..eec5b2250 100644 --- a/man/exponential_moving_average.Rd +++ b/man/exponential_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_EMA.R \name{exponential_moving_average} \alias{exponential_moving_average} \title{Exponential Moving Average (EMA)} diff --git a/man/kaufman_adaptive_moving_average.Rd b/man/kaufman_adaptive_moving_average.Rd index aec84e8a5..12d54443f 100644 --- a/man/kaufman_adaptive_moving_average.Rd +++ b/man/kaufman_adaptive_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_KAMA.R \name{kaufman_adaptive_moving_average} \alias{kaufman_adaptive_moving_average} \title{Kaufman’s Adaptive Moving Average (KAMA)} diff --git a/man/mesa_adaptive_moving_average.Rd b/man/mesa_adaptive_moving_average.Rd index cd185c127..3eef7c064 100644 --- a/man/mesa_adaptive_moving_average.Rd +++ b/man/mesa_adaptive_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_MAMA.R \name{mesa_adaptive_moving_average} \alias{mesa_adaptive_moving_average} \title{Mesa Adaptive Moving Average (MAMA)} diff --git a/man/simple_moving_average.Rd b/man/simple_moving_average.Rd index 84fa9bd9c..20bf90907 100644 --- a/man/simple_moving_average.Rd +++ b/man/simple_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_SMA.R \name{simple_moving_average} \alias{simple_moving_average} \title{Simple Moving Average (SMA)} diff --git a/man/simple_moving_average.default.Rd b/man/simple_moving_average.default.Rd index 1eedc7685..0d00e03a8 100644 --- a/man/simple_moving_average.default.Rd +++ b/man/simple_moving_average.default.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_SMA.R \name{simple_moving_average.default} \alias{simple_moving_average.default} \title{Simple Moving Average (SMA)} diff --git a/man/simple_moving_average.plotly.Rd b/man/simple_moving_average.plotly.Rd index 7c200595b..4f3a31319 100644 --- a/man/simple_moving_average.plotly.Rd +++ b/man/simple_moving_average.plotly.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_SMA.R \name{simple_moving_average.plotly} \alias{simple_moving_average.plotly} \title{Simple Moving Average (SMA)} diff --git a/man/t3_moving_average.Rd b/man/t3_moving_average.Rd index 38d8457b1..2c046af8b 100644 --- a/man/t3_moving_average.Rd +++ b/man/t3_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_T3.R \name{t3_moving_average} \alias{t3_moving_average} \title{T3 Moving Average (T3)} diff --git a/man/triangular_moving_average.Rd b/man/triangular_moving_average.Rd index c875de0cc..98769e6d8 100644 --- a/man/triangular_moving_average.Rd +++ b/man/triangular_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_TRIMA.R \name{triangular_moving_average} \alias{triangular_moving_average} \title{Triangular Moving Average (TRIMA)} diff --git a/man/triple_exponential_moving_average.Rd b/man/triple_exponential_moving_average.Rd index e57096c96..d17f05149 100644 --- a/man/triple_exponential_moving_average.Rd +++ b/man/triple_exponential_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_TEMA.R \name{triple_exponential_moving_average} \alias{triple_exponential_moving_average} \title{Triple Exponential Moving Average (TEMA)} diff --git a/man/weighted_moving_average.Rd b/man/weighted_moving_average.Rd index 156f17196..193ac44b9 100644 --- a/man/weighted_moving_average.Rd +++ b/man/weighted_moving_average.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MA.R +% Please edit documentation in R/ta_WMA.R \name{weighted_moving_average} \alias{weighted_moving_average} \title{Weighted Moving Average (WMA)} From 559edce0f71362b2325e6e0903c47dd8e9d51790 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Tue, 19 Aug 2025 19:14:02 +0200 Subject: [PATCH 060/166] :hammer: Base charts --- R/chart.R | 141 +++++++++++++++++++++++++++++++++++++++++++++ R/chart_elements.R | 59 +++++++++++++++++++ R/chart_options.R | 33 +++++++++++ 3 files changed, 233 insertions(+) create mode 100644 R/chart.R create mode 100644 R/chart_elements.R create mode 100644 R/chart_options.R diff --git a/R/chart.R b/R/chart.R new file mode 100644 index 000000000..1d64ad8a0 --- /dev/null +++ b/R/chart.R @@ -0,0 +1,141 @@ +#' @export +chart <- function(x, ...) { + UseMethod( + "chart" + ) +} + +#' @export +chart.default <- function(x, ...) { + ## convert to data.frame + data_frame <- as.data.frame(x) + + .plotting_environment$x <- data_frame + + ## 1) generate kline + kline_chart <- plotly::plot_ly( + data = data_frame, + type = "candlestick", + open = ~open, + close = ~close, + high = ~high, + low = ~low, + increasing = list( + line = list(color = chart.theme()$bull_color, width = 3 - 1.75), + fillcolor = chart.theme()$bull_color + ), + decreasing = list( + line = list(color = chart.theme()$bear_color, width = 3 - 1.75), + fillcolor = chart.theme()$bear_color + ), + ... + ) + + + ## 2) store in environment + ## to enable chart() call + .plotting_environment$price_chart <- .chart_layout( + x = kline_chart, + title_text = sprintf( + "Ticker: %s
Period: %s", + deparse(substitute(x)), + "Period Value" + ) + ) + + + .plotting_environment$price_chart + +} + +#' @export +indicator <- function( + .f, + .var, + ...) { + + parent_frame <- parent.frame() + + passed_formula <- eval.parent(substitute(.var)) + + if (!inherits(passed_formula, "formula")) { + stop("`.var` must be a formula.", call. = FALSE) + } + + environment(passed_formula) <- parent_frame + + f_expr <- substitute(.f) + pre_args <- list() + if (is.call(f_expr)) { + head <- f_expr[[1L]] + if (is.symbol(head)) { + f <- get(as.character(head), envir = parent_frame, mode = "function") + } else if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { + pkg <- as.character(head[[2L]]); fun <- as.character(head[[3L]]) + f <- if (as.character(head[[1L]]) == "::") + getExportedValue(pkg, fun) else get(fun, envir = asNamespace(pkg), mode = "function") + } else { + f <- eval(head, envir = parent_frame) + } + pre_args <- as.list(f_expr)[-1L] + } else { + f <- match.fun(eval.parent(substitute(.f))) + } + + + dots_mf <- as.list(substitute(list(...)))[-1L] + + dn <- names(dots_mf); if (is.null(dn)) dn <- rep("", length(dots_mf)) + if (!("data" %in% dn)) { + pe <- get0(".plotting_environment", inherits = TRUE) + if (!is.null(pe) && !is.null(pe$x)) { + dots_mf$data <- pe$x # <<< pass the actual data.frame + } else if (!is.null(pe) && !is.null(pe$data)) { + dots_mf$data <- pe$data + } else { + stop("No `data` provided and no active chart data found. Call chart(...) first.", call. = FALSE) + } + } + + ## model frame + mf <- do.call( + what = model.frame, + args = c(list(formula = passed_formula), dots_mf), + envir = parent_frame + ) + + mm_dots <- dots_mf[intersect(names(dots_mf), c("contrasts", "xlev"))] + mm <- do.call(model.matrix, c(list(object = passed_formula, data = mf), mm_dots), envir = parent_frame) + + if (!is.null(colnames(mm)) && "(Intercept)" %in% colnames(mm)) { + mm <- mm[, setdiff(colnames(mm), "(Intercept)"), drop = FALSE] + } + + series <- if (NCOL(mm) == 1L) { + as.numeric(mm[, 1L]) + } else { + mm + } + + ## 6) fetch active plotly object (first arg for S3) + .plotting_environment <- get0(".plotting_environment", inherits = TRUE) + if (is.null(.plotting_environment) || is.null(.plotting_environment$price_chart)) { + stop("No active plotly chart. Call chart(...) first.", call. = FALSE) + } + + .plot <- .plotting_environment$price_chart + + ## 7) call worker: plotly object first; TA params; series through ... as `.series` + .output <- do.call( + what = f, + args = c(list(.plot), pre_args, list(.series = series)), + envir = parent_frame + ) + + ## keep env chart in sync if a plotly is returned + if (inherits(.output, "plotly")) { + .output <- .plotting_environment$price_chart + } + + .output +} \ No newline at end of file diff --git a/R/chart_elements.R b/R/chart_elements.R new file mode 100644 index 000000000..f397d91cb --- /dev/null +++ b/R/chart_elements.R @@ -0,0 +1,59 @@ +.chart_layout <- function(x, title_text, ...) { + ## extract chart theme + ## from R/chart_options.R + chart_theme <- chart.theme() + + ## hardcoded layout elements + ## and added flexibility in ellipsis + plotly::layout( + p = x, + paper_bgcolor = chart_theme$paper_bgcolor, + plot_bgcolor = chart_theme$plot_bgcolor, + font = list( + size = 14 * getOption("talib.chart.scale", default = 1), + color = chart_theme$font_color + ), + yaxis = list( + gridcolor = chart_theme$grid_color + ), + xaxis = list( + gridcolor = chart_theme$grid_color, + rangeslider = list( + visible = getOption("talib.chart.slider", default = FALSE), + thickness = getOption("talib.chart.slider.size", default = 0.05) + + ) + ), + + ## legend start + showlegend = getOption("talib.chart.legend", default = TRUE), + legend = list( + orientation = 'h', + x = 0, + y = 100, + yref="container", + title = list( + text = "Indicators:", + font = list( + size = 16 * getOption("talib.chart.scale", default = 1) + ) + ) + ), + ## legend end + + ## title start + title = list( + text = title_text, + font = list( + size = 20 * getOption("talib.chart.scale", default = 1) + ), + x = 1, + xref = "paper", + xanchor = "right" + ), + ## title end + + ... + ) + +} \ No newline at end of file diff --git a/R/chart_options.R b/R/chart_options.R new file mode 100644 index 000000000..1c072cb88 --- /dev/null +++ b/R/chart_options.R @@ -0,0 +1,33 @@ +## chart theme +chart.theme <- function() { + + ## bull or bear colors + if (getOption("talib.chart.deficiency", default = FALSE)) { + bull_color = "#5d8ca8" + bear_color = "#d3ba68" + } else { + bull_color = "#65a479" + bear_color = "#d5695d" + + } + + if (getOption("talib.chart.dark", default = TRUE)) { + list( + paper_bgcolor = '#2b3139', + plot_bgcolor = '#2b3139', + font_color = '#848e9c', + grid_color = '#40454c', + bull_color = bull_color, + bear_color = bear_color + ) + } else { + list( + paper_bgcolor = '#E3E3E3', + plot_bgcolor = '#E3E3E3', + font_color = '#A3A3A3', + grid_color = '#D3D3D3', + bull_color = bull_color, + bear_color = bear_color + ) + } +} From a46f142cdae3f4bfeb4aa29e5f92e89c74add798 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Tue, 19 Aug 2025 19:19:39 +0200 Subject: [PATCH 061/166] :hammer: Basic TAs * The Functions works at the moment. --- R/ta_BBANDS.R | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++- R/ta_SMA.R | 47 +++++++++++++++++++---------------- 2 files changed, 93 insertions(+), 22 deletions(-) diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index a6e81d7f7..33c59d24f 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -36,4 +36,70 @@ bollinger_bands.default <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) as.numeric(down), as.integer(ma$maType) ) -} \ No newline at end of file +} + +#' @export +bollinger_bands.plotly <- function( + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ...) { + + ma <- map_maType_call(substitute(ma)) + ## extract arguments + ## from ellipsis + dots <- list(...) + series <- dots$.series + + ## extract chart objects + .chart <- .plotting_environment$price_chart + .value <- .Call( + "impl_ta_BBANDS", + series, + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) + + ## constuct chart + ## element + for (i in seq_len(ncol(.value))) local({ + j <- i + + .plotting_environment$price_chart <- plotly::add_lines( + .plotting_environment$price_chart, + x = ~seq_len(nrow(.value)), + y = ~.value[, j], + inherit = FALSE,line = list( + color = '#4682b4' + ), + showlegend = FALSE, + legendgroup = 'bollinger_band', + name = c("Upper Band", "Middle Band", "Lower Band")[j], + ) + }) + + .plotting_environment$price_chart <- plotly::add_ribbons( + p = .plotting_environment$price_chart, + inherit = FALSE, + x = ~seq_len(nrow(.value)), + ymin = ~.value[,3], + ymax = ~.value[,1], + fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + line = list( + color = "transparent" + ), + showlegend = TRUE, + legendgroup = 'bollinger_band', + name = paste0( + "BBand" + ) + ) + + .plotting_environment$price_chart + + +} + diff --git a/R/ta_SMA.R b/R/ta_SMA.R index f7f221ef0..366e5add0 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -62,27 +62,32 @@ simple_moving_average.plotly <- function( n = 10, ...) { - ## generate SMA values - ## from C as all values - ## are pre-validated - .output <- .Call( - "impl_ta_MA", - x, - as.integer(n), - 0L - ) - - ## update the price chart - ## inside the plotting environment - ## if not set, the plots do not --well-- update - .plotting_environment$price_chart <- plotly::add_lines( - .plotting_environment$price_chart, - x = ~1:length(.output), - y = ~.output, - name = paste0("SMA(", n, ")"), - inherit = FALSE - ) + ## extract arguments + ## from ellipsis + dots <- list(...) + series <- dots$.series + + ## generate SMA values + ## from C as all values + ## are pre-validated + .output <- .Call( + "impl_ta_MA", + series, + as.integer(n), + 0L + ) + + ## update the price chart + ## inside the plotting environment + ## if not set, the plots do not --well-- update + .plotting_environment$price_chart <- plotly::add_lines( + x, + x = ~1:length(.output), + y = ~.output, + name = paste0("SMA(", n, ")"), + inherit = FALSE + ) - .plotting_environment$price_chart + .plotting_environment$price_chart } From 16a279e4b59b2f8714b332c8efb8181b6c141ce0 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:05:05 +0200 Subject: [PATCH 062/166] :hammer: Basic TAs refactored * The original implementation were too complex... fucking GPT... - Remade and now everything works as it should (so far) --- NAMESPACE | 1 + R/chart.R | 63 ++++++++--- R/chart_utils.R | 200 +++++++++++++++++++++++++++++++++ R/ta_BBANDS.R | 10 +- R/ta_RSI.R | 29 ++++- R/ta_SMA.R | 49 ++++---- R/utils.R | 15 ++- man/relative_strength_index.Rd | 2 +- 8 files changed, 312 insertions(+), 57 deletions(-) create mode 100644 R/chart_utils.R diff --git a/NAMESPACE b/NAMESPACE index f507f88fe..cbb955ca4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -25,6 +25,7 @@ S3method(kaufman_adaptive_moving_average,default) S3method(mesa_adaptive_moving_average,default) S3method(moving_average_convergence_divergence,default) S3method(relative_strength_index,default) +S3method(relative_strength_index,plotly) S3method(simple_moving_average,default) S3method(simple_moving_average,plotly) S3method(stochastic,default) diff --git a/R/chart.R b/R/chart.R index 1d64ad8a0..4b4984644 100644 --- a/R/chart.R +++ b/R/chart.R @@ -34,7 +34,7 @@ chart.default <- function(x, ...) { ## 2) store in environment ## to enable chart() call - .plotting_environment$price_chart <- .chart_layout( + .plotting_environment$main <- .chart_layout( x = kline_chart, title_text = sprintf( "Ticker: %s
Period: %s", @@ -43,8 +43,17 @@ chart.default <- function(x, ...) { ) ) + ## subplot list + .plotting_environment$sub <- list() # list(), not a plotly or other type +.plotting_environment$chart <- NULL - .plotting_environment$price_chart + + ## 3) add plot counter + ## for subplots + .plotting_environment$plot_counter <- 1 + + + .plotting_environment$main } @@ -119,23 +128,43 @@ indicator <- function( ## 6) fetch active plotly object (first arg for S3) .plotting_environment <- get0(".plotting_environment", inherits = TRUE) - if (is.null(.plotting_environment) || is.null(.plotting_environment$price_chart)) { + if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { stop("No active plotly chart. Call chart(...) first.", call. = FALSE) } - .plot <- .plotting_environment$price_chart - - ## 7) call worker: plotly object first; TA params; series through ... as `.series` - .output <- do.call( - what = f, - args = c(list(.plot), pre_args, list(.series = series)), - envir = parent_frame - ) + .plot <- .plotting_environment$main + + .output <- do.call(f, c(list(.plot), pre_args, list(.series = series)), envir = parent_frame) + +if (inherits(.output, "plotly")) { + # Build a flat panel list + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) + + # HARD CHECKS: every element must be a plotly htmlwidget + is_plotly <- vapply(panels, function(p) inherits(p, "plotly"), logical(1)) + if (!all(is_plotly)) { + bad <- which(!is_plotly) + stop(sprintf("Non-plotly passed to subplot at index/indices: %s", + paste(bad, collapse = ", ")), call. = FALSE) + } + + k <- length(panels) + h_main <- 0.70 + heights <- if (k > 1) c(h_main, rep((1 - h_main)/(k - 1), k - 1)) else 1 + + # IMPORTANT: pass ONLY the panels as the first argument; + # layout args follow, so none of them can be mis-parsed as plots + fig <- plotly::subplot( + panels, + nrows = k, + shareX = TRUE, + margin = 0.02, + heights = heights + ) # `subplot()` accepts a list of plotly objects directly. :contentReference[oaicite:1]{index=1} + + .plotting_environment$chart <- fig + return(fig) +} - ## keep env chart in sync if a plotly is returned - if (inherits(.output, "plotly")) { - .output <- .plotting_environment$price_chart - } - - .output +.output } \ No newline at end of file diff --git a/R/chart_utils.R b/R/chart_utils.R new file mode 100644 index 000000000..ccbafeafd --- /dev/null +++ b/R/chart_utils.R @@ -0,0 +1,200 @@ + + +is_subplot <- function(p) { + flag <- p$x$subplot + if (is.null(flag)) { + return(FALSE) + } + flag +} + + + + +# extract_subplot <- function(p, panel = 1) { +# if (!is_subplot(p)) { +# return(p) +# } +# b <- plotly::plotly_build(p) + +# xref <- paste0("x", if (panel > 1) panel else "") +# yref <- paste0("y", if (panel > 1) panel else "") + +# # keep only traces for this axis pair +# keep <- vapply(b$x$data, function(tr) { +# (is.null(tr$xaxis) || tr$xaxis == xref) && +# (is.null(tr$yaxis) || tr$yaxis == yref) +# }, logical(1)) +# b$x$data <- b$x$data[keep] + +# # rewrite trace axis refs to defaults ("x","y") for a single-panel figure +# b$x$data <- lapply(b$x$data, function(tr) { tr$xaxis <- NULL; tr$yaxis <- NULL; tr }) + +# la <- b$x$layout +# ax_x <- la[[paste0("xaxis", if (panel > 1) panel else "")]] +# ax_y <- la[[paste0("yaxis", if (panel > 1) panel else "")]] + +# # normalize axes: remove subplot positioning/links and fill the canvas +# scrub <- c("domain","anchor","matches","overlaying","side","position", +# "scaleanchor","scaleratio","constrain","constraintoward") +# ax_x[scrub] <- NULL; ax_y[scrub] <- NULL +# ax_x$domain <- c(0, 1); ax_y$domain <- c(0, 1) +# ax_x$anchor <- "y"; ax_y$anchor <- "x" + +# globals <- la[intersect(names(la), +# c("margin","font","template","legend","hovermode","hoverlabel", +# "paper_bgcolor","plot_bgcolor","barmode","barnorm","colorway"))] + +# b$x$layout <- c(list(xaxis = ax_x, yaxis = ax_y), globals) + +# # keep layout objects scoped to this panel or to 'paper' +# keep_by_ref <- function(objs) Filter(function(o) { +# xr <- is.null(o$xref) || o$xref %in% c(xref, "paper") +# yr <- is.null(o$yref) || o$yref %in% c(yref, "paper") +# xr && yr +# }, objs) + +# if (!is.null(la$shapes)) b$x$layout$shapes <- keep_by_ref(la$shapes) +# if (!is.null(la$annotations)) b$x$layout$annotations <- keep_by_ref(la$annotations) +# if (!is.null(la$images)) b$x$layout$images <- keep_by_ref(la$images) + +# # defensive: remove any subplot/grid residue +# b$x$layout$grid <- NULL +# b$x$layout$subplot <- NULL + +# b +# } + +# extract_subplot <- function(p, panel = 1) { +# if (!is_subplot(p)) return(p) + +# x <- p$x + +# xref <- paste0("x", if (panel > 1) panel else "") +# yref <- paste0("y", if (panel > 1) panel else "") + +# # keep only traces for this axis pair +# x$data <- Filter(function(tr) +# (is.null(tr$xaxis) || tr$xaxis == xref) && +# (is.null(tr$yaxis) || tr$yaxis == yref), x$data) + +# # normalize trace axis refs to defaults for a single-panel figure +# x$data <- lapply(x$data, function(tr) { tr$xaxis <- NULL; tr$yaxis <- NULL; tr }) + +# la <- x$layout +# ax_x <- la[[paste0("xaxis", if (panel > 1) panel else "")]] +# ax_y <- la[[paste0("yaxis", if (panel > 1) panel else "")]] + +# # fill canvas and drop subplot positioning/links +# scrub <- c("domain","anchor","matches","overlaying","side","position", +# "scaleanchor","scaleratio","constrain","constraintoward") +# ax_x[scrub] <- NULL; ax_y[scrub] <- NULL +# ax_x$domain <- c(0, 1); ax_y$domain <- c(0, 1) +# ax_x$anchor <- "y"; ax_y$anchor <- "x" + +# globals <- la[intersect(names(la), +# c("margin","font","template","legend","hovermode","hoverlabel", +# "paper_bgcolor","plot_bgcolor","barmode","barnorm","colorway"))] + +# x$layout <- c(list(xaxis = ax_x, yaxis = ax_y), globals) + +# # keep layout objects scoped to this panel or to 'paper' +# keep_by_ref <- function(objs) Filter(function(o) { +# xr <- is.null(o$xref) || o$xref %in% c(xref, "paper") +# yr <- is.null(o$yref) || o$yref %in% c(yref, "paper") +# xr && yr +# }, objs) + +# if (!is.null(la$shapes)) x$layout$shapes <- keep_by_ref(la$shapes) +# if (!is.null(la$annotations)) x$layout$annotations <- keep_by_ref(la$annotations) +# if (!is.null(la$images)) x$layout$images <- keep_by_ref(la$images) + +# # clear subplot residue/flag +# x$layout$grid <- NULL +# x$layout$subplot <- NULL +# x$subplot <- NULL + +# plotly::as_widget(x) +# } + +extract_subplot <- function(p, panel = 1) { + if (!isTRUE(p$x$subplot)) return(p) + b <- plotly::plotly_build(p) + + xref <- paste0("x", if (panel > 1) panel else "") + yref <- paste0("y", if (panel > 1) panel else "") + + # keep traces for the requested axis pair and reset axis refs to defaults + trs <- Filter(function(tr) + (is.null(tr$xaxis) || tr$xaxis == xref) && + (is.null(tr$yaxis) || tr$yaxis == yref), b$x$data) + trs <- lapply(trs, function(tr) { tr$xaxis <- NULL; tr$yaxis <- NULL; tr }) + + # normalize axes to fill the canvas + ax_x <- b$x$layout[[paste0("xaxis", if (panel > 1) panel else "")]] + ax_y <- b$x$layout[[paste0("yaxis", if (panel > 1) panel else "")]] + scrub <- c("domain","anchor","matches","overlaying","side","position", + "scaleanchor","scaleratio","constrain","constraintoward") + ax_x[scrub] <- NULL; ax_y[scrub] <- NULL + ax_x$domain <- c(0,1); ax_y$domain <- c(0,1); ax_x$anchor <- "y"; ax_y$anchor <- "x" + + # create a fresh (unbuilt) figure and add cloned traces + out <- plotly::plot_ly() + out <- plotly::layout(out, xaxis = ax_x, yaxis = ax_y) + for (tr in trs) out <- do.call(plotly::add_trace, c(list(out), tr)) + out +} + +`%||%` <- function(a, b) if (is.null(a)) b else a + +.panel_count <- function(p) { + la <- p$x$layout + ys <- grep("^yaxis(\\d+)?$", names(la), value = TRUE) + if (!length(ys)) 1L else max(as.integer(sub("^yaxis$", "1", sub("^yaxis", "", ys))), na.rm = TRUE) +} + +.stack_rows <- function(p, rows, heights = NULL, gap = 0.02, shareX = TRUE) { + stopifnot(rows >= 1L) + + # default: top gets 0.7, rest split the remainder + if (is.null(heights)) { + heights <- if (rows == 1L) 1 else c(0.7, rep(0.3/(rows - 1L), rows - 1L)) + } + heights <- as.numeric(heights) + if (length(heights) != rows) heights <- rep(heights, length.out = rows) + + # normalize to available vertical space after gaps + avail <- 1 - gap * (rows - 1L) + h_topdown <- heights / sum(heights) * avail + + # convert to bottom-up order for stacking math + h_bu <- rev(h_topdown) + + # bottom-up cumulative positions + bottoms_bu <- c(0, cumsum(h_bu[-length(h_bu)] + gap)) + tops_bu <- bottoms_bu + h_bu + + la <- p$x$layout + key <- function(i) if (i > 1L) as.character(i) else "" + + for (i in seq_len(rows)) { + j <- rows - i + 1L + yk <- paste0("yaxis", key(i)) + xk <- paste0("xaxis", key(i)) + + ya <- (la[[yk]] %||% list()) + xa <- (la[[xk]] %||% list()) + + ya$domain <- c(bottoms_bu[j], tops_bu[j]) + ya$anchor <- paste0("x", key(i)) + xa$domain <- c(0, 1) + xa$anchor <- paste0("y", key(i)) + if (shareX && i > 1L) xa$matches <- "x" + + la[[yk]] <- ya + la[[xk]] <- xa + } + + p$x$layout <- la + p +} diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 33c59d24f..d3847ba98 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -68,8 +68,8 @@ bollinger_bands.plotly <- function( for (i in seq_len(ncol(.value))) local({ j <- i - .plotting_environment$price_chart <- plotly::add_lines( - .plotting_environment$price_chart, + .plotting_environment$main <- plotly::add_lines( + .plotting_environment$main, x = ~seq_len(nrow(.value)), y = ~.value[, j], inherit = FALSE,line = list( @@ -81,8 +81,8 @@ bollinger_bands.plotly <- function( ) }) - .plotting_environment$price_chart <- plotly::add_ribbons( - p = .plotting_environment$price_chart, + .plotting_environment$main <- plotly::add_ribbons( + p = .plotting_environment$main, inherit = FALSE, x = ~seq_len(nrow(.value)), ymin = ~.value[,3], @@ -98,7 +98,7 @@ bollinger_bands.plotly <- function( ) ) - .plotting_environment$price_chart + .plotting_environment$main } diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 2880dad60..9719f4848 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -1,13 +1,13 @@ #' @title Relative Strength Index #' @export -relative_strength_index <- function(x, n, ...) { +relative_strength_index <- function(x, n = 10, ...) { UseMethod( "relative_strength_index" ) } #' @export -relative_strength_index.default <- function(x, n, ...) { +relative_strength_index.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -25,8 +25,29 @@ relative_strength_index.default <- function(x, n, ...) { ## 1) pass `x` to C .Call( - .NAME = "impl_ta_RSI", + "impl_ta_RSI", x, as.integer(n) ) -} \ No newline at end of file +} + +#' @export +relative_strength_index.plotly <- function(x, n = 10, lower = 20, upper = 80, ...) { + dots <- list(...); series <- dots$.series + rsi <- .Call("impl_ta_RSI", series, as.integer(n)) + df <- data.frame(idx = seq_along(rsi), value = rsi) + + rsi_plot <- plotly::plot_ly(df, x = ~idx, y = ~value, + type = "scatter", mode = "lines", + showlegend = FALSE) + rsi_plot <- plotly::add_ribbons( + rsi_plot, x = ~idx, + ymin = rep(lower, nrow(df)), ymax = rep(upper, nrow(df)), + line = list(width = 0), fillcolor = "rgba(160,160,160,0.20)" + ) + + # SAFE append even when `.plotting_environment$sub` is NULL + .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) + rsi_plot +} + diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 366e5add0..35bbf9c32 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -57,37 +57,28 @@ SMA <- simple_moving_average #' A short description... #' #' @export -simple_moving_average.plotly <- function( - x, - n = 10, - ...) { +simple_moving_average.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + sma <- .Call("impl_ta_MA", series, as.integer(n), 0L) - ## extract arguments - ## from ellipsis - dots <- list(...) - series <- dots$.series + df <- data.frame( + idx = seq_along(sma), + sma = as.numeric(sma) + ) - ## generate SMA values - ## from C as all values - ## are pre-validated - .output <- .Call( - "impl_ta_MA", - series, - as.integer(n), - 0L - ) - - ## update the price chart - ## inside the plotting environment - ## if not set, the plots do not --well-- update - .plotting_environment$price_chart <- plotly::add_lines( - x, - x = ~1:length(.output), - y = ~.output, - name = paste0("SMA(", n, ")"), - inherit = FALSE - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, y = ~sma, # refer to columns, not objects in caller env + type = "scatter", mode = "lines", + name = sprintf("SMA(%d)", n), + inherit = FALSE, + xaxis = "x", yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$price_chart + .plotting_environment$main } + diff --git a/R/utils.R b/R/utils.R index 92230e129..25e60ee38 100644 --- a/R/utils.R +++ b/R/utils.R @@ -5,6 +5,14 @@ assert <- function(exprs) { ) } +flatten <- function(x) { + + if (!inherits(x, "list")) + list(x) + else + unlist(c(lapply(x, flatten)), recursive = FALSE) +} + ## extractors .open <- function(x) {x[,1]} @@ -86,4 +94,9 @@ is.number <- function(x) { if (!is.number(v) || length(v) != 1L || !is.finite(v)) stop("fast/slow/signal must be finite numeric scalars.", call. = FALSE) as.integer(v) -} \ No newline at end of file +} + + +reclass <- function(x, ...) { + class(x) <- c(class(x), ...) +} diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index ab6f959fa..9693b3782 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -4,7 +4,7 @@ \alias{relative_strength_index} \title{Relative Strength Index} \usage{ -relative_strength_index(x, n, ...) +relative_strength_index(x, n = 10, ...) } \description{ Relative Strength Index From 35eea894fa3283086210e2cde1d50f72c0d0aef2 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:10:07 +0200 Subject: [PATCH 063/166] :hammer: Deleted Redundant files --- R/chart.R | 2 +- R/chart_utils.R | 200 ------------------------------------------------ 2 files changed, 1 insertion(+), 201 deletions(-) delete mode 100644 R/chart_utils.R diff --git a/R/chart.R b/R/chart.R index 4b4984644..f330f3fc2 100644 --- a/R/chart.R +++ b/R/chart.R @@ -160,7 +160,7 @@ if (inherits(.output, "plotly")) { shareX = TRUE, margin = 0.02, heights = heights - ) # `subplot()` accepts a list of plotly objects directly. :contentReference[oaicite:1]{index=1} + ) .plotting_environment$chart <- fig return(fig) diff --git a/R/chart_utils.R b/R/chart_utils.R deleted file mode 100644 index ccbafeafd..000000000 --- a/R/chart_utils.R +++ /dev/null @@ -1,200 +0,0 @@ - - -is_subplot <- function(p) { - flag <- p$x$subplot - if (is.null(flag)) { - return(FALSE) - } - flag -} - - - - -# extract_subplot <- function(p, panel = 1) { -# if (!is_subplot(p)) { -# return(p) -# } -# b <- plotly::plotly_build(p) - -# xref <- paste0("x", if (panel > 1) panel else "") -# yref <- paste0("y", if (panel > 1) panel else "") - -# # keep only traces for this axis pair -# keep <- vapply(b$x$data, function(tr) { -# (is.null(tr$xaxis) || tr$xaxis == xref) && -# (is.null(tr$yaxis) || tr$yaxis == yref) -# }, logical(1)) -# b$x$data <- b$x$data[keep] - -# # rewrite trace axis refs to defaults ("x","y") for a single-panel figure -# b$x$data <- lapply(b$x$data, function(tr) { tr$xaxis <- NULL; tr$yaxis <- NULL; tr }) - -# la <- b$x$layout -# ax_x <- la[[paste0("xaxis", if (panel > 1) panel else "")]] -# ax_y <- la[[paste0("yaxis", if (panel > 1) panel else "")]] - -# # normalize axes: remove subplot positioning/links and fill the canvas -# scrub <- c("domain","anchor","matches","overlaying","side","position", -# "scaleanchor","scaleratio","constrain","constraintoward") -# ax_x[scrub] <- NULL; ax_y[scrub] <- NULL -# ax_x$domain <- c(0, 1); ax_y$domain <- c(0, 1) -# ax_x$anchor <- "y"; ax_y$anchor <- "x" - -# globals <- la[intersect(names(la), -# c("margin","font","template","legend","hovermode","hoverlabel", -# "paper_bgcolor","plot_bgcolor","barmode","barnorm","colorway"))] - -# b$x$layout <- c(list(xaxis = ax_x, yaxis = ax_y), globals) - -# # keep layout objects scoped to this panel or to 'paper' -# keep_by_ref <- function(objs) Filter(function(o) { -# xr <- is.null(o$xref) || o$xref %in% c(xref, "paper") -# yr <- is.null(o$yref) || o$yref %in% c(yref, "paper") -# xr && yr -# }, objs) - -# if (!is.null(la$shapes)) b$x$layout$shapes <- keep_by_ref(la$shapes) -# if (!is.null(la$annotations)) b$x$layout$annotations <- keep_by_ref(la$annotations) -# if (!is.null(la$images)) b$x$layout$images <- keep_by_ref(la$images) - -# # defensive: remove any subplot/grid residue -# b$x$layout$grid <- NULL -# b$x$layout$subplot <- NULL - -# b -# } - -# extract_subplot <- function(p, panel = 1) { -# if (!is_subplot(p)) return(p) - -# x <- p$x - -# xref <- paste0("x", if (panel > 1) panel else "") -# yref <- paste0("y", if (panel > 1) panel else "") - -# # keep only traces for this axis pair -# x$data <- Filter(function(tr) -# (is.null(tr$xaxis) || tr$xaxis == xref) && -# (is.null(tr$yaxis) || tr$yaxis == yref), x$data) - -# # normalize trace axis refs to defaults for a single-panel figure -# x$data <- lapply(x$data, function(tr) { tr$xaxis <- NULL; tr$yaxis <- NULL; tr }) - -# la <- x$layout -# ax_x <- la[[paste0("xaxis", if (panel > 1) panel else "")]] -# ax_y <- la[[paste0("yaxis", if (panel > 1) panel else "")]] - -# # fill canvas and drop subplot positioning/links -# scrub <- c("domain","anchor","matches","overlaying","side","position", -# "scaleanchor","scaleratio","constrain","constraintoward") -# ax_x[scrub] <- NULL; ax_y[scrub] <- NULL -# ax_x$domain <- c(0, 1); ax_y$domain <- c(0, 1) -# ax_x$anchor <- "y"; ax_y$anchor <- "x" - -# globals <- la[intersect(names(la), -# c("margin","font","template","legend","hovermode","hoverlabel", -# "paper_bgcolor","plot_bgcolor","barmode","barnorm","colorway"))] - -# x$layout <- c(list(xaxis = ax_x, yaxis = ax_y), globals) - -# # keep layout objects scoped to this panel or to 'paper' -# keep_by_ref <- function(objs) Filter(function(o) { -# xr <- is.null(o$xref) || o$xref %in% c(xref, "paper") -# yr <- is.null(o$yref) || o$yref %in% c(yref, "paper") -# xr && yr -# }, objs) - -# if (!is.null(la$shapes)) x$layout$shapes <- keep_by_ref(la$shapes) -# if (!is.null(la$annotations)) x$layout$annotations <- keep_by_ref(la$annotations) -# if (!is.null(la$images)) x$layout$images <- keep_by_ref(la$images) - -# # clear subplot residue/flag -# x$layout$grid <- NULL -# x$layout$subplot <- NULL -# x$subplot <- NULL - -# plotly::as_widget(x) -# } - -extract_subplot <- function(p, panel = 1) { - if (!isTRUE(p$x$subplot)) return(p) - b <- plotly::plotly_build(p) - - xref <- paste0("x", if (panel > 1) panel else "") - yref <- paste0("y", if (panel > 1) panel else "") - - # keep traces for the requested axis pair and reset axis refs to defaults - trs <- Filter(function(tr) - (is.null(tr$xaxis) || tr$xaxis == xref) && - (is.null(tr$yaxis) || tr$yaxis == yref), b$x$data) - trs <- lapply(trs, function(tr) { tr$xaxis <- NULL; tr$yaxis <- NULL; tr }) - - # normalize axes to fill the canvas - ax_x <- b$x$layout[[paste0("xaxis", if (panel > 1) panel else "")]] - ax_y <- b$x$layout[[paste0("yaxis", if (panel > 1) panel else "")]] - scrub <- c("domain","anchor","matches","overlaying","side","position", - "scaleanchor","scaleratio","constrain","constraintoward") - ax_x[scrub] <- NULL; ax_y[scrub] <- NULL - ax_x$domain <- c(0,1); ax_y$domain <- c(0,1); ax_x$anchor <- "y"; ax_y$anchor <- "x" - - # create a fresh (unbuilt) figure and add cloned traces - out <- plotly::plot_ly() - out <- plotly::layout(out, xaxis = ax_x, yaxis = ax_y) - for (tr in trs) out <- do.call(plotly::add_trace, c(list(out), tr)) - out -} - -`%||%` <- function(a, b) if (is.null(a)) b else a - -.panel_count <- function(p) { - la <- p$x$layout - ys <- grep("^yaxis(\\d+)?$", names(la), value = TRUE) - if (!length(ys)) 1L else max(as.integer(sub("^yaxis$", "1", sub("^yaxis", "", ys))), na.rm = TRUE) -} - -.stack_rows <- function(p, rows, heights = NULL, gap = 0.02, shareX = TRUE) { - stopifnot(rows >= 1L) - - # default: top gets 0.7, rest split the remainder - if (is.null(heights)) { - heights <- if (rows == 1L) 1 else c(0.7, rep(0.3/(rows - 1L), rows - 1L)) - } - heights <- as.numeric(heights) - if (length(heights) != rows) heights <- rep(heights, length.out = rows) - - # normalize to available vertical space after gaps - avail <- 1 - gap * (rows - 1L) - h_topdown <- heights / sum(heights) * avail - - # convert to bottom-up order for stacking math - h_bu <- rev(h_topdown) - - # bottom-up cumulative positions - bottoms_bu <- c(0, cumsum(h_bu[-length(h_bu)] + gap)) - tops_bu <- bottoms_bu + h_bu - - la <- p$x$layout - key <- function(i) if (i > 1L) as.character(i) else "" - - for (i in seq_len(rows)) { - j <- rows - i + 1L - yk <- paste0("yaxis", key(i)) - xk <- paste0("xaxis", key(i)) - - ya <- (la[[yk]] %||% list()) - xa <- (la[[xk]] %||% list()) - - ya$domain <- c(bottoms_bu[j], tops_bu[j]) - ya$anchor <- paste0("x", key(i)) - xa$domain <- c(0, 1) - xa$anchor <- paste0("y", key(i)) - if (shareX && i > 1L) xa$matches <- "x" - - la[[yk]] <- ya - la[[xk]] <- xa - } - - p$x$layout <- la - p -} From bc9021c91049c21b3e3d2c9e48dc6d2015c1317d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 20 Aug 2025 10:47:05 +0200 Subject: [PATCH 064/166] :hammer: Chart-function QoL * The chart function have gotten some love. Documentation refactoring and such things. --- R/chart.R | 137 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 89 insertions(+), 48 deletions(-) diff --git a/R/chart.R b/R/chart.R index f330f3fc2..25fb24969 100644 --- a/R/chart.R +++ b/R/chart.R @@ -1,60 +1,101 @@ #' @export -chart <- function(x, ...) { - UseMethod( - "chart" - ) +chart <- function( + x, + type = "candlestick", + ...) { + UseMethod( + "chart" + ) } #' @export -chart.default <- function(x, ...) { - ## convert to data.frame - data_frame <- as.data.frame(x) - - .plotting_environment$x <- data_frame - - ## 1) generate kline - kline_chart <- plotly::plot_ly( - data = data_frame, - type = "candlestick", - open = ~open, - close = ~close, - high = ~high, - low = ~low, - increasing = list( - line = list(color = chart.theme()$bull_color, width = 3 - 1.75), - fillcolor = chart.theme()$bull_color - ), - decreasing = list( - line = list(color = chart.theme()$bear_color, width = 3 - 1.75), - fillcolor = chart.theme()$bear_color - ), - ... - ) +chart.default <- function( + x, + type = "candlestick", + ...) { + ## default chart function + ## + ## The chart function works as an initializer + ## for the downstream indicator function calls + ## + ## There are three chart lists: + ## 1. main: The candlestick/bar chart. This is where all + ## all indicators that are charted on the candlestick + ## lives alongside the pricechart itself. + ## 2. sub: A list of indicators. This is where all indicators + ## that are charted below the main chart lives. For example + ## RSI, MACD etc. + ## 3. chart: The user-facing TA chart. + ## This is empty and is constructed on the fly + ## via plotly::subplot. + .color_values <- chart.theme() + .plotting_environment$sub <- .plotting_environment$chart <- list() + + ## convert input to data.frame object + ## and store in the .plotting_environment + ## to avoid having to pass OHLC on every call + ## + ## NOTE: it is also a hard requirement on + ## {plotly} side + .plotting_environment$x <- data_frame <- as.data.frame(x); - ## 2) store in environment - ## to enable chart() call - .plotting_environment$main <- .chart_layout( - x = kline_chart, - title_text = sprintf( - "Ticker: %s
Period: %s", - deparse(substitute(x)), - "Period Value" + ## generate price chart + ## based on type. can be either + ## candlestick or barchart. + ## + ## TODO: Consider adding the option to use price series + ## instead of OHLC. + assert(is.character(type) && length(type) == 1) + assert(type %in% c("candlestick", "ohlc")) + + price_chart <- plotly::plot_ly( + data = data_frame, + type = type, + open = ~open, close = ~close, high = ~high, low = ~low, + + ## colors of bullish + ## and bearish candles/bars + ## + ## NOTE: if fillcolor is NULL + ## the candles are hollow. + ## If there is eventual demand this can be changed + increasing = list( + line = list( + color = .color_values$bull_color, + width = 3 - 1.75 + ), + fillcolor = plotly::toRGB( + x = .color_values$bull_color, + alpha = 1 ## This should be controlled from .chart_theme() + ) + ), + decreasing = list( + line = list( + color = .color_values$bear_color, + width = 3 - 1.75 + ), + + fillcolor = plotly::toRGB( + x = .color_values$bear_color, + alpha = 1 ## This should be controlled from .chart_theme() + ) + ), + ... ) - ) - - ## subplot list - .plotting_environment$sub <- list() # list(), not a plotly or other type -.plotting_environment$chart <- NULL - - - ## 3) add plot counter - ## for subplots - .plotting_environment$plot_counter <- 1 + ## store in main chart + ## (see description) + .plotting_environment$main <- .chart_layout( + x = price_chart, + title_text = sprintf( + "Ticker: %s
Period: %s", + deparse(substitute(x)), + "Period Value" + ) + ) - .plotting_environment$main - + .plotting_environment$main } #' @export From 3cbc69dc0d98965fedd4ffde0fc4703c5c86592e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 09:56:21 +0200 Subject: [PATCH 065/166] :hammer: Chart function * The indicators can now be plotted independently of the main charts. Most of the related indicators are broken at the moment. This commit is a "checkpoint" --- R/chart.R | 227 ++++++++++++++++++++++++++++++++++------------------- R/ta_SMA.R | 4 +- 2 files changed, 150 insertions(+), 81 deletions(-) diff --git a/R/chart.R b/R/chart.R index 25fb24969..2ce632c83 100644 --- a/R/chart.R +++ b/R/chart.R @@ -104,108 +104,177 @@ indicator <- function( .var, ...) { + ## Indicator function + ## + ## Description + ## This function is essentially a wrapper + ## of model.matrix, model.frame and various indicator + ## functions in TA-lib. + ## + ## Argument + ## .f: The indicator function. Eg. talib::SMA() + ## .var: A formula indicating which variables (and data, optionally) + ## to pass into .f + ## ...: Additional arguments passed into model.matrix and model.frame + ## + ## NOTE: The function "works" and does what it is supposed to do. + ## but it needs some serious refactoring and modularization. parent_frame <- parent.frame() - passed_formula <- eval.parent(substitute(.var)) - - if (!inherits(passed_formula, "formula")) { - stop("`.var` must be a formula.", call. = FALSE) - } + ## parse and check formula + passed_formula <- eval.parent( + substitute(.var) + ) + assert(inherits(passed_formula, "formula")) environment(passed_formula) <- parent_frame - f_expr <- substitute(.f) - pre_args <- list() - if (is.call(f_expr)) { - head <- f_expr[[1L]] + ## resolve indicator function + ## allows for indicators + ## outside of {talib} provided the function has a .plotly + ## method. This might be a bad idea at this stage, and at any + ## stage really as {talib} can be added to the dependency list + ## for dispatching. + ## + ## TODO: Consider rewriting this section. It works but + ## at what cost? + .f_expression <- substitute(.f); pre_args <- list() + + if (!is.call(.f_expression)) { + ## fallback value + f <- match.fun(eval.parent(substitute(.f))) + } + + if (is.call(.f_expression)) { + + ## get expression + head <- .f_expression[[1L]] + if (is.symbol(head)) { - f <- get(as.character(head), envir = parent_frame, mode = "function") - } else if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { - pkg <- as.character(head[[2L]]); fun <- as.character(head[[3L]]) - f <- if (as.character(head[[1L]]) == "::") - getExportedValue(pkg, fun) else get(fun, envir = asNamespace(pkg), mode = "function") + + f <- get( + x = as.character(head), + envir = parent_frame, + mode = "function" + ) + } else { - f <- eval(head, envir = parent_frame) + + if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { + + pkg <- as.character(head[[2L]]); fun <- as.character(head[[3L]]) + + f <- if (as.character(head[[1L]]) == "::") { + getExportedValue(pkg, fun) + } else { + get(fun, envir = asNamespace(pkg), mode = "function") + } + + } else { + + f <- eval(head, envir = parent_frame) + + } + } - pre_args <- as.list(f_expr)[-1L] - } else { - f <- match.fun(eval.parent(substitute(.f))) + + pre_args <- as.list(.f_expression)[-1L] + + } + ## resolve arguments + dots_mf <- as.list( + substitute(list(...)) + )[-1L] - dots_mf <- as.list(substitute(list(...)))[-1L] + ## check if data has been passed + ## extract if not + elt_names <- names(dots_mf) + if (is.null(elt_names)) { + elt_names <- rep("", length(dots_mf)) + } - dn <- names(dots_mf); if (is.null(dn)) dn <- rep("", length(dots_mf)) - if (!("data" %in% dn)) { - pe <- get0(".plotting_environment", inherits = TRUE) - if (!is.null(pe) && !is.null(pe$x)) { - dots_mf$data <- pe$x # <<< pass the actual data.frame - } else if (!is.null(pe) && !is.null(pe$data)) { - dots_mf$data <- pe$data - } else { - stop("No `data` provided and no active chart data found. Call chart(...) first.", call. = FALSE) + if (!("data" %in% elt_names)) { + ## get the plotting environment + ## temporarily and extract the data + .env <- get0(".plotting_environment", inherits = TRUE) + + if (is.null(.env) || is.null(.env$x)) { + stop( + "No 'data' provided bla bla." + ) } - } - ## model frame - mf <- do.call( + dots_mf$data <- .env$x + + } + + ## resolve series + ## based on formula + ## was mf + series <- do.call( what = model.frame, args = c(list(formula = passed_formula), dots_mf), envir = parent_frame ) - mm_dots <- dots_mf[intersect(names(dots_mf), c("contrasts", "xlev"))] - mm <- do.call(model.matrix, c(list(object = passed_formula, data = mf), mm_dots), envir = parent_frame) - - if (!is.null(colnames(mm)) && "(Intercept)" %in% colnames(mm)) { - mm <- mm[, setdiff(colnames(mm), "(Intercept)"), drop = FALSE] - } - - series <- if (NCOL(mm) == 1L) { - as.numeric(mm[, 1L]) - } else { - mm - } + ## get plotting environment + .plotting_environment <- get0( + x = ".plotting_environment", + inherits = TRUE + ) - ## 6) fetch active plotly object (first arg for S3) - .plotting_environment <- get0(".plotting_environment", inherits = TRUE) if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { - stop("No active plotly chart. Call chart(...) first.", call. = FALSE) + ## if there is no main plot + ## we construct an empty plot to display only + .plotting_environment$main <- .chart_layout( + x = plotly::plotly_empty(), + title_text = "fisk" + ) + } - + + ## extract plto .plot <- .plotting_environment$main - .output <- do.call(f, c(list(.plot), pre_args, list(.series = series)), envir = parent_frame) - -if (inherits(.output, "plotly")) { - # Build a flat panel list - panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - - # HARD CHECKS: every element must be a plotly htmlwidget - is_plotly <- vapply(panels, function(p) inherits(p, "plotly"), logical(1)) - if (!all(is_plotly)) { - bad <- which(!is_plotly) - stop(sprintf("Non-plotly passed to subplot at index/indices: %s", - paste(bad, collapse = ", ")), call. = FALSE) - } - - k <- length(panels) - h_main <- 0.70 - heights <- if (k > 1) c(h_main, rep((1 - h_main)/(k - 1), k - 1)) else 1 - - # IMPORTANT: pass ONLY the panels as the first argument; - # layout args follow, so none of them can be mis-parsed as plots - fig <- plotly::subplot( - panels, - nrows = k, - shareX = TRUE, - margin = 0.02, - heights = heights - ) - - .plotting_environment$chart <- fig - return(fig) -} + .output <- do.call( + f, + c(list(.plot), + pre_args, + list(.series = series)), + envir = parent_frame + ) + + if (inherits(.output, "plotly")) { + # Build a flat panel list + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) -.output + # HARD CHECKS: every element must be a plotly htmlwidget + is_plotly <- vapply(panels, function(p) inherits(p, "plotly"), logical(1)) + if (!all(is_plotly)) { + bad <- which(!is_plotly) + stop(sprintf("Non-plotly passed to subplot at index/indices: %s", + paste(bad, collapse = ", ")), call. = FALSE) + } + + k <- length(panels) + h_main <- getOption("talib.chart.main", default = 0.7) + heights <- if (k > 1) c(h_main, rep((1 - h_main)/(k - 1), k - 1)) else 1 + + # IMPORTANT: pass ONLY the panels as the first argument; + # layout args follow, so none of them can be mis-parsed as plots + fig <- plotly::subplot( + panels, + nrows = k, + shareX = TRUE, + margin = 0.02, + heights = heights + ) + + .plotting_environment$chart <- fig + return(fig) + } + + .output } \ No newline at end of file diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 35bbf9c32..de7dd0ea1 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -59,9 +59,9 @@ SMA <- simple_moving_average #' @export simple_moving_average.plotly <- function(x, n = 10, ...) { dots <- list(...) - series <- dots$.series + series <- dots$.series[,1L] - sma <- .Call("impl_ta_MA", series, as.integer(n), 0L) + sma <- .Call("impl_ta_MA", as.double(series), as.integer(n), 0L) df <- data.frame( idx = seq_along(sma), From 81aed0b06abff0b4eada35adbffdc8a473de32fe Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 10:09:05 +0200 Subject: [PATCH 066/166] :hammer: Indicators in own script --- R/chart.R | 181 -------------------------------------------- R/chart_indicator.R | 180 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+), 181 deletions(-) create mode 100644 R/chart_indicator.R diff --git a/R/chart.R b/R/chart.R index 2ce632c83..be642ecb4 100644 --- a/R/chart.R +++ b/R/chart.R @@ -97,184 +97,3 @@ chart.default <- function( .plotting_environment$main } - -#' @export -indicator <- function( - .f, - .var, - ...) { - - ## Indicator function - ## - ## Description - ## This function is essentially a wrapper - ## of model.matrix, model.frame and various indicator - ## functions in TA-lib. - ## - ## Argument - ## .f: The indicator function. Eg. talib::SMA() - ## .var: A formula indicating which variables (and data, optionally) - ## to pass into .f - ## ...: Additional arguments passed into model.matrix and model.frame - ## - ## NOTE: The function "works" and does what it is supposed to do. - ## but it needs some serious refactoring and modularization. - parent_frame <- parent.frame() - - ## parse and check formula - passed_formula <- eval.parent( - substitute(.var) - ) - - assert(inherits(passed_formula, "formula")) - environment(passed_formula) <- parent_frame - - ## resolve indicator function - ## allows for indicators - ## outside of {talib} provided the function has a .plotly - ## method. This might be a bad idea at this stage, and at any - ## stage really as {talib} can be added to the dependency list - ## for dispatching. - ## - ## TODO: Consider rewriting this section. It works but - ## at what cost? - .f_expression <- substitute(.f); pre_args <- list() - - if (!is.call(.f_expression)) { - ## fallback value - f <- match.fun(eval.parent(substitute(.f))) - } - - if (is.call(.f_expression)) { - - ## get expression - head <- .f_expression[[1L]] - - if (is.symbol(head)) { - - f <- get( - x = as.character(head), - envir = parent_frame, - mode = "function" - ) - - } else { - - if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { - - pkg <- as.character(head[[2L]]); fun <- as.character(head[[3L]]) - - f <- if (as.character(head[[1L]]) == "::") { - getExportedValue(pkg, fun) - } else { - get(fun, envir = asNamespace(pkg), mode = "function") - } - - } else { - - f <- eval(head, envir = parent_frame) - - } - - } - - pre_args <- as.list(.f_expression)[-1L] - - - } - - ## resolve arguments - dots_mf <- as.list( - substitute(list(...)) - )[-1L] - - ## check if data has been passed - ## extract if not - elt_names <- names(dots_mf) - if (is.null(elt_names)) { - elt_names <- rep("", length(dots_mf)) - } - - if (!("data" %in% elt_names)) { - ## get the plotting environment - ## temporarily and extract the data - .env <- get0(".plotting_environment", inherits = TRUE) - - if (is.null(.env) || is.null(.env$x)) { - stop( - "No 'data' provided bla bla." - ) - } - - dots_mf$data <- .env$x - - } - - ## resolve series - ## based on formula - ## was mf - series <- do.call( - what = model.frame, - args = c(list(formula = passed_formula), dots_mf), - envir = parent_frame - ) - - ## get plotting environment - .plotting_environment <- get0( - x = ".plotting_environment", - inherits = TRUE - ) - - if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { - ## if there is no main plot - ## we construct an empty plot to display only - .plotting_environment$main <- .chart_layout( - x = plotly::plotly_empty(), - title_text = "fisk" - ) - - } - - ## extract plto - .plot <- .plotting_environment$main - - .output <- do.call( - f, - c(list(.plot), - pre_args, - list(.series = series)), - envir = parent_frame - ) - - if (inherits(.output, "plotly")) { - # Build a flat panel list - panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - - # HARD CHECKS: every element must be a plotly htmlwidget - is_plotly <- vapply(panels, function(p) inherits(p, "plotly"), logical(1)) - if (!all(is_plotly)) { - bad <- which(!is_plotly) - stop(sprintf("Non-plotly passed to subplot at index/indices: %s", - paste(bad, collapse = ", ")), call. = FALSE) - } - - k <- length(panels) - h_main <- getOption("talib.chart.main", default = 0.7) - heights <- if (k > 1) c(h_main, rep((1 - h_main)/(k - 1), k - 1)) else 1 - - # IMPORTANT: pass ONLY the panels as the first argument; - # layout args follow, so none of them can be mis-parsed as plots - fig <- plotly::subplot( - panels, - nrows = k, - shareX = TRUE, - margin = 0.02, - heights = heights - ) - - .plotting_environment$chart <- fig - return(fig) - } - - .output -} \ No newline at end of file diff --git a/R/chart_indicator.R b/R/chart_indicator.R new file mode 100644 index 000000000..8a965486f --- /dev/null +++ b/R/chart_indicator.R @@ -0,0 +1,180 @@ +#' @export +indicator <- function( + .f, + .var, + ...) { + + ## Indicator function + ## + ## Description + ## This function is essentially a wrapper + ## of model.matrix, model.frame and various indicator + ## functions in TA-lib. + ## + ## Argument + ## .f: The indicator function. Eg. talib::SMA() + ## .var: A formula indicating which variables (and data, optionally) + ## to pass into .f + ## ...: Additional arguments passed into model.matrix and model.frame + ## + ## NOTE: The function "works" and does what it is supposed to do. + ## but it needs some serious refactoring and modularization. + parent_frame <- parent.frame() + + ## parse and check formula + passed_formula <- eval.parent( + substitute(.var) + ) + + assert(inherits(passed_formula, "formula")) + environment(passed_formula) <- parent_frame + + ## resolve indicator function + ## allows for indicators + ## outside of {talib} provided the function has a .plotly + ## method. This might be a bad idea at this stage, and at any + ## stage really as {talib} can be added to the dependency list + ## for dispatching. + ## + ## TODO: Consider rewriting this section. It works but + ## at what cost? + .f_expression <- substitute(.f); pre_args <- list() + + if (!is.call(.f_expression)) { + ## fallback value + f <- match.fun(eval.parent(substitute(.f))) + } + + if (is.call(.f_expression)) { + + ## get expression + head <- .f_expression[[1L]] + + if (is.symbol(head)) { + + f <- get( + x = as.character(head), + envir = parent_frame, + mode = "function" + ) + + } else { + + if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { + + pkg <- as.character(head[[2L]]); fun <- as.character(head[[3L]]) + + f <- if (as.character(head[[1L]]) == "::") { + getExportedValue(pkg, fun) + } else { + get(fun, envir = asNamespace(pkg), mode = "function") + } + + } else { + + f <- eval(head, envir = parent_frame) + + } + + } + + pre_args <- as.list(.f_expression)[-1L] + + + } + + ## resolve arguments + dots_mf <- as.list( + substitute(list(...)) + )[-1L] + + ## check if data has been passed + ## extract if not + elt_names <- names(dots_mf) + if (is.null(elt_names)) { + elt_names <- rep("", length(dots_mf)) + } + + if (!("data" %in% elt_names)) { + ## get the plotting environment + ## temporarily and extract the data + .env <- get0(".plotting_environment", inherits = TRUE) + + if (is.null(.env) || is.null(.env$x)) { + stop( + "No 'data' provided bla bla." + ) + } + + dots_mf$data <- .env$x + + } + + ## resolve series + ## based on formula + ## was mf + series <- do.call( + what = model.frame, + args = c(list(formula = passed_formula), dots_mf), + envir = parent_frame + ) + + ## get plotting environment + .plotting_environment <- get0( + x = ".plotting_environment", + inherits = TRUE + ) + + if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { + ## if there is no main plot + ## we construct an empty plot to display only + .plotting_environment$main <- .chart_layout( + x = plotly::plotly_empty(), + title_text = "fisk" + ) + + } + + ## extract plto + .plot <- .plotting_environment$main + + .output <- do.call( + f, + c(list(.plot), + pre_args, + list(.series = series)), + envir = parent_frame + ) + + if (inherits(.output, "plotly")) { + # Build a flat panel list + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) + + # HARD CHECKS: every element must be a plotly htmlwidget + is_plotly <- vapply(panels, function(p) inherits(p, "plotly"), logical(1)) + if (!all(is_plotly)) { + bad <- which(!is_plotly) + stop(sprintf("Non-plotly passed to subplot at index/indices: %s", + paste(bad, collapse = ", ")), call. = FALSE) + } + + k <- length(panels) + h_main <- getOption("talib.chart.main", default = 0.7) + heights <- if (k > 1) c(h_main, rep((1 - h_main)/(k - 1), k - 1)) else 1 + + # IMPORTANT: pass ONLY the panels as the first argument; + # layout args follow, so none of them can be mis-parsed as plots + fig <- plotly::subplot( + panels, + nrows = k, + shareX = TRUE, + margin = 0.02, + heights = heights + ) + + .plotting_environment$chart <- fig + return(fig) + } + + .output +} \ No newline at end of file From 4b760dc018f4e0e0236dda3956b8d0dcaf564c2b Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 10:54:58 +0200 Subject: [PATCH 067/166] :hammer: Expanded indicator * The indicator is now more clean * The indicator supports solo calls --- R/chart_indicator.R | 398 ++++++++++++++++++++++++++------------------ 1 file changed, 238 insertions(+), 160 deletions(-) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 8a965486f..5a462b151 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,180 +1,258 @@ #' @export indicator <- function( - .f, - .var, - ...) { - - ## Indicator function - ## - ## Description - ## This function is essentially a wrapper - ## of model.matrix, model.frame and various indicator - ## functions in TA-lib. - ## - ## Argument - ## .f: The indicator function. Eg. talib::SMA() - ## .var: A formula indicating which variables (and data, optionally) - ## to pass into .f - ## ...: Additional arguments passed into model.matrix and model.frame - ## - ## NOTE: The function "works" and does what it is supposed to do. - ## but it needs some serious refactoring and modularization. - parent_frame <- parent.frame() - - ## parse and check formula - passed_formula <- eval.parent( - substitute(.var) - ) - - assert(inherits(passed_formula, "formula")) - environment(passed_formula) <- parent_frame - - ## resolve indicator function - ## allows for indicators - ## outside of {talib} provided the function has a .plotly - ## method. This might be a bad idea at this stage, and at any - ## stage really as {talib} can be added to the dependency list - ## for dispatching. - ## - ## TODO: Consider rewriting this section. It works but - ## at what cost? - .f_expression <- substitute(.f); pre_args <- list() - - if (!is.call(.f_expression)) { - ## fallback value - f <- match.fun(eval.parent(substitute(.f))) - } - - if (is.call(.f_expression)) { - - ## get expression - head <- .f_expression[[1L]] - - if (is.symbol(head)) { - - f <- get( - x = as.character(head), - envir = parent_frame, - mode = "function" - ) - - } else { - - if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { - - pkg <- as.character(head[[2L]]); fun <- as.character(head[[3L]]) - - f <- if (as.character(head[[1L]]) == "::") { - getExportedValue(pkg, fun) - } else { - get(fun, envir = asNamespace(pkg), mode = "function") - } + .f, + .var, + ... +) { + ## Indicator function + ## + ## Description + ## This function is essentially a wrapper + ## of model.matrix, model.frame and various indicator + ## functions in TA-lib. + ## + ## Argument + ## .f: The indicator function. Eg. talib::SMA() + ## .var: A formula indicating which variables (and data, optionally) + ## to pass into .f + ## ...: Additional arguments passed into model.matrix and model.frame + ## + ## NOTE: The function "works" and does what it is supposed to do. + ## but it needs some serious refactoring and modularization. + parent_frame <- parent.frame() + + ## parse and check formula + passed_formula <- eval.parent( + substitute(.var) + ) + + assert(inherits(passed_formula, "formula")) + environment(passed_formula) <- parent_frame + + ## resolve indicator function + ## allows for indicators + ## outside of {talib} provided the function has a .plotly + ## method. This might be a bad idea at this stage, and at any + ## stage really as {talib} can be added to the dependency list + ## for dispatching. + ## + ## TODO: Consider rewriting this section. It works but + ## at what cost? + .f_expression <- substitute(.f) + pre_args <- list() + + if (!is.call(.f_expression)) { + ## fallback value + f <- match.fun(eval.parent(substitute(.f))) + } + + if (is.call(.f_expression)) { + ## get expression + head <- .f_expression[[1L]] + + if (is.symbol(head)) { + f <- get( + x = as.character(head), + envir = parent_frame, + mode = "function" + ) + } else { + if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { + pkg <- as.character(head[[2L]]) + fun <- as.character(head[[3L]]) + f <- if (as.character(head[[1L]]) == "::") { + getExportedValue(pkg, fun) } else { - - f <- eval(head, envir = parent_frame) - + get(fun, envir = asNamespace(pkg), mode = "function") } - + } else { + f <- eval(head, envir = parent_frame) } - - pre_args <- as.list(.f_expression)[-1L] - - } - ## resolve arguments - dots_mf <- as.list( - substitute(list(...)) - )[-1L] - - ## check if data has been passed - ## extract if not - elt_names <- names(dots_mf) - if (is.null(elt_names)) { - elt_names <- rep("", length(dots_mf)) + pre_args <- as.list(.f_expression)[-1L] + } + + ## resolve arguments + dots_mf <- as.list( + substitute(list(...)) + )[-1L] + + ## check if data has been passed + ## extract if not + elt_names <- names(dots_mf) + if (is.null(elt_names)) { + elt_names <- rep("", length(dots_mf)) + } + + if (!("data" %in% elt_names)) { + ## get the plotting environment + ## temporarily and extract the data + .env <- get0(".plotting_environment", inherits = TRUE) + + if (is.null(.env) || is.null(.env$x)) { + stop( + "No 'data' provided bla bla." + ) } - if (!("data" %in% elt_names)) { - ## get the plotting environment - ## temporarily and extract the data - .env <- get0(".plotting_environment", inherits = TRUE) - - if (is.null(.env) || is.null(.env$x)) { - stop( - "No 'data' provided bla bla." - ) - } + dots_mf$data <- .env$x + } + + ## construct series + ## based on .var + ## + ## NOTE: The series is passed + ## as a data.frame to dispacther + ## disected, calculate indicator + ## then converted to a data.frame again + # + ## This is not optimal. + series <- do.call( + what = model.frame, + args = c(list(formula = passed_formula), dots_mf), + envir = parent_frame + ) + + ## get plotting environment + .plotting_environment <- get0( + x = ".plotting_environment", + inherits = TRUE + ) + + if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { + ## if there is no main plot + ## we construct an empty plot to display only + .plotting_environment$main <- .chart_layout( + x = plotly::plotly_empty(), + title_text = "fisk" + ) + } + + ## resolve plotting the + ## indicator and determine + ## functions + .plot <- .plotting_environment$main + + .output <- do.call( + what = f, + args = c( + ## first argument + ## for S3 dispatching + list(.plot), + + ## args for the indicator + ## function itself + pre_args, + + ## the series passed + ## via ellipsis + list(.series = series) + ), + + envir = parent_frame + ) + + ## handle plotly object + ## safely and securely + if (inherits(.output, "plotly")) { + ## construct panel + ## list for the subplots + panels <- c( + ## main panel + list(.plotting_environment$main), + ## sub panel + .plotting_environment$sub + ) - dots_mf$data <- .env$x + ## check for shenanigans + ## of some sort + is_plotly <- vapply( + X = panels, + FUN = function(p) inherits(p, "plotly"), + FUN.VALUE = logical(1) + ) - } + assert( + all(is_plotly) + ) - ## resolve series - ## based on formula - ## was mf - series <- do.call( - what = model.frame, - args = c(list(formula = passed_formula), dots_mf), - envir = parent_frame + # if (!all(is_plotly)) { + # bad <- which(!is_plotly) + # stop( + # sprintf( + # "Non-plotly passed to subplot at index/indices: %s", + # paste(bad, collapse = ", ") + # ), + # call. = FALSE + # ) + # } + + ## construct subplot + ## based on existing environment + ## + ## NOTE: this was originally + ## handled via dispatchers + ## but everything is rebuilt + ## recursively, so it makes better + ## sense to just "handle it here" + number_of_panels <- length(panels) + main_panel_height <- getOption( + "talib.chart.main", + default = 0.7 ) - - ## get plotting environment - .plotting_environment <- get0( - x = ".plotting_environment", - inherits = TRUE - ) - if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { - ## if there is no main plot - ## we construct an empty plot to display only - .plotting_environment$main <- .chart_layout( - x = plotly::plotly_empty(), - title_text = "fisk" + heights <- if (number_of_panels > 1) { + ## calculate divisor + ## also used for lenght.out + ## values + divisor <- number_of_panels - 1 + + c( + main_panel_height, + rep( + x = (1 - main_panel_height) / (divisor), + divisor + ) ) - + } else { + ## The main panel will + ## be the entire thing + ## if only one panel is passed + 1 } - - ## extract plto - .plot <- .plotting_environment$main - - .output <- do.call( - f, - c(list(.plot), - pre_args, - list(.series = series)), - envir = parent_frame - ) - - if (inherits(.output, "plotly")) { - # Build a flat panel list - panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - - # HARD CHECKS: every element must be a plotly htmlwidget - is_plotly <- vapply(panels, function(p) inherits(p, "plotly"), logical(1)) - if (!all(is_plotly)) { - bad <- which(!is_plotly) - stop(sprintf("Non-plotly passed to subplot at index/indices: %s", - paste(bad, collapse = ", ")), call. = FALSE) - } - k <- length(panels) - h_main <- getOption("talib.chart.main", default = 0.7) - heights <- if (k > 1) c(h_main, rep((1 - h_main)/(k - 1), k - 1)) else 1 - - # IMPORTANT: pass ONLY the panels as the first argument; - # layout args follow, so none of them can be mis-parsed as plots - fig <- plotly::subplot( - panels, - nrows = k, - shareX = TRUE, - margin = 0.02, - heights = heights - ) + ## construct the subplot + ## sequentially + ## + ## NOTE: Additional options and + ## configurations could be passed + ## here + fig <- plotly::subplot( + panels, + nrows = k, + shareX = TRUE, + margin = 0.02, + heights = heights + ) - .plotting_environment$chart <- fig - return(fig) - } - + ## at this stage it is unclear + ## whether .$chart is actually needed + ## because plotly is a b*tch to work with + ## when it comes to subplots. + ## + ## TODO: Check if its possible to "update" + ## the charts incrementally. Might be something that + ## can be done downstream + .plotting_environment$chart <- fig + + return(fig) + } + + ## fallback to cases + ## where it is NOT a plotly + ## object. For development purposes + ## mainly. .output -} \ No newline at end of file +} From 2c4e50897d42fbfb540bfb2a09317f15d33e2803 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 12:58:28 +0200 Subject: [PATCH 068/166] :hammer: Updated assert * The assert function is now a single test - Added default messages for backwards compatiblity --- R/utils.R | 91 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 30 deletions(-) diff --git a/R/utils.R b/R/utils.R index 25e60ee38..cda05bf1a 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,50 +1,71 @@ ## script: utilities -assert <- function(exprs) { - eval.parent( - substitute(stopifnot(exprs = exprs)) - ) +assert <- function(x, ...) { + ## Assert truthfulness + ## of x + condition <- x + if (!condition) { + if (...length() == 0) { + stop("Assertion failed", call. = FALSE) + } else { + stop(..., call. = FALSE) } + } -flatten <- function(x) { + return( + invisible(TRUE) + ) +} - if (!inherits(x, "list")) +flatten <- function(x) { + if (!inherits(x, "list")) { list(x) - else + } else { unlist(c(lapply(x, flatten)), recursive = FALSE) + } } ## extractors -.open <- function(x) {x[,1]} -.high <- function(x) {x[,2]} -.low <- function(x) {x[,3]} -.close <- function(x) {x[,4]} -.volume <- function(x) {x[,5]} +.open <- function(x) { + x[, 1] +} +.high <- function(x) { + x[, 2] +} +.low <- function(x) { + x[, 3] +} +.close <- function(x) { + x[, 4] +} +.volume <- function(x) { + x[, 5] +} ## map MAs map_maType_call <- function(call_expr) { - args <- as.list(call_expr)[-1L] - head_chr <- as.character(call_expr[[1L]]) - fun_name <- tail(head_chr, 1L) + args <- as.list(call_expr)[-1L] + head_chr <- as.character(call_expr[[1L]]) + fun_name <- tail(head_chr, 1L) maType <- switch( fun_name, - SMA = 0L, - EMA = 1L, - WMA = 2L, - DEMA = 3L, - TEMA = 4L, - TRIMA = 5L, - KAMA = 6L, - MAMA = 7L, - T3 = 8L, + SMA = 0L, + EMA = 1L, + WMA = 2L, + DEMA = 3L, + TEMA = 4L, + TRIMA = 5L, + KAMA = 6L, + MAMA = 7L, + T3 = 8L, stop(sprintf("Unknown MA type: %s", fun_name)) ) n_val <- args[["n"]] list( - n = as.integer(n_val), + n = as.integer(n_val), maType = maType ) } @@ -55,7 +76,9 @@ is.number <- function(x) { .unwrap_meta <- function(expr, env) { repeat { - if (!is.call(expr)) break + if (!is.call(expr)) { + break + } head <- expr[[1L]] if (is.symbol(head) && as.character(head) %in% c("substitute", "quote")) { expr <- eval(expr, envir = env, enclos = env) @@ -68,9 +91,14 @@ is.number <- function(x) { .is_ma_spec <- function(expr, env) { expr1 <- .unwrap_meta(expr, env) - if (is.call(expr1)) return(TRUE) + if (is.call(expr1)) { + return(TRUE) + } if (is.symbol(expr1)) { - v <- try(get(as.character(expr1), envir = env, inherits = TRUE), silent = TRUE) + v <- try( + get(as.character(expr1), envir = env, inherits = TRUE), + silent = TRUE + ) return(!inherits(v, "try-error") && is.language(v)) } FALSE @@ -79,7 +107,9 @@ is.number <- function(x) { # Normalize one MA argument to a CALL, without forcing promises. .normalize_ma_arg_expr <- function(expr, env) { expr1 <- .unwrap_meta(expr, env) - if (is.call(expr1)) return(expr1) + if (is.call(expr1)) { + return(expr1) + } if (is.symbol(expr1)) { v <- get(as.character(expr1), envir = env, inherits = TRUE) if (is.language(v)) return(v) @@ -91,8 +121,9 @@ is.number <- function(x) { .eval_int <- function(expr, env) { expr1 <- .unwrap_meta(expr, env) v <- eval(expr1, envir = env, enclos = env) - if (!is.number(v) || length(v) != 1L || !is.finite(v)) + if (!is.number(v) || length(v) != 1L || !is.finite(v)) { stop("fast/slow/signal must be finite numeric scalars.", call. = FALSE) + } as.integer(v) } From 34df9fbf806eac82b0e4c3869d8e6c47be4971b9 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:29:34 +0200 Subject: [PATCH 069/166] :hammer: Updated SMA * The simple_moving_average have been removed. - This is going to be the case everywhere I think. --- NAMESPACE | 5 +- R/ta_SMA.R | 104 +++++++++--------- man/SMA.Rd | 7 ++ ...simple_moving_average.Rd => SMA.plotly.Rd} | 9 +- man/simple_moving_average.default.Rd | 11 -- man/simple_moving_average.plotly.Rd | 11 -- 6 files changed, 62 insertions(+), 85 deletions(-) rename man/{simple_moving_average.Rd => SMA.plotly.Rd} (57%) delete mode 100644 man/simple_moving_average.default.Rd delete mode 100644 man/simple_moving_average.plotly.Rd diff --git a/NAMESPACE b/NAMESPACE index cbb955ca4..87fba9335 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,7 @@ # Generated by roxygen2: do not edit by hand +S3method(SMA,default) +S3method(SMA,plotly) S3method(acceleration_bands,default) S3method(aroon,default) S3method(aroon_oscillator,default) @@ -26,8 +28,6 @@ S3method(mesa_adaptive_moving_average,default) S3method(moving_average_convergence_divergence,default) S3method(relative_strength_index,default) S3method(relative_strength_index,plotly) -S3method(simple_moving_average,default) -S3method(simple_moving_average,plotly) S3method(stochastic,default) S3method(stochastic_relative_strength_index,default) S3method(t3_moving_average,default) @@ -82,7 +82,6 @@ export(kaufman_adaptive_moving_average) export(mesa_adaptive_moving_average) export(moving_average_convergence_divergence) export(relative_strength_index) -export(simple_moving_average) export(stochastic) export(stochastic_relative_strength_index) export(t3_moving_average) diff --git a/R/ta_SMA.R b/R/ta_SMA.R index de7dd0ea1..15a543e3d 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -1,67 +1,62 @@ #' @title Simple Moving Average (SMA) -#' +#' #' @description #' A short description... -#' -#' @param x fisk -#' +#' +#' @param x A univariate series. +#' @param n An [integer] of [length] 1. The window size of the rolling average. +#' @param ... Parameters passed to and from other methods. +#' #' @export -simple_moving_average <- function(x, n = 10, ...) { - UseMethod( - "simple_moving_average" - ) +SMA <- function(x, n = 10, ...) { + UseMethod( + "SMA" + ) } -#' @title Simple Moving Average (SMA) -#' -#' @description -#' A short description... -#' #' @export -simple_moving_average.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow +SMA.default <- function(x, n = 10, ...) { + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)); assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a vector") + } + assert(is.number(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 0L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) } #' @title Simple Moving Average (SMA) -#' -#' @description -#' A short description... -#' -#' @export -SMA <- simple_moving_average - -#' @title Simple Moving Average (SMA) -#' +#' #' @description #' A short description... -#' +#' #' @export -simple_moving_average.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series[,1L] +SMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series[, 1L] - sma <- .Call("impl_ta_MA", as.double(series), as.integer(n), 0L) + sma <- .Call( + "impl_ta_MA", + as.double(series), + as.integer(n), + 0L + ) df <- data.frame( idx = seq_along(sma), @@ -70,15 +65,16 @@ simple_moving_average.plotly <- function(x, n = 10, ...) { .plotting_environment$main <- plotly::add_trace( x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, y = ~sma, # refer to columns, not objects in caller env - type = "scatter", mode = "lines", + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~sma, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", name = sprintf("SMA(%d)", n), inherit = FALSE, - xaxis = "x", yaxis = "y" # ensure it lands on the main panel + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel ) .plotting_environment$main } - - diff --git a/man/SMA.Rd b/man/SMA.Rd index 578fb0657..56eba93cf 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -6,6 +6,13 @@ \usage{ SMA(x, n = 10, ...) } +\arguments{ +\item{x}{A univariate series.} + +\item{n}{An \link{integer} of \link{length} 1. The window size of the rolling average.} + +\item{...}{Parameters passed to and from other methods.} +} \description{ A short description... } diff --git a/man/simple_moving_average.Rd b/man/SMA.plotly.Rd similarity index 57% rename from man/simple_moving_average.Rd rename to man/SMA.plotly.Rd index 20bf90907..b23be3328 100644 --- a/man/simple_moving_average.Rd +++ b/man/SMA.plotly.Rd @@ -1,13 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ta_SMA.R -\name{simple_moving_average} -\alias{simple_moving_average} +\name{SMA.plotly} +\alias{SMA.plotly} \title{Simple Moving Average (SMA)} \usage{ -simple_moving_average(x, n = 10, ...) -} -\arguments{ -\item{x}{fisk} +\method{SMA}{plotly}(x, n = 10, ...) } \description{ A short description... diff --git a/man/simple_moving_average.default.Rd b/man/simple_moving_average.default.Rd deleted file mode 100644 index 0d00e03a8..000000000 --- a/man/simple_moving_average.default.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_SMA.R -\name{simple_moving_average.default} -\alias{simple_moving_average.default} -\title{Simple Moving Average (SMA)} -\usage{ -\method{simple_moving_average}{default}(x, n = 10, ...) -} -\description{ -A short description... -} diff --git a/man/simple_moving_average.plotly.Rd b/man/simple_moving_average.plotly.Rd deleted file mode 100644 index 4f3a31319..000000000 --- a/man/simple_moving_average.plotly.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_SMA.R -\name{simple_moving_average.plotly} -\alias{simple_moving_average.plotly} -\title{Simple Moving Average (SMA)} -\usage{ -\method{simple_moving_average}{plotly}(x, n = 10, ...) -} -\description{ -A short description... -} From 58c5752174b1497e9d386d86300f463a522e2874 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:54:58 +0200 Subject: [PATCH 070/166] :books: Documentation * Added familiy to all function - Follows github TA-lib --- R/chart.R | 164 +++++++++++++++++++------------------- R/ta_ACCBANDS.R | 18 +++-- R/ta_AD.R | 6 +- R/ta_ADOSC.R | 5 +- R/ta_AROON.R | 12 ++- R/ta_AROONOSC.R | 9 ++- R/ta_BBANDS.R | 86 +++++++++++--------- R/ta_CDLDOJI.R | 3 +- R/ta_CDLDOJISTAR.R | 3 +- R/ta_CDLDRAGONFLYDOJI.R | 3 +- R/ta_CDLEVENINGDOJISTAR.R | 3 +- R/ta_DEMA.R | 12 ++- R/ta_EMA.R | 14 ++-- R/ta_HT_DCPERIOD.R | 3 +- R/ta_HT_DCPHASE.R | 3 +- R/ta_HT_PHASOR.R | 3 +- R/ta_HT_SINE.R | 3 +- R/ta_HT_TRENDLINE.R | 4 +- R/ta_HT_TRENDMODE.R | 4 +- R/ta_KAMA.R | 18 +++-- R/ta_MACD.R | 74 +++++++++-------- R/ta_MACDEXT.R | 25 +++--- R/ta_MACDFIX.R | 25 +++--- R/ta_MAMA.R | 17 ++-- R/ta_RSI.R | 58 +++++++++----- R/ta_SMA.R | 2 + R/ta_STOCH.R | 43 +++++----- R/ta_STOCHF.R | 37 +++++---- R/ta_STOCHRSI.R | 37 ++++++--- R/ta_T3.R | 18 +++-- R/ta_TEMA.R | 16 ++-- R/ta_TRIMA.R | 12 +-- R/ta_ULTOSC.R | 20 ++--- R/ta_WMA.R | 14 ++-- 34 files changed, 440 insertions(+), 334 deletions(-) diff --git a/R/chart.R b/R/chart.R index be642ecb4..2e4852263 100644 --- a/R/chart.R +++ b/R/chart.R @@ -1,99 +1,103 @@ #' @export chart <- function( - x, - type = "candlestick", - ...) { - UseMethod( - "chart" - ) + x, + type = "candlestick", + ... +) { + UseMethod( + "chart" + ) } #' @export chart.default <- function( x, type = "candlestick", - ...) { + ... +) { + ## default chart function + ## + ## The chart function works as an initializer + ## for the downstream indicator function calls + ## + ## There are three chart lists: + ## 1. main: The candlestick/bar chart. This is where all + ## all indicators that are charted on the candlestick + ## lives alongside the pricechart itself. + ## 2. sub: A list of indicators. This is where all indicators + ## that are charted below the main chart lives. For example + ## RSI, MACD etc. + ## 3. chart: The user-facing TA chart. + ## This is empty and is constructed on the fly + ## via plotly::subplot. + .color_values <- chart.theme() + .plotting_environment$sub <- .plotting_environment$chart <- list() - ## default chart function - ## - ## The chart function works as an initializer - ## for the downstream indicator function calls - ## - ## There are three chart lists: - ## 1. main: The candlestick/bar chart. This is where all - ## all indicators that are charted on the candlestick - ## lives alongside the pricechart itself. - ## 2. sub: A list of indicators. This is where all indicators - ## that are charted below the main chart lives. For example - ## RSI, MACD etc. - ## 3. chart: The user-facing TA chart. - ## This is empty and is constructed on the fly - ## via plotly::subplot. - .color_values <- chart.theme() - .plotting_environment$sub <- .plotting_environment$chart <- list() + ## convert input to data.frame object + ## and store in the .plotting_environment + ## to avoid having to pass OHLC on every call + ## + ## NOTE: it is also a hard requirement on + ## {plotly} side + .plotting_environment$x <- data_frame <- as.data.frame(x) - ## convert input to data.frame object - ## and store in the .plotting_environment - ## to avoid having to pass OHLC on every call - ## - ## NOTE: it is also a hard requirement on - ## {plotly} side - .plotting_environment$x <- data_frame <- as.data.frame(x); - - ## generate price chart - ## based on type. can be either - ## candlestick or barchart. - ## - ## TODO: Consider adding the option to use price series - ## instead of OHLC. - assert(is.character(type) && length(type) == 1) - assert(type %in% c("candlestick", "ohlc")) + ## generate price chart + ## based on type. can be either + ## candlestick or barchart. + ## + ## TODO: Consider adding the option to use price series + ## instead of OHLC. + assert(is.character(type) && length(type) == 1) + assert(type %in% c("candlestick", "ohlc")) - price_chart <- plotly::plot_ly( - data = data_frame, - type = type, - open = ~open, close = ~close, high = ~high, low = ~low, + price_chart <- plotly::plot_ly( + data = data_frame, + type = type, + open = ~open, + close = ~close, + high = ~high, + low = ~low, - ## colors of bullish - ## and bearish candles/bars - ## - ## NOTE: if fillcolor is NULL - ## the candles are hollow. - ## If there is eventual demand this can be changed - increasing = list( - line = list( - color = .color_values$bull_color, - width = 3 - 1.75 - ), - fillcolor = plotly::toRGB( - x = .color_values$bull_color, - alpha = 1 ## This should be controlled from .chart_theme() - ) + ## colors of bullish + ## and bearish candles/bars + ## + ## NOTE: if fillcolor is NULL + ## the candles are hollow. + ## If there is eventual demand this can be changed + increasing = list( + line = list( + color = .color_values$bull_color, + width = 3 - 1.75 ), - decreasing = list( - line = list( - color = .color_values$bear_color, - width = 3 - 1.75 - ), - - fillcolor = plotly::toRGB( - x = .color_values$bear_color, - alpha = 1 ## This should be controlled from .chart_theme() - ) + fillcolor = plotly::toRGB( + x = .color_values$bull_color, + alpha = 1 ## This should be controlled from .chart_theme() + ) + ), + decreasing = list( + line = list( + color = .color_values$bear_color, + width = 3 - 1.75 ), - ... - ) - ## store in main chart - ## (see description) - .plotting_environment$main <- .chart_layout( - x = price_chart, - title_text = sprintf( - "Ticker: %s
Period: %s", - deparse(substitute(x)), - "Period Value" + fillcolor = plotly::toRGB( + x = .color_values$bear_color, + alpha = 1 ## This should be controlled from .chart_theme() ) + ), + ... + ) + + ## store in main chart + ## (see description) + .plotting_environment$main <- .chart_layout( + x = price_chart, + title_text = sprintf( + "Ticker: %s
Period: %s", + deparse(substitute(x)), + "Period Value" ) + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 047828856..bb7b5070d 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -1,4 +1,7 @@ #' @title Acceleration Bands +#' +#' @family Overlap Study +#' #' @export acceleration_bands <- function(x, n = 10, ...) { UseMethod("acceleration_bands") @@ -21,15 +24,16 @@ acceleration_bands.default <- function(x, n = 10, ...) { if (!is.matrix(x)) { x <- as.matrix(x) } - assert(is.numeric(x)); assert(n >= 2); + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure + ## 1) pass `x` assuming that it + ## follows OHLC-V structure .Call( "impl_ta_ACCBANDS", - .high(x), - .low(x), - .close(x), + .high(x), + .low(x), + .close(x), as.integer(n) ) -} \ No newline at end of file +} diff --git a/R/ta_AD.R b/R/ta_AD.R index 9369247c6..f72fa3269 100644 --- a/R/ta_AD.R +++ b/R/ta_AD.R @@ -1,4 +1,8 @@ #' @title Chaikin A/D Line +#' +#' +#' @family Volume Indicator +#' #' @export chaikin_AD_line <- function(x, ...) { UseMethod( @@ -18,4 +22,4 @@ chaikin_AD_line.default <- function(x, ...) { .close(x), .volume(x) ) -} \ No newline at end of file +} diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R index 424fa233c..648f13ecf 100644 --- a/R/ta_ADOSC.R +++ b/R/ta_ADOSC.R @@ -1,4 +1,7 @@ #' @title Chaikin A/D Oscillator +#' +#' @family Volume Indicator +#' #' @export chaikin_AD_oscillator <- function(x, fast = 3, slow = 10, ...) { UseMethod( @@ -20,4 +23,4 @@ chaikin_AD_oscillator.default <- function(x, fast = 3, slow = 10, ...) { as.integer(fast), as.integer(slow) ) -} \ No newline at end of file +} diff --git a/R/ta_AROON.R b/R/ta_AROON.R index 9d6ea24e4..ba2fd720d 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -1,4 +1,9 @@ #' @title Aroon +#' +#' @description +#' +#' @family Momentum Indicator +#' #' @export aroon <- function(x, n, ...) { UseMethod( @@ -24,7 +29,6 @@ aroon.default <- function(x, n, ...) { ## 1) pass `x` assuming that ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) - .Call("impl_ta_AROON",.high(x), .low(x), as.integer(n)) -} - + ## Low (x[,3]) and Close (x[,4]) + .Call("impl_ta_AROON", .high(x), .low(x), as.integer(n)) +} diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index 888a87202..090a2713a 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -1,4 +1,7 @@ #' @title Aroon Oscillator +#' +#' @family Momentum Indicator +#' #' @export aroon_oscillator <- function(x, n, ...) { UseMethod( @@ -24,7 +27,7 @@ aroon_oscillator.default <- function(x, n, ...) { ## 1) pass `x` assuming that ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) + ## Low (x[,3]) and Close (x[,4]) - .Call("impl_ta_AROONOSC",.high(x), .low(x), as.integer(n)) -} \ No newline at end of file + .Call("impl_ta_AROONOSC", .high(x), .low(x), as.integer(n)) +} diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index d3847ba98..30c7b7545 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -1,6 +1,9 @@ #' @title Bollinger Bands +#' +#' @family Overlap Study +#' #' @export -bollinger_bands <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { +bollinger_bands <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { UseMethod( generic = "bollinger_bands" ) @@ -10,7 +13,13 @@ bollinger_bands <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { BBANDS <- bollinger_bands #' @export -bollinger_bands.default <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { +bollinger_bands.default <- function( + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ... +) { ## default behaviour is to ## coerce to a `matrix` check that ## it is double and then pass to @@ -24,11 +33,12 @@ bollinger_bands.default <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) if (!is.matrix(x)) { x <- as.matrix(x) } - assert(is.numeric(x)); assert(ma$n >= 2); + assert(is.numeric(x)) + assert(ma$n >= 2) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - .Call( + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( "impl_ta_BBANDS", x, ma$n, @@ -40,21 +50,21 @@ bollinger_bands.default <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) #' @export bollinger_bands.plotly <- function( - x, - ma = SMA(n = 10), - up = 2, - down = 2, - ...) { - + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ... +) { ma <- map_maType_call(substitute(ma)) - ## extract arguments + ## extract arguments ## from ellipsis dots <- list(...) series <- dots$.series ## extract chart objects .chart <- .plotting_environment$price_chart - .value <- .Call( + .value <- .Call( "impl_ta_BBANDS", series, ma$n, @@ -63,43 +73,43 @@ bollinger_bands.plotly <- function( as.integer(ma$maType) ) - ## constuct chart + ## constuct chart ## element - for (i in seq_len(ncol(.value))) local({ - j <- i + for (i in seq_len(ncol(.value))) { + local({ + j <- i - .plotting_environment$main <- plotly::add_lines( - .plotting_environment$main, - x = ~seq_len(nrow(.value)), - y = ~.value[, j], - inherit = FALSE,line = list( - color = '#4682b4' - ), - showlegend = FALSE, - legendgroup = 'bollinger_band', - name = c("Upper Band", "Middle Band", "Lower Band")[j], - ) - }) + .plotting_environment$main <- plotly::add_lines( + .plotting_environment$main, + x = ~ seq_len(nrow(.value)), + y = ~ .value[, j], + inherit = FALSE, + line = list( + color = '#4682b4' + ), + showlegend = FALSE, + legendgroup = 'bollinger_band', + name = c("Upper Band", "Middle Band", "Lower Band")[j], + ) + }) + } .plotting_environment$main <- plotly::add_ribbons( p = .plotting_environment$main, inherit = FALSE, - x = ~seq_len(nrow(.value)), - ymin = ~.value[,3], - ymax = ~.value[,1], + x = ~ seq_len(nrow(.value)), + ymin = ~ .value[, 3], + ymax = ~ .value[, 1], fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), line = list( - color = "transparent" + color = "transparent" ), showlegend = TRUE, legendgroup = 'bollinger_band', name = paste0( "BBand" ) - ) - - .plotting_environment$main + ) - + .plotting_environment$main } - diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index 211c77835..3da1b61db 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -1,4 +1,5 @@ #' @title Doji +#' @family Pattern Recognition #' @export doji <- function(x, ...) { UseMethod( @@ -19,4 +20,4 @@ doji.default <- function(x, ...) { .close(x), as.logical(getOption("talib.normalize", TRUE)) ) -} \ No newline at end of file +} diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index f1feddf62..45df725cc 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -1,4 +1,5 @@ #' @title Doji Star +#' @family Pattern Recognition #' @export doji_star <- function(x, ...) { UseMethod( @@ -19,4 +20,4 @@ doji_star.default <- function(x, ...) { .close(x), as.logical(getOption("talib.normalize", TRUE)) ) -} \ No newline at end of file +} diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index a574bb22b..58e4aae55 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -1,4 +1,5 @@ #' @title Dragonfly Doji +#' @family Pattern Recognition #' @export dragonfly_doji <- function(x, ...) { UseMethod( @@ -19,4 +20,4 @@ dragonfly_doji.default <- function(x, ...) { .close(x), as.logical(getOption("talib.normalize", TRUE)) ) -} \ No newline at end of file +} diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index 51a0a951c..c4021ce2f 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -1,4 +1,5 @@ #' @title Evening Doji Star +#' @family Pattern Recognition #' @export evening_doji_star <- function(x, penetration = 0.1, ...) { UseMethod( @@ -20,4 +21,4 @@ evening_doji_star.default <- function(x, penetration = 0.1, ...) { penetration, as.logical(getOption("talib.normalize", TRUE)) ) -} \ No newline at end of file +} diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index ae3364249..bd8e1f13d 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -1,4 +1,7 @@ #' @title Double Exponential Moving Average (DEMA) +#' +#' @family Overlap Study +#' #' @export double_exponential_moving_average <- function(x, n = 10, ...) { UseMethod("double_exponential_moving_average") @@ -8,7 +11,7 @@ double_exponential_moving_average <- function(x, n = 10, ...) { double_exponential_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -19,9 +22,10 @@ double_exponential_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` must be a numeric vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( "impl_ta_MA", x, @@ -31,4 +35,4 @@ double_exponential_moving_average.default <- function(x, n = 10, ...) { } #' @export -DEMA <- double_exponential_moving_average \ No newline at end of file +DEMA <- double_exponential_moving_average diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 21378f73a..49403ea3d 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -1,4 +1,5 @@ #' @title Exponential Moving Average (EMA) +#' @family Overlap Study #' @export exponential_moving_average <- function(x, n = 10, ...) { UseMethod( @@ -10,7 +11,7 @@ exponential_moving_average <- function(x, n = 10, ...) { exponential_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -21,16 +22,17 @@ exponential_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` has to be a double vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( - "impl_ta_MA", - x, + "impl_ta_MA", + x, as.integer(n), 1L ) } #' @export -EMA <- exponential_moving_average \ No newline at end of file +EMA <- exponential_moving_average diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R index 07226ef88..cfc347cd9 100644 --- a/R/ta_HT_DCPERIOD.R +++ b/R/ta_HT_DCPERIOD.R @@ -1,4 +1,5 @@ #' @title Hilbert Transform - Dominant Cycle Period +#' @family Cycle Indicator #' @export ht_dcperiod <- function(x, ...) { UseMethod("ht_dcperiod") @@ -10,4 +11,4 @@ ht_dcperiod.default <- function(x, ...) { "impl_ta_HT_DCPERIOD", as.numeric(x) ) -} \ No newline at end of file +} diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R index 15f5079ef..0a69ce2a3 100644 --- a/R/ta_HT_DCPHASE.R +++ b/R/ta_HT_DCPHASE.R @@ -1,4 +1,5 @@ #' @title Hilbert Transform - Dominant Cycle Phase +#' @family Cycle Indicator #' @export ht_dcphase <- function(x, ...) { UseMethod("ht_dcphase") @@ -10,4 +11,4 @@ ht_dcphase.default <- function(x, ...) { "impl_ta_HT_DCPHASE", as.numeric(x) ) -} \ No newline at end of file +} diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R index 5fc7f04b6..c3f28e0d6 100644 --- a/R/ta_HT_PHASOR.R +++ b/R/ta_HT_PHASOR.R @@ -1,4 +1,5 @@ #' @title Hilbert Transform - Phasor Components +#' @family Cycle Indicator #' @export ht_phasor <- function(x, ...) { UseMethod("ht_phasor") @@ -10,4 +11,4 @@ ht_phasor.default <- function(x, ...) { "impl_ta_HT_PHASOR", as.numeric(x) ) -} \ No newline at end of file +} diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R index 225df8aa6..b5f8ccaf7 100644 --- a/R/ta_HT_SINE.R +++ b/R/ta_HT_SINE.R @@ -1,4 +1,5 @@ #' @title Hilbert Transform - SineWave +#' @family Cycle Indicator #' @export ht_sine <- function(x, ...) { UseMethod("ht_sine") @@ -10,4 +11,4 @@ ht_sine.default <- function(x, ...) { "impl_ta_HT_SINE", as.numeric(x) ) -} \ No newline at end of file +} diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R index 99eafd659..1ed1fb30b 100644 --- a/R/ta_HT_TRENDLINE.R +++ b/R/ta_HT_TRENDLINE.R @@ -1,5 +1,5 @@ - #' @title Hilbert Transform - Instantaneous Trendline +#' @family Cycle Indicator #' @export ht_trendline <- function(x, ...) { UseMethod("ht_trendline") @@ -11,4 +11,4 @@ ht_trendline.default <- function(x, ...) { "impl_ta_HT_TRENDLINE", as.numeric(x) ) -} \ No newline at end of file +} diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R index 23cccdd16..83b2a5201 100644 --- a/R/ta_HT_TRENDMODE.R +++ b/R/ta_HT_TRENDMODE.R @@ -1,5 +1,5 @@ - #' @title Hilbert Transform - Trend vs Cycle Mode +#' @family Cycle Indicator #' @export ht_trendmode <- function(x, ...) { UseMethod("ht_trendmode") @@ -11,4 +11,4 @@ ht_trendmode.default <- function(x, ...) { "impl_ta_HT_TRENDMODE", as.numeric(x) ) -} \ No newline at end of file +} diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index 6ae0533bb..dad57454f 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -1,4 +1,5 @@ #' @title Kaufman’s Adaptive Moving Average (KAMA) +#' @family Overlap Study #' @export kaufman_adaptive_moving_average <- function(x, n = 10, ...) { UseMethod("kaufman_adaptive_moving_average") @@ -8,7 +9,7 @@ kaufman_adaptive_moving_average <- function(x, n = 10, ...) { kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -19,16 +20,17 @@ kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` must be a numeric vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( - "impl_ta_MA", - x, - as.integer(n), + "impl_ta_MA", + x, + as.integer(n), 6L - ) + ) } #' @export -KAMA <- kaufman_adaptive_moving_average \ No newline at end of file +KAMA <- kaufman_adaptive_moving_average diff --git a/R/ta_MACD.R b/R/ta_MACD.R index c432cc57d..83cfbf31f 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -1,41 +1,44 @@ #' @title Moving Average Convergence Divergence +#' +#' @family Momentum Indicator #' @export moving_average_convergence_divergence <- function( - x, - fast = 12, - slow = 26, - signal = 9, - ...) { - - UseMethod("moving_average_convergence_divergence") - + x, + fast = 12, + slow = 26, + signal = 9, + ... +) { + UseMethod("moving_average_convergence_divergence") } #' @export moving_average_convergence_divergence.default <- function( - x, - fast = 12, - slow = 26, - signal = 9, - ...) { - + x, + fast = 12, + slow = 26, + signal = 9, + ... +) { if (!is.null(dim(x)) && !is.numeric(x)) { stop("`x` has to be a double vector", call. = FALSE) } ## ) check args ## for calls - env <- parent.frame() + env <- parent.frame() exprs <- substitute(list(fast = fast, slow = slow, signal = signal))[-1L] is_calls <- vapply(exprs, .is_ma_spec, logical(1L), env = env) if (!(all(is_calls) || all(!is_calls))) { - stop("Either all of `fast`, `slow` and `signal` is specified as calls, or none at all. See examples for more details.") + stop( + "Either all of `fast`, `slow` and `signal` is specified as calls, or none at all. See examples for more details." + ) } if (!all(is_calls)) { - fast_i <- .eval_int(exprs$fast, env) - slow_i <- .eval_int(exprs$slow, env) + fast_i <- .eval_int(exprs$fast, env) + slow_i <- .eval_int(exprs$slow, env) signal_i <- .eval_int(exprs$signal, env) if (fast_i == 12L && slow_i == 26L) { @@ -49,34 +52,35 @@ moving_average_convergence_divergence.default <- function( slow_call <- .normalize_ma_arg_expr(exprs$slow, env) signal_call <- .normalize_ma_arg_expr(exprs$signal, env) - fast_ma <- map_maType_call(fast_call) - slow_ma <- map_maType_call(slow_call) + fast_ma <- map_maType_call(fast_call) + slow_ma <- map_maType_call(slow_call) signal_ma <- map_maType_call(signal_call) .Call( "impl_ta_MACDEXT", x, - fast_ma$n, + fast_ma$n, fast_ma$maType, - slow_ma$n, + slow_ma$n, slow_ma$maType, - signal_ma$n, + signal_ma$n, signal_ma$maType ) } #' @export MACD <- function( - x, - fast = 12, - slow = 26, - signal = 9, - ...) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... - ) + x, + fast = 12, + slow = 26, + signal = 9, + ... +) { + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... + ) } diff --git a/R/ta_MACDEXT.R b/R/ta_MACDEXT.R index 64db3f070..81170548e 100644 --- a/R/ta_MACDEXT.R +++ b/R/ta_MACDEXT.R @@ -1,16 +1,17 @@ - +#' @family Momentum Indicator #' @export MACDEXT <- function( x, - fast = EMA(n = 12), - slow = EMA(n = 26), + fast = EMA(n = 12), + slow = EMA(n = 26), signal = EMA(n = 9), - ...) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... - ) -} \ No newline at end of file + ... +) { + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... + ) +} diff --git a/R/ta_MACDFIX.R b/R/ta_MACDFIX.R index 666007708..d38981fb5 100644 --- a/R/ta_MACDFIX.R +++ b/R/ta_MACDFIX.R @@ -1,14 +1,15 @@ - +#' @family Momentum Indicator #' @export MACDFIX <- function( - x, - signal = 9, - ...) { - moving_average_convergence_divergence( - x, - 12, - 26, - signal, - ... - ) -} \ No newline at end of file + x, + signal = 9, + ... +) { + moving_average_convergence_divergence( + x, + 12, + 26, + signal, + ... + ) +} diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index 44e0610e5..2ebd924d9 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -1,4 +1,6 @@ #' @title Mesa Adaptive Moving Average (MAMA) +#' +#' @family Overlap Study #' @export mesa_adaptive_moving_average <- function(x, n = 10, ...) { UseMethod("mesa_adaptive_moving_average") @@ -8,7 +10,7 @@ mesa_adaptive_moving_average <- function(x, n = 10, ...) { mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -19,16 +21,17 @@ mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` must be a numeric vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( - "impl_ta_MA", - x, - as.integer(n), + "impl_ta_MA", + x, + as.integer(n), 7L ) } #' @export -MAMA <- mesa_adaptive_moving_average \ No newline at end of file +MAMA <- mesa_adaptive_moving_average diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 9719f4848..bb86ddca6 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -1,4 +1,5 @@ #' @title Relative Strength Index +#' @family Momentum Indicator #' @export relative_strength_index <- function(x, n = 10, ...) { UseMethod( @@ -10,7 +11,7 @@ relative_strength_index <- function(x, n = 10, ...) { relative_strength_index.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -21,33 +22,48 @@ relative_strength_index.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` has to be a double vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( - "impl_ta_RSI", - x, + "impl_ta_RSI", + x, as.integer(n) ) } #' @export -relative_strength_index.plotly <- function(x, n = 10, lower = 20, upper = 80, ...) { - dots <- list(...); series <- dots$.series - rsi <- .Call("impl_ta_RSI", series, as.integer(n)) - df <- data.frame(idx = seq_along(rsi), value = rsi) +relative_strength_index.plotly <- function( + x, + n = 10, + lower = 20, + upper = 80, + ... +) { + dots <- list(...) + series <- dots$.series + rsi <- .Call("impl_ta_RSI", series, as.integer(n)) + df <- data.frame(idx = seq_along(rsi), value = rsi) - rsi_plot <- plotly::plot_ly(df, x = ~idx, y = ~value, - type = "scatter", mode = "lines", - showlegend = FALSE) - rsi_plot <- plotly::add_ribbons( - rsi_plot, x = ~idx, - ymin = rep(lower, nrow(df)), ymax = rep(upper, nrow(df)), - line = list(width = 0), fillcolor = "rgba(160,160,160,0.20)" - ) + rsi_plot <- plotly::plot_ly( + df, + x = ~idx, + y = ~value, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + rsi_plot <- plotly::add_ribbons( + rsi_plot, + x = ~idx, + ymin = rep(lower, nrow(df)), + ymax = rep(upper, nrow(df)), + line = list(width = 0), + fillcolor = "rgba(160,160,160,0.20)" + ) - # SAFE append even when `.plotting_environment$sub` is NULL - .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) - rsi_plot + # SAFE append even when `.plotting_environment$sub` is NULL + .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) + rsi_plot } - diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 15a543e3d..844fb04a8 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -7,6 +7,8 @@ #' @param n An [integer] of [length] 1. The window size of the rolling average. #' @param ... Parameters passed to and from other methods. #' +#' @family Overlap Study +#' #' @export SMA <- function(x, n = 10, ...) { UseMethod( diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index 972049b6f..8e54b5d2f 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -1,4 +1,6 @@ #' @title Stochastic +#' +#' @family Momentum Indicator #' @export stochastic <- function(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) { UseMethod( @@ -8,25 +10,24 @@ stochastic <- function(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) { #' @export stochastic.default <- function( - x, - fastk, - slowk = SMA(n = 10), - slowd = SMA(n = 8), - ...) { + x, + fastk, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ... +) { + slowk_ma <- map_maType_call(substitute(slowk)) + slowd_ma <- map_maType_call(substitute(slowd)) - slowk_ma <- map_maType_call(substitute(slowk)) - slowd_ma <- map_maType_call(substitute(slowd)) - - .Call( - "impl_ta_STOCH", - .high(x), - .low(x), - .close(x), - as.integer(fastk), # 4. optInFastK_Period - as.integer(slowk_ma$n), # 5. optInSlowK_Period - as.integer(slowk_ma$maType), # 6. optInSlowK_MAType - as.integer(slowd_ma$n), # 7. optInSlowD_Period - as.integer(slowd_ma$maType) # 8. optInSlowD_MAType - - ) -} \ No newline at end of file + .Call( + "impl_ta_STOCH", + .high(x), + .low(x), + .close(x), + as.integer(fastk), # 4. optInFastK_Period + as.integer(slowk_ma$n), # 5. optInSlowK_Period + as.integer(slowk_ma$maType), # 6. optInSlowK_MAType + as.integer(slowd_ma$n), # 7. optInSlowD_Period + as.integer(slowd_ma$maType) # 8. optInSlowD_MAType + ) +} diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index 55de670f6..192e562c1 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -1,7 +1,13 @@ #' @title Fast Stochastic +#' +#' @family Momentum Indicator #' @export fast_stochastic <- function( - x, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + x, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... +) { UseMethod( "fast_stochastic" ) @@ -12,17 +18,20 @@ STOCHF <- fast_stochastic #' @export fast_stochastic.default <- function( - x, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + x, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... +) { + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - - .Call( - "impl_ta_STOCHF", - .high(x), - .low(x), - .close(x), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) -} \ No newline at end of file + .Call( + "impl_ta_STOCHF", + .high(x), + .low(x), + .close(x), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) +} diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 7581601a8..998e857f7 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -1,7 +1,14 @@ #' @title Stochastic Relative Strength Index +#' +#' @family Momentum Indicator #' @export stochastic_relative_strength_index <- function( - x, n, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... +) { UseMethod( "stochastic_relative_strength_index" ) @@ -12,16 +19,20 @@ STOCHRSI <- stochastic_relative_strength_index #' @export stochastic_relative_strength_index.default <- function( - x, n, fast_k, fast_d_MAtype = SMA(n = 10), ...) { + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... +) { + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - - .Call( - "impl_ta_STOCHRSI", - x, - as.integer(n), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) -} \ No newline at end of file + .Call( + "impl_ta_STOCHRSI", + x, + as.integer(n), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) +} diff --git a/R/ta_T3.R b/R/ta_T3.R index 6b270bfb2..b7b4694a7 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -1,4 +1,5 @@ #' @title T3 Moving Average (T3) +#' @family Overlap Study #' @export t3_moving_average <- function(x, n = 10, ...) { UseMethod("t3_moving_average") @@ -8,7 +9,7 @@ t3_moving_average <- function(x, n = 10, ...) { t3_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -19,16 +20,17 @@ t3_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` must be a numeric vector") } - assert(is.numeric(x)); assert(n >= 2) - - ## 1) pass `x` to C + assert(is.numeric(x)) + assert(n >= 2) + + ## 1) pass `x` to C .Call( - "impl_ta_MA", - x, - as.integer(n), + "impl_ta_MA", + x, + as.integer(n), 8L ) } #' @export -T3 <- t3_moving_average \ No newline at end of file +T3 <- t3_moving_average diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index 3005a19df..eccb66448 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -1,4 +1,5 @@ #' @title Triple Exponential Moving Average (TEMA) +#' @family Overlap Study #' @export triple_exponential_moving_average <- function(x, n = 10, ...) { UseMethod("triple_exponential_moving_average") @@ -8,7 +9,7 @@ triple_exponential_moving_average <- function(x, n = 10, ...) { triple_exponential_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -19,16 +20,17 @@ triple_exponential_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` must be a numeric vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( - "impl_ta_MA", - x, - as.integer(n), + "impl_ta_MA", + x, + as.integer(n), 4L ) } #' @export -TEMA <- triple_exponential_moving_average \ No newline at end of file +TEMA <- triple_exponential_moving_average diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index b1ab38aa9..7f718a387 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -1,4 +1,5 @@ #' @title Triangular Moving Average (TRIMA) +#' @family Overlap Study #' @export triangular_moving_average <- function(x, n = 10, ...) { UseMethod("triangular_moving_average") @@ -8,7 +9,7 @@ triangular_moving_average <- function(x, n = 10, ...) { triangular_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -19,16 +20,17 @@ triangular_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` must be a numeric vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + x, as.integer(n), 5L ) } #' @export -TRIMA <- triangular_moving_average \ No newline at end of file +TRIMA <- triangular_moving_average diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R index d7768cf9b..603846b6e 100644 --- a/R/ta_ULTOSC.R +++ b/R/ta_ULTOSC.R @@ -1,13 +1,14 @@ #' @title Ultimate Oscillator -#' @export -ultimate_oscillator <- function(x, n = c(7, 14, 28),...) { +#' @family Momentum Indicator +#' @export +ultimate_oscillator <- function(x, n = c(7, 14, 28), ...) { UseMethod( "ultimate_oscillator" ) } -#' @export -ultimate_oscillator.default <- function(x, n = c(7, 14, 28),...) { +#' @export +ultimate_oscillator.default <- function(x, n = c(7, 14, 28), ...) { ## default behaviour is to ## coerce to a `matrix` check that ## it is double and then pass to @@ -23,11 +24,12 @@ ultimate_oscillator.default <- function(x, n = c(7, 14, 28),...) { if (!length(n) < 3) { stop("`n` has to be a vector of length 3") } - assert(is.numeric(x)); assert(all(n >= 1)); + assert(is.numeric(x)) + assert(all(n >= 1)) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - .Call( + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( .NAME = "impl_ta_ULTOSC", .high(x), .low(x), @@ -36,4 +38,4 @@ ultimate_oscillator.default <- function(x, n = c(7, 14, 28),...) { as.integer(n[2]), as.integer(n[3]), ) -} \ No newline at end of file +} diff --git a/R/ta_WMA.R b/R/ta_WMA.R index 6c1876cd1..bdb412583 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -1,4 +1,5 @@ #' @title Weighted Moving Average (WMA) +#' @family Overlap Study #' @export weighted_moving_average <- function(x, n = 10, ...) { UseMethod( @@ -10,7 +11,7 @@ weighted_moving_average <- function(x, n = 10, ...) { weighted_moving_average.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector - ## + ## ## No coercing here as it might ## lead to overflow @@ -21,16 +22,17 @@ weighted_moving_average.default <- function(x, n = 10, ...) { if (!is.null(dim(x))) { stop("`x` has to be a double vector") } - assert(is.numeric(x)); assert(n >= 2) + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C + ## 1) pass `x` to C .Call( - "impl_ta_MA", - x, + "impl_ta_MA", + x, as.integer(n), 2L ) } #' @export -WMA <- weighted_moving_average \ No newline at end of file +WMA <- weighted_moving_average From 2df5302dfa7627bd02e54de4c5efc9aa96a3a5fa Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 20:25:02 +0200 Subject: [PATCH 071/166] :books: Documentation overhaul * Updated classes * Added {pkgdown} * Updated README --- .Rbuildignore | 4 + .gitignore | 1 + Makefile | 11 ++- R/chart_indicator.R | 2 +- README.Rmd | 80 +++++++++++++++++++ README.md | 39 ++++++--- _pkgdown.yml | 4 + man/SMA.Rd | 14 ++++ man/acceleration_bands.Rd | 14 ++++ man/aroon.Rd | 11 +++ man/aroon_oscillator.Rd | 11 +++ man/bollinger_bands.Rd | 14 ++++ man/chaikin_AD_line.Rd | 5 ++ man/chaikin_AD_oscillator.Rd | 5 ++ man/doji.Rd | 7 ++ man/doji_star.Rd | 7 ++ man/double_exponential_moving_average.Rd | 14 ++++ man/dragonfly_doji.Rd | 7 ++ man/evening_doji_star.Rd | 7 ++ man/exponential_moving_average.Rd | 14 ++++ man/fast_stochastic.Rd | 11 +++ man/figures/README-charting-1.png | Bin 0 -> 39510 bytes man/ht_dcperiod.Rd | 9 +++ man/ht_dcphase.Rd | 9 +++ man/ht_phasor.Rd | 9 +++ man/ht_sine.Rd | 9 +++ man/ht_trendline.Rd | 9 +++ man/ht_trendmode.Rd | 9 +++ man/kaufman_adaptive_moving_average.Rd | 14 ++++ man/mesa_adaptive_moving_average.Rd | 14 ++++ man/moving_average_convergence_divergence.Rd | 11 +++ man/relative_strength_index.Rd | 11 +++ man/stochastic.Rd | 11 +++ man/stochastic_relative_strength_index.Rd | 11 +++ man/t3_moving_average.Rd | 14 ++++ man/triangular_moving_average.Rd | 14 ++++ man/triple_exponential_moving_average.Rd | 14 ++++ man/ultimate_oscillator.Rd | 11 +++ man/weighted_moving_average.Rd | 14 ++++ 39 files changed, 463 insertions(+), 12 deletions(-) create mode 100644 README.Rmd create mode 100644 _pkgdown.yml create mode 100644 man/figures/README-charting-1.png diff --git a/.Rbuildignore b/.Rbuildignore index c862c744f..3dc14d500 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,6 @@ ^curly-giggle\.Rproj$ ^\.Rproj\.user$ +^README\.Rmd$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/.gitignore b/.gitignore index c03e821c4..ad7b6de19 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ NOTES.md # sandbox sandbox/** +docs diff --git a/Makefile b/Makefile index e5a0129ee..598e9d3a4 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ build: ## Build the R package @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD INSTALL $(tarball_location) + @Rscript -e "rmarkdown::render('README.Rmd', output_format = rmarkdown::github_document(html_preview = FALSE), clean = TRUE)" check: ## Check the R package @Rscript --verbose -e "devtools::document()" @@ -30,4 +31,12 @@ clean: ## Remove artifacts fmt: ## Format code @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h - @rm -rf ./.clang-format \ No newline at end of file + @rm -rf ./.clang-format + +pkgdown-build: ## Build {pkgdown} documentation + @Rscript -e "pkgdown::clean_site()" + @Rscript -e "pkgdown::init_site()" + @Rscript -e "pkgdown::build_site()" + +pkgdown-preview: ## Preview {pkgdown} documetation + @Rscript -e "pkgdown::preview_site()" diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 5a462b151..a1143e90c 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -231,7 +231,7 @@ indicator <- function( ## here fig <- plotly::subplot( panels, - nrows = k, + nrows = number_of_panels, shareX = TRUE, margin = 0.02, heights = heights diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 000000000..0e197afbb --- /dev/null +++ b/README.Rmd @@ -0,0 +1,80 @@ +--- +output: github_document +--- + + + +```{r setup, include = FALSE} +# set options +Sys.setenv(OPENSSL_CONF="/dev/null") + +knitr::opts_chunk$set( + collapse = FALSE, + comment = "#>", + fig.path = "man/figures/README-", + message = FALSE, + warning = FALSE, + echo = FALSE +) +``` + +# {talib}: R bindings for TA-lib + + + + +The goal of talib is to ... + +## Installation + +You can install the development version of talib from [GitHub](https://github.com/) with: + +``` r +# install.packages("pak") +pak::pak("serkor1/curly-giggle") +``` + +## Example + +### Indicators +This is a basic example which shows you how to solve a common problem: + +```{r indicator} +library(talib) + +## calculate bollinger +## bands +x <- talib::SPY + +## calculate bollinger +## bands +head( + talib::bollinger_bands( + x[,1] + ) +) +``` + +### Charting +```{r charting} +library(talib) + +## calculate bollinger +## bands +x <- talib::SPY + +{ + ## calculate bollinger + ## bands + talib::chart( + x = x + ) + + ## add bollinger bands + ## to the chart + talib::indicator( + .f = talib::SMA(), + .var = ~close + ) +} +``` \ No newline at end of file diff --git a/README.md b/README.md index 4a5051616..f89df142f 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,38 @@ + + + # {talib}: R bindings for TA-lib + + + + +The goal of talib is to … + ## Installation -### Stable +You can install the development version of talib from +[GitHub](https://github.com/) with: -```R -pak::pak("talib") +``` r +# install.packages("pak") +pak::pak("serkor1/curly-giggle") ``` -### Development +## Example -```console -git clone --recurse-submodules https://github.com/serkor1/curly-giggle.git -``` +### Indicators + +This is a basic example which shows you how to solve a common problem: + + #> upper middle lower + #> [1,] NA NA NA + #> [2,] NA NA NA + #> [3,] NA NA NA + #> [4,] NA NA NA + #> [5,] NA NA NA + #> [6,] NA NA NA + +### Charting -```make -make build -``` \ No newline at end of file +![](man/figures/README-charting-1.png) diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 000000000..d71acfb90 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: ~ +template: + bootstrap: 5 + diff --git a/man/SMA.Rd b/man/SMA.Rd index 56eba93cf..c4a0302aa 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -16,3 +16,17 @@ SMA(x, n = 10, ...) \description{ A short description... } +\seealso{ +Other Overlap Study: +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 2bb6e417d..6f4d575c3 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -9,3 +9,17 @@ acceleration_bands(x, n = 10, ...) \description{ Acceleration Bands } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/aroon.Rd b/man/aroon.Rd index edde79660..f0b785a09 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -9,3 +9,14 @@ aroon(x, n, ...) \description{ Aroon } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index c4b4750ba..776c5581b 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -9,3 +9,14 @@ aroon_oscillator(x, n, ...) \description{ Aroon Oscillator } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index 3bb133238..c28c3c0d5 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -9,3 +9,17 @@ bollinger_bands(x, ma = SMA(n = 10), up = 2, down = 2, ...) \description{ Bollinger Bands } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index 83a50b183..f1b935b30 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -9,3 +9,8 @@ chaikin_AD_line(x, ...) \description{ Chaikin A/D Line } +\seealso{ +Other Volume Indicator: +\code{\link{chaikin_AD_oscillator}()} +} +\concept{Volume Indicator} diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index ff24b1116..e5bf957a3 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -9,3 +9,8 @@ chaikin_AD_oscillator(x, fast = 3, slow = 10, ...) \description{ Chaikin A/D Oscillator } +\seealso{ +Other Volume Indicator: +\code{\link{chaikin_AD_line}()} +} +\concept{Volume Indicator} diff --git a/man/doji.Rd b/man/doji.Rd index 37db570f8..67c7e0e45 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -9,3 +9,10 @@ doji(x, ...) \description{ Doji } +\seealso{ +Other Pattern Recognition: +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()} +} +\concept{Pattern Recognition} diff --git a/man/doji_star.Rd b/man/doji_star.Rd index bf08ee177..72e2ba3d5 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -9,3 +9,10 @@ doji_star(x, ...) \description{ Doji Star } +\seealso{ +Other Pattern Recognition: +\code{\link{doji}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()} +} +\concept{Pattern Recognition} diff --git a/man/double_exponential_moving_average.Rd b/man/double_exponential_moving_average.Rd index 162ecd3ae..c0163b4b8 100644 --- a/man/double_exponential_moving_average.Rd +++ b/man/double_exponential_moving_average.Rd @@ -9,3 +9,17 @@ double_exponential_moving_average(x, n = 10, ...) \description{ Double Exponential Moving Average (DEMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index 30ac0244d..cc3354399 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -9,3 +9,10 @@ dragonfly_doji(x, ...) \description{ Dragonfly Doji } +\seealso{ +Other Pattern Recognition: +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{evening_doji_star}()} +} +\concept{Pattern Recognition} diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 5634c4004..92e20fd3f 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -9,3 +9,10 @@ evening_doji_star(x, penetration = 0.1, ...) \description{ Evening Doji Star } +\seealso{ +Other Pattern Recognition: +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()} +} +\concept{Pattern Recognition} diff --git a/man/exponential_moving_average.Rd b/man/exponential_moving_average.Rd index eec5b2250..c47f4238f 100644 --- a/man/exponential_moving_average.Rd +++ b/man/exponential_moving_average.Rd @@ -9,3 +9,17 @@ exponential_moving_average(x, n = 10, ...) \description{ Exponential Moving Average (EMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index 8bbeb937f..ae7c69c3b 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -9,3 +9,14 @@ fast_stochastic(x, fast_k, fast_d_MAtype = SMA(n = 10), ...) \description{ Fast Stochastic } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png new file mode 100644 index 0000000000000000000000000000000000000000..0c0f5f5fb42f554becbbbc1856fc3f91dc625c14 GIT binary patch literal 39510 zcmb4qWmHsg`z;DcN=q{!AYIapg0yr=qjYx1$k5&0HPq1EF!UYqeg7Zs zU3aZ}zs#(ebdtvm0YM9+-mlRDnux*(7{hj5xfLeN_Z=fLXP3AO1RBE54(S?} zCKqku6q*&PcBU@t6+kC0L%$;MBvo=cmxSJ*M@K9)JEMi?Fu1AY$%sC#VmmuHJPSYw z+REDEuCFqq{M&NtrZ^4!3&BPZXXP0Jg1-Xlb7A<;3bgnBDDZFI*Qmz`{-Ir$wy!i6 zn5wHYcPuX*XF5lZWt^P{N~d{UD4m?EPBvOsM#qnw&X1n~=YZ8yTUSC{6kU?Yl^#$z z37Rs9TCIGks+-$IWOS77;AYXmEAZ+09ELp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zq-;Uu_~vR>R21-{fQHpV8pPy6z-znygM)Y7N0Oenj2|AZTwZJc3=EZH04J_X=zLb~ zVj^aP9u}W@NAOx77_Rj+JV*@JNBaGDSQi*o+2Es*6byo^zPZkN}3`{xV6VhZ#be+qZaS0?}6O!-p_ z9wu9WbChW&+bDlu!U(#{z7T9;wfO4>f0F&uLuqG}13=4^+3n*S?dz+rPhCpEghhY= zBJyEMw%N}tkD$|bxyFR7t+r(y^Gq&Q$~h@&J@bOAreKgMNr$+4Jjg-6zisX}9IO#U z@79n(8f>#RT(h@{v}cUfy1sJ+P>1g^#Z;7Wh)fOjL+j@Tk5(hVOQ(A_VEhx(i7w(~ zf}kxUDk}V^Na=q+i_|^+1qk$)A!Bux_r-#&^Dw=BZQ5c4qptc}Ky;!h5&a`hemk9t zj5N2A(Qn|Atv8W6lNL7eQvttw0z{!aCC+I*?dd5&hog3t=smoOd}L)JZ_i zP`A)-+eVEK(%g_!N_;%S(YUk}SFo00m8TpglZy}?u8A)B{;uz#4>`ca1Qbl#xOE)7 zeZgm4-i7Xx($qB6(=VJG&7tsu;#E>}_bG})2>De`Ky3k-z&e!iq(LB{yo&Skp6dHi zgvv88)qrobNh>?l7-eYMC#}SV93BAx?h9zDQInAZ5x2@DAy}g3d=XdC)p%EeFo literal 0 HcmV?d00001 diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd index f2c63d09f..bf0a76028 100644 --- a/man/ht_dcperiod.Rd +++ b/man/ht_dcperiod.Rd @@ -9,3 +9,12 @@ ht_dcperiod(x, ...) \description{ Hilbert Transform - Dominant Cycle Period } +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcphase}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_sine}()}, +\code{\link{ht_trendline}()}, +\code{\link{ht_trendmode}()} +} +\concept{Cycle Indicator} diff --git a/man/ht_dcphase.Rd b/man/ht_dcphase.Rd index 8214e8613..00c4587a7 100644 --- a/man/ht_dcphase.Rd +++ b/man/ht_dcphase.Rd @@ -9,3 +9,12 @@ ht_dcphase(x, ...) \description{ Hilbert Transform - Dominant Cycle Phase } +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcperiod}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_sine}()}, +\code{\link{ht_trendline}()}, +\code{\link{ht_trendmode}()} +} +\concept{Cycle Indicator} diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd index 458357f7f..191145468 100644 --- a/man/ht_phasor.Rd +++ b/man/ht_phasor.Rd @@ -9,3 +9,12 @@ ht_phasor(x, ...) \description{ Hilbert Transform - Phasor Components } +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcperiod}()}, +\code{\link{ht_dcphase}()}, +\code{\link{ht_sine}()}, +\code{\link{ht_trendline}()}, +\code{\link{ht_trendmode}()} +} +\concept{Cycle Indicator} diff --git a/man/ht_sine.Rd b/man/ht_sine.Rd index 540802754..906e6f035 100644 --- a/man/ht_sine.Rd +++ b/man/ht_sine.Rd @@ -9,3 +9,12 @@ ht_sine(x, ...) \description{ Hilbert Transform - SineWave } +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcperiod}()}, +\code{\link{ht_dcphase}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_trendline}()}, +\code{\link{ht_trendmode}()} +} +\concept{Cycle Indicator} diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index cca37091b..54b5a2d72 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -9,3 +9,12 @@ ht_trendline(x, ...) \description{ Hilbert Transform - Instantaneous Trendline } +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcperiod}()}, +\code{\link{ht_dcphase}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_sine}()}, +\code{\link{ht_trendmode}()} +} +\concept{Cycle Indicator} diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index 0c9b90f5d..4053a770b 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -9,3 +9,12 @@ ht_trendmode(x, ...) \description{ Hilbert Transform - Trend vs Cycle Mode } +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcperiod}()}, +\code{\link{ht_dcphase}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_sine}()}, +\code{\link{ht_trendline}()} +} +\concept{Cycle Indicator} diff --git a/man/kaufman_adaptive_moving_average.Rd b/man/kaufman_adaptive_moving_average.Rd index 12d54443f..714c3fb92 100644 --- a/man/kaufman_adaptive_moving_average.Rd +++ b/man/kaufman_adaptive_moving_average.Rd @@ -9,3 +9,17 @@ kaufman_adaptive_moving_average(x, n = 10, ...) \description{ Kaufman’s Adaptive Moving Average (KAMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/mesa_adaptive_moving_average.Rd b/man/mesa_adaptive_moving_average.Rd index 3eef7c064..0a95a28ff 100644 --- a/man/mesa_adaptive_moving_average.Rd +++ b/man/mesa_adaptive_moving_average.Rd @@ -9,3 +9,17 @@ mesa_adaptive_moving_average(x, n = 10, ...) \description{ Mesa Adaptive Moving Average (MAMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index 7bbb60d53..358bec844 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -9,3 +9,14 @@ moving_average_convergence_divergence(x, fast = 12, slow = 26, signal = 9, ...) \description{ Moving Average Convergence Divergence } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index 9693b3782..16df71405 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -9,3 +9,14 @@ relative_strength_index(x, n = 10, ...) \description{ Relative Strength Index } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/stochastic.Rd b/man/stochastic.Rd index 238afc561..e2e5f4694 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -9,3 +9,14 @@ stochastic(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) \description{ Stochastic } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index 7e85deff3..7d4dcf64a 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -15,3 +15,14 @@ stochastic_relative_strength_index( \description{ Stochastic Relative Strength Index } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{ultimate_oscillator}()} +} +\concept{Momentum Indicator} diff --git a/man/t3_moving_average.Rd b/man/t3_moving_average.Rd index 2c046af8b..8b36285fb 100644 --- a/man/t3_moving_average.Rd +++ b/man/t3_moving_average.Rd @@ -9,3 +9,17 @@ t3_moving_average(x, n = 10, ...) \description{ T3 Moving Average (T3) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/triangular_moving_average.Rd b/man/triangular_moving_average.Rd index 98769e6d8..cdbeea663 100644 --- a/man/triangular_moving_average.Rd +++ b/man/triangular_moving_average.Rd @@ -9,3 +9,17 @@ triangular_moving_average(x, n = 10, ...) \description{ Triangular Moving Average (TRIMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triple_exponential_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/triple_exponential_moving_average.Rd b/man/triple_exponential_moving_average.Rd index d17f05149..029c983d4 100644 --- a/man/triple_exponential_moving_average.Rd +++ b/man/triple_exponential_moving_average.Rd @@ -9,3 +9,17 @@ triple_exponential_moving_average(x, n = 10, ...) \description{ Triple Exponential Moving Average (TEMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{weighted_moving_average}()} +} +\concept{Overlap Study} diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index e98b86998..7cc175133 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -9,3 +9,14 @@ ultimate_oscillator(x, n = c(7, 14, 28), ...) \description{ Ultimate Oscillator } +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()} +} +\concept{Momentum Indicator} diff --git a/man/weighted_moving_average.Rd b/man/weighted_moving_average.Rd index 193ac44b9..cb1316472 100644 --- a/man/weighted_moving_average.Rd +++ b/man/weighted_moving_average.Rd @@ -9,3 +9,17 @@ weighted_moving_average(x, n = 10, ...) \description{ Weighted Moving Average (WMA) } +\seealso{ +Other Overlap Study: +\code{\link{SMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{double_exponential_moving_average}()}, +\code{\link{exponential_moving_average}()}, +\code{\link{kaufman_adaptive_moving_average}()}, +\code{\link{mesa_adaptive_moving_average}()}, +\code{\link{t3_moving_average}()}, +\code{\link{triangular_moving_average}()}, +\code{\link{triple_exponential_moving_average}()} +} +\concept{Overlap Study} From 2686907223f72a98b02277f87f84fc80afad23dc Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 20:31:34 +0200 Subject: [PATCH 072/166] :books: Updated README * Centered figures and added links --- README.Rmd | 7 ++++--- README.md | 18 +++++++++--------- man/figures/README-charting-1.png | Bin 39510 -> 82210 bytes 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.Rmd b/README.Rmd index 0e197afbb..4baee0bd0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,7 +18,7 @@ knitr::opts_chunk$set( ) ``` -# {talib}: R bindings for TA-lib +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) @@ -48,7 +48,7 @@ x <- talib::SPY ## calculate bollinger ## bands -head( +tail( talib::bollinger_bands( x[,1] ) @@ -56,7 +56,8 @@ head( ``` ### Charting -```{r charting} + +```{r charting, fig.align='center',fig.dpi=180} library(talib) ## calculate bollinger diff --git a/README.md b/README.md index f89df142f..4c3781c55 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# {talib}: R bindings for TA-lib +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) @@ -25,14 +25,14 @@ pak::pak("serkor1/curly-giggle") This is a basic example which shows you how to solve a common problem: - #> upper middle lower - #> [1,] NA NA NA - #> [2,] NA NA NA - #> [3,] NA NA NA - #> [4,] NA NA NA - #> [5,] NA NA NA - #> [6,] NA NA NA + #> upper middle lower + #> [4671,] 638.7501 630.155 621.5599 + #> [4672,] 640.8957 631.238 621.5803 + #> [4673,] 641.0360 632.456 623.8760 + #> [4674,] 641.5914 633.962 626.3326 + #> [4675,] 642.1847 633.662 625.1393 + #> [4676,] 642.7450 633.352 623.9590 ### Charting -![](man/figures/README-charting-1.png) + diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png index 0c0f5f5fb42f554becbbbc1856fc3f91dc625c14..5db034a6b1f87e4e7271683dbdb27b023cb7c97a 100644 GIT binary patch literal 82210 zcmeEuXH-*L6ejOkP>~`?7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?l7-eYMC#}SV93BAx?h9zDQInAZ5x2@DAy}g3d=XdC)p%EeFo From 1961352ce0642d91c34a64a8db993bad02d161cd Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 20:51:59 +0200 Subject: [PATCH 073/166] :hammer: Added logo --- README.Rmd | 2 +- README.md | 2 +- man/figures/candlestick.png | Bin 0 -> 5027 bytes 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 man/figures/candlestick.png diff --git a/README.Rmd b/README.Rmd index 4baee0bd0..6b4d8f930 100644 --- a/README.Rmd +++ b/README.Rmd @@ -18,7 +18,7 @@ knitr::opts_chunk$set( ) ``` -# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) diff --git a/README.md b/README.md index 4c3781c55..9d84fdf69 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) diff --git a/man/figures/candlestick.png b/man/figures/candlestick.png new file mode 100644 index 0000000000000000000000000000000000000000..17970d34b723c43dacce70f5c83da2044fde8214 GIT binary patch literal 5027 zcmcIoX;_ojwq9QnNEl>RMoDB6MG=HDD3XX+Kq=VT3bs;$%tsV~6h#?6s#HKEU@e0n zU`4H`3OQgA1xajWP(ZNI5(I@J4N?(=pcE6x-Ct0S_ue1({`@^t?MfP^kdKvP6t(}%m?pf5_Co7bl_^huR6=TJ~=C>%O;$U5@CzPR9^gQ3>ZvEfDIE(QSF3@`W1pB^rL z@!0oS*l!8cmm?cKUhzO@^<&P*U#(JG9Z;S&&f#dDZ>_b|a%=j~EYl`rDUGJEMR)#Q znGGdex9VP%O3)c=mHlg0eSe@o-TKy*Y^Mun^i$&MJR_^0-R6%<8p2EB#>KOOfCt?0 zCr2lo2gJpa21nvV|BoL$z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JAKqnA55fPb3{?P_|uec5u-whBsxg zrMp)9<6sJ%b}7MX@;AN z9EC_Lfc*9L>w}TsXuxpH@EJ5^w zN6+|Vn~rD?Z}pJ;kGm1S@J$iG`(CCd__$tQ)1x<3hod7tby6ZL?9Dv_(gEbyft1lX zG+e~%E8N!fos<4@Tej`B)Nc;_J7vpQ?ss1tDn9wVXPldE*L$(shOh0%lz7E26*QEy z@({z*(+^KI?u(Hu_jPZpJn;h0%Qg{-V_sFS94ZX_vcp;tk8hGFw^ydbZxCImwrzZB z+nl6{n#1xt0jE&YlhB|Ox5ve^Pp00M^4c$tk#Wga7FmC^_*kKAdfnrcj7ur9k%|d^ z#Yw}TE0b>xEP36%y~veHVp(Hl4j9940%K=|qnYausutmgCOZJZX1Qo7!b04z>6Qg9 zqEVp#D_1&E#N-oPIhkN*PScBKWsDs?ZUarGD7uLhqGpO!-?sdiAu)~ETddejl$*DM z3!z8EsxH(jzE`JLpy_3aq5wxR)yiSy8s>zS5DSRDw`G~&$#voHvx$sTecYw;!AK4E z?@nbA)trJS-Q*L~5i3|ri>QG3wbT6FXaGdb0GfmFnk*&+OrgdYNg6wFS8el4OpXR= za?SH?@mN|?VSpe8^$SRDwc1NRyi4x=Oy`wXJl6aW6ZX}QV4e4;bB{P#b=Ts`Z4aZ}*&}CDmmE*o%^eGj65O zof{K+wys8=ujjh7YD}13-k`+z7Fat`>&H=@a*bth!y%#r^_16ApDgU+JYmWY{pKk8 z&tA;)&(AXZKM_AxFMaJgb0v2_ky} zVzdjHwci+nchKZR7XrQT+e(5W{z$5!vEvM328rszk2dlPV^X<;I!4+$3jgOH&Nv^G X%pB@poc_s#*xYNYk9&n1`|JMz%^RB) literal 0 HcmV?d00001 From 748b748023850f398b8e82081aa564a2b8d2469e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 21:02:35 +0200 Subject: [PATCH 074/166] :hammer: Updated Stuff --- NAMESPACE | 1 + R/ta_RSI.R | 9 ++++-- README.Rmd | 15 +++++++-- README.md | 52 +++++++++++++++++++++++++++++- man/figures/README-charting-1.png | Bin 82210 -> 144318 bytes 5 files changed, 70 insertions(+), 7 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 87fba9335..33f82d45d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -50,6 +50,7 @@ export(MACD) export(MACDEXT) export(MACDFIX) export(MAMA) +export(RSI) export(SMA) export(STOCHF) export(STOCHRSI) diff --git a/R/ta_RSI.R b/R/ta_RSI.R index bb86ddca6..4b7e7efa0 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -7,6 +7,9 @@ relative_strength_index <- function(x, n = 10, ...) { ) } +#' @export +RSI <- relative_strength_index + #' @export relative_strength_index.default <- function(x, n = 10, ...) { ## default behaviour is to @@ -42,8 +45,8 @@ relative_strength_index.plotly <- function( ... ) { dots <- list(...) - series <- dots$.series - rsi <- .Call("impl_ta_RSI", series, as.integer(n)) + series <- dots$.series[, 1L] + rsi <- .Call("impl_ta_RSI", as.double(series), as.integer(n)) df <- data.frame(idx = seq_along(rsi), value = rsi) rsi_plot <- plotly::plot_ly( @@ -63,7 +66,7 @@ relative_strength_index.plotly <- function( fillcolor = "rgba(160,160,160,0.20)" ) - # SAFE append even when `.plotting_environment$sub` is NULL .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) + rsi_plot } diff --git a/README.Rmd b/README.Rmd index 6b4d8f930..a94274334 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,7 +23,9 @@ knitr::opts_chunk$set( -The goal of talib is to ... +{talib} provides R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib), a C-library for Technical Analysis indicators and Candlestick patterns. + +{talib} also provides interactive financial charts based on {plotly}. ## Installation @@ -39,7 +41,7 @@ pak::pak("serkor1/curly-giggle") ### Indicators This is a basic example which shows you how to solve a common problem: -```{r indicator} +```{r indicator, echo = TRUE} library(talib) ## calculate bollinger @@ -57,7 +59,7 @@ tail( ### Charting -```{r charting, fig.align='center',fig.dpi=180} +```{r charting, fig.align='center', fig.dpi=180, echo = TRUE} library(talib) ## calculate bollinger @@ -77,5 +79,12 @@ x <- talib::SPY .f = talib::SMA(), .var = ~close ) + + ## add bollinger bands + ## to the chart + talib::indicator( + .f = talib::RSI(), + .var = ~close + ) } ``` \ No newline at end of file diff --git a/README.md b/README.md index 9d84fdf69..e4399d99a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,11 @@ -The goal of talib is to … +{talib} provides R bindings for +[TA-Lib](https://github.com/TA-Lib/ta-lib), a C-library for Technical +Analysis indicators and Candlestick patterns. + +{talib} also provides interactive financial charts based on {plotly}. ## Installation @@ -25,6 +29,22 @@ pak::pak("serkor1/curly-giggle") This is a basic example which shows you how to solve a common problem: +``` r +library(talib) + +## calculate bollinger +## bands +x <- talib::SPY + +## calculate bollinger +## bands +tail( + talib::bollinger_bands( + x[,1] + ) +) +``` + #> upper middle lower #> [4671,] 638.7501 630.155 621.5599 #> [4672,] 640.8957 631.238 621.5803 @@ -35,4 +55,34 @@ This is a basic example which shows you how to solve a common problem: ### Charting +``` r +library(talib) + +## calculate bollinger +## bands +x <- talib::SPY + +{ + ## calculate bollinger + ## bands + talib::chart( + x = x + ) + + ## add bollinger bands + ## to the chart + talib::indicator( + .f = talib::SMA(), + .var = ~close + ) + + ## add bollinger bands + ## to the chart + talib::indicator( + .f = talib::RSI(), + .var = ~close + ) +} +``` + diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png index 5db034a6b1f87e4e7271683dbdb27b023cb7c97a..53a0a18eb588e692db1035d7caf4b9f8beb8b6f4 100644 GIT binary patch literal 144318 zcmdqIRalhm7e2~oO9+B=iIlW-gObwH4bq(h42?>IfPgeZ!$>o958aJ41Jd0?4GjFp zPx*fP+WTZ5?4!-md%eu_KDq97uY0X0^n;=_7CH$!8X6jw%zFtHG_(i1XlVBXp4>yd z0nzi@prPTQ$w<6Yb5GqxKK9nr^ri4k*9D&w!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j?zHi#9wy>04jG24R}}nyR&524Gy9=oQ@b>tBAFbiJ V+*dm#*^S#bNQ*0cD1B$>^IzzOc#Z%7 From 114fb886133688c5e5d9773f18db87051d08abca Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 21 Aug 2025 21:07:48 +0200 Subject: [PATCH 075/166] :hammer: Updated data to BTC --- README.Rmd | 4 ++-- README.md | 18 +++++++++--------- man/figures/README-charting-1.png | Bin 144318 -> 94510 bytes 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.Rmd b/README.Rmd index a94274334..5fec7a6e1 100644 --- a/README.Rmd +++ b/README.Rmd @@ -46,7 +46,7 @@ library(talib) ## calculate bollinger ## bands -x <- talib::SPY +x <- talib::BTC ## calculate bollinger ## bands @@ -64,7 +64,7 @@ library(talib) ## calculate bollinger ## bands -x <- talib::SPY +x <- talib::BTC { ## calculate bollinger diff --git a/README.md b/README.md index e4399d99a..47d0a2053 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ library(talib) ## calculate bollinger ## bands -x <- talib::SPY +x <- talib::BTC ## calculate bollinger ## bands @@ -45,13 +45,13 @@ tail( ) ``` - #> upper middle lower - #> [4671,] 638.7501 630.155 621.5599 - #> [4672,] 640.8957 631.238 621.5803 - #> [4673,] 641.0360 632.456 623.8760 - #> [4674,] 641.5914 633.962 626.3326 - #> [4675,] 642.1847 633.662 625.1393 - #> [4676,] 642.7450 633.352 623.9590 + #> upper middle lower + #> [195,] 113734.0 113371.6 113009.1 + #> [196,] 113735.5 113426.4 113117.4 + #> [197,] 113738.7 113469.4 113200.0 + #> [198,] 113732.7 113506.5 113280.4 + #> [199,] 113747.5 113530.7 113314.0 + #> [200,] 113808.6 113579.7 113350.8 ### Charting @@ -60,7 +60,7 @@ library(talib) ## calculate bollinger ## bands -x <- talib::SPY +x <- talib::BTC { ## calculate bollinger diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png index 53a0a18eb588e692db1035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b;HC$NbN!n;)A$9@!73HwhJTjS@g-Z~AYR zIIHc7Qg9Lh|a=Ipk1! zZ*NK3S4A6-Dzx9q@=&bLQfOm=@UcVi5ugXq&O2qJUYBTV27dc?5QQ6%RDs1H7{2 zTO2ryFx{%poFOno*IZB_dM2x%g_o&K{mz7`@`Z1aM%7m7Pigj+LqIZReKMR}5uNUQ zLu4XgP_|3sg3`|X`_jXn{kgTXDfKHOcpof*Sw&TK@^?o(Awt#Wabq<0VUYQS0U>55;ev#z}Fr}C8g@-mY> zAKZ9Qrt+ci=MA;%p|{TI8<>{J+ta&H)zujE+ssVSu=vivO7)B7rN+Ios*uleibLZe zdb#-fzN5>H%PMbc2kwVdh4{~ym8-bN#K?1+&YV0hKs{y*dVYHbYGT;`v9$a|4EFfA z-3zoR$X&qlA|gE=r6Dc-sb82@1KG(cRvAK-3mBU;1#_#osImDF4S- zP%$HWv=Pc5K=cPj14q#{SI@1N%2pbjmwPE)cVn>+omCdWgzmO3he(<~*45J+25U^b zt8UhuOwY}oq3quB5)nSy)TQT}mszK<1Y~dlggu z!Pc3X&-XhsGSJa2X@yl)4L5#_@WJXB;X{6>P9QLh>BR%>>y@tt;;iJ@&3-^1F-iki z@nYWF({LXq_VPC+Uo{QGP<>LE#RKfyula7tnd7Ca15idq**`x z=T;HP$Pi!Nt*CTOLV6br2YS@80i>nw8tk$^c8Tfxu7a3L0-UV?_9{URsU4N`hYxZ96GMb_uCTFn zKwTN_D_GWRHnt{~79iSGmH@wCV1NUSG2%F0FSl-$F|TLn1%th^DjD^M9H?up6pSy9Z}ai+thP{4{iA`hW=d3{Z8NzfvRCeWYw95B{xt=2l!MC?3JAW=(WG`O? zcyOlT*xAI; Date: Thu, 21 Aug 2025 22:50:48 +0200 Subject: [PATCH 076/166] :hammer: Updated documentation * Streamlined MA functions * Sketched the first example template. --- NAMESPACE | 32 ++++++++-------- R/chart.R | 2 + R/chart_indicator.R | 1 + R/ta_DEMA.R | 45 ++++++++++++++++++++-- R/ta_EMA.R | 46 +++++++++++++++++++++-- R/ta_KAMA.R | 42 +++++++++++++++++++-- R/ta_MAMA.R | 42 +++++++++++++++++++-- R/ta_SMA.R | 13 +++---- R/ta_T3.R | 42 +++++++++++++++++++-- R/ta_TEMA.R | 42 +++++++++++++++++++-- R/ta_TRIMA.R | 43 +++++++++++++++++++-- R/ta_WMA.R | 43 +++++++++++++++++++-- R/utils.R | 8 ++++ _pkgdown.yml | 48 +++++++++++++++++++++++- man-roxygen/univariate_example.R | 20 ++++++++++ man/DEMA.Rd | 47 +++++++++++++++++++++++ man/EMA.Rd | 47 +++++++++++++++++++++++ man/KAMA.Rd | 27 +++++++++++++ man/MAMA.Rd | 27 +++++++++++++ man/SMA.Rd | 20 +++++----- man/SMA.plotly.Rd | 11 ------ man/T3.Rd | 27 +++++++++++++ man/TEMA.Rd | 27 +++++++++++++ man/TRIMA.Rd | 27 +++++++++++++ man/WMA.Rd | 27 +++++++++++++ man/acceleration_bands.Rd | 18 ++++----- man/bollinger_bands.Rd | 18 ++++----- man/chart.Rd | 11 ++++++ man/double_exponential_moving_average.Rd | 25 ------------ man/exponential_moving_average.Rd | 25 ------------ man/indicator.Rd | 11 ++++++ man/kaufman_adaptive_moving_average.Rd | 25 ------------ man/mesa_adaptive_moving_average.Rd | 25 ------------ man/t3_moving_average.Rd | 25 ------------ man/triangular_moving_average.Rd | 25 ------------ man/triple_exponential_moving_average.Rd | 25 ------------ man/weighted_moving_average.Rd | 25 ------------ 37 files changed, 720 insertions(+), 294 deletions(-) create mode 100644 man-roxygen/univariate_example.R create mode 100644 man/DEMA.Rd create mode 100644 man/EMA.Rd create mode 100644 man/KAMA.Rd create mode 100644 man/MAMA.Rd delete mode 100644 man/SMA.plotly.Rd create mode 100644 man/T3.Rd create mode 100644 man/TEMA.Rd create mode 100644 man/TRIMA.Rd create mode 100644 man/WMA.Rd create mode 100644 man/chart.Rd delete mode 100644 man/double_exponential_moving_average.Rd delete mode 100644 man/exponential_moving_average.Rd create mode 100644 man/indicator.Rd delete mode 100644 man/kaufman_adaptive_moving_average.Rd delete mode 100644 man/mesa_adaptive_moving_average.Rd delete mode 100644 man/t3_moving_average.Rd delete mode 100644 man/triangular_moving_average.Rd delete mode 100644 man/triple_exponential_moving_average.Rd delete mode 100644 man/weighted_moving_average.Rd diff --git a/NAMESPACE b/NAMESPACE index 33f82d45d..12df07de9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,7 +1,23 @@ # Generated by roxygen2: do not edit by hand +S3method(DEMA,default) +S3method(DEMA,plotly) +S3method(EMA,default) +S3method(EMA,plotly) +S3method(KAMA,default) +S3method(KAMA,plotly) +S3method(MAMA,default) +S3method(MAMA,plotly) S3method(SMA,default) S3method(SMA,plotly) +S3method(T3,default) +S3method(T3,plotly) +S3method(TEMA,default) +S3method(TEMA,plotly) +S3method(TRIMA,default) +S3method(TRIMA,plotly) +S3method(WMA,default) +S3method(WMA,plotly) S3method(acceleration_bands,default) S3method(aroon,default) S3method(aroon_oscillator,default) @@ -12,10 +28,8 @@ S3method(chaikin_AD_oscillator,default) S3method(chart,default) S3method(doji,default) S3method(doji_star,default) -S3method(double_exponential_moving_average,default) S3method(dragonfly_doji,default) S3method(evening_doji_star,default) -S3method(exponential_moving_average,default) S3method(fast_stochastic,default) S3method(ht_dcperiod,default) S3method(ht_dcphase,default) @@ -23,18 +37,12 @@ S3method(ht_phasor,default) S3method(ht_sine,default) S3method(ht_trendline,default) S3method(ht_trendmode,default) -S3method(kaufman_adaptive_moving_average,default) -S3method(mesa_adaptive_moving_average,default) S3method(moving_average_convergence_divergence,default) S3method(relative_strength_index,default) S3method(relative_strength_index,plotly) S3method(stochastic,default) S3method(stochastic_relative_strength_index,default) -S3method(t3_moving_average,default) -S3method(triangular_moving_average,default) -S3method(triple_exponential_moving_average,default) S3method(ultimate_oscillator,default) -S3method(weighted_moving_average,default) export(ACCBANDS) export(AD) export(ADOSC) @@ -67,10 +75,8 @@ export(chaikin_AD_oscillator) export(chart) export(doji) export(doji_star) -export(double_exponential_moving_average) export(dragonfly_doji) export(evening_doji_star) -export(exponential_moving_average) export(fast_stochastic) export(ht_dcperiod) export(ht_dcphase) @@ -79,15 +85,9 @@ export(ht_sine) export(ht_trendline) export(ht_trendmode) export(indicator) -export(kaufman_adaptive_moving_average) -export(mesa_adaptive_moving_average) export(moving_average_convergence_divergence) export(relative_strength_index) export(stochastic) export(stochastic_relative_strength_index) -export(t3_moving_average) -export(triangular_moving_average) -export(triple_exponential_moving_average) export(ultimate_oscillator) -export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/chart.R b/R/chart.R index 2e4852263..8407c82cd 100644 --- a/R/chart.R +++ b/R/chart.R @@ -1,3 +1,5 @@ +#' @title Chart +#' #' @export chart <- function( x, diff --git a/R/chart_indicator.R b/R/chart_indicator.R index a1143e90c..8b60bffe7 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,3 +1,4 @@ +#' @title indicator #' @export indicator <- function( .f, diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index bd8e1f13d..49e17dbea 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -2,13 +2,18 @@ #' #' @family Overlap Study #' +#' @templateVar .FUN DEMA +#' @template univariate_example +#' #' @export -double_exponential_moving_average <- function(x, n = 10, ...) { - UseMethod("double_exponential_moving_average") +DEMA <- function(x, n = 10, ...) { + UseMethod("DEMA") } +#' @rdname DEMA +#' @usage NULL #' @export -double_exponential_moving_average.default <- function(x, n = 10, ...) { +DEMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -34,5 +39,37 @@ double_exponential_moving_average.default <- function(x, n = 10, ...) { ) } +#' @rdname DEMA +#' @usage NULL #' @export -DEMA <- double_exponential_moving_average +DEMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + dema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 3L + ) + + df <- data.frame( + idx = seq_along(dema), + dema = as.numeric(dema) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~dema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("DEMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 49403ea3d..1e48f148e 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -1,14 +1,20 @@ #' @title Exponential Moving Average (EMA) #' @family Overlap Study +#' +#' @templateVar .FUN DEMA +#' @template univariate_example +#' #' @export -exponential_moving_average <- function(x, n = 10, ...) { +EMA <- function(x, n = 10, ...) { UseMethod( - "exponential_moving_average" + "EMA" ) } +#' @rdname EMA +#' @usage NULL #' @export -exponential_moving_average.default <- function(x, n = 10, ...) { +EMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -34,5 +40,37 @@ exponential_moving_average.default <- function(x, n = 10, ...) { ) } +#' @rdname EMA +#' @usage NULL #' @export -EMA <- exponential_moving_average +EMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + ema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 1L + ) + + df <- data.frame( + idx = seq_along(ema), + ema = as.numeric(ema) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~ema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("EMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index dad57454f..d0b91b58d 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -1,12 +1,14 @@ #' @title Kaufman’s Adaptive Moving Average (KAMA) #' @family Overlap Study #' @export -kaufman_adaptive_moving_average <- function(x, n = 10, ...) { - UseMethod("kaufman_adaptive_moving_average") +KAMA <- function(x, n = 10, ...) { + UseMethod("KAMA") } +#' @rdname KAMA +#' @usage NULL #' @export -kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { +KAMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -32,5 +34,37 @@ kaufman_adaptive_moving_average.default <- function(x, n = 10, ...) { ) } +#' @rdname KAMA +#' @usage NULL #' @export -KAMA <- kaufman_adaptive_moving_average +KAMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + kama <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) + + df <- data.frame( + idx = seq_along(kama), + kama = as.numeric(kama) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~kama, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("KAMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index 2ebd924d9..d787249cb 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -2,12 +2,14 @@ #' #' @family Overlap Study #' @export -mesa_adaptive_moving_average <- function(x, n = 10, ...) { - UseMethod("mesa_adaptive_moving_average") +MAMA <- function(x, n = 10, ...) { + UseMethod("MAMA") } +#' @rdname MAMA +#' @usage NULL #' @export -mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { +MAMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -33,5 +35,37 @@ mesa_adaptive_moving_average.default <- function(x, n = 10, ...) { ) } +#' @rdname MAMA +#' @usage NULL #' @export -MAMA <- mesa_adaptive_moving_average +MAMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + mama <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 7L + ) + + df <- data.frame( + idx = seq_along(mama), + mama = as.numeric(mama) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~mama, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("MAMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 844fb04a8..99323fd9a 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -16,6 +16,8 @@ SMA <- function(x, n = 10, ...) { ) } +#' @rdname SMA +#' @usage NULL #' @export SMA.default <- function(x, n = 10, ...) { ## default behaviour is to @@ -43,19 +45,16 @@ SMA.default <- function(x, n = 10, ...) { ) } -#' @title Simple Moving Average (SMA) -#' -#' @description -#' A short description... -#' +#' @rdname SMA +#' @usage NULL #' @export SMA.plotly <- function(x, n = 10, ...) { dots <- list(...) - series <- dots$.series[, 1L] + series <- dots$.series sma <- .Call( "impl_ta_MA", - as.double(series), + .univariate_series(series), as.integer(n), 0L ) diff --git a/R/ta_T3.R b/R/ta_T3.R index b7b4694a7..190070a30 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -1,12 +1,14 @@ #' @title T3 Moving Average (T3) #' @family Overlap Study #' @export -t3_moving_average <- function(x, n = 10, ...) { - UseMethod("t3_moving_average") +T3 <- function(x, n = 10, ...) { + UseMethod("T3") } +#' @rdname T3 +#' @usage NULL #' @export -t3_moving_average.default <- function(x, n = 10, ...) { +T3.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -32,5 +34,37 @@ t3_moving_average.default <- function(x, n = 10, ...) { ) } +#' @rdname T3 +#' @usage NULL #' @export -T3 <- t3_moving_average +T3.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + t3 <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 8L + ) + + df <- data.frame( + idx = seq_along(t3), + t3 = as.numeric(t3) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~t3, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("T3(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index eccb66448..507de7e61 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -1,12 +1,14 @@ #' @title Triple Exponential Moving Average (TEMA) #' @family Overlap Study #' @export -triple_exponential_moving_average <- function(x, n = 10, ...) { - UseMethod("triple_exponential_moving_average") +TEMA <- function(x, n = 10, ...) { + UseMethod("TEMA") } +#' @rdname TEMA +#' @usage NULL #' @export -triple_exponential_moving_average.default <- function(x, n = 10, ...) { +TEMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -32,5 +34,37 @@ triple_exponential_moving_average.default <- function(x, n = 10, ...) { ) } +#' @rdname TEMA +#' @usage NULL #' @export -TEMA <- triple_exponential_moving_average +TEMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + tema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 4L + ) + + df <- data.frame( + idx = seq_along(tema), + tema = as.numeric(tema) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~tema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TEMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index 7f718a387..e8f774fc9 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -1,12 +1,14 @@ #' @title Triangular Moving Average (TRIMA) #' @family Overlap Study #' @export -triangular_moving_average <- function(x, n = 10, ...) { - UseMethod("triangular_moving_average") +TRIMA <- function(x, n = 10, ...) { + UseMethod("TRIMA") } +#' @rdname TRIMA +#' @usage NULL #' @export -triangular_moving_average.default <- function(x, n = 10, ...) { +TRIMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -32,5 +34,38 @@ triangular_moving_average.default <- function(x, n = 10, ...) { ) } + +#' @rdname TRIMA +#' @usage NULL #' @export -TRIMA <- triangular_moving_average +TRIMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + trima <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) + + df <- data.frame( + idx = seq_along(trima), + trima = as.numeric(trima) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~trima, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/ta_WMA.R b/R/ta_WMA.R index bdb412583..ef5f18417 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -1,14 +1,16 @@ #' @title Weighted Moving Average (WMA) #' @family Overlap Study #' @export -weighted_moving_average <- function(x, n = 10, ...) { +WMA <- function(x, n = 10, ...) { UseMethod( - "weighted_moving_average" + "WMA" ) } +#' @rdname WMA +#' @usage NULL #' @export -weighted_moving_average.default <- function(x, n = 10, ...) { +WMA.default <- function(x, n = 10, ...) { ## default behaviour is to ## check if its a numeric vector ## @@ -34,5 +36,38 @@ weighted_moving_average.default <- function(x, n = 10, ...) { ) } + +#' @rdname WMA +#' @usage NULL #' @export -WMA <- weighted_moving_average +WMA.plotly <- function(x, n = 10, ...) { + dots <- list(...) + series <- dots$.series + + wma <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) + + df <- data.frame( + idx = seq_along(wma), + wma = as.numeric(wma) + ) + + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~wma, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) + + .plotting_environment$main +} diff --git a/R/utils.R b/R/utils.R index cda05bf1a..1ef93d988 100644 --- a/R/utils.R +++ b/R/utils.R @@ -131,3 +131,11 @@ is.number <- function(x) { reclass <- function(x, ...) { class(x) <- c(class(x), ...) } + + +## series +.univariate_series <- function(x) { + as.double( + x[, 1L] + ) +} diff --git a/_pkgdown.yml b/_pkgdown.yml index d71acfb90..c9644b364 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,50 @@ -url: ~ +home: + title: R bindings for TA-Lib + + description: > + {talib}: R bindings for TA-Lib. Technical Analysis indicators and Candlestick pattern recognition. + +navbar: + inverse: true + template: bootstrap: 5 + light-switch: true + bslib: + primary: "#0054AD" + border-radius: 0.5rem + btn-border-radius: 0.25rem + danger: "#A6081A" + +reference: +- title: Candlestick Patterns + desc: > + The collenction of Candlestick Patterns +- contents: has_concept('Pattern Recognition') + +- title: Momentum Indicators + desc: > + The collenction of momentum indicators +- contents: has_concept('Momentum Indicator') + +- title: Overlap Studies + desc: > + The collenction of Overlap Studies +- contents: has_concept('Overlap Study') + +- title: Cycle Indicators + desc: > + The collenction of Cycle Indicators +- contents: has_concept('Cycle Indicator') + +- title: Volume Indicators + desc: > + The collenction of Volume Indicators +- contents: has_concept('Volume Indicator') +- title: Financial Charts + desc: > + Charting functions + contents: + - chart + - indicator \ No newline at end of file diff --git a/man-roxygen/univariate_example.R b/man-roxygen/univariate_example.R new file mode 100644 index 000000000..14518843d --- /dev/null +++ b/man-roxygen/univariate_example.R @@ -0,0 +1,20 @@ +#' @examples +#' ## calculate values +#' result <- talib::<%= .FUN %>( +#' x = talib::BTC[,1L] +#' ) +#' +#' tail(result) +#' +#' ## charting the indicator +#' { +#' ## main chart +#' talib::chart(talib::BTC) +#' +#' ## indicator +#' talib::indicator( +#' .f = talib::<%= .FUN %>(), +#' .var = ~close +#' ) +#' } + diff --git a/man/DEMA.Rd b/man/DEMA.Rd new file mode 100644 index 000000000..caf9a0b1f --- /dev/null +++ b/man/DEMA.Rd @@ -0,0 +1,47 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_DEMA.R +\name{DEMA} +\alias{DEMA} +\alias{DEMA.default} +\alias{DEMA.plotly} +\title{Double Exponential Moving Average (DEMA)} +\usage{ +DEMA(x, n = 10, ...) +} +\description{ +Double Exponential Moving Average (DEMA) +} +\examples{ +## calculate values +result <- talib::DEMA( + x = talib::BTC[,1L] +) + +tail(result) + +## charting the indicator +{ + ## main chart + talib::chart(talib::BTC) + + ## indicator + talib::indicator( + .f = talib::DEMA(), + .var = ~close + ) +} +} +\seealso{ +Other Overlap Study: +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/EMA.Rd b/man/EMA.Rd new file mode 100644 index 000000000..bb3773e0a --- /dev/null +++ b/man/EMA.Rd @@ -0,0 +1,47 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_EMA.R +\name{EMA} +\alias{EMA} +\alias{EMA.default} +\alias{EMA.plotly} +\title{Exponential Moving Average (EMA)} +\usage{ +EMA(x, n = 10, ...) +} +\description{ +Exponential Moving Average (EMA) +} +\examples{ +## calculate values +result <- talib::DEMA( + x = talib::BTC[,1L] +) + +tail(result) + +## charting the indicator +{ + ## main chart + talib::chart(talib::BTC) + + ## indicator + talib::indicator( + .f = talib::DEMA(), + .var = ~close + ) +} +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/KAMA.Rd b/man/KAMA.Rd new file mode 100644 index 000000000..bd9e2ab56 --- /dev/null +++ b/man/KAMA.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_KAMA.R +\name{KAMA} +\alias{KAMA} +\alias{KAMA.default} +\alias{KAMA.plotly} +\title{Kaufman’s Adaptive Moving Average (KAMA)} +\usage{ +KAMA(x, n = 10, ...) +} +\description{ +Kaufman’s Adaptive Moving Average (KAMA) +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/MAMA.Rd b/man/MAMA.Rd new file mode 100644 index 000000000..885d4b34e --- /dev/null +++ b/man/MAMA.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MAMA.R +\name{MAMA} +\alias{MAMA} +\alias{MAMA.default} +\alias{MAMA.plotly} +\title{Mesa Adaptive Moving Average (MAMA)} +\usage{ +MAMA(x, n = 10, ...) +} +\description{ +Mesa Adaptive Moving Average (MAMA) +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/SMA.Rd b/man/SMA.Rd index c4a0302aa..d23ea5a9b 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -2,6 +2,8 @@ % Please edit documentation in R/ta_SMA.R \name{SMA} \alias{SMA} +\alias{SMA.default} +\alias{SMA.plotly} \title{Simple Moving Average (SMA)} \usage{ SMA(x, n = 10, ...) @@ -18,15 +20,15 @@ A short description... } \seealso{ Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} +\code{\link{bollinger_bands}()} } \concept{Overlap Study} diff --git a/man/SMA.plotly.Rd b/man/SMA.plotly.Rd deleted file mode 100644 index b23be3328..000000000 --- a/man/SMA.plotly.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_SMA.R -\name{SMA.plotly} -\alias{SMA.plotly} -\title{Simple Moving Average (SMA)} -\usage{ -\method{SMA}{plotly}(x, n = 10, ...) -} -\description{ -A short description... -} diff --git a/man/T3.Rd b/man/T3.Rd new file mode 100644 index 000000000..c430784a5 --- /dev/null +++ b/man/T3.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_T3.R +\name{T3} +\alias{T3} +\alias{T3.default} +\alias{T3.plotly} +\title{T3 Moving Average (T3)} +\usage{ +T3(x, n = 10, ...) +} +\description{ +T3 Moving Average (T3) +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/TEMA.Rd b/man/TEMA.Rd new file mode 100644 index 000000000..7c854d2ef --- /dev/null +++ b/man/TEMA.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_TEMA.R +\name{TEMA} +\alias{TEMA} +\alias{TEMA.default} +\alias{TEMA.plotly} +\title{Triple Exponential Moving Average (TEMA)} +\usage{ +TEMA(x, n = 10, ...) +} +\description{ +Triple Exponential Moving Average (TEMA) +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/TRIMA.Rd b/man/TRIMA.Rd new file mode 100644 index 000000000..131e8a6a6 --- /dev/null +++ b/man/TRIMA.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_TRIMA.R +\name{TRIMA} +\alias{TRIMA} +\alias{TRIMA.default} +\alias{TRIMA.plotly} +\title{Triangular Moving Average (TRIMA)} +\usage{ +TRIMA(x, n = 10, ...) +} +\description{ +Triangular Moving Average (TRIMA) +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/WMA.Rd b/man/WMA.Rd new file mode 100644 index 000000000..31d223344 --- /dev/null +++ b/man/WMA.Rd @@ -0,0 +1,27 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_WMA.R +\name{WMA} +\alias{WMA} +\alias{WMA.default} +\alias{WMA.plotly} +\title{Weighted Moving Average (WMA)} +\usage{ +WMA(x, n = 10, ...) +} +\description{ +Weighted Moving Average (WMA) +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\concept{Overlap Study} diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 6f4d575c3..0477de71e 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -11,15 +11,15 @@ Acceleration Bands } \seealso{ Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, \code{\link{SMA}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{bollinger_bands}()} } \concept{Overlap Study} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index c28c3c0d5..aa3fb0433 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -11,15 +11,15 @@ Bollinger Bands } \seealso{ Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, \code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()} } \concept{Overlap Study} diff --git a/man/chart.Rd b/man/chart.Rd new file mode 100644 index 000000000..ca7682466 --- /dev/null +++ b/man/chart.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/chart.R +\name{chart} +\alias{chart} +\title{Chart} +\usage{ +chart(x, type = "candlestick", ...) +} +\description{ +Chart +} diff --git a/man/double_exponential_moving_average.Rd b/man/double_exponential_moving_average.Rd deleted file mode 100644 index c0163b4b8..000000000 --- a/man/double_exponential_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_DEMA.R -\name{double_exponential_moving_average} -\alias{double_exponential_moving_average} -\title{Double Exponential Moving Average (DEMA)} -\usage{ -double_exponential_moving_average(x, n = 10, ...) -} -\description{ -Double Exponential Moving Average (DEMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/exponential_moving_average.Rd b/man/exponential_moving_average.Rd deleted file mode 100644 index c47f4238f..000000000 --- a/man/exponential_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_EMA.R -\name{exponential_moving_average} -\alias{exponential_moving_average} -\title{Exponential Moving Average (EMA)} -\usage{ -exponential_moving_average(x, n = 10, ...) -} -\description{ -Exponential Moving Average (EMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/indicator.Rd b/man/indicator.Rd new file mode 100644 index 000000000..0ea97c24b --- /dev/null +++ b/man/indicator.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/chart_indicator.R +\name{indicator} +\alias{indicator} +\title{indicator} +\usage{ +indicator(.f, .var, ...) +} +\description{ +indicator +} diff --git a/man/kaufman_adaptive_moving_average.Rd b/man/kaufman_adaptive_moving_average.Rd deleted file mode 100644 index 714c3fb92..000000000 --- a/man/kaufman_adaptive_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_KAMA.R -\name{kaufman_adaptive_moving_average} -\alias{kaufman_adaptive_moving_average} -\title{Kaufman’s Adaptive Moving Average (KAMA)} -\usage{ -kaufman_adaptive_moving_average(x, n = 10, ...) -} -\description{ -Kaufman’s Adaptive Moving Average (KAMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/mesa_adaptive_moving_average.Rd b/man/mesa_adaptive_moving_average.Rd deleted file mode 100644 index 0a95a28ff..000000000 --- a/man/mesa_adaptive_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MAMA.R -\name{mesa_adaptive_moving_average} -\alias{mesa_adaptive_moving_average} -\title{Mesa Adaptive Moving Average (MAMA)} -\usage{ -mesa_adaptive_moving_average(x, n = 10, ...) -} -\description{ -Mesa Adaptive Moving Average (MAMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/t3_moving_average.Rd b/man/t3_moving_average.Rd deleted file mode 100644 index 8b36285fb..000000000 --- a/man/t3_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_T3.R -\name{t3_moving_average} -\alias{t3_moving_average} -\title{T3 Moving Average (T3)} -\usage{ -t3_moving_average(x, n = 10, ...) -} -\description{ -T3 Moving Average (T3) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/triangular_moving_average.Rd b/man/triangular_moving_average.Rd deleted file mode 100644 index cdbeea663..000000000 --- a/man/triangular_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_TRIMA.R -\name{triangular_moving_average} -\alias{triangular_moving_average} -\title{Triangular Moving Average (TRIMA)} -\usage{ -triangular_moving_average(x, n = 10, ...) -} -\description{ -Triangular Moving Average (TRIMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triple_exponential_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/triple_exponential_moving_average.Rd b/man/triple_exponential_moving_average.Rd deleted file mode 100644 index 029c983d4..000000000 --- a/man/triple_exponential_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_TEMA.R -\name{triple_exponential_moving_average} -\alias{triple_exponential_moving_average} -\title{Triple Exponential Moving Average (TEMA)} -\usage{ -triple_exponential_moving_average(x, n = 10, ...) -} -\description{ -Triple Exponential Moving Average (TEMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{weighted_moving_average}()} -} -\concept{Overlap Study} diff --git a/man/weighted_moving_average.Rd b/man/weighted_moving_average.Rd deleted file mode 100644 index cb1316472..000000000 --- a/man/weighted_moving_average.Rd +++ /dev/null @@ -1,25 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_WMA.R -\name{weighted_moving_average} -\alias{weighted_moving_average} -\title{Weighted Moving Average (WMA)} -\usage{ -weighted_moving_average(x, n = 10, ...) -} -\description{ -Weighted Moving Average (WMA) -} -\seealso{ -Other Overlap Study: -\code{\link{SMA}()}, -\code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()}, -\code{\link{double_exponential_moving_average}()}, -\code{\link{exponential_moving_average}()}, -\code{\link{kaufman_adaptive_moving_average}()}, -\code{\link{mesa_adaptive_moving_average}()}, -\code{\link{t3_moving_average}()}, -\code{\link{triangular_moving_average}()}, -\code{\link{triple_exponential_moving_average}()} -} -\concept{Overlap Study} From 0667edad5ee89c548ca60cf964caa6cfaeca39d2 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:55:28 +0200 Subject: [PATCH 077/166] Random Commit * This commit is before I switched laptops. The accbands are broken. --- NAMESPACE | 1 + R/ta_ACCBANDS.R | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ R/utils.R | 31 ++++++++++++-------- 3 files changed, 98 insertions(+), 12 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 12df07de9..b131fb8df 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -19,6 +19,7 @@ S3method(TRIMA,plotly) S3method(WMA,default) S3method(WMA,plotly) S3method(acceleration_bands,default) +S3method(acceleration_bands,plotly) S3method(aroon,default) S3method(aroon_oscillator,default) S3method(bollinger_bands,default) diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index bb7b5070d..fe2d6f835 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -37,3 +37,81 @@ acceleration_bands.default <- function(x, n = 10, ...) { as.integer(n) ) } + +#' @export +acceleration_bands.plotly <- function( + x, + n = 10, + ... +) { + ## This function + passed_arguments <- list( + ... + ) + + ## extract data + HLC <- passed_arguments$.series + + assert( + ncol(HLC) == 3, + "Acceleration bands uses 3 columns. Found ", + ncol(HLC) + ) + + ## calculate acceleration + ## bands + .indicator <- .Call( + "impl_ta_ACCBANDS", + .high(HLC), + .low(HLC), + .close(HLC), + as.integer(n) + ) + + ## convert to data.frame + data_frame <- data.frame( + idx = seq_along(.indicator), + ) + + ## generate plot + .chart <- .plotting_environment$main + + for (i in seq_len(ncol(HLC))) { + local({ + j <- i + + .plotting_environment$main <- plotly::add_lines( + .chart, + data = data_frame, + x = ~idx, + y = ~ .value[, j], + inherit = FALSE, + line = list( + color = '#4682b4' + ), + showlegend = FALSE, + legendgroup = 'acceleration_band', + name = c("Upper Band", "Middle Band", "Lower Band")[j], + ) + }) + } + + .plotting_environment$main <- plotly::add_ribbons( + p = .plotting_environment$main, + inherit = FALSE, + x = ~ seq_len(nrow(.value)), + ymin = ~ .value[, 3], + ymax = ~ .value[, 1], + fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + line = list( + color = "transparent" + ), + showlegend = TRUE, + legendgroup = 'acceleration_band', + name = paste0( + "ACCBANDS" + ) + ) + + .plotting_environment$main +} diff --git a/R/utils.R b/R/utils.R index 1ef93d988..704d86bda 100644 --- a/R/utils.R +++ b/R/utils.R @@ -24,22 +24,29 @@ flatten <- function(x) { } } - -## extractors -.open <- function(x) { - x[, 1] +## extract open, high, low, close +## and volume by position +## +## offset if idx is present +## +## NOTE: Offset is like scratching your +## left ear with your right arm +## only added for backwards compatibility +## - should remove it. +.open <- function(x, offset = FALSE) { + x[, 1L + as.integer(offset)] } -.high <- function(x) { - x[, 2] +.high <- function(x, offset = FALSE) { + x[, 2L + as.integer(offset)] } -.low <- function(x) { - x[, 3] +.low <- function(x), offset = FALSE { + x[, 3L + as.integer(offset)] } -.close <- function(x) { - x[, 4] +.close <- function(x, offset = FALSE) { + x[, 4L + as.integer(offset)] } -.volume <- function(x) { - x[, 5] +.volume <- function(x, offset = FALSE) { + x[, 5L + as.integer(offset)] } ## map MAs From 2acbd37a4f8464a17a67ec00a3348ec38bb89413 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 27 Aug 2025 05:09:46 +0200 Subject: [PATCH 078/166] :hammer: Updated Configure * It now works when the project is reset. It most likely will not work on windows --- configure | 71 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 20 deletions(-) diff --git a/configure b/configure index b71ce8591..dd64fb176 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #!/bin/sh ## 1) Purpose and setup -## Purpose: Detect or build TA-Lib and emit src/Makevars with correct flags. -## Supports: system TA-Lib (via pkg-config or probe) or vendored in-tree build. +## Purpose: Detect or build TA-Lib and emit src/Makevars with correct flags. +## Supports: system TA-Lib (via pkg-config or probe) or vendored in-tree build. TA_LIB_SRC="src/ta-lib" TA_LIB_PREFIX="$(cd "$TA_LIB_SRC" && pwd)/local" USE_SYSTEM=0 @@ -10,7 +10,6 @@ PKG_CPPFLAGS="" PKG_LIBS="" ## 2) Locate system TA-Lib via pkg-config -## If TA-Lib provides a pkg-config file, use it for canonical flags. if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists ta-lib; then PKG_CPPFLAGS="$(pkg-config --cflags ta-lib)" LIBDIRS=$(pkg-config --libs-only-L ta-lib | sed 's/-L//g') @@ -18,30 +17,62 @@ if command -v pkg-config >/dev/null 2>&1 && pkg-config --exists ta-lib; then for d in $LIBDIRS; do PKG_LIBS="$PKG_LIBS -Wl,-rpath,$d" done + EXTRA_INC="" + for tok in $PKG_CPPFLAGS; do + case "$tok" in + -I*/ta-lib) + path=${tok#-I}; parent=$(dirname "$path") + EXTRA_INC="$EXTRA_INC -I$parent" + ;; + esac + done + PKG_CPPFLAGS="$PKG_CPPFLAGS$EXTRA_INC" USE_SYSTEM=1 echo "configure: using system TA-Lib via pkg-config with rpath to: $LIBDIRS" else - ## 3) Probe system TA-Lib by compile/link test - ## Fallback: compile a tiny program against -lta-lib to detect presence. + ## 3) Probe system TA-Lib by compile/link test (robust) + ## NOTE: Only succeed if BOTH headers and a linkable library exist. echo "configure: probing for system TA-Lib" cat <<'EOF' > conftest.c -#include +#include int main(void){ return 0; } EOF - if cc conftest.c -o conftest -lta-lib >/dev/null 2>&1; then - PKG_CPPFLAGS="" - PKG_LIBS="-lta-lib" - USE_SYSTEM=1 - echo "configure: found system TA-Lib by test compile" - else - echo "configure: system TA-Lib not found" - fi + USE_SYSTEM=0 + # Try common include and lib locations and both library names. + INC_CANDIDATES="/usr/include/ta-lib /usr/local/include/ta-lib /opt/homebrew/include/ta-lib /opt/local/include/ta-lib" + LIB_CANDIDATES="/usr/lib /usr/local/lib /opt/homebrew/lib /opt/local/lib" + for lname in ta_lib ta-lib; do + for inc in $INC_CANDIDATES ""; do + [ -n "$inc" ] && [ ! -f "$inc/ta_func.h" ] && continue + for libdir in $LIB_CANDIDATES ""; do + CPPFLAG_TRY="" + LIBFLAG_TRY="-l${lname}" + [ -n "$inc" ] && CPPFLAG_TRY="-I$inc" + [ -n "$libdir" ] && LIBFLAG_TRY="-L$libdir $LIBFLAG_TRY" + if cc conftest.c -o conftest $CPPFLAG_TRY $LIBFLAG_TRY >/dev/null 2>&1; then + PKG_CPPFLAGS="$CPPFLAG_TRY" + if [ -n "$inc" ]; then + parent=$(dirname "$inc") + PKG_CPPFLAGS="$PKG_CPPFLAGS -I$parent" + fi + PKG_LIBS="$LIBFLAG_TRY -lm -lpthread -ldl" + if [ -n "$libdir" ]; then + PKG_LIBS="$PKG_LIBS -Wl,-rpath,$libdir" + fi + USE_SYSTEM=1 + echo "configure: found system TA-Lib (${lname})${inc:+, headers at $inc}${libdir:+, libs at $libdir}" + break 3 + fi + done + done + done + [ "$USE_SYSTEM" -eq 0 ] && echo "configure: system TA-Lib not usable (missing headers and/or library)" rm -f conftest conftest.c fi ## 4) Vendored build fallback (build TA-Lib in-tree) -## If no usable system TA-Lib was found, bootstrap and build the bundled copy. +## If no usable system TA-Lib was found, bootstrap and build the bundled copy. if [ "$USE_SYSTEM" -eq 0 ]; then echo "configure: building vendored TA-Lib in-tree" @@ -63,14 +94,14 @@ if [ "$USE_SYSTEM" -eq 0 ]; then fi fi - ./configure --prefix="$TA_LIB_PREFIX" + CFLAGS="${CFLAGS:+$CFLAGS }-fPIC" ./configure --prefix="$TA_LIB_PREFIX" make -j2 make install cd - >/dev/null ## 5) Normalize static archive name - ## Handle TA-Lib naming change: libta-lib.a vs libta_lib.a + ## Handle TA-Lib naming change: libta-lib.a vs libta_lib.a if [ -f "$TA_LIB_PREFIX/lib/libta-lib.a" ]; then TA_LIB_STATIC="$TA_LIB_PREFIX/lib/libta-lib.a" elif [ -f "$TA_LIB_PREFIX/lib/libta_lib.a" ]; then @@ -81,12 +112,12 @@ if [ "$USE_SYSTEM" -eq 0 ]; then fi ## 6) Set flags for vendored build - PKG_CPPFLAGS="-I$TA_LIB_PREFIX/include" - PKG_LIBS="$TA_LIB_STATIC -lpthread -ldl" + PKG_CPPFLAGS="-I$TA_LIB_PREFIX/include -I$TA_LIB_PREFIX/include/ta-lib" + PKG_LIBS="$TA_LIB_STATIC -lm -lpthread -ldl" fi ## 7) Emit src/Makevars -## Write resolved include and linker flags so R build uses them directly. +## Write resolved include and linker flags so R build uses them directly. echo "configure: writing src/Makevars" cat < src/Makevars # autogenerated by configure From dc79cacf76f05cb7f13c6e3cafc4f69c343695f9 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 27 Aug 2025 05:10:26 +0200 Subject: [PATCH 079/166] :hammer: Updated utils.R * A minor bug in syntax --- R/utils.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index 704d86bda..505adcbde 100644 --- a/R/utils.R +++ b/R/utils.R @@ -39,7 +39,7 @@ flatten <- function(x) { .high <- function(x, offset = FALSE) { x[, 2L + as.integer(offset)] } -.low <- function(x), offset = FALSE { +.low <- function(x, offset = FALSE) { x[, 3L + as.integer(offset)] } .close <- function(x, offset = FALSE) { @@ -145,4 +145,4 @@ reclass <- function(x, ...) { as.double( x[, 1L] ) -} +} \ No newline at end of file From 978fd30442894bde8a55cd896caaf5965e2f1c5c Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 27 Aug 2025 18:53:41 +0200 Subject: [PATCH 080/166] :hammer: New utility functions * series: a wrapper of model.frame with fast-tracks to avoid overhead. * is.formula: to check if its a formula --- R/utils.R | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index 505adcbde..65448f49b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -145,4 +145,51 @@ reclass <- function(x, ...) { as.double( x[, 1L] ) -} \ No newline at end of file +} + +is.formula <- function(x) { + inherits(x, "formula") +} + + +series <- function( + formula, + formula_default, + data, + ... +) { + ## coerce to data.frame + ## for downstream compatibility + if (!is.data.frame(data)) { + data <- as.data.frame( + data + ) + } + + ## if the formula is missing + ## replace with the default + ## value + if (missing(formula)) { + formula <- formula_default + } + + ## if additional arguments are + ## not passed we extract the data + ## by name to avoid the additional + ## cost of model.frame + if (...length() == 0) { + output <- data[, + all.vars(formula), + drop = FALSE + ] + } else { + ## return data.frame + output <- model.frame( + formula = formula, + data = data, + ... + ) + } + + return(output) +} From 90ede8b92035be54edb3b3043ca7f574dde7620f Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 27 Aug 2025 19:46:13 +0200 Subject: [PATCH 081/166] :hammer: Ported ACCBANDS to new interface --- R/ta_ACCBANDS.R | 118 +++++++++++++++++++++++++------------- man/acceleration_bands.Rd | 2 +- 2 files changed, 78 insertions(+), 42 deletions(-) diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index fe2d6f835..1b96cbe89 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -3,41 +3,73 @@ #' @family Overlap Study #' #' @export -acceleration_bands <- function(x, n = 10, ...) { +acceleration_bands <- function( + x, + n = 10, + cols, + ... +) { UseMethod("acceleration_bands") } +#' @aliases acceleration_bands #' @export ACCBANDS <- acceleration_bands #' @export -acceleration_bands.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) +acceleration_bands.default <- function( + x, + cols, + n = 10, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 3, + paste0( + "'cols' has to be length 3. ", + "Got length ", + length(all.vars(cols)) + ) + ) } - assert(is.numeric(x)) + + HLC <- series( + formula = cols, + formula_default = ~ open + high + close, + data = x, + ... + ) + assert(n >= 2) ## 1) pass `x` assuming that it ## follows OHLC-V structure - .Call( - "impl_ta_ACCBANDS", - .high(x), - .low(x), - .close(x), - as.integer(n) + as.data.frame( + .Call( + "impl_ta_ACCBANDS", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) + ) ) } +#' @aliases acceleration_bands #' @export acceleration_bands.plotly <- function( x, @@ -59,32 +91,35 @@ acceleration_bands.plotly <- function( ) ## calculate acceleration - ## bands - .indicator <- .Call( - "impl_ta_ACCBANDS", - .high(HLC), - .low(HLC), - .close(HLC), - as.integer(n) - ) - - ## convert to data.frame - data_frame <- data.frame( - idx = seq_along(.indicator), + ## bands and return as + ## data.frame + .indicator <- as.data.frame( + .Call( + "impl_ta_ACCBANDS", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) + ) ) - ## generate plot - .chart <- .plotting_environment$main + .indicator$idx <- 1:nrow(.indicator) + ## add upper, middle and lower bands + ## to the main chart - wrapped in local + ## to circumvent lazy evaluation. + ## + ## NOTE: Otherwise it will only evaluate + ## and add the last element for (i in seq_len(ncol(HLC))) { local({ j <- i .plotting_environment$main <- plotly::add_lines( - .chart, - data = data_frame, + .plotting_environment$main, + data = .indicator, x = ~idx, - y = ~ .value[, j], + y = ~ .indicator[, j], inherit = FALSE, line = list( color = '#4682b4' @@ -99,9 +134,10 @@ acceleration_bands.plotly <- function( .plotting_environment$main <- plotly::add_ribbons( p = .plotting_environment$main, inherit = FALSE, - x = ~ seq_len(nrow(.value)), - ymin = ~ .value[, 3], - ymax = ~ .value[, 1], + data = .indicator, + x = ~idx, + ymin = ~ .indicator[, 3], + ymax = ~ .indicator[, 1], fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), line = list( color = "transparent" @@ -109,7 +145,7 @@ acceleration_bands.plotly <- function( showlegend = TRUE, legendgroup = 'acceleration_band', name = paste0( - "ACCBANDS" + "Acceleration Bands" ) ) diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 0477de71e..d1e0d8aef 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -4,7 +4,7 @@ \alias{acceleration_bands} \title{Acceleration Bands} \usage{ -acceleration_bands(x, n = 10, ...) +acceleration_bands(x, n = 10, cols, ...) } \description{ Acceleration Bands From c9df18e93752609ff77f05b3c891135c54dd37ab Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 27 Aug 2025 19:46:47 +0200 Subject: [PATCH 082/166] :hammer: Reformatted zzz.R --- R/zzz.R | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/R/zzz.R b/R/zzz.R index d94b34baa..648cd4e43 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -9,17 +9,14 @@ ) .onAttach <- function( - libname, - pkgname, - ...) { - -} + libname, + pkgname, + ... +) {} .onDetach <- function( - libpath, - ...) { - - -} + libpath, + ... +) {} -# script end; \ No newline at end of file +# script end; From 022c1839a9bd0ad97fcf11c82e40b654e5d66621 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 27 Aug 2025 19:52:03 +0200 Subject: [PATCH 083/166] :hammer: Formatted workspace folder --- R/chart_elements.R | 10 +- R/chart_options.R | 30 +- R/ta_ACCBANDS.R | 224 ++++++------- R/ta_AD.R | 20 +- R/ta_ADOSC.R | 24 +- R/ta_AROON.R | 38 +-- R/ta_AROONOSC.R | 38 +-- R/ta_BBANDS.R | 168 +++++----- R/ta_CDLDOJI.R | 22 +- R/ta_CDLDOJISTAR.R | 22 +- R/ta_CDLDRAGONFLYDOJI.R | 22 +- R/ta_CDLEVENINGDOJISTAR.R | 24 +- R/ta_DEMA.R | 94 +++--- R/ta_EMA.R | 98 +++--- R/ta_HT_DCPERIOD.R | 10 +- R/ta_HT_DCPHASE.R | 10 +- R/ta_HT_PHASOR.R | 10 +- R/ta_HT_SINE.R | 10 +- R/ta_HT_TRENDLINE.R | 10 +- R/ta_HT_TRENDMODE.R | 10 +- R/ta_KAMA.R | 94 +++--- R/ta_MAMA.R | 94 +++--- R/ta_RSI.R | 100 +++--- R/ta_STOCH.R | 42 +-- R/ta_STOCHF.R | 42 +-- R/ta_STOCHRSI.R | 44 +-- R/ta_T3.R | 94 +++--- R/ta_TEMA.R | 94 +++--- R/ta_TRIMA.R | 94 +++--- R/ta_ULTOSC.R | 60 ++-- R/ta_WMA.R | 98 +++--- R/talib-package.R | 8 +- data-raw/BTC.R | 14 +- data-raw/SPY.R | 24 +- tests/testthat/test-ta_ACCBANDS.R | 10 +- tests/testthat/test-ta_BBANDS.R | 10 +- tests/testthat/test-ta_CDLDOJI.R | 12 +- tests/testthat/test-ta_CDLDOJISTAR.R | 14 +- tests/testthat/test-ta_CDLDRAGONFLYDOJI.R | 14 +- tests/testthat/test-ta_CDLEVENINGDOJISTAR.R | 12 +- tests/testthat/test-ta_MA.R | 344 ++++++++++---------- tests/testthat/test-ta_MACD.R | 37 +-- 42 files changed, 1105 insertions(+), 1144 deletions(-) diff --git a/R/chart_elements.R b/R/chart_elements.R index f397d91cb..27890c798 100644 --- a/R/chart_elements.R +++ b/R/chart_elements.R @@ -8,7 +8,7 @@ plotly::layout( p = x, paper_bgcolor = chart_theme$paper_bgcolor, - plot_bgcolor = chart_theme$plot_bgcolor, + plot_bgcolor = chart_theme$plot_bgcolor, font = list( size = 14 * getOption("talib.chart.scale", default = 1), color = chart_theme$font_color @@ -21,7 +21,6 @@ rangeslider = list( visible = getOption("talib.chart.slider", default = FALSE), thickness = getOption("talib.chart.slider.size", default = 0.05) - ) ), @@ -31,7 +30,7 @@ orientation = 'h', x = 0, y = 100, - yref="container", + yref = "container", title = list( text = "Indicators:", font = list( @@ -52,8 +51,7 @@ xanchor = "right" ), ## title end - + ... ) - -} \ No newline at end of file +} diff --git a/R/chart_options.R b/R/chart_options.R index 1c072cb88..add4f2c40 100644 --- a/R/chart_options.R +++ b/R/chart_options.R @@ -1,33 +1,31 @@ ## chart theme chart.theme <- function() { - ## bull or bear colors if (getOption("talib.chart.deficiency", default = FALSE)) { - bull_color = "#5d8ca8" - bear_color = "#d3ba68" + bull_color = "#5d8ca8" + bear_color = "#d3ba68" } else { - bull_color = "#65a479" - bear_color = "#d5695d" - + bull_color = "#65a479" + bear_color = "#d5695d" } if (getOption("talib.chart.dark", default = TRUE)) { list( paper_bgcolor = '#2b3139', - plot_bgcolor = '#2b3139', - font_color = '#848e9c', - grid_color = '#40454c', - bull_color = bull_color, - bear_color = bear_color + plot_bgcolor = '#2b3139', + font_color = '#848e9c', + grid_color = '#40454c', + bull_color = bull_color, + bear_color = bear_color ) } else { list( paper_bgcolor = '#E3E3E3', - plot_bgcolor = '#E3E3E3', - font_color = '#A3A3A3', - grid_color = '#D3D3D3', - bull_color = bull_color, - bear_color = bear_color + plot_bgcolor = '#E3E3E3', + font_color = '#A3A3A3', + grid_color = '#D3D3D3', + bull_color = bull_color, + bear_color = bear_color ) } } diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 1b96cbe89..1f5c2393c 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -4,12 +4,12 @@ #' #' @export acceleration_bands <- function( - x, - n = 10, - cols, - ... + x, + n = 10, + cols, + ... ) { - UseMethod("acceleration_bands") + UseMethod("acceleration_bands") } #' @aliases acceleration_bands @@ -18,136 +18,136 @@ ACCBANDS <- acceleration_bands #' @export acceleration_bands.default <- function( - x, - cols, - n = 10, - ... + x, + cols, + n = 10, + ... ) { - ## check input - ## cols if passed - if (!missing(cols)) { - assert( - is.formula(cols), - paste0( - "'cols' has to be <", - class(~s), - ">. ", - "Got <", - class(cols), - ">." - ) - ) - assert( - length(all.vars(cols)) == 3, - paste0( - "'cols' has to be length 3. ", - "Got length ", - length(all.vars(cols)) - ) - ) - } - - HLC <- series( - formula = cols, - formula_default = ~ open + high + close, - data = x, - ... + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) ) + assert( + length(all.vars(cols)) == 3, + paste0( + "'cols' has to be length 3. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + HLC <- series( + formula = cols, + formula_default = ~ open + high + close, + data = x, + ... + ) - assert(n >= 2) + assert(n >= 2) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - as.data.frame( - .Call( - "impl_ta_ACCBANDS", - HLC[[1]], - HLC[[2]], - HLC[[3]], - as.integer(n) - ) + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + as.data.frame( + .Call( + "impl_ta_ACCBANDS", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) ) + ) } #' @aliases acceleration_bands #' @export acceleration_bands.plotly <- function( - x, - n = 10, - ... + x, + n = 10, + ... ) { - ## This function - passed_arguments <- list( - ... - ) + ## This function + passed_arguments <- list( + ... + ) - ## extract data - HLC <- passed_arguments$.series + ## extract data + HLC <- passed_arguments$.series - assert( - ncol(HLC) == 3, - "Acceleration bands uses 3 columns. Found ", - ncol(HLC) - ) + assert( + ncol(HLC) == 3, + "Acceleration bands uses 3 columns. Found ", + ncol(HLC) + ) - ## calculate acceleration - ## bands and return as - ## data.frame - .indicator <- as.data.frame( - .Call( - "impl_ta_ACCBANDS", - HLC[[1]], - HLC[[2]], - HLC[[3]], - as.integer(n) - ) + ## calculate acceleration + ## bands and return as + ## data.frame + .indicator <- as.data.frame( + .Call( + "impl_ta_ACCBANDS", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) ) + ) - .indicator$idx <- 1:nrow(.indicator) + .indicator$idx <- 1:nrow(.indicator) - ## add upper, middle and lower bands - ## to the main chart - wrapped in local - ## to circumvent lazy evaluation. - ## - ## NOTE: Otherwise it will only evaluate - ## and add the last element - for (i in seq_len(ncol(HLC))) { - local({ - j <- i + ## add upper, middle and lower bands + ## to the main chart - wrapped in local + ## to circumvent lazy evaluation. + ## + ## NOTE: Otherwise it will only evaluate + ## and add the last element + for (i in seq_len(ncol(HLC))) { + local({ + j <- i - .plotting_environment$main <- plotly::add_lines( - .plotting_environment$main, - data = .indicator, - x = ~idx, - y = ~ .indicator[, j], - inherit = FALSE, - line = list( - color = '#4682b4' - ), - showlegend = FALSE, - legendgroup = 'acceleration_band', - name = c("Upper Band", "Middle Band", "Lower Band")[j], - ) - }) - } - - .plotting_environment$main <- plotly::add_ribbons( - p = .plotting_environment$main, - inherit = FALSE, + .plotting_environment$main <- plotly::add_lines( + .plotting_environment$main, data = .indicator, x = ~idx, - ymin = ~ .indicator[, 3], - ymax = ~ .indicator[, 1], - fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + y = ~ .indicator[, j], + inherit = FALSE, line = list( - color = "transparent" + color = '#4682b4' ), - showlegend = TRUE, + showlegend = FALSE, legendgroup = 'acceleration_band', - name = paste0( - "Acceleration Bands" - ) + name = c("Upper Band", "Middle Band", "Lower Band")[j], + ) + }) + } + + .plotting_environment$main <- plotly::add_ribbons( + p = .plotting_environment$main, + inherit = FALSE, + data = .indicator, + x = ~idx, + ymin = ~ .indicator[, 3], + ymax = ~ .indicator[, 1], + fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + line = list( + color = "transparent" + ), + showlegend = TRUE, + legendgroup = 'acceleration_band', + name = paste0( + "Acceleration Bands" ) + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_AD.R b/R/ta_AD.R index f72fa3269..35f9409ec 100644 --- a/R/ta_AD.R +++ b/R/ta_AD.R @@ -5,9 +5,9 @@ #' #' @export chaikin_AD_line <- function(x, ...) { - UseMethod( - "chaikin_AD_line" - ) + UseMethod( + "chaikin_AD_line" + ) } #' @export @@ -15,11 +15,11 @@ AD <- chaikin_AD_line #' @export chaikin_AD_line.default <- function(x, ...) { - .Call( - "impl_ta_AD", - .high(x), - .low(x), - .close(x), - .volume(x) - ) + .Call( + "impl_ta_AD", + .high(x), + .low(x), + .close(x), + .volume(x) + ) } diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R index 648f13ecf..bbe015823 100644 --- a/R/ta_ADOSC.R +++ b/R/ta_ADOSC.R @@ -4,9 +4,9 @@ #' #' @export chaikin_AD_oscillator <- function(x, fast = 3, slow = 10, ...) { - UseMethod( - "chaikin_AD_oscillator" - ) + UseMethod( + "chaikin_AD_oscillator" + ) } #' @export @@ -14,13 +14,13 @@ ADOSC <- chaikin_AD_oscillator #' @export chaikin_AD_oscillator.default <- function(x, fast = 3, slow = 10, ...) { - .Call( - "impl_ta_ADOSC", - .high(x), - .low(x), - .close(x), - .volume(x), - as.integer(fast), - as.integer(slow) - ) + .Call( + "impl_ta_ADOSC", + .high(x), + .low(x), + .close(x), + .volume(x), + as.integer(fast), + as.integer(slow) + ) } diff --git a/R/ta_AROON.R b/R/ta_AROON.R index ba2fd720d..cf4496b68 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -6,29 +6,29 @@ #' #' @export aroon <- function(x, n, ...) { - UseMethod( - generic = "aroon" - ) + UseMethod( + generic = "aroon" + ) } #' @export aroon.default <- function(x, n, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - assert(is.numeric(x)) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)) - ## 1) pass `x` assuming that - ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) - .Call("impl_ta_AROON", .high(x), .low(x), as.integer(n)) + ## 1) pass `x` assuming that + ## it follows Open (x[,1]), High (x[,2]) + ## Low (x[,3]) and Close (x[,4]) + .Call("impl_ta_AROON", .high(x), .low(x), as.integer(n)) } diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index 090a2713a..60fe6b5db 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -4,30 +4,30 @@ #' #' @export aroon_oscillator <- function(x, n, ...) { - UseMethod( - generic = "aroon_oscillator" - ) + UseMethod( + generic = "aroon_oscillator" + ) } #' @export aroon_oscillator.default <- function(x, n, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - assert(is.numeric(x)) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)) - ## 1) pass `x` assuming that - ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) + ## 1) pass `x` assuming that + ## it follows Open (x[,1]), High (x[,2]) + ## Low (x[,3]) and Close (x[,4]) - .Call("impl_ta_AROONOSC", .high(x), .low(x), as.integer(n)) + .Call("impl_ta_AROONOSC", .high(x), .low(x), as.integer(n)) } diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 30c7b7545..84e422bc0 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -4,9 +4,9 @@ #' #' @export bollinger_bands <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { - UseMethod( - generic = "bollinger_bands" - ) + UseMethod( + generic = "bollinger_bands" + ) } #' @export @@ -14,102 +14,102 @@ BBANDS <- bollinger_bands #' @export bollinger_bands.default <- function( - x, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - ma <- map_maType_call(substitute(ma)) + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + ma <- map_maType_call(substitute(ma)) - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - assert(is.numeric(x)) - assert(ma$n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)) + assert(ma$n >= 2) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - .Call( - "impl_ta_BBANDS", - x, - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) - ) + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( + "impl_ta_BBANDS", + x, + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) } #' @export bollinger_bands.plotly <- function( - x, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - ma <- map_maType_call(substitute(ma)) - ## extract arguments - ## from ellipsis - dots <- list(...) - series <- dots$.series + ma <- map_maType_call(substitute(ma)) + ## extract arguments + ## from ellipsis + dots <- list(...) + series <- dots$.series - ## extract chart objects - .chart <- .plotting_environment$price_chart - .value <- .Call( - "impl_ta_BBANDS", - series, - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) - ) - - ## constuct chart - ## element - for (i in seq_len(ncol(.value))) { - local({ - j <- i + ## extract chart objects + .chart <- .plotting_environment$price_chart + .value <- .Call( + "impl_ta_BBANDS", + series, + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) - .plotting_environment$main <- plotly::add_lines( - .plotting_environment$main, - x = ~ seq_len(nrow(.value)), - y = ~ .value[, j], - inherit = FALSE, - line = list( - color = '#4682b4' - ), - showlegend = FALSE, - legendgroup = 'bollinger_band', - name = c("Upper Band", "Middle Band", "Lower Band")[j], - ) - }) - } + ## constuct chart + ## element + for (i in seq_len(ncol(.value))) { + local({ + j <- i - .plotting_environment$main <- plotly::add_ribbons( - p = .plotting_environment$main, - inherit = FALSE, + .plotting_environment$main <- plotly::add_lines( + .plotting_environment$main, x = ~ seq_len(nrow(.value)), - ymin = ~ .value[, 3], - ymax = ~ .value[, 1], - fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + y = ~ .value[, j], + inherit = FALSE, line = list( - color = "transparent" + color = '#4682b4' ), - showlegend = TRUE, + showlegend = FALSE, legendgroup = 'bollinger_band', - name = paste0( - "BBand" - ) + name = c("Upper Band", "Middle Band", "Lower Band")[j], + ) + }) + } + + .plotting_environment$main <- plotly::add_ribbons( + p = .plotting_environment$main, + inherit = FALSE, + x = ~ seq_len(nrow(.value)), + ymin = ~ .value[, 3], + ymax = ~ .value[, 1], + fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + line = list( + color = "transparent" + ), + showlegend = TRUE, + legendgroup = 'bollinger_band', + name = paste0( + "BBand" ) + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index 3da1b61db..510685053 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export doji <- function(x, ...) { - UseMethod( - "doji" - ) + UseMethod( + "doji" + ) } #' @export @@ -12,12 +12,12 @@ CDLDOJI <- doji #' @export doji.default <- function(x, ...) { - .Call( - "impl_ta_CDLDOJI", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLDOJI", + .open(x), + .high(x), + .low(x), + .close(x), + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index 45df725cc..fdac3531d 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export doji_star <- function(x, ...) { - UseMethod( - "doji_star" - ) + UseMethod( + "doji_star" + ) } #' @export @@ -12,12 +12,12 @@ CDLDOJISTAR <- doji_star #' @export doji_star.default <- function(x, ...) { - .Call( - "impl_ta_CDLDOJISTAR", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLDOJISTAR", + .open(x), + .high(x), + .low(x), + .close(x), + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index 58e4aae55..57457418e 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export dragonfly_doji <- function(x, ...) { - UseMethod( - "dragonfly_doji" - ) + UseMethod( + "dragonfly_doji" + ) } #' @export @@ -12,12 +12,12 @@ CDLDRAGONFLYDOJI <- dragonfly_doji #' @export dragonfly_doji.default <- function(x, ...) { - .Call( - "impl_ta_CDLDRAGONFLYDOJI", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLDRAGONFLYDOJI", + .open(x), + .high(x), + .low(x), + .close(x), + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index c4021ce2f..3a0040ea3 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export evening_doji_star <- function(x, penetration = 0.1, ...) { - UseMethod( - "evening_doji_star" - ) + UseMethod( + "evening_doji_star" + ) } #' @export @@ -12,13 +12,13 @@ CDLEVENINGDOJISTAR <- evening_doji_star #' @export evening_doji_star.default <- function(x, penetration = 0.1, ...) { - .Call( - "impl_ta_CDLEVENINGDOJISTAR", - .open(x), - .high(x), - .low(x), - .close(x), - penetration, - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLEVENINGDOJISTAR", + .open(x), + .high(x), + .low(x), + .close(x), + penetration, + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index 49e17dbea..1474b069d 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -7,69 +7,69 @@ #' #' @export DEMA <- function(x, n = 10, ...) { - UseMethod("DEMA") + UseMethod("DEMA") } #' @rdname DEMA #' @usage NULL #' @export DEMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 3L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 3L + ) } #' @rdname DEMA #' @usage NULL #' @export DEMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - dema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 3L - ) + dema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 3L + ) - df <- data.frame( - idx = seq_along(dema), - dema = as.numeric(dema) - ) + df <- data.frame( + idx = seq_along(dema), + dema = as.numeric(dema) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~dema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("DEMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~dema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("DEMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 1e48f148e..08fcaeda4 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -6,71 +6,71 @@ #' #' @export EMA <- function(x, n = 10, ...) { - UseMethod( - "EMA" - ) + UseMethod( + "EMA" + ) } #' @rdname EMA #' @usage NULL #' @export EMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 1L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 1L + ) } #' @rdname EMA #' @usage NULL #' @export EMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - ema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 1L - ) + ema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 1L + ) - df <- data.frame( - idx = seq_along(ema), - ema = as.numeric(ema) - ) + df <- data.frame( + idx = seq_along(ema), + ema = as.numeric(ema) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~ema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("EMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~ema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("EMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R index cfc347cd9..4ea382699 100644 --- a/R/ta_HT_DCPERIOD.R +++ b/R/ta_HT_DCPERIOD.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_dcperiod <- function(x, ...) { - UseMethod("ht_dcperiod") + UseMethod("ht_dcperiod") } #' @export ht_dcperiod.default <- function(x, ...) { - .Call( - "impl_ta_HT_DCPERIOD", - as.numeric(x) - ) + .Call( + "impl_ta_HT_DCPERIOD", + as.numeric(x) + ) } diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R index 0a69ce2a3..8a5bb91bd 100644 --- a/R/ta_HT_DCPHASE.R +++ b/R/ta_HT_DCPHASE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_dcphase <- function(x, ...) { - UseMethod("ht_dcphase") + UseMethod("ht_dcphase") } #' @export ht_dcphase.default <- function(x, ...) { - .Call( - "impl_ta_HT_DCPHASE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_DCPHASE", + as.numeric(x) + ) } diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R index c3f28e0d6..865967ee0 100644 --- a/R/ta_HT_PHASOR.R +++ b/R/ta_HT_PHASOR.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_phasor <- function(x, ...) { - UseMethod("ht_phasor") + UseMethod("ht_phasor") } #' @export ht_phasor.default <- function(x, ...) { - .Call( - "impl_ta_HT_PHASOR", - as.numeric(x) - ) + .Call( + "impl_ta_HT_PHASOR", + as.numeric(x) + ) } diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R index b5f8ccaf7..6f3aa9ed8 100644 --- a/R/ta_HT_SINE.R +++ b/R/ta_HT_SINE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_sine <- function(x, ...) { - UseMethod("ht_sine") + UseMethod("ht_sine") } #' @export ht_sine.default <- function(x, ...) { - .Call( - "impl_ta_HT_SINE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_SINE", + as.numeric(x) + ) } diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R index 1ed1fb30b..f8a3d1d6e 100644 --- a/R/ta_HT_TRENDLINE.R +++ b/R/ta_HT_TRENDLINE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_trendline <- function(x, ...) { - UseMethod("ht_trendline") + UseMethod("ht_trendline") } #' @export ht_trendline.default <- function(x, ...) { - .Call( - "impl_ta_HT_TRENDLINE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_TRENDLINE", + as.numeric(x) + ) } diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R index 83b2a5201..7eaac1f1e 100644 --- a/R/ta_HT_TRENDMODE.R +++ b/R/ta_HT_TRENDMODE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_trendmode <- function(x, ...) { - UseMethod("ht_trendmode") + UseMethod("ht_trendmode") } #' @export ht_trendmode.default <- function(x, ...) { - .Call( - "impl_ta_HT_TRENDMODE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_TRENDMODE", + as.numeric(x) + ) } diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index d0b91b58d..b37bfc53d 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -2,69 +2,69 @@ #' @family Overlap Study #' @export KAMA <- function(x, n = 10, ...) { - UseMethod("KAMA") + UseMethod("KAMA") } #' @rdname KAMA #' @usage NULL #' @export KAMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 6L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 6L + ) } #' @rdname KAMA #' @usage NULL #' @export KAMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - kama <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L - ) + kama <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) - df <- data.frame( - idx = seq_along(kama), - kama = as.numeric(kama) - ) + df <- data.frame( + idx = seq_along(kama), + kama = as.numeric(kama) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~kama, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("KAMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~kama, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("KAMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index d787249cb..23d7d85f9 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -3,69 +3,69 @@ #' @family Overlap Study #' @export MAMA <- function(x, n = 10, ...) { - UseMethod("MAMA") + UseMethod("MAMA") } #' @rdname MAMA #' @usage NULL #' @export MAMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 7L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 7L + ) } #' @rdname MAMA #' @usage NULL #' @export MAMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - mama <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 7L - ) + mama <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 7L + ) - df <- data.frame( - idx = seq_along(mama), - mama = as.numeric(mama) - ) + df <- data.frame( + idx = seq_along(mama), + mama = as.numeric(mama) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~mama, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("MAMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~mama, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("MAMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 4b7e7efa0..198bcae13 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -2,9 +2,9 @@ #' @family Momentum Indicator #' @export relative_strength_index <- function(x, n = 10, ...) { - UseMethod( - "relative_strength_index" - ) + UseMethod( + "relative_strength_index" + ) } #' @export @@ -12,61 +12,61 @@ RSI <- relative_strength_index #' @export relative_strength_index.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_RSI", - x, - as.integer(n) - ) + ## 1) pass `x` to C + .Call( + "impl_ta_RSI", + x, + as.integer(n) + ) } #' @export relative_strength_index.plotly <- function( - x, - n = 10, - lower = 20, - upper = 80, - ... + x, + n = 10, + lower = 20, + upper = 80, + ... ) { - dots <- list(...) - series <- dots$.series[, 1L] - rsi <- .Call("impl_ta_RSI", as.double(series), as.integer(n)) - df <- data.frame(idx = seq_along(rsi), value = rsi) + dots <- list(...) + series <- dots$.series[, 1L] + rsi <- .Call("impl_ta_RSI", as.double(series), as.integer(n)) + df <- data.frame(idx = seq_along(rsi), value = rsi) - rsi_plot <- plotly::plot_ly( - df, - x = ~idx, - y = ~value, - type = "scatter", - mode = "lines", - showlegend = FALSE - ) - rsi_plot <- plotly::add_ribbons( - rsi_plot, - x = ~idx, - ymin = rep(lower, nrow(df)), - ymax = rep(upper, nrow(df)), - line = list(width = 0), - fillcolor = "rgba(160,160,160,0.20)" - ) + rsi_plot <- plotly::plot_ly( + df, + x = ~idx, + y = ~value, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + rsi_plot <- plotly::add_ribbons( + rsi_plot, + x = ~idx, + ymin = rep(lower, nrow(df)), + ymax = rep(upper, nrow(df)), + line = list(width = 0), + fillcolor = "rgba(160,160,160,0.20)" + ) - .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) + .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) - rsi_plot + rsi_plot } diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index 8e54b5d2f..a32cf780a 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -3,31 +3,31 @@ #' @family Momentum Indicator #' @export stochastic <- function(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) { - UseMethod( - "stochastic" - ) + UseMethod( + "stochastic" + ) } #' @export stochastic.default <- function( - x, - fastk, - slowk = SMA(n = 10), - slowd = SMA(n = 8), - ... + x, + fastk, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ... ) { - slowk_ma <- map_maType_call(substitute(slowk)) - slowd_ma <- map_maType_call(substitute(slowd)) + slowk_ma <- map_maType_call(substitute(slowk)) + slowd_ma <- map_maType_call(substitute(slowd)) - .Call( - "impl_ta_STOCH", - .high(x), - .low(x), - .close(x), - as.integer(fastk), # 4. optInFastK_Period - as.integer(slowk_ma$n), # 5. optInSlowK_Period - as.integer(slowk_ma$maType), # 6. optInSlowK_MAType - as.integer(slowd_ma$n), # 7. optInSlowD_Period - as.integer(slowd_ma$maType) # 8. optInSlowD_MAType - ) + .Call( + "impl_ta_STOCH", + .high(x), + .low(x), + .close(x), + as.integer(fastk), # 4. optInFastK_Period + as.integer(slowk_ma$n), # 5. optInSlowK_Period + as.integer(slowk_ma$maType), # 6. optInSlowK_MAType + as.integer(slowd_ma$n), # 7. optInSlowD_Period + as.integer(slowd_ma$maType) # 8. optInSlowD_MAType + ) } diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index 192e562c1..ea779a695 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -3,14 +3,14 @@ #' @family Momentum Indicator #' @export fast_stochastic <- function( - x, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - UseMethod( - "fast_stochastic" - ) + UseMethod( + "fast_stochastic" + ) } #' @export @@ -18,20 +18,20 @@ STOCHF <- fast_stochastic #' @export fast_stochastic.default <- function( - x, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - .Call( - "impl_ta_STOCHF", - .high(x), - .low(x), - .close(x), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) + .Call( + "impl_ta_STOCHF", + .high(x), + .low(x), + .close(x), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) } diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 998e857f7..fc0aa82ad 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -3,15 +3,15 @@ #' @family Momentum Indicator #' @export stochastic_relative_strength_index <- function( - x, - n, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - UseMethod( - "stochastic_relative_strength_index" - ) + UseMethod( + "stochastic_relative_strength_index" + ) } #' @export @@ -19,20 +19,20 @@ STOCHRSI <- stochastic_relative_strength_index #' @export stochastic_relative_strength_index.default <- function( - x, - n, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - .Call( - "impl_ta_STOCHRSI", - x, - as.integer(n), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) + .Call( + "impl_ta_STOCHRSI", + x, + as.integer(n), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) } diff --git a/R/ta_T3.R b/R/ta_T3.R index 190070a30..8bf6b58f3 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -2,69 +2,69 @@ #' @family Overlap Study #' @export T3 <- function(x, n = 10, ...) { - UseMethod("T3") + UseMethod("T3") } #' @rdname T3 #' @usage NULL #' @export T3.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 8L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 8L + ) } #' @rdname T3 #' @usage NULL #' @export T3.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - t3 <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 8L - ) + t3 <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 8L + ) - df <- data.frame( - idx = seq_along(t3), - t3 = as.numeric(t3) - ) + df <- data.frame( + idx = seq_along(t3), + t3 = as.numeric(t3) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~t3, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("T3(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~t3, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("T3(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index 507de7e61..87298c8fd 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -2,69 +2,69 @@ #' @family Overlap Study #' @export TEMA <- function(x, n = 10, ...) { - UseMethod("TEMA") + UseMethod("TEMA") } #' @rdname TEMA #' @usage NULL #' @export TEMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 4L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 4L + ) } #' @rdname TEMA #' @usage NULL #' @export TEMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - tema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 4L - ) + tema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 4L + ) - df <- data.frame( - idx = seq_along(tema), - tema = as.numeric(tema) - ) + df <- data.frame( + idx = seq_along(tema), + tema = as.numeric(tema) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~tema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TEMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~tema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TEMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index e8f774fc9..00787e997 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -2,36 +2,36 @@ #' @family Overlap Study #' @export TRIMA <- function(x, n = 10, ...) { - UseMethod("TRIMA") + UseMethod("TRIMA") } #' @rdname TRIMA #' @usage NULL #' @export TRIMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 5L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 5L + ) } @@ -39,33 +39,33 @@ TRIMA.default <- function(x, n = 10, ...) { #' @usage NULL #' @export TRIMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - trima <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L - ) + trima <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) - df <- data.frame( - idx = seq_along(trima), - trima = as.numeric(trima) - ) + df <- data.frame( + idx = seq_along(trima), + trima = as.numeric(trima) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~trima, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TRIMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~trima, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R index 603846b6e..abc644d2a 100644 --- a/R/ta_ULTOSC.R +++ b/R/ta_ULTOSC.R @@ -2,40 +2,40 @@ #' @family Momentum Indicator #' @export ultimate_oscillator <- function(x, n = c(7, 14, 28), ...) { - UseMethod( - "ultimate_oscillator" - ) + UseMethod( + "ultimate_oscillator" + ) } #' @export ultimate_oscillator.default <- function(x, n = c(7, 14, 28), ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - if (!length(n) < 3) { - stop("`n` has to be a vector of length 3") - } - assert(is.numeric(x)) - assert(all(n >= 1)) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + if (!length(n) < 3) { + stop("`n` has to be a vector of length 3") + } + assert(is.numeric(x)) + assert(all(n >= 1)) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - .Call( - .NAME = "impl_ta_ULTOSC", - .high(x), - .low(x), - .close(x), - as.integer(n[1]), - as.integer(n[2]), - as.integer(n[3]), - ) + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( + .NAME = "impl_ta_ULTOSC", + .high(x), + .low(x), + .close(x), + as.integer(n[1]), + as.integer(n[2]), + as.integer(n[3]), + ) } diff --git a/R/ta_WMA.R b/R/ta_WMA.R index ef5f18417..18f47079d 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -2,38 +2,38 @@ #' @family Overlap Study #' @export WMA <- function(x, n = 10, ...) { - UseMethod( - "WMA" - ) + UseMethod( + "WMA" + ) } #' @rdname WMA #' @usage NULL #' @export WMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 2L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 2L + ) } @@ -41,33 +41,33 @@ WMA.default <- function(x, n = 10, ...) { #' @usage NULL #' @export WMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - wma <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L - ) + wma <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) - df <- data.frame( - idx = seq_along(wma), - wma = as.numeric(wma) - ) + df <- data.frame( + idx = seq_along(wma), + wma = as.numeric(wma) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~wma, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TRIMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~wma, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/talib-package.R b/R/talib-package.R index ce2ec1ed1..59391fe5f 100644 --- a/R/talib-package.R +++ b/R/talib-package.R @@ -1,4 +1,4 @@ - ## usethis namespace: start - #' @useDynLib talib, .registration = TRUE - ## usethis namespace: end - NULL \ No newline at end of file +## usethis namespace: start +#' @useDynLib talib, .registration = TRUE +## usethis namespace: end +NULL diff --git a/data-raw/BTC.R b/data-raw/BTC.R index 6144976f3..3e72702f6 100644 --- a/data-raw/BTC.R +++ b/data-raw/BTC.R @@ -5,14 +5,14 @@ ## ## 0) load data BTC <- cryptoQuotes::get_quote( - ticker = "BTCUSDC", - futures = FALSE, - interval = "15m" + ticker = "BTCUSDC", + futures = FALSE, + interval = "15m" ) ## 1) convert to matrix BTC <- matrix( - data = BTC[,1:5], + data = BTC[, 1:5], ncol = 5, dimnames = list( rownames(BTC), @@ -22,8 +22,6 @@ BTC <- matrix( ## 2) store data usethis::use_data( - BTC, - overwrite = TRUE + BTC, + overwrite = TRUE ) - - diff --git a/data-raw/SPY.R b/data-raw/SPY.R index 14473e633..97fba54fb 100644 --- a/data-raw/SPY.R +++ b/data-raw/SPY.R @@ -5,22 +5,22 @@ ## ## 0) load data SPY <- quantmod::getSymbols( - Symbols = "SPY", - auto.assign = FALSE -)[,1:5] + Symbols = "SPY", + auto.assign = FALSE +)[, 1:5] ## 1) rename columns colnames(SPY) <- c( - "open", - "high" , - "low", - "close", - "volume" + "open", + "high", + "low", + "close", + "volume" ) ## 2) convert to matrix SPY <- matrix( - data = SPY[,1:5], + data = SPY[, 1:5], ncol = 5, dimnames = list( rownames(SPY), @@ -30,8 +30,6 @@ SPY <- matrix( ## 3) store data usethis::use_data( - SPY, - overwrite = TRUE + SPY, + overwrite = TRUE ) - - diff --git a/tests/testthat/test-ta_ACCBANDS.R b/tests/testthat/test-ta_ACCBANDS.R index 51521142e..8c487a637 100644 --- a/tests/testthat/test-ta_ACCBANDS.R +++ b/tests/testthat/test-ta_ACCBANDS.R @@ -1,17 +1,15 @@ ## script: ACCBANDS ## author: Serkan Korkmaz testthat::test_that(desc = "Acceleration Bands", code = { - ## 1) calculate values ## with and without alias output <- acceleration_bands(SPY) - alias <- ACCBANDS(SPY) + alias <- ACCBANDS(SPY) ## 1.1) check if the values ## are equal testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) - -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-ta_BBANDS.R b/tests/testthat/test-ta_BBANDS.R index 9f48058c6..589a1ce50 100644 --- a/tests/testthat/test-ta_BBANDS.R +++ b/tests/testthat/test-ta_BBANDS.R @@ -1,17 +1,15 @@ ## script: ta_BBANDS ## author: Serkan Korkmaz testthat::test_that(desc = "Bollinger Bands", code = { - ## 1) calculate values ## with and without alias output <- bollinger_bands(SPY) - alias <- BBANDS(SPY) + alias <- BBANDS(SPY) ## 1.1) check if the values ## are equal testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) - -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-ta_CDLDOJI.R b/tests/testthat/test-ta_CDLDOJI.R index be2d57d6a..f24964978 100644 --- a/tests/testthat/test-ta_CDLDOJI.R +++ b/tests/testthat/test-ta_CDLDOJI.R @@ -1,19 +1,18 @@ ## script: Doji ## author: Serkan Korkmaz testthat::test_that(desc = "Doji", code = { - ## 1) calculate values ## with and without alias ## without normalization options(talib.normalize = FALSE) output <- doji(SPY) - alias <- CDLDOJI(SPY) + alias <- CDLDOJI(SPY) ## 1.1) check if the values ## are equal testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) ## 1.2) check that the range @@ -22,7 +21,7 @@ testthat::test_that(desc = "Doji", code = { object = any(unique(output, na.rm = TRUE) %in% c(100)) ) - ## 1.3) recalculate with + ## 1.3) recalculate with ## normalization and check ## range is in [0, 1] options(talib.normalize = TRUE) @@ -33,5 +32,4 @@ testthat::test_that(desc = "Doji", code = { testthat::expect_true( object = any(unique(output, na.rm = TRUE) %in% c(1)) ) - -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-ta_CDLDOJISTAR.R b/tests/testthat/test-ta_CDLDOJISTAR.R index 758ecf153..42f1b78bf 100644 --- a/tests/testthat/test-ta_CDLDOJISTAR.R +++ b/tests/testthat/test-ta_CDLDOJISTAR.R @@ -1,19 +1,18 @@ ## script: Doji Star ## author: Serkan Korkmaz testthat::test_that(desc = "Doji Star", code = { - ## 1) calculate values ## with and without alias ## without normalization options(talib.normalize = FALSE) output <- doji_star(SPY) - alias <- CDLDOJISTAR(SPY) + alias <- CDLDOJISTAR(SPY) ## 1.1) check if the values ## are equal testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) ## 1.2) check that the range @@ -22,7 +21,7 @@ testthat::test_that(desc = "Doji Star", code = { object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) ) - ## 1.3) recalculate with + ## 1.3) recalculate with ## normalization and check ## range is in [-1, 1] options(talib.normalize = TRUE) @@ -31,7 +30,6 @@ testthat::test_that(desc = "Doji Star", code = { ## 1.4) check that the range ## is in [-1, 1] testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1 ,1)) + object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) ) - -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R index 19892b417..2d3aa041a 100644 --- a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R +++ b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R @@ -1,19 +1,18 @@ ## script: DRAGONFLYDOJI ## author: Serkan Korkmaz testthat::test_that(desc = "Dragonfly Doji", code = { - ## 1) calculate values ## with and without alias ## without normalization options(talib.normalize = FALSE) output <- dragonfly_doji(SPY) - alias <- CDLDRAGONFLYDOJI(SPY) + alias <- CDLDRAGONFLYDOJI(SPY) ## 1.1) check if the values ## are equal testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) ## 1.2) check that the range @@ -22,7 +21,7 @@ testthat::test_that(desc = "Dragonfly Doji", code = { object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) ) - ## 1.3) recalculate with + ## 1.3) recalculate with ## normalization and check ## range is in [-1, 1] options(talib.normalize = TRUE) @@ -31,7 +30,6 @@ testthat::test_that(desc = "Dragonfly Doji", code = { ## 1.4) check that the range ## is in [-1, 1] testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1 ,1)) + object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) ) - -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R index 9c6b5dd93..4358c8819 100644 --- a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R +++ b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R @@ -1,19 +1,18 @@ ## script: Evening Doji Star ## author: Serkan Korkmaz testthat::test_that(desc = "Evening Doji Star", code = { - ## 1) calculate values ## with and without alias ## without normalization options(talib.normalize = FALSE) output <- evening_doji_star(SPY) - alias <- CDLEVENINGDOJISTAR(SPY) + alias <- CDLEVENINGDOJISTAR(SPY) ## 1.1) check if the values ## are equal testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) ## 1.2) check that the range @@ -22,7 +21,7 @@ testthat::test_that(desc = "Evening Doji Star", code = { object = any(unique(output, na.rm = TRUE) %in% c(-100)) ) - ## 1.3) recalculate with + ## 1.3) recalculate with ## normalization and check ## range is in [-1, 0] options(talib.normalize = TRUE) @@ -33,5 +32,4 @@ testthat::test_that(desc = "Evening Doji Star", code = { testthat::expect_true( object = any(unique(output, na.rm = TRUE) %in% c(-1)) ) - -}) \ No newline at end of file +}) diff --git a/tests/testthat/test-ta_MA.R b/tests/testthat/test-ta_MA.R index 0936481f2..ca2419e01 100644 --- a/tests/testthat/test-ta_MA.R +++ b/tests/testthat/test-ta_MA.R @@ -1,208 +1,190 @@ ## script: MA ## author: Serkan Korkmaz testthat::test_that(desc = "Simple Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- simple_moving_average(SPY[,1]) - alias <- SMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- simple_moving_average(SPY[, 1]) + alias <- SMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Exponential Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- exponential_moving_average(SPY[,1]) - alias <- EMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- exponential_moving_average(SPY[, 1]) + alias <- EMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Weighted Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- weighted_moving_average(SPY[,1]) - alias <- WMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- weighted_moving_average(SPY[, 1]) + alias <- WMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Double Exponential Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- double_exponential_moving_average(SPY[,1]) - alias <- DEMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- double_exponential_moving_average(SPY[, 1]) + alias <- DEMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Triple Exponential Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- triple_exponential_moving_average(SPY[,1]) - alias <- TEMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- triple_exponential_moving_average(SPY[, 1]) + alias <- TEMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Triangular Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- triangular_moving_average(SPY[,1]) - alias <- TRIMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- triangular_moving_average(SPY[, 1]) + alias <- TRIMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Kaufman’s Adaptive Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- kaufman_adaptive_moving_average(SPY[,1]) - alias <- KAMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- kaufman_adaptive_moving_average(SPY[, 1]) + alias <- KAMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Mesa Adaptive Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- mesa_adaptive_moving_average(SPY[,1]) - alias <- MAMA(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - + ## 1) calculate values + ## with and without alias + output <- mesa_adaptive_moving_average(SPY[, 1]) + alias <- MAMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "T3 Moving Average", code = { - - ## 1) calculate values - ## with and without alias - output <- t3_moving_average(SPY[,1]) - alias <- T3(SPY[,1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) - -}) \ No newline at end of file + ## 1) calculate values + ## with and without alias + output <- t3_moving_average(SPY[, 1]) + alias <- T3(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) +}) diff --git a/tests/testthat/test-ta_MACD.R b/tests/testthat/test-ta_MACD.R index c55097d56..a65a05062 100644 --- a/tests/testthat/test-ta_MACD.R +++ b/tests/testthat/test-ta_MACD.R @@ -1,49 +1,48 @@ ## script: MACD ## author: Serkan Korkmaz testthat::test_that(desc = "MACD", code = { - ## 1) calculate values ## with and without alias - output <- moving_average_convergence_divergence(SPY[,1]) - alias <- MACD(SPY[,1]) + output <- moving_average_convergence_divergence(SPY[, 1]) + alias <- MACD(SPY[, 1]) ## 1.1) check if the values ## are equal is by default testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) - }) testthat::test_that(desc = "MACDFIX", code = { - ## 1) calculate values ## with and without alias - output <- moving_average_convergence_divergence(SPY[,1]) - alias <- MACDFIX(SPY[,1]) + output <- moving_average_convergence_divergence(SPY[, 1]) + alias <- MACDFIX(SPY[, 1]) ## 1.1) check if the values ## are equal is by default testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) - }) testthat::test_that(desc = "MACDEXT", code = { - ## 1) calculate values ## with and without alias - output <- moving_average_convergence_divergence(SPY[,1], EMA(n = 12), EMA(n = 26), EMA(n =9)) - alias <- MACDEXT(SPY[,1]) + output <- moving_average_convergence_divergence( + SPY[, 1], + EMA(n = 12), + EMA(n = 26), + EMA(n = 9) + ) + alias <- MACDEXT(SPY[, 1]) ## 1.1) check if the values ## are equal is by default testthat::expect_equal( - object = output, - expected = alias + object = output, + expected = alias ) - -}) \ No newline at end of file +}) From 3a0de92981e5dfd2ca3d7155fb8285fc1bcf47b7 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 28 Aug 2025 10:19:29 +0200 Subject: [PATCH 084/166] :hammer: updated interface * indicator is now more flexible * series is something else --- NAMESPACE | 2 + R/chart.R | 6 +- R/chart_indicator.R | 280 +++++++++----------------------------------- R/series.R | 85 ++++++++++++++ R/ta_ACCBANDS.R | 34 ++++-- man/indicator.Rd | 11 -- 6 files changed, 171 insertions(+), 247 deletions(-) create mode 100644 R/series.R delete mode 100644 man/indicator.Rd diff --git a/NAMESPACE b/NAMESPACE index b131fb8df..c126f24fa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -41,6 +41,8 @@ S3method(ht_trendmode,default) S3method(moving_average_convergence_divergence,default) S3method(relative_strength_index,default) S3method(relative_strength_index,plotly) +S3method(series,formula) +S3method(series,plotly) S3method(stochastic,default) S3method(stochastic_relative_strength_index,default) S3method(ultimate_oscillator,default) diff --git a/R/chart.R b/R/chart.R index 8407c82cd..8cb761fa4 100644 --- a/R/chart.R +++ b/R/chart.R @@ -15,6 +15,7 @@ chart <- function( chart.default <- function( x, type = "candlestick", + idx = NULL, ... ) { ## default chart function @@ -41,7 +42,9 @@ chart.default <- function( ## ## NOTE: it is also a hard requirement on ## {plotly} side - .plotting_environment$x <- data_frame <- as.data.frame(x) + x <- as.data.frame(x) + x$idx <- if (is.null(idx)) 1:nrow(x) else idx + .plotting_environment$x <- data_frame <- x ## generate price chart ## based on type. can be either @@ -55,6 +58,7 @@ chart.default <- function( price_chart <- plotly::plot_ly( data = data_frame, type = type, + x = ~idx, open = ~open, close = ~close, high = ~high, diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 8b60bffe7..21b1e3fde 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,259 +1,91 @@ -#' @title indicator #' @export -indicator <- function( - .f, - .var, - ... -) { - ## Indicator function - ## - ## Description - ## This function is essentially a wrapper - ## of model.matrix, model.frame and various indicator - ## functions in TA-lib. - ## - ## Argument - ## .f: The indicator function. Eg. talib::SMA() - ## .var: A formula indicating which variables (and data, optionally) - ## to pass into .f - ## ...: Additional arguments passed into model.matrix and model.frame - ## - ## NOTE: The function "works" and does what it is supposed to do. - ## but it needs some serious refactoring and modularization. +indicator <- function(.f, .var, ...) { parent_frame <- parent.frame() - ## parse and check formula - passed_formula <- eval.parent( - substitute(.var) - ) - - assert(inherits(passed_formula, "formula")) - environment(passed_formula) <- parent_frame + has_var <- !missing(.var) + if (has_var) { + var_expr <- eval.parent(substitute(.var)) + stopifnot(inherits(var_expr, "formula")) + environment(var_expr) <- parent_frame + } - ## resolve indicator function - ## allows for indicators - ## outside of {talib} provided the function has a .plotly - ## method. This might be a bad idea at this stage, and at any - ## stage really as {talib} can be added to the dependency list - ## for dispatching. - ## - ## TODO: Consider rewriting this section. It works but - ## at what cost? - .f_expression <- substitute(.f) + # Resolve .f (supports bare name, pkg::fun(), etc.) + f_call <- substitute(.f) pre_args <- list() - - if (!is.call(.f_expression)) { - ## fallback value + if (!is.call(f_call)) { f <- match.fun(eval.parent(substitute(.f))) - } - - if (is.call(.f_expression)) { - ## get expression - head <- .f_expression[[1L]] - + } else { + head <- f_call[[1L]] if (is.symbol(head)) { - f <- get( - x = as.character(head), - envir = parent_frame, - mode = "function" - ) - } else { - if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { - pkg <- as.character(head[[2L]]) - fun <- as.character(head[[3L]]) - - f <- if (as.character(head[[1L]]) == "::") { - getExportedValue(pkg, fun) - } else { - get(fun, envir = asNamespace(pkg), mode = "function") - } + f <- get(as.character(head), envir = parent_frame, mode = "function") + } else if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { + pkg <- as.character(head[[2L]]) + fun <- as.character(head[[3L]]) + f <- if (as.character(head[[1L]]) == "::") { + getExportedValue(pkg, fun) } else { - f <- eval(head, envir = parent_frame) + get(fun, envir = asNamespace(pkg), mode = "function") } + } else { + f <- eval(head, envir = parent_frame) } - - pre_args <- as.list(.f_expression)[-1L] - } - - ## resolve arguments - dots_mf <- as.list( - substitute(list(...)) - )[-1L] - - ## check if data has been passed - ## extract if not - elt_names <- names(dots_mf) - if (is.null(elt_names)) { - elt_names <- rep("", length(dots_mf)) - } - - if (!("data" %in% elt_names)) { - ## get the plotting environment - ## temporarily and extract the data - .env <- get0(".plotting_environment", inherits = TRUE) - - if (is.null(.env) || is.null(.env$x)) { - stop( - "No 'data' provided bla bla." - ) - } - - dots_mf$data <- .env$x + pre_args <- as.list(f_call)[-1L] } - ## construct series - ## based on .var - ## - ## NOTE: The series is passed - ## as a data.frame to dispacther - ## disected, calculate indicator - ## then converted to a data.frame again - # - ## This is not optimal. - series <- do.call( - what = model.frame, - args = c(list(formula = passed_formula), dots_mf), - envir = parent_frame - ) - - ## get plotting environment - .plotting_environment <- get0( - x = ".plotting_environment", - inherits = TRUE - ) - + # Ensure a base plot for .plotly methods + .plotting_environment <- get0(".plotting_environment", inherits = TRUE) if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { - ## if there is no main plot - ## we construct an empty plot to display only .plotting_environment$main <- .chart_layout( x = plotly::plotly_empty(), title_text = "fisk" ) } - - ## resolve plotting the - ## indicator and determine - ## functions .plot <- .plotting_environment$main - .output <- do.call( - what = f, - args = c( - ## first argument - ## for S3 dispatching - list(.plot), - - ## args for the indicator - ## function itself - pre_args, - - ## the series passed - ## via ellipsis - list(.series = series) - ), - - envir = parent_frame - ) - - ## handle plotly object - ## safely and securely - if (inherits(.output, "plotly")) { - ## construct panel - ## list for the subplots - panels <- c( - ## main panel - list(.plotting_environment$main), - ## sub panel - .plotting_environment$sub - ) - - ## check for shenanigans - ## of some sort - is_plotly <- vapply( - X = panels, - FUN = function(p) inherits(p, "plotly"), - FUN.VALUE = logical(1) - ) - - assert( - all(is_plotly) - ) - - # if (!all(is_plotly)) { - # bad <- which(!is_plotly) - # stop( - # sprintf( - # "Non-plotly passed to subplot at index/indices: %s", - # paste(bad, collapse = ", ") - # ), - # call. = FALSE - # ) - # } - - ## construct subplot - ## based on existing environment - ## - ## NOTE: this was originally - ## handled via dispatchers - ## but everything is rebuilt - ## recursively, so it makes better - ## sense to just "handle it here" - number_of_panels <- length(panels) - main_panel_height <- getOption( - "talib.chart.main", - default = 0.7 - ) + # Build call + dots <- as.list(substitute(list(...)))[-1L] + args <- c(list(.plot), pre_args) - heights <- if (number_of_panels > 1) { - ## calculate divisor - ## also used for lenght.out - ## values - divisor <- number_of_panels - 1 - - c( - main_panel_height, - rep( - x = (1 - main_panel_height) / (divisor), - divisor - ) - ) + # Only add the formula arg if provided + if (has_var) { + f_formals <- try(names(formals(f)), silent = TRUE) + if (inherits(f_formals, "try-error")) { + f_formals <- character() + } + formula_arg <- if ("cols" %in% f_formals) { + "cols" + } else if ("formula" %in% f_formals) { + "formula" + } else if (".var" %in% f_formals) { + ".var" } else { - ## The main panel will - ## be the entire thing - ## if only one panel is passed - 1 + "cols" } + args[[formula_arg]] <- var_expr + } + + out <- do.call(f, c(args, dots), envir = parent_frame) - ## construct the subplot - ## sequentially - ## - ## NOTE: Additional options and - ## configurations could be passed - ## here + if (inherits(out, "plotly")) { + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) + stopifnot(all(vapply( + panels, + function(p) inherits(p, "plotly"), + logical(1) + ))) + n <- length(panels) + main_h <- getOption("talib.chart.main", 0.7) + heights <- if (n > 1) c(main_h, rep((1 - main_h) / (n - 1), n - 1)) else 1 fig <- plotly::subplot( panels, - nrows = number_of_panels, + nrows = n, shareX = TRUE, margin = 0.02, heights = heights ) - - ## at this stage it is unclear - ## whether .$chart is actually needed - ## because plotly is a b*tch to work with - ## when it comes to subplots. - ## - ## TODO: Check if its possible to "update" - ## the charts incrementally. Might be something that - ## can be done downstream .plotting_environment$chart <- fig - return(fig) } - ## fallback to cases - ## where it is NOT a plotly - ## object. For development purposes - ## mainly. - .output + out } diff --git a/R/series.R b/R/series.R new file mode 100644 index 000000000..7d3059463 --- /dev/null +++ b/R/series.R @@ -0,0 +1,85 @@ +## script: series +## objective: create an S3 function +## for preparing data passed into C +## and plotly + +series <- function( + x, + default, + data, + ... +) { + UseMethod("series") +} + +## plotly series +#' @export +series.plotly <- function( + x, + formula, + default, + data, + ... +) { + ## if the data is not provided + ## extract the data from the plotly + ## object + ## + ## NOTE: If volume is missing + ## there might be an issue + if (missing(data)) { + ## extract data + data <- .plotting_environment$x + } + + series.formula( + x = formula, + default = default, + data = data, + ... + ) +} + +## formula series +#' @export +series.formula <- function( + x, + default, + data, + ... +) { + ## coerce to data.frame + ## for downstream compatibility + if (!is.data.frame(data)) { + data <- as.data.frame( + data + ) + } + + ## if the formula is missing + ## replace with the default + ## value + if (missing(x)) { + x <- default + } + + ## if additional arguments are + ## not passed we extract the data + ## by name to avoid the additional + ## cost of model.frame + if (...length() == 0) { + output <- data[, + all.vars(x), + drop = FALSE + ] + } else { + ## return data.frame + output <- model.frame( + formula = x, + data = data, + ... + ) + } + + return(output) +} diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 1f5c2393c..ee3b7c29c 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -48,8 +48,8 @@ acceleration_bands.default <- function( } HLC <- series( - formula = cols, - formula_default = ~ open + high + close, + x = cols, + default = ~ open + high + close, data = x, ... ) @@ -73,22 +73,34 @@ acceleration_bands.default <- function( #' @export acceleration_bands.plotly <- function( x, + cols, n = 10, + data, ... ) { - ## This function - passed_arguments <- list( + ## prepare series + ## from + HLC <- series( + x = x, + formula = cols, + default = ~ open + high + close, + data = data, ... ) - ## extract data - HLC <- passed_arguments$.series + # ## This function + # passed_arguments <- list( + # ... + # ) - assert( - ncol(HLC) == 3, - "Acceleration bands uses 3 columns. Found ", - ncol(HLC) - ) + # ## extract data + # HLC <- passed_arguments$.series + + # assert( + # ncol(HLC) == 3, + # "Acceleration bands uses 3 columns. Found ", + # ncol(HLC) + # ) ## calculate acceleration ## bands and return as diff --git a/man/indicator.Rd b/man/indicator.Rd deleted file mode 100644 index 0ea97c24b..000000000 --- a/man/indicator.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/chart_indicator.R -\name{indicator} -\alias{indicator} -\title{indicator} -\usage{ -indicator(.f, .var, ...) -} -\description{ -indicator -} From 9b9df5eb1583bf8cd5de99b9c2865eb9f0dee3b9 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 28 Aug 2025 10:19:56 +0200 Subject: [PATCH 085/166] :hammer: Moved series to separate script --- R/utils.R | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/R/utils.R b/R/utils.R index 65448f49b..82f678acc 100644 --- a/R/utils.R +++ b/R/utils.R @@ -150,46 +150,3 @@ reclass <- function(x, ...) { is.formula <- function(x) { inherits(x, "formula") } - - -series <- function( - formula, - formula_default, - data, - ... -) { - ## coerce to data.frame - ## for downstream compatibility - if (!is.data.frame(data)) { - data <- as.data.frame( - data - ) - } - - ## if the formula is missing - ## replace with the default - ## value - if (missing(formula)) { - formula <- formula_default - } - - ## if additional arguments are - ## not passed we extract the data - ## by name to avoid the additional - ## cost of model.frame - if (...length() == 0) { - output <- data[, - all.vars(formula), - drop = FALSE - ] - } else { - ## return data.frame - output <- model.frame( - formula = formula, - data = data, - ... - ) - } - - return(output) -} From 0c3b9889ab70e4c07a198aec4a621de1ec32e55e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 28 Aug 2025 10:27:12 +0200 Subject: [PATCH 086/166] :hammer: Changed argument names --- R/chart_indicator.R | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 21b1e3fde..3b8b29ee2 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,19 +1,22 @@ #' @export -indicator <- function(.f, .var, ...) { +indicator <- function( + FUN, + cols, + ... +) { parent_frame <- parent.frame() - has_var <- !missing(.var) + has_var <- !missing(cols) if (has_var) { - var_expr <- eval.parent(substitute(.var)) + var_expr <- eval.parent(substitute(cols)) stopifnot(inherits(var_expr, "formula")) environment(var_expr) <- parent_frame } - # Resolve .f (supports bare name, pkg::fun(), etc.) - f_call <- substitute(.f) + f_call <- substitute(FUN) pre_args <- list() if (!is.call(f_call)) { - f <- match.fun(eval.parent(substitute(.f))) + f <- match.fun(eval.parent(substitute(FUN))) } else { head <- f_call[[1L]] if (is.symbol(head)) { @@ -40,6 +43,7 @@ indicator <- function(.f, .var, ...) { title_text = "fisk" ) } + .plot <- .plotting_environment$main # Build call @@ -56,8 +60,8 @@ indicator <- function(.f, .var, ...) { "cols" } else if ("formula" %in% f_formals) { "formula" - } else if (".var" %in% f_formals) { - ".var" + } else if ("cols" %in% f_formals) { + "cols" } else { "cols" } From 418ed4dce1e364e4314f80b2964e48c2af07ed80 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 28 Aug 2025 10:39:43 +0200 Subject: [PATCH 087/166] :hammer: Added some lose comments --- R/chart_indicator.R | 82 +++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 43 deletions(-) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 3b8b29ee2..e1c8ab7fc 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -4,8 +4,18 @@ indicator <- function( cols, ... ) { + ## indicator + ## + ## description: + ## the indicator function builds upon existing + ## {plotly} objects if it has been defined, otherwise + ## it will create a standalone chart with the indicator + ## only parent_frame <- parent.frame() + ## resolve passed formula + ## via 'cols' and store in the + ## parent_frame has_var <- !missing(cols) if (has_var) { var_expr <- eval.parent(substitute(cols)) @@ -13,31 +23,29 @@ indicator <- function( environment(var_expr) <- parent_frame } + ## resolve the call + ## passed via FUN f_call <- substitute(FUN) pre_args <- list() - if (!is.call(f_call)) { - f <- match.fun(eval.parent(substitute(FUN))) - } else { - head <- f_call[[1L]] - if (is.symbol(head)) { - f <- get(as.character(head), envir = parent_frame, mode = "function") - } else if (is.call(head) && as.character(head[[1L]]) %in% c("::", ":::")) { - pkg <- as.character(head[[2L]]) - fun <- as.character(head[[3L]]) - f <- if (as.character(head[[1L]]) == "::") { - getExportedValue(pkg, fun) - } else { - get(fun, envir = asNamespace(pkg), mode = "function") - } - } else { - f <- eval(head, envir = parent_frame) - } + if (is.call(f_call)) { + f <- eval(f_call[[1L]], envir = parent_frame) pre_args <- as.list(f_call)[-1L] + } else { + f <- match.fun(eval.parent(f_call)) } - # Ensure a base plot for .plotly methods + ## resolve plotting + ## environment; if it exists + ## it means talib::chart has been called + ## otherwise generate a new environment and + ## work off of that .plotting_environment <- get0(".plotting_environment", inherits = TRUE) - if (is.null(.plotting_environment) || is.null(.plotting_environment$main)) { + if (is.null(.plotting_environment)) { + .plotting_environment <- new.env(parent = emptyenv()) + assign(".plotting_environment", .plotting_environment, inherits = TRUE) + } + + if (is.null(.plotting_environment$main)) { .plotting_environment$main <- .chart_layout( x = plotly::plotly_empty(), title_text = "fisk" @@ -46,37 +54,25 @@ indicator <- function( .plot <- .plotting_environment$main - # Build call + ## build the FUN call + ## with argument and let the + ## the dispatcher handle the rest dots <- as.list(substitute(list(...)))[-1L] args <- c(list(.plot), pre_args) - # Only add the formula arg if provided if (has_var) { - f_formals <- try(names(formals(f)), silent = TRUE) - if (inherits(f_formals, "try-error")) { - f_formals <- character() - } - formula_arg <- if ("cols" %in% f_formals) { - "cols" - } else if ("formula" %in% f_formals) { - "formula" - } else if ("cols" %in% f_formals) { - "cols" - } else { - "cols" - } - args[[formula_arg]] <- var_expr + f_formals <- tryCatch(names(formals(f)), error = function(e) character()) + name <- intersect(c("cols", "formula"), f_formals)[1] + if (!is.na(name)) args[[name]] <- var_expr } - out <- do.call(f, c(args, dots), envir = parent_frame) + output <- do.call(f, c(args, dots), envir = parent_frame) - if (inherits(out, "plotly")) { + ## construct plotly object + ## if based off of the char + if (inherits(output, "plotly")) { panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - stopifnot(all(vapply( - panels, - function(p) inherits(p, "plotly"), - logical(1) - ))) + stopifnot(all(vapply(panels, inherits, logical(1), what = "plotly"))) n <- length(panels) main_h <- getOption("talib.chart.main", 0.7) heights <- if (n > 1) c(main_h, rep((1 - main_h) / (n - 1), n - 1)) else 1 @@ -91,5 +87,5 @@ indicator <- function( return(fig) } - out + output } From f8639edce7b87a4e2838a1a291b60e8b8c456cd4 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 28 Aug 2025 17:53:05 +0200 Subject: [PATCH 088/166] :hammer: Updated SMA * It takes all S3 methods now. --- NAMESPACE | 4 +- R/ta_SMA.R | 117 +++++++++++++++++++++++++++++++++++++++++++---------- man/SMA.Rd | 1 - 3 files changed, 98 insertions(+), 24 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index c126f24fa..91c36d9f3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,7 +8,9 @@ S3method(KAMA,default) S3method(KAMA,plotly) S3method(MAMA,default) S3method(MAMA,plotly) -S3method(SMA,default) +S3method(SMA,data.frame) +S3method(SMA,matrix) +S3method(SMA,numeric) S3method(SMA,plotly) S3method(T3,default) S3method(T3,plotly) diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 99323fd9a..6f6c4117c 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -10,41 +10,114 @@ #' @family Overlap Study #' #' @export -SMA <- function(x, n = 10, ...) { +SMA <- function( + x, + n = 10, + ... +) { UseMethod( "SMA" ) } -#' @rdname SMA -#' @usage NULL #' @export -SMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a vector") - } - assert(is.number(x)) - assert(n >= 2) - - ## 1) pass `x` to C +SMA.numeric <- function( + x, + n = 10, + ... +) { .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 0L ) } +#' @export +SMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + ## extract series + ## as and convert to list + ## for vapply + if (missing(cols)) { + cols <- ~open + } + + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + ## calculate output + ## using vapply + x <- as.data.frame(vapply( + as.list(x), + FUN = function(x) { + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + )) + + colnames(x) <- paste0("sma_", colnames(x)) + + x +} + +#' @export +SMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + ## extract series + ## as and convert to list + ## for vapply + if (missing(cols)) { + cols <- ~open + } + + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + ## calculate output + ## using vapply + x <- as.matrix(vapply( + as.list(x), + FUN = function(x) { + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + )) + + colnames(x) <- paste0("sma_", colnames(x)) + + x +} + #' @rdname SMA #' @usage NULL #' @export diff --git a/man/SMA.Rd b/man/SMA.Rd index d23ea5a9b..86c1c3479 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -2,7 +2,6 @@ % Please edit documentation in R/ta_SMA.R \name{SMA} \alias{SMA} -\alias{SMA.default} \alias{SMA.plotly} \title{Simple Moving Average (SMA)} \usage{ From d7e340fccea3f0a78284440212fe1f3ba4b23693 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 07:28:34 +0200 Subject: [PATCH 089/166] :hammer: Updated Data * The embedded data have been updated and documented. * {pkgdown} documentation have been updated accordingly. --- R/BTC.R | 26 ++++++++++++++++++++++++++ R/SPY.R | 26 ++++++++++++++++++++++++++ _pkgdown.yml | 9 ++++++++- data-raw/BTC.R | 13 +++++-------- data-raw/SPY.R | 4 +++- data/BTC.rda | Bin 4545 -> 9370 bytes data/SPY.rda | Bin 64910 -> 7795 bytes man/BTC.Rd | 29 +++++++++++++++++++++++++++++ man/SPY.Rd | 29 +++++++++++++++++++++++++++++ 9 files changed, 126 insertions(+), 10 deletions(-) create mode 100644 R/BTC.R create mode 100644 R/SPY.R create mode 100644 man/BTC.Rd create mode 100644 man/SPY.Rd diff --git a/R/BTC.R b/R/BTC.R new file mode 100644 index 000000000..a084ca314 --- /dev/null +++ b/R/BTC.R @@ -0,0 +1,26 @@ +#' @name BTC +#' @title Bitcoin (BTC) +#' +#' @description +#' USDC denominated Bitcoin (BTC) in daily intervals between +#' 2024-01-01 and 2024-12-31. +#' +#' @format A [data.frame] with 366 rows and 5 columns. +#' +#' \describe{ +#' \item{open}{Candle opening price.} +#' \item{high}{Candle highest price.} +#' \item{low}{Candle lowest price.} +#' \item{close}{Candle closing price.} +#' \item{volume}{Candle volume.} +#' } +#' +#' @references Loaded using [cryptoQuotes](https://cran.r-project.org/web//packages/cryptoQuotes/index.html) +#' +#' @docType data +#' @keywords datasets +#' +#' @examples +#' ## Load the dataset +#' data(BTC, package = "talib") +data(BTC, package = "talib") diff --git a/R/SPY.R b/R/SPY.R new file mode 100644 index 000000000..e848f0e26 --- /dev/null +++ b/R/SPY.R @@ -0,0 +1,26 @@ +#' @name SPY +#' @title SPDR S&P 500 ETF (SPY) +#' +#' @description +#' SPDR S&P 500 ETF (SPY) in daily intervals between +#' 2023-01-01 and 2024-12-31. +#' +#' @format A [matrix] with 501 rows and 5 columns. +#' +#' \describe{ +#' \item{open}{Candle opening price.} +#' \item{high}{Candle highest price.} +#' \item{low}{Candle lowest price.} +#' \item{close}{Candle closing price.} +#' \item{volume}{Candle volume.} +#' } +#' +#' @references Loaded using [quantmod](https://cran.r-project.org/web//packages//quantmod/index.html) +#' +#' @docType data +#' @keywords datasets +#' +#' @examples +#' ## Load the dataset +#' data(SPY, package = "talib") +data(SPY, package = "talib") diff --git a/_pkgdown.yml b/_pkgdown.yml index c9644b364..481281a45 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -47,4 +47,11 @@ reference: Charting functions contents: - chart - - indicator \ No newline at end of file + - indicator + +- title: Financial Data + desc: > + Preloaded financial data + contents: + - BTC + - SPY \ No newline at end of file diff --git a/data-raw/BTC.R b/data-raw/BTC.R index 3e72702f6..dde1b8cea 100644 --- a/data-raw/BTC.R +++ b/data-raw/BTC.R @@ -7,17 +7,14 @@ BTC <- cryptoQuotes::get_quote( ticker = "BTCUSDC", futures = FALSE, - interval = "15m" + interval = "1d", + from = as.Date("2024-01-01"), + to = as.Date("2024-12-31") ) ## 1) convert to matrix -BTC <- matrix( - data = BTC[, 1:5], - ncol = 5, - dimnames = list( - rownames(BTC), - colnames(BTC) - ) +BTC <- as.data.frame( + BTC ) ## 2) store data diff --git a/data-raw/SPY.R b/data-raw/SPY.R index 97fba54fb..86af30daf 100644 --- a/data-raw/SPY.R +++ b/data-raw/SPY.R @@ -6,7 +6,9 @@ ## 0) load data SPY <- quantmod::getSymbols( Symbols = "SPY", - auto.assign = FALSE + auto.assign = FALSE, + from = as.Date("2023-01-01"), + to = as.Date("2024-12-31") )[, 1:5] ## 1) rename columns diff --git a/data/BTC.rda b/data/BTC.rda index 032d96115d301a4be7bd526505a5258959f86cb4..f77742d4f4b197431489db269cf99092d22d28e9 100644 GIT binary patch literal 9370 zcma)hWl$WL4vzWa1VpKyF+l7;1=8h_q*qu zci;W@-l|pA-FvOQdskQYuNK#_Kz9_0e*=v&?g=VYCdM1#nZEXz5D){litK>stXNV0bX8!ft7mluGkwf<9e{reh;WNz)Xi3FU(! zO4z7DzbK1K03cLrfF*z@7a=bfAs0xQ3o;{vh)xXwEI|Ov=_3FD1hTZm)VL1*`&bs1 zA=xK8i)UhjL`_O7oyLIItDzgdz2I3%pq zGzdQwQ8N|=>_%Eqm63t4V6cEA6V!AN0IdWy9pT6fn+!s2i57t?i~0*h1^{`A0#IYr zjsU2NuqeRwH`zqVKI?30xkGO8>yHQd5 z4dEh--{G%!?NJDt)*a3n#wx6g0AH&U#7n4f49m)@BPwBghsE<(!lUIGl46IG{z{@S zVz3khyY;3Uf7do4q+h3_=ni$UqWRV#8(YED%@xQUBOP93k1kn7UCf~SM~YL5t;Ncw zx?{0M{a5|`a5{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_@(fOTq0lJ>ofaWOC0V|73d&RUWkN5bJc;w3a3A!!n^uI}B%^ zV(rqt(|l!-=1 zBb=#2B}!>R4YzV*4&)gbOfor~v9dzrR~#~`0uByQ<}Sa!e;ImXNM~n`=j#({xB@Bs zMIw?#2#ssxE9y$86|mhuDQ&jZlv72I?mo2qzXo z$c%`rQEVYyB-pjUrY}jz)pH?GuU}IVz*M#jh=~#=R0zW~fHM>nknJTe3;a>1WXQ}C zl_MEiqV_Lr&%(0Hb8;%E1YsHBk3mGsR$_6@=Mjlu!*+u_EYg+&~ACz{EMeGg8;nr@zreHkiGSEcgks@DlC5oT7g@PeB+jDbl1Nh zbuutPu$fV0rL)?Wp{d8jnrnVv7bU7Q91t1jPi#0E#tjI3`QiqGEFhzQdU<8r=Ud^h zQ!ZvuVGzb+W|`!-tmC?EH5YIN>);>+0V!k;D2c1Y_`8MPpC54^tOgO+5ft{{4rQo0 zE(2;v2ms^ix?AyN5+r4+ms^~fI~l@Tloyv(>}$n*<3@@?l_XDOtq?+^472K_z$r4m zmc0he(} zC7U)ZM$L%WkA!R=Ut1@MT|*Mv6FnMUJb3?;u8xulU7?WWm8g#N*u5eMfJ6~NK_n0) zfSm`9k%EeMQ_mB(e}$8Ce}xZinT#FnOEye{B*YIvGD1eBN|Z~bSxUCc-CmBHJsM{| z{2YUfgeJ4oZ&|0T_azBZwh2N?K#l5R>j7^&nsJ`YFyH7*N6MxeD@i)R0X86DU{et> z6A2h3!UhEiuF`n3v@Ik_xpcwnvqi2An+^*^!}K2! NcO+AV2@Nvf#K2x*s*C^t diff --git a/man/BTC.Rd b/man/BTC.Rd new file mode 100644 index 000000000..39b58be48 --- /dev/null +++ b/man/BTC.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BTC.R +\docType{data} +\name{BTC} +\alias{BTC} +\title{Bitcoin (BTC)} +\format{ +A \link{data.frame} with 366 rows and 5 columns. + +\describe{ +\item{open}{Candle opening price.} +\item{high}{Candle highest price.} +\item{low}{Candle lowest price.} +\item{close}{Candle closing price.} +\item{volume}{Candle volume.} +} +} +\description{ +USDC denominated Bitcoin (BTC) in daily intervals between +2024-01-01 and 2024-12-31. +} +\examples{ +## Load the dataset +data(BTC, package = "talib") +} +\references{ +Loaded using \href{https://cran.r-project.org/web//packages/cryptoQuotes/index.html}{cryptoQuotes} +} +\keyword{datasets} diff --git a/man/SPY.Rd b/man/SPY.Rd new file mode 100644 index 000000000..33c7c8b11 --- /dev/null +++ b/man/SPY.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/SPY.R +\docType{data} +\name{SPY} +\alias{SPY} +\title{SPDR S&P 500 ETF (SPY)} +\format{ +A \link{matrix} with 501 rows and 5 columns. + +\describe{ +\item{open}{Candle opening price.} +\item{high}{Candle highest price.} +\item{low}{Candle lowest price.} +\item{close}{Candle closing price.} +\item{volume}{Candle volume.} +} +} +\description{ +SPDR S&P 500 ETF (SPY) in daily intervals between +2023-01-01 and 2024-12-31. +} +\examples{ +## Load the dataset +data(SPY, package = "talib") +} +\references{ +Loaded using \href{https://cran.r-project.org/web//packages//quantmod/index.html}{quantmod} +} +\keyword{datasets} From b5577fccae5b493a27f3eb4027a34cd714a5fc2c Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 07:30:39 +0200 Subject: [PATCH 090/166] :hammer: Updated Interface (again) * Signatures and everything needs to be reworked. --- NAMESPACE | 4 ++ R/chart_indicator.R | 1 + R/ta_BBANDS.R | 100 ++++++++++++++++++++++++---- R/ta_SMA.R | 146 ++++++++++++++++++----------------------- man/SMA.Rd | 2 +- man/bollinger_bands.Rd | 2 +- man/indicator.Rd | 11 ++++ 7 files changed, 171 insertions(+), 95 deletions(-) create mode 100644 man/indicator.Rd diff --git a/NAMESPACE b/NAMESPACE index 91c36d9f3..09ebb2ca3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,6 +9,7 @@ S3method(KAMA,plotly) S3method(MAMA,default) S3method(MAMA,plotly) S3method(SMA,data.frame) +S3method(SMA,default) S3method(SMA,matrix) S3method(SMA,numeric) S3method(SMA,plotly) @@ -24,7 +25,10 @@ S3method(acceleration_bands,default) S3method(acceleration_bands,plotly) S3method(aroon,default) S3method(aroon_oscillator,default) +S3method(bollinger_bands,data.frame) S3method(bollinger_bands,default) +S3method(bollinger_bands,matrix) +S3method(bollinger_bands,numeric) S3method(bollinger_bands,plotly) S3method(chaikin_AD_line,default) S3method(chaikin_AD_oscillator,default) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index e1c8ab7fc..2a99deb2e 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,3 +1,4 @@ +#' @title Chart indicators #' @export indicator <- function( FUN, diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 84e422bc0..18f130b7e 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -3,7 +3,14 @@ #' @family Overlap Study #' #' @export -bollinger_bands <- function(x, ma = SMA(n = 10), up = 2, down = 2, ...) { +bollinger_bands <- function( + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... +) { UseMethod( generic = "bollinger_bands" ) @@ -20,27 +27,70 @@ bollinger_bands.default <- function( down = 2, ... ) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + ## default behaviour is to ## coerce to a `matrix` check that ## it is double and then pass to ## C-side. ma <- map_maType_call(substitute(ma)) - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - assert(is.numeric(x)) - assert(ma$n >= 2) + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 1) pass `x` assuming that it ## follows OHLC-V structure + as.data.frame( + .Call( + "impl_ta_BBANDS", + as.double(x[[1]]), + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) + ) +} + +#' @export +bollinger_bands.numeric <- function( + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ... +) { + ma <- map_maType_call(substitute(ma)) + .Call( "impl_ta_BBANDS", - x, + as.double(x), ma$n, as.numeric(up), as.numeric(down), @@ -48,6 +98,34 @@ bollinger_bands.default <- function( ) } +#' @export +bollinger_bands.data.frame <- function( + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @export +bollinger_bands.matrix <- function( + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... +) { + as.data.frame( + NextMethod() + ) +} + #' @export bollinger_bands.plotly <- function( x, diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 6f6c4117c..20c65afcd 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -13,6 +13,7 @@ SMA <- function( x, n = 10, + cols, ... ) { UseMethod( @@ -21,29 +22,7 @@ SMA <- function( } #' @export -SMA.numeric <- function( - x, - n = 10, - ... -) { - .Call( - "impl_ta_MA", - as.double(x), - as.integer(n), - 0L - ) -} - -#' @export -SMA.data.frame <- function( - x, - n = 10, - cols, - ... -) { - ## extract series - ## as and convert to list - ## for vapply +SMA.default <- function(x, n = 10, cols, ...) { if (missing(cols)) { cols <- ~open } @@ -54,12 +33,10 @@ SMA.data.frame <- function( data = x, ... ) - ## calculate output - ## using vapply - x <- as.data.frame(vapply( + + x <- vapply( as.list(x), FUN = function(x) { - ## 1) pass `x` to C .Call( "impl_ta_MA", x, @@ -69,7 +46,7 @@ SMA.data.frame <- function( }, FUN.VALUE = double(nrow(x)), USE.NAMES = TRUE - )) + ) colnames(x) <- paste0("sma_", colnames(x)) @@ -77,78 +54,83 @@ SMA.data.frame <- function( } #' @export -SMA.matrix <- function( +SMA.numeric <- function( x, n = 10, cols, ... ) { - ## extract series - ## as and convert to list - ## for vapply - if (missing(cols)) { - cols <- ~open + if (!is.missing(cols)) { + warning("'cols' have been passed but is unused in for vectors") } - x <- series( - x = cols, - default = ~open, - data = x, - ... + .Call( + "impl_ta_MA", + as.double(x), + as.integer(n), + 0L ) - ## calculate output - ## using vapply - x <- as.matrix(vapply( - as.list(x), - FUN = function(x) { - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 0L - ) - }, - FUN.VALUE = double(nrow(x)), - USE.NAMES = TRUE - )) +} - colnames(x) <- paste0("sma_", colnames(x)) +#' @export +SMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} - x +#' @export +SMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() + ) } #' @rdname SMA #' @usage NULL #' @export -SMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - sma <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 0L +SMA.plotly <- function(x, cols, n = 10, data, ...) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) - df <- data.frame( - idx = seq_along(sma), - sma = as.numeric(sma) - ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~sma, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("SMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("SMA(%d)", n), + inherit = FALSE + ) + }) + } .plotting_environment$main } diff --git a/man/SMA.Rd b/man/SMA.Rd index 86c1c3479..36a26f439 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -5,7 +5,7 @@ \alias{SMA.plotly} \title{Simple Moving Average (SMA)} \usage{ -SMA(x, n = 10, ...) +SMA(x, n = 10, cols, ...) } \arguments{ \item{x}{A univariate series.} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index aa3fb0433..f1b4740c2 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -4,7 +4,7 @@ \alias{bollinger_bands} \title{Bollinger Bands} \usage{ -bollinger_bands(x, ma = SMA(n = 10), up = 2, down = 2, ...) +bollinger_bands(x, cols, ma = SMA(n = 10), up = 2, down = 2, ...) } \description{ Bollinger Bands diff --git a/man/indicator.Rd b/man/indicator.Rd new file mode 100644 index 000000000..11923377d --- /dev/null +++ b/man/indicator.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/chart_indicator.R +\name{indicator} +\alias{indicator} +\title{Chart indicators} +\usage{ +indicator(FUN, cols, ...) +} +\description{ +Chart indicators +} From fec2fb3d69d4503b0deeef4e3f591efd1d505cb7 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:47:46 +0200 Subject: [PATCH 091/166] :hammer: Updated Makefile * It now removes {talib} with clean --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 598e9d3a4..7ec1e2c47 100644 --- a/Makefile +++ b/Makefile @@ -28,12 +28,14 @@ clean: ## Remove artifacts @rm -rf src/*.so @rm -rf $(tarball_location) @rm -rf src/Makevars + @Rscript -e "remove.packages('$(package_name)')" fmt: ## Format code @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h @rm -rf ./.clang-format pkgdown-build: ## Build {pkgdown} documentation + @Rscript --verbose -e "devtools::document()" @Rscript -e "pkgdown::clean_site()" @Rscript -e "pkgdown::init_site()" @Rscript -e "pkgdown::build_site()" From e98b5bca6b4c57e4030939405e15e6b356af3168 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:49:38 +0200 Subject: [PATCH 092/166] :hammer: Updated Generic description * Needs more work though --- man-roxygen/description.R | 47 +++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/man-roxygen/description.R b/man-roxygen/description.R index 46a6a2657..ae9b469ca 100644 --- a/man-roxygen/description.R +++ b/man-roxygen/description.R @@ -1,12 +1,16 @@ -#' @title <%= tools::toTitleCase(.title) %> -#' #' @description -#' A generic S3 function to compute the <%= tolower(.title) %>. The function assumes that <%= if(.type == "multivariate") "the input [matrix] `x` is Open (`x[,1]`), High (`x[,2]`), Low (`x[,3]`), Close (`x[,4]`) and Volume (`x[,5]`)" else "the input [vector] `x` is [double]" %>. +#' The `<%= tolower(.fun) %>()` is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base `R`, and the package-wide +#' dependencies. Ie. [class] in, [class] out. Each method is a soft wrapper of [model.frame] and therefore the OHLC-V series must be coercible to a [data.frame]. +#' This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column [data.frame] or [matrix]. In such cases, if univariate series +#' is passed as a [vector] the function calculates the indicator 'as is', and returns a [data.frame] if the indicator itself is also a univariate series. +#' +#' The indicator, by default, follows its mathematical definition. However, the `cols` argument allows for simple rearrangement of the definition by passing relevant +#' columns in a custom order. Refer to the details-section for more on the calculation of the indicators. #' -#' @usage -#' ## Generic default S3 method -#' ## for <%= tools::toTitleCase(.title) %> -#' <%= .fun %>(...) +#' @param x An OHLC-V series that is coercible to a [data.frame]. +#' @param cols A [formula] +#' @param n Window +#' @param ... additional parameters passed into [model.frame]. #' #' @author <%= .author %> #' @@ -14,3 +18,32 @@ #' @concept technical analysis #' @concept trading #' @concept algorithmic trading +#' +#' @examples +#' ## load Bitcoin (BTC) +#' ## series +#' data(BTC, package = "talib") +#' +#' ## calculate <%= tolower(.title) %> +#' ## using BTC +#' output <- talib::<%= tolower(.fun) %>(BTC) +#' +#' ## display the results +#' tail(output) +#' +#' ## visualize the indicator +#' ## with candlesticks +#' ## +#' ## see ?talib::chart or ?talib::indicator +#' ## for more details +#' { +#' ## chart OHLC-V +#' ## series with candlesticks +#' talib::chart(BTC) +#' +#' ## chart indicator +#' ## with default values +#' talib::indicator( +#' talib::<%= tolower(.fun) %>() +#' ) +#' } From 89f30e8bc842845da7ab7932d0ba25c75eb5fdb3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:50:31 +0200 Subject: [PATCH 093/166] :hammer: Added generic DESCRIPTION --- R/ta_ACCBANDS.R | 15 ++++++++--- R/ta_BBANDS.R | 23 ++++++++++++++-- man/acceleration_bands.Rd | 55 +++++++++++++++++++++++++++++++++++++-- man/bollinger_bands.Rd | 53 ++++++++++++++++++++++++++++++++++++- 4 files changed, 138 insertions(+), 8 deletions(-) diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index ee3b7c29c..4df179456 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -1,21 +1,29 @@ +#' @export +#' @family Overlap Study +#' #' @title Acceleration Bands #' -#' @family Overlap Study +#' @templateVar .title Acceleration Bands +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun acceleration_bands #' -#' @export +#' @template description acceleration_bands <- function( x, - n = 10, cols, + n = 10, ... ) { UseMethod("acceleration_bands") } +#' @usage NULL #' @aliases acceleration_bands #' @export ACCBANDS <- acceleration_bands +#' @usage NULL +#' @aliases acceleration_bands #' @export acceleration_bands.default <- function( x, @@ -69,6 +77,7 @@ acceleration_bands.default <- function( ) } +#' @usage NULL #' @aliases acceleration_bands #' @export acceleration_bands.plotly <- function( diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 18f130b7e..5c95d3d7a 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -1,8 +1,13 @@ +#' @export +#' @family Overlap Study +#' #' @title Bollinger Bands #' -#' @family Overlap Study +#' @templateVar .title Bollinger Bands +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun bollinger_bands #' -#' @export +#' @template description bollinger_bands <- function( x, cols, @@ -16,12 +21,17 @@ bollinger_bands <- function( ) } +#' @usage NULL +#' @aliases bollinger_bands #' @export BBANDS <- bollinger_bands +#' @usage NULL +#' @aliases bollinger_bands #' @export bollinger_bands.default <- function( x, + cols, ma = SMA(n = 10), up = 2, down = 2, @@ -78,6 +88,8 @@ bollinger_bands.default <- function( ) } +#' @usage NULL +#' @aliases bollinger_bands #' @export bollinger_bands.numeric <- function( x, @@ -98,6 +110,8 @@ bollinger_bands.numeric <- function( ) } +#' @usage NULL +#' @aliases bollinger_bands #' @export bollinger_bands.data.frame <- function( x, @@ -112,6 +126,8 @@ bollinger_bands.data.frame <- function( ) } +#' @usage NULL +#' @aliases bollinger_bands #' @export bollinger_bands.matrix <- function( x, @@ -126,9 +142,12 @@ bollinger_bands.matrix <- function( ) } +#' @usage NULL +#' @aliases bollinger_bands #' @export bollinger_bands.plotly <- function( x, + cols, ma = SMA(n = 10), up = 2, down = 2, diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index d1e0d8aef..b62113c6c 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -4,10 +4,54 @@ \alias{acceleration_bands} \title{Acceleration Bands} \usage{ -acceleration_bands(x, n = 10, cols, ...) +acceleration_bands(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Acceleration Bands +The \code{acceleration_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate acceleration bands +## using BTC +output <- talib::acceleration_bands(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::acceleration_bands() + ) +} } \seealso{ Other Overlap Study: @@ -22,4 +66,11 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index f1b4740c2..b349d1640 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -6,8 +6,52 @@ \usage{ bollinger_bands(x, cols, ma = SMA(n = 10), up = 2, down = 2, ...) } +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} \description{ -Bollinger Bands +The \code{bollinger_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate bollinger bands +## using BTC +output <- talib::bollinger_bands(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::bollinger_bands() + ) +} } \seealso{ Other Overlap Study: @@ -22,4 +66,11 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} From 09c9c4663f3201dbc39eda2b55e7b72dd912be62 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 15:50:58 +0200 Subject: [PATCH 094/166] :books: Vignettes and README --- .gitignore | 1 + DESCRIPTION | 3 ++ README.Rmd | 10 ++--- vignettes/.gitignore | 2 + vignettes/talib.Rmd | 87 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 vignettes/.gitignore create mode 100644 vignettes/talib.Rmd diff --git a/.gitignore b/.gitignore index ad7b6de19..d0f48cdf5 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ NOTES.md sandbox/** docs +inst/doc diff --git a/DESCRIPTION b/DESCRIPTION index a3d256f0f..1628b8cb1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -16,6 +16,8 @@ Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Suggests: + knitr, + rmarkdown, testthat (>= 3.0.0) Config/testthat/edition: 3 Depends: @@ -23,3 +25,4 @@ Depends: LazyData: true Imports: plotly +VignetteBuilder: knitr diff --git a/README.Rmd b/README.Rmd index 5fec7a6e1..e4f7739e7 100644 --- a/README.Rmd +++ b/README.Rmd @@ -52,7 +52,7 @@ x <- talib::BTC ## bands tail( talib::bollinger_bands( - x[,1] + x ) ) ``` @@ -76,15 +76,15 @@ x <- talib::BTC ## add bollinger bands ## to the chart talib::indicator( - .f = talib::SMA(), - .var = ~close + FUN = talib::SMA(), + cols = ~close ) ## add bollinger bands ## to the chart talib::indicator( - .f = talib::RSI(), - .var = ~close + FUN = talib::RSI(), + cols = ~close ) } ``` \ No newline at end of file diff --git a/vignettes/.gitignore b/vignettes/.gitignore new file mode 100644 index 000000000..097b24163 --- /dev/null +++ b/vignettes/.gitignore @@ -0,0 +1,2 @@ +*.html +*.R diff --git a/vignettes/talib.Rmd b/vignettes/talib.Rmd new file mode 100644 index 000000000..318c6f482 --- /dev/null +++ b/vignettes/talib.Rmd @@ -0,0 +1,87 @@ +--- +title: "{talib}: R bindings to TA-Lib" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{talib} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +## set chart options +options(talib.chart.dark = FALSE) + +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + out.width = "100%", + out.height = "680", + fig.align = "center" +) +``` + +```{r setup} +library(talib) +``` + +[{talib}](https://github.com/serkor1/curly-giggle) is wrapper of the 'C' library [TA-Lib](https://github.com/TA-Lib/ta-lib). +The library supports indicators for Technical Analysis, including algorithmic candlestick pattern recognition. + +The implementation has been extended to include interactive financial charts with a [{plotly}](https://github.com/plotly)-backend. All indicators in [{talib}](https://github.com/serkor1/curly-giggle) +are soft-wrappers of `model.frame` for added flexibility. + +## Basic usage + +### Simple Moving Averages + +Below is an example on calculating the simple moving average of the Bitcoin (BTC): + +```{r SMA(simple)} +tail( + talib::SMA( + x = talib::BTC + ) +) +``` + +The simple moving average can be calculated over a specified range via `...` which gets forwarded to `model.frame`, and calculated for multiple prices, as follows: + +```{r SMA(flexible)} +tail( + talib::SMA( + x = talib::BTC, + cols = ~low + high, + ## calculate simple moving average + ## up and until the 100th indices + subset = 1:nrow(talib::BTC) <= 100 + ) +) +``` + +### Charting indicators + +> **Information:** Please refer to the `charting` vignette +> for a more detailed description of the charting. + +The charting functionality mimicks the behaviour of `plot()` and `lines()` where each is called separately. + +```{r chart(basic)} +{ + ## candlestick chart + talib::chart( + talib::BTC + ) + + ## add SMA + talib::indicator( + talib::SMA(), + cols = ~high + low + ) + + ## add acceleration bands + talib::indicator( + talib::ACCBANDS() + ) +} + +``` From 967010e32396d7057a50d6e4395c314ef5aa3d6b Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:38:43 +0200 Subject: [PATCH 095/166] :hammer: Hybrid Series * It will dispatch based on non-missing first argument. - This allows to pass around cols without NULL --- NAMESPACE | 2 ++ R/series.R | 18 +++++++++++++++++- R/ta_ACCBANDS.R | 42 ++++++++++++++++++++++++++++-------------- 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 09ebb2ca3..2b5904c81 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -21,7 +21,9 @@ S3method(TRIMA,default) S3method(TRIMA,plotly) S3method(WMA,default) S3method(WMA,plotly) +S3method(acceleration_bands,data.frame) S3method(acceleration_bands,default) +S3method(acceleration_bands,matrix) S3method(acceleration_bands,plotly) S3method(aroon,default) S3method(aroon_oscillator,default) diff --git a/R/series.R b/R/series.R index 7d3059463..4ceb422e6 100644 --- a/R/series.R +++ b/R/series.R @@ -9,7 +9,8 @@ series <- function( data, ... ) { - UseMethod("series") + target <- if (!missing(x)) x else default + UseMethod("series", target) } ## plotly series @@ -40,6 +41,21 @@ series.plotly <- function( ) } +# #' @export +# series.data.frame <- function( +# x, +# default, +# data, +# ... +# ) { +# series.formula( +# x = x, +# default = default, +# data = data, +# ... +# ) +# } + ## formula series #' @export series.formula <- function( diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 4df179456..c7880f6a8 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -77,6 +77,34 @@ acceleration_bands.default <- function( ) } +#' @usage NULL +#' @aliases acceleration_bands +#' @export +acceleration_bands.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases acceleration_bands +#' @export +acceleration_bands.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + #' @usage NULL #' @aliases acceleration_bands #' @export @@ -97,20 +125,6 @@ acceleration_bands.plotly <- function( ... ) - # ## This function - # passed_arguments <- list( - # ... - # ) - - # ## extract data - # HLC <- passed_arguments$.series - - # assert( - # ncol(HLC) == 3, - # "Acceleration bands uses 3 columns. Found ", - # ncol(HLC) - # ) - ## calculate acceleration ## bands and return as ## data.frame From b596eeb6b5c51c1f7ffabd6b8c41118ecc1eb485 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 17:07:12 +0200 Subject: [PATCH 096/166] :hammer: Bug-fix in Bollinger Bands --- R/ta_BBANDS.R | 51 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 5c95d3d7a..5d41454a7 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -151,35 +151,45 @@ bollinger_bands.plotly <- function( ma = SMA(n = 10), up = 2, down = 2, + data, ... ) { ma <- map_maType_call(substitute(ma)) - ## extract arguments - ## from ellipsis - dots <- list(...) - series <- dots$.series - - ## extract chart objects - .chart <- .plotting_environment$price_chart - .value <- .Call( - "impl_ta_BBANDS", - series, - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) + + ## prepare series + ## from + x <- series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) + + .indicator <- as.data.frame( + .Call( + "impl_ta_BBANDS", + as.double(x[[1]]), + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) ) + .indicator$idx <- 1:nrow(.indicator) + ## constuct chart ## element - for (i in seq_len(ncol(.value))) { + for (i in seq_len(ncol(.indicator) - 1)) { local({ j <- i .plotting_environment$main <- plotly::add_lines( .plotting_environment$main, - x = ~ seq_len(nrow(.value)), - y = ~ .value[, j], + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], inherit = FALSE, line = list( color = '#4682b4' @@ -194,9 +204,10 @@ bollinger_bands.plotly <- function( .plotting_environment$main <- plotly::add_ribbons( p = .plotting_environment$main, inherit = FALSE, - x = ~ seq_len(nrow(.value)), - ymin = ~ .value[, 3], - ymax = ~ .value[, 1], + data = .indicator, + x = ~idx, + ymin = ~ .indicator[, 3], + ymax = ~ .indicator[, 1], fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), line = list( color = "transparent" From b181876b6b0f6864adb81044f1adf44a53dac35d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:04:38 +0200 Subject: [PATCH 097/166] :books: Updated README + Logo * A new logo --- README.Rmd | 11 ++++++----- README.md | 34 +++++++++++++++++----------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/README.Rmd b/README.Rmd index e4f7739e7..0337e5deb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,5 +1,6 @@ --- output: github_document +always_allow_html: true --- @@ -18,7 +19,7 @@ knitr::opts_chunk$set( ) ``` -# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) @@ -82,9 +83,9 @@ x <- talib::BTC ## add bollinger bands ## to the chart - talib::indicator( - FUN = talib::RSI(), - cols = ~close - ) + # talib::indicator( + # FUN = talib::RSI(), + # cols = ~close + # ) } ``` \ No newline at end of file diff --git a/README.md b/README.md index 47d0a2053..c495d4de9 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ -# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) - {talib} provides R bindings for @@ -40,18 +39,18 @@ x <- talib::BTC ## bands tail( talib::bollinger_bands( - x[,1] + x ) ) ``` - #> upper middle lower - #> [195,] 113734.0 113371.6 113009.1 - #> [196,] 113735.5 113426.4 113117.4 - #> [197,] 113738.7 113469.4 113200.0 - #> [198,] 113732.7 113506.5 113280.4 - #> [199,] 113747.5 113530.7 113314.0 - #> [200,] 113808.6 113579.7 113350.8 + #> upper middle lower + #> 361 106812.14 99260.81 91709.48 + #> 362 104471.11 98218.27 91965.44 + #> 363 100874.66 97021.36 93168.05 + #> 364 99891.29 96519.09 93146.89 + #> 365 99875.94 96136.93 92397.91 + #> 366 99720.50 95622.57 91524.65 ### Charting @@ -72,17 +71,18 @@ x <- talib::BTC ## add bollinger bands ## to the chart talib::indicator( - .f = talib::SMA(), - .var = ~close + FUN = talib::SMA(), + cols = ~close ) ## add bollinger bands ## to the chart - talib::indicator( - .f = talib::RSI(), - .var = ~close - ) + # talib::indicator( + # FUN = talib::RSI(), + # cols = ~close + # ) } ``` - +

+ From 6f136fc332a5bccdcab43c45327d6b0177ea900a Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:14:07 +0200 Subject: [PATCH 098/166] :hammer: Added images --- man/figures/candlestick.png | Bin 5027 -> 0 bytes man/figures/logo.png | Bin 0 -> 34654 bytes pkgdown/favicon/apple-touch-icon.png | Bin 0 -> 17150 bytes pkgdown/favicon/favicon-96x96.png | Bin 0 -> 6589 bytes pkgdown/favicon/favicon.ico | Bin 0 -> 15086 bytes pkgdown/favicon/favicon.svg | 3 +++ pkgdown/favicon/site.webmanifest | 21 +++++++++++++++++++ pkgdown/favicon/web-app-manifest-192x192.png | Bin 0 -> 19082 bytes pkgdown/favicon/web-app-manifest-512x512.png | Bin 0 -> 105759 bytes 9 files changed, 24 insertions(+) delete mode 100644 man/figures/candlestick.png create mode 100644 man/figures/logo.png create mode 100644 pkgdown/favicon/apple-touch-icon.png create mode 100644 pkgdown/favicon/favicon-96x96.png create mode 100644 pkgdown/favicon/favicon.ico create mode 100644 pkgdown/favicon/favicon.svg create mode 100644 pkgdown/favicon/site.webmanifest create mode 100644 pkgdown/favicon/web-app-manifest-192x192.png create mode 100644 pkgdown/favicon/web-app-manifest-512x512.png diff --git a/man/figures/candlestick.png b/man/figures/candlestick.png deleted file mode 100644 index 17970d34b723c43dacce70f5c83da2044fde8214..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5027 zcmcIoX;_ojwq9QnNEl>RMoDB6MG=HDD3XX+Kq=VT3bs;$%tsV~6h#?6s#HKEU@e0n zU`4H`3OQgA1xajWP(ZNI5(I@J4N?(=pcE6x-Ct0S_ue1({`@^t?MfP^kdKvP6t(}%m?pf5_Co7bl_^huR6=TJ~=C>%O;$U5@CzPR9^gQ3>ZvEfDIE(QSF3@`W1pB^rL z@!0oS*l!8cmm?cKUhzO@^<&P*U#(JG9Z;S&&f#dDZ>_b|a%=j~EYl`rDUGJEMR)#Q znGGdex9VP%O3)c=mHlg0eSe@o-TKy*Y^Mun^i$&MJR_^0-R6%<8p2EB#>KOOfCt?0 zCr2lo2gJpa21nvV|BoL$z`Iug#>Q?3wjG_5ocPj4@sr>8qbG2q1X)!`vZ@38+>09+ zTpR^pZANHxLR3JnU=s+xQ$sgq#M2tUV|p?C+~N}XQ(~?BqCo+&T5kY5d;`Fa9AevE z5-5hLL;OWDx>0)fG(i#c@;%;PxA;na5sksqskI<1eBW?tFBuP5G)!R2U;h4*MHIw^ zeW)&|4nOuY&N7_jc*j_njGs)eJ8fm~*iUmZ#(UDIZRL}!iTanx@teC>05nUUNzcX1 zKKrde6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ZX_vcp;tk8hGFw^ydbZxCImwrzZB z+nl6{n#1xt0jE&YlhB|Ox5ve^Pp00M^4c$tk#Wga7FmC^_*kKAdfnrcj7ur9k%|d^ z#Yw}TE0b>xEP36%y~veHVp(Hl4j9940%K=|qnYausutmgCOZJZX1Qo7!b04z>6Qg9 zqEVp#D_1&E#N-oPIhkN*PScBKWsDs?ZUarGD7uLhqGpO!-?sdiAu)~ETddejl$*DM z3!z8EsxH(jzE`JLpy_3aq5wxR)yiSy8s>zS5DSRDw`G~&$#voHvx$sTecYw;!AK4E z?@nbA)trJS-Q*L~5i3|ri>QG3wbT6FXaGdb0GfmFnk*&+OrgdYNg6wFS8el4OpXR= za?SH?@mN|?VSpe8^$SRDwc1NRyi4x=Oy`wXJl6aW6ZX}QV4e4;bB{P#b=Ts`Z4aZ}*&}CDmmE*o%^eGj65O zof{K+wys8=ujjh7YD}13-k`+z7Fat`>&H=@a*bth!y%#r^_16ApDgU+JYmWY{pKk8 z&tA;)&(AXZKM_AxFMaJgb0v2_ky} zVzdjHwci+nchKZR7XrQT+e(5W{z$5!vEvM328rszk2dlPV^X<;I!4+$3jgOH&Nv^G X%pB@poc_s#*xYNYk9&n1`|JMz%^RB) diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..3215a052f64eabe5332142dcb00ca6f0eaea31a0 GIT binary patch literal 34654 zcmX6^1yCGK6D2@!cXxMpN#Jk}4+IbH?(XjH5FCO_aCawgxVyVM|9$me)zxm@)y_`M z^mM;|{W?NPK?)gx009C50$D~HpaQ;LK|p-LfrA0x{S+l=1z*UFq*Z_r5S}y;5dOgs z5HH}L{Er|YT-YEWPJTf^2&6+m;M!-mDGP!BfH9Pl0)VgJ&$D>DANT@qFRkeW0ih%L z-}ehvviNuKkFd@%Knd7mIAT-*nj~Ysf8Y@zWB}jQ+*i&z&Af>gQ_f#Ef8@k-ev2nd zcfuJYQ^9B`uotKSalVqZK1WrJ-k7!S zPgPBVnD++x`KK?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hg>suK*m)l+;45|I$p3uVlqz@fKuQ{oD;BFJ^-AqM2ZYM%rw@n*EEO{SL> zz`jOeKN&{1mfqcEE1%0NmGnN44}gAG6L6i6S^b&U3nzsd8wJ#{p}T z`jv{)0uD+jCGDy1+9>M4U{-FZNp(Ir*ueP~1;%3&6Q`f*nq08>P49q9JT{Z>|Lsca zKPd%uWErSe$imerzFME@cU{k_l3dV81uh?{O)dC;XUif0Ad?x06`XMdrm<;8N;Q}+TuG} z6S{E;YD|F6R()uz<9hfIX`U5+iye9i;nG2DwjlY-0XpSJ_BeyNu^%MEaP@RCrir@x zCtOwaxQ2v_LCpKi5>3`sPNcnLnaQ-1&*lrPD_-V#vgzh`S3p|OLe2Y%(St__#2AYR zPSQMi-loN(QETo4Z2DXT7djX+w2n#v>FJoiHTjQvOMYF9LTN(;GIjZm`MIgv(h9Y( zT&KqiFaGl#x_kwGfDF@hXes*IBPCJ~WP5qpKbCCt$SEVG!uAQT+lAN4ovDs+<~SR7nbtR~%T z4={l2B%|H+_LD9Ko;%8eZcj|Nc#1p-Sm6Z!>Ge9PQ&-&f+2@oI{2PAx0P;j)EFluo zaBS)g+~AKK@(z+TNn73dWG+rhFaO#sK$lpa5nCzSgk(Sm>oztLZ-C|}-H6n*>-<+R zzRfCmB(Q#~l$@S4CDFtJZZGJkd+9-P#`Ft3;B(w-Idr>QqtcA*>|kixdP9c@w3c|NqCp z$atEOf#L7y^2gx=Ml_jshwI0GzM@7jwY%HUIzs07*qoM6N<$f|6|JbN~PV literal 0 HcmV?d00001 diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a4bd3ec87b2ab8a6f5a57fc3d1aada9832508193 GIT binary patch literal 17150 zcmV+aKmfmqP)FFKcW4h<=c`q`P zOiX5CBxK^B^AC_2MEv}5^T+$|-FIKFURrypZOxZoy6TL^Mde20?9E?&HCUT&t-X=0 z;+t{dj1m1>KjyGE6Tr0Li|J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mL&C!6YwO87J z-s`^pdPKR=n8U&=l=-13oFYZ#=ZNt}_O)8;q*<4Pl3rt%tzflIt0><;=!{0$RQW(- z!)dJt8_>J_%P+@Din4GL}ab73H|Iu67*Q7u+@AHFPF2XDZt`p*aP`H}haGH6cwb!<7sHqvC zm*sgnSym)j{&%x|ZDl9_vrdSIWP_73R8NmrYg%(I8~u@CsALd%dP)ORL)HH%DN2)6 zZPre=Uf>(tsC$-kBqB~%h(D{(~hisGdKxz|f={~wDUhE@k=6juNM002ovPDHLk FV1gA5+O_}y literal 0 HcmV?d00001 diff --git a/pkgdown/favicon/favicon-96x96.png b/pkgdown/favicon/favicon-96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..7c220015208212ac44da4819ca5aca4fd7577ce7 GIT binary patch literal 6589 zcmV;u8A9fXP)GpA3_oH^Zdx~F@(JDo}V z&AG3jq@Y+uDU9!&cc|~M+Yi8yPgP=^vgR-j#Nw1chwrr*J}^G zi^V~aa0*+AwB{2~Yc&5SGWJO5?hXJjWup80QWfFxV}&S5AF3tkFWKimgnN84=Gr)8 zuC+7FtQ9b~bAivg4CH=%34$d3QDm&8`jby=C%WI0zEpK|mR?1}yzldh;AKAfqRq;!F?pO-&; z^kmhxdRTh~=mvT)0C=@_f~{W&R`1#eRY%7YQI@}`lBDU%d(AHl1>PW{dv=+ zEAUQU&*}VNgFh?)^nWWSSUGuN`v+H0eB&krS^k3{%Li*ZI~Tmzsb$0^yR&napwWne zB>iXU{rgx}E@Hl;$H0N@nbmp#*eGE}APmwbB_Ig5GE?x0x)^r~vyr~N9_5c7(Tez2 zwIt;esWbVumWGCgsTGW^7G(Ly>h5k%v#q@XVQT4UaIg)o09qk~v@^AGLP2O4eqNTt z>rYFw;p*fLyCq>rJ=#o6`ia2U57dlBn0(vBRza3M1jg2`(bu+u)a;&1Lwp4F0nM z5SNw*i$!h-+E|F9o9z&o^m~!9ouVw8nY?VJ_=_*z5M{ZD)CXk`9w18GjD^nLV;=bN z0-(2@rP~t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cz*b?0>F(XN19Nf(GZ=N1z8UJR+F32q{*t#Xeva;eqD0+E|33jDEsPQHesUkWCra~ zAN-24ff%*=z?k#Qi;o{S3ljSyd8GNKWauRj>JI=J(*v^exdlsL?7s!Z_LsiOAOCCx zz?4c^_NNqDYK`WrwB{4K6k5Fi5F>V7nZS)Jf+T$@Fm|m{lH6a>`EeFo)f!Ez$kGoqt|M{rTr}M8>xErcosK7oJX#vGU@( vci(t!U;L_==oM0Xi;SHSWcl66Oy~a}d$po&tdP4{00000NkvXXu0mjf!AF%B literal 0 HcmV?d00001 diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..b9612aff2c852ab785d4095c2667ff490566213e GIT binary patch literal 15086 zcmc&*32>B0b{=BmHQ3zdlt4oFF}m;jMCiU|gpSdDUo(xPGnr*MoyirI#+{ zy!2gQn~dhbKy&Q9d-XqUUl#`thlOyofZK`i%Rb1I`@wl{r^VRPk%0U68~%o55IPyZ z7xn$YgJ!$_e#3_cd$WeZd{-D{E#<3B8K<&e%5Ux~-w!qgT4`d~~!*#`cW4#~`E9~B$ivE86AdLqvLsRq}A8jqMNR4+v7s<$e=^PVY@!<|Q_IBQr z!9l~@_wLm$nyeF-F15^{{&rmW%hKQ1)*4V$_c@X?j+oF?;+ZUOu0MV>hI!fE@NroT zUbn*iRv;^eP z=ZRu;oUKA+Y><$7LDi>7Pu1Ym+5I?mdIR3vpN-2OR3pUO+9;2Su*h#hf8-pHsbZg# z^wCNY>PMY<~=1j&Kb9F)&2I&sp6r!y*UDZ zNVp3$X~l>NO+rXefr_oZTP#D&=z@pFCqrE^K96@O6T4-R!e=Bf|`dDxA?UzwLGbal`6Y@EE{fdH@B zCiEl*Wja;-+%`6Zc$3a}(LC^USR~FFyq2#f*pXsvfyu>@5*9qHZ* zIIkd`DbUj1yHLpI&;bn^*T0IW@L7Tv^D}vP&!RHp{>9%%%0xX&c}1BEol&{ost5f~+|)qYB2l8=h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?Z=3$e;~@6dk+p)~6X`b-{F?~A?^5jhHx%1`fY%o$a{hLGU0Ykt zzt=V%920NPbXd3ee#kM+1w?~w!TkFIy0d^oQpjVtaodsR{76S|Lz_WaKLG=?Uc`n<#*er*>Y5S85YH!3z?E^e*(X=xYniNlHvm)p`<38FC?#syIX6JyG4ey!q zCk$?M56?5igZG|_@^#p-IhW!?N6&DQzw1hSw6vWV)83V2nOz=9u@cTmO>IX(ZUHhg z=aVdkeL1o{_qSXZK8&CHKGJ{27wlm#a7G8X(LKVJ#+>W~iLcYyelGpi=8fTfjOyoR zdW!azWIHU+d5DT|Lkivb+2)gyOm`!?!|^>XHpG!_GEWZlW>=>tx_vF=LNp~U(VpI8 zqSf#q-7D9H(YewOHS1lmD!vk1+SC5^&_PW(>oDsw>vVLm?Ke`svOgYnOGtN@qpT(x z8~5j6`ww#;pT3~q``|(K9B!-p \ No newline at end of file diff --git a/pkgdown/favicon/site.webmanifest b/pkgdown/favicon/site.webmanifest new file mode 100644 index 000000000..4ebda26b5 --- /dev/null +++ b/pkgdown/favicon/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/web-app-manifest-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/web-app-manifest-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} \ No newline at end of file diff --git a/pkgdown/favicon/web-app-manifest-192x192.png b/pkgdown/favicon/web-app-manifest-192x192.png new file mode 100644 index 0000000000000000000000000000000000000000..5134fd8b8b8e2a9180413479c2b9ddedb1c4ed12 GIT binary patch literal 19082 zcmXtARZtvVu%2acch}(V?k>Seuq3!ka0?!SYtY~>!QI_mLU1R*;_iC)zqjtg?9@EW zsi~gs-aem9xVox58Zt35003x;3No6|bN7D-B0Th0bJY$3dO~tk&~pI*6rBGK5RjHZ z2mq9TqKxDR&y14}1kVq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37n4-70qXFHi43JTlXBlMKY+EGIGVrN*gh7^X+o&(- zO>b{sE2^#@Kn3AQ?V5{-Q|VYCOp-}S%Ri@AP0`ysvYWiBp&`sD%WFwxt;l5Z*6sXm buciH8B8P!AkkjMF00000NkvXXu0mjfkj})d literal 0 HcmV?d00001 diff --git a/pkgdown/favicon/web-app-manifest-512x512.png b/pkgdown/favicon/web-app-manifest-512x512.png new file mode 100644 index 0000000000000000000000000000000000000000..4e7ba6f6246de794e76d5fb4258dac00a2853ef9 GIT binary patch literal 105759 zcmX_obyQT{_xI4| z;SX5ra_&BRf9mk@wT2QFIvF|$1j15Lme&G-;DK-9L8!>U$A!<#9q@tXs%+p60$~t5 zf5Cxr@<>1+8jy;-jJ8kSK_H5c_I$Ia>%q^DY#rz`5z?|AA9gxEvQ8q&n&f2rD~0Tu zPdfU!loP8cM}LuYKNeB?nUMcS_`S;6E7QIE^C|y7{Qi$?lHQ7B0&2;aS&f~?0fg~3 z{5jd*=U4p?o29NrkdPth*`uqOC`SQHvOPkNup`LoLt zvil%M{D(_}HmC?gMkiEHU^?#=QTWeBTOCztndh}(fo#1$#D6M8p=OgLV$k&fYhCMYOeJe; z?edY?gu#$%kDO%g`1WlKm9{{88Xo=M!Xcq|b1P6IF2<_5p_Cn+_|_KF z;2qC1{3p1S=Lto#3byHoSX7M%Z@%(GO$LTl@LUzxiftgRnYpqkUY`n-a)v@LrzT+~?}KcX9Ep)kPO%{eudkz>g?<9Z9k^Ro70M!*#Am!0uvlacykyz znG@#Rf(!P9=mF0KY;QvU?Xh){vv6!?sMO~gOjXVomXPFm?)Q&Oac*C_7t;5+4`=h0 zh5f1Q_3C;|-=K|g?+12GyL&)jds`2-8nkNh^()xZ#>MWd?6R!O8t|37L@Y=jE*Yt-4%_q1N z)U*t**RnE5&nvH0^!R|5XhOufB18UI_V6&c8%w z-nD5@u|nx`%?RZ}x*{45l}uDo7q!1`HKa``k^Zq?UD)_2QV~gooaPcv0|KjYe**f6 zcU~S;G(!KAy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q9t(p_Mbn$k%P3%9-tJxrpdhfRUQ>NaeJ8-Y^+3kGzBap-1iz-bnX9v72Eg_^DjW&Y!zohIpJmn$0fxhiMrWkp zffL-dPbsBMn1Kh_K7k?+br_PEeqr+Wl*MhYtB9qvk|l zEO|gmLhpU~Q=I$QjL)4JdZACMTJSg`V0B%npRlcJ+|?Z=QE)0+LId^YX@%0p~YPxQFSnC2DJuy5V$@%8n-edg_gfk6`$p{$$CxSdl$ z^77W}RjYXx2NQ3TtU3$KqyKAR3BI~jRa10hAzl!q3Lm_2qjx6@h{!4K+Y10w_61@= zUbFHl@F`KvpLn9!X*@qlwLBi&drndF2J=USNCsQN<}@a3R`~G>P~K_6^e+{|wSALw zS*Sz*v)S1V=3Y07p}zu?a(-M(Ni3|BC@TUfw9!enpVofk8bR!D|oQJqfz4pusm&>+K!eucQA*&^c9IawjB|KQ1ST^J>@CY--1G$pT8z zt2?gkkTLoOS1($J;{$K^DP&Ut`nQ?FX(oJ}xHZVOy71!;e7ZuK(rN~mPETKO* z_~15X(@IBHP2n9sAB9~vn|D!s)SWJTFnl)G5OOe)H{NK~rblsqzke8c3KOYZ#ao~^5GvV&XU>7@3VRoRiSUbo)tc)G$S`nfupa@ z{kz#t_RrWJsj{QZ-q^?bo#s(?jm!871k0znwbR3Ve;wu*rneVcVI;9%$XSoDUn2Ms38Azo|fx8KqaED!d}@q z#yq`OH(Wy-&qGJ0PYhRn@@-}y_J;Q>cY-0-V=PnCHf0vdjXq8TGWs6r@xwI{5V=HC hN_vN1{LH)dJt41^>DO6tWLFUIIN7-)Um*OF{|6pK>+Jvl literal 0 HcmV?d00001 From a381b003206eaa68d7504e25678910058bb85e11 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:15:58 +0200 Subject: [PATCH 099/166] :hammer: Resized Sticker --- README.Rmd | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.Rmd b/README.Rmd index 0337e5deb..cfb27e3a0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,7 +19,7 @@ knitr::opts_chunk$set( ) ``` -# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) diff --git a/README.md b/README.md index c495d4de9..f19c71eef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +# {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) @@ -84,5 +84,5 @@ x <- talib::BTC } ``` -
- +
+ From aefc8e08696306464c3a3e2ae20921d75219d471 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:19:26 +0200 Subject: [PATCH 100/166] :hammer: hexSticker script --- tools/hexSticker.R | 195 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 tools/hexSticker.R diff --git a/tools/hexSticker.R b/tools/hexSticker.R new file mode 100644 index 000000000..a0df87aad --- /dev/null +++ b/tools/hexSticker.R @@ -0,0 +1,195 @@ +## script: hexSticker +## author: Serkan Korkmaz +## objective: Generate a hex sticker +## with candlesticks and moving averages +## +## set clean to TRUE for deleting auxillary files +## run this code in the terminal to replace +## the log: +## +## Rscript -e "usethis::use_logo('talib-hex.png')" +clean <- TRUE + +## file destinations +raw_file <- "talib-hex-raw.png" +final_file <- "talib-hex.png" +mask_file <- "talib-hex-mask.png" + +## common colors and fonts +## across the sticker +bg <- "#101A24" +accent <- "#6FBFBF" +up <- "#65a479" +down <- "#d5695d" +ink <- "#D8DEE3" + +sysfonts::font_add_google("JetBrains Mono", "jbmono") +showtext::showtext_auto() + +## construct OHLC +## series +set.seed(1903) +n <- 18 +x <- seq_len(n) +open <- cumsum(rnorm(n, 0, 1)) + 100 +close <- open + rnorm(n, 0, 1) +high <- pmax(open, close) + runif(n, 0.4, 1.1) +low <- pmin(open, close) - runif(n, 0.4, 1.1) +OHLC <- data.frame(x, open, close, high, low, up = close >= open) + +## construct moving averages +## long/short +ma_short <- stats::filter(close, rep(1 / 3, 3), sides = 1) +ma_long <- stats::filter(close, rep(1 / 6, 6), sides = 1) + +## add grids to the +## plot for shabang +## effect +y_rng <- range(OHLC$low, OHLC$high) +y_major <- pretty(y_rng, n = 5) +y_minor <- setdiff(pretty(y_rng, n = 11), y_major) + +x_major <- pretty(range(OHLC$x), n = 6) +x_minor <- setdiff(pretty(range(OHLC$x), n = 13), x_major) + +grid_major_col <- "#1A2A38" +grid_minor_col <- "#14222D" + + +## construct plot +## with {ggplot} +w <- 0.34 + +p_candles <- ggplot2::ggplot(OHLC, ggplot2::aes(x = x)) + + ggplot2::geom_hline( + yintercept = y_major, + color = grid_major_col, + linewidth = 0.28, + alpha = 0.55 + ) + + ggplot2::geom_hline( + yintercept = y_minor, + color = grid_minor_col, + linewidth = 0.22, + alpha = 0.35 + ) + + ggplot2::geom_vline( + xintercept = x_major, + color = grid_major_col, + linewidth = 0.26, + alpha = 0.55 + ) + + ggplot2::geom_vline( + xintercept = x_minor, + color = grid_minor_col, + linewidth = 0.20, + alpha = 0.35 + ) + + ## candle wicks + ggplot2::geom_segment( + ggplot2::aes(xend = x, y = low, yend = high), + linewidth = 0.45, + color = "#B3C2D1" + ) + + ## candle body + ggplot2::geom_rect( + ggplot2::aes( + xmin = x - w, + xmax = x + w, + ymin = pmin(open, close), + ymax = pmax(open, close), + fill = up, + color = up + ), + linewidth = 0.25 + ) + + ## moving averages + ggplot2::geom_line( + ggplot2::aes(y = ma_long), + color = "#00BFA6", + linewidth = 0.8, + na.rm = TRUE + ) + + ggplot2::geom_line( + ggplot2::aes(y = ma_short), + color = accent, + linewidth = 1.0, + na.rm = TRUE + ) + + ggplot2::scale_fill_manual(values = c(`TRUE` = up, `FALSE` = down)) + + ggplot2::scale_color_manual(values = c(`TRUE` = up, `FALSE` = down)) + + ggplot2::coord_cartesian(expand = FALSE) + + ggplot2::theme_void() + + hexSticker::theme_transparent() + + ggplot2::theme(legend.position = "none") + +## construct stricker and +## store locally +hexSticker::sticker( + p_candles, + package = "", + p_family = "jbmono", + p_size = 33, + p_color = ink, + p_y = 1.44, + s_x = 1, + s_y = 1, + s_width = 2, + s_height = 2, + h_fill = bg, + h_color = accent, + h_size = 1, + url = "{talib}", + u_color = accent, + u_size = 33, + u_x = 1.15, + u_y = 0.3, + u_angle = 30, + filename = raw_file, + dpi = 600, + device = ragg::agg_png, + bg = "transparent", + white_around_sticker = FALSE +) + +## construct an additional +## hexsticker to crop figures outside +## the hex +p_blank <- ggplot2::ggplot() + + ggplot2::theme_void() + + hexSticker::theme_transparent() + +hexSticker::sticker( + p_blank, + package = "", + p_size = 1, + p_color = "white", + s_x = 1, + s_y = 1, + s_width = 1, + s_height = 1, + h_fill = "white", + h_color = "white", + h_size = 0.001, # solid white hex + url = "", + filename = mask_file, + dpi = 600, + device = ragg::agg_png, + bg = "black", # black corners outside hex + white_around_sticker = FALSE +) + +## apply the mask +## and crop it +img <- magick::image_read(raw_file) +mask <- magick::image_read(mask_file) + +info <- magick::image_info(img) +mask <- magick::image_resize(mask, paste0(info$width, "x", info$height, "!")) + +out <- magick::image_composite(img, mask, operator = "CopyOpacity") +magick::image_write(out, final_file) + +if (clean) { + base::unlink(c(mask_file, raw_file)) +} From d5d895b0537531594be8afdcfb0d7821ed17c8f1 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:40:39 +0200 Subject: [PATCH 101/166] :hammer: Updated Logo --- README.md | 4 ++-- man/figures/logo.png | Bin 34654 -> 35458 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f19c71eef..297665010 100644 --- a/README.md +++ b/README.md @@ -84,5 +84,5 @@ x <- talib::BTC } ``` -
- +
+ diff --git a/man/figures/logo.png b/man/figures/logo.png index 3215a052f64eabe5332142d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Le2Y%(St__#2AYR zPSQMi-loN(QETo4Z2DXT7djX+w2n#v>FJoiHTjQvOMYF9LTN(;GIjZm`MIgv(h9Y( zT&KqiFaGl#x_kwGfDF@hXes*IBPCJ~WP5qpKbCCt$SEVG!uAQT+lAN4ovDs+<~SR7nbtR~%T z4={l2B%|H+_LD9Ko;%8eZcj|Nc#1p-Sm6Z!>Ge9PQ&-&f+2@oI{2PAx0P;j)EFluo zaBS)g+~AKK@(z+TNn73dWG+rhFaO#sK$lpa5nCzSgk(Sm>oztLZ-C|}-H6n*>-<+R zzRfCmB(Q#~l$@S4CDFtJZZGJkd+9-P#`Ft3;B(w-Idr>QqtcA*>|kixdP9c@w3c|NqCp z$atEOf#L7y^2gx=Ml_jshwI0GzM@7jwY%HUIzs07*qoM6N<$f|6|JbN~PV From aa662614ec0d11d634d29ed6923caeb36be5cd45 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 18:46:41 +0200 Subject: [PATCH 102/166] :hammer: Updated Logo --- README.md | 4 ++-- man/figures/logo.png | Bin 35458 -> 35606 bytes tools/hexSticker.R | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 297665010..c6a58f3a7 100644 --- a/README.md +++ b/README.md @@ -84,5 +84,5 @@ x <- talib::BTC } ``` -
- +
+ diff --git a/man/figures/logo.png b/man/figures/logo.png index ba0057e6953aa1a6b77cf1e2dbeee568a7caf044..75c24715e71e268f5a86197a961605ff197790cf 100644 GIT binary patch literal 35606 zcmX6^1yodB*QUEcx*O>RX&AbPk}f5ryFox;=It8S=ySx7D_p_Fa)Sa1g z_t{VE=Y*@N$fBbVqd-AHq07sGz`)}L6cjW*5(4nQ&tk-_zyqbZ99S6&%9|bv>iZ8U zs3+iC-w&Xm+&G}1j!dASKBYlH5jbYGsS5)?KrmC31p$x1$D>qx0Puk9D5vWJ1!W-f z?;kW?l9UASO+;6DWog7iBr+^k+zoO9Il{f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1AKuuD7YdbA|n6s1E<=)ffLm%B>(^b07*qoM6N<$ Eg6KCFng9R* diff --git a/tools/hexSticker.R b/tools/hexSticker.R index a0df87aad..227947bbd 100644 --- a/tools/hexSticker.R +++ b/tools/hexSticker.R @@ -142,8 +142,8 @@ hexSticker::sticker( url = "{talib}", u_color = accent, u_size = 33, - u_x = 1.15, - u_y = 0.3, + u_x = 0.4, + u_y = 1.5, u_angle = 30, filename = raw_file, dpi = 600, From 18b6aee886f709fcdcca33b4e73fc93dcd755fb8 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 22:35:17 +0200 Subject: [PATCH 103/166] :hammer: Formatted and reformatted * air.toml --- NAMESPACE | 10 + R/chart.R | 182 +++++------ R/chart_elements.R | 148 ++++++--- R/chart_indicator.R | 186 ++++++----- R/chart_options.R | 54 +-- R/series.R | 124 +++---- R/ta_ACCBANDS.R | 270 +++++++-------- R/ta_AD.R | 175 +++++++++- R/ta_ADOSC.R | 174 +++++++++- R/ta_AROON.R | 187 +++++++++-- R/ta_AROONOSC.R | 38 +-- R/ta_BBANDS.R | 344 ++++++++++---------- R/ta_CDLDOJI.R | 22 +- R/ta_CDLDOJISTAR.R | 22 +- R/ta_CDLDRAGONFLYDOJI.R | 22 +- R/ta_CDLEVENINGDOJISTAR.R | 24 +- R/ta_DEMA.R | 94 +++--- R/ta_EMA.R | 98 +++--- R/ta_HT_DCPERIOD.R | 10 +- R/ta_HT_DCPHASE.R | 10 +- R/ta_HT_PHASOR.R | 10 +- R/ta_HT_SINE.R | 10 +- R/ta_HT_TRENDLINE.R | 10 +- R/ta_HT_TRENDMODE.R | 10 +- R/ta_KAMA.R | 94 +++--- R/ta_MACD.R | 124 +++---- R/ta_MACDEXT.R | 24 +- R/ta_MACDFIX.R | 20 +- R/ta_MAMA.R | 94 +++--- R/ta_RSI.R | 103 +++--- R/ta_SMA.R | 178 +++++----- R/ta_STOCH.R | 42 +-- R/ta_STOCHF.R | 42 +-- R/ta_STOCHRSI.R | 44 +-- R/ta_T3.R | 94 +++--- R/ta_TEMA.R | 94 +++--- R/ta_TRIMA.R | 94 +++--- R/ta_ULTOSC.R | 60 ++-- R/ta_WMA.R | 98 +++--- R/utils.R | 197 +++++------ R/zzz.R | 12 +- README.md | 4 +- air.toml | 3 + data-raw/BTC.R | 16 +- data-raw/SPY.R | 34 +- man-roxygen/description.R | 8 +- man/acceleration_bands.Rd | 4 +- man/aroon.Rd | 55 +++- man/bollinger_bands.Rd | 4 +- man/chaikin_AD_line.Rd | 55 +++- man/chaikin_AD_oscillator.Rd | 55 +++- tests/testthat/test-ta_ACCBANDS.R | 20 +- tests/testthat/test-ta_BBANDS.R | 20 +- tests/testthat/test-ta_CDLDOJI.R | 54 +-- tests/testthat/test-ta_CDLDOJISTAR.R | 54 +-- tests/testthat/test-ta_CDLDRAGONFLYDOJI.R | 54 +-- tests/testthat/test-ta_CDLEVENINGDOJISTAR.R | 54 +-- tests/testthat/test-ta_MA.R | 324 +++++++++--------- tests/testthat/test-ta_MACD.R | 70 ++-- tools/hexSticker.R | 210 ++++++------ 60 files changed, 2718 insertions(+), 2028 deletions(-) create mode 100644 air.toml diff --git a/NAMESPACE b/NAMESPACE index 2b5904c81..c6d3ae914 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -25,15 +25,24 @@ S3method(acceleration_bands,data.frame) S3method(acceleration_bands,default) S3method(acceleration_bands,matrix) S3method(acceleration_bands,plotly) +S3method(aroon,data.frame) S3method(aroon,default) +S3method(aroon,matrix) +S3method(aroon,plotly) S3method(aroon_oscillator,default) S3method(bollinger_bands,data.frame) S3method(bollinger_bands,default) S3method(bollinger_bands,matrix) S3method(bollinger_bands,numeric) S3method(bollinger_bands,plotly) +S3method(chaikin_AD_line,data.frame) S3method(chaikin_AD_line,default) +S3method(chaikin_AD_line,matrix) +S3method(chaikin_AD_line,plotly) +S3method(chaikin_AD_oscillator,data.frame) S3method(chaikin_AD_oscillator,default) +S3method(chaikin_AD_oscillator,matrix) +S3method(chaikin_AD_oscillator,plotly) S3method(chart,default) S3method(doji,default) S3method(doji_star,default) @@ -57,6 +66,7 @@ S3method(ultimate_oscillator,default) export(ACCBANDS) export(AD) export(ADOSC) +export(AROON) export(BBANDS) export(CDLDOJI) export(CDLDOJISTAR) diff --git a/R/chart.R b/R/chart.R index 8cb761fa4..eaf481ea9 100644 --- a/R/chart.R +++ b/R/chart.R @@ -2,108 +2,108 @@ #' #' @export chart <- function( - x, - type = "candlestick", - ... + x, + type = "candlestick", + ... ) { - UseMethod( - "chart" - ) + UseMethod( + "chart" + ) } #' @export chart.default <- function( - x, - type = "candlestick", - idx = NULL, - ... + x, + type = "candlestick", + idx = NULL, + ... ) { - ## default chart function - ## - ## The chart function works as an initializer - ## for the downstream indicator function calls - ## - ## There are three chart lists: - ## 1. main: The candlestick/bar chart. This is where all - ## all indicators that are charted on the candlestick - ## lives alongside the pricechart itself. - ## 2. sub: A list of indicators. This is where all indicators - ## that are charted below the main chart lives. For example - ## RSI, MACD etc. - ## 3. chart: The user-facing TA chart. - ## This is empty and is constructed on the fly - ## via plotly::subplot. - .color_values <- chart.theme() - .plotting_environment$sub <- .plotting_environment$chart <- list() + ## default chart function + ## + ## The chart function works as an initializer + ## for the downstream indicator function calls + ## + ## There are three chart lists: + ## 1. main: The candlestick/bar chart. This is where all + ## all indicators that are charted on the candlestick + ## lives alongside the pricechart itself. + ## 2. sub: A list of indicators. This is where all indicators + ## that are charted below the main chart lives. For example + ## RSI, MACD etc. + ## 3. chart: The user-facing TA chart. + ## This is empty and is constructed on the fly + ## via plotly::subplot. + .color_values <- chart.theme() + .plotting_environment$sub <- .plotting_environment$chart <- list() - ## convert input to data.frame object - ## and store in the .plotting_environment - ## to avoid having to pass OHLC on every call - ## - ## NOTE: it is also a hard requirement on - ## {plotly} side - x <- as.data.frame(x) - x$idx <- if (is.null(idx)) 1:nrow(x) else idx - .plotting_environment$x <- data_frame <- x + ## convert input to data.frame object + ## and store in the .plotting_environment + ## to avoid having to pass OHLC on every call + ## + ## NOTE: it is also a hard requirement on + ## {plotly} side + x <- as.data.frame(x) + x$idx <- if (is.null(idx)) 1:nrow(x) else idx + .plotting_environment$x <- data_frame <- x - ## generate price chart - ## based on type. can be either - ## candlestick or barchart. - ## - ## TODO: Consider adding the option to use price series - ## instead of OHLC. - assert(is.character(type) && length(type) == 1) - assert(type %in% c("candlestick", "ohlc")) + ## generate price chart + ## based on type. can be either + ## candlestick or barchart. + ## + ## TODO: Consider adding the option to use price series + ## instead of OHLC. + assert(is.character(type) && length(type) == 1) + assert(type %in% c("candlestick", "ohlc")) - price_chart <- plotly::plot_ly( - data = data_frame, - type = type, - x = ~idx, - open = ~open, - close = ~close, - high = ~high, - low = ~low, + price_chart <- plotly::plot_ly( + data = data_frame, + type = type, + x = ~idx, + open = ~open, + close = ~close, + high = ~high, + low = ~low, - ## colors of bullish - ## and bearish candles/bars - ## - ## NOTE: if fillcolor is NULL - ## the candles are hollow. - ## If there is eventual demand this can be changed - increasing = list( - line = list( - color = .color_values$bull_color, - width = 3 - 1.75 - ), - fillcolor = plotly::toRGB( - x = .color_values$bull_color, - alpha = 1 ## This should be controlled from .chart_theme() - ) - ), - decreasing = list( - line = list( - color = .color_values$bear_color, - width = 3 - 1.75 - ), + ## colors of bullish + ## and bearish candles/bars + ## + ## NOTE: if fillcolor is NULL + ## the candles are hollow. + ## If there is eventual demand this can be changed + increasing = list( + line = list( + color = .color_values$bull_color, + width = 3 - 1.75 + ), + fillcolor = plotly::toRGB( + x = .color_values$bull_color, + alpha = 1 ## This should be controlled from .chart_theme() + ) + ), + decreasing = list( + line = list( + color = .color_values$bear_color, + width = 3 - 1.75 + ), - fillcolor = plotly::toRGB( - x = .color_values$bear_color, - alpha = 1 ## This should be controlled from .chart_theme() - ) - ), - ... - ) + fillcolor = plotly::toRGB( + x = .color_values$bear_color, + alpha = 1 ## This should be controlled from .chart_theme() + ) + ), + ... + ) - ## store in main chart - ## (see description) - .plotting_environment$main <- .chart_layout( - x = price_chart, - title_text = sprintf( - "Ticker: %s
Period: %s", - deparse(substitute(x)), - "Period Value" - ) - ) + ## store in main chart + ## (see description) + .plotting_environment$main <- .chart_layout( + x = price_chart, + title_text = sprintf( + "Ticker: %s
Period: %s", + deparse(substitute(x)), + "Period Value" + ) + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/chart_elements.R b/R/chart_elements.R index 27890c798..b8c0db5d6 100644 --- a/R/chart_elements.R +++ b/R/chart_elements.R @@ -1,57 +1,103 @@ .chart_layout <- function(x, title_text, ...) { - ## extract chart theme - ## from R/chart_options.R - chart_theme <- chart.theme() + ## extract chart theme + ## from R/chart_options.R + chart_theme <- chart.theme() - ## hardcoded layout elements - ## and added flexibility in ellipsis - plotly::layout( - p = x, - paper_bgcolor = chart_theme$paper_bgcolor, - plot_bgcolor = chart_theme$plot_bgcolor, - font = list( - size = 14 * getOption("talib.chart.scale", default = 1), - color = chart_theme$font_color - ), - yaxis = list( - gridcolor = chart_theme$grid_color - ), - xaxis = list( - gridcolor = chart_theme$grid_color, - rangeslider = list( - visible = getOption("talib.chart.slider", default = FALSE), - thickness = getOption("talib.chart.slider.size", default = 0.05) - ) - ), + ## hardcoded layout elements + ## and added flexibility in ellipsis + plotly::layout( + p = x, + paper_bgcolor = chart_theme$paper_bgcolor, + plot_bgcolor = chart_theme$plot_bgcolor, + font = list( + size = 14 * + getOption( + "talib.chart.scale", + default = 1 + ), + color = chart_theme$font_color + ), + yaxis = list( + gridcolor = chart_theme$grid_color + ), + xaxis = list( + gridcolor = chart_theme$grid_color, + rangeslider = list( + visible = getOption( + "talib.chart.slider", + default = FALSE + ), + thickness = getOption( + "talib.chart.slider.size", + default = 0.05 + ) + ) + ), - ## legend start - showlegend = getOption("talib.chart.legend", default = TRUE), - legend = list( - orientation = 'h', - x = 0, - y = 100, - yref = "container", - title = list( - text = "Indicators:", - font = list( - size = 16 * getOption("talib.chart.scale", default = 1) - ) - ) - ), - ## legend end + ## legend start + showlegend = getOption( + "talib.chart.legend", + default = TRUE + ), + legend = list( + orientation = 'h', + x = 0, + y = 100, + yref = "container", + title = list( + text = "Indicators:", + font = list( + size = 16 * + getOption( + "talib.chart.scale", + default = 1 + ) + ) + ) + ), + ## legend end - ## title start - title = list( - text = title_text, - font = list( - size = 20 * getOption("talib.chart.scale", default = 1) - ), - x = 1, - xref = "paper", - xanchor = "right" - ), - ## title end + ## title start + title = list( + text = title_text, + font = list( + size = 20 * + getOption( + "talib.chart.scale", + default = 1 + ) + ), + x = 1, + xref = "paper", + xanchor = "right" + ), + ## title end - ... - ) + ... + ) +} + + +## chart titles for +## subplots +add_title <- function( + x, + text +) { + plotly::add_annotations( + p = x, + text = text, + x = 0, + y = 1, + xref = "paper", + yref = "paper", + showarrow = FALSE, + font = list( + size = 16 * + getOption( + "talib.chart.scale", + default = 1 + ) + ) + ) } diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 2a99deb2e..6f01f0a93 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,92 +1,124 @@ #' @title Chart indicators #' @export indicator <- function( - FUN, - cols, - ... + FUN, + cols, + ... ) { - ## indicator - ## - ## description: - ## the indicator function builds upon existing - ## {plotly} objects if it has been defined, otherwise - ## it will create a standalone chart with the indicator - ## only - parent_frame <- parent.frame() + ## indicator + ## + ## description: + ## the indicator function builds upon existing + ## {plotly} objects if it has been defined, otherwise + ## it will create a standalone chart with the indicator + ## only + parent_frame <- parent.frame() - ## resolve passed formula - ## via 'cols' and store in the - ## parent_frame - has_var <- !missing(cols) - if (has_var) { - var_expr <- eval.parent(substitute(cols)) - stopifnot(inherits(var_expr, "formula")) - environment(var_expr) <- parent_frame - } + ## resolve passed formula + ## via 'cols' and store in the + ## parent_frame + has_var <- !missing(cols) + if (has_var) { + var_expr <- eval.parent(substitute(cols)) + stopifnot(inherits(var_expr, "formula")) + environment(var_expr) <- parent_frame + } - ## resolve the call - ## passed via FUN - f_call <- substitute(FUN) - pre_args <- list() - if (is.call(f_call)) { - f <- eval(f_call[[1L]], envir = parent_frame) - pre_args <- as.list(f_call)[-1L] - } else { - f <- match.fun(eval.parent(f_call)) - } + ## resolve the call + ## passed via FUN + f_call <- substitute(FUN) + pre_args <- list() + if (is.call(f_call)) { + f <- eval(f_call[[1L]], envir = parent_frame) + pre_args <- as.list(f_call)[-1L] + } else { + f <- match.fun(eval.parent(f_call)) + } - ## resolve plotting - ## environment; if it exists - ## it means talib::chart has been called - ## otherwise generate a new environment and - ## work off of that - .plotting_environment <- get0(".plotting_environment", inherits = TRUE) - if (is.null(.plotting_environment)) { - .plotting_environment <- new.env(parent = emptyenv()) - assign(".plotting_environment", .plotting_environment, inherits = TRUE) - } + ## resolve plotting + ## environment; if it exists + ## it means talib::chart has been called + ## otherwise generate a new environment and + ## work off of that + .plotting_environment <- get0( + ".plotting_environment", + inherits = TRUE + ) + if (is.null(.plotting_environment)) { + .plotting_environment <- new.env(parent = emptyenv()) + assign( + ".plotting_environment", + .plotting_environment, + inherits = TRUE + ) + } - if (is.null(.plotting_environment$main)) { - .plotting_environment$main <- .chart_layout( - x = plotly::plotly_empty(), - title_text = "fisk" - ) - } + if (is.null(.plotting_environment$main)) { + .plotting_environment$main <- .chart_layout( + x = plotly::plotly_empty(), + title_text = "fisk" + ) + } - .plot <- .plotting_environment$main + .plot <- .plotting_environment$main - ## build the FUN call - ## with argument and let the - ## the dispatcher handle the rest - dots <- as.list(substitute(list(...)))[-1L] - args <- c(list(.plot), pre_args) + ## build the FUN call + ## with argument and let the + ## the dispatcher handle the rest + dots <- as.list(substitute(list(...)))[-1L] + args <- c(list(.plot), pre_args) - if (has_var) { - f_formals <- tryCatch(names(formals(f)), error = function(e) character()) - name <- intersect(c("cols", "formula"), f_formals)[1] - if (!is.na(name)) args[[name]] <- var_expr - } + if (has_var) { + f_formals <- tryCatch( + names(formals(f)), + error = function(e) { + character() + } + ) + name <- intersect(c("cols", "formula"), f_formals)[1] + if (!is.na(name)) args[[name]] <- var_expr + } - output <- do.call(f, c(args, dots), envir = parent_frame) + output <- do.call(f, c(args, dots), envir = parent_frame) - ## construct plotly object - ## if based off of the char - if (inherits(output, "plotly")) { - panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - stopifnot(all(vapply(panels, inherits, logical(1), what = "plotly"))) - n <- length(panels) - main_h <- getOption("talib.chart.main", 0.7) - heights <- if (n > 1) c(main_h, rep((1 - main_h) / (n - 1), n - 1)) else 1 - fig <- plotly::subplot( - panels, - nrows = n, - shareX = TRUE, - margin = 0.02, - heights = heights - ) - .plotting_environment$chart <- fig - return(fig) - } + ## construct plotly object + ## if based off of the char + if (inherits(output, "plotly")) { + panels <- c( + list(.plotting_environment$main), + .plotting_environment$sub + ) + stopifnot(all(vapply( + panels, + inherits, + logical(1), + what = "plotly" + ))) + n <- length(panels) + main_h <- getOption("talib.chart.main", 0.7) + heights <- if (n > 1) { + c(main_h, rep((1 - main_h) / (n - 1), n - 1)) + } else { + 1 + } + fig <- plotly::layout( + plotly::subplot( + panels, + nrows = n, + shareX = TRUE, + margin = 0.02, + heights = heights + ), - output + ## this part is necessary + ## to avoid local subplots + ## to interfere with the main + ## plot + showlegend = TRUE + ) + .plotting_environment$chart <- fig + return(fig) + } + + output } diff --git a/R/chart_options.R b/R/chart_options.R index add4f2c40..e3d766c8d 100644 --- a/R/chart_options.R +++ b/R/chart_options.R @@ -1,31 +1,31 @@ ## chart theme chart.theme <- function() { - ## bull or bear colors - if (getOption("talib.chart.deficiency", default = FALSE)) { - bull_color = "#5d8ca8" - bear_color = "#d3ba68" - } else { - bull_color = "#65a479" - bear_color = "#d5695d" - } + ## bull or bear colors + if (getOption("talib.chart.deficiency", default = FALSE)) { + bull_color = "#5d8ca8" + bear_color = "#d3ba68" + } else { + bull_color = "#65a479" + bear_color = "#d5695d" + } - if (getOption("talib.chart.dark", default = TRUE)) { - list( - paper_bgcolor = '#2b3139', - plot_bgcolor = '#2b3139', - font_color = '#848e9c', - grid_color = '#40454c', - bull_color = bull_color, - bear_color = bear_color - ) - } else { - list( - paper_bgcolor = '#E3E3E3', - plot_bgcolor = '#E3E3E3', - font_color = '#A3A3A3', - grid_color = '#D3D3D3', - bull_color = bull_color, - bear_color = bear_color - ) - } + if (getOption("talib.chart.dark", default = TRUE)) { + list( + paper_bgcolor = '#2b3139', + plot_bgcolor = '#2b3139', + font_color = '#848e9c', + grid_color = '#40454c', + bull_color = bull_color, + bear_color = bear_color + ) + } else { + list( + paper_bgcolor = '#E3E3E3', + plot_bgcolor = '#E3E3E3', + font_color = '#A3A3A3', + grid_color = '#D3D3D3', + bull_color = bull_color, + bear_color = bear_color + ) + } } diff --git a/R/series.R b/R/series.R index 4ceb422e6..6840ec3a9 100644 --- a/R/series.R +++ b/R/series.R @@ -4,41 +4,41 @@ ## and plotly series <- function( - x, - default, - data, - ... + x, + default, + data, + ... ) { - target <- if (!missing(x)) x else default - UseMethod("series", target) + target <- if (!missing(x)) x else default + UseMethod("series", target) } ## plotly series #' @export series.plotly <- function( - x, - formula, - default, - data, - ... + x, + formula, + default, + data, + ... ) { - ## if the data is not provided - ## extract the data from the plotly - ## object - ## - ## NOTE: If volume is missing - ## there might be an issue - if (missing(data)) { - ## extract data - data <- .plotting_environment$x - } + ## if the data is not provided + ## extract the data from the plotly + ## object + ## + ## NOTE: If volume is missing + ## there might be an issue + if (missing(data)) { + ## extract data + data <- .plotting_environment$x + } - series.formula( - x = formula, - default = default, - data = data, - ... - ) + series.formula( + x = formula, + default = default, + data = data, + ... + ) } # #' @export @@ -59,43 +59,43 @@ series.plotly <- function( ## formula series #' @export series.formula <- function( - x, - default, - data, - ... + x, + default, + data, + ... ) { - ## coerce to data.frame - ## for downstream compatibility - if (!is.data.frame(data)) { - data <- as.data.frame( - data - ) - } + ## coerce to data.frame + ## for downstream compatibility + if (!is.data.frame(data)) { + data <- as.data.frame( + data + ) + } - ## if the formula is missing - ## replace with the default - ## value - if (missing(x)) { - x <- default - } + ## if the formula is missing + ## replace with the default + ## value + if (missing(x)) { + x <- default + } - ## if additional arguments are - ## not passed we extract the data - ## by name to avoid the additional - ## cost of model.frame - if (...length() == 0) { - output <- data[, - all.vars(x), - drop = FALSE - ] - } else { - ## return data.frame - output <- model.frame( - formula = x, - data = data, - ... - ) - } + ## if additional arguments are + ## not passed we extract the data + ## by name to avoid the additional + ## cost of model.frame + if (...length() == 0) { + output <- data[, + all.vars(x), + drop = FALSE + ] + } else { + ## return data.frame + output <- model.frame( + formula = x, + data = data, + ... + ) + } - return(output) + return(output) } diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index c7880f6a8..4f798df14 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -9,12 +9,12 @@ #' #' @template description acceleration_bands <- function( - x, - cols, - n = 10, - ... + x, + cols, + n = 10, + ... ) { - UseMethod("acceleration_bands") + UseMethod("acceleration_bands") } #' @usage NULL @@ -26,163 +26,167 @@ ACCBANDS <- acceleration_bands #' @aliases acceleration_bands #' @export acceleration_bands.default <- function( - x, - cols, - n = 10, - ... + x, + cols, + n = 10, + ... ) { - ## check input - ## cols if passed - if (!missing(cols)) { - assert( - is.formula(cols), - paste0( - "'cols' has to be <", - class(~s), - ">. ", - "Got <", - class(cols), - ">." - ) - ) - assert( - length(all.vars(cols)) == 3, - paste0( - "'cols' has to be length 3. ", - "Got length ", - length(all.vars(cols)) - ) - ) - } + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 3, + paste0( + "'cols' has to be length 3. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } - HLC <- series( - x = cols, - default = ~ open + high + close, - data = x, - ... - ) + HLC <- series( + x = cols, + default = ~ open + high + close, + data = x, + ... + ) - assert(n >= 2) + assert(n >= 2) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - as.data.frame( - .Call( - "impl_ta_ACCBANDS", - HLC[[1]], - HLC[[2]], - HLC[[3]], - as.integer(n) - ) - ) + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + as.data.frame( + .Call( + "impl_ta_ACCBANDS", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) + ) + ) } #' @usage NULL #' @aliases acceleration_bands #' @export acceleration_bands.data.frame <- function( - x, - cols, - n = 10, - ... + x, + cols, + n = 10, + ... ) { - as.data.frame( - NextMethod() - ) + as.data.frame( + NextMethod() + ) } #' @usage NULL #' @aliases acceleration_bands #' @export acceleration_bands.matrix <- function( - x, - cols, - n = 10, - ... + x, + cols, + n = 10, + ... ) { - as.matrix( - NextMethod() - ) + as.matrix( + NextMethod() + ) } #' @usage NULL #' @aliases acceleration_bands #' @export acceleration_bands.plotly <- function( - x, - cols, - n = 10, - data, - ... + x, + cols, + n = 10, + data, + ... ) { - ## prepare series - ## from - HLC <- series( - x = x, - formula = cols, - default = ~ open + high + close, - data = data, - ... - ) + ## prepare series + ## from + HLC <- series( + x = x, + formula = cols, + default = ~ open + high + close, + data = data, + ... + ) - ## calculate acceleration - ## bands and return as - ## data.frame - .indicator <- as.data.frame( - .Call( - "impl_ta_ACCBANDS", - HLC[[1]], - HLC[[2]], - HLC[[3]], - as.integer(n) - ) - ) + ## calculate acceleration + ## bands and return as + ## data.frame + .indicator <- as.data.frame( + .Call( + "impl_ta_ACCBANDS", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) + ) + ) - .indicator$idx <- 1:nrow(.indicator) + .indicator$idx <- 1:nrow(.indicator) - ## add upper, middle and lower bands - ## to the main chart - wrapped in local - ## to circumvent lazy evaluation. - ## - ## NOTE: Otherwise it will only evaluate - ## and add the last element - for (i in seq_len(ncol(HLC))) { - local({ - j <- i + ## add upper, middle and lower bands + ## to the main chart - wrapped in local + ## to circumvent lazy evaluation. + ## + ## NOTE: Otherwise it will only evaluate + ## and add the last element + for (i in seq_len(ncol(HLC))) { + local({ + j <- i - .plotting_environment$main <- plotly::add_lines( - .plotting_environment$main, - data = .indicator, - x = ~idx, - y = ~ .indicator[, j], - inherit = FALSE, - line = list( - color = '#4682b4' - ), - showlegend = FALSE, - legendgroup = 'acceleration_band', - name = c("Upper Band", "Middle Band", "Lower Band")[j], - ) - }) - } + .plotting_environment$main <- plotly::add_lines( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + inherit = FALSE, + line = list( + color = '#4682b4' + ), + showlegend = FALSE, + legendgroup = 'acceleration_band', + name = c( + "Upper Band", + "Middle Band", + "Lower Band" + )[j], + ) + }) + } - .plotting_environment$main <- plotly::add_ribbons( - p = .plotting_environment$main, - inherit = FALSE, - data = .indicator, - x = ~idx, - ymin = ~ .indicator[, 3], - ymax = ~ .indicator[, 1], - fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), - line = list( - color = "transparent" - ), - showlegend = TRUE, - legendgroup = 'acceleration_band', - name = paste0( - "Acceleration Bands" - ) - ) + .plotting_environment$main <- plotly::add_ribbons( + p = .plotting_environment$main, + inherit = FALSE, + data = .indicator, + x = ~idx, + ymin = ~ .indicator[, 3], + ymax = ~ .indicator[, 1], + fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + line = list( + color = "transparent" + ), + showlegend = TRUE, + legendgroup = 'acceleration_band', + name = paste0( + "Acceleration Bands" + ) + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_AD.R b/R/ta_AD.R index 35f9409ec..979a321d9 100644 --- a/R/ta_AD.R +++ b/R/ta_AD.R @@ -1,25 +1,170 @@ -#' @title Chaikin A/D Line +#' @export +#' @family Volume Indicator #' +#' @title Chaikin A/D Line #' -#' @family Volume Indicator +#' @templateVar .title Chaikin A/D Line +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun chaikin_AD_line #' -#' @export -chaikin_AD_line <- function(x, ...) { - UseMethod( - "chaikin_AD_line" - ) +#' @template description +chaikin_AD_line <- function( + x, + cols, + ... +) { + UseMethod( + "chaikin_AD_line" + ) } +#' @usage NULL +#' @aliases chaikin_AD_line #' @export AD <- chaikin_AD_line +#' @usage NULL +#' @aliases chaikin_AD_line +#' @export +chaikin_AD_line.default <- function( + x, + cols, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + HLCV <- series( + x = cols, + default = ~ high + low + close + volume, + data = x, + ... + ) + + ## pass values assuming + ## the series follows HLCV + data.frame( + AD_line = .Call( + "impl_ta_AD", + HLCV[[1]], + HLCV[[2]], + HLCV[[3]], + HLCV[[4]] + ) + ) +} + + +#' @usage NULL +#' @aliases chaikin_AD_line #' @export -chaikin_AD_line.default <- function(x, ...) { - .Call( - "impl_ta_AD", - .high(x), - .low(x), - .close(x), - .volume(x) - ) +chaikin_AD_line.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases chaikin_AD_line +#' @export +chaikin_AD_line.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases chaikin_AD_line +#' @export +chaikin_AD_line.plotly <- function( + x, + cols, + data, + ... +) { + ## prepare HLCV series + HLCV <- series( + x = x, + formula = cols, + default = ~ high + low + close + volume, + data = data, + ... + ) + + ## construct the chaikin A/D + ## line and store as data.frame + ## for plotly + .indicator <- data.frame( + AD_line = .Call( + "impl_ta_AD", + HLCV[[1]], + HLCV[[2]], + HLCV[[3]], + HLCV[[4]] + ) + ) + + ## add idx for the axis + ## TODO: this should be passed + ## upstream instead + .indicator$idx <- 1:nrow(.indicator) + + ## chart indicator + ## as subplot + output <- add_title( + ## generate plot + ## as line + plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~AD_line, + type = "scatter", + mode = "lines", + showlegend = FALSE + ), + ## add title to + ## the plot + text = "Chaikin A/D Line" + ) + + ## pass to sub as + ## list to preserve + ## types + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + ## return plot + ## if called directly + output } diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R index bbe015823..2741d2961 100644 --- a/R/ta_ADOSC.R +++ b/R/ta_ADOSC.R @@ -1,26 +1,168 @@ +#' @export +#' @family Volume Indicator +#' #' @title Chaikin A/D Oscillator #' -#' @family Volume Indicator +#' @templateVar .title Chaikin A/D Oscillator +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun chaikin_AD_oscillator #' -#' @export -chaikin_AD_oscillator <- function(x, fast = 3, slow = 10, ...) { - UseMethod( - "chaikin_AD_oscillator" - ) +#' @template description +chaikin_AD_oscillator <- function(x, cols, fast = 3, slow = 10, ...) { + UseMethod( + "chaikin_AD_oscillator" + ) } +#' @usage NULL +#' @aliases chaikin_AD_oscillator #' @export ADOSC <- chaikin_AD_oscillator #' @export -chaikin_AD_oscillator.default <- function(x, fast = 3, slow = 10, ...) { - .Call( - "impl_ta_ADOSC", - .high(x), - .low(x), - .close(x), - .volume(x), - as.integer(fast), - as.integer(slow) - ) +chaikin_AD_oscillator.default <- function(x, cols, fast = 3, slow = 10, ...) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + HLCV <- series( + x = cols, + default = ~ high + low + close + volume, + data = x, + ... + ) + + data.frame( + AD_oscillator = .Call( + "impl_ta_ADOSC", + HLCV[[1]], + HLCV[[2]], + HLCV[[3]], + HLCV[[4]], + as.integer(fast), + as.integer(slow) + ) + ) +} + + +#' @usage NULL +#' @aliases chaikin_AD_oscillator +#' @export +chaikin_AD_oscillator.data.frame <- function( + x, + cols, + fast = 3, + slow = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases chaikin_AD_oscillator +#' @export +chaikin_AD_oscillator.matrix <- function( + x, + cols, + fast = 3, + slow = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases chaikin_AD_oscillator +#' @export +chaikin_AD_oscillator.plotly <- function( + x, + cols, + data, + fast = 3, + slow = 10, + ... +) { + ## prepare series + HLCV <- series( + x = x, + formula = cols, + default = ~ high + low + close + volume, + data = data, + ... + ) + + .indicator <- data.frame( + AD_line = .Call( + "impl_ta_ADOSC", + HLCV[[1]], + HLCV[[2]], + HLCV[[3]], + HLCV[[4]], + as.integer(fast), + as.integer(slow) + ) + ) + + .indicator$idx <- 1:nrow(.indicator) + ad_col <- "#1f77b4" + + ad_plot <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~AD_line, + type = "scatter", + mode = "lines", + line = list(color = ad_col), + name = "AD", + legendgroup = "ChaikinOscillator", + showlegend = FALSE + ) + + # dashed y = 0 line in the same color + ad_plot <- plotly::add_lines( + p = ad_plot, + x = .indicator$idx, + y = 0, + line = list(color = ad_col, dash = "dash"), + showlegend = FALSE, + hoverinfo = "skip", + legendgroup = "ChaikinOscillator", + name = "Zero" + ) + + ad_plot <- add_title( + x = ad_plot, + text = "Chaikin A/D Oscillator" + ) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(ad_plot) + ) + + ad_plot } diff --git a/R/ta_AROON.R b/R/ta_AROON.R index cf4496b68..e51401b18 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -1,34 +1,167 @@ -#' @title Aroon -#' -#' @description -#' +#' @export #' @family Momentum Indicator #' +#' @title Aroon +#' @templateVar .title Chaikin A/D Oscillator +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun aroon +#' +#' @template description +aroon <- function( + x, + cols, + n = 10, + ... +) { + UseMethod( + generic = "aroon" + ) +} + +#' @usage NULL +#' @aliases aroon +#' @export +AROON <- aroon + +#' @export +aroon.default <- function( + x, + cols, + n = 10, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 2, + paste0( + "'cols' has to be length 2. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + HL <- series( + x = cols, + default = ~ high + low, + data = x, + ... + ) + + as.data.frame( + .Call( + "impl_ta_AROON", + HL[[1]], + HL[[2]], + as.integer(n) + ) + ) +} + + +#' @usage NULL +#' @aliases aroon #' @export -aroon <- function(x, n, ...) { - UseMethod( - generic = "aroon" - ) +aroon.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) } +#' @usage NULL +#' @aliases aroon +#' @export +aroon.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + + +#' @usage NULL +#' @aliases aroon #' @export -aroon.default <- function(x, n, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - assert(is.numeric(x)) - - ## 1) pass `x` assuming that - ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) - .Call("impl_ta_AROON", .high(x), .low(x), as.integer(n)) +aroon.plotly <- function( + x, + cols, + data, + n = 10, + ... +) { + HL <- series( + x = x, + formula = cols, + default = ~ high + low, + data = data, + ... + ) + + .indicator <- as.data.frame( + .Call( + "impl_ta_AROON", + HL[[1]], + HL[[2]], + as.integer(n) + ) + ) + + .indicator$idx <- 1:nrow(.indicator) + + ad_plot <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~aroondown, + type = "scatter", + mode = "lines", + # line = list(color = ad_col), + name = "AD", + legendgroup = "Aroon", + showlegend = FALSE + ) + + # dashed y = 0 line in the same color + ad_plot <- plotly::add_lines( + p = ad_plot, + x = .indicator$idx, + y = ~aroonup, + # line = list(color = ad_col, dash = "dash"), + showlegend = FALSE, + hoverinfo = "skip", + legendgroup = "Aroon", + name = "Zero" + ) + + ad_plot <- add_title( + x = ad_plot, + text = "Aroon" + ) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(ad_plot) + ) + + ad_plot } diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index 60fe6b5db..a5b3c3ca4 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -4,30 +4,30 @@ #' #' @export aroon_oscillator <- function(x, n, ...) { - UseMethod( - generic = "aroon_oscillator" - ) + UseMethod( + generic = "aroon_oscillator" + ) } #' @export aroon_oscillator.default <- function(x, n, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - assert(is.numeric(x)) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + assert(is.numeric(x)) - ## 1) pass `x` assuming that - ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) + ## 1) pass `x` assuming that + ## it follows Open (x[,1]), High (x[,2]) + ## Low (x[,3]) and Close (x[,4]) - .Call("impl_ta_AROONOSC", .high(x), .low(x), as.integer(n)) + .Call("impl_ta_AROONOSC", .high(x), .low(x), as.integer(n)) } diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 5d41454a7..b97a02cf0 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -9,16 +9,16 @@ #' #' @template description bollinger_bands <- function( - x, - cols, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - UseMethod( - generic = "bollinger_bands" - ) + UseMethod( + generic = "bollinger_bands" + ) } #' @usage NULL @@ -30,194 +30,198 @@ BBANDS <- bollinger_bands #' @aliases bollinger_bands #' @export bollinger_bands.default <- function( - x, - cols, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - ## check input - ## cols if passed - if (!missing(cols)) { - assert( - is.formula(cols), - paste0( - "'cols' has to be <", - class(~s), - ">. ", - "Got <", - class(cols), - ">." - ) - ) - assert( - length(all.vars(cols)) == 1, - paste0( - "'cols' has to be length 1. ", - "Got length ", - length(all.vars(cols)) - ) - ) - } - - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - ma <- map_maType_call(substitute(ma)) - - x <- series( - x = cols, - default = ~open, - data = x, - ... - ) - - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - as.data.frame( - .Call( - "impl_ta_BBANDS", - as.double(x[[1]]), - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) - ) - ) + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + ma <- map_maType_call(substitute(ma)) + + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + as.data.frame( + .Call( + "impl_ta_BBANDS", + as.double(x[[1]]), + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) + ) } #' @usage NULL #' @aliases bollinger_bands #' @export bollinger_bands.numeric <- function( - x, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - ma <- map_maType_call(substitute(ma)) - - .Call( - "impl_ta_BBANDS", - as.double(x), - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) - ) + ma <- map_maType_call(substitute(ma)) + + .Call( + "impl_ta_BBANDS", + as.double(x), + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) } #' @usage NULL #' @aliases bollinger_bands #' @export bollinger_bands.data.frame <- function( - x, - cols, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - as.data.frame( - NextMethod() - ) + as.data.frame( + NextMethod() + ) } #' @usage NULL #' @aliases bollinger_bands #' @export bollinger_bands.matrix <- function( - x, - cols, - ma = SMA(n = 10), - up = 2, - down = 2, - ... + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + ... ) { - as.data.frame( - NextMethod() - ) + as.data.frame( + NextMethod() + ) } #' @usage NULL #' @aliases bollinger_bands #' @export bollinger_bands.plotly <- function( - x, - cols, - ma = SMA(n = 10), - up = 2, - down = 2, - data, - ... + x, + cols, + ma = SMA(n = 10), + up = 2, + down = 2, + data, + ... ) { - ma <- map_maType_call(substitute(ma)) - - ## prepare series - ## from - x <- series( - x = x, - formula = cols, - default = ~open, - data = data, - ... - ) - - .indicator <- as.data.frame( - .Call( - "impl_ta_BBANDS", - as.double(x[[1]]), - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) - ) - ) - - .indicator$idx <- 1:nrow(.indicator) - - ## constuct chart - ## element - for (i in seq_len(ncol(.indicator) - 1)) { - local({ - j <- i - - .plotting_environment$main <- plotly::add_lines( - .plotting_environment$main, - data = .indicator, - x = ~idx, - y = ~ .indicator[, j], - inherit = FALSE, - line = list( - color = '#4682b4' - ), - showlegend = FALSE, - legendgroup = 'bollinger_band', - name = c("Upper Band", "Middle Band", "Lower Band")[j], - ) - }) - } - - .plotting_environment$main <- plotly::add_ribbons( - p = .plotting_environment$main, - inherit = FALSE, - data = .indicator, - x = ~idx, - ymin = ~ .indicator[, 3], - ymax = ~ .indicator[, 1], - fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), - line = list( - color = "transparent" - ), - showlegend = TRUE, - legendgroup = 'bollinger_band', - name = paste0( - "BBand" - ) - ) - - .plotting_environment$main + ma <- map_maType_call(substitute(ma)) + + ## prepare series + ## from + x <- series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) + + .indicator <- as.data.frame( + .Call( + "impl_ta_BBANDS", + as.double(x[[1]]), + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## constuct chart + ## element + for (i in seq_len(ncol(.indicator) - 1)) { + local({ + j <- i + + .plotting_environment$main <- plotly::add_lines( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + inherit = FALSE, + line = list( + color = '#4682b4' + ), + showlegend = FALSE, + legendgroup = 'bollinger_band', + name = c( + "Upper Band", + "Middle Band", + "Lower Band" + )[j], + ) + }) + } + + .plotting_environment$main <- plotly::add_ribbons( + p = .plotting_environment$main, + inherit = FALSE, + data = .indicator, + x = ~idx, + ymin = ~ .indicator[, 3], + ymax = ~ .indicator[, 1], + fillcolor = plotly::toRGB("#4682b4", alpha = 0.2), + line = list( + color = "transparent" + ), + showlegend = TRUE, + legendgroup = 'bollinger_band', + name = paste0( + "BBand" + ) + ) + + .plotting_environment$main } diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index 510685053..ba147967c 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export doji <- function(x, ...) { - UseMethod( - "doji" - ) + UseMethod( + "doji" + ) } #' @export @@ -12,12 +12,12 @@ CDLDOJI <- doji #' @export doji.default <- function(x, ...) { - .Call( - "impl_ta_CDLDOJI", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLDOJI", + .open(x), + .high(x), + .low(x), + .close(x), + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index fdac3531d..dfe370307 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export doji_star <- function(x, ...) { - UseMethod( - "doji_star" - ) + UseMethod( + "doji_star" + ) } #' @export @@ -12,12 +12,12 @@ CDLDOJISTAR <- doji_star #' @export doji_star.default <- function(x, ...) { - .Call( - "impl_ta_CDLDOJISTAR", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLDOJISTAR", + .open(x), + .high(x), + .low(x), + .close(x), + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index 57457418e..95b0d79f2 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export dragonfly_doji <- function(x, ...) { - UseMethod( - "dragonfly_doji" - ) + UseMethod( + "dragonfly_doji" + ) } #' @export @@ -12,12 +12,12 @@ CDLDRAGONFLYDOJI <- dragonfly_doji #' @export dragonfly_doji.default <- function(x, ...) { - .Call( - "impl_ta_CDLDRAGONFLYDOJI", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLDRAGONFLYDOJI", + .open(x), + .high(x), + .low(x), + .close(x), + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index 3a0040ea3..234b062d8 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -2,9 +2,9 @@ #' @family Pattern Recognition #' @export evening_doji_star <- function(x, penetration = 0.1, ...) { - UseMethod( - "evening_doji_star" - ) + UseMethod( + "evening_doji_star" + ) } #' @export @@ -12,13 +12,13 @@ CDLEVENINGDOJISTAR <- evening_doji_star #' @export evening_doji_star.default <- function(x, penetration = 0.1, ...) { - .Call( - "impl_ta_CDLEVENINGDOJISTAR", - .open(x), - .high(x), - .low(x), - .close(x), - penetration, - as.logical(getOption("talib.normalize", TRUE)) - ) + .Call( + "impl_ta_CDLEVENINGDOJISTAR", + .open(x), + .high(x), + .low(x), + .close(x), + penetration, + as.logical(getOption("talib.normalize", TRUE)) + ) } diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index 1474b069d..e73ec6103 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -7,69 +7,69 @@ #' #' @export DEMA <- function(x, n = 10, ...) { - UseMethod("DEMA") + UseMethod("DEMA") } #' @rdname DEMA #' @usage NULL #' @export DEMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 3L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 3L + ) } #' @rdname DEMA #' @usage NULL #' @export DEMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - dema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 3L - ) + dema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 3L + ) - df <- data.frame( - idx = seq_along(dema), - dema = as.numeric(dema) - ) + df <- data.frame( + idx = seq_along(dema), + dema = as.numeric(dema) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~dema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("DEMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~dema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("DEMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 08fcaeda4..855c0a530 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -6,71 +6,71 @@ #' #' @export EMA <- function(x, n = 10, ...) { - UseMethod( - "EMA" - ) + UseMethod( + "EMA" + ) } #' @rdname EMA #' @usage NULL #' @export EMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 1L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 1L + ) } #' @rdname EMA #' @usage NULL #' @export EMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - ema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 1L - ) + ema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 1L + ) - df <- data.frame( - idx = seq_along(ema), - ema = as.numeric(ema) - ) + df <- data.frame( + idx = seq_along(ema), + ema = as.numeric(ema) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~ema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("EMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~ema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("EMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R index 4ea382699..2712d16eb 100644 --- a/R/ta_HT_DCPERIOD.R +++ b/R/ta_HT_DCPERIOD.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_dcperiod <- function(x, ...) { - UseMethod("ht_dcperiod") + UseMethod("ht_dcperiod") } #' @export ht_dcperiod.default <- function(x, ...) { - .Call( - "impl_ta_HT_DCPERIOD", - as.numeric(x) - ) + .Call( + "impl_ta_HT_DCPERIOD", + as.numeric(x) + ) } diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R index 8a5bb91bd..7d0222524 100644 --- a/R/ta_HT_DCPHASE.R +++ b/R/ta_HT_DCPHASE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_dcphase <- function(x, ...) { - UseMethod("ht_dcphase") + UseMethod("ht_dcphase") } #' @export ht_dcphase.default <- function(x, ...) { - .Call( - "impl_ta_HT_DCPHASE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_DCPHASE", + as.numeric(x) + ) } diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R index 865967ee0..da59eba93 100644 --- a/R/ta_HT_PHASOR.R +++ b/R/ta_HT_PHASOR.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_phasor <- function(x, ...) { - UseMethod("ht_phasor") + UseMethod("ht_phasor") } #' @export ht_phasor.default <- function(x, ...) { - .Call( - "impl_ta_HT_PHASOR", - as.numeric(x) - ) + .Call( + "impl_ta_HT_PHASOR", + as.numeric(x) + ) } diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R index 6f3aa9ed8..c98bd05e6 100644 --- a/R/ta_HT_SINE.R +++ b/R/ta_HT_SINE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_sine <- function(x, ...) { - UseMethod("ht_sine") + UseMethod("ht_sine") } #' @export ht_sine.default <- function(x, ...) { - .Call( - "impl_ta_HT_SINE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_SINE", + as.numeric(x) + ) } diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R index f8a3d1d6e..d92c868a7 100644 --- a/R/ta_HT_TRENDLINE.R +++ b/R/ta_HT_TRENDLINE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_trendline <- function(x, ...) { - UseMethod("ht_trendline") + UseMethod("ht_trendline") } #' @export ht_trendline.default <- function(x, ...) { - .Call( - "impl_ta_HT_TRENDLINE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_TRENDLINE", + as.numeric(x) + ) } diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R index 7eaac1f1e..a91d8724d 100644 --- a/R/ta_HT_TRENDMODE.R +++ b/R/ta_HT_TRENDMODE.R @@ -2,13 +2,13 @@ #' @family Cycle Indicator #' @export ht_trendmode <- function(x, ...) { - UseMethod("ht_trendmode") + UseMethod("ht_trendmode") } #' @export ht_trendmode.default <- function(x, ...) { - .Call( - "impl_ta_HT_TRENDMODE", - as.numeric(x) - ) + .Call( + "impl_ta_HT_TRENDMODE", + as.numeric(x) + ) } diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index b37bfc53d..3ebd74df2 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -2,69 +2,69 @@ #' @family Overlap Study #' @export KAMA <- function(x, n = 10, ...) { - UseMethod("KAMA") + UseMethod("KAMA") } #' @rdname KAMA #' @usage NULL #' @export KAMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 6L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 6L + ) } #' @rdname KAMA #' @usage NULL #' @export KAMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - kama <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L - ) + kama <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) - df <- data.frame( - idx = seq_along(kama), - kama = as.numeric(kama) - ) + df <- data.frame( + idx = seq_along(kama), + kama = as.numeric(kama) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~kama, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("KAMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~kama, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("KAMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_MACD.R b/R/ta_MACD.R index 83cfbf31f..400757ca2 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -3,84 +3,86 @@ #' @family Momentum Indicator #' @export moving_average_convergence_divergence <- function( - x, - fast = 12, - slow = 26, - signal = 9, - ... + x, + fast = 12, + slow = 26, + signal = 9, + ... ) { - UseMethod("moving_average_convergence_divergence") + UseMethod("moving_average_convergence_divergence") } #' @export moving_average_convergence_divergence.default <- function( - x, - fast = 12, - slow = 26, - signal = 9, - ... + x, + fast = 12, + slow = 26, + signal = 9, + ... ) { - if (!is.null(dim(x)) && !is.numeric(x)) { - stop("`x` has to be a double vector", call. = FALSE) - } + if (!is.null(dim(x)) && !is.numeric(x)) { + stop("`x` has to be a double vector", call. = FALSE) + } - ## ) check args - ## for calls - env <- parent.frame() - exprs <- substitute(list(fast = fast, slow = slow, signal = signal))[-1L] - is_calls <- vapply(exprs, .is_ma_spec, logical(1L), env = env) + ## ) check args + ## for calls + env <- parent.frame() + exprs <- substitute(list(fast = fast, slow = slow, signal = signal))[ + -1L + ] + is_calls <- vapply(exprs, .is_ma_spec, logical(1L), env = env) - if (!(all(is_calls) || all(!is_calls))) { - stop( - "Either all of `fast`, `slow` and `signal` is specified as calls, or none at all. See examples for more details." - ) - } + if (!(all(is_calls) || all(!is_calls))) { + stop( + "Either all of `fast`, `slow` and `signal` is specified as calls, or none at all. See examples for more details." + ) + } - if (!all(is_calls)) { - fast_i <- .eval_int(exprs$fast, env) - slow_i <- .eval_int(exprs$slow, env) - signal_i <- .eval_int(exprs$signal, env) + if (!all(is_calls)) { + fast_i <- .eval_int(exprs$fast, env) + slow_i <- .eval_int(exprs$slow, env) + signal_i <- .eval_int(exprs$signal, env) - if (fast_i == 12L && slow_i == 26L) { - return(.Call("impl_ta_MACDFIX", x, signal_i)) - } + if (fast_i == 12L && slow_i == 26L) { + return(.Call("impl_ta_MACDFIX", x, signal_i)) + } - return(.Call("impl_ta_MACD", x, fast_i, slow_i, signal_i)) - } + return(.Call("impl_ta_MACD", x, fast_i, slow_i, signal_i)) + } - fast_call <- .normalize_ma_arg_expr(exprs$fast, env) - slow_call <- .normalize_ma_arg_expr(exprs$slow, env) - signal_call <- .normalize_ma_arg_expr(exprs$signal, env) + fast_call <- .normalize_ma_arg_expr(exprs$fast, env) + slow_call <- .normalize_ma_arg_expr(exprs$slow, env) + signal_call <- .normalize_ma_arg_expr(exprs$signal, env) - fast_ma <- map_maType_call(fast_call) - slow_ma <- map_maType_call(slow_call) - signal_ma <- map_maType_call(signal_call) + fast_ma <- map_maType_call(fast_call) + slow_ma <- map_maType_call(slow_call) + signal_ma <- map_maType_call(signal_call) - .Call( - "impl_ta_MACDEXT", - x, - fast_ma$n, - fast_ma$maType, - slow_ma$n, - slow_ma$maType, - signal_ma$n, - signal_ma$maType - ) + .Call( + "impl_ta_MACDEXT", + x, + fast_ma$n, + fast_ma$maType, + slow_ma$n, + slow_ma$maType, + signal_ma$n, + signal_ma$maType + ) } #' @export MACD <- function( - x, - fast = 12, - slow = 26, - signal = 9, - ... + x, + fast = 12, + slow = 26, + signal = 9, + ... ) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... - ) + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... + ) } diff --git a/R/ta_MACDEXT.R b/R/ta_MACDEXT.R index 81170548e..d630c282e 100644 --- a/R/ta_MACDEXT.R +++ b/R/ta_MACDEXT.R @@ -1,17 +1,17 @@ #' @family Momentum Indicator #' @export MACDEXT <- function( - x, - fast = EMA(n = 12), - slow = EMA(n = 26), - signal = EMA(n = 9), - ... + x, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9), + ... ) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... - ) + moving_average_convergence_divergence( + x, + fast = substitute(fast), + slow = substitute(slow), + signal = substitute(signal), + ... + ) } diff --git a/R/ta_MACDFIX.R b/R/ta_MACDFIX.R index d38981fb5..b90c4be2f 100644 --- a/R/ta_MACDFIX.R +++ b/R/ta_MACDFIX.R @@ -1,15 +1,15 @@ #' @family Momentum Indicator #' @export MACDFIX <- function( - x, - signal = 9, - ... + x, + signal = 9, + ... ) { - moving_average_convergence_divergence( - x, - 12, - 26, - signal, - ... - ) + moving_average_convergence_divergence( + x, + 12, + 26, + signal, + ... + ) } diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index 23d7d85f9..7d91b9b06 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -3,69 +3,69 @@ #' @family Overlap Study #' @export MAMA <- function(x, n = 10, ...) { - UseMethod("MAMA") + UseMethod("MAMA") } #' @rdname MAMA #' @usage NULL #' @export MAMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 7L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 7L + ) } #' @rdname MAMA #' @usage NULL #' @export MAMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - mama <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 7L - ) + mama <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 7L + ) - df <- data.frame( - idx = seq_along(mama), - mama = as.numeric(mama) - ) + df <- data.frame( + idx = seq_along(mama), + mama = as.numeric(mama) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~mama, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("MAMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~mama, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("MAMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 198bcae13..571043723 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -2,9 +2,9 @@ #' @family Momentum Indicator #' @export relative_strength_index <- function(x, n = 10, ...) { - UseMethod( - "relative_strength_index" - ) + UseMethod( + "relative_strength_index" + ) } #' @export @@ -12,61 +12,64 @@ RSI <- relative_strength_index #' @export relative_strength_index.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_RSI", - x, - as.integer(n) - ) + ## 1) pass `x` to C + .Call( + "impl_ta_RSI", + x, + as.integer(n) + ) } #' @export relative_strength_index.plotly <- function( - x, - n = 10, - lower = 20, - upper = 80, - ... + x, + n = 10, + lower = 20, + upper = 80, + ... ) { - dots <- list(...) - series <- dots$.series[, 1L] - rsi <- .Call("impl_ta_RSI", as.double(series), as.integer(n)) - df <- data.frame(idx = seq_along(rsi), value = rsi) + dots <- list(...) + series <- dots$.series[, 1L] + rsi <- .Call("impl_ta_RSI", as.double(series), as.integer(n)) + df <- data.frame(idx = seq_along(rsi), value = rsi) - rsi_plot <- plotly::plot_ly( - df, - x = ~idx, - y = ~value, - type = "scatter", - mode = "lines", - showlegend = FALSE - ) - rsi_plot <- plotly::add_ribbons( - rsi_plot, - x = ~idx, - ymin = rep(lower, nrow(df)), - ymax = rep(upper, nrow(df)), - line = list(width = 0), - fillcolor = "rgba(160,160,160,0.20)" - ) + rsi_plot <- plotly::plot_ly( + df, + x = ~idx, + y = ~value, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + rsi_plot <- plotly::add_ribbons( + rsi_plot, + x = ~idx, + ymin = rep(lower, nrow(df)), + ymax = rep(upper, nrow(df)), + line = list(width = 0), + fillcolor = "rgba(160,160,160,0.20)" + ) - .plotting_environment$sub <- c(.plotting_environment$sub, list(rsi_plot)) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(rsi_plot) + ) - rsi_plot + rsi_plot } diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 20c65afcd..194452c78 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -11,126 +11,128 @@ #' #' @export SMA <- function( - x, - n = 10, - cols, - ... + x, + n = 10, + cols, + ... ) { - UseMethod( - "SMA" - ) + UseMethod( + "SMA" + ) } #' @export SMA.default <- function(x, n = 10, cols, ...) { - if (missing(cols)) { - cols <- ~open - } + if (missing(cols)) { + cols <- ~open + } - x <- series( - x = cols, - default = ~open, - data = x, - ... - ) + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) - x <- vapply( - as.list(x), - FUN = function(x) { - .Call( - "impl_ta_MA", - x, - as.integer(n), - 0L - ) - }, - FUN.VALUE = double(nrow(x)), - USE.NAMES = TRUE - ) + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 0L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) - colnames(x) <- paste0("sma_", colnames(x)) + colnames(x) <- paste0("sma_", colnames(x)) - x + x } #' @export SMA.numeric <- function( - x, - n = 10, - cols, - ... + x, + n = 10, + cols, + ... ) { - if (!is.missing(cols)) { - warning("'cols' have been passed but is unused in for vectors") - } + if (!is.missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } - .Call( - "impl_ta_MA", - as.double(x), - as.integer(n), - 0L - ) + .Call( + "impl_ta_MA", + as.double(x), + as.integer(n), + 0L + ) } #' @export SMA.data.frame <- function( - x, - n = 10, - cols, - ... + x, + n = 10, + cols, + ... ) { - as.data.frame( - NextMethod() - ) + as.data.frame( + NextMethod() + ) } #' @export SMA.matrix <- function( - x, - n = 10, - cols, - ... + x, + n = 10, + cols, + ... ) { - as.matrix( - NextMethod() - ) + as.matrix( + NextMethod() + ) } #' @rdname SMA #' @usage NULL #' @export SMA.plotly <- function(x, cols, n = 10, data, ...) { - ## prepare series - ## from - x <- as.data.frame( - series( - x = x, - formula = cols, - default = ~open, - data = data, - ... - ) - ) + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) + ) - ## indicator - .indicator <- as.data.frame(NextMethod()) - .indicator$idx <- 1:nrow(.indicator) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) - for (i in 1:ncol(x)) { - local({ - j <- i - .plotting_environment$main <- plotly::add_trace( - .plotting_environment$main, - data = .indicator, - x = ~idx, - y = ~ .indicator[, j], - type = "scatter", - mode = "lines", - name = sprintf("SMA(%d)", n), - inherit = FALSE - ) - }) - } + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("SMA(%d)", n), + inherit = FALSE + ) + }) + } - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index a32cf780a..796b04184 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -3,31 +3,31 @@ #' @family Momentum Indicator #' @export stochastic <- function(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) { - UseMethod( - "stochastic" - ) + UseMethod( + "stochastic" + ) } #' @export stochastic.default <- function( - x, - fastk, - slowk = SMA(n = 10), - slowd = SMA(n = 8), - ... + x, + fastk, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ... ) { - slowk_ma <- map_maType_call(substitute(slowk)) - slowd_ma <- map_maType_call(substitute(slowd)) + slowk_ma <- map_maType_call(substitute(slowk)) + slowd_ma <- map_maType_call(substitute(slowd)) - .Call( - "impl_ta_STOCH", - .high(x), - .low(x), - .close(x), - as.integer(fastk), # 4. optInFastK_Period - as.integer(slowk_ma$n), # 5. optInSlowK_Period - as.integer(slowk_ma$maType), # 6. optInSlowK_MAType - as.integer(slowd_ma$n), # 7. optInSlowD_Period - as.integer(slowd_ma$maType) # 8. optInSlowD_MAType - ) + .Call( + "impl_ta_STOCH", + .high(x), + .low(x), + .close(x), + as.integer(fastk), # 4. optInFastK_Period + as.integer(slowk_ma$n), # 5. optInSlowK_Period + as.integer(slowk_ma$maType), # 6. optInSlowK_MAType + as.integer(slowd_ma$n), # 7. optInSlowD_Period + as.integer(slowd_ma$maType) # 8. optInSlowD_MAType + ) } diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index ea779a695..a34716d7f 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -3,14 +3,14 @@ #' @family Momentum Indicator #' @export fast_stochastic <- function( - x, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - UseMethod( - "fast_stochastic" - ) + UseMethod( + "fast_stochastic" + ) } #' @export @@ -18,20 +18,20 @@ STOCHF <- fast_stochastic #' @export fast_stochastic.default <- function( - x, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - .Call( - "impl_ta_STOCHF", - .high(x), - .low(x), - .close(x), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) + .Call( + "impl_ta_STOCHF", + .high(x), + .low(x), + .close(x), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) } diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index fc0aa82ad..99203eaea 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -3,15 +3,15 @@ #' @family Momentum Indicator #' @export stochastic_relative_strength_index <- function( - x, - n, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - UseMethod( - "stochastic_relative_strength_index" - ) + UseMethod( + "stochastic_relative_strength_index" + ) } #' @export @@ -19,20 +19,20 @@ STOCHRSI <- stochastic_relative_strength_index #' @export stochastic_relative_strength_index.default <- function( - x, - n, - fast_k, - fast_d_MAtype = SMA(n = 10), - ... + x, + n, + fast_k, + fast_d_MAtype = SMA(n = 10), + ... ) { - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - .Call( - "impl_ta_STOCHRSI", - x, - as.integer(n), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) + .Call( + "impl_ta_STOCHRSI", + x, + as.integer(n), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) } diff --git a/R/ta_T3.R b/R/ta_T3.R index 8bf6b58f3..04646d240 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -2,69 +2,69 @@ #' @family Overlap Study #' @export T3 <- function(x, n = 10, ...) { - UseMethod("T3") + UseMethod("T3") } #' @rdname T3 #' @usage NULL #' @export T3.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 8L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 8L + ) } #' @rdname T3 #' @usage NULL #' @export T3.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - t3 <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 8L - ) + t3 <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 8L + ) - df <- data.frame( - idx = seq_along(t3), - t3 = as.numeric(t3) - ) + df <- data.frame( + idx = seq_along(t3), + t3 = as.numeric(t3) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~t3, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("T3(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~t3, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("T3(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index 87298c8fd..8240015bc 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -2,69 +2,69 @@ #' @family Overlap Study #' @export TEMA <- function(x, n = 10, ...) { - UseMethod("TEMA") + UseMethod("TEMA") } #' @rdname TEMA #' @usage NULL #' @export TEMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 4L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 4L + ) } #' @rdname TEMA #' @usage NULL #' @export TEMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - tema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 4L - ) + tema <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 4L + ) - df <- data.frame( - idx = seq_along(tema), - tema = as.numeric(tema) - ) + df <- data.frame( + idx = seq_along(tema), + tema = as.numeric(tema) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~tema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TEMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~tema, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TEMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index 00787e997..122b50d16 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -2,36 +2,36 @@ #' @family Overlap Study #' @export TRIMA <- function(x, n = 10, ...) { - UseMethod("TRIMA") + UseMethod("TRIMA") } #' @rdname TRIMA #' @usage NULL #' @export TRIMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` must be a numeric vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 5L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 5L + ) } @@ -39,33 +39,33 @@ TRIMA.default <- function(x, n = 10, ...) { #' @usage NULL #' @export TRIMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - trima <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L - ) + trima <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) - df <- data.frame( - idx = seq_along(trima), - trima = as.numeric(trima) - ) + df <- data.frame( + idx = seq_along(trima), + trima = as.numeric(trima) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~trima, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TRIMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~trima, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R index abc644d2a..0b2952fbc 100644 --- a/R/ta_ULTOSC.R +++ b/R/ta_ULTOSC.R @@ -2,40 +2,40 @@ #' @family Momentum Indicator #' @export ultimate_oscillator <- function(x, n = c(7, 14, 28), ...) { - UseMethod( - "ultimate_oscillator" - ) + UseMethod( + "ultimate_oscillator" + ) } #' @export ultimate_oscillator.default <- function(x, n = c(7, 14, 28), ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - if (!length(n) < 3) { - stop("`n` has to be a vector of length 3") - } - assert(is.numeric(x)) - assert(all(n >= 1)) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.matrix(x)) { + x <- as.matrix(x) + } + if (!length(n) < 3) { + stop("`n` has to be a vector of length 3") + } + assert(is.numeric(x)) + assert(all(n >= 1)) - ## 1) pass `x` assuming that it - ## follows OHLC-V structure - .Call( - .NAME = "impl_ta_ULTOSC", - .high(x), - .low(x), - .close(x), - as.integer(n[1]), - as.integer(n[2]), - as.integer(n[3]), - ) + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + .Call( + .NAME = "impl_ta_ULTOSC", + .high(x), + .low(x), + .close(x), + as.integer(n[1]), + as.integer(n[2]), + as.integer(n[3]), + ) } diff --git a/R/ta_WMA.R b/R/ta_WMA.R index 18f47079d..4f8ed618d 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -2,38 +2,38 @@ #' @family Overlap Study #' @export WMA <- function(x, n = 10, ...) { - UseMethod( - "WMA" - ) + UseMethod( + "WMA" + ) } #' @rdname WMA #' @usage NULL #' @export WMA.default <- function(x, n = 10, ...) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow + ## default behaviour is to + ## check if its a numeric vector + ## + ## No coercing here as it might + ## lead to overflow - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") - } - assert(is.numeric(x)) - assert(n >= 2) + ## 0) validate input + ## and stop the script + ## if conditions are not + ## met + if (!is.null(dim(x))) { + stop("`x` has to be a double vector") + } + assert(is.numeric(x)) + assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 2L - ) + ## 1) pass `x` to C + .Call( + "impl_ta_MA", + x, + as.integer(n), + 2L + ) } @@ -41,33 +41,33 @@ WMA.default <- function(x, n = 10, ...) { #' @usage NULL #' @export WMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series + dots <- list(...) + series <- dots$.series - wma <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L - ) + wma <- .Call( + "impl_ta_MA", + .univariate_series(series), + as.integer(n), + 6L + ) - df <- data.frame( - idx = seq_along(wma), - wma = as.numeric(wma) - ) + df <- data.frame( + idx = seq_along(wma), + wma = as.numeric(wma) + ) - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~wma, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TRIMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel - ) + .plotting_environment$main <- plotly::add_trace( + x, + data = df, # bind data here (creates/sets cur_data) + x = ~idx, + y = ~wma, # refer to columns, not objects in caller env + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE, + xaxis = "x", + yaxis = "y" # ensure it lands on the main panel + ) - .plotting_environment$main + .plotting_environment$main } diff --git a/R/utils.R b/R/utils.R index 82f678acc..1439db756 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,27 +1,27 @@ ## script: utilities assert <- function(x, ...) { - ## Assert truthfulness - ## of x - condition <- x - if (!condition) { - if (...length() == 0) { - stop("Assertion failed", call. = FALSE) - } else { - stop(..., call. = FALSE) - } - } - - return( - invisible(TRUE) - ) + ## Assert truthfulness + ## of x + condition <- x + if (!condition) { + if (...length() == 0) { + stop("Assertion failed", call. = FALSE) + } else { + stop(..., call. = FALSE) + } + } + + return( + invisible(TRUE) + ) } flatten <- function(x) { - if (!inherits(x, "list")) { - list(x) - } else { - unlist(c(lapply(x, flatten)), recursive = FALSE) - } + if (!inherits(x, "list")) { + list(x) + } else { + unlist(c(lapply(x, flatten)), recursive = FALSE) + } } ## extract open, high, low, close @@ -34,119 +34,130 @@ flatten <- function(x) { ## only added for backwards compatibility ## - should remove it. .open <- function(x, offset = FALSE) { - x[, 1L + as.integer(offset)] + x[, 1L + as.integer(offset)] } .high <- function(x, offset = FALSE) { - x[, 2L + as.integer(offset)] + x[, 2L + as.integer(offset)] } .low <- function(x, offset = FALSE) { - x[, 3L + as.integer(offset)] + x[, 3L + as.integer(offset)] } .close <- function(x, offset = FALSE) { - x[, 4L + as.integer(offset)] + x[, 4L + as.integer(offset)] } .volume <- function(x, offset = FALSE) { - x[, 5L + as.integer(offset)] + x[, 5L + as.integer(offset)] } ## map MAs map_maType_call <- function(call_expr) { - args <- as.list(call_expr)[-1L] - head_chr <- as.character(call_expr[[1L]]) - fun_name <- tail(head_chr, 1L) - - maType <- switch( - fun_name, - SMA = 0L, - EMA = 1L, - WMA = 2L, - DEMA = 3L, - TEMA = 4L, - TRIMA = 5L, - KAMA = 6L, - MAMA = 7L, - T3 = 8L, - stop(sprintf("Unknown MA type: %s", fun_name)) - ) - - n_val <- args[["n"]] - - list( - n = as.integer(n_val), - maType = maType - ) + args <- as.list(call_expr)[-1L] + head_chr <- as.character(call_expr[[1L]]) + fun_name <- tail(head_chr, 1L) + + maType <- switch( + fun_name, + SMA = 0L, + EMA = 1L, + WMA = 2L, + DEMA = 3L, + TEMA = 4L, + TRIMA = 5L, + KAMA = 6L, + MAMA = 7L, + T3 = 8L, + stop(sprintf("Unknown MA type: %s", fun_name)) + ) + + n_val <- args[["n"]] + + list( + n = as.integer(n_val), + maType = maType + ) } is.number <- function(x) { - is.numeric(x) || is.integer(x) + is.numeric(x) || is.integer(x) } .unwrap_meta <- function(expr, env) { - repeat { - if (!is.call(expr)) { - break - } - head <- expr[[1L]] - if (is.symbol(head) && as.character(head) %in% c("substitute", "quote")) { - expr <- eval(expr, envir = env, enclos = env) - } else { - break - } - } - expr + repeat { + if (!is.call(expr)) { + break + } + head <- expr[[1L]] + if ( + is.symbol(head) && + as.character(head) %in% + c("substitute", "quote") + ) { + expr <- eval(expr, envir = env, enclos = env) + } else { + break + } + } + expr } .is_ma_spec <- function(expr, env) { - expr1 <- .unwrap_meta(expr, env) - if (is.call(expr1)) { - return(TRUE) - } - if (is.symbol(expr1)) { - v <- try( - get(as.character(expr1), envir = env, inherits = TRUE), - silent = TRUE - ) - return(!inherits(v, "try-error") && is.language(v)) - } - FALSE + expr1 <- .unwrap_meta(expr, env) + if (is.call(expr1)) { + return(TRUE) + } + if (is.symbol(expr1)) { + v <- try( + get( + as.character(expr1), + envir = env, + inherits = TRUE + ), + silent = TRUE + ) + return(!inherits(v, "try-error") && is.language(v)) + } + FALSE } # Normalize one MA argument to a CALL, without forcing promises. .normalize_ma_arg_expr <- function(expr, env) { - expr1 <- .unwrap_meta(expr, env) - if (is.call(expr1)) { - return(expr1) - } - if (is.symbol(expr1)) { - v <- get(as.character(expr1), envir = env, inherits = TRUE) - if (is.language(v)) return(v) - } - stop("Expected an MA spec like EMA(n = 12).", call. = FALSE) + expr1 <- .unwrap_meta(expr, env) + if (is.call(expr1)) { + return(expr1) + } + if (is.symbol(expr1)) { + v <- get(as.character(expr1), envir = env, inherits = TRUE) + if (is.language(v)) return(v) + } + stop("Expected an MA spec like EMA(n = 12).", call. = FALSE) } # Safe integer eval for the numeric path (after unwrapping). .eval_int <- function(expr, env) { - expr1 <- .unwrap_meta(expr, env) - v <- eval(expr1, envir = env, enclos = env) - if (!is.number(v) || length(v) != 1L || !is.finite(v)) { - stop("fast/slow/signal must be finite numeric scalars.", call. = FALSE) - } - as.integer(v) + expr1 <- .unwrap_meta(expr, env) + v <- eval(expr1, envir = env, enclos = env) + if (!is.number(v) || length(v) != 1L || !is.finite(v)) { + stop( + "fast/slow/signal must be finite numeric scalars.", + call. = FALSE + ) + } + as.integer(v) } reclass <- function(x, ...) { - class(x) <- c(class(x), ...) + class(x) <- c(class(x), ...) } ## series .univariate_series <- function(x) { - as.double( - x[, 1L] - ) + as.double( + x[, 1L] + ) } is.formula <- function(x) { - inherits(x, "formula") + inherits(x, "formula") } diff --git a/R/zzz.R b/R/zzz.R index 648cd4e43..e96f1a082 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -5,18 +5,18 @@ # script start; .plotting_environment <- new.env( - parent = emptyenv() + parent = emptyenv() ) .onAttach <- function( - libname, - pkgname, - ... + libname, + pkgname, + ... ) {} .onDetach <- function( - libpath, - ... + libpath, + ... ) {} # script end; diff --git a/README.md b/README.md index c6a58f3a7..c33d70aa9 100644 --- a/README.md +++ b/README.md @@ -84,5 +84,5 @@ x <- talib::BTC } ``` -
- +
+ diff --git a/air.toml b/air.toml new file mode 100644 index 000000000..cc6e1a7b8 --- /dev/null +++ b/air.toml @@ -0,0 +1,3 @@ +[format] +indent-width = 4 +indent-style = "tab" \ No newline at end of file diff --git a/data-raw/BTC.R b/data-raw/BTC.R index dde1b8cea..1d6306035 100644 --- a/data-raw/BTC.R +++ b/data-raw/BTC.R @@ -5,20 +5,20 @@ ## ## 0) load data BTC <- cryptoQuotes::get_quote( - ticker = "BTCUSDC", - futures = FALSE, - interval = "1d", - from = as.Date("2024-01-01"), - to = as.Date("2024-12-31") + ticker = "BTCUSDC", + futures = FALSE, + interval = "1d", + from = as.Date("2024-01-01"), + to = as.Date("2024-12-31") ) ## 1) convert to matrix BTC <- as.data.frame( - BTC + BTC ) ## 2) store data usethis::use_data( - BTC, - overwrite = TRUE + BTC, + overwrite = TRUE ) diff --git a/data-raw/SPY.R b/data-raw/SPY.R index 86af30daf..9f1524210 100644 --- a/data-raw/SPY.R +++ b/data-raw/SPY.R @@ -5,33 +5,33 @@ ## ## 0) load data SPY <- quantmod::getSymbols( - Symbols = "SPY", - auto.assign = FALSE, - from = as.Date("2023-01-01"), - to = as.Date("2024-12-31") + Symbols = "SPY", + auto.assign = FALSE, + from = as.Date("2023-01-01"), + to = as.Date("2024-12-31") )[, 1:5] ## 1) rename columns colnames(SPY) <- c( - "open", - "high", - "low", - "close", - "volume" + "open", + "high", + "low", + "close", + "volume" ) ## 2) convert to matrix SPY <- matrix( - data = SPY[, 1:5], - ncol = 5, - dimnames = list( - rownames(SPY), - colnames(SPY) - ) + data = SPY[, 1:5], + ncol = 5, + dimnames = list( + rownames(SPY), + colnames(SPY) + ) ) ## 3) store data usethis::use_data( - SPY, - overwrite = TRUE + SPY, + overwrite = TRUE ) diff --git a/man-roxygen/description.R b/man-roxygen/description.R index ae9b469ca..d3185f29d 100644 --- a/man-roxygen/description.R +++ b/man-roxygen/description.R @@ -24,9 +24,9 @@ #' ## series #' data(BTC, package = "talib") #' -#' ## calculate <%= tolower(.title) %> -#' ## using BTC -#' output <- talib::<%= tolower(.fun) %>(BTC) +#' ## calculate the indicator +#' ## for Bitcoin (BTC) +#' output <- talib::<%= .fun %>(BTC) #' #' ## display the results #' tail(output) @@ -44,6 +44,6 @@ #' ## chart indicator #' ## with default values #' talib::indicator( -#' talib::<%= tolower(.fun) %>() +#' talib::<%= .fun %>() #' ) #' } diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index b62113c6c..069c21cbc 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -29,8 +29,8 @@ columns in a custom order. Refer to the details-section for more on the calculat ## series data(BTC, package = "talib") -## calculate acceleration bands -## using BTC +## calculate the indicator +## for Bitcoin (BTC) output <- talib::acceleration_bands(BTC) ## display the results diff --git a/man/aroon.Rd b/man/aroon.Rd index f0b785a09..7e5e5c505 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -4,10 +4,54 @@ \alias{aroon} \title{Aroon} \usage{ -aroon(x, n, ...) +aroon(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Aroon +The \code{aroon()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::aroon(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::aroon() + ) +} } \seealso{ Other Momentum Indicator: @@ -19,4 +63,11 @@ Other Momentum Indicator: \code{\link{stochastic_relative_strength_index}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index b349d1640..c0bfb63e8 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -29,8 +29,8 @@ columns in a custom order. Refer to the details-section for more on the calculat ## series data(BTC, package = "talib") -## calculate bollinger bands -## using BTC +## calculate the indicator +## for Bitcoin (BTC) output <- talib::bollinger_bands(BTC) ## display the results diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index f1b935b30..297f9b7e1 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -4,13 +4,64 @@ \alias{chaikin_AD_line} \title{Chaikin A/D Line} \usage{ -chaikin_AD_line(x, ...) +chaikin_AD_line(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} } \description{ -Chaikin A/D Line +The \code{chaikin_ad_line()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::chaikin_AD_line(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::chaikin_AD_line() + ) +} } \seealso{ Other Volume Indicator: \code{\link{chaikin_AD_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Volume Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index e5bf957a3..dcc1fece4 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -4,13 +4,64 @@ \alias{chaikin_AD_oscillator} \title{Chaikin A/D Oscillator} \usage{ -chaikin_AD_oscillator(x, fast = 3, slow = 10, ...) +chaikin_AD_oscillator(x, cols, fast = 3, slow = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} } \description{ -Chaikin A/D Oscillator +The \code{chaikin_ad_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::chaikin_AD_oscillator(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::chaikin_AD_oscillator() + ) +} } \seealso{ Other Volume Indicator: \code{\link{chaikin_AD_line}()} } +\author{ +Serkan Korkmaz +} \concept{Volume Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/tests/testthat/test-ta_ACCBANDS.R b/tests/testthat/test-ta_ACCBANDS.R index 8c487a637..ead995800 100644 --- a/tests/testthat/test-ta_ACCBANDS.R +++ b/tests/testthat/test-ta_ACCBANDS.R @@ -1,15 +1,15 @@ ## script: ACCBANDS ## author: Serkan Korkmaz testthat::test_that(desc = "Acceleration Bands", code = { - ## 1) calculate values - ## with and without alias - output <- acceleration_bands(SPY) - alias <- ACCBANDS(SPY) + ## 1) calculate values + ## with and without alias + output <- acceleration_bands(SPY) + alias <- ACCBANDS(SPY) - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) }) diff --git a/tests/testthat/test-ta_BBANDS.R b/tests/testthat/test-ta_BBANDS.R index 589a1ce50..7982485e4 100644 --- a/tests/testthat/test-ta_BBANDS.R +++ b/tests/testthat/test-ta_BBANDS.R @@ -1,15 +1,15 @@ ## script: ta_BBANDS ## author: Serkan Korkmaz testthat::test_that(desc = "Bollinger Bands", code = { - ## 1) calculate values - ## with and without alias - output <- bollinger_bands(SPY) - alias <- BBANDS(SPY) + ## 1) calculate values + ## with and without alias + output <- bollinger_bands(SPY) + alias <- BBANDS(SPY) - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) }) diff --git a/tests/testthat/test-ta_CDLDOJI.R b/tests/testthat/test-ta_CDLDOJI.R index f24964978..c1e15e43d 100644 --- a/tests/testthat/test-ta_CDLDOJI.R +++ b/tests/testthat/test-ta_CDLDOJI.R @@ -1,35 +1,35 @@ ## script: Doji ## author: Serkan Korkmaz testthat::test_that(desc = "Doji", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- doji(SPY) - alias <- CDLDOJI(SPY) + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- doji(SPY) + alias <- CDLDOJI(SPY) - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) - ## 1.2) check that the range - ## is in [0, 100] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(100)) - ) + ## 1.2) check that the range + ## is in [0, 100] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(100)) + ) - ## 1.3) recalculate with - ## normalization and check - ## range is in [0, 1] - options(talib.normalize = TRUE) - output <- CDLDOJI(SPY) + ## 1.3) recalculate with + ## normalization and check + ## range is in [0, 1] + options(talib.normalize = TRUE) + output <- CDLDOJI(SPY) - ## 1.4) check that the range - ## is in [-1, 1] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(1)) - ) + ## 1.4) check that the range + ## is in [-1, 1] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(1)) + ) }) diff --git a/tests/testthat/test-ta_CDLDOJISTAR.R b/tests/testthat/test-ta_CDLDOJISTAR.R index 42f1b78bf..c6d069986 100644 --- a/tests/testthat/test-ta_CDLDOJISTAR.R +++ b/tests/testthat/test-ta_CDLDOJISTAR.R @@ -1,35 +1,35 @@ ## script: Doji Star ## author: Serkan Korkmaz testthat::test_that(desc = "Doji Star", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- doji_star(SPY) - alias <- CDLDOJISTAR(SPY) + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- doji_star(SPY) + alias <- CDLDOJISTAR(SPY) - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) - ## 1.2) check that the range - ## is in [-100, 100] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) - ) + ## 1.2) check that the range + ## is in [-100, 100] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) + ) - ## 1.3) recalculate with - ## normalization and check - ## range is in [-1, 1] - options(talib.normalize = TRUE) - output <- CDLDOJISTAR(SPY) + ## 1.3) recalculate with + ## normalization and check + ## range is in [-1, 1] + options(talib.normalize = TRUE) + output <- CDLDOJISTAR(SPY) - ## 1.4) check that the range - ## is in [-1, 1] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) - ) + ## 1.4) check that the range + ## is in [-1, 1] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) + ) }) diff --git a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R index 2d3aa041a..5902f3b42 100644 --- a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R +++ b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R @@ -1,35 +1,35 @@ ## script: DRAGONFLYDOJI ## author: Serkan Korkmaz testthat::test_that(desc = "Dragonfly Doji", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- dragonfly_doji(SPY) - alias <- CDLDRAGONFLYDOJI(SPY) + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- dragonfly_doji(SPY) + alias <- CDLDRAGONFLYDOJI(SPY) - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) - ## 1.2) check that the range - ## is in [-100, 100] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) - ) + ## 1.2) check that the range + ## is in [-100, 100] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) + ) - ## 1.3) recalculate with - ## normalization and check - ## range is in [-1, 1] - options(talib.normalize = TRUE) - output <- CDLDRAGONFLYDOJI(SPY) + ## 1.3) recalculate with + ## normalization and check + ## range is in [-1, 1] + options(talib.normalize = TRUE) + output <- CDLDRAGONFLYDOJI(SPY) - ## 1.4) check that the range - ## is in [-1, 1] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) - ) + ## 1.4) check that the range + ## is in [-1, 1] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) + ) }) diff --git a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R index 4358c8819..35cdd0dc0 100644 --- a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R +++ b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R @@ -1,35 +1,35 @@ ## script: Evening Doji Star ## author: Serkan Korkmaz testthat::test_that(desc = "Evening Doji Star", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- evening_doji_star(SPY) - alias <- CDLEVENINGDOJISTAR(SPY) + ## 1) calculate values + ## with and without alias + ## without normalization + options(talib.normalize = FALSE) + output <- evening_doji_star(SPY) + alias <- CDLEVENINGDOJISTAR(SPY) - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) - ## 1.2) check that the range - ## is in [-100, 0] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-100)) - ) + ## 1.2) check that the range + ## is in [-100, 0] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-100)) + ) - ## 1.3) recalculate with - ## normalization and check - ## range is in [-1, 0] - options(talib.normalize = TRUE) - output <- CDLEVENINGDOJISTAR(SPY) + ## 1.3) recalculate with + ## normalization and check + ## range is in [-1, 0] + options(talib.normalize = TRUE) + output <- CDLEVENINGDOJISTAR(SPY) - ## 1.4) check that the range - ## is in [-1, 0] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1)) - ) + ## 1.4) check that the range + ## is in [-1, 0] + testthat::expect_true( + object = any(unique(output, na.rm = TRUE) %in% c(-1)) + ) }) diff --git a/tests/testthat/test-ta_MA.R b/tests/testthat/test-ta_MA.R index ca2419e01..ec16fdd17 100644 --- a/tests/testthat/test-ta_MA.R +++ b/tests/testthat/test-ta_MA.R @@ -1,190 +1,190 @@ ## script: MA ## author: Serkan Korkmaz testthat::test_that(desc = "Simple Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- simple_moving_average(SPY[, 1]) - alias <- SMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- simple_moving_average(SPY[, 1]) + alias <- SMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Exponential Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- exponential_moving_average(SPY[, 1]) - alias <- EMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- exponential_moving_average(SPY[, 1]) + alias <- EMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Weighted Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- weighted_moving_average(SPY[, 1]) - alias <- WMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- weighted_moving_average(SPY[, 1]) + alias <- WMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Double Exponential Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- double_exponential_moving_average(SPY[, 1]) - alias <- DEMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- double_exponential_moving_average(SPY[, 1]) + alias <- DEMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Triple Exponential Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- triple_exponential_moving_average(SPY[, 1]) - alias <- TEMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- triple_exponential_moving_average(SPY[, 1]) + alias <- TEMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Triangular Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- triangular_moving_average(SPY[, 1]) - alias <- TRIMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- triangular_moving_average(SPY[, 1]) + alias <- TRIMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Kaufman’s Adaptive Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- kaufman_adaptive_moving_average(SPY[, 1]) - alias <- KAMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- kaufman_adaptive_moving_average(SPY[, 1]) + alias <- KAMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "Mesa Adaptive Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- mesa_adaptive_moving_average(SPY[, 1]) - alias <- MAMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- mesa_adaptive_moving_average(SPY[, 1]) + alias <- MAMA(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) testthat::test_that(desc = "T3 Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- t3_moving_average(SPY[, 1]) - alias <- T3(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) + ## 1) calculate values + ## with and without alias + output <- t3_moving_average(SPY[, 1]) + alias <- T3(SPY[, 1]) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 1.2) check if the values + ## have same length + testthat::expect_equal( + object = nrow(SPY), + expected = length(output) + ) }) diff --git a/tests/testthat/test-ta_MACD.R b/tests/testthat/test-ta_MACD.R index a65a05062..e375d7c38 100644 --- a/tests/testthat/test-ta_MACD.R +++ b/tests/testthat/test-ta_MACD.R @@ -1,48 +1,48 @@ ## script: MACD ## author: Serkan Korkmaz testthat::test_that(desc = "MACD", code = { - ## 1) calculate values - ## with and without alias - output <- moving_average_convergence_divergence(SPY[, 1]) - alias <- MACD(SPY[, 1]) + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence(SPY[, 1]) + alias <- MACD(SPY[, 1]) - ## 1.1) check if the values - ## are equal is by default - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal is by default + testthat::expect_equal( + object = output, + expected = alias + ) }) testthat::test_that(desc = "MACDFIX", code = { - ## 1) calculate values - ## with and without alias - output <- moving_average_convergence_divergence(SPY[, 1]) - alias <- MACDFIX(SPY[, 1]) + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence(SPY[, 1]) + alias <- MACDFIX(SPY[, 1]) - ## 1.1) check if the values - ## are equal is by default - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal is by default + testthat::expect_equal( + object = output, + expected = alias + ) }) testthat::test_that(desc = "MACDEXT", code = { - ## 1) calculate values - ## with and without alias - output <- moving_average_convergence_divergence( - SPY[, 1], - EMA(n = 12), - EMA(n = 26), - EMA(n = 9) - ) - alias <- MACDEXT(SPY[, 1]) + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence( + SPY[, 1], + EMA(n = 12), + EMA(n = 26), + EMA(n = 9) + ) + alias <- MACDEXT(SPY[, 1]) - ## 1.1) check if the values - ## are equal is by default - testthat::expect_equal( - object = output, - expected = alias - ) + ## 1.1) check if the values + ## are equal is by default + testthat::expect_equal( + object = output, + expected = alias + ) }) diff --git a/tools/hexSticker.R b/tools/hexSticker.R index 227947bbd..6e25915ce 100644 --- a/tools/hexSticker.R +++ b/tools/hexSticker.R @@ -61,122 +61,122 @@ grid_minor_col <- "#14222D" w <- 0.34 p_candles <- ggplot2::ggplot(OHLC, ggplot2::aes(x = x)) + - ggplot2::geom_hline( - yintercept = y_major, - color = grid_major_col, - linewidth = 0.28, - alpha = 0.55 - ) + - ggplot2::geom_hline( - yintercept = y_minor, - color = grid_minor_col, - linewidth = 0.22, - alpha = 0.35 - ) + - ggplot2::geom_vline( - xintercept = x_major, - color = grid_major_col, - linewidth = 0.26, - alpha = 0.55 - ) + - ggplot2::geom_vline( - xintercept = x_minor, - color = grid_minor_col, - linewidth = 0.20, - alpha = 0.35 - ) + - ## candle wicks - ggplot2::geom_segment( - ggplot2::aes(xend = x, y = low, yend = high), - linewidth = 0.45, - color = "#B3C2D1" - ) + - ## candle body - ggplot2::geom_rect( - ggplot2::aes( - xmin = x - w, - xmax = x + w, - ymin = pmin(open, close), - ymax = pmax(open, close), - fill = up, - color = up - ), - linewidth = 0.25 - ) + - ## moving averages - ggplot2::geom_line( - ggplot2::aes(y = ma_long), - color = "#00BFA6", - linewidth = 0.8, - na.rm = TRUE - ) + - ggplot2::geom_line( - ggplot2::aes(y = ma_short), - color = accent, - linewidth = 1.0, - na.rm = TRUE - ) + - ggplot2::scale_fill_manual(values = c(`TRUE` = up, `FALSE` = down)) + - ggplot2::scale_color_manual(values = c(`TRUE` = up, `FALSE` = down)) + - ggplot2::coord_cartesian(expand = FALSE) + - ggplot2::theme_void() + - hexSticker::theme_transparent() + - ggplot2::theme(legend.position = "none") + ggplot2::geom_hline( + yintercept = y_major, + color = grid_major_col, + linewidth = 0.28, + alpha = 0.55 + ) + + ggplot2::geom_hline( + yintercept = y_minor, + color = grid_minor_col, + linewidth = 0.22, + alpha = 0.35 + ) + + ggplot2::geom_vline( + xintercept = x_major, + color = grid_major_col, + linewidth = 0.26, + alpha = 0.55 + ) + + ggplot2::geom_vline( + xintercept = x_minor, + color = grid_minor_col, + linewidth = 0.20, + alpha = 0.35 + ) + + ## candle wicks + ggplot2::geom_segment( + ggplot2::aes(xend = x, y = low, yend = high), + linewidth = 0.45, + color = "#B3C2D1" + ) + + ## candle body + ggplot2::geom_rect( + ggplot2::aes( + xmin = x - w, + xmax = x + w, + ymin = pmin(open, close), + ymax = pmax(open, close), + fill = up, + color = up + ), + linewidth = 0.25 + ) + + ## moving averages + ggplot2::geom_line( + ggplot2::aes(y = ma_long), + color = "#00BFA6", + linewidth = 0.8, + na.rm = TRUE + ) + + ggplot2::geom_line( + ggplot2::aes(y = ma_short), + color = accent, + linewidth = 1.0, + na.rm = TRUE + ) + + ggplot2::scale_fill_manual(values = c(`TRUE` = up, `FALSE` = down)) + + ggplot2::scale_color_manual(values = c(`TRUE` = up, `FALSE` = down)) + + ggplot2::coord_cartesian(expand = FALSE) + + ggplot2::theme_void() + + hexSticker::theme_transparent() + + ggplot2::theme(legend.position = "none") ## construct stricker and ## store locally hexSticker::sticker( - p_candles, - package = "", - p_family = "jbmono", - p_size = 33, - p_color = ink, - p_y = 1.44, - s_x = 1, - s_y = 1, - s_width = 2, - s_height = 2, - h_fill = bg, - h_color = accent, - h_size = 1, - url = "{talib}", - u_color = accent, - u_size = 33, - u_x = 0.4, - u_y = 1.5, - u_angle = 30, - filename = raw_file, - dpi = 600, - device = ragg::agg_png, - bg = "transparent", - white_around_sticker = FALSE + p_candles, + package = "", + p_family = "jbmono", + p_size = 33, + p_color = ink, + p_y = 1.44, + s_x = 1, + s_y = 1, + s_width = 2, + s_height = 2, + h_fill = bg, + h_color = accent, + h_size = 1, + url = "{talib}", + u_color = accent, + u_size = 33, + u_x = 0.4, + u_y = 1.5, + u_angle = 30, + filename = raw_file, + dpi = 600, + device = ragg::agg_png, + bg = "transparent", + white_around_sticker = FALSE ) ## construct an additional ## hexsticker to crop figures outside ## the hex p_blank <- ggplot2::ggplot() + - ggplot2::theme_void() + - hexSticker::theme_transparent() + ggplot2::theme_void() + + hexSticker::theme_transparent() hexSticker::sticker( - p_blank, - package = "", - p_size = 1, - p_color = "white", - s_x = 1, - s_y = 1, - s_width = 1, - s_height = 1, - h_fill = "white", - h_color = "white", - h_size = 0.001, # solid white hex - url = "", - filename = mask_file, - dpi = 600, - device = ragg::agg_png, - bg = "black", # black corners outside hex - white_around_sticker = FALSE + p_blank, + package = "", + p_size = 1, + p_color = "white", + s_x = 1, + s_y = 1, + s_width = 1, + s_height = 1, + h_fill = "white", + h_color = "white", + h_size = 0.001, # solid white hex + url = "", + filename = mask_file, + dpi = 600, + device = ragg::agg_png, + bg = "black", # black corners outside hex + white_around_sticker = FALSE ) ## apply the mask @@ -191,5 +191,5 @@ out <- magick::image_composite(img, mask, operator = "CopyOpacity") magick::image_write(out, final_file) if (clean) { - base::unlink(c(mask_file, raw_file)) + base::unlink(c(mask_file, raw_file)) } From 0afc2b61f67cd40ab549136536f49cd8a8743f23 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 29 Aug 2025 22:51:08 +0200 Subject: [PATCH 104/166] :hammer: Updated Makefile * More thorough cleaning commands --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 7ec1e2c47..9300379f5 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,8 @@ clean: ## Remove artifacts @rm -rf src/*.so @rm -rf $(tarball_location) @rm -rf src/Makevars + @rm -rf $(package_name).Rcheck + @rm -rf docs @Rscript -e "remove.packages('$(package_name)')" fmt: ## Format code From 30b6a35710a7393b2bb71cce8af37229b0b6c841 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 18:07:04 +0200 Subject: [PATCH 105/166] :hammer: Updated MA functions * Each functions are now being tested, and works as SMA --- NAMESPACE | 36 +++++++ R/ta_DEMA.R | 161 +++++++++++++++++++++------- R/ta_EMA.R | 163 +++++++++++++++++++++------- R/ta_KAMA.R | 159 +++++++++++++++++++++------ R/ta_MAMA.R | 151 +++++++++++++++++++++----- R/ta_SMA.R | 55 ++++++---- R/ta_T3.R | 159 +++++++++++++++++++++------ R/ta_TEMA.R | 159 +++++++++++++++++++++------ R/ta_TRIMA.R | 158 +++++++++++++++++++++------ R/ta_WMA.R | 162 +++++++++++++++++++++------- man/DEMA.Rd | 61 ++++++++--- man/EMA.Rd | 61 ++++++++--- man/KAMA.Rd | 59 +++++++++- man/MAMA.Rd | 58 +++++++++- man/SMA.Rd | 59 +++++++++- man/T3.Rd | 59 +++++++++- man/TEMA.Rd | 59 +++++++++- man/TRIMA.Rd | 59 +++++++++- man/WMA.Rd | 59 +++++++++- tests/testthat/test-ta_DEMA.R | 60 +++++++++++ tests/testthat/test-ta_EMA.R | 60 +++++++++++ tests/testthat/test-ta_KAMA.R | 60 +++++++++++ tests/testthat/test-ta_MA.R | 190 --------------------------------- tests/testthat/test-ta_SMA.R | 60 +++++++++++ tests/testthat/test-ta_T3.R | 60 +++++++++++ tests/testthat/test-ta_TEMA.R | 60 +++++++++++ tests/testthat/test-ta_TRIMA.R | 60 +++++++++++ tests/testthat/test-ta_WMA.R | 60 +++++++++++ 28 files changed, 2044 insertions(+), 523 deletions(-) create mode 100644 tests/testthat/test-ta_DEMA.R create mode 100644 tests/testthat/test-ta_EMA.R create mode 100644 tests/testthat/test-ta_KAMA.R delete mode 100644 tests/testthat/test-ta_MA.R create mode 100644 tests/testthat/test-ta_SMA.R create mode 100644 tests/testthat/test-ta_T3.R create mode 100644 tests/testthat/test-ta_TEMA.R create mode 100644 tests/testthat/test-ta_TRIMA.R create mode 100644 tests/testthat/test-ta_WMA.R diff --git a/NAMESPACE b/NAMESPACE index c6d3ae914..637cd8e48 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,25 +1,49 @@ # Generated by roxygen2: do not edit by hand +S3method(DEMA,data.frame) S3method(DEMA,default) +S3method(DEMA,matrix) +S3method(DEMA,numeric) S3method(DEMA,plotly) +S3method(EMA,data.frame) S3method(EMA,default) +S3method(EMA,matrix) +S3method(EMA,numeric) S3method(EMA,plotly) +S3method(KAMA,data.frame) S3method(KAMA,default) +S3method(KAMA,matrix) +S3method(KAMA,numeric) S3method(KAMA,plotly) +S3method(MAMA,data.frame) S3method(MAMA,default) +S3method(MAMA,matrix) +S3method(MAMA,numeric) S3method(MAMA,plotly) S3method(SMA,data.frame) S3method(SMA,default) S3method(SMA,matrix) S3method(SMA,numeric) S3method(SMA,plotly) +S3method(T3,data.frame) S3method(T3,default) +S3method(T3,matrix) +S3method(T3,numeric) S3method(T3,plotly) +S3method(TEMA,data.frame) S3method(TEMA,default) +S3method(TEMA,matrix) +S3method(TEMA,numeric) S3method(TEMA,plotly) +S3method(TRIMA,data.frame) S3method(TRIMA,default) +S3method(TRIMA,matrix) +S3method(TRIMA,numeric) S3method(TRIMA,plotly) +S3method(WMA,data.frame) S3method(WMA,default) +S3method(WMA,matrix) +S3method(WMA,numeric) S3method(WMA,plotly) S3method(acceleration_bands,data.frame) S3method(acceleration_bands,default) @@ -29,7 +53,10 @@ S3method(aroon,data.frame) S3method(aroon,default) S3method(aroon,matrix) S3method(aroon,plotly) +S3method(aroon_oscillator,data.frame) S3method(aroon_oscillator,default) +S3method(aroon_oscillator,matrix) +S3method(aroon_oscillator,plotly) S3method(bollinger_bands,data.frame) S3method(bollinger_bands,default) S3method(bollinger_bands,matrix) @@ -67,6 +94,7 @@ export(ACCBANDS) export(AD) export(ADOSC) export(AROON) +export(AROONOSC) export(BBANDS) export(CDLDOJI) export(CDLDOJISTAR) @@ -84,6 +112,7 @@ export(SMA) export(STOCHF) export(STOCHRSI) export(T3) +export(T3_moving_average) export(TEMA) export(TRIMA) export(WMA) @@ -96,8 +125,10 @@ export(chaikin_AD_oscillator) export(chart) export(doji) export(doji_star) +export(double_exponential_moving_average) export(dragonfly_doji) export(evening_doji_star) +export(exponential_moving_average) export(fast_stochastic) export(ht_dcperiod) export(ht_dcphase) @@ -106,9 +137,14 @@ export(ht_sine) export(ht_trendline) export(ht_trendmode) export(indicator) +export(kaufmans_adaptive_moving_average) export(moving_average_convergence_divergence) export(relative_strength_index) +export(simple_moving_average) export(stochastic) export(stochastic_relative_strength_index) +export(triangular_moving_average) +export(triple_exponential_moving_average) export(ultimate_oscillator) +export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index e73ec6103..378506bc2 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -1,75 +1,164 @@ -#' @title Double Exponential Moving Average (DEMA) -#' +#' @export #' @family Overlap Study +#' @title Double Exponential Moving Average (DEMA) #' -#' @templateVar .FUN DEMA -#' @template univariate_example +#' @templateVar .title Double Exponential Moving Average (DEMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun DEMA #' -#' @export -DEMA <- function(x, n = 10, ...) { +#' @template description +DEMA <- function( + x, + cols, + n = 10, + ... +) { UseMethod("DEMA") } #' @rdname DEMA #' @usage NULL #' @export -DEMA.default <- function(x, n = 10, ...) { +double_exponential_moving_average <- DEMA + +#' @rdname DEMA +#' @usage NULL +#' @export +DEMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") + + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 3L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("dema_", colnames(x)) + + x +} + +#' @rdname DEMA +#' @usage NULL +#' @export +DEMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 3L ) } + #' @rdname DEMA #' @usage NULL #' @export -DEMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - dema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 3L +DEMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(dema), - dema = as.numeric(dema) +#' @rdname DEMA +#' @usage NULL +#' @export +DEMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~dema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("DEMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname DEMA +#' @usage NULL +#' @export +DEMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("DEMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 855c0a530..aaa1aa638 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -1,76 +1,163 @@ -#' @title Exponential Moving Average (EMA) +#' @export #' @family Overlap Study +#' @title Exponential Moving Average (EMA) #' -#' @templateVar .FUN DEMA -#' @template univariate_example +#' @templateVar .title Exponential Moving Average (EMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun EMA #' -#' @export -EMA <- function(x, n = 10, ...) { - UseMethod( - "EMA" - ) +#' @template description +EMA <- function( + x, + cols, + n = 10, + ... +) { + UseMethod("EMA") } #' @rdname EMA #' @usage NULL #' @export -EMA.default <- function(x, n = 10, ...) { +exponential_moving_average <- EMA + +#' @rdname EMA +#' @usage NULL +#' @export +EMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 1L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("ema_", colnames(x)) + + x +} + +#' @rdname EMA +#' @usage NULL +#' @export +EMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 1L ) } + #' @rdname EMA #' @usage NULL #' @export -EMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - ema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 1L +EMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(ema), - ema = as.numeric(ema) +#' @rdname EMA +#' @usage NULL +#' @export +EMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~ema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("EMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname EMA +#' @usage NULL +#' @export +EMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("EMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index 3ebd74df2..f90873ecb 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -1,70 +1,163 @@ -#' @title Kaufman’s Adaptive Moving Average (KAMA) -#' @family Overlap Study #' @export -KAMA <- function(x, n = 10, ...) { +#' @family Overlap Study +#' @title Kaufman’s Adaptive Moving Average (KAMA) +#' +#' @templateVar .title Kaufman’s Adaptive Moving Average (KAMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun KAMA +#' +#' @template description +KAMA <- function( + x, + cols, + n = 10, + ... +) { UseMethod("KAMA") } #' @rdname KAMA #' @usage NULL #' @export -KAMA.default <- function(x, n = 10, ...) { +kaufmans_adaptive_moving_average <- KAMA + +#' @rdname KAMA +#' @usage NULL +#' @export +KAMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 6L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("kama_", colnames(x)) + + x +} + +#' @rdname KAMA +#' @usage NULL +#' @export +KAMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 6L ) } + #' @rdname KAMA #' @usage NULL #' @export -KAMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - kama <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L +KAMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(kama), - kama = as.numeric(kama) +#' @rdname KAMA +#' @usage NULL +#' @export +KAMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~kama, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("KAMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname KAMA +#' @usage NULL +#' @export +KAMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("KAMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index 7d91b9b06..36a14064a 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -1,20 +1,41 @@ +#' @export +#' @family Overlap Study #' @title Mesa Adaptive Moving Average (MAMA) #' -#' @family Overlap Study -#' @export -MAMA <- function(x, n = 10, ...) { +#' @templateVar .title Mesa Adaptive Moving Average (MAMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun MAMA +#' +#' @template description +MAMA <- function( + x, + cols, + n = 10, + ... +) { UseMethod("MAMA") } #' @rdname MAMA #' @usage NULL #' @export -MAMA.default <- function(x, n = 10, ...) { +MAMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script @@ -26,46 +47,118 @@ MAMA.default <- function(x, n = 10, ...) { assert(is.numeric(x)) assert(n >= 2) - ## 1) pass `x` to C - .Call( - "impl_ta_MA", - x, - as.integer(n), - 7L + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 7L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE ) + + colnames(x) <- paste0("mama_", colnames(x)) + + x } #' @rdname MAMA #' @usage NULL #' @export -MAMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series +MAMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!is.missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } - mama <- .Call( + .Call( "impl_ta_MA", - .univariate_series(series), + as.double(x), as.integer(n), 7L ) +} + + +#' @rdname MAMA +#' @usage NULL +#' @export +MAMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} - df <- data.frame( - idx = seq_along(mama), - mama = as.numeric(mama) +#' @rdname MAMA +#' @usage NULL +#' @export +MAMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~mama, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("MAMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname MAMA +#' @usage NULL +#' @export +MAMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("MAMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 194452c78..64c869960 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -1,19 +1,16 @@ +#' @export +#' @family Overlap Study #' @title Simple Moving Average (SMA) #' -#' @description -#' A short description... -#' -#' @param x A univariate series. -#' @param n An [integer] of [length] 1. The window size of the rolling average. -#' @param ... Parameters passed to and from other methods. -#' -#' @family Overlap Study +#' @templateVar .title Simple Moving Average (SMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun SMA #' -#' @export +#' @template description SMA <- function( x, - n = 10, cols, + n = 10, ... ) { UseMethod( @@ -21,12 +18,20 @@ SMA <- function( ) } +#' @rdname SMA +#' @usage NULL #' @export -SMA.default <- function(x, n = 10, cols, ...) { - if (missing(cols)) { - cols <- ~open - } +simple_moving_average <- SMA +#' @rdname SMA +#' @usage NULL +#' @export +SMA.default <- function( + x, + cols, + n = 10, + ... +) { x <- series( x = cols, default = ~open, @@ -53,14 +58,16 @@ SMA.default <- function(x, n = 10, cols, ...) { x } +#' @rdname SMA +#' @usage NULL #' @export SMA.numeric <- function( x, - n = 10, cols, + n = 10, ... ) { - if (!is.missing(cols)) { + if (!missing(cols)) { warning( "'cols' have been passed but is unused in for vectors" ) @@ -74,11 +81,13 @@ SMA.numeric <- function( ) } +#' @rdname SMA +#' @usage NULL #' @export SMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -86,11 +95,13 @@ SMA.data.frame <- function( ) } +#' @rdname SMA +#' @usage NULL #' @export SMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( @@ -101,7 +112,13 @@ SMA.matrix <- function( #' @rdname SMA #' @usage NULL #' @export -SMA.plotly <- function(x, cols, n = 10, data, ...) { +SMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { ## prepare series ## from x <- as.data.frame( diff --git a/R/ta_T3.R b/R/ta_T3.R index 04646d240..38c40100a 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -1,70 +1,163 @@ -#' @title T3 Moving Average (T3) -#' @family Overlap Study #' @export -T3 <- function(x, n = 10, ...) { +#' @family Overlap Study +#' @title T3 Moving Average (T3) +#' +#' @templateVar .title T3 Moving Average (T3) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun T3 +#' +#' @template description +T3 <- function( + x, + cols, + n = 10, + ... +) { UseMethod("T3") } #' @rdname T3 #' @usage NULL #' @export -T3.default <- function(x, n = 10, ...) { +T3_moving_average <- T3 + +#' @rdname T3 +#' @usage NULL +#' @export +T3.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 8L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("T3_", colnames(x)) + + x +} + +#' @rdname T3 +#' @usage NULL +#' @export +T3.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 8L ) } + #' @rdname T3 #' @usage NULL #' @export -T3.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - t3 <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 8L +T3.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(t3), - t3 = as.numeric(t3) +#' @rdname T3 +#' @usage NULL +#' @export +T3.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~t3, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("T3(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname T3 +#' @usage NULL +#' @export +T3.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("T3(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index 8240015bc..bf7b86239 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -1,70 +1,163 @@ -#' @title Triple Exponential Moving Average (TEMA) -#' @family Overlap Study #' @export -TEMA <- function(x, n = 10, ...) { +#' @family Overlap Study +#' @title Triple Exponential Moving Average (TEMA) +#' +#' @templateVar .title Triple Exponential Moving Average (TEMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun TEMA +#' +#' @template description +TEMA <- function( + x, + cols, + n = 10, + ... +) { UseMethod("TEMA") } #' @rdname TEMA #' @usage NULL #' @export -TEMA.default <- function(x, n = 10, ...) { +triple_exponential_moving_average <- TEMA + +#' @rdname TEMA +#' @usage NULL +#' @export +TEMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 4L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("tema_", colnames(x)) + + x +} + +#' @rdname TEMA +#' @usage NULL +#' @export +TEMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 4L ) } + #' @rdname TEMA #' @usage NULL #' @export -TEMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - tema <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 4L +TEMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(tema), - tema = as.numeric(tema) +#' @rdname TEMA +#' @usage NULL +#' @export +TEMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~tema, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TEMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname TEMA +#' @usage NULL +#' @export +TEMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("TEMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index 122b50d16..bffa28cca 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -1,34 +1,88 @@ -#' @title Triangular Moving Average (TRIMA) -#' @family Overlap Study #' @export -TRIMA <- function(x, n = 10, ...) { +#' @family Overlap Study +#' @title Triangular Moving Average (TRIMA) +#' +#' @templateVar .title Triangular Moving Average (TRIMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun TRIMA +#' +#' @template description +TRIMA <- function( + x, + cols, + n = 10, + ... +) { UseMethod("TRIMA") } #' @rdname TRIMA #' @usage NULL #' @export -TRIMA.default <- function(x, n = 10, ...) { +triangular_moving_average <- TRIMA + +#' @rdname TRIMA +#' @usage NULL +#' @export +TRIMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 5L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("trima_", colnames(x)) + + x +} + +#' @rdname TRIMA +#' @usage NULL +#' @export +TRIMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 5L ) @@ -38,34 +92,72 @@ TRIMA.default <- function(x, n = 10, ...) { #' @rdname TRIMA #' @usage NULL #' @export -TRIMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - trima <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L +TRIMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(trima), - trima = as.numeric(trima) +#' @rdname TRIMA +#' @usage NULL +#' @export +TRIMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~trima, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TRIMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname TRIMA +#' @usage NULL +#' @export +TRIMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("TRIMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/R/ta_WMA.R b/R/ta_WMA.R index 4f8ed618d..3de9a8210 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -1,36 +1,88 @@ -#' @title Weighted Moving Average (WMA) -#' @family Overlap Study #' @export -WMA <- function(x, n = 10, ...) { - UseMethod( - "WMA" - ) +#' @family Overlap Study +#' @title Weighted Moving Average (WMA) +#' +#' @templateVar .title Weighted Moving Average (WMA) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun WMA +#' +#' @template description +WMA <- function( + x, + cols, + n = 10, + ... +) { + UseMethod("WMA") } #' @rdname WMA #' @usage NULL #' @export -WMA.default <- function(x, n = 10, ...) { +weighted_moving_average <- WMA + +#' @rdname WMA +#' @usage NULL +#' @export +WMA.default <- function( + x, + cols, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## ## No coercing here as it might ## lead to overflow + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 0) validate input ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") + x <- vapply( + as.list(x), + FUN = function(x) { + .Call( + "impl_ta_MA", + x, + as.integer(n), + 2L + ) + }, + FUN.VALUE = double(nrow(x)), + USE.NAMES = TRUE + ) + + colnames(x) <- paste0("wma_", colnames(x)) + + x +} + +#' @rdname WMA +#' @usage NULL +#' @export +WMA.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) } - assert(is.numeric(x)) - assert(n >= 2) - ## 1) pass `x` to C .Call( "impl_ta_MA", - x, + as.double(x), as.integer(n), 2L ) @@ -40,34 +92,72 @@ WMA.default <- function(x, n = 10, ...) { #' @rdname WMA #' @usage NULL #' @export -WMA.plotly <- function(x, n = 10, ...) { - dots <- list(...) - series <- dots$.series - - wma <- .Call( - "impl_ta_MA", - .univariate_series(series), - as.integer(n), - 6L +WMA.data.frame <- function( + x, + n = 10, + cols, + ... +) { + as.data.frame( + NextMethod() ) +} - df <- data.frame( - idx = seq_along(wma), - wma = as.numeric(wma) +#' @rdname WMA +#' @usage NULL +#' @export +WMA.matrix <- function( + x, + n = 10, + cols, + ... +) { + as.matrix( + NextMethod() ) +} - .plotting_environment$main <- plotly::add_trace( - x, - data = df, # bind data here (creates/sets cur_data) - x = ~idx, - y = ~wma, # refer to columns, not objects in caller env - type = "scatter", - mode = "lines", - name = sprintf("TRIMA(%d)", n), - inherit = FALSE, - xaxis = "x", - yaxis = "y" # ensure it lands on the main panel +#' @rdname WMA +#' @usage NULL +#' @export +WMA.plotly <- function( + x, + cols, + n = 10, + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) ) + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("WMA(%d)", n), + inherit = FALSE + ) + }) + } + .plotting_environment$main } diff --git a/man/DEMA.Rd b/man/DEMA.Rd index caf9a0b1f..ff54b30ba 100644 --- a/man/DEMA.Rd +++ b/man/DEMA.Rd @@ -2,32 +2,60 @@ % Please edit documentation in R/ta_DEMA.R \name{DEMA} \alias{DEMA} +\alias{double_exponential_moving_average} \alias{DEMA.default} +\alias{DEMA.numeric} +\alias{DEMA.data.frame} +\alias{DEMA.matrix} \alias{DEMA.plotly} \title{Double Exponential Moving Average (DEMA)} \usage{ -DEMA(x, n = 10, ...) +DEMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Double Exponential Moving Average (DEMA) +The \code{dema()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. } \examples{ -## calculate values -result <- talib::DEMA( - x = talib::BTC[,1L] -) +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::DEMA(BTC) -tail(result) +## display the results +tail(output) -## charting the indicator +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details { - ## main chart - talib::chart(talib::BTC) + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) - ## indicator + ## chart indicator + ## with default values talib::indicator( - .f = talib::DEMA(), - .var = ~close + talib::DEMA() ) } } @@ -44,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/EMA.Rd b/man/EMA.Rd index bb3773e0a..33d82e897 100644 --- a/man/EMA.Rd +++ b/man/EMA.Rd @@ -2,32 +2,60 @@ % Please edit documentation in R/ta_EMA.R \name{EMA} \alias{EMA} +\alias{exponential_moving_average} \alias{EMA.default} +\alias{EMA.numeric} +\alias{EMA.data.frame} +\alias{EMA.matrix} \alias{EMA.plotly} \title{Exponential Moving Average (EMA)} \usage{ -EMA(x, n = 10, ...) +EMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Exponential Moving Average (EMA) +The \code{ema()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. } \examples{ -## calculate values -result <- talib::DEMA( - x = talib::BTC[,1L] -) +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::EMA(BTC) -tail(result) +## display the results +tail(output) -## charting the indicator +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details { - ## main chart - talib::chart(talib::BTC) + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) - ## indicator + ## chart indicator + ## with default values talib::indicator( - .f = talib::DEMA(), - .var = ~close + talib::EMA() ) } } @@ -44,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/KAMA.Rd b/man/KAMA.Rd index bd9e2ab56..7acc07b84 100644 --- a/man/KAMA.Rd +++ b/man/KAMA.Rd @@ -2,14 +2,62 @@ % Please edit documentation in R/ta_KAMA.R \name{KAMA} \alias{KAMA} +\alias{kaufmans_adaptive_moving_average} \alias{KAMA.default} +\alias{KAMA.numeric} +\alias{KAMA.data.frame} +\alias{KAMA.matrix} \alias{KAMA.plotly} \title{Kaufman’s Adaptive Moving Average (KAMA)} \usage{ -KAMA(x, n = 10, ...) +KAMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Kaufman’s Adaptive Moving Average (KAMA) +The \code{kama()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::KAMA(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::KAMA() + ) +} } \seealso{ Other Overlap Study: @@ -24,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/MAMA.Rd b/man/MAMA.Rd index 885d4b34e..ac645f4ed 100644 --- a/man/MAMA.Rd +++ b/man/MAMA.Rd @@ -3,13 +3,60 @@ \name{MAMA} \alias{MAMA} \alias{MAMA.default} +\alias{MAMA.numeric} +\alias{MAMA.data.frame} +\alias{MAMA.matrix} \alias{MAMA.plotly} \title{Mesa Adaptive Moving Average (MAMA)} \usage{ -MAMA(x, n = 10, ...) +MAMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Mesa Adaptive Moving Average (MAMA) +The \code{mama()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::MAMA(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::MAMA() + ) +} } \seealso{ Other Overlap Study: @@ -24,4 +71,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/SMA.Rd b/man/SMA.Rd index 36a26f439..1d9eab3aa 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -2,20 +2,62 @@ % Please edit documentation in R/ta_SMA.R \name{SMA} \alias{SMA} +\alias{simple_moving_average} +\alias{SMA.default} +\alias{SMA.numeric} +\alias{SMA.data.frame} +\alias{SMA.matrix} \alias{SMA.plotly} \title{Simple Moving Average (SMA)} \usage{ -SMA(x, n = 10, cols, ...) +SMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{A univariate series.} +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} -\item{n}{An \link{integer} of \link{length} 1. The window size of the rolling average.} +\item{cols}{A \link{formula}} -\item{...}{Parameters passed to and from other methods.} +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -A short description... +The \code{sma()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::SMA(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::SMA() + ) +} } \seealso{ Other Overlap Study: @@ -30,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/T3.Rd b/man/T3.Rd index c430784a5..8fd4011b6 100644 --- a/man/T3.Rd +++ b/man/T3.Rd @@ -2,14 +2,62 @@ % Please edit documentation in R/ta_T3.R \name{T3} \alias{T3} +\alias{T3_moving_average} \alias{T3.default} +\alias{T3.numeric} +\alias{T3.data.frame} +\alias{T3.matrix} \alias{T3.plotly} \title{T3 Moving Average (T3)} \usage{ -T3(x, n = 10, ...) +T3(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -T3 Moving Average (T3) +The \code{t3()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::T3(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::T3() + ) +} } \seealso{ Other Overlap Study: @@ -24,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/TEMA.Rd b/man/TEMA.Rd index 7c854d2ef..b10ec9f27 100644 --- a/man/TEMA.Rd +++ b/man/TEMA.Rd @@ -2,14 +2,62 @@ % Please edit documentation in R/ta_TEMA.R \name{TEMA} \alias{TEMA} +\alias{triple_exponential_moving_average} \alias{TEMA.default} +\alias{TEMA.numeric} +\alias{TEMA.data.frame} +\alias{TEMA.matrix} \alias{TEMA.plotly} \title{Triple Exponential Moving Average (TEMA)} \usage{ -TEMA(x, n = 10, ...) +TEMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Triple Exponential Moving Average (TEMA) +The \code{tema()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::TEMA(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::TEMA() + ) +} } \seealso{ Other Overlap Study: @@ -24,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/TRIMA.Rd b/man/TRIMA.Rd index 131e8a6a6..9878d2a21 100644 --- a/man/TRIMA.Rd +++ b/man/TRIMA.Rd @@ -2,14 +2,62 @@ % Please edit documentation in R/ta_TRIMA.R \name{TRIMA} \alias{TRIMA} +\alias{triangular_moving_average} \alias{TRIMA.default} +\alias{TRIMA.numeric} +\alias{TRIMA.data.frame} +\alias{TRIMA.matrix} \alias{TRIMA.plotly} \title{Triangular Moving Average (TRIMA)} \usage{ -TRIMA(x, n = 10, ...) +TRIMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Triangular Moving Average (TRIMA) +The \code{trima()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::TRIMA(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::TRIMA() + ) +} } \seealso{ Other Overlap Study: @@ -24,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/WMA.Rd b/man/WMA.Rd index 31d223344..856811437 100644 --- a/man/WMA.Rd +++ b/man/WMA.Rd @@ -2,14 +2,62 @@ % Please edit documentation in R/ta_WMA.R \name{WMA} \alias{WMA} +\alias{weighted_moving_average} \alias{WMA.default} +\alias{WMA.numeric} +\alias{WMA.data.frame} +\alias{WMA.matrix} \alias{WMA.plotly} \title{Weighted Moving Average (WMA)} \usage{ -WMA(x, n = 10, ...) +WMA(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Weighted Moving Average (WMA) +The \code{wma()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::WMA(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::WMA() + ) +} } \seealso{ Other Overlap Study: @@ -24,4 +72,11 @@ Other Overlap Study: \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()} } +\author{ +Serkan Korkmaz +} \concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/tests/testthat/test-ta_DEMA.R b/tests/testthat/test-ta_DEMA.R new file mode 100644 index 000000000..bbcb9324e --- /dev/null +++ b/tests/testthat/test-ta_DEMA.R @@ -0,0 +1,60 @@ +## script: Double Exponential Moving Average (DEMA) +## author: Serkan Korkmaz +testthat::test_that(desc = "Double Exponential Moving Average (DEMA)", code = { + ## 1) calculate values + ## with and without alias + output <- double_exponential_moving_average(SPY) + alias <- DEMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(double_exponential_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(double_exponential_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(double_exponential_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(double_exponential_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = double_exponential_moving_average( + BTC + ), + expected = double_exponential_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_EMA.R b/tests/testthat/test-ta_EMA.R new file mode 100644 index 000000000..a2efaf737 --- /dev/null +++ b/tests/testthat/test-ta_EMA.R @@ -0,0 +1,60 @@ +## script: Exponential Moving Average (EMA) +## author: Serkan Korkmaz +testthat::test_that(desc = "Exponential Moving Average (EMA)", code = { + ## 1) calculate values + ## with and without alias + output <- exponential_moving_average(SPY) + alias <- EMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(exponential_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(exponential_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(exponential_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(exponential_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = exponential_moving_average( + BTC + ), + expected = exponential_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_KAMA.R b/tests/testthat/test-ta_KAMA.R new file mode 100644 index 000000000..287189e43 --- /dev/null +++ b/tests/testthat/test-ta_KAMA.R @@ -0,0 +1,60 @@ +## script: Kaufman’s Adaptive Moving Average (KAMA) +## author: Serkan Korkmaz +testthat::test_that(desc = "Kaufman’s Adaptive Moving Average (KAMA)", code = { + ## 1) calculate values + ## with and without alias + output <- kaufmans_adaptive_moving_average(SPY) + alias <- KAMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(kaufmans_adaptive_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(kaufmans_adaptive_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(kaufmans_adaptive_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(kaufmans_adaptive_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = kaufmans_adaptive_moving_average( + BTC + ), + expected = kaufmans_adaptive_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_MA.R b/tests/testthat/test-ta_MA.R deleted file mode 100644 index ec16fdd17..000000000 --- a/tests/testthat/test-ta_MA.R +++ /dev/null @@ -1,190 +0,0 @@ -## script: MA -## author: Serkan Korkmaz -testthat::test_that(desc = "Simple Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- simple_moving_average(SPY[, 1]) - alias <- SMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Exponential Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- exponential_moving_average(SPY[, 1]) - alias <- EMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Weighted Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- weighted_moving_average(SPY[, 1]) - alias <- WMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Double Exponential Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- double_exponential_moving_average(SPY[, 1]) - alias <- DEMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Triple Exponential Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- triple_exponential_moving_average(SPY[, 1]) - alias <- TEMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Triangular Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- triangular_moving_average(SPY[, 1]) - alias <- TRIMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Kaufman’s Adaptive Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- kaufman_adaptive_moving_average(SPY[, 1]) - alias <- KAMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "Mesa Adaptive Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- mesa_adaptive_moving_average(SPY[, 1]) - alias <- MAMA(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) - -testthat::test_that(desc = "T3 Moving Average", code = { - ## 1) calculate values - ## with and without alias - output <- t3_moving_average(SPY[, 1]) - alias <- T3(SPY[, 1]) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check if the values - ## have same length - testthat::expect_equal( - object = nrow(SPY), - expected = length(output) - ) -}) diff --git a/tests/testthat/test-ta_SMA.R b/tests/testthat/test-ta_SMA.R new file mode 100644 index 000000000..fd8ec31f2 --- /dev/null +++ b/tests/testthat/test-ta_SMA.R @@ -0,0 +1,60 @@ +## script: Simple Moving Average +## author: Serkan Korkmaz +testthat::test_that(desc = "Simple Moving Average", code = { + ## 1) calculate values + ## with and without alias + output <- simple_moving_average(SPY) + alias <- SMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(simple_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(simple_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(simple_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(simple_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = simple_moving_average( + BTC + ), + expected = simple_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_T3.R b/tests/testthat/test-ta_T3.R new file mode 100644 index 000000000..5c66a4c00 --- /dev/null +++ b/tests/testthat/test-ta_T3.R @@ -0,0 +1,60 @@ +## script: T3 Moving Average (T3) +## author: Serkan Korkmaz +testthat::test_that(desc = "T3 Moving Average (T3)", code = { + ## 1) calculate values + ## with and without alias + output <- T3_moving_average(SPY) + alias <- T3(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(T3_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(T3_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(T3_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(T3_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = T3_moving_average( + BTC + ), + expected = T3_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_TEMA.R b/tests/testthat/test-ta_TEMA.R new file mode 100644 index 000000000..11847f38f --- /dev/null +++ b/tests/testthat/test-ta_TEMA.R @@ -0,0 +1,60 @@ +## script: Triple Exponential Moving Average (TEMA) +## author: Serkan Korkmaz +testthat::test_that(desc = "Triple Exponential Moving Average (TEMA)", code = { + ## 1) calculate values + ## with and without alias + output <- triple_exponential_moving_average(SPY) + alias <- TEMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(triple_exponential_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(triple_exponential_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(triple_exponential_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(triple_exponential_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = triple_exponential_moving_average( + BTC + ), + expected = triple_exponential_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_TRIMA.R b/tests/testthat/test-ta_TRIMA.R new file mode 100644 index 000000000..13d37df76 --- /dev/null +++ b/tests/testthat/test-ta_TRIMA.R @@ -0,0 +1,60 @@ +## script: Triangular Moving Average (TRIMA) +## author: Serkan Korkmaz +testthat::test_that(desc = "Triangular Moving Average (TRIMA)", code = { + ## 1) calculate values + ## with and without alias + output <- triangular_moving_average(SPY) + alias <- TRIMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(triangular_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(triangular_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(triangular_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(triangular_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = triangular_moving_average( + BTC + ), + expected = triangular_moving_average( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_WMA.R b/tests/testthat/test-ta_WMA.R new file mode 100644 index 000000000..5b331778f --- /dev/null +++ b/tests/testthat/test-ta_WMA.R @@ -0,0 +1,60 @@ +## script: Weighted Moving Average +## author: Serkan Korkmaz +testthat::test_that(desc = "Weighted Moving Average", code = { + ## 1) calculate values + ## with and without alias + output <- weighted_moving_average(SPY) + alias <- WMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(weighted_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(weighted_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(weighted_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(weighted_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = weighted_moving_average( + BTC + ), + expected = weighted_moving_average( + BTC, + cols = ~open + ) + ) +}) From a68d4bd9c381c201f5aa4c4cb5a257bdd3acd057 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 20:32:47 +0200 Subject: [PATCH 106/166] :hammer: Updated Functions --- R/ta_AROON.R | 2 +- R/ta_AROONOSC.R | 154 ++++++++++++++++++++++++++++++++++------ R/ta_BBANDS.R | 2 +- man/aroon_oscillator.Rd | 55 +++++++++++++- 4 files changed, 188 insertions(+), 25 deletions(-) diff --git a/R/ta_AROON.R b/R/ta_AROON.R index e51401b18..f8f1225f1 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -2,7 +2,7 @@ #' @family Momentum Indicator #' #' @title Aroon -#' @templateVar .title Chaikin A/D Oscillator +#' @templateVar .title Aroon #' @templateVar .author Serkan Korkmaz #' @templateVar .fun aroon #' diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index a5b3c3ca4..ce9cc32b3 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -1,33 +1,145 @@ -#' @title Aroon Oscillator -#' +#' @export #' @family Momentum Indicator #' -#' @export -aroon_oscillator <- function(x, n, ...) { +#' @title Aroon Oscillator +#' @templateVar .title Aroon Oscillator +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun aroon_oscillator +#' +#' @template description +aroon_oscillator <- function(x, cols, n = 10, ...) { UseMethod( generic = "aroon_oscillator" ) } +#' @usage NULL +#' @aliases aroon_oscillator +#' @export +AROONOSC <- aroon_oscillator + #' @export -aroon_oscillator.default <- function(x, n, ...) { - ## default behaviour is to - ## coerce to a `matrix` check that - ## it is double and then pass to - ## C-side. - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.matrix(x)) { - x <- as.matrix(x) +aroon_oscillator.default <- function(x, cols, n = 10, ...) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 2, + paste0( + "'cols' has to be length 2. ", + "Got length ", + length(all.vars(cols)) + ) + ) } - assert(is.numeric(x)) - ## 1) pass `x` assuming that - ## it follows Open (x[,1]), High (x[,2]) - ## Low (x[,3]) and Close (x[,4]) + HL <- series( + x = cols, + default = ~ high + low, + data = x, + ... + ) + + data.frame( + aroon_oscillator = .Call( + "impl_ta_AROONOSC", + HL[[1]], + HL[[2]], + as.integer(n) + ) + ) +} + + +#' @usage NULL +#' @aliases aroon_oscillator +#' @export +aroon_oscillator.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases aroon_oscillator +#' @export +aroon_oscillator.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + + +#' @usage NULL +#' @aliases aroon_oscillator +#' @export +aroon_oscillator.plotly <- function( + x, + cols, + data, + n = 10, + ... +) { + HL <- series( + x = x, + formula = cols, + default = ~ high + low, + data = data, + ... + ) + + .indicator <- data.frame( + aroon_oscillator = .Call( + "impl_ta_AROONOSC", + HL[[1]], + HL[[2]], + as.integer(n) + ) + ) + + .indicator$idx <- 1:nrow(.indicator) + + ad_plot <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~aroon_oscillator, + type = "scatter", + mode = "lines", + # line = list(color = ad_col), + name = "AD", + legendgroup = "Aroon", + showlegend = FALSE + ) + + ad_plot <- add_title( + x = ad_plot, + text = "Aroon Oscillator" + ) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(ad_plot) + ) - .Call("impl_ta_AROONOSC", .high(x), .low(x), as.integer(n)) + ad_plot } diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index b97a02cf0..f4ab5e209 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -137,7 +137,7 @@ bollinger_bands.matrix <- function( down = 2, ... ) { - as.data.frame( + as.matrix( NextMethod() ) } diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index 776c5581b..4167b837c 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -4,10 +4,54 @@ \alias{aroon_oscillator} \title{Aroon Oscillator} \usage{ -aroon_oscillator(x, n, ...) +aroon_oscillator(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Aroon Oscillator +The \code{aroon_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::aroon_oscillator(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::aroon_oscillator() + ) +} } \seealso{ Other Momentum Indicator: @@ -19,4 +63,11 @@ Other Momentum Indicator: \code{\link{stochastic_relative_strength_index}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} From 8a1b191ba0759dcb5e440e35501975f1385abc43 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 20:33:26 +0200 Subject: [PATCH 107/166] :hammer: Updated everything --- NAMESPACE | 7 + R/chart_indicator.R | 4 +- R/ta_RSI.R | 12 +- R/ta_STOCH.R | 195 ++++++++++++++++++-- R/ta_STOCHF.R | 174 +++++++++++++++-- R/ta_STOCHRSI.R | 15 +- README.md | 4 +- man/fast_stochastic.Rd | 55 +++++- man/stochastic.Rd | 55 +++++- man/stochastic_relative_strength_index.Rd | 58 +++++- tests/testthat/test-ta_ACCBANDS.R | 40 ++++ tests/testthat/test-ta_AD.R | 55 ++++++ tests/testthat/test-ta_AROON.R | 55 ++++++ tests/testthat/test-ta_AROONOSC.R | 55 ++++++ tests/testthat/test-ta_BBANDS.R | 42 ++++- tests/testthat/test-ta_CDLDOJI.R | 35 ---- tests/testthat/test-ta_CDLDOJISTAR.R | 35 ---- tests/testthat/test-ta_CDLDRAGONFLYDOJI.R | 35 ---- tests/testthat/test-ta_CDLEVENINGDOJISTAR.R | 35 ---- tests/testthat/test-ta_MACD.R | 48 ----- tests/testthat/test-ta_STOCH.R | 55 ++++++ tests/testthat/test-ta_STOCHF.R | 55 ++++++ 22 files changed, 891 insertions(+), 233 deletions(-) create mode 100644 tests/testthat/test-ta_AD.R create mode 100644 tests/testthat/test-ta_AROON.R create mode 100644 tests/testthat/test-ta_AROONOSC.R delete mode 100644 tests/testthat/test-ta_CDLDOJI.R delete mode 100644 tests/testthat/test-ta_CDLDOJISTAR.R delete mode 100644 tests/testthat/test-ta_CDLDRAGONFLYDOJI.R delete mode 100644 tests/testthat/test-ta_CDLEVENINGDOJISTAR.R delete mode 100644 tests/testthat/test-ta_MACD.R create mode 100644 tests/testthat/test-ta_STOCH.R create mode 100644 tests/testthat/test-ta_STOCHF.R diff --git a/NAMESPACE b/NAMESPACE index 637cd8e48..8b96137f4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -75,7 +75,10 @@ S3method(doji,default) S3method(doji_star,default) S3method(dragonfly_doji,default) S3method(evening_doji_star,default) +S3method(fast_stochastic,data.frame) S3method(fast_stochastic,default) +S3method(fast_stochastic,matrix) +S3method(fast_stochastic,plotly) S3method(ht_dcperiod,default) S3method(ht_dcphase,default) S3method(ht_phasor,default) @@ -87,7 +90,10 @@ S3method(relative_strength_index,default) S3method(relative_strength_index,plotly) S3method(series,formula) S3method(series,plotly) +S3method(stochastic,data.frame) S3method(stochastic,default) +S3method(stochastic,matrix) +S3method(stochastic,plotly) S3method(stochastic_relative_strength_index,default) S3method(ultimate_oscillator,default) export(ACCBANDS) @@ -109,6 +115,7 @@ export(MACDFIX) export(MAMA) export(RSI) export(SMA) +export(STOCH) export(STOCHF) export(STOCHRSI) export(T3) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 6f01f0a93..cdd1b273b 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -66,7 +66,7 @@ indicator <- function( ## with argument and let the ## the dispatcher handle the rest dots <- as.list(substitute(list(...)))[-1L] - args <- c(list(.plot), pre_args) + args <- c(list(x = .plot), pre_args) if (has_var) { f_formals <- tryCatch( @@ -79,7 +79,7 @@ indicator <- function( if (!is.na(name)) args[[name]] <- var_expr } - output <- do.call(f, c(args, dots), envir = parent_frame) + output <- do.call(f, c(args, dots), envir = parent_frame, quote = TRUE) ## construct plotly object ## if based off of the char diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 571043723..382779fe8 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -1,7 +1,11 @@ #' @title Relative Strength Index #' @family Momentum Indicator #' @export -relative_strength_index <- function(x, n = 10, ...) { +relative_strength_index <- function( + x, + n = 10, + ... +) { UseMethod( "relative_strength_index" ) @@ -11,7 +15,11 @@ relative_strength_index <- function(x, n = 10, ...) { RSI <- relative_strength_index #' @export -relative_strength_index.default <- function(x, n = 10, ...) { +relative_strength_index.default <- function( + x, + n = 10, + ... +) { ## default behaviour is to ## check if its a numeric vector ## diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index 796b04184..4a2af697a 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -1,33 +1,200 @@ +#' @export +#' @family Momentum Indicator +#' #' @title Stochastic #' -#' @family Momentum Indicator -#' @export -stochastic <- function(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) { +#' @templateVar .title Stochastic +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun stochastic +#' +#' @template description +stochastic <- function( + x, + cols, + fastk = 5, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ... +) { UseMethod( "stochastic" ) } + +#' @usage NULL +#' @aliases stochastic +#' @export +STOCH <- stochastic + + +#' @usage NULL +#' @aliases stochastic #' @export stochastic.default <- function( x, - fastk, + cols, + fastk = 5, slowk = SMA(n = 10), slowd = SMA(n = 8), ... ) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 3, + paste0( + "'cols' has to be length 3. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct HLC series + HLC <- series( + x = cols, + default = ~ high + low + close, + data = x, + ... + ) + slowk_ma <- map_maType_call(substitute(slowk)) slowd_ma <- map_maType_call(substitute(slowd)) - .Call( - "impl_ta_STOCH", - .high(x), - .low(x), - .close(x), - as.integer(fastk), # 4. optInFastK_Period - as.integer(slowk_ma$n), # 5. optInSlowK_Period - as.integer(slowk_ma$maType), # 6. optInSlowK_MAType - as.integer(slowd_ma$n), # 7. optInSlowD_Period - as.integer(slowd_ma$maType) # 8. optInSlowD_MAType + as.data.frame( + .Call( + "impl_ta_STOCH", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(fastk), + as.integer(slowk_ma$n), + as.integer(slowk_ma$maType), + as.integer(slowd_ma$n), + as.integer(slowd_ma$maType) + ) + ) +} + +#' @usage NULL +#' @aliases stochastic +#' @export +stochastic.data.frame <- function( + x, + cols, + fastk = 5, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases stochastic +#' @export +stochastic.matrix <- function( + x, + cols, + fastk = 5, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + ... +) { + as.matrix( + NextMethod() + ) +} + + +#' @usage NULL +#' @aliases stochastic +#' @export +stochastic.plotly <- function( + x, + cols, + fastk = 5, + slowk = SMA(n = 10), + slowd = SMA(n = 8), + data, + ... +) { + # slowk_ma <- map_maType_call(substitute(slowk)) + # slowd_ma <- map_maType_call(substitute(slowd)) + slowk <- substitute(slowk) + slowd <- substitute(slowd) + slowk_ma <- map_maType_call(slowk) + slowd_ma <- map_maType_call(slowd) + ## construct HLC series + HLC <- as.data.frame(series( + x = x, + formula = cols, + default = ~ high + low + close, + data = data, + ... + )) + + .indicator <- as.data.frame( + .Call( + "impl_ta_STOCH", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(fastk), + as.integer(slowk_ma$n), + as.integer(slowk_ma$maType), + as.integer(slowd_ma$n), + as.integer(slowd_ma$maType) + ) + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## Create + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~slowk, + type = "scatter", + mode = "lines", + # line = list(color = ad_col), + name = "Stochastic %K", + legendgroup = "stochastic", + showlegend = TRUE + ) + + output <- plotly::add_lines( + output, + x = ~idx, + y = ~slowd, + name = "Stochastic %D", + legendgroup = "stochastic", + showlegend = TRUE ) + + output <- add_title( + x = output, + text = "Stochastic" + ) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output } diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index a34716d7f..871e1f8a8 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -1,10 +1,17 @@ +#' @export +#' @family Momentum Indicator +#' #' @title Fast Stochastic #' -#' @family Momentum Indicator -#' @export +#' @templateVar .title Fast Stochastic +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun fast_stochastic +#' +#' @template description fast_stochastic <- function( x, - fast_k, + cols, + fast_k = 5, fast_d_MAtype = SMA(n = 10), ... ) { @@ -13,25 +20,166 @@ fast_stochastic <- function( ) } +#' @usage NULL +#' @aliases fast_stochastic #' @export STOCHF <- fast_stochastic +#' @usage NULL +#' @aliases fast_stochastic #' @export fast_stochastic.default <- function( x, - fast_k, + cols, + fast_k = 5, + fast_d_MAtype = SMA(n = 10), + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 3, + paste0( + "'cols' has to be length 3. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct HLC series + HLC <- series( + x = cols, + default = ~ high + low + close, + data = x, + ... + ) + + slowk_ma <- map_maType_call(substitute(fast_d_MAtype)) + + as.data.frame( + .Call( + "impl_ta_STOCHF", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(fast_k), + as.integer(slowk_ma$n), + as.integer(slowk_ma$maType) + ) + ) +} + + +#' @usage NULL +#' @aliases fast_stochastic +#' @export +fast_stochastic.data.frame <- function( + x, + cols, + fast_k = 5, + fast_d_MAtype = SMA(n = 10), + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases fast_stochastic +#' @export +fast_stochastic.matrix <- function( + x, + cols, + fast_k = 5, fast_d_MAtype = SMA(n = 10), ... ) { - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + as.matrix( + NextMethod() + ) +} - .Call( - "impl_ta_STOCHF", - .high(x), - .low(x), - .close(x), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType + +#' @usage NULL +#' @aliases fast_stochastic +#' @export +fast_stochastic.plotly <- function( + x, + cols, + fast_k = 5, + fast_d_MAtype = SMA(n = 10), + data, + ... +) { + fast_d_MAtype <- substitute(fast_d_MAtype) + slowk_ma <- map_maType_call(fast_d_MAtype) + + ## construct HLC series + HLC <- as.data.frame(series( + x = x, + formula = cols, + default = ~ high + low + close, + data = data, + ... + )) + + .indicator <- as.data.frame( + .Call( + "impl_ta_STOCHF", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(fast_k), + as.integer(slowk_ma$n), + as.integer(slowk_ma$maType) + ) + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## Create + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~fastk, + type = "scatter", + mode = "lines", + # line = list(color = ad_col), + name = "Stochastic %K (Fast)", + legendgroup = "stochastic_fast", + showlegend = FALSE ) + + output <- plotly::add_lines( + output, + x = ~idx, + y = ~fastd, + legendgroup = "stochastic_fast", + name = "Stochastic %D (Fast)" + ) + + output <- add_title( + x = output, + text = "Fast Stochastic" + ) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output } diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 99203eaea..c535fd538 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -1,11 +1,18 @@ +#' @export +#' @family Momentum Indicator +#' #' @title Stochastic Relative Strength Index #' -#' @family Momentum Indicator -#' @export +#' @templateVar .title Stochastic Relative Strength Index +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun acceleration_bands +#' +#' @template description stochastic_relative_strength_index <- function( x, - n, - fast_k, + cols, + n = 10, + fast_k = 5, fast_d_MAtype = SMA(n = 10), ... ) { diff --git a/README.md b/README.md index c33d70aa9..ed5e190a4 100644 --- a/README.md +++ b/README.md @@ -84,5 +84,5 @@ x <- talib::BTC } ``` -
- +
+ diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index ae7c69c3b..a1b529009 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -4,10 +4,54 @@ \alias{fast_stochastic} \title{Fast Stochastic} \usage{ -fast_stochastic(x, fast_k, fast_d_MAtype = SMA(n = 10), ...) +fast_stochastic(x, cols, fast_k = 5, fast_d_MAtype = SMA(n = 10), ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} } \description{ -Fast Stochastic +The \code{fast_stochastic()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::fast_stochastic(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::fast_stochastic() + ) +} } \seealso{ Other Momentum Indicator: @@ -19,4 +63,11 @@ Other Momentum Indicator: \code{\link{stochastic_relative_strength_index}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/stochastic.Rd b/man/stochastic.Rd index e2e5f4694..18aca7bf5 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -4,10 +4,54 @@ \alias{stochastic} \title{Stochastic} \usage{ -stochastic(x, fastk, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) +stochastic(x, cols, fastk = 5, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} } \description{ -Stochastic +The \code{stochastic()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::stochastic(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::stochastic() + ) +} } \seealso{ Other Momentum Indicator: @@ -19,4 +63,11 @@ Other Momentum Indicator: \code{\link{stochastic_relative_strength_index}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index 7d4dcf64a..ea90f15f4 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -6,14 +6,59 @@ \usage{ stochastic_relative_strength_index( x, - n, - fast_k, + cols, + n = 10, + fast_k = 5, fast_d_MAtype = SMA(n = 10), ... ) } +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} +} \description{ -Stochastic Relative Strength Index +The \code{acceleration_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::acceleration_bands(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::acceleration_bands() + ) +} } \seealso{ Other Momentum Indicator: @@ -25,4 +70,11 @@ Other Momentum Indicator: \code{\link{stochastic}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/tests/testthat/test-ta_ACCBANDS.R b/tests/testthat/test-ta_ACCBANDS.R index ead995800..f984cce75 100644 --- a/tests/testthat/test-ta_ACCBANDS.R +++ b/tests/testthat/test-ta_ACCBANDS.R @@ -12,4 +12,44 @@ testthat::test_that(desc = "Acceleration Bands", code = { object = output, expected = alias ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(acceleration_bands()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(acceleration_bands(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(acceleration_bands(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = acceleration_bands( + BTC + ), + expected = acceleration_bands( + BTC, + cols = ~ open + high + close + ) + ) }) diff --git a/tests/testthat/test-ta_AD.R b/tests/testthat/test-ta_AD.R new file mode 100644 index 000000000..4fb9e6a8b --- /dev/null +++ b/tests/testthat/test-ta_AD.R @@ -0,0 +1,55 @@ +## script: AD +## author: Serkan Korkmaz +testthat::test_that(desc = "Chaikin A/D Line", code = { + ## 1) calculate values + ## with and without alias + output <- chaikin_AD_line(SPY) + alias <- AD(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(chaikin_AD_line()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(chaikin_AD_line(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(chaikin_AD_line(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = chaikin_AD_line( + BTC + ), + expected = chaikin_AD_line( + BTC, + cols = ~ high + low + close + volume + ) + ) +}) diff --git a/tests/testthat/test-ta_AROON.R b/tests/testthat/test-ta_AROON.R new file mode 100644 index 000000000..8cbe250dd --- /dev/null +++ b/tests/testthat/test-ta_AROON.R @@ -0,0 +1,55 @@ +## script: AD +## author: Serkan Korkmaz +testthat::test_that(desc = "Aroon", code = { + ## 1) calculate values + ## with and without alias + output <- aroon(SPY) + alias <- AROON(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(aroon()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(aroon(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(aroon(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = aroon( + BTC + ), + expected = aroon( + BTC, + cols = ~ high + low + ) + ) +}) diff --git a/tests/testthat/test-ta_AROONOSC.R b/tests/testthat/test-ta_AROONOSC.R new file mode 100644 index 000000000..891f24694 --- /dev/null +++ b/tests/testthat/test-ta_AROONOSC.R @@ -0,0 +1,55 @@ +## script: AD +## author: Serkan Korkmaz +testthat::test_that(desc = "Aroon Oscillator", code = { + ## 1) calculate values + ## with and without alias + output <- aroon_oscillator(SPY) + alias <- AROONOSC(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(aroon_oscillator()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(aroon_oscillator(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(aroon_oscillator(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = aroon_oscillator( + BTC + ), + expected = aroon_oscillator( + BTC, + cols = ~ high + low + ) + ) +}) diff --git a/tests/testthat/test-ta_BBANDS.R b/tests/testthat/test-ta_BBANDS.R index 7982485e4..d4d6a3ec8 100644 --- a/tests/testthat/test-ta_BBANDS.R +++ b/tests/testthat/test-ta_BBANDS.R @@ -1,4 +1,4 @@ -## script: ta_BBANDS +## script: ACCBANDS ## author: Serkan Korkmaz testthat::test_that(desc = "Bollinger Bands", code = { ## 1) calculate values @@ -12,4 +12,44 @@ testthat::test_that(desc = "Bollinger Bands", code = { object = output, expected = alias ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(bollinger_bands()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(bollinger_bands(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(bollinger_bands(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = bollinger_bands( + BTC + ), + expected = bollinger_bands( + BTC, + cols = ~open + ) + ) }) diff --git a/tests/testthat/test-ta_CDLDOJI.R b/tests/testthat/test-ta_CDLDOJI.R deleted file mode 100644 index c1e15e43d..000000000 --- a/tests/testthat/test-ta_CDLDOJI.R +++ /dev/null @@ -1,35 +0,0 @@ -## script: Doji -## author: Serkan Korkmaz -testthat::test_that(desc = "Doji", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- doji(SPY) - alias <- CDLDOJI(SPY) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check that the range - ## is in [0, 100] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(100)) - ) - - ## 1.3) recalculate with - ## normalization and check - ## range is in [0, 1] - options(talib.normalize = TRUE) - output <- CDLDOJI(SPY) - - ## 1.4) check that the range - ## is in [-1, 1] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(1)) - ) -}) diff --git a/tests/testthat/test-ta_CDLDOJISTAR.R b/tests/testthat/test-ta_CDLDOJISTAR.R deleted file mode 100644 index c6d069986..000000000 --- a/tests/testthat/test-ta_CDLDOJISTAR.R +++ /dev/null @@ -1,35 +0,0 @@ -## script: Doji Star -## author: Serkan Korkmaz -testthat::test_that(desc = "Doji Star", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- doji_star(SPY) - alias <- CDLDOJISTAR(SPY) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check that the range - ## is in [-100, 100] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) - ) - - ## 1.3) recalculate with - ## normalization and check - ## range is in [-1, 1] - options(talib.normalize = TRUE) - output <- CDLDOJISTAR(SPY) - - ## 1.4) check that the range - ## is in [-1, 1] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) - ) -}) diff --git a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R b/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R deleted file mode 100644 index 5902f3b42..000000000 --- a/tests/testthat/test-ta_CDLDRAGONFLYDOJI.R +++ /dev/null @@ -1,35 +0,0 @@ -## script: DRAGONFLYDOJI -## author: Serkan Korkmaz -testthat::test_that(desc = "Dragonfly Doji", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- dragonfly_doji(SPY) - alias <- CDLDRAGONFLYDOJI(SPY) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check that the range - ## is in [-100, 100] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-100, 100)) - ) - - ## 1.3) recalculate with - ## normalization and check - ## range is in [-1, 1] - options(talib.normalize = TRUE) - output <- CDLDRAGONFLYDOJI(SPY) - - ## 1.4) check that the range - ## is in [-1, 1] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1, 1)) - ) -}) diff --git a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R b/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R deleted file mode 100644 index 35cdd0dc0..000000000 --- a/tests/testthat/test-ta_CDLEVENINGDOJISTAR.R +++ /dev/null @@ -1,35 +0,0 @@ -## script: Evening Doji Star -## author: Serkan Korkmaz -testthat::test_that(desc = "Evening Doji Star", code = { - ## 1) calculate values - ## with and without alias - ## without normalization - options(talib.normalize = FALSE) - output <- evening_doji_star(SPY) - alias <- CDLEVENINGDOJISTAR(SPY) - - ## 1.1) check if the values - ## are equal - testthat::expect_equal( - object = output, - expected = alias - ) - - ## 1.2) check that the range - ## is in [-100, 0] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-100)) - ) - - ## 1.3) recalculate with - ## normalization and check - ## range is in [-1, 0] - options(talib.normalize = TRUE) - output <- CDLEVENINGDOJISTAR(SPY) - - ## 1.4) check that the range - ## is in [-1, 0] - testthat::expect_true( - object = any(unique(output, na.rm = TRUE) %in% c(-1)) - ) -}) diff --git a/tests/testthat/test-ta_MACD.R b/tests/testthat/test-ta_MACD.R deleted file mode 100644 index e375d7c38..000000000 --- a/tests/testthat/test-ta_MACD.R +++ /dev/null @@ -1,48 +0,0 @@ -## script: MACD -## author: Serkan Korkmaz -testthat::test_that(desc = "MACD", code = { - ## 1) calculate values - ## with and without alias - output <- moving_average_convergence_divergence(SPY[, 1]) - alias <- MACD(SPY[, 1]) - - ## 1.1) check if the values - ## are equal is by default - testthat::expect_equal( - object = output, - expected = alias - ) -}) - -testthat::test_that(desc = "MACDFIX", code = { - ## 1) calculate values - ## with and without alias - output <- moving_average_convergence_divergence(SPY[, 1]) - alias <- MACDFIX(SPY[, 1]) - - ## 1.1) check if the values - ## are equal is by default - testthat::expect_equal( - object = output, - expected = alias - ) -}) - -testthat::test_that(desc = "MACDEXT", code = { - ## 1) calculate values - ## with and without alias - output <- moving_average_convergence_divergence( - SPY[, 1], - EMA(n = 12), - EMA(n = 26), - EMA(n = 9) - ) - alias <- MACDEXT(SPY[, 1]) - - ## 1.1) check if the values - ## are equal is by default - testthat::expect_equal( - object = output, - expected = alias - ) -}) diff --git a/tests/testthat/test-ta_STOCH.R b/tests/testthat/test-ta_STOCH.R new file mode 100644 index 000000000..05fb2d0e5 --- /dev/null +++ b/tests/testthat/test-ta_STOCH.R @@ -0,0 +1,55 @@ +## script: AD +## author: Serkan Korkmaz +testthat::test_that(desc = "stochastic", code = { + ## 1) calculate values + ## with and without alias + output <- stochastic(SPY) + alias <- STOCH(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(stochastic()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(stochastic(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(stochastic(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = stochastic( + BTC + ), + expected = stochastic( + BTC, + cols = ~ high + low + close + ) + ) +}) diff --git a/tests/testthat/test-ta_STOCHF.R b/tests/testthat/test-ta_STOCHF.R new file mode 100644 index 000000000..f68c1e287 --- /dev/null +++ b/tests/testthat/test-ta_STOCHF.R @@ -0,0 +1,55 @@ +## script: AD +## author: Serkan Korkmaz +testthat::test_that(desc = "Fast Stochastic", code = { + ## 1) calculate values + ## with and without alias + output <- fast_stochastic(SPY) + alias <- STOCHF(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(fast_stochastic()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(fast_stochastic(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(fast_stochastic(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = fast_stochastic( + BTC + ), + expected = fast_stochastic( + BTC, + cols = ~ high + low + close + ) + ) +}) From bf8e5b1a699ebf5d5f8ac423d35763569497db9d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 20:37:20 +0200 Subject: [PATCH 108/166] :hammer: Updated Makefile * build will now clean everything before building --- Makefile | 5 +++-- README.md | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9300379f5..162de1fe9 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ help: | sed -E 's/^[[:space:]]*//' \ | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}' -build: ## Build the R package +build: clean ## Build the R package @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD INSTALL $(tarball_location) @@ -30,7 +30,8 @@ clean: ## Remove artifacts @rm -rf src/Makevars @rm -rf $(package_name).Rcheck @rm -rf docs - @Rscript -e "remove.packages('$(package_name)')" + @rm -rf README.md + @Rscript -e "try(remove.packages('$(package_name)'))" fmt: ## Format code @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h diff --git a/README.md b/README.md index ed5e190a4..ec9ef9f61 100644 --- a/README.md +++ b/README.md @@ -84,5 +84,5 @@ x <- talib::BTC } ``` -
- +
+ From de0e8a9113626e50bbd2862b0eb93a5d91c62774 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 20:41:56 +0200 Subject: [PATCH 109/166] :hammer: Updated Readme --- README.Rmd | 9 ++++----- README.md | 13 ++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.Rmd b/README.Rmd index cfb27e3a0..b0bcd6906 100644 --- a/README.Rmd +++ b/README.Rmd @@ -78,14 +78,13 @@ x <- talib::BTC ## to the chart talib::indicator( FUN = talib::SMA(), - cols = ~close + cols = ~close + open ) ## add bollinger bands ## to the chart - # talib::indicator( - # FUN = talib::RSI(), - # cols = ~close - # ) + talib::indicator( + FUN = talib::stochastic() + ) } ``` \ No newline at end of file diff --git a/README.md b/README.md index ec9ef9f61..5c650a83e 100644 --- a/README.md +++ b/README.md @@ -72,17 +72,16 @@ x <- talib::BTC ## to the chart talib::indicator( FUN = talib::SMA(), - cols = ~close + cols = ~close + open ) ## add bollinger bands ## to the chart - # talib::indicator( - # FUN = talib::RSI(), - # cols = ~close - # ) + talib::indicator( + FUN = talib::stochastic() + ) } ``` -
- +
+ From 6f16c1b7dd48b5e42f92c610ebd8bdc8ff5a1404 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 21:05:08 +0200 Subject: [PATCH 110/166] :hammer: Updated Makefile and Configure * Makefile now have purge * Configure builds the TA-lib with o3 --- Makefile | 3 +++ configure | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 162de1fe9..883866add 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,9 @@ clean: ## Remove artifacts @rm -rf README.md @Rscript -e "try(remove.packages('$(package_name)'))" +purge: clean ## Remove TA-Lib arifacts + @cd src/ta-lib && make uninstall && make maintainer-clean + fmt: ## Format code @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h @rm -rf ./.clang-format diff --git a/configure b/configure index dd64fb176..c26997194 100755 --- a/configure +++ b/configure @@ -94,7 +94,7 @@ if [ "$USE_SYSTEM" -eq 0 ]; then fi fi - CFLAGS="${CFLAGS:+$CFLAGS }-fPIC" ./configure --prefix="$TA_LIB_PREFIX" + CFLAGS="${CFLAGS:+$CFLAGS }-O3 -march=native -fPIC" ./configure --prefix="$TA_LIB_PREFIX" make -j2 make install From 8b92682052840d555aeeaa75fc2e0d1d143ab3e3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 30 Aug 2025 21:17:52 +0200 Subject: [PATCH 111/166] :hammer: Updated README * Needed chromium to do the stuff --- README.Rmd | 1 - README.md | 3 +-- man/figures/README-charting-1.png | Bin 94510 -> 13371 bytes 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.Rmd b/README.Rmd index b0bcd6906..4cd13bca4 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,6 +1,5 @@ --- output: github_document -always_allow_html: true --- diff --git a/README.md b/README.md index 5c650a83e..73ed8f7f2 100644 --- a/README.md +++ b/README.md @@ -83,5 +83,4 @@ x <- talib::BTC } ``` -
- + diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png index ffa58cbd4a55166ee94c7395b75fccd81c6a67a9..259b40fe2f675b286898f9be2a12717552a2af38 100644 GIT binary patch literal 13371 zcmeHuXH=7GyJp;ec8ZFKQn%ZJN>zHzR#Zfq(mNv3OXv_F#6qzFTiA3$1XQGhbO=ER zf^_L6kPte75C}bW9?v;5YrZqT&diTlv*zOm33*A@lc!wmzTejm4YawB3m%6+Aly3l z?-)TK|5$}U4&)#G4ZKqRMza6{ISJ9ZbIT+ob9L%SfT_!qC5BegUw0D!k@GfgIo11( zZ?j_UJ4Wq0N}7)ITKA<{y}pl_z>0*V$rK$+>cUh;O2*CC?T&r5!9rYZk6-40-X*C0 zcFg4D(GYaNs-xxa7Y>RtUJ_v{R@#i!imJXEUOv_~rNVHwWGeIu7{Tv{WBI_t$z!KZ zKp=n0-;o4=^q(vTzwcNYJ05aY6pU}eQHM#bxFQUYJRnHNOcXuGH5D&__a(d9_zRG?3Pwb?28v# zPM@6I+}sWwI)tj9%gf6PUix{BzdYRR!ZWSI$XcJ~%4;ydra70NkiIIgDA$@eD5~u+ z?9Vj@RYWzUtgUg>4vDxrrqK|D$Um+qE-rp%HQzWdf@R+{SrKOLzF%2G5LVwJAM#(k zRQr3ZkdoV!s@mjOr7yxy=bm#LZv<`A+%B9zJOp`GE3XGh$!9TkN-P@-9B|Qmur!<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%`Hy7h+=0|9@hH0QHE6c2NFO4I4{T-_9BB{f6$sT~P zB056?%gNKvW;4=$^i*_b##s5-i09{Bb=6AZR3_EeFJtumy}kPDAdwh@e03F-=q*c6 z38c4@_m{GVD*lbqrY0j&Z7YB~@|1-08PQMwchW-7#e7qp`&jCw6zx?So zFknjZI%RLAb?|EJ(#-;NWMxs|#S8EK_e~?dEG|KF8oCDBY{SoL^NXG0mKL|(uUPXv z8#i{T`gjK;r|NW~9Lvr^dAry4Z0>bg<)A3vYvFWWr43r0Awg>FtLEm+%q;@k)&McL z-G#xql`ESU)1JWI!lm+DZMS}9%X^YBWNEH|vfQEqiF*G$|z`L(SJw z$~IXj@Qrp z@h5|?8C%WH!ap6#*K(@5Hhm5}$I?mwUII=AwB?BE=gwXutt zs*1+NF`31xXX9b52`(sf^Bv%STaznODZ+3rcUA29DT!|;8=@GGh3<>!v|S=7{-FDNdBxnzYx2>A z5A&(E##UU|w+~EwW)R|tj*X`7X274Lg}cFB7WH{ZKpJP|tN+oJ3WBuou5 Date: Sat, 30 Aug 2025 21:18:54 +0200 Subject: [PATCH 112/166] :hammer: Clean updated * I need to be able to run without messing up README --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 883866add..b527141be 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ build: clean ## Build the R package @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD INSTALL $(tarball_location) + @rm -rf README.md @Rscript -e "rmarkdown::render('README.Rmd', output_format = rmarkdown::github_document(html_preview = FALSE), clean = TRUE)" check: ## Check the R package @@ -30,7 +31,6 @@ clean: ## Remove artifacts @rm -rf src/Makevars @rm -rf $(package_name).Rcheck @rm -rf docs - @rm -rf README.md @Rscript -e "try(remove.packages('$(package_name)'))" purge: clean ## Remove TA-Lib arifacts From f2d787090e57ab79ffb452eb9f114c2c1376d945 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 31 Aug 2025 09:28:57 +0200 Subject: [PATCH 113/166] :hammer: Implemented RSI and STOCHRSI * This revealed some bugs. indicator with custom data does not work --- NAMESPACE | 6 + R/ta_RSI.R | 156 ++++++++++++++++++---- R/ta_STOCHRSI.R | 140 +++++++++++++++++-- man/relative_strength_index.Rd | 55 +++++++- man/stochastic_relative_strength_index.Rd | 6 +- tests/testthat/test-charting.R | 34 +++++ tests/testthat/test-ta_RSI.R | 60 +++++++++ tests/testthat/test-ta_STOCHRSI.R | 55 ++++++++ 8 files changed, 470 insertions(+), 42 deletions(-) create mode 100644 tests/testthat/test-charting.R create mode 100644 tests/testthat/test-ta_RSI.R create mode 100644 tests/testthat/test-ta_STOCHRSI.R diff --git a/NAMESPACE b/NAMESPACE index 8b96137f4..5c1d332e4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -86,7 +86,10 @@ S3method(ht_sine,default) S3method(ht_trendline,default) S3method(ht_trendmode,default) S3method(moving_average_convergence_divergence,default) +S3method(relative_strength_index,data.frame) S3method(relative_strength_index,default) +S3method(relative_strength_index,matrix) +S3method(relative_strength_index,numeric) S3method(relative_strength_index,plotly) S3method(series,formula) S3method(series,plotly) @@ -94,7 +97,10 @@ S3method(stochastic,data.frame) S3method(stochastic,default) S3method(stochastic,matrix) S3method(stochastic,plotly) +S3method(stochastic_relative_strength_index,data.frame) S3method(stochastic_relative_strength_index,default) +S3method(stochastic_relative_strength_index,matrix) +S3method(stochastic_relative_strength_index,plotly) S3method(ultimate_oscillator,default) export(ACCBANDS) export(AD) diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 382779fe8..d535dc3bb 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -1,8 +1,16 @@ -#' @title Relative Strength Index -#' @family Momentum Indicator #' @export +#' @family Momentum Indicator +#' +#' @title Relative Strength Index +#' +#' @templateVar .title Relative Strength Index +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun relative_strength_index +#' +#' @template description relative_strength_index <- function( x, + cols, n = 10, ... ) { @@ -11,56 +19,150 @@ relative_strength_index <- function( ) } +#' @usage NULL +#' @aliases relative_strength_index #' @export RSI <- relative_strength_index +#' @usage NULL +#' @aliases relative_strength_index #' @export relative_strength_index.default <- function( x, + cols, n = 10, ... ) { - ## default behaviour is to - ## check if its a numeric vector - ## - ## No coercing here as it might - ## lead to overflow - - ## 0) validate input - ## and stop the script - ## if conditions are not - ## met - if (!is.null(dim(x))) { - stop("`x` has to be a double vector") + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) } - assert(is.numeric(x)) - assert(n >= 2) + + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) ## 1) pass `x` to C + data.frame( + RSI = .Call( + "impl_ta_RSI", + x[[1]], + as.integer(n) + ) + ) +} + +#' @usage NULL +#' @aliases relative_strength_index +#' @export +relative_strength_index.numeric <- function( + x, + cols, + n = 10, + ... +) { + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_RSI", - x, + as.double(x), as.integer(n) ) } +#' @usage NULL +#' @aliases relative_strength_index +#' @export +relative_strength_index.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases relative_strength_index +#' @export +relative_strength_index.matrix <- function( + x, + cols, + n = 10, + ... +) { + ## NOTE: NextMethod dispactes + ## to numeric + as.matrix( + relative_strength_index.default( + x = x, + cols = cols, + n = n, + ... + ) + ) +} + +#' @usage NULL +#' @aliases relative_strength_index #' @export relative_strength_index.plotly <- function( x, + cols, n = 10, - lower = 20, - upper = 80, + lower_band = 20, + upper_band = 80, + data, ... ) { - dots <- list(...) - series <- dots$.series[, 1L] - rsi <- .Call("impl_ta_RSI", as.double(series), as.integer(n)) - df <- data.frame(idx = seq_along(rsi), value = rsi) + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) + ) + + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) rsi_plot <- plotly::plot_ly( - df, + .indicator, x = ~idx, - y = ~value, + y = ~RSI, type = "scatter", mode = "lines", showlegend = FALSE @@ -68,8 +170,8 @@ relative_strength_index.plotly <- function( rsi_plot <- plotly::add_ribbons( rsi_plot, x = ~idx, - ymin = rep(lower, nrow(df)), - ymax = rep(upper, nrow(df)), + ymin = rep(lower_band, nrow(.indicator)), + ymax = rep(upper_band, nrow(.indicator)), line = list(width = 0), fillcolor = "rgba(160,160,160,0.20)" ) diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index c535fd538..8eb387dbe 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -5,7 +5,7 @@ #' #' @templateVar .title Stochastic Relative Strength Index #' @templateVar .author Serkan Korkmaz -#' @templateVar .fun acceleration_bands +#' @templateVar .fun stochastic_relative_strength_index #' #' @template description stochastic_relative_strength_index <- function( @@ -27,19 +27,139 @@ STOCHRSI <- stochastic_relative_strength_index #' @export stochastic_relative_strength_index.default <- function( x, - n, - fast_k, + cols, + n = 10, + fast_k = 5, fast_d_MAtype = SMA(n = 10), ... ) { fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) - .Call( - "impl_ta_STOCHRSI", - x, - as.integer(n), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + x <- series( + x = cols, + default = ~RSI, + data = x, + ... + ) + + as.data.frame( + .Call( + "impl_ta_STOCHRSI", + x[[1]], + as.integer(n), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) + ) +} + + +#' @usage NULL +#' @aliases stochastic_relative_strength_index +#' @export +stochastic_relative_strength_index.data.frame <- function( + x, + cols, + n = 10, + fast_k = 5, + fast_d_MAtype = SMA(n = 10), + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases stochastic_relative_strength_index +#' @export +stochastic_relative_strength_index.matrix <- function( + x, + cols, + n = 10, + fast_k = 5, + fast_d_MAtype = SMA(n = 10), + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases stochastic_relative_strength_index +#' @export +stochastic_relative_strength_index.plotly <- function( + x, + cols, + n = 10, + fast_k = 5, + fast_d_MAtype = SMA(n = 10), + data, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + data = data, + ... + ) + ) + + ## indicator + .indicator <- as.data.frame( + NextMethod() ) + .indicator$idx <- 1:nrow(.indicator) + + rsi_plot <- plotly::plot_ly( + .indicator, + x = ~idx, + y = ~fastk, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + rsi_plot <- plotly::add_lines( + .indicator, + x = ~idx, + y = ~fastk, + showlegend = FALSE + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(rsi_plot) + ) + + rsi_plot } diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index 16df71405..463397575 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -4,10 +4,54 @@ \alias{relative_strength_index} \title{Relative Strength Index} \usage{ -relative_strength_index(x, n = 10, ...) +relative_strength_index(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Relative Strength Index +The \code{relative_strength_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::relative_strength_index(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::relative_strength_index() + ) +} } \seealso{ Other Momentum Indicator: @@ -19,4 +63,11 @@ Other Momentum Indicator: \code{\link{stochastic_relative_strength_index}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index ea90f15f4..c612af9fc 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -23,7 +23,7 @@ stochastic_relative_strength_index( \item{...}{additional parameters passed into \link{model.frame}.} } \description{ -The \code{acceleration_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +The \code{stochastic_relative_strength_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. @@ -38,7 +38,7 @@ data(BTC, package = "talib") ## calculate the indicator ## for Bitcoin (BTC) -output <- talib::acceleration_bands(BTC) +output <- talib::stochastic_relative_strength_index(BTC) ## display the results tail(output) @@ -56,7 +56,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::acceleration_bands() + talib::stochastic_relative_strength_index() ) } } diff --git a/tests/testthat/test-charting.R b/tests/testthat/test-charting.R new file mode 100644 index 000000000..cb686cb36 --- /dev/null +++ b/tests/testthat/test-charting.R @@ -0,0 +1,34 @@ +## script: Test charting +## author: Serkan Korkmaz +testthat::test_that(desc = "Charting", code = { + ## 1) test chart() works + ## without issues + ## + ## 1.1) matrix + testthat::expect_no_condition( + { + chart(SPY) + } + ) + + ## 1.2) data.frame + testthat::expect_no_condition( + { + chart(SPY) + } + ) + + ## 2) test that indicators + ## can be passed with custom + ## data + testthat::expect_no_condition( + { + chart(SPY) + indicator( + FUN = SMA(), + cols = ~open, + data = BTC + ) + } + ) +}) diff --git a/tests/testthat/test-ta_RSI.R b/tests/testthat/test-ta_RSI.R new file mode 100644 index 000000000..a103a6a0a --- /dev/null +++ b/tests/testthat/test-ta_RSI.R @@ -0,0 +1,60 @@ +## script: Relative Strength Index +## author: Serkan Korkmaz +testthat::test_that(desc = "Relative Strength Index", code = { + ## 1) calculate values + ## with and without alias + output <- relative_strength_index(SPY) + alias <- RSI(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(relative_strength_index()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(relative_strength_index(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(relative_strength_index(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(relative_strength_index(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = relative_strength_index( + BTC + ), + expected = relative_strength_index( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_STOCHRSI.R b/tests/testthat/test-ta_STOCHRSI.R new file mode 100644 index 000000000..729db8cf1 --- /dev/null +++ b/tests/testthat/test-ta_STOCHRSI.R @@ -0,0 +1,55 @@ +## script: Stochastic Relative Strength Index +## author: Serkan Korkmaz +testthat::test_that(desc = "Stochastic Relative Strength Index", code = { + ## 1) calculate values + ## with and without alias + output <- stochastic_relative_strength_index(RSI(SPY)) + alias <- STOCHRSI(RSI(SPY)) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(stochastic_relative_strength_index(), data = RSI(BTC)) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(stochastic_relative_strength_index(RSI(SPY)), class(RSI(SPY))) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(stochastic_relative_strength_index(RSI(BTC)), class(RSI(BTC))) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = stochastic_relative_strength_index( + RSI(BTC) + ), + expected = stochastic_relative_strength_index( + RSI(BTC), + cols = ~RSI + ) + ) +}) From 1ff81fd5f03f702b2cb639ff60b57a72e6a9ac33 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 31 Aug 2025 11:33:49 +0200 Subject: [PATCH 114/166] :hammer: Everything Works except... * Stochastic RSI. It returns NAs and the plotly method is broken. --- R/chart_indicator.R | 90 ++++++++++------------------------- R/series.R | 112 +++++++++++++++++++++----------------------- R/ta_ACCBANDS.R | 2 - R/ta_AD.R | 2 - R/ta_ADOSC.R | 2 - R/ta_AROON.R | 2 - R/ta_AROONOSC.R | 2 - R/ta_BBANDS.R | 2 - R/ta_DEMA.R | 2 - R/ta_EMA.R | 2 - R/ta_KAMA.R | 2 - R/ta_RSI.R | 2 - R/ta_SMA.R | 2 - R/ta_STOCH.R | 2 - R/ta_STOCHF.R | 2 - R/ta_STOCHRSI.R | 4 +- R/ta_T3.R | 2 - R/ta_TEMA.R | 2 - R/ta_TRIMA.R | 2 - R/ta_WMA.R | 2 - man/indicator.Rd | 11 ----- 21 files changed, 81 insertions(+), 170 deletions(-) delete mode 100644 man/indicator.Rd diff --git a/R/chart_indicator.R b/R/chart_indicator.R index cdd1b273b..a22566d61 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,22 +1,8 @@ -#' @title Chart indicators #' @export -indicator <- function( - FUN, - cols, - ... -) { - ## indicator - ## - ## description: - ## the indicator function builds upon existing - ## {plotly} objects if it has been defined, otherwise - ## it will create a standalone chart with the indicator - ## only +indicator <- function(FUN, cols, ...) { parent_frame <- parent.frame() - ## resolve passed formula - ## via 'cols' and store in the - ## parent_frame + ## resolve 'cols' has_var <- !missing(cols) if (has_var) { var_expr <- eval.parent(substitute(cols)) @@ -24,8 +10,7 @@ indicator <- function( environment(var_expr) <- parent_frame } - ## resolve the call - ## passed via FUN + ## resolve FUN (unchanged) f_call <- substitute(FUN) pre_args <- list() if (is.call(f_call)) { @@ -35,65 +20,48 @@ indicator <- function( f <- match.fun(eval.parent(f_call)) } - ## resolve plotting - ## environment; if it exists - ## it means talib::chart has been called - ## otherwise generate a new environment and - ## work off of that - .plotting_environment <- get0( - ".plotting_environment", - inherits = TRUE - ) + ## plotting env (unchanged) + .plotting_environment <- get0(".plotting_environment", inherits = TRUE) if (is.null(.plotting_environment)) { .plotting_environment <- new.env(parent = emptyenv()) - assign( - ".plotting_environment", - .plotting_environment, - inherits = TRUE - ) + assign(".plotting_environment", .plotting_environment, inherits = TRUE) } - if (is.null(.plotting_environment$main)) { .plotting_environment$main <- .chart_layout( x = plotly::plotly_empty(), title_text = "fisk" ) } - .plot <- .plotting_environment$main - ## build the FUN call - ## with argument and let the - ## the dispatcher handle the rest - dots <- as.list(substitute(list(...)))[-1L] + ## base args args <- c(list(x = .plot), pre_args) - if (has_var) { - f_formals <- tryCatch( - names(formals(f)), - error = function(e) { - character() - } - ) + f_formals <- tryCatch(names(formals(f)), error = function(e) { + character() + }) name <- intersect(c("cols", "formula"), f_formals)[1] if (!is.na(name)) args[[name]] <- var_expr } - output <- do.call(f, c(args, dots), envir = parent_frame, quote = TRUE) + ## --- enforce NAME-ONLY dots using ...names() (no evaluation) --- + dotsQ <- as.list(substitute(list(...)))[-1L] # quoted dots + if (length(dotsQ)) { + dn <- ...names() + if (is.null(dn) || any(!nzchar(dn))) { + stop( + "All arguments in '...' must be named; positional dots are not supported." + ) + } + names(dotsQ) <- dn + } + ## --------------------------------------------------------------- + + output <- do.call(f, c(args, dotsQ), envir = parent_frame, quote = FALSE) - ## construct plotly object - ## if based off of the char if (inherits(output, "plotly")) { - panels <- c( - list(.plotting_environment$main), - .plotting_environment$sub - ) - stopifnot(all(vapply( - panels, - inherits, - logical(1), - what = "plotly" - ))) + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) + stopifnot(all(vapply(panels, inherits, logical(1), what = "plotly"))) n <- length(panels) main_h <- getOption("talib.chart.main", 0.7) heights <- if (n > 1) { @@ -109,16 +77,10 @@ indicator <- function( margin = 0.02, heights = heights ), - - ## this part is necessary - ## to avoid local subplots - ## to interfere with the main - ## plot showlegend = TRUE ) .plotting_environment$chart <- fig return(fig) } - output } diff --git a/R/series.R b/R/series.R index 6840ec3a9..e113f2fee 100644 --- a/R/series.R +++ b/R/series.R @@ -6,96 +6,92 @@ series <- function( x, default, - data, ... ) { target <- if (!missing(x)) x else default UseMethod("series", target) } -## plotly series #' @export series.plotly <- function( x, formula, default, - data, ... ) { - ## if the data is not provided - ## extract the data from the plotly - ## object - ## - ## NOTE: If volume is missing - ## there might be an issue - if (missing(data)) { - ## extract data - data <- .plotting_environment$x + if (missing(formula)) { + formula <- default } - series.formula( - x = formula, - default = default, - data = data, - ... + dotsQ <- as.list(substitute(list(...)))[-1L] + dn <- ...names() + if (length(dotsQ)) { + if (is.null(dn)) { + dn <- rep("", length(dotsQ)) + } + names(dotsQ) <- dn + } else { + dotsQ <- list() + dn <- character() + } + + # If caller didn't provide data=..., default to the chart's data + if (!("data" %in% dn)) { + dotsQ$data <- quote(.plotting_environment$x) + } + + do.call( + series.formula, + c(list(x = formula, default = default), dotsQ), + quote = FALSE ) } -# #' @export -# series.data.frame <- function( -# x, -# default, -# data, -# ... -# ) { -# series.formula( -# x = x, -# default = default, -# data = data, -# ... -# ) -# } - -## formula series #' @export series.formula <- function( x, default, - data, ... ) { - ## coerce to data.frame - ## for downstream compatibility + # Capture quoted dots; preserve laziness + dotsQ <- as.list(substitute(list(...)))[-1L] + dn <- ...names() + if (length(dotsQ)) { + names(dotsQ) <- if (is.null(dn)) rep("", length(dotsQ)) else dn + } + + # Extract 'data' from dots (last-wins if repeated), then remove from dots + data_expr <- NULL + if (length(dotsQ)) { + idx <- which(names(dotsQ) == "data") + if (length(idx)) { + data_expr <- dotsQ[[idx[length(idx)]]] + dotsQ <- dotsQ[-idx] # avoid passing data twice + } + } + if (is.null(data_expr)) { + stop("series(): 'data' must be supplied via '...'.", call. = FALSE) + } + data <- eval(data_expr, envir = parent.frame()) if (!is.data.frame(data)) { - data <- as.data.frame( - data - ) + data <- as.data.frame(data) } - ## if the formula is missing - ## replace with the default - ## value + # Use default formula if missing if (missing(x)) { x <- default } - ## if additional arguments are - ## not passed we extract the data - ## by name to avoid the additional - ## cost of model.frame - if (...length() == 0) { - output <- data[, - all.vars(x), - drop = FALSE - ] + # Fast path: no extra args -> select columns directly + if (length(dotsQ) == 0) { + out <- data[, all.vars(x), drop = FALSE] } else { - ## return data.frame - output <- model.frame( - formula = x, - data = data, - ... + # Model frame with exactly one 'data' + out <- do.call( + model.frame, + c(list(formula = x, data = data), dotsQ), + quote = FALSE ) } - - return(output) + out } diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 4f798df14..5477953f2 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -112,7 +112,6 @@ acceleration_bands.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -121,7 +120,6 @@ acceleration_bands.plotly <- function( x = x, formula = cols, default = ~ open + high + close, - data = data, ... ) diff --git a/R/ta_AD.R b/R/ta_AD.R index 979a321d9..c3ee59f78 100644 --- a/R/ta_AD.R +++ b/R/ta_AD.R @@ -108,7 +108,6 @@ chaikin_AD_line.matrix <- function( chaikin_AD_line.plotly <- function( x, cols, - data, ... ) { ## prepare HLCV series @@ -116,7 +115,6 @@ chaikin_AD_line.plotly <- function( x = x, formula = cols, default = ~ high + low + close + volume, - data = data, ... ) diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R index 2741d2961..92b0e0e7c 100644 --- a/R/ta_ADOSC.R +++ b/R/ta_ADOSC.R @@ -102,7 +102,6 @@ chaikin_AD_oscillator.matrix <- function( chaikin_AD_oscillator.plotly <- function( x, cols, - data, fast = 3, slow = 10, ... @@ -112,7 +111,6 @@ chaikin_AD_oscillator.plotly <- function( x = x, formula = cols, default = ~ high + low + close + volume, - data = data, ... ) diff --git a/R/ta_AROON.R b/R/ta_AROON.R index f8f1225f1..80c063a95 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -107,7 +107,6 @@ aroon.matrix <- function( aroon.plotly <- function( x, cols, - data, n = 10, ... ) { @@ -115,7 +114,6 @@ aroon.plotly <- function( x = x, formula = cols, default = ~ high + low, - data = data, ... ) diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index ce9cc32b3..d13dc574c 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -97,7 +97,6 @@ aroon_oscillator.matrix <- function( aroon_oscillator.plotly <- function( x, cols, - data, n = 10, ... ) { @@ -105,7 +104,6 @@ aroon_oscillator.plotly <- function( x = x, formula = cols, default = ~ high + low, - data = data, ... ) diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index f4ab5e209..495ebcdea 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -151,7 +151,6 @@ bollinger_bands.plotly <- function( ma = SMA(n = 10), up = 2, down = 2, - data, ... ) { ma <- map_maType_call(substitute(ma)) @@ -162,7 +161,6 @@ bollinger_bands.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index 378506bc2..e1272e73c 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -125,7 +125,6 @@ DEMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -135,7 +134,6 @@ DEMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_EMA.R b/R/ta_EMA.R index aaa1aa638..7784d956a 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -124,7 +124,6 @@ EMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -134,7 +133,6 @@ EMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index f90873ecb..cf5795b35 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -124,7 +124,6 @@ KAMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -134,7 +133,6 @@ KAMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_RSI.R b/R/ta_RSI.R index d535dc3bb..051c0d644 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -140,7 +140,6 @@ relative_strength_index.plotly <- function( n = 10, lower_band = 20, upper_band = 80, - data, ... ) { ## prepare series @@ -150,7 +149,6 @@ relative_strength_index.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 64c869960..89645fb12 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -116,7 +116,6 @@ SMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -126,7 +125,6 @@ SMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index 4a2af697a..045bed2e6 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -131,7 +131,6 @@ stochastic.plotly <- function( fastk = 5, slowk = SMA(n = 10), slowd = SMA(n = 8), - data, ... ) { # slowk_ma <- map_maType_call(substitute(slowk)) @@ -145,7 +144,6 @@ stochastic.plotly <- function( x = x, formula = cols, default = ~ high + low + close, - data = data, ... )) diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index 871e1f8a8..20b7f7d6a 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -122,7 +122,6 @@ fast_stochastic.plotly <- function( cols, fast_k = 5, fast_d_MAtype = SMA(n = 10), - data, ... ) { fast_d_MAtype <- substitute(fast_d_MAtype) @@ -133,7 +132,6 @@ fast_stochastic.plotly <- function( x = x, formula = cols, default = ~ high + low + close, - data = data, ... )) diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 8eb387dbe..a101c54fa 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -120,7 +120,6 @@ stochastic_relative_strength_index.plotly <- function( n = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), - data, ... ) { ## prepare series @@ -129,8 +128,7 @@ stochastic_relative_strength_index.plotly <- function( series( x = x, formula = cols, - default = ~open, - data = data, + default = ~RSI, ... ) ) diff --git a/R/ta_T3.R b/R/ta_T3.R index 38c40100a..9dbb4589f 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -124,7 +124,6 @@ T3.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -134,7 +133,6 @@ T3.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index bf7b86239..8914c2876 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -124,7 +124,6 @@ TEMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -134,7 +133,6 @@ TEMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index bffa28cca..a694684fa 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -124,7 +124,6 @@ TRIMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -134,7 +133,6 @@ TRIMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_WMA.R b/R/ta_WMA.R index 3de9a8210..bb12febf9 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -124,7 +124,6 @@ WMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -134,7 +133,6 @@ WMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/man/indicator.Rd b/man/indicator.Rd deleted file mode 100644 index 11923377d..000000000 --- a/man/indicator.Rd +++ /dev/null @@ -1,11 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/chart_indicator.R -\name{indicator} -\alias{indicator} -\title{Chart indicators} -\usage{ -indicator(FUN, cols, ...) -} -\description{ -Chart indicators -} From ab0aedd975dc7dfc39cc2715019851d5889d9d7a Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 14 Sep 2025 16:43:10 +0200 Subject: [PATCH 115/166] :hammer: Updated favicons * I dont know why; I was asked by {pkgdown} to do it. --- pkgdown/favicon/apple-touch-icon.png | Bin 17150 -> 17914 bytes pkgdown/favicon/favicon-96x96.png | Bin 6589 -> 6867 bytes pkgdown/favicon/favicon.ico | Bin 15086 -> 15086 bytes pkgdown/favicon/favicon.svg | 2 +- pkgdown/favicon/web-app-manifest-192x192.png | Bin 19082 -> 20225 bytes pkgdown/favicon/web-app-manifest-512x512.png | Bin 105759 -> 110221 bytes 6 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png index a4bd3ec87b2ab8a6f5a57fc3d1aada9832508193..602d20eb8ede1f799e51dcd8512b97845743f70c 100644 GIT binary patch literal 17914 zcmV*)KsCRKP)TtRSF*D3Y^esDN2am~)$R zR>Xjr3{~eG?CI`FJ-ZWnXLoPfyJ_y-xw|{Nv(poLx_$5S{S~MxDxpZw`k&`KP*s1O z`s+V$edkN>_l+B88J1xgmSOGyFn;}KpG~Z6ZT)Z@Fy69rmN90>+Mb?|L_D7@<$0Nu z=Uc=ax2W-}uihQ$by}{{!!A`w{MLg zxHk&I+m>y$jL|)S@v8;FS=!gPtFE{AA9F8WhF^LXX1e%cwnq>`3Ra=0srfsxT>jV6 zzCKC)vuATgddZey83RURW8;MC&p)3j; zVv4m3?B_>e!RietfAHvcVvdtbIc|ki5GGsnYs(lFqp_vsU1?umic}DuRJFDJK50uM z9Kzx-+1eSC=Q_h`juWQZdSHr;tNQU2TUWR)NI}~EL#XTO`VT43UlsTEhGn+2yfxC_ z$1>i~QTgSU?}+5`5DCwpt#0r5*X2i!ednIA1k>huFyN{VT|jFdGn{0H z+tvL~VxHe6?d$Wf0NXN#b&&2W;keZjp8p?3H=DklpIeMsuKo`M(r%Tp?3KEW77H^cvtSnd6GKO@Ji%lYv1xp0so~XC?-f{fbl?Nnf7}8J?EQY8fvLWD&>t5vXdryMMFd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(I8~u@CsALd%dP)ORL)HH%DN2)6 zZPre=Uf>(tsC$-kBqB~%h(D{(~hisGdKxz|f={~wDUhE@k=6juNM002ovPDHLk FV1gA5+O_}y diff --git a/pkgdown/favicon/favicon-96x96.png b/pkgdown/favicon/favicon-96x96.png index 7c220015208212ac44da4819ca5aca4fd7577ce7..fd4cac3c4c4cda63d35a4e95fac5f918e9d2db64 100644 GIT binary patch literal 6867 zcmV;^8Z70BP)>ZFOVCW{^M+7@-oTGZnBx(m)-ZW`;u(l+a$Z2W0Fi}#^1iGrkieP zusIdSdhdJvzq_h_Rp0m3S6_Xlp|Oe+fHfL~-lP>zYlLF4P2s>mZ_&_DXDP#&zQJIH zQpwPeZt=*-nebz${%GX76Q*8)h-qs6J%4nxws>r8(;Fa`DV2|me8?Az^OIWJeqj|F zjg8yc*vMjI1Ir9r`W)CrCq7SYzxgl1@$uvghI#J|5KEM58Rl)_#6)1`ox9K6GV;FB zHnzrwZKjlD0LadD%xvIQAowch{=+f8MB-TstbGH-!qXZ)!*F;{`nm$E4*ZqHb(UB3 zYyePVnL^LO1EDo_e=ZsrY85ez;TsUB~PpDjoZz!fq@zQVjqvGB|JRs#;u>*Mki1{uT<$X08rHfl+THL za7xNRX6K!M5{-{X@P7Eib#H)Bq0b8##*Nq0Gwxj=_(t2KM6 zE*7NfSsk`5d`tI!o!{5@gs8A@#t)OJ@aa>%qLGod(AxUHv20wFDoxMc1Lppr$n5Nb zzJuqY0FaTsqZcBNpZcPBbhN2pWJKp%+Z(cbde#dhlB&4#Ex$9{89ZmDxn<-bwy7Cg z*mjEsK*pvlgCmgCdhORjiKM9Z+oZMXw_QU}^&#k5IwG+00A)R-lF9vuV<+L7o~xvW(q1r!7Nq(b zIiKEh*f93+L-gsU-wQ@Z>t74`Ky+_`SX`XY()yp4yCS7(<2F-R1Vz9xA&njrjmOyC z7Y5GW*vhd-_PuV{MkUaDn@y~d(|sTMj#2?kDk$yxO=ufgE(r@#MOu31u!)R+o^tit z&qd?o>7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T2-*FO+#-};t|A6C`vfa+1l6G39X z5+o_}g=F(nfBNZsQI?NT^jKQD%QAEEcg0yo1%P8{G(RyTV;lfjI`YA#IHAOZX|U-CQ(DUjT_QM=X5x45<^WNkaf)=v+mgW0^G-v3 zr|640A6?+7u|&o$R($fw;)zevz}RY$N&i41=!x^Ks7hYT18F~Z0BiL@R?tb3vBBN6CNE+S;a>7)xo8 zu~6Qq-LO5PhoAGmaQ@v2A}K!R_*~@iAbqec>1fZuEMIew%1LJwFuqab^>E3 zDbgMZ%TkgMvo0 z&}1?c%DbYL<)wlwcThf-lw-}>l!VqV766}h8Q5^DmG5YK?@=sIik{myDX9KCwJ8uO z?15UN`J2Gl%?e5Ko|L)9D658`(QFVH`voQCjM-Mtbwn=;05dWcx%z=}8}v;oF<7PD zE>8m5+4+sY*xw7?a>7fIB$}rmXY6gtD??%)S5J&XUYWTg+=$U;G3SGiIL$W{yp;kw zk^N|l4XCBZ&M-K zDo9cuW!Ee3=s=zjO zAF`SSWaVjfI3qZZ(0fF5Ksy5@h;%&^J)J@e3ljUSAW3!VhYyW6FW3twOP_w~CNkDW zDN@LFg*1@kL4vqL!0L6}6-JPxzlw~Vuk7x2AXWQB|7@cx4YE94WGqI_*bgbO=9;|+ zcz*b?0>F(XN19Nf(GZ=N1z8UJR+F32q{*t#Xeva;eqD0+E|33jDEsPQHesUkWCra~ zAN-24ff%*=z?k#Qi;o{S3ljSyd8GNKWauRj>JI=J(*v^exdlsL?7s!Z_LsiOAOCCx zz?4c^_NNqDYK`WrwB{4K6k5Fi5F>V7nZS)Jf+T$@Fm|m{lH6a>`EeFo)f!Ez$kGoqt|M{rTr}M8>xErcosK7oJX#vGU@( vci(t!U;L_==oM0Xi;SHSWcl66Oy~a}d$po&tdP4{00000NkvXXu0mjf!AF%B diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico index b9612aff2c852ab785d4095c2667ff490566213e..68dd65c00f717460c6744c05b59240f1aa9d8b42 100644 GIT binary patch liter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d&ZPZwmRO(JSHrPYytnvMoJDqu8krR5!u@~eXx=|_EUP(vN!z?!`7Y};A1MUK z%JKQ8wJB!UcSQ2rxYY?c8Y|%|N*&?P>**$nHIE2jzgNL8*nW27M(w`l`pC!fw+qZe z(pK^_&&xXb#qsd*8Xg}yvr`;Qn0PNJiAQ6nE2`JoAuGEF!GT)jrAOf6`Lh4Jd9!x+ zPky4GEzhAGvwQAL$&GxC_Ymv5q;1Yq`7Z15_{;LNBsF&L*CC@c3@t~Cgza|o@kp{i zZ^yc}?L%Z|xD?%pMdO}c`EzQ z<&IWwAS*=&7u)5?Ob9^?-Cz0+=y3N={cj#VGSu^LiYzjlppflOAAMMLw7xR*3CHwL z#NT!0O5q>&_og@x8h?tJ|Kq(ohQkjYG%T2a#Z!G^JJNe63m@`tB24={x<bZBZDq(U`mGN` zGx@uFw`G3sn|lt?Z=3$e;~@6dk+p)~6X`b-{F?~A?^5jhHx%1`fY%o$a{hLGU0Ykt zzt=V%920NPbXd3ee#kM+1w?~w!TkFIy0d^oQpjVtaodsR{76S|Lz_WaKLG=?Uc`n<#*er*>Y5S85YH!3z?E^e*(X=xYniNlHvm)p`<38FC?#syIX6JyG4ey!q zCk$?M56?5igZG|_@^#p-IhW!?N6&DQzw1hSw6vWV)83V2nOz=9u@cTmO>IX(ZUHhg z=aVdkeL1o{_qSXZK8&CHKGJ{27wlm#a7G8X(LKVJ#+>W~iLcYyelGpi=8fTfjOyoR zdW!azWIHU+d5DT|Lkivb+2)gyOm`!?!|^>XHpG!_GEWZlW>=>tx_vF=LNp~U(VpI8 zqSf#q-7D9H(YewOHS1lmD!vk1+SC5^&_PW(>oDsw>vVLm?Ke`svOgYnOGtN@qpT(x z8~5j6`ww#;pT3~q``|(K9B!-p \ No newline at end of file diff --git a/pkgdown/favicon/web-app-manifest-192x192.png b/pkgdown/favicon/web-app-manifest-192x192.png index 5134fd8b8b8e2a9180413479c2b9ddedb1c4ed12..f5ce066d94d7371cc3284c0c5b37432edb73fcbf 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X+o&(- zO>b{sE2^#@Kn3AQ?V5{-Q|VYCOp-}S%Ri@AP0`ysvYWiBp&`sD%WFwxt;l5Z*6sXm buciH8B8P!AkkjMF00000NkvXXu0mjfkj})d diff --git a/pkgdown/favicon/web-app-manifest-512x512.png b/pkgdown/favicon/web-app-manifest-512x512.png index 4e7ba6f6246de794e76d5fb4258dac00a2853ef9..fc39f112650aed44b61236814ff03ebfc0440b68 100644 GIT binary patch literal 110221 zcmZ^KWmJ^k*Y+^f&;v*}NOwqgOG!&eNk~g0Jv2&(bfbWXlt{NoGn90fBaIH7?~T9b z|M5L*vET!1=8kjrzG}bK)>6U4ro;w;KzL786?H)%Fz_cB1i=7)oxJ&Z1^mKtQ#JMk zfpCZ)eo#Q!x#S=aJ?N>Toc^2K{UFRYkDjNWu7%j$pTZMdQU>K=;FJL|L~g1oI0CG; zY@mce&n z)L>{0eu(Sc?--w2J}WGH9!Z@q9R)p;`~R->R@e*nBZ~Z->)YP8wtJ)$JJs?IqNMQO z8Xr%pOExsQ3VFV@y&NkOjq@kyw3w6aVFi*g*p|eZwFW0`pGs$bHwuH#JPJ%=U&{{9d4ERE72)U<;<*2W zzAVY9)loJ!e#`-WhxYF~*aBN8?BCB`f8VyX{j!ux;A1+Y8(*s_jzD-b+)W=}-v=~9 zJB1>S_vH5l$xSx}M%j(cUy~(80yomxIz{&1mlkS2-}BJopVm#+)J|<9tz;AiI9H}@f^|8 zw6*^|#`PR*w7s7>Om|jx(ufHCmtgUcpeLaW5Y_A z_=6{35nwS}+ilmWo36DRvKDBx7lR>rZlcBI)gC`*q4fFN(84j{Cp?(K6O#(K26WWhn@RK!*b#dHT2Un z8P@1+^19))d4b|t=saUXnKNY;eUA4&qp9x!Ye{r`Y7i;U`%PMZMfm)k00(+#Tv!;V zYr&D{Xx*J2qD}w&x?m#0s1l2xUJs&y%T`qQ-!-^|r^S!&_3wA^^g7>5}Y}1`*osyghrxb+W#-wU4Y{n4W`cC2hsq@b0 zsGCZf&}SfTyi4w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|BC@TUfw9!enpVofk8bR!D|oQJqfz4pusm&>+K!eucQA*&^c9IawjB|KQ1ST^J>@CY--1G$pT8z zt2?gkkTLoOS1($J;{$K^DP&Ut`nQ?FX(oJ}xHZVOy71!;e7ZuK(rN~mPETKO* z_~15X(@IBHP2n9sAB9~vn|D!s)SWJTFnl)G5OOe)H{NK~rblsqzke8c3KOYZ#ao~^5GvV&XU>7@3VRoRiSUbo)tc)G$S`nfupa@ z{kz#t_RrWJsj{QZ-q^?bo#s(?jm!871k0znwbR3Ve;wu*rneVcVI;9%$XSoDUn2Ms38Azo|fx8KqaED!d}@q z#yq`OH(Wy-&qGJ0PYhRn@@-}y_J;Q>cY-0-V=PnCHf0vdjXq8TGWs6r@xwI{5V=HC hN_vN1{LH)dJt41^>DO6tWLFUIIN7-)Um*OF{|6pK>+Jvl From 5ba7c76168d5dbd2965ef44266a3147bcb92fb88 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 14 Sep 2025 16:43:47 +0200 Subject: [PATCH 116/166] :books: Updatede Charting documentation * Added placeholder documentation. --- R/chart.R | 10 +++++++++- R/chart_indicator.R | 18 +++++++++++++++++- man/chart.Rd | 16 ++++++++++++++++ man/indicator.Rd | 26 ++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 man/indicator.Rd diff --git a/R/chart.R b/R/chart.R index eaf481ea9..5045406d4 100644 --- a/R/chart.R +++ b/R/chart.R @@ -1,6 +1,14 @@ +#' @export +#' @family Charting +#' @author Serkan Korkmaz +#' #' @title Chart #' -#' @export +#' @param x An OHLC-V object. +#' @param type A [character]. +#' @param ... Parameters passed into [plotly::plot_ly] +#' +#' @family charting chart <- function( x, type = "candlestick", diff --git a/R/chart_indicator.R b/R/chart_indicator.R index a22566d61..2c609a699 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -1,5 +1,21 @@ #' @export -indicator <- function(FUN, cols, ...) { +#' @family Charting +#' @author Serkan Korkmaz +#' +#' @title Indicator +#' +#' @param FUN An indicator function +#' @param cols A formula of variables. +#' @param ... Arguments passed into [model.frame] +#' +#' @description +#' Add an indicator to t +#' +indicator <- function( + FUN, + cols, + ... +) { parent_frame <- parent.frame() ## resolve 'cols' diff --git a/man/chart.Rd b/man/chart.Rd index ca7682466..07dc74657 100644 --- a/man/chart.Rd +++ b/man/chart.Rd @@ -6,6 +6,22 @@ \usage{ chart(x, type = "candlestick", ...) } +\arguments{ +\item{x}{An OHLC-V object.} + +\item{type}{A \link{character}.} + +\item{...}{Parameters passed into \link[plotly:plot_ly]{plotly::plot_ly}} +} \description{ Chart } +\seealso{ +Other Charting: +\code{\link{indicator}()} +} +\author{ +Serkan Korkmaz +} +\concept{Charting} +\concept{charting} diff --git a/man/indicator.Rd b/man/indicator.Rd new file mode 100644 index 000000000..d81140ced --- /dev/null +++ b/man/indicator.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/chart_indicator.R +\name{indicator} +\alias{indicator} +\title{Indicator} +\usage{ +indicator(FUN, cols, ...) +} +\arguments{ +\item{FUN}{An indicator function} + +\item{cols}{A formula of variables.} + +\item{...}{Arguments passed into \link{model.frame}} +} +\description{ +Add an indicator to t +} +\seealso{ +Other Charting: +\code{\link{chart}()} +} +\author{ +Serkan Korkmaz +} +\concept{Charting} From 634cd51069a092bd24ce2f84cb4bc3917434c09a Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:43:17 +0200 Subject: [PATCH 117/166] :hammer: Added NVDA to the {pkg} * This is during the insane bullrun. --- R/NVDA.R | 26 ++++++++++++++++++++++++++ _pkgdown.yml | 3 ++- data-raw/NVDA.R | 37 +++++++++++++++++++++++++++++++++++++ data/NVDA.rda | Bin 0 -> 8657 bytes man/NVDA.Rd | 29 +++++++++++++++++++++++++++++ 5 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 R/NVDA.R create mode 100644 data-raw/NVDA.R create mode 100644 data/NVDA.rda create mode 100644 man/NVDA.Rd diff --git a/R/NVDA.R b/R/NVDA.R new file mode 100644 index 000000000..7bcf96987 --- /dev/null +++ b/R/NVDA.R @@ -0,0 +1,26 @@ +#' @name NVDA +#' @title NVIDIA Corporation (NVDA) +#' +#' @description +#' NVIDIA Corporation (NVDA) in daily intervals between +#' 2022-01-01 and 2023-12-31. +#' +#' @format A [matrix] with 501 rows and 5 columns. +#' +#' \describe{ +#' \item{open}{Candle opening price.} +#' \item{high}{Candle highest price.} +#' \item{low}{Candle lowest price.} +#' \item{close}{Candle closing price.} +#' \item{volume}{Candle volume.} +#' } +#' +#' @references Loaded using [quantmod](https://cran.r-project.org/web//packages//quantmod/index.html) +#' +#' @docType data +#' @keywords datasets +#' +#' @examples +#' ## Load the dataset +#' data(NVDA, package = "talib") +data(NVDA, package = "talib") diff --git a/_pkgdown.yml b/_pkgdown.yml index 481281a45..984eafcb8 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -54,4 +54,5 @@ reference: Preloaded financial data contents: - BTC - - SPY \ No newline at end of file + - SPY + - NVDA \ No newline at end of file diff --git a/data-raw/NVDA.R b/data-raw/NVDA.R new file mode 100644 index 000000000..b068c600a --- /dev/null +++ b/data-raw/NVDA.R @@ -0,0 +1,37 @@ +## script: NVDA +## objective: Generate NVDA +## data for the R package +## using {quantmod} +## +## 0) load data +NVDA <- quantmod::getSymbols( + Symbols = "NVDA", + auto.assign = FALSE, + from = as.Date("2022-01-01"), + to = as.Date("2023-12-31") +)[, 1:5] + +## 1) rename columns +colnames(NVDA) <- c( + "open", + "high", + "low", + "close", + "volume" +) + +## 2) convert to matrix +NVDA <- matrix( + data = NVDA[, 1:5], + ncol = 5, + dimnames = list( + rownames(NVDA), + colnames(NVDA) + ) +) + +## 3) store data +usethis::use_data( + NVDA, + overwrite = TRUE +) diff --git a/data/NVDA.rda b/data/NVDA.rda new file mode 100644 index 0000000000000000000000000000000000000000..4c228f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not edit by hand +% Please edit documentation in R/NVDA.R +\docType{data} +\name{NVDA} +\alias{NVDA} +\title{NVIDIA Corporation (NVDA)} +\format{ +A \link{matrix} with 501 rows and 5 columns. + +\describe{ +\item{open}{Candle opening price.} +\item{high}{Candle highest price.} +\item{low}{Candle lowest price.} +\item{close}{Candle closing price.} +\item{volume}{Candle volume.} +} +} +\description{ +NVIDIA Corporation (NVDA) in daily intervals between +2022-01-01 and 2023-12-31. +} +\examples{ +## Load the dataset +data(NVDA, package = "talib") +} +\references{ +Loaded using \href{https://cran.r-project.org/web//packages//quantmod/index.html}{quantmod} +} +\keyword{datasets} From 79f0f6f16535516e1d3884a3b613ab720b9580f7 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:51:33 +0200 Subject: [PATCH 118/166] :hammer: Streamlined MA-functions * The signatures have been streamlined to avoid check()-fails * MAMA was overly eager in checking data, this has been fixed. --- R/ta_DEMA.R | 4 ++-- R/ta_EMA.R | 4 ++-- R/ta_KAMA.R | 4 ++-- R/ta_MAMA.R | 12 ++---------- R/ta_STOCH.R | 17 ++++++++-------- R/ta_STOCHRSI.R | 52 +++++++++++++++++++++++++++++++++++++------------ R/ta_T3.R | 4 ++-- R/ta_TEMA.R | 4 ++-- R/ta_TRIMA.R | 4 ++-- R/ta_WMA.R | 4 ++-- 10 files changed, 64 insertions(+), 45 deletions(-) diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index e1272e73c..e9ccfcc76 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -95,8 +95,8 @@ DEMA.numeric <- function( #' @export DEMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -109,8 +109,8 @@ DEMA.data.frame <- function( #' @export DEMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 7784d956a..4a8ada3e2 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -94,8 +94,8 @@ EMA.numeric <- function( #' @export EMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -108,8 +108,8 @@ EMA.data.frame <- function( #' @export EMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index cf5795b35..1248d8a79 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -94,8 +94,8 @@ KAMA.numeric <- function( #' @export KAMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -108,8 +108,8 @@ KAMA.data.frame <- function( #' @export KAMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index 36a14064a..f1740cd1d 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -41,12 +41,6 @@ MAMA.default <- function( ## and stop the script ## if conditions are not ## met - if (!is.null(dim(x))) { - stop("`x` must be a numeric vector") - } - assert(is.numeric(x)) - assert(n >= 2) - x <- vapply( as.list(x), FUN = function(x) { @@ -95,8 +89,8 @@ MAMA.numeric <- function( #' @export MAMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -109,8 +103,8 @@ MAMA.data.frame <- function( #' @export MAMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( @@ -125,7 +119,6 @@ MAMA.plotly <- function( x, cols, n = 10, - data, ... ) { ## prepare series @@ -135,7 +128,6 @@ MAMA.plotly <- function( x = x, formula = cols, default = ~open, - data = data, ... ) ) diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index 045bed2e6..f7d019da1 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -21,13 +21,11 @@ stochastic <- function( ) } - #' @usage NULL #' @aliases stochastic #' @export STOCH <- stochastic - #' @usage NULL #' @aliases stochastic #' @export @@ -121,7 +119,6 @@ stochastic.matrix <- function( ) } - #' @usage NULL #' @aliases stochastic #' @export @@ -140,12 +137,14 @@ stochastic.plotly <- function( slowk_ma <- map_maType_call(slowk) slowd_ma <- map_maType_call(slowd) ## construct HLC series - HLC <- as.data.frame(series( - x = x, - formula = cols, - default = ~ high + low + close, - ... - )) + HLC <- as.data.frame( + series( + x = x, + formula = cols, + default = ~ high + low + close, + ... + ) + ) .indicator <- as.data.frame( .Call( diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index a101c54fa..cdb7767bb 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -21,9 +21,13 @@ stochastic_relative_strength_index <- function( ) } +#' @usage NULL +#' @aliases stochastic_relative_strength_index #' @export STOCHRSI <- stochastic_relative_strength_index +#' @usage NULL +#' @aliases stochastic_relative_strength_index #' @export stochastic_relative_strength_index.default <- function( x, @@ -31,6 +35,7 @@ stochastic_relative_strength_index.default <- function( n = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), + na.rm = TRUE, ... ) { fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) @@ -62,7 +67,7 @@ stochastic_relative_strength_index.default <- function( x <- series( x = cols, default = ~RSI, - data = x, + data = if (na.rm) na.omit(x) else x, ... ) @@ -78,7 +83,6 @@ stochastic_relative_strength_index.default <- function( ) } - #' @usage NULL #' @aliases stochastic_relative_strength_index #' @export @@ -122,6 +126,11 @@ stochastic_relative_strength_index.plotly <- function( fast_d_MAtype = SMA(n = 10), ... ) { + ## input arguments + fast_d_MAtype <- map_maType_call( + substitute(fast_d_MAtype) + ) + ## prepare series ## from x <- as.data.frame( @@ -135,29 +144,48 @@ stochastic_relative_strength_index.plotly <- function( ## indicator .indicator <- as.data.frame( - NextMethod() + .Call( + "impl_ta_STOCHRSI", + x[[1]], + as.integer(n), + as.integer(fast_k), + fast_d_MAtype$n, + fast_d_MAtype$maType + ) ) + .indicator$idx <- 1:nrow(.indicator) - rsi_plot <- plotly::plot_ly( - .indicator, + # plot + output <- plotly::plot_ly( + data = .indicator, x = ~idx, y = ~fastk, type = "scatter", mode = "lines", - showlegend = FALSE + name = "StochRSI %K", + legendgroup = "stochrsi", + showlegend = TRUE ) - rsi_plot <- plotly::add_lines( - .indicator, + + output <- plotly::add_lines( + output, x = ~idx, - y = ~fastk, - showlegend = FALSE + y = ~fastd, + name = "StochRSI %D", + legendgroup = "stochrsi", + showlegend = TRUE + ) + + output <- add_title( + x = output, + text = "StochRSI" ) .plotting_environment$sub <- c( .plotting_environment$sub, - list(rsi_plot) + list(output) ) - rsi_plot + output } diff --git a/R/ta_T3.R b/R/ta_T3.R index 9dbb4589f..a272606e1 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -94,8 +94,8 @@ T3.numeric <- function( #' @export T3.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -108,8 +108,8 @@ T3.data.frame <- function( #' @export T3.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index 8914c2876..c1b365d62 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -94,8 +94,8 @@ TEMA.numeric <- function( #' @export TEMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -108,8 +108,8 @@ TEMA.data.frame <- function( #' @export TEMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index a694684fa..9624191f7 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -94,8 +94,8 @@ TRIMA.numeric <- function( #' @export TRIMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -108,8 +108,8 @@ TRIMA.data.frame <- function( #' @export TRIMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( diff --git a/R/ta_WMA.R b/R/ta_WMA.R index bb12febf9..8588e9db3 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -94,8 +94,8 @@ WMA.numeric <- function( #' @export WMA.data.frame <- function( x, - n = 10, cols, + n = 10, ... ) { as.data.frame( @@ -108,8 +108,8 @@ WMA.data.frame <- function( #' @export WMA.matrix <- function( x, - n = 10, cols, + n = 10, ... ) { as.matrix( From 32afd62f5c20df6afb378050c9b073a38696fe0d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:53:26 +0200 Subject: [PATCH 119/166] :hammer: Updated Image * An error in my system prevented the {plotly}-objects to be screenshotted properly. --- man/figures/README-charting-1.png | Bin 13371 -> 149520 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png index 259b40fe2f675b286898f9be2a12717552a2af38..19ffaae870d00f6e4a7d390bc094a8e98cfb84f2 100644 GIT binary patch literal 149520 zcmc$_1ymecv@J@6ctQl%Bs6Zp9g+ZnMuWS%6Wk%m0S*q0dvJFeLN}J+?k*kNy>a`S zlau@Y828=x{vH4Q@oSKg>ZGe`*WPQ-HRoIl|Buq5j~@^|z`($G3>6cW!@#(`fq`-B zuX}gEzdRQy;sbx(w-Hmd!@zj>;`+}GjQB)+42+i;P~mq9&WRh-ruI|Ho=Zo|+HN=x z+;s2WcuM!q=7y6TwutP|$n#+sVtDh=v1ONF@&zyHWCVdsNN*5-TvIzbuxYsqx~Dg{ z+O#!hg`C{9%7sg0eBb_cCv5EAm!>)^S`HIZ|{Luxjwvazt_3@`xNr@ChzaFm!F@G z-S~Za|F4E8zt6;8-gf+b_V(thl3Tw|pWpjGf6KoO;k+gBl@^n^4(ps|wzluLFVWjE z8QpkVr@pqf`wrQ)QdFU2;kx*)Cq&lN+!WvwiIR-dGK{ZBIjLQb+RH7xYlMm@&6Geo zc=Tv(r27ZO7QsKmZP+_iyX#2z!+?c`ok7T`T(zBsW^Gk#;&A`rh{@GMruFmj2s2A7 zjfoazSv9C{z+sUh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`=%jaIl1x}p`|!22A={pG z1qmss{PGAL9k+XC_i_kEP{dAATCAW#{WtC`mBF${x%sfheIk3B@r%~1OibGAL7P<1 z02C+s8{{GK*A}U26j!_`H`_quI5?01BVRmz8{#~bSb9b{aYq61PZrqk*wh#Z_4 z`zo{vzq6?y5=5TdF9}=I)ip#;d&FOXI*D($P23q)d(4N9FkDrEidRR21!osi*$!kp zXrCnQG^|CeW)MLSnggf;&qSSY0o^dQM*}^5IM_xIN)LcQF(ol0gL!luG-75oMu9W$ zJyE++fMpr!CiKxk>y>qlCw=(WV4`v%klISY0Lq9QfOg0YS-umQ_@x`Opp=?G-x=%A zaVc1^lKJ(C#Lr%KWPI$(Xiw-as`b Date: Thu, 18 Sep 2025 20:54:07 +0200 Subject: [PATCH 120/166] :fire: New feature: Ultimate Oscillator * The indicator generally needs some refinements. But it works at the moment. --- NAMESPACE | 4 + R/ta_ULTOSC.R | 144 ++++++++++++++++++++++++++++---- man/ultimate_oscillator.Rd | 60 ++++++++++++- tests/testthat/test-ta_ULTOSC.R | 55 ++++++++++++ 4 files changed, 243 insertions(+), 20 deletions(-) create mode 100644 tests/testthat/test-ta_ULTOSC.R diff --git a/NAMESPACE b/NAMESPACE index 5c1d332e4..11533e3fe 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -101,7 +101,10 @@ S3method(stochastic_relative_strength_index,data.frame) S3method(stochastic_relative_strength_index,default) S3method(stochastic_relative_strength_index,matrix) S3method(stochastic_relative_strength_index,plotly) +S3method(ultimate_oscillator,data.frame) S3method(ultimate_oscillator,default) +S3method(ultimate_oscillator,matrix) +S3method(ultimate_oscillator,plotly) export(ACCBANDS) export(AD) export(ADOSC) @@ -128,6 +131,7 @@ export(T3) export(T3_moving_average) export(TEMA) export(TRIMA) +export(ULTOSC) export(WMA) export(acceleration_bands) export(aroon) diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R index 0b2952fbc..7dbf5485c 100644 --- a/R/ta_ULTOSC.R +++ b/R/ta_ULTOSC.R @@ -1,14 +1,37 @@ -#' @title Ultimate Oscillator -#' @family Momentum Indicator #' @export -ultimate_oscillator <- function(x, n = c(7, 14, 28), ...) { +#' @family Momentum Indicator +#' @title Ultimate Oscillator +#' +#' @templateVar .title Ultimate Oscillator +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ultimate_oscillator +#' +#' @template description +ultimate_oscillator <- function( + x, + cols, + n = c(7, 14, 28), + ... +) { UseMethod( "ultimate_oscillator" ) } +#' @rdname ultimate_oscillator +#' @usage NULL #' @export -ultimate_oscillator.default <- function(x, n = c(7, 14, 28), ...) { +ULTOSC <- ultimate_oscillator + +#' @rdname ultimate_oscillator +#' @usage NULL +#' @export +ultimate_oscillator.default <- function( + x, + cols, + n = c(7, 14, 28), + ... +) { ## default behaviour is to ## coerce to a `matrix` check that ## it is double and then pass to @@ -18,24 +41,109 @@ ultimate_oscillator.default <- function(x, n = c(7, 14, 28), ...) { ## and stop the script ## if conditions are not ## met - if (!is.matrix(x)) { - x <- as.matrix(x) - } - if (!length(n) < 3) { + if (!length(n) == 3) { stop("`n` has to be a vector of length 3") } - assert(is.numeric(x)) - assert(all(n >= 1)) + + HLC <- series( + x = cols, + default = ~ high + low + close, + data = x, + ... + ) ## 1) pass `x` assuming that it ## follows OHLC-V structure - .Call( - .NAME = "impl_ta_ULTOSC", - .high(x), - .low(x), - .close(x), - as.integer(n[1]), - as.integer(n[2]), - as.integer(n[3]), + x <- as.data.frame( + .Call( + "impl_ta_ULTOSC", + x[[1]], + x[[2]], + x[[3]], + as.integer(n[1]), + as.integer(n[2]), + as.integer(n[3]) + ) + ) + + colnames(x) <- "utimate_oscillator" + + return(x) +} + +#' @rdname ultimate_oscillator +#' @usage NULL +#' @export +ultimate_oscillator.data.frame <- function( + x, + cols, + n = c(7, 14, 28), + ... +) { + as.data.frame( + NextMethod() ) } + +#' @rdname ultimate_oscillator +#' @usage NULL +#' @export +ultimate_oscillator.matrix <- function( + x, + cols, + n = c(7, 14, 28), + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @rdname ultimate_oscillator +#' @usage NULL +#' @export +ultimate_oscillator.plotly <- function( + x, + cols, + n = c(7, 14, 28), + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~ high + low + close, + ... + ) + ) + + ## indicator + .indicator <- as.data.frame(NextMethod()) + .indicator$idx <- 1:nrow(.indicator) + + # plot + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~utimate_oscillator, + type = "scatter", + mode = "lines", + name = "StochRSI %K", + legendgroup = "ultimate_oscillator", + showlegend = TRUE + ) + + output <- add_title( + x = output, + text = "Ultimate Oscillator" + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index 7cc175133..bbb64e45f 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -2,12 +2,61 @@ % Please edit documentation in R/ta_ULTOSC.R \name{ultimate_oscillator} \alias{ultimate_oscillator} +\alias{ULTOSC} +\alias{ultimate_oscillator.default} +\alias{ultimate_oscillator.data.frame} +\alias{ultimate_oscillator.matrix} +\alias{ultimate_oscillator.plotly} \title{Ultimate Oscillator} \usage{ -ultimate_oscillator(x, n = c(7, 14, 28), ...) +ultimate_oscillator(x, cols, n = c(7, 14, 28), ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} } \description{ -Ultimate Oscillator +The \code{ultimate_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ultimate_oscillator(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ultimate_oscillator() + ) +} } \seealso{ Other Momentum Indicator: @@ -19,4 +68,11 @@ Other Momentum Indicator: \code{\link{stochastic}()}, \code{\link{stochastic_relative_strength_index}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/tests/testthat/test-ta_ULTOSC.R b/tests/testthat/test-ta_ULTOSC.R new file mode 100644 index 000000000..69ce2dc75 --- /dev/null +++ b/tests/testthat/test-ta_ULTOSC.R @@ -0,0 +1,55 @@ +## script: AD +## author: Serkan Korkmaz +testthat::test_that(desc = "Ultimate Oscillator", code = { + ## 1) calculate values + ## with and without alias + output <- ultimate_oscillator(SPY) + alias <- ULTOSC(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(ultimate_oscillator()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(ultimate_oscillator(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(ultimate_oscillator(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = ultimate_oscillator( + BTC + ), + expected = ultimate_oscillator( + BTC, + cols = ~ high + low + close + ) + ) +}) From 5b846fed0ab4f7777286fa9795f08987be40f651 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 18 Sep 2025 20:57:27 +0200 Subject: [PATCH 121/166] :hammer: Updated MAMA * Added alias as 'mesa_adaptive_moving_average' * Added unit-tests --- NAMESPACE | 1 + R/ta_MAMA.R | 7 +++- man/MAMA.Rd | 1 + tests/testthat/test-ta_MAMA.R | 60 +++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/test-ta_MAMA.R diff --git a/NAMESPACE b/NAMESPACE index 11533e3fe..d4428379d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -155,6 +155,7 @@ export(ht_trendline) export(ht_trendmode) export(indicator) export(kaufmans_adaptive_moving_average) +export(mesa_adaptive_moving_average) export(moving_average_convergence_divergence) export(relative_strength_index) export(simple_moving_average) diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index f1740cd1d..1a0edf539 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -16,6 +16,11 @@ MAMA <- function( UseMethod("MAMA") } +#' @rdname MAMA +#' @usage NULL +#' @export +mesa_adaptive_moving_average <- MAMA + #' @rdname MAMA #' @usage NULL #' @export @@ -69,7 +74,7 @@ MAMA.numeric <- function( n = 10, ... ) { - if (!is.missing(cols)) { + if (!missing(cols)) { warning( "'cols' have been passed but is unused in for vectors" ) diff --git a/man/MAMA.Rd b/man/MAMA.Rd index ac645f4ed..eaf5f2226 100644 --- a/man/MAMA.Rd +++ b/man/MAMA.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_MAMA.R \name{MAMA} \alias{MAMA} +\alias{mesa_adaptive_moving_average} \alias{MAMA.default} \alias{MAMA.numeric} \alias{MAMA.data.frame} diff --git a/tests/testthat/test-ta_MAMA.R b/tests/testthat/test-ta_MAMA.R new file mode 100644 index 000000000..439e2d0ed --- /dev/null +++ b/tests/testthat/test-ta_MAMA.R @@ -0,0 +1,60 @@ +## script: Mesa Adaptive Moving Average (MAMA) +## author: Serkan Korkmaz +testthat::test_that(desc = "Mesa Adaptive Moving Average (MAMA)", code = { + ## 1) calculate values + ## with and without alias + output <- mesa_adaptive_moving_average(SPY) + alias <- MAMA(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(mesa_adaptive_moving_average()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(mesa_adaptive_moving_average(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(mesa_adaptive_moving_average(BTC), class(BTC)) + ) + + ## 3.3) vectors + testthat::expect_true( + is.vector(mesa_adaptive_moving_average(BTC[, 1])) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = mesa_adaptive_moving_average( + BTC + ), + expected = mesa_adaptive_moving_average( + BTC, + cols = ~open + ) + ) +}) From 40c456a5a3c5c4f610d0df31f4a88a193462c8d0 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:59:10 +0200 Subject: [PATCH 122/166] :hammer: Added TA-Lib init/close * These are ESSENTIAL for stuff to actually work.... --- R/zzz.R | 14 ++++++++++++-- src/api.h | 1 + src/init.c | 1 + src/lib.c | 31 +++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/lib.c diff --git a/R/zzz.R b/R/zzz.R index e96f1a082..60ae60494 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -12,11 +12,21 @@ libname, pkgname, ... -) {} +) { + .Call( + "initialize_ta_lib", + PACKAGE = pkgname + ) +} .onDetach <- function( libpath, ... -) {} +) { + .Call( + "shutdown_ta_lib", + PACKAGE = "talib" + ) +} # script end; diff --git a/src/api.h b/src/api.h index 64679f095..c933adda0 100644 --- a/src/api.h +++ b/src/api.h @@ -38,6 +38,7 @@ SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fas SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype); SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3); +SEXP initialize_ta_lib(void); // clang-format on #endif //_API_H diff --git a/src/init.c b/src/init.c index ff0375e96..fe2f97d7d 100644 --- a/src/init.c +++ b/src/init.c @@ -43,4 +43,5 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_STOCHRSI, 5), CALLDEF(impl_ta_STOCH, 8), CALLDEF(impl_ta_ULTOSC, 6), + CALLDEF(initialize_ta_lib, 1), {NULL, NULL, 0}}; diff --git a/src/lib.c b/src/lib.c new file mode 100644 index 000000000..5df3b82bc --- /dev/null +++ b/src/lib.c @@ -0,0 +1,31 @@ +// TA-Lib specific options +// +#include "lib.h" +#include "shift.h" +#include +#include +#include + +// initialize TA-Lib +SEXP initialize_ta_lib(void) { + TA_RetCode return_code = TA_Initialize(); + + if (return_code != TA_SUCCESS) { + Rf_error("TA_Initialize failed (code %d)", return_code); + } + + TA_RestoreCandleDefaultSettings(TA_AllCandleSettings); + + return ScalarLogical(1); +} + +// shutdown TA-Lib +SEXP shutdown_ta_lib(void) { + TA_RetCode return_code = TA_Shutdown(); + + if (return_code != TA_SUCCESS) { + Rf_error("TA_Shutdown failed (code %d)", return_code); + } + + return ScalarLogical(1); +} \ No newline at end of file From 346859dccbe82196005b80ac33b0462f261667ac Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:59:35 +0200 Subject: [PATCH 123/166] :hammer: Bugfix * Fixed the call to the underlying code. --- R/ta_CDLDOJISTAR.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index dfe370307..1afa13f0b 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -13,7 +13,7 @@ CDLDOJISTAR <- doji_star #' @export doji_star.default <- function(x, ...) { .Call( - "impl_ta_CDLDOJISTAR", + "impl_ta_CDLDOJISTARSTAR", .open(x), .high(x), .low(x), From e65feb82024d5447c223d3337184d143acd1d691 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 19 Sep 2025 05:32:47 +0200 Subject: [PATCH 124/166] :hammer: Streamlined Patterns * Each pattern recognition function now follows the rest of the api. --- NAMESPACE | 8 +++ R/ta_CDLDOJI.R | 122 ++++++++++++++++++++++++++++++++---- R/ta_CDLDOJISTAR.R | 122 ++++++++++++++++++++++++++++++++---- R/ta_CDLDRAGONFLYDOJI.R | 122 ++++++++++++++++++++++++++++++++---- R/ta_CDLEVENINGDOJISTAR.R | 128 ++++++++++++++++++++++++++++++++++---- man/doji.Rd | 60 +++++++++++++++++- man/doji_star.Rd | 60 +++++++++++++++++- man/dragonfly_doji.Rd | 60 +++++++++++++++++- man/evening_doji_star.Rd | 60 +++++++++++++++++- 9 files changed, 689 insertions(+), 53 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index d4428379d..6daeaf57f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -71,10 +71,18 @@ S3method(chaikin_AD_oscillator,default) S3method(chaikin_AD_oscillator,matrix) S3method(chaikin_AD_oscillator,plotly) S3method(chart,default) +S3method(doji,data.frame) S3method(doji,default) +S3method(doji,matrix) +S3method(doji_star,data.frame) S3method(doji_star,default) +S3method(doji_star,matrix) +S3method(dragonfly_doji,data.frame) S3method(dragonfly_doji,default) +S3method(dragonfly_doji,matrix) +S3method(evening_doji_star,data.frame) S3method(evening_doji_star,default) +S3method(evening_doji_star,matrix) S3method(fast_stochastic,data.frame) S3method(fast_stochastic,default) S3method(fast_stochastic,matrix) diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index ba147967c..864a6c7e8 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -1,23 +1,123 @@ -#' @title Doji -#' @family Pattern Recognition #' @export -doji <- function(x, ...) { +#' @family Pattern Recognition +#' +#' @title Doji +#' +#' @templateVar .title Doji +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun doji +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{doji}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +doji <- function( + x, + cols, + ... +) { UseMethod( "doji" ) } +#' @usage NULL +#' @aliases doji #' @export CDLDOJI <- doji +#' @usage NULL +#' @aliases doji +#' @export +doji.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLDOJI", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "doji" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases doji +#' @export +doji.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases doji #' @export -doji.default <- function(x, ...) { - .Call( - "impl_ta_CDLDOJI", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) +doji.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index 1afa13f0b..76285cf40 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -1,23 +1,123 @@ -#' @title Doji Star -#' @family Pattern Recognition #' @export -doji_star <- function(x, ...) { +#' @family Pattern Recognition +#' +#' @title Doji Star +#' +#' @templateVar .title Doji Star +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun doji_star +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{doji_star}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +doji_star <- function( + x, + cols, + ... +) { UseMethod( "doji_star" ) } +#' @usage NULL +#' @aliases doji_star #' @export CDLDOJISTAR <- doji_star +#' @usage NULL +#' @aliases doji_star +#' @export +doji_star.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLDOJISTAR", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "doji_star" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases doji_star +#' @export +doji_star.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases doji_star #' @export -doji_star.default <- function(x, ...) { - .Call( - "impl_ta_CDLDOJISTARSTAR", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) +doji_star.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index 95b0d79f2..96f138062 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -1,23 +1,123 @@ -#' @title Dragonfly Doji -#' @family Pattern Recognition #' @export -dragonfly_doji <- function(x, ...) { +#' @family Pattern Recognition +#' +#' @title Dragonfly Doji +#' +#' @templateVar .title Dragonfly Doji +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun dragonfly_doji +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{dragonfly_doji}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +dragonfly_doji <- function( + x, + cols, + ... +) { UseMethod( "dragonfly_doji" ) } +#' @usage NULL +#' @aliases dragonfly_doji #' @export CDLDRAGONFLYDOJI <- dragonfly_doji +#' @usage NULL +#' @aliases dragonfly_doji +#' @export +dragonfly_doji.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLDRAGONFLYDOJI", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "dragonfly_doji" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases dragonfly_doji +#' @export +dragonfly_doji.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases dragonfly_doji #' @export -dragonfly_doji.default <- function(x, ...) { - .Call( - "impl_ta_CDLDRAGONFLYDOJI", - .open(x), - .high(x), - .low(x), - .close(x), - as.logical(getOption("talib.normalize", TRUE)) +dragonfly_doji.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index 234b062d8..df12ede29 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -1,24 +1,128 @@ -#' @title Evening Doji Star -#' @family Pattern Recognition #' @export -evening_doji_star <- function(x, penetration = 0.1, ...) { +#' @family Pattern Recognition +#' +#' @title Evening Doji Star +#' +#' @templateVar .title Evening Doji Star +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun evening_doji_star +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{evening_doji_star}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +evening_doji_star <- function( + x, + cols, + penetration = 0.1, + ... +) { UseMethod( "evening_doji_star" ) } +#' @usage NULL +#' @aliases evening_doji_star #' @export CDLEVENINGDOJISTAR <- evening_doji_star +#' @usage NULL +#' @aliases evening_doji_star +#' @export +evening_doji_star.default <- function( + x, + cols, + penetration = 0.1, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLEVENINGDOJISTAR", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + penetration, + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "evening_doji_star" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases evening_doji_star +#' @export +evening_doji_star.data.frame <- function( + x, + cols, + penetration = 0.1, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases evening_doji_star #' @export -evening_doji_star.default <- function(x, penetration = 0.1, ...) { - .Call( - "impl_ta_CDLEVENINGDOJISTAR", - .open(x), - .high(x), - .low(x), - .close(x), - penetration, - as.logical(getOption("talib.normalize", TRUE)) +evening_doji_star.matrix <- function( + x, + cols, + penetration = 0.1, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/man/doji.Rd b/man/doji.Rd index 67c7e0e45..38dc44b07 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -4,10 +4,59 @@ \alias{doji} \title{Doji} \usage{ -doji(x, ...) +doji(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{doji}{1 for bullish, -1 for bearish and 0 for no pattern} +} } \description{ -Doji +The \code{doji()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::doji(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::doji() + ) +} } \seealso{ Other Pattern Recognition: @@ -15,4 +64,11 @@ Other Pattern Recognition: \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()} } +\author{ +Serkan Korkmaz +} \concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/doji_star.Rd b/man/doji_star.Rd index 72e2ba3d5..9ed001fa3 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -4,10 +4,59 @@ \alias{doji_star} \title{Doji Star} \usage{ -doji_star(x, ...) +doji_star(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{doji_star}{1 for bullish, -1 for bearish and 0 for no pattern} +} } \description{ -Doji Star +The \code{doji_star()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::doji_star(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::doji_star() + ) +} } \seealso{ Other Pattern Recognition: @@ -15,4 +64,11 @@ Other Pattern Recognition: \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()} } +\author{ +Serkan Korkmaz +} \concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index cc3354399..c4b0e390b 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -4,10 +4,59 @@ \alias{dragonfly_doji} \title{Dragonfly Doji} \usage{ -dragonfly_doji(x, ...) +dragonfly_doji(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{dragonfly_doji}{1 for bullish, -1 for bearish and 0 for no pattern} +} } \description{ -Dragonfly Doji +The \code{dragonfly_doji()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::dragonfly_doji(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::dragonfly_doji() + ) +} } \seealso{ Other Pattern Recognition: @@ -15,4 +64,11 @@ Other Pattern Recognition: \code{\link{doji_star}()}, \code{\link{evening_doji_star}()} } +\author{ +Serkan Korkmaz +} \concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 92e20fd3f..44e68f901 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -4,10 +4,59 @@ \alias{evening_doji_star} \title{Evening Doji Star} \usage{ -evening_doji_star(x, penetration = 0.1, ...) +evening_doji_star(x, cols, penetration = 0.1, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{evening_doji_star}{1 for bullish, -1 for bearish and 0 for no pattern} +} } \description{ -Evening Doji Star +The \code{evening_doji_star()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::evening_doji_star(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::evening_doji_star() + ) +} } \seealso{ Other Pattern Recognition: @@ -15,4 +64,11 @@ Other Pattern Recognition: \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()} } +\author{ +Serkan Korkmaz +} \concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} From 8b29a3dfdfd6e3ecf3d018d912dfb47504bca786 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 19 Sep 2025 05:33:37 +0200 Subject: [PATCH 125/166] :hammer: Updated zzz * TA-Lib is now initialized if called as pkg$foo. --- R/zzz.R | 21 +++++++++++++++++++++ src/api.h | 1 + src/init.c | 1 + 3 files changed, 23 insertions(+) diff --git a/R/zzz.R b/R/zzz.R index 60ae60494..cd40da212 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -19,6 +19,17 @@ ) } +.onLoad <- function( + libname, + pkgname, + ... +) { + .Call( + "initialize_ta_lib", + PACKAGE = pkgname + ) +} + .onDetach <- function( libpath, ... @@ -29,4 +40,14 @@ ) } +.onUnload <- function( + libpath, + ... +) { + .Call( + "shutdown_ta_lib", + PACKAGE = "talib" + ) +} + # script end; diff --git a/src/api.h b/src/api.h index c933adda0..ea833f7b0 100644 --- a/src/api.h +++ b/src/api.h @@ -39,6 +39,7 @@ SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_ SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype); SEXP impl_ta_ULTOSC(SEXP high, SEXP low, SEXP close, SEXP timeperiod1, SEXP timeperiod2, SEXP timeperiod3); SEXP initialize_ta_lib(void); +SEXP shutdown_ta_lib(void); // clang-format on #endif //_API_H diff --git a/src/init.c b/src/init.c index fe2f97d7d..77f08f309 100644 --- a/src/init.c +++ b/src/init.c @@ -44,4 +44,5 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_STOCH, 8), CALLDEF(impl_ta_ULTOSC, 6), CALLDEF(initialize_ta_lib, 1), + CALLDEF(shutdown_ta_lib, 1), {NULL, NULL, 0}}; From 3cc7d8dd3be4cb3c023798c472da4f1fbbc9917a Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 19 Sep 2025 18:15:36 +0200 Subject: [PATCH 126/166] :rocket: Remaining Patterns Added * two_crows, three_black_crows and three_inside have been added to the mix. - From here we just need a decent plotly-method, and then we can start on the rest. --- NAMESPACE | 15 +++++ R/ta_CDL2CROWS.R | 123 +++++++++++++++++++++++++++++++++++++++ R/ta_CDL3BLACKCROWS.R | 123 +++++++++++++++++++++++++++++++++++++++ R/ta_CDL3INSIDE.R | 123 +++++++++++++++++++++++++++++++++++++++ man/doji.Rd | 5 +- man/doji_star.Rd | 5 +- man/dragonfly_doji.Rd | 5 +- man/evening_doji_star.Rd | 5 +- man/three_black_crows.Rd | 77 ++++++++++++++++++++++++ man/three_inside.Rd | 77 ++++++++++++++++++++++++ man/two_crows.Rd | 77 ++++++++++++++++++++++++ 11 files changed, 631 insertions(+), 4 deletions(-) create mode 100644 R/ta_CDL2CROWS.R create mode 100644 R/ta_CDL3BLACKCROWS.R create mode 100644 R/ta_CDL3INSIDE.R create mode 100644 man/three_black_crows.Rd create mode 100644 man/three_inside.Rd create mode 100644 man/two_crows.Rd diff --git a/NAMESPACE b/NAMESPACE index 6daeaf57f..678789ab8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -109,6 +109,15 @@ S3method(stochastic_relative_strength_index,data.frame) S3method(stochastic_relative_strength_index,default) S3method(stochastic_relative_strength_index,matrix) S3method(stochastic_relative_strength_index,plotly) +S3method(three_black_crows,data.frame) +S3method(three_black_crows,default) +S3method(three_black_crows,matrix) +S3method(three_inside,data.frame) +S3method(three_inside,default) +S3method(three_inside,matrix) +S3method(two_crows,data.frame) +S3method(two_crows,default) +S3method(two_crows,matrix) S3method(ultimate_oscillator,data.frame) S3method(ultimate_oscillator,default) S3method(ultimate_oscillator,matrix) @@ -119,6 +128,9 @@ export(ADOSC) export(AROON) export(AROONOSC) export(BBANDS) +export(CDL2CROWS) +export(CDL3BLACKCROWS) +export(CDL3INSIDE) export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) @@ -169,8 +181,11 @@ export(relative_strength_index) export(simple_moving_average) export(stochastic) export(stochastic_relative_strength_index) +export(three_black_crows) +export(three_inside) export(triangular_moving_average) export(triple_exponential_moving_average) +export(two_crows) export(ultimate_oscillator) export(weighted_moving_average) useDynLib(talib, .registration = TRUE) diff --git a/R/ta_CDL2CROWS.R b/R/ta_CDL2CROWS.R new file mode 100644 index 000000000..54020d690 --- /dev/null +++ b/R/ta_CDL2CROWS.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Two Crows +#' +#' @templateVar .title Two Crows +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun two_crows +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{two_crows}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +two_crows <- function( + x, + cols, + ... +) { + UseMethod( + "two_crows" + ) +} + +#' @usage NULL +#' @aliases two_crows +#' @export +CDL2CROWS <- two_crows + +#' @usage NULL +#' @aliases two_crows +#' @export +two_crows.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL2CROWS", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "two_crows" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases two_crows +#' @export +two_crows.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases two_crows +#' @export +two_crows.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDL3BLACKCROWS.R b/R/ta_CDL3BLACKCROWS.R new file mode 100644 index 000000000..49b84c7c6 --- /dev/null +++ b/R/ta_CDL3BLACKCROWS.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Three Black Crows +#' +#' @templateVar .title Three Black Crows +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun three_black_crows +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{three_black_crows}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +three_black_crows <- function( + x, + cols, + ... +) { + UseMethod( + "three_black_crows" + ) +} + +#' @usage NULL +#' @aliases three_black_crows +#' @export +CDL3BLACKCROWS <- three_black_crows + +#' @usage NULL +#' @aliases three_black_crows +#' @export +three_black_crows.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL3BLACKCROWS", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "three_black_crows" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases three_black_crows +#' @export +three_black_crows.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases three_black_crows +#' @export +three_black_crows.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDL3INSIDE.R b/R/ta_CDL3INSIDE.R new file mode 100644 index 000000000..33a0f8b3b --- /dev/null +++ b/R/ta_CDL3INSIDE.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Three Inside +#' +#' @templateVar .title Three Inside +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun three_inside +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{three_inside}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +three_inside <- function( + x, + cols, + ... +) { + UseMethod( + "three_inside" + ) +} + +#' @usage NULL +#' @aliases three_inside +#' @export +CDL3INSIDE <- three_inside + +#' @usage NULL +#' @aliases three_inside +#' @export +three_inside.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL3INSIDE", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "three_inside" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases three_inside +#' @export +three_inside.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases three_inside +#' @export +three_inside.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/man/doji.Rd b/man/doji.Rd index 38dc44b07..4caccf2a2 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -62,7 +62,10 @@ tail(output) Other Pattern Recognition: \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, -\code{\link{evening_doji_star}()} +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{two_crows}()} } \author{ Serkan Korkmaz diff --git a/man/doji_star.Rd b/man/doji_star.Rd index 9ed001fa3..0a13eb1d2 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -62,7 +62,10 @@ tail(output) Other Pattern Recognition: \code{\link{doji}()}, \code{\link{dragonfly_doji}()}, -\code{\link{evening_doji_star}()} +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{two_crows}()} } \author{ Serkan Korkmaz diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index c4b0e390b..d75f474f1 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -62,7 +62,10 @@ tail(output) Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, -\code{\link{evening_doji_star}()} +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{two_crows}()} } \author{ Serkan Korkmaz diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 44e68f901..7b16d5824 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -62,7 +62,10 @@ tail(output) Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, -\code{\link{dragonfly_doji}()} +\code{\link{dragonfly_doji}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{two_crows}()} } \author{ Serkan Korkmaz diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd new file mode 100644 index 000000000..ed88c017e --- /dev/null +++ b/man/three_black_crows.Rd @@ -0,0 +1,77 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL3BLACKCROWS.R +\name{three_black_crows} +\alias{three_black_crows} +\title{Three Black Crows} +\usage{ +three_black_crows(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{three_black_crows}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{three_black_crows()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::three_black_crows(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::three_black_crows() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_inside}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/three_inside.Rd b/man/three_inside.Rd new file mode 100644 index 000000000..32ac7de80 --- /dev/null +++ b/man/three_inside.Rd @@ -0,0 +1,77 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL3INSIDE.R +\name{three_inside} +\alias{three_inside} +\title{Three Inside} +\usage{ +three_inside(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{three_inside}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{three_inside()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::three_inside(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::three_inside() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/two_crows.Rd b/man/two_crows.Rd new file mode 100644 index 000000000..367028ebe --- /dev/null +++ b/man/two_crows.Rd @@ -0,0 +1,77 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL2CROWS.R +\name{two_crows} +\alias{two_crows} +\title{Two Crows} +\usage{ +two_crows(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{two_crows}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{two_crows()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::two_crows(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::two_crows() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} From d4df24008e62b67a70fe61e49e1efe4e23e948ac Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 20 Sep 2025 07:52:36 +0200 Subject: [PATCH 127/166] :hammer: Added new indicators * CCI and CMO * Updated unit-tests and documentation --- NAMESPACE | 13 ++ R/ta_CCI.R | 187 ++++++++++++++++ R/ta_CMO.R | 222 +++++++++++++++++++ man/aroon.Rd | 2 + man/aroon_oscillator.Rd | 2 + man/chande_momentum_oscillator.Rd | 75 +++++++ man/commodity_channel_index.Rd | 75 +++++++ man/fast_stochastic.Rd | 2 + man/moving_average_convergence_divergence.Rd | 2 + man/relative_strength_index.Rd | 2 + man/stochastic.Rd | 2 + man/stochastic_relative_strength_index.Rd | 2 + man/ultimate_oscillator.Rd | 2 + tests/testthat/test-ta_CCI.R | 55 +++++ tests/testthat/test-ta_CMO.R | 55 +++++ 15 files changed, 698 insertions(+) create mode 100644 R/ta_CCI.R create mode 100644 R/ta_CMO.R create mode 100644 man/chande_momentum_oscillator.Rd create mode 100644 man/commodity_channel_index.Rd create mode 100644 tests/testthat/test-ta_CCI.R create mode 100644 tests/testthat/test-ta_CMO.R diff --git a/NAMESPACE b/NAMESPACE index 678789ab8..82b80fb5a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -70,7 +70,16 @@ S3method(chaikin_AD_oscillator,data.frame) S3method(chaikin_AD_oscillator,default) S3method(chaikin_AD_oscillator,matrix) S3method(chaikin_AD_oscillator,plotly) +S3method(chande_momentum_oscillator,data.frame) +S3method(chande_momentum_oscillator,default) +S3method(chande_momentum_oscillator,matrix) +S3method(chande_momentum_oscillator,numeric) +S3method(chande_momentum_oscillator,plotly) S3method(chart,default) +S3method(commodity_channel_index,data.frame) +S3method(commodity_channel_index,default) +S3method(commodity_channel_index,matrix) +S3method(commodity_channel_index,plotly) S3method(doji,data.frame) S3method(doji,default) S3method(doji,matrix) @@ -128,6 +137,7 @@ export(ADOSC) export(AROON) export(AROONOSC) export(BBANDS) +export(CCI) export(CDL2CROWS) export(CDL3BLACKCROWS) export(CDL3INSIDE) @@ -135,6 +145,7 @@ export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) export(CDLEVENINGDOJISTAR) +export(CMO) export(DEMA) export(EMA) export(KAMA) @@ -159,7 +170,9 @@ export(aroon_oscillator) export(bollinger_bands) export(chaikin_AD_line) export(chaikin_AD_oscillator) +export(chande_momentum_oscillator) export(chart) +export(commodity_channel_index) export(doji) export(doji_star) export(double_exponential_moving_average) diff --git a/R/ta_CCI.R b/R/ta_CCI.R new file mode 100644 index 000000000..f7321cf99 --- /dev/null +++ b/R/ta_CCI.R @@ -0,0 +1,187 @@ +#' @export +#' @family Momentum Indicator +#' +#' @title Commodity Channel Index +#' +#' @templateVar .title Commodity Channel Index +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun commodity_channel_index +#' +#' @template description +commodity_channel_index <- function( + x, + cols, + n = 10, + ... +) { + UseMethod( + generic = "commodity_channel_index" + ) +} + +#' @usage NULL +#' @aliases commodity_channel_index +#' @export +CCI <- commodity_channel_index + +#' @usage NULL +#' @aliases commodity_channel_index +#' @export +commodity_channel_index.default <- function( + x, + cols, + n = 10, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 3, + paste0( + "'cols' has to be length 3. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + HLC <- series( + x = cols, + default = ~ high + low + close, + data = x, + ... + ) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + x <- as.data.frame( + .Call( + "impl_ta_CCI", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) + ) + ) + + colnames(x) <- "CCI" + + return(x) +} + +#' @usage NULL +#' @aliases commodity_channel_index +#' @export +commodity_channel_index.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases commodity_channel_index +#' @export +commodity_channel_index.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases commodity_channel_index +#' @export +commodity_channel_index.plotly <- function( + x, + cols, + n = 10, + ... +) { + ## prepare series + ## from {plotly}-object + HLC <- as.data.frame( + series( + x = x, + formula = cols, + default = ~ high + low + close, + ... + ) + ) + + ## construct indicator + .indicator <- as.data.frame( + .Call( + "impl_ta_CCI", + HLC[[1]], + HLC[[2]], + HLC[[3]], + as.integer(n) + ) + ) + + colnames(.indicator) <- "CCI" + .indicator$idx <- 1:nrow(.indicator) + + ## construct plot with ribbons + ## on upper and lower limits + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~CCI, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + + output <- plotly::add_ribbons( + output, + x = ~idx, + ymin = rep(-100, nrow(.indicator)), + ymax = rep(100, nrow(.indicator)), + line = list(width = 0), + fillcolor = plotly::toRGB( + x = "lightgray", + alpha = 0.2 + ) + ) + + output <- add_title( + x = output, + text = sprintf( + "Commodity Channel Index (%d)", + n + ) + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/R/ta_CMO.R b/R/ta_CMO.R new file mode 100644 index 000000000..bfd58e69e --- /dev/null +++ b/R/ta_CMO.R @@ -0,0 +1,222 @@ +#' @export +#' @family Momentum Indicator +#' +#' @title Chande Momentum Oscillator +#' +#' @templateVar .title Chande Momentum Oscillator +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun chande_momentum_oscillator +#' +#' @template description +chande_momentum_oscillator <- function( + x, + cols, + n = 10, + ... +) { + UseMethod( + generic = "chande_momentum_oscillator" + ) +} + +#' @usage NULL +#' @aliases chande_momentum_oscillator +#' @export +CMO <- chande_momentum_oscillator + +#' @usage NULL +#' @aliases chande_momentum_oscillator +#' @export +chande_momentum_oscillator.default <- function( + x, + cols, + n = 10, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + x <- as.data.frame( + .Call( + "impl_ta_CMO", + x[[1]], + as.integer(n) + ) + ) + + colnames(x) <- "CMO" + + return(x) +} + +#' @usage NULL +#' @aliases chande_momentum_oscillator +#' @export +chande_momentum_oscillator.numeric <- function( + x, + cols, + n = 10, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + + .Call( + "impl_ta_CMO", + x, + as.integer(n) + ) +} + +#' @usage NULL +#' @aliases chande_momentum_oscillator +#' @export +chande_momentum_oscillator.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases chande_momentum_oscillator +#' @export +chande_momentum_oscillator.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases chande_momentum_oscillator +#' @export +chande_momentum_oscillator.plotly <- function( + x, + cols, + n = 10, + ... +) { + ## prepare series + ## from {plotly}-object + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + ... + ) + ) + + ## construct indicator + ## NOTE: NextMethod might be risky + ## here + .indicator <- as.data.frame( + .Call( + "impl_ta_CMO", + x[[1]], + as.integer(n) + ) + ) + + colnames(.indicator) <- "CMO" + + .indicator$idx <- 1:nrow(.indicator) + + ## construct plot with ribbons + ## on upper and lower limits + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~CMO, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + + output <- plotly::add_ribbons( + output, + x = ~idx, + ymin = rep(-50, nrow(.indicator)), + ymax = rep(50, nrow(.indicator)), + line = list(width = 0), + fillcolor = plotly::toRGB( + x = "lightgray", + alpha = 0.2 + ) + ) + + output <- add_title( + x = output, + text = sprintf( + "Chande Momentum Indicator (%d)", + n + ) + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/man/aroon.Rd b/man/aroon.Rd index 7e5e5c505..5c324447f 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -56,6 +56,8 @@ tail(output) \seealso{ Other Momentum Indicator: \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index 4167b837c..41ad4b782 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -56,6 +56,8 @@ tail(output) \seealso{ Other Momentum Indicator: \code{\link{aroon}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, diff --git a/man/chande_momentum_oscillator.Rd b/man/chande_momentum_oscillator.Rd new file mode 100644 index 000000000..002c8b294 --- /dev/null +++ b/man/chande_momentum_oscillator.Rd @@ -0,0 +1,75 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CMO.R +\name{chande_momentum_oscillator} +\alias{chande_momentum_oscillator} +\title{Chande Momentum Oscillator} +\usage{ +chande_momentum_oscillator(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} +} +\description{ +The \code{chande_momentum_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::chande_momentum_oscillator(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::chande_momentum_oscillator() + ) +} +} +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{commodity_channel_index}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\author{ +Serkan Korkmaz +} +\concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd new file mode 100644 index 000000000..eb8b7e83a --- /dev/null +++ b/man/commodity_channel_index.Rd @@ -0,0 +1,75 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CCI.R +\name{commodity_channel_index} +\alias{commodity_channel_index} +\title{Commodity Channel Index} +\usage{ +commodity_channel_index(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} +} +\description{ +The \code{commodity_channel_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::commodity_channel_index(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::commodity_channel_index() + ) +} +} +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\author{ +Serkan Korkmaz +} +\concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index a1b529009..2b458f532 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -57,6 +57,8 @@ tail(output) Other Momentum Indicator: \code{\link{aroon}()}, \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index 358bec844..ea69a823d 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -13,6 +13,8 @@ Moving Average Convergence Divergence Other Momentum Indicator: \code{\link{aroon}()}, \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index 463397575..6a88090a1 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -57,6 +57,8 @@ tail(output) Other Momentum Indicator: \code{\link{aroon}()}, \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{stochastic}()}, diff --git a/man/stochastic.Rd b/man/stochastic.Rd index 18aca7bf5..e38dfab6a 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -57,6 +57,8 @@ tail(output) Other Momentum Indicator: \code{\link{aroon}()}, \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index c612af9fc..d1b045f0c 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -64,6 +64,8 @@ tail(output) Other Momentum Indicator: \code{\link{aroon}()}, \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index bbb64e45f..415088f44 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -62,6 +62,8 @@ tail(output) Other Momentum Indicator: \code{\link{aroon}()}, \code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, diff --git a/tests/testthat/test-ta_CCI.R b/tests/testthat/test-ta_CCI.R new file mode 100644 index 000000000..958a14e8a --- /dev/null +++ b/tests/testthat/test-ta_CCI.R @@ -0,0 +1,55 @@ +## script: Commodity Channel Index +## author: Serkan Korkmaz +testthat::test_that(desc = "Commodity Channel Index", code = { + ## 1) calculate values + ## with and without alias + output <- commodity_channel_index(SPY) + alias <- CCI(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(commodity_channel_index()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(commodity_channel_index(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(commodity_channel_index(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = commodity_channel_index( + BTC + ), + expected = commodity_channel_index( + BTC, + cols = ~ high + low + close + ) + ) +}) diff --git a/tests/testthat/test-ta_CMO.R b/tests/testthat/test-ta_CMO.R new file mode 100644 index 000000000..94c72ffdf --- /dev/null +++ b/tests/testthat/test-ta_CMO.R @@ -0,0 +1,55 @@ +## script: CMO +## author: Serkan Korkmaz +testthat::test_that(desc = "Chande Momentum Indicator", code = { + ## 1) calculate values + ## with and without alias + output <- chande_momentum_oscillator(SPY) + alias <- CMO(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(chande_momentum_oscillator()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(chande_momentum_oscillator(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(chande_momentum_oscillator(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = chande_momentum_oscillator( + BTC + ), + expected = chande_momentum_oscillator( + BTC, + cols = ~open + ) + ) +}) From e35d2c06ab02b56d31d4d0ffbe8372473732c53b Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 20 Sep 2025 15:59:46 +0200 Subject: [PATCH 128/166] :hammer: New Candlestick Patterns * All functions works as expected. --- NAMESPACE | 29 ++++++++ R/ta_CDL3LINESTRIKE.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDL3OUTSIDE.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDL3STARSINSOUTH.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDL3WHITESOLDIERS.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDLABANDONEDBABY.R | 128 ++++++++++++++++++++++++++++++++ R/ta_CDLADVANCEDBLOCK.R | 123 ++++++++++++++++++++++++++++++ man/abandoned_baby.Rd | 83 +++++++++++++++++++++ man/advance_block.Rd | 83 +++++++++++++++++++++ man/doji.Rd | 6 ++ man/doji_star.Rd | 6 ++ man/dragonfly_doji.Rd | 6 ++ man/evening_doji_star.Rd | 6 ++ man/three_black_crows.Rd | 6 ++ man/three_inside.Rd | 6 ++ man/three_line_strike.Rd | 83 +++++++++++++++++++++ man/three_outside.Rd | 83 +++++++++++++++++++++ man/three_stars_in_the_south.Rd | 83 +++++++++++++++++++++ man/three_white_soldiers.Rd | 83 +++++++++++++++++++++ man/two_crows.Rd | 8 +- src/api.h | 6 ++ src/init.c | 6 ++ src/ta_CDL3LINESTRIKE.c | 86 +++++++++++++++++++++ src/ta_CDL3OUTSIDE.c | 82 ++++++++++++++++++++ src/ta_CDL3STARSINSOUTH.c | 82 ++++++++++++++++++++ src/ta_CDL3WHITESOLDIERS.c | 79 ++++++++++++++++++++ src/ta_CDLABANDONEDBABY.c | 83 +++++++++++++++++++++ src/ta_CDLADVANCEBLOCK.c | 79 ++++++++++++++++++++ 28 files changed, 1816 insertions(+), 1 deletion(-) create mode 100644 R/ta_CDL3LINESTRIKE.R create mode 100644 R/ta_CDL3OUTSIDE.R create mode 100644 R/ta_CDL3STARSINSOUTH.R create mode 100644 R/ta_CDL3WHITESOLDIERS.R create mode 100644 R/ta_CDLABANDONEDBABY.R create mode 100644 R/ta_CDLADVANCEDBLOCK.R create mode 100644 man/abandoned_baby.Rd create mode 100644 man/advance_block.Rd create mode 100644 man/three_line_strike.Rd create mode 100644 man/three_outside.Rd create mode 100644 man/three_stars_in_the_south.Rd create mode 100644 man/three_white_soldiers.Rd create mode 100644 src/ta_CDL3LINESTRIKE.c create mode 100644 src/ta_CDL3OUTSIDE.c create mode 100644 src/ta_CDL3STARSINSOUTH.c create mode 100644 src/ta_CDL3WHITESOLDIERS.c create mode 100644 src/ta_CDLABANDONEDBABY.c create mode 100644 src/ta_CDLADVANCEBLOCK.c diff --git a/NAMESPACE b/NAMESPACE index 82b80fb5a..9584cf17e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -45,10 +45,16 @@ S3method(WMA,default) S3method(WMA,matrix) S3method(WMA,numeric) S3method(WMA,plotly) +S3method(abandoned_baby,data.frame) +S3method(abandoned_baby,default) +S3method(abandoned_baby,matrix) S3method(acceleration_bands,data.frame) S3method(acceleration_bands,default) S3method(acceleration_bands,matrix) S3method(acceleration_bands,plotly) +S3method(advance_block,data.frame) +S3method(advance_block,default) +S3method(advance_block,matrix) S3method(aroon,data.frame) S3method(aroon,default) S3method(aroon,matrix) @@ -124,6 +130,18 @@ S3method(three_black_crows,matrix) S3method(three_inside,data.frame) S3method(three_inside,default) S3method(three_inside,matrix) +S3method(three_line_strike,data.frame) +S3method(three_line_strike,default) +S3method(three_line_strike,matrix) +S3method(three_outside,data.frame) +S3method(three_outside,default) +S3method(three_outside,matrix) +S3method(three_stars_in_the_south,data.frame) +S3method(three_stars_in_the_south,default) +S3method(three_stars_in_the_south,matrix) +S3method(three_white_soldiers,data.frame) +S3method(three_white_soldiers,default) +S3method(three_white_soldiers,matrix) S3method(two_crows,data.frame) S3method(two_crows,default) S3method(two_crows,matrix) @@ -141,6 +159,11 @@ export(CCI) export(CDL2CROWS) export(CDL3BLACKCROWS) export(CDL3INSIDE) +export(CDL3LINESTRIKE) +export(CDL3OUTSIDE) +export(CDL3STARSINSOUTH) +export(CDLABANDONEDBABY) +export(CDLADVANCEBLOCK) export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) @@ -164,7 +187,9 @@ export(TEMA) export(TRIMA) export(ULTOSC) export(WMA) +export(abandoned_baby) export(acceleration_bands) +export(advance_block) export(aroon) export(aroon_oscillator) export(bollinger_bands) @@ -196,6 +221,10 @@ export(stochastic) export(stochastic_relative_strength_index) export(three_black_crows) export(three_inside) +export(three_line_strike) +export(three_outside) +export(three_stars_in_the_south) +export(three_white_soldiers) export(triangular_moving_average) export(triple_exponential_moving_average) export(two_crows) diff --git a/R/ta_CDL3LINESTRIKE.R b/R/ta_CDL3LINESTRIKE.R new file mode 100644 index 000000000..403db41eb --- /dev/null +++ b/R/ta_CDL3LINESTRIKE.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Three-Line Strike +#' +#' @templateVar .title Three-Line Strike +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun three_line_strike +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{three_line_strike}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +three_line_strike <- function( + x, + cols, + ... +) { + UseMethod( + "three_line_strike" + ) +} + +#' @usage NULL +#' @aliases three_line_strike +#' @export +CDL3LINESTRIKE <- three_line_strike + +#' @usage NULL +#' @aliases three_line_strike +#' @export +three_line_strike.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL3LINESTRIKE", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "three_line_strike" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases three_line_strike +#' @export +three_line_strike.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases three_line_strike +#' @export +three_line_strike.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDL3OUTSIDE.R b/R/ta_CDL3OUTSIDE.R new file mode 100644 index 000000000..507311043 --- /dev/null +++ b/R/ta_CDL3OUTSIDE.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Three Outside +#' +#' @templateVar .title Three Outside +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun three_outside +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{three_outside}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +three_outside <- function( + x, + cols, + ... +) { + UseMethod( + "three_outside" + ) +} + +#' @usage NULL +#' @aliases three_outside +#' @export +CDL3OUTSIDE <- three_outside + +#' @usage NULL +#' @aliases three_outside +#' @export +three_outside.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL3OUTSIDE", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "three_outside" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases three_outside +#' @export +three_outside.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases three_outside +#' @export +three_outside.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDL3STARSINSOUTH.R b/R/ta_CDL3STARSINSOUTH.R new file mode 100644 index 000000000..70671b35d --- /dev/null +++ b/R/ta_CDL3STARSINSOUTH.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Three Stars in the South +#' +#' @templateVar .title Three Stars in the South +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun three_stars_in_the_south +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{three_stars_in_the_south}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +three_stars_in_the_south <- function( + x, + cols, + ... +) { + UseMethod( + "three_stars_in_the_south" + ) +} + +#' @usage NULL +#' @aliases three_stars_in_the_south +#' @export +CDL3STARSINSOUTH <- three_stars_in_the_south + +#' @usage NULL +#' @aliases three_stars_in_the_south +#' @export +three_stars_in_the_south.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL3STARSINSOUTH", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "three_stars_in_the_south" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases three_stars_in_the_south +#' @export +three_stars_in_the_south.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases three_stars_in_the_south +#' @export +three_stars_in_the_south.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDL3WHITESOLDIERS.R b/R/ta_CDL3WHITESOLDIERS.R new file mode 100644 index 000000000..20763edbe --- /dev/null +++ b/R/ta_CDL3WHITESOLDIERS.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Three White Soldiers +#' +#' @templateVar .title Three White Soldiers +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun three_white_soldiers +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{three_white_soldiers}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +three_white_soldiers <- function( + x, + cols, + ... +) { + UseMethod( + "three_white_soldiers" + ) +} + +#' @usage NULL +#' @aliases three_white_soldiers +#' @export +CDL3STARSINSOUTH <- three_white_soldiers + +#' @usage NULL +#' @aliases three_white_soldiers +#' @export +three_white_soldiers.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL3WHITESOLDIERS", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "three_white_soldiers" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases three_white_soldiers +#' @export +three_white_soldiers.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases three_white_soldiers +#' @export +three_white_soldiers.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLABANDONEDBABY.R b/R/ta_CDLABANDONEDBABY.R new file mode 100644 index 000000000..e80c1445c --- /dev/null +++ b/R/ta_CDLABANDONEDBABY.R @@ -0,0 +1,128 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Abandoned Baby +#' +#' @templateVar .title Abandoned Baby +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun abandoned_baby +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{abandoned_baby}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +abandoned_baby <- function( + x, + cols, + eps = 0, + ... +) { + UseMethod( + "abandoned_baby" + ) +} + +#' @usage NULL +#' @aliases abandoned_baby +#' @export +CDLABANDONEDBABY <- abandoned_baby + +#' @usage NULL +#' @aliases abandoned_baby +#' @export +abandoned_baby.default <- function( + x, + cols, + eps = 0, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLABANDONEDBABY", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.double(eps), + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "abandoned_baby" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases abandoned_baby +#' @export +abandoned_baby.data.frame <- function( + x, + cols, + eps = 0, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases abandoned_baby +#' @export +abandoned_baby.matrix <- function( + x, + cols, + eps = 0, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLADVANCEDBLOCK.R b/R/ta_CDLADVANCEDBLOCK.R new file mode 100644 index 000000000..383504188 --- /dev/null +++ b/R/ta_CDLADVANCEDBLOCK.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Advance Block +#' +#' @templateVar .title Advance Block +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun advance_block +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{advance_block}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +advance_block <- function( + x, + cols, + ... +) { + UseMethod( + "advance_block" + ) +} + +#' @usage NULL +#' @aliases advance_block +#' @export +CDLADVANCEBLOCK <- advance_block + +#' @usage NULL +#' @aliases advance_block +#' @export +advance_block.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + asset( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLADVANCEBLOCK", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "advance_block" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases advance_block +#' @export +advance_block.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases advance_block +#' @export +advance_block.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd new file mode 100644 index 000000000..7a996ebd6 --- /dev/null +++ b/man/abandoned_baby.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLABANDONEDBABY.R +\name{abandoned_baby} +\alias{abandoned_baby} +\title{Abandoned Baby} +\usage{ +abandoned_baby(x, cols, eps = 0, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{abandoned_baby}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{abandoned_baby()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::abandoned_baby(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::abandoned_baby() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{advance_block}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/advance_block.Rd b/man/advance_block.Rd new file mode 100644 index 000000000..e371f9398 --- /dev/null +++ b/man/advance_block.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLADVANCEDBLOCK.R +\name{advance_block} +\alias{advance_block} +\title{Advance Block} +\usage{ +advance_block(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{advance_block}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{advance_block()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::advance_block(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::advance_block() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/doji.Rd b/man/doji.Rd index 4caccf2a2..b2ce8e4e4 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -60,11 +60,17 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, \code{\link{two_crows}()} } \author{ diff --git a/man/doji_star.Rd b/man/doji_star.Rd index 0a13eb1d2..38428ec69 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -60,11 +60,17 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, \code{\link{two_crows}()} } \author{ diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index d75f474f1..c72fd875d 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -60,11 +60,17 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{evening_doji_star}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, \code{\link{two_crows}()} } \author{ diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 7b16d5824..b93f360f5 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -60,11 +60,17 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, \code{\link{two_crows}()} } \author{ diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index ed88c017e..01ff86756 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -60,11 +60,17 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, \code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, \code{\link{two_crows}()} } \author{ diff --git a/man/three_inside.Rd b/man/three_inside.Rd index 32ac7de80..2b0b5c561 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -60,11 +60,17 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, \code{\link{three_black_crows}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, \code{\link{two_crows}()} } \author{ diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd new file mode 100644 index 000000000..fffc4033a --- /dev/null +++ b/man/three_line_strike.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL3LINESTRIKE.R +\name{three_line_strike} +\alias{three_line_strike} +\title{Three-Line Strike} +\usage{ +three_line_strike(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{three_line_strike}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{three_line_strike()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::three_line_strike(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::three_line_strike() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/three_outside.Rd b/man/three_outside.Rd new file mode 100644 index 000000000..6a7d616db --- /dev/null +++ b/man/three_outside.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL3OUTSIDE.R +\name{three_outside} +\alias{three_outside} +\title{Three Outside} +\usage{ +three_outside(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{three_outside}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{three_outside()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::three_outside(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::three_outside() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd new file mode 100644 index 000000000..5367eb1f4 --- /dev/null +++ b/man/three_stars_in_the_south.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL3STARSINSOUTH.R +\name{three_stars_in_the_south} +\alias{three_stars_in_the_south} +\title{Three Stars in the South} +\usage{ +three_stars_in_the_south(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{three_stars_in_the_south}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{three_stars_in_the_south()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::three_stars_in_the_south(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::three_stars_in_the_south() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd new file mode 100644 index 000000000..01980fe6f --- /dev/null +++ b/man/three_white_soldiers.Rd @@ -0,0 +1,83 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDL3WHITESOLDIERS.R +\name{three_white_soldiers} +\alias{three_white_soldiers} +\title{Three White Soldiers} +\usage{ +three_white_soldiers(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{...}{additional parameters passed into \link{model.frame}.} + +\item{n}{Window} +} +\value{ +\describe{ +\item{three_white_soldiers}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{three_white_soldiers()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::three_white_soldiers(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::three_white_soldiers() + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/two_crows.Rd b/man/two_crows.Rd index 367028ebe..050550e9f 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -60,12 +60,18 @@ tail(output) } \seealso{ Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, \code{\link{three_black_crows}()}, -\code{\link{three_inside}()} +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()} } \author{ Serkan Korkmaz diff --git a/src/api.h b/src/api.h index ea833f7b0..971e781f9 100644 --- a/src/api.h +++ b/src/api.h @@ -18,6 +18,12 @@ SEXP impl_ta_CCI(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); SEXP impl_ta_CDL2CROWS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDL3BLACKCROWS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDL3INSIDE(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDL3LINESTRIKE(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDL3OUTSIDE(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDL3STARSINSOUTH(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDL3WHITESOLDIERS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLABANDONEDBABY(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); +SEXP impl_ta_CDLADVANCEBLOCK(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDOJISTARSTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); diff --git a/src/init.c b/src/init.c index 77f08f309..cbfe80d45 100644 --- a/src/init.c +++ b/src/init.c @@ -23,6 +23,12 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_CDL2CROWS, 5), CALLDEF(impl_ta_CDL3BLACKCROWS, 5), CALLDEF(impl_ta_CDL3INSIDE, 5), + CALLDEF(impl_ta_CDL3LINESTRIKE, 5), + CALLDEF(impl_ta_CDL3OUTSIDE, 5), + CALLDEF(impl_ta_CDL3STARSINSOUTH, 5), + CALLDEF(impl_ta_CDL3WHITESOLDIERS, 5), + CALLDEF(impl_ta_CDLABANDONEDBABY, 6), + CALLDEF(impl_ta_CDLADVANCEBLOCK, 5), CALLDEF(impl_ta_CDLDOJI, 5), CALLDEF(impl_ta_CDLDOJISTARSTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), diff --git a/src/ta_CDL3LINESTRIKE.c b/src/ta_CDL3LINESTRIKE.c new file mode 100644 index 000000000..168c9516e --- /dev/null +++ b/src/ta_CDL3LINESTRIKE.c @@ -0,0 +1,86 @@ +// Interface to TA_CDL3LINESTRIKE (Three-Line Strike) +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// normalize_flag : logical scalar; when TRUE divide outputs by 100 +// +// Description +// Identifies Three-Line Strike patterns. Returns an integer vector of length +// n, padded with NA_INTEGER for the initial lookback. Values are (-100, 0, +// +100) or (-1, 0, +1) if normalized. + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CDL3LINESTRIKE( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + // input pointers + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + int n = LENGTH(open); + + // allocate output + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDL3LINESTRIKE_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_CDL3LINESTRIKE( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*open */ open_ptr, + /*high */ high_ptr, + /*low */ low_ptr, + /*close */ close_ptr, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*out */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL3LINESTRIKE failed: return code %d", rc); + } + + // align outputs to length n + shift_array(out_ptr, n, outBeg); + + // optional normalization to {-1,0,1} + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDL3OUTSIDE.c b/src/ta_CDL3OUTSIDE.c new file mode 100644 index 000000000..53c88b460 --- /dev/null +++ b/src/ta_CDL3OUTSIDE.c @@ -0,0 +1,82 @@ +// Interface to TA_CDL3OUTSIDE (Three Outside Up/Down) +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// normalize_flag : logical scalar; when TRUE divide outputs by 100 +// +// Description +// Identifies Three Outside Up/Down patterns. Returns an integer vector of +// length n, padded with NA_INTEGER for the initial lookback. Values are +// (-100, 0, +100) or (-1, 0, +1) if normalized. + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CDL3OUTSIDE( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDL3OUTSIDE_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_CDL3OUTSIDE( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*open */ open_ptr, + /*high */ high_ptr, + /*low */ low_ptr, + /*close */ close_ptr, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*out */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL3OUTSIDE failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDL3STARSINSOUTH.c b/src/ta_CDL3STARSINSOUTH.c new file mode 100644 index 000000000..0ad38f3a8 --- /dev/null +++ b/src/ta_CDL3STARSINSOUTH.c @@ -0,0 +1,82 @@ +// Interface to TA_CDL3STARSINSOUTH (Three Stars In The South) +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// normalize_flag : logical scalar; when TRUE divide outputs by 100 +// +// Description +// Identifies Three Stars In The South patterns. Returns an integer vector of +// length n, padded with NA_INTEGER for the initial lookback. Values are +// (-100, 0, +100) or (-1, 0, +1) if normalized. + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +// clang-format off +SEXP impl_ta_CDL3STARSINSOUTH( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDL3STARSINSOUTH_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_CDL3STARSINSOUTH( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*open */ open_ptr, + /*high */ high_ptr, + /*low */ low_ptr, + /*close */ close_ptr, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*out */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL3STARSINSOUTH failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + + bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDL3WHITESOLDIERS.c b/src/ta_CDL3WHITESOLDIERS.c new file mode 100644 index 000000000..61211a2c7 --- /dev/null +++ b/src/ta_CDL3WHITESOLDIERS.c @@ -0,0 +1,79 @@ +// Interface to TA_CDL3WHITESOLDIERS (Three Advancing White Soldiers) +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// normalize_flag : logical scalar; when TRUE divide outputs by 100 +// +// Description +// Identifies Three Advancing White Soldiers. Returns an integer vector of +// length n, padded with NA_INTEGER for the initial lookback. Values are +// (-100, 0, +100) or (-1, 0, +1) if normalized. + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include + +// clang-format off +SEXP impl_ta_CDL3WHITESOLDIERS( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDL3WHITESOLDIERS_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_CDL3WHITESOLDIERS( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*open */ open_ptr, + /*high */ high_ptr, + /*low */ low_ptr, + /*close */ close_ptr, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*out */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDL3WHITESOLDIERS failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLABANDONEDBABY.c b/src/ta_CDLABANDONEDBABY.c new file mode 100644 index 000000000..c302ea4e5 --- /dev/null +++ b/src/ta_CDLABANDONEDBABY.c @@ -0,0 +1,83 @@ +// Interface to TA_CDLABANDONEDBABY (Abandoned Baby) +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// penetration : numeric scalar (double) – gap penetration (default +// 0) normalize_flag : logical scalar; when TRUE divide outputs by 100 +// +// Description +// Identifies Abandoned Baby patterns. Returns an integer vector of length n, +// padded with NA_INTEGER for the initial lookback. Values are (-100, 0, +100) +// or (-1, 0, +1) if normalized. + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include + +// clang-format off +SEXP impl_ta_CDLABANDONEDBABY( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP penetration, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const double pen = REAL(penetration)[0]; + int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLABANDONEDBABY_Lookback(pen); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_CDLABANDONEDBABY( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*open */ open_ptr, + /*high */ high_ptr, + /*low */ low_ptr, + /*close */ close_ptr, + /*pen */ pen, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*out */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLABANDONEDBABY failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLADVANCEBLOCK.c b/src/ta_CDLADVANCEBLOCK.c new file mode 100644 index 000000000..e88d7c455 --- /dev/null +++ b/src/ta_CDLADVANCEBLOCK.c @@ -0,0 +1,79 @@ +// Interface to TA_CDLADVANCEBLOCK (Advance Block) +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// normalize_flag : logical scalar; when TRUE divide outputs by 100 +// +// Description +// Identifies Advance Block patterns. Returns an integer vector of length n, +// padded with NA_INTEGER for the initial lookback. Values are (-100, 0, +100) +// or (-1, 0, +1) if normalized. + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include + +// clang-format off +SEXP impl_ta_CDLADVANCEBLOCK( + SEXP open, + SEXP high, + SEXP low, + SEXP close, + SEXP normalize_flag) { + // clang-format on + + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLADVANCEBLOCK_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_CDLADVANCEBLOCK( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*open */ open_ptr, + /*high */ high_ptr, + /*low */ low_ptr, + /*close */ close_ptr, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*out */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLADVANCEBLOCK failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} From 9e2cd06bc4ba0f2fa1afb12faa797ef8daa63da3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sat, 20 Sep 2025 17:18:06 +0200 Subject: [PATCH 129/166] :hammer: MFI and OBV * Unit-tests have also been added. --- NAMESPACE | 12 ++ R/ta_MFI.R | 186 +++++++++++++++++++ R/ta_OBV.R | 166 +++++++++++++++++ man/aroon.Rd | 1 + man/aroon_oscillator.Rd | 1 + man/chaikin_AD_line.Rd | 3 +- man/chaikin_AD_oscillator.Rd | 3 +- man/chande_momentum_oscillator.Rd | 1 + man/commodity_channel_index.Rd | 1 + man/fast_stochastic.Rd | 1 + man/money_flow_index.Rd | 76 ++++++++ man/moving_average_convergence_divergence.Rd | 1 + man/on_balance_volume.Rd | 68 +++++++ man/relative_strength_index.Rd | 1 + man/stochastic.Rd | 1 + man/stochastic_relative_strength_index.Rd | 1 + man/ultimate_oscillator.Rd | 1 + src/api.h | 2 + src/init.c | 2 + src/ta_MFI.c | 75 ++++++++ src/ta_OBV.c | 65 +++++++ tests/testthat/test-ta_MFI.R | 55 ++++++ tests/testthat/test-ta_OBV.R | 55 ++++++ 23 files changed, 776 insertions(+), 2 deletions(-) create mode 100644 R/ta_MFI.R create mode 100644 R/ta_OBV.R create mode 100644 man/money_flow_index.Rd create mode 100644 man/on_balance_volume.Rd create mode 100644 src/ta_MFI.c create mode 100644 src/ta_OBV.c create mode 100644 tests/testthat/test-ta_MFI.R create mode 100644 tests/testthat/test-ta_OBV.R diff --git a/NAMESPACE b/NAMESPACE index 9584cf17e..d0089dceb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -108,7 +108,15 @@ S3method(ht_phasor,default) S3method(ht_sine,default) S3method(ht_trendline,default) S3method(ht_trendmode,default) +S3method(money_flow_index,data.frame) +S3method(money_flow_index,default) +S3method(money_flow_index,matrix) +S3method(money_flow_index,plotly) S3method(moving_average_convergence_divergence,default) +S3method(on_balance_volume,data.frame) +S3method(on_balance_volume,default) +S3method(on_balance_volume,matrix) +S3method(on_balance_volume,plotly) S3method(relative_strength_index,data.frame) S3method(relative_strength_index,default) S3method(relative_strength_index,matrix) @@ -176,6 +184,8 @@ export(MACD) export(MACDEXT) export(MACDFIX) export(MAMA) +export(MFI) +export(OBV) export(RSI) export(SMA) export(STOCH) @@ -214,7 +224,9 @@ export(ht_trendmode) export(indicator) export(kaufmans_adaptive_moving_average) export(mesa_adaptive_moving_average) +export(money_flow_index) export(moving_average_convergence_divergence) +export(on_balance_volume) export(relative_strength_index) export(simple_moving_average) export(stochastic) diff --git a/R/ta_MFI.R b/R/ta_MFI.R new file mode 100644 index 000000000..e71a00b5a --- /dev/null +++ b/R/ta_MFI.R @@ -0,0 +1,186 @@ +#' @export +#' @family Momentum Indicator +#' +#' @title Money Flow Index +#' +#' @templateVar .title Money Flow Index +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun money_flow_index +#' +#' @template description +money_flow_index <- function( + x, + cols, + n = 10, + ... +) { + UseMethod("money_flow_index") +} + +#' @usage NULL +#' @aliases money_flow_index +#' @export +MFI <- money_flow_index + +#' @usage NULL +#' @aliases money_flow_index +#' @export +money_flow_index.default <- function( + x, + cols, + n = 10, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + HLCV <- series( + x = cols, + default = ~ high + low + close + volume, + data = x, + ... + ) + + assert(n >= 2) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + output <- as.data.frame( + .Call( + "impl_ta_MFI", + HLCV[[1]], + HLCV[[2]], + HLCV[[3]], + HLCV[[4]], + as.integer(n) + ) + ) + + colnames(output) <- "MFI" + + output +} + +#' @usage NULL +#' @aliases money_flow_index +#' @export +money_flow_index.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases money_flow_index +#' @export +money_flow_index.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases money_flow_index +#' @export +money_flow_index.plotly <- function( + x, + cols, + n = 10, + ... +) { + ## prepare series + ## from + HLCV <- series( + x = x, + formula = cols, + default = ~ high + low + close + volume, + ... + ) + + ## calculate acceleration + ## bands and return as + ## data.frame + .indicator <- as.data.frame( + .Call( + "impl_ta_MFI", + HLCV[[1]], + HLCV[[2]], + HLCV[[3]], + HLCV[[4]], + as.integer(n) + ) + ) + + colnames(.indicator)[1] <- "MFI" + + .indicator$idx <- 1:nrow(.indicator) + + ## construct plot with ribbons + ## on upper and lower limits + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~MFI, + type = "scatter", + mode = "lines", + showlegend = FALSE + ) + + output <- plotly::add_ribbons( + output, + x = ~idx, + ymin = rep(-20, nrow(.indicator)), + ymax = rep(70, nrow(.indicator)), + line = list(width = 0), + fillcolor = plotly::toRGB( + x = "lightgray", + alpha = 0.2 + ) + ) + + output <- add_title( + x = output, + text = sprintf( + "Money Flow Index (%d)", + n + ) + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/R/ta_OBV.R b/R/ta_OBV.R new file mode 100644 index 000000000..705feeb6f --- /dev/null +++ b/R/ta_OBV.R @@ -0,0 +1,166 @@ +#' @export +#' @family Volume Indicator +#' +#' @title On-Balance Volume +#' +#' @templateVar .title On-Balance Volume +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun on_balance_volume +#' +#' @template description +on_balance_volume <- function( + x, + cols, + n = 10, + ... +) { + UseMethod("on_balance_volume") +} + +#' @usage NULL +#' @aliases on_balance_volume +#' @export +OBV <- on_balance_volume + +#' @usage NULL +#' @aliases on_balance_volume +#' @export +on_balance_volume.default <- function( + x, + cols, + n = 10, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 2, + paste0( + "'cols' has to be length 2. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + CV <- series( + x = cols, + default = ~ close + volume, + data = x, + ... + ) + + assert(n >= 2) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + output <- as.data.frame( + .Call( + "impl_ta_OBV", + CV[[1]], + CV[[2]] + ) + ) + + colnames(output)[1] <- "OBV" + + return(output) +} + +#' @usage NULL +#' @aliases on_balance_volume +#' @export +on_balance_volume.data.frame <- function( + x, + cols, + n = 10, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases on_balance_volume +#' @export +on_balance_volume.matrix <- function( + x, + cols, + n = 10, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases on_balance_volume +#' @export +on_balance_volume.plotly <- function( + x, + cols, + n = 10, + ... +) { + ## prepare series + ## from + CV <- series( + x = x, + formula = cols, + default = ~ close + volume, + ... + ) + + ## calculate acceleration + ## bands and return as + ## data.frame + .indicator <- as.data.frame( + .Call( + "impl_ta_OBV", + CV[[1]], + CV[[2]] + ) + ) + + colnames(.indicator)[1] <- "OBV" + + .indicator$idx <- 1:nrow(.indicator) + + ## Create + output <- plotly::plot_ly( + data = .indicator, + x = ~idx, + y = ~OBV, + type = "scatter", + mode = "lines", + # line = list(color = ad_col), + name = "On-Balance Volume", + legendgroup = "obv", + showlegend = TRUE + ) + + output <- add_title( + x = output, + text = "On-Balance Volume (OBV)" + ) + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/man/aroon.Rd b/man/aroon.Rd index 5c324447f..329848e68 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -59,6 +59,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index 41ad4b782..98fb38dad 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -59,6 +59,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index 297f9b7e1..cf490c74c 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -55,7 +55,8 @@ tail(output) } \seealso{ Other Volume Indicator: -\code{\link{chaikin_AD_oscillator}()} +\code{\link{chaikin_AD_oscillator}()}, +\code{\link{on_balance_volume}()} } \author{ Serkan Korkmaz diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index dcc1fece4..c803a4e21 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -55,7 +55,8 @@ tail(output) } \seealso{ Other Volume Indicator: -\code{\link{chaikin_AD_line}()} +\code{\link{chaikin_AD_line}()}, +\code{\link{on_balance_volume}()} } \author{ Serkan Korkmaz diff --git a/man/chande_momentum_oscillator.Rd b/man/chande_momentum_oscillator.Rd index 002c8b294..8bf1f4dbf 100644 --- a/man/chande_momentum_oscillator.Rd +++ b/man/chande_momentum_oscillator.Rd @@ -59,6 +59,7 @@ Other Momentum Indicator: \code{\link{aroon_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd index eb8b7e83a..1ea7835b3 100644 --- a/man/commodity_channel_index.Rd +++ b/man/commodity_channel_index.Rd @@ -59,6 +59,7 @@ Other Momentum Indicator: \code{\link{aroon_oscillator}()}, \code{\link{chande_momentum_oscillator}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index 2b458f532..2a346a26c 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -59,6 +59,7 @@ Other Momentum Indicator: \code{\link{aroon_oscillator}()}, \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/money_flow_index.Rd b/man/money_flow_index.Rd new file mode 100644 index 000000000..99e9873ae --- /dev/null +++ b/man/money_flow_index.Rd @@ -0,0 +1,76 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_MFI.R +\name{money_flow_index} +\alias{money_flow_index} +\title{Money Flow Index} +\usage{ +money_flow_index(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} +} +\description{ +The \code{money_flow_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::money_flow_index(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::money_flow_index() + ) +} +} +\seealso{ +Other Momentum Indicator: +\code{\link{aroon}()}, +\code{\link{aroon_oscillator}()}, +\code{\link{chande_momentum_oscillator}()}, +\code{\link{commodity_channel_index}()}, +\code{\link{fast_stochastic}()}, +\code{\link{moving_average_convergence_divergence}()}, +\code{\link{relative_strength_index}()}, +\code{\link{stochastic}()}, +\code{\link{stochastic_relative_strength_index}()}, +\code{\link{ultimate_oscillator}()} +} +\author{ +Serkan Korkmaz +} +\concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index ea69a823d..035e6bc55 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -16,6 +16,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, \code{\link{stochastic_relative_strength_index}()}, diff --git a/man/on_balance_volume.Rd b/man/on_balance_volume.Rd new file mode 100644 index 000000000..26dc53f38 --- /dev/null +++ b/man/on_balance_volume.Rd @@ -0,0 +1,68 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_OBV.R +\name{on_balance_volume} +\alias{on_balance_volume} +\title{On-Balance Volume} +\usage{ +on_balance_volume(x, cols, n = 10, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} + +\item{cols}{A \link{formula}} + +\item{n}{Window} + +\item{...}{additional parameters passed into \link{model.frame}.} +} +\description{ +The \code{on_balance_volume()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::on_balance_volume(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::on_balance_volume() + ) +} +} +\seealso{ +Other Volume Indicator: +\code{\link{chaikin_AD_line}()}, +\code{\link{chaikin_AD_oscillator}()} +} +\author{ +Serkan Korkmaz +} +\concept{Volume Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index 6a88090a1..c712048f2 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -60,6 +60,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{stochastic}()}, \code{\link{stochastic_relative_strength_index}()}, diff --git a/man/stochastic.Rd b/man/stochastic.Rd index e38dfab6a..21cae876e 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -60,6 +60,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic_relative_strength_index}()}, diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index d1b045f0c..b79f1094a 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -67,6 +67,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index 415088f44..20c7e67e3 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -65,6 +65,7 @@ Other Momentum Indicator: \code{\link{chande_momentum_oscillator}()}, \code{\link{commodity_channel_index}()}, \code{\link{fast_stochastic}()}, +\code{\link{money_flow_index}()}, \code{\link{moving_average_convergence_divergence}()}, \code{\link{relative_strength_index}()}, \code{\link{stochastic}()}, diff --git a/src/api.h b/src/api.h index 971e781f9..3a2bdb04c 100644 --- a/src/api.h +++ b/src/api.h @@ -39,6 +39,8 @@ SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, SEXP o SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod); SEXP impl_ta_MACD(SEXP x, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP x, SEXP period, SEXP matype); +SEXP impl_ta_MFI(SEXP high, SEXP low, SEXP close, SEXP volume, SEXP timeperiod); +SEXP impl_ta_OBV(SEXP close, SEXP volume); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); diff --git a/src/init.c b/src/init.c index cbfe80d45..562eab6a9 100644 --- a/src/init.c +++ b/src/init.c @@ -44,6 +44,8 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_MACDFIX, 2), CALLDEF(impl_ta_MACD, 4), CALLDEF(impl_ta_MA, 3), + CALLDEF(impl_ta_MFI, 5), + CALLDEF(impl_ta_OBV, 2), CALLDEF(impl_ta_RSI, 2), CALLDEF(impl_ta_STOCHF, 6), CALLDEF(impl_ta_STOCHRSI, 5), diff --git a/src/ta_MFI.c b/src/ta_MFI.c new file mode 100644 index 000000000..5f8c5b323 --- /dev/null +++ b/src/ta_MFI.c @@ -0,0 +1,75 @@ +// Interface to TA_MFI (Money Flow Index) +// +// Parameters +// high, low, close : numeric vectors (same length) +// volume : numeric vector of volumes +// timeperiod : integer SEXP for lookback (typical default 14) +// +// Description +// Returns an MFI numeric vector of length n in [0,100], padded with NA_REAL +// for the first lookback samples. + +#include "R_ext/Error.h" +#include "Rinternals.h" +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include "ta_libc.h" + +// clang-format off +SEXP impl_ta_MFI( + SEXP high, + SEXP low, + SEXP close, + SEXP volume, + SEXP timeperiod) { + // clang-format on + + int protect_count = 0; + + const int n = LENGTH(high); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const double *restrict volume_ptr = REAL(volume); + const int period = INTEGER(timeperiod)[0]; + + SEXP result = PROTECT(allocVector(REALSXP, n)); + protect_count++; + double *restrict out_ptr = REAL(result); + + const int minimum_lookback = TA_MFI_Lookback(period); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_REAL; + + } else { + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_MFI( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inHigh */ high_ptr, + /*inLow */ low_ptr, + /*inClose */ close_ptr, + /*inVol */ volume_ptr, + /*optPer */ period, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*outReal */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_MFI failed: return code %d", rc); + } + + // Align to full length + shift_array(out_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_OBV.c b/src/ta_OBV.c new file mode 100644 index 000000000..de6cababd --- /dev/null +++ b/src/ta_OBV.c @@ -0,0 +1,65 @@ +// Interface to TA_OBV (On-Balance Volume) +// +// Parameters +// close : numeric vector of close prices +// volume : numeric vector of volumes (same length as close) +// +// Description +// Computes on-balance volume. Returns a numeric vector of length n, +// padded with NA_REAL for the initial lookback (usually zero for OBV). + +#include "R_ext/Error.h" +#include "Rinternals.h" +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include "ta_libc.h" + +// clang-format off +SEXP impl_ta_OBV( + SEXP close, + SEXP volume) { + // clang-format on + + int protect_count = 0; + + const int n = LENGTH(close); + const double *restrict close_ptr = REAL(close); + const double *restrict volume_ptr = REAL(volume); + + SEXP result = PROTECT(allocVector(REALSXP, n)); + protect_count++; + double *restrict out_ptr = REAL(result); + + const int minimum_lookback = TA_OBV_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_REAL; + + } else { + int outBeg = 0, outNb = 0; + + TA_RetCode rc = TA_OBV( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inReal */ close_ptr, + /*inVol */ volume_ptr, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*outReal */ out_ptr); + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_OBV failed: return code %d", rc); + } + + // Align to full length + shift_array(out_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/tests/testthat/test-ta_MFI.R b/tests/testthat/test-ta_MFI.R new file mode 100644 index 000000000..1a2660414 --- /dev/null +++ b/tests/testthat/test-ta_MFI.R @@ -0,0 +1,55 @@ +## script: MFI +## author: Serkan Korkmaz +testthat::test_that(desc = "Money Flow Index", code = { + ## 1) calculate values + ## with and without alias + output <- money_flow_index(SPY) + alias <- MFI(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(money_flow_index()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(money_flow_index(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(money_flow_index(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = money_flow_index( + BTC + ), + expected = money_flow_index( + BTC, + cols = ~ high + low + close + volume + ) + ) +}) diff --git a/tests/testthat/test-ta_OBV.R b/tests/testthat/test-ta_OBV.R new file mode 100644 index 000000000..12fe90689 --- /dev/null +++ b/tests/testthat/test-ta_OBV.R @@ -0,0 +1,55 @@ +## script: OBV +## author: Serkan Korkmaz +testthat::test_that(desc = "On-Balance Volume", code = { + ## 1) calculate values + ## with and without alias + output <- on_balance_volume(SPY) + alias <- OBV(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(on_balance_volume()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(on_balance_volume(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(on_balance_volume(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = on_balance_volume( + BTC + ), + expected = on_balance_volume( + BTC, + cols = ~ close + volume + ) + ) +}) From ea9451cdb5c4291118cd50a36eb2bfec076664ba Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 10:47:34 +0200 Subject: [PATCH 130/166] :books: Added generic parameter description * The paramters are added to generic roxygen blocks as inherit this avoids enforcing documentation on paramters that doesnt exist. It will only inherit parameters that exists. --- R/talib-package.R | 18 ++++++++++++++++++ man-roxygen/description.R | 5 +---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/R/talib-package.R b/R/talib-package.R index 59391fe5f..9a7c7c23c 100644 --- a/R/talib-package.R +++ b/R/talib-package.R @@ -2,3 +2,21 @@ #' @useDynLib talib, .registration = TRUE ## usethis namespace: end NULL + +#' @title Generic function documentation +#' @name generic_documentation +#' +#' @description +#' A generic documentation block for documenting parameters that +#' are common across all functions. Avoids documenting parameters +#' that doesn't exist downstream. +#' +#' @param x An OHLC-V series that is coercible to [data.frame]. The function assumes that all columns are named in lowercase and order invariant. +#' @param cols An optional [formula] passed into [model.frame]. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See `vignette("talib")` for more details. +#' @param n An [integer] of [length] 1. +#' @param ... Additional parameters passed into [model.frame] +#' +#' @returns NULL +#' @keywords internal +#' @usage NULL +NULL diff --git a/man-roxygen/description.R b/man-roxygen/description.R index d3185f29d..6b49e08fe 100644 --- a/man-roxygen/description.R +++ b/man-roxygen/description.R @@ -7,10 +7,7 @@ #' The indicator, by default, follows its mathematical definition. However, the `cols` argument allows for simple rearrangement of the definition by passing relevant #' columns in a custom order. Refer to the details-section for more on the calculation of the indicators. #' -#' @param x An OHLC-V series that is coercible to a [data.frame]. -#' @param cols A [formula] -#' @param n Window -#' @param ... additional parameters passed into [model.frame]. +#' @inheritParams generic_documentation #' #' @author <%= .author %> #' From 2ef72a31ae2a760bd0af16a46ec28bc084d460b3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 10:48:59 +0200 Subject: [PATCH 131/166] :books: Updated Documtation * Streamlined hilbert_transform family of functions with the rest of library. * Reworked documentation based on the generics * Bollinger Bands have been documented for return values - This will be the starting point the rest of the functions. --- NAMESPACE | 32 +++++- R/ta_BBANDS.R | 49 ++++++-- R/ta_CDL2CROWS.R | 2 +- R/ta_CDL3BLACKCROWS.R | 2 +- R/ta_CDL3INSIDE.R | 2 +- R/ta_CDL3LINESTRIKE.R | 2 +- R/ta_CDL3OUTSIDE.R | 2 +- R/ta_CDL3STARSINSOUTH.R | 2 +- R/ta_CDL3WHITESOLDIERS.R | 2 +- R/ta_CDLABANDONEDBABY.R | 2 +- R/ta_CDLADVANCEDBLOCK.R | 2 +- R/ta_CDLDOJI.R | 2 +- R/ta_CDLDOJISTAR.R | 2 +- R/ta_CDLDRAGONFLYDOJI.R | 2 +- R/ta_CDLEVENINGDOJISTAR.R | 2 +- R/ta_HT_DCPERIOD.R | 130 +++++++++++++++++++++- R/ta_HT_DCPHASE.R | 130 +++++++++++++++++++++- R/ta_HT_PHASOR.R | 130 +++++++++++++++++++++- R/ta_HT_SINE.R | 130 +++++++++++++++++++++- R/ta_HT_TRENDLINE.R | 130 +++++++++++++++++++++- R/ta_HT_TRENDMODE.R | 130 +++++++++++++++++++++- man/DEMA.Rd | 11 +- man/EMA.Rd | 11 +- man/KAMA.Rd | 11 +- man/MAMA.Rd | 11 +- man/SMA.Rd | 11 +- man/T3.Rd | 11 +- man/TEMA.Rd | 11 +- man/TRIMA.Rd | 11 +- man/WMA.Rd | 11 +- man/abandoned_baby.Rd | 8 +- man/acceleration_bands.Rd | 11 +- man/advance_block.Rd | 8 +- man/aroon.Rd | 8 +- man/aroon_oscillator.Rd | 8 +- man/bollinger_bands.Rd | 22 +++- man/chaikin_AD_line.Rd | 8 +- man/chaikin_AD_oscillator.Rd | 8 +- man/chande_momentum_oscillator.Rd | 8 +- man/commodity_channel_index.Rd | 8 +- man/doji.Rd | 8 +- man/doji_star.Rd | 8 +- man/dragonfly_doji.Rd | 8 +- man/evening_doji_star.Rd | 8 +- man/fast_stochastic.Rd | 8 +- man/generic_documentation.Rd | 20 ++++ man/ht_dc_phase.Rd | 66 +++++++++++ man/ht_dcperiod.Rd | 54 ++++++++- man/ht_dcphase.Rd | 20 ---- man/ht_phasor.Rd | 54 ++++++++- man/ht_sine.Rd | 20 ---- man/ht_sine_wave.Rd | 66 +++++++++++ man/ht_trendline.Rd | 69 ++++++++++-- man/ht_trendmode.Rd | 54 ++++++++- man/money_flow_index.Rd | 8 +- man/on_balance_volume.Rd | 8 +- man/relative_strength_index.Rd | 8 +- man/stochastic.Rd | 8 +- man/stochastic_relative_strength_index.Rd | 8 +- man/three_black_crows.Rd | 8 +- man/three_inside.Rd | 8 +- man/three_line_strike.Rd | 8 +- man/three_outside.Rd | 8 +- man/three_stars_in_the_south.Rd | 8 +- man/three_white_soldiers.Rd | 8 +- man/two_crows.Rd | 8 +- man/ultimate_oscillator.Rd | 8 +- 67 files changed, 1360 insertions(+), 290 deletions(-) create mode 100644 man/generic_documentation.Rd create mode 100644 man/ht_dc_phase.Rd delete mode 100644 man/ht_dcphase.Rd delete mode 100644 man/ht_sine.Rd create mode 100644 man/ht_sine_wave.Rd diff --git a/NAMESPACE b/NAMESPACE index d0089dceb..0ddad8dc6 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -102,12 +102,30 @@ S3method(fast_stochastic,data.frame) S3method(fast_stochastic,default) S3method(fast_stochastic,matrix) S3method(fast_stochastic,plotly) +S3method(ht_dc_phase,data.frame) +S3method(ht_dc_phase,default) +S3method(ht_dc_phase,matrix) +S3method(ht_dc_phase,numeric) +S3method(ht_dcperiod,data.frame) S3method(ht_dcperiod,default) -S3method(ht_dcphase,default) +S3method(ht_dcperiod,matrix) +S3method(ht_dcperiod,numeric) +S3method(ht_phasor,data.frame) S3method(ht_phasor,default) -S3method(ht_sine,default) +S3method(ht_phasor,matrix) +S3method(ht_phasor,numeric) +S3method(ht_sine_wave,data.frame) +S3method(ht_sine_wave,default) +S3method(ht_sine_wave,matrix) +S3method(ht_sine_wave,numeric) +S3method(ht_trendline,data.frame) S3method(ht_trendline,default) +S3method(ht_trendline,matrix) +S3method(ht_trendline,numeric) +S3method(ht_trendmode,data.frame) S3method(ht_trendmode,default) +S3method(ht_trendmode,matrix) +S3method(ht_trendmode,numeric) S3method(money_flow_index,data.frame) S3method(money_flow_index,default) S3method(money_flow_index,matrix) @@ -179,6 +197,12 @@ export(CDLEVENINGDOJISTAR) export(CMO) export(DEMA) export(EMA) +export(HT_DCPERIOD) +export(HT_DCPHASE) +export(HT_PHASOR) +export(HT_SINE) +export(HT_TRENDLINE) +export(HT_TRENDMODE) export(KAMA) export(MACD) export(MACDEXT) @@ -215,10 +239,10 @@ export(dragonfly_doji) export(evening_doji_star) export(exponential_moving_average) export(fast_stochastic) +export(ht_dc_phase) export(ht_dcperiod) -export(ht_dcphase) export(ht_phasor) -export(ht_sine) +export(ht_sine_wave) export(ht_trendline) export(ht_trendmode) export(indicator) diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 495ebcdea..b33233ccb 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -7,6 +7,18 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun bollinger_bands #' +#' @param ma A function call to a moving average function. +#' @param up,down A pair of [double] for upper and lower standard deviations. +#' +#' @returns +#' A [data.frame]- or [matrix]-object with the format: +#' +#' \describe{ +#' \item{upper}{[double]. The lower band.} +#' \item{middle}{[double]. The middle band.} +#' \item{lower}{[double]. The upper band.} +#' } +#' #' @template description bollinger_bands <- function( x, @@ -93,6 +105,7 @@ bollinger_bands.default <- function( #' @export bollinger_bands.numeric <- function( x, + cols, ma = SMA(n = 10), up = 2, down = 2, @@ -100,13 +113,35 @@ bollinger_bands.numeric <- function( ) { ma <- map_maType_call(substitute(ma)) - .Call( - "impl_ta_BBANDS", - as.double(x), - ma$n, - as.numeric(up), - as.numeric(down), - as.integer(ma$maType) + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + + as.data.frame( + .Call( + "impl_ta_BBANDS", + as.double(x), + ma$n, + as.numeric(up), + as.numeric(down), + as.integer(ma$maType) + ) ) } diff --git a/R/ta_CDL2CROWS.R b/R/ta_CDL2CROWS.R index 54020d690..2cb258914 100644 --- a/R/ta_CDL2CROWS.R +++ b/R/ta_CDL2CROWS.R @@ -41,7 +41,7 @@ two_crows.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDL3BLACKCROWS.R b/R/ta_CDL3BLACKCROWS.R index 49b84c7c6..07f5c68c6 100644 --- a/R/ta_CDL3BLACKCROWS.R +++ b/R/ta_CDL3BLACKCROWS.R @@ -41,7 +41,7 @@ three_black_crows.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDL3INSIDE.R b/R/ta_CDL3INSIDE.R index 33a0f8b3b..fd11eb009 100644 --- a/R/ta_CDL3INSIDE.R +++ b/R/ta_CDL3INSIDE.R @@ -41,7 +41,7 @@ three_inside.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDL3LINESTRIKE.R b/R/ta_CDL3LINESTRIKE.R index 403db41eb..5b627a898 100644 --- a/R/ta_CDL3LINESTRIKE.R +++ b/R/ta_CDL3LINESTRIKE.R @@ -41,7 +41,7 @@ three_line_strike.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDL3OUTSIDE.R b/R/ta_CDL3OUTSIDE.R index 507311043..e2361de30 100644 --- a/R/ta_CDL3OUTSIDE.R +++ b/R/ta_CDL3OUTSIDE.R @@ -41,7 +41,7 @@ three_outside.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDL3STARSINSOUTH.R b/R/ta_CDL3STARSINSOUTH.R index 70671b35d..aec31f958 100644 --- a/R/ta_CDL3STARSINSOUTH.R +++ b/R/ta_CDL3STARSINSOUTH.R @@ -41,7 +41,7 @@ three_stars_in_the_south.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDL3WHITESOLDIERS.R b/R/ta_CDL3WHITESOLDIERS.R index 20763edbe..449b5a4db 100644 --- a/R/ta_CDL3WHITESOLDIERS.R +++ b/R/ta_CDL3WHITESOLDIERS.R @@ -41,7 +41,7 @@ three_white_soldiers.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDLABANDONEDBABY.R b/R/ta_CDLABANDONEDBABY.R index e80c1445c..33194dc91 100644 --- a/R/ta_CDLABANDONEDBABY.R +++ b/R/ta_CDLABANDONEDBABY.R @@ -43,7 +43,7 @@ abandoned_baby.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDLADVANCEDBLOCK.R b/R/ta_CDLADVANCEDBLOCK.R index 383504188..6a3044de1 100644 --- a/R/ta_CDLADVANCEDBLOCK.R +++ b/R/ta_CDLADVANCEDBLOCK.R @@ -41,7 +41,7 @@ advance_block.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index 864a6c7e8..b844e2732 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -41,7 +41,7 @@ doji.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index 76285cf40..4574af8ba 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -41,7 +41,7 @@ doji_star.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index 96f138062..c3a66d595 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -41,7 +41,7 @@ dragonfly_doji.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index df12ede29..eb321713f 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -43,7 +43,7 @@ evening_doji_star.default <- function( ## is numerical values if (!missing(cols)) { ## check if formula - asset( + assert( is.formula(cols), paste0( "'cols' has to be <", diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R index 2712d16eb..9e7ea498b 100644 --- a/R/ta_HT_DCPERIOD.R +++ b/R/ta_HT_DCPERIOD.R @@ -1,14 +1,134 @@ -#' @title Hilbert Transform - Dominant Cycle Period -#' @family Cycle Indicator #' @export -ht_dcperiod <- function(x, ...) { +#' @family Cycle Indicator +#' +#' @title Hilbert Transform - Dominant Cycle Period +#' +#' @templateVar .title Hilbert Transform - Dominant Cycle Period +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ht_dcperiod +#' +#' @template description +ht_dcperiod <- function( + x, + ... +) { UseMethod("ht_dcperiod") } +#' @usage NULL +#' @aliases ht_dcperiod +#' @export +HT_DCPERIOD <- ht_dcperiod + +#' @usage NULL +#' @aliases ht_dcperiod +#' @export +ht_dcperiod.default <- function( + x, + cols, + ... +) { + if (!missing(cols)) { + ## check for formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">.", + "Got <", + class(cols), + ">." + ) + ) + + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## extract series + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + x <- as.data.frame( + .Call( + "impl_ta_HT_DCPERIOD", + x[[1]] + ) + ) + + colnames(x)[1] <- "dominant_cycle_period" + + return(x) +} + + +#' @usage NULL +#' @aliases ht_dcperiod +#' @export +ht_dcperiod.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases ht_dcperiod #' @export -ht_dcperiod.default <- function(x, ...) { +ht_dcperiod.numeric <- function( + x, + cols, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_HT_DCPERIOD", - as.numeric(x) + x + ) +} + +#' @usage NULL +#' @aliases ht_dcperiod +#' @export +ht_dcperiod.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R index 7d0222524..64c743734 100644 --- a/R/ta_HT_DCPHASE.R +++ b/R/ta_HT_DCPHASE.R @@ -1,14 +1,134 @@ -#' @title Hilbert Transform - Dominant Cycle Phase +#' @export #' @family Cycle Indicator +#' +#' @title Hilbert Transform - Dominant Cycle Phase +#' +#' @templateVar .title Hilbert Transform - Dominant Cycle Phase +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ht_dc_phase +#' +#' @template description +ht_dc_phase <- function( + x, + ... +) { + UseMethod("ht_dc_phase") +} + +#' @usage NULL +#' @aliases ht_dc_phase +#' @export +HT_DCPHASE <- ht_dc_phase + +#' @usage NULL +#' @aliases ht_dc_phase +#' @export +ht_dc_phase.default <- function( + x, + cols, + ... +) { + if (!missing(cols)) { + ## check for formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">.", + "Got <", + class(cols), + ">." + ) + ) + + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## extract series + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + x <- as.data.frame( + .Call( + "impl_ta_HT_DCPHASE", + x[[1]] + ) + ) + + colnames(x)[1] <- "dominant_cycle_period" + + return(x) +} + + +#' @usage NULL +#' @aliases ht_dc_phase #' @export -ht_dcphase <- function(x, ...) { - UseMethod("ht_dcphase") +ht_dc_phase.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) } +#' @usage NULL +#' @aliases ht_dc_phase #' @export -ht_dcphase.default <- function(x, ...) { +ht_dc_phase.numeric <- function( + x, + cols, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_HT_DCPHASE", - as.numeric(x) + x + ) +} + +#' @usage NULL +#' @aliases ht_dc_phase +#' @export +ht_dc_phase.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R index da59eba93..a0e49d12b 100644 --- a/R/ta_HT_PHASOR.R +++ b/R/ta_HT_PHASOR.R @@ -1,14 +1,134 @@ -#' @title Hilbert Transform - Phasor Components -#' @family Cycle Indicator #' @export -ht_phasor <- function(x, ...) { +#' @family Cycle Indicator +#' +#' @title Hilbert Transform - Phasor Components +#' +#' @templateVar .title Hilbert Transform - Phasor Components +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ht_phasor +#' +#' @template description +ht_phasor <- function( + x, + ... +) { UseMethod("ht_phasor") } +#' @usage NULL +#' @aliases ht_phasor +#' @export +HT_PHASOR <- ht_phasor + +#' @usage NULL +#' @aliases ht_phasor +#' @export +ht_phasor.default <- function( + x, + cols, + ... +) { + if (!missing(cols)) { + ## check for formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">.", + "Got <", + class(cols), + ">." + ) + ) + + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## extract series + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + x <- as.data.frame( + .Call( + "impl_ta_HT_PHASOR", + x[[1]] + ) + ) + + colnames(x)[1] <- "dominant_cycle_period" + + return(x) +} + + +#' @usage NULL +#' @aliases ht_phasor +#' @export +ht_phasor.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases ht_phasor #' @export -ht_phasor.default <- function(x, ...) { +ht_phasor.numeric <- function( + x, + cols, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_HT_PHASOR", - as.numeric(x) + x + ) +} + +#' @usage NULL +#' @aliases ht_phasor +#' @export +ht_phasor.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R index c98bd05e6..2cacc9d4e 100644 --- a/R/ta_HT_SINE.R +++ b/R/ta_HT_SINE.R @@ -1,14 +1,134 @@ -#' @title Hilbert Transform - SineWave +#' @export #' @family Cycle Indicator +#' +#' @title Hilbert Transform - SineWave +#' +#' @templateVar .title Hilbert Transform - SineWave +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ht_sine_wave +#' +#' @template description +ht_sine_wave <- function( + x, + ... +) { + UseMethod("ht_sine_wave") +} + +#' @usage NULL +#' @aliases ht_sine_wave +#' @export +HT_SINE <- ht_sine_wave + +#' @usage NULL +#' @aliases ht_sine_wave +#' @export +ht_sine_wave.default <- function( + x, + cols, + ... +) { + if (!missing(cols)) { + ## check for formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">.", + "Got <", + class(cols), + ">." + ) + ) + + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## extract series + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + x <- as.data.frame( + .Call( + "impl_ta_HT_SINE", + x[[1]] + ) + ) + + colnames(x)[1] <- "dominant_cycle_period" + + return(x) +} + + +#' @usage NULL +#' @aliases ht_sine_wave #' @export -ht_sine <- function(x, ...) { - UseMethod("ht_sine") +ht_sine_wave.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) } +#' @usage NULL +#' @aliases ht_sine_wave #' @export -ht_sine.default <- function(x, ...) { +ht_sine_wave.numeric <- function( + x, + cols, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_HT_SINE", - as.numeric(x) + x + ) +} + +#' @usage NULL +#' @aliases ht_sine_wave +#' @export +ht_sine_wave.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R index d92c868a7..4b7746704 100644 --- a/R/ta_HT_TRENDLINE.R +++ b/R/ta_HT_TRENDLINE.R @@ -1,14 +1,134 @@ -#' @title Hilbert Transform - Instantaneous Trendline -#' @family Cycle Indicator #' @export -ht_trendline <- function(x, ...) { +#' @family Overlap Study +#' +#' @title Hilbert Transform - Instantaneous Trendline +#' +#' @templateVar .title Hilbert Transform - Instantaneous Trendline +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ht_trendline +#' +#' @template description +ht_trendline <- function( + x, + ... +) { UseMethod("ht_trendline") } +#' @usage NULL +#' @aliases ht_trendline +#' @export +HT_TRENDLINE <- ht_trendline + +#' @usage NULL +#' @aliases ht_trendline +#' @export +ht_trendline.default <- function( + x, + cols, + ... +) { + if (!missing(cols)) { + ## check for formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">.", + "Got <", + class(cols), + ">." + ) + ) + + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## extract series + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + x <- as.data.frame( + .Call( + "impl_ta_HT_TRENDLINE", + x[[1]] + ) + ) + + colnames(x)[1] <- "dominant_cycle_period" + + return(x) +} + + +#' @usage NULL +#' @aliases ht_trendline #' @export -ht_trendline.default <- function(x, ...) { +ht_trendline.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases ht_trendline +#' @export +ht_trendline.numeric <- function( + x, + cols, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_HT_TRENDLINE", - as.numeric(x) + x + ) +} + +#' @usage NULL +#' @aliases ht_trendline +#' @export +ht_trendline.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R index a91d8724d..e66f7efd1 100644 --- a/R/ta_HT_TRENDMODE.R +++ b/R/ta_HT_TRENDMODE.R @@ -1,14 +1,134 @@ -#' @title Hilbert Transform - Trend vs Cycle Mode -#' @family Cycle Indicator #' @export -ht_trendmode <- function(x, ...) { +#' @family Cycle Indicator +#' +#' @title Hilbert Transform - Trend vs Cycle Mode +#' +#' @templateVar .title Hilbert Transform - Trend vs Cycle Mode +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun ht_trendmode +#' +#' @template description +ht_trendmode <- function( + x, + ... +) { UseMethod("ht_trendmode") } +#' @usage NULL +#' @aliases ht_trendmode +#' @export +HT_TRENDMODE <- ht_trendmode + +#' @usage NULL +#' @aliases ht_trendmode +#' @export +ht_trendmode.default <- function( + x, + cols, + ... +) { + if (!missing(cols)) { + ## check for formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">.", + "Got <", + class(cols), + ">." + ) + ) + + assert( + length(all.vars(cols)) == 1, + paste0( + "'cols' has to be length 1. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## extract series + x <- series( + x = cols, + default = ~open, + data = x, + ... + ) + + x <- as.data.frame( + .Call( + "impl_ta_HT_TRENDMODE", + x[[1]] + ) + ) + + colnames(x)[1] <- "dominant_cycle_period" + + return(x) +} + + +#' @usage NULL +#' @aliases ht_trendmode +#' @export +ht_trendmode.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases ht_trendmode #' @export -ht_trendmode.default <- function(x, ...) { +ht_trendmode.numeric <- function( + x, + cols, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + .Call( "impl_ta_HT_TRENDMODE", - as.numeric(x) + x + ) +} + +#' @usage NULL +#' @aliases ht_trendmode +#' @export +ht_trendmode.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() ) } diff --git a/man/DEMA.Rd b/man/DEMA.Rd index ff54b30ba..be240f923 100644 --- a/man/DEMA.Rd +++ b/man/DEMA.Rd @@ -13,13 +13,13 @@ DEMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{dema()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/EMA.Rd b/man/EMA.Rd index 33d82e897..df55d4b1a 100644 --- a/man/EMA.Rd +++ b/man/EMA.Rd @@ -13,13 +13,13 @@ EMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{ema()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/KAMA.Rd b/man/KAMA.Rd index 7acc07b84..d52b40b59 100644 --- a/man/KAMA.Rd +++ b/man/KAMA.Rd @@ -13,13 +13,13 @@ KAMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{kama()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/MAMA.Rd b/man/MAMA.Rd index eaf5f2226..fc8910238 100644 --- a/man/MAMA.Rd +++ b/man/MAMA.Rd @@ -13,13 +13,13 @@ MAMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{mama()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/SMA.Rd b/man/SMA.Rd index 1d9eab3aa..b20fbbf99 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -13,13 +13,13 @@ SMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{sma()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/T3.Rd b/man/T3.Rd index 8fd4011b6..7f807d99d 100644 --- a/man/T3.Rd +++ b/man/T3.Rd @@ -13,13 +13,13 @@ T3(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{t3()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/TEMA.Rd b/man/TEMA.Rd index b10ec9f27..ac5d8bc85 100644 --- a/man/TEMA.Rd +++ b/man/TEMA.Rd @@ -13,13 +13,13 @@ TEMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{tema()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/TRIMA.Rd b/man/TRIMA.Rd index 9878d2a21..bb74ea599 100644 --- a/man/TRIMA.Rd +++ b/man/TRIMA.Rd @@ -13,13 +13,13 @@ TRIMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{trima()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TEMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/WMA.Rd b/man/WMA.Rd index 856811437..bde294a5a 100644 --- a/man/WMA.Rd +++ b/man/WMA.Rd @@ -13,13 +13,13 @@ WMA(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{wma()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -70,7 +70,8 @@ Other Overlap Study: \code{\link{TEMA}()}, \code{\link{TRIMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index 7a996ebd6..dda105e58 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -7,13 +7,11 @@ abandoned_baby(x, cols, eps = 0, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 069c21cbc..13cfb3c39 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -7,13 +7,13 @@ acceleration_bands(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{acceleration_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -64,7 +64,8 @@ Other Overlap Study: \code{\link{TEMA}()}, \code{\link{TRIMA}()}, \code{\link{WMA}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/advance_block.Rd b/man/advance_block.Rd index e371f9398..92506e774 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -7,13 +7,11 @@ advance_block(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/aroon.Rd b/man/aroon.Rd index 329848e68..e348f7681 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -7,13 +7,13 @@ aroon(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{aroon()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index 98fb38dad..a64ec1463 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -7,13 +7,13 @@ aroon_oscillator(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{aroon_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index c0bfb63e8..216ee6d93 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -7,13 +7,24 @@ bollinger_bands(x, cols, ma = SMA(n = 10), up = 2, down = 2, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{ma}{A function call to a moving average function.} -\item{n}{Window} +\item{up, down}{A pair of \link{double} for upper and lower standard deviations.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +A \link{data.frame}- or \link{matrix}-object with the format: + +\describe{ +\item{upper}{\link{double}. The lower band.} +\item{middle}{\link{double}. The middle band.} +\item{lower}{\link{double}. The upper band.} +} } \description{ The \code{bollinger_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide @@ -64,7 +75,8 @@ Other Overlap Study: \code{\link{TEMA}()}, \code{\link{TRIMA}()}, \code{\link{WMA}()}, -\code{\link{acceleration_bands}()} +\code{\link{acceleration_bands}()}, +\code{\link{ht_trendline}()} } \author{ Serkan Korkmaz diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index cf490c74c..48dc7c22a 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -7,13 +7,11 @@ chaikin_AD_line(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{chaikin_ad_line()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index c803a4e21..3792cf709 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -7,13 +7,11 @@ chaikin_AD_oscillator(x, cols, fast = 3, slow = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{chaikin_ad_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/chande_momentum_oscillator.Rd b/man/chande_momentum_oscillator.Rd index 8bf1f4dbf..59ecd069a 100644 --- a/man/chande_momentum_oscillator.Rd +++ b/man/chande_momentum_oscillator.Rd @@ -7,13 +7,13 @@ chande_momentum_oscillator(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{chande_momentum_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd index 1ea7835b3..7eec401e7 100644 --- a/man/commodity_channel_index.Rd +++ b/man/commodity_channel_index.Rd @@ -7,13 +7,13 @@ commodity_channel_index(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{commodity_channel_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/doji.Rd b/man/doji.Rd index b2ce8e4e4..a0355259a 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -7,13 +7,11 @@ doji(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/doji_star.Rd b/man/doji_star.Rd index 38428ec69..f0e017584 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -7,13 +7,11 @@ doji_star(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index c72fd875d..254aaada8 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -7,13 +7,11 @@ dragonfly_doji(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index b93f360f5..764d4ec78 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -7,13 +7,11 @@ evening_doji_star(x, cols, penetration = 0.1, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index 2a346a26c..71373d14c 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -7,13 +7,11 @@ fast_stochastic(x, cols, fast_k = 5, fast_d_MAtype = SMA(n = 10), ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{fast_stochastic()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/generic_documentation.Rd b/man/generic_documentation.Rd new file mode 100644 index 000000000..5c617fb8c --- /dev/null +++ b/man/generic_documentation.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/talib-package.R +\name{generic_documentation} +\alias{generic_documentation} +\title{Generic function documentation} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{n}{An \link{integer} of \link{length} 1.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\description{ +A generic documentation block for documenting parameters that +are common across all functions. Avoids documenting parameters +that doesn't exist downstream. +} +\keyword{internal} diff --git a/man/ht_dc_phase.Rd b/man/ht_dc_phase.Rd new file mode 100644 index 000000000..3a8d588f7 --- /dev/null +++ b/man/ht_dc_phase.Rd @@ -0,0 +1,66 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_DCPHASE.R +\name{ht_dc_phase} +\alias{ht_dc_phase} +\title{Hilbert Transform - Dominant Cycle Phase} +\usage{ +ht_dc_phase(x, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\description{ +The \code{ht_dc_phase()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ht_dc_phase(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ht_dc_phase() + ) +} +} +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dcperiod}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_sine_wave}()}, +\code{\link{ht_trendmode}()} +} +\author{ +Serkan Korkmaz +} +\concept{Cycle Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd index bf0a76028..622006e5c 100644 --- a/man/ht_dcperiod.Rd +++ b/man/ht_dcperiod.Rd @@ -6,15 +6,61 @@ \usage{ ht_dcperiod(x, ...) } +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} \description{ -Hilbert Transform - Dominant Cycle Period +The \code{ht_dcperiod()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ht_dcperiod(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ht_dcperiod() + ) +} } \seealso{ Other Cycle Indicator: -\code{\link{ht_dcphase}()}, +\code{\link{ht_dc_phase}()}, \code{\link{ht_phasor}()}, -\code{\link{ht_sine}()}, -\code{\link{ht_trendline}()}, +\code{\link{ht_sine_wave}()}, \code{\link{ht_trendmode}()} } +\author{ +Serkan Korkmaz +} \concept{Cycle Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/ht_dcphase.Rd b/man/ht_dcphase.Rd deleted file mode 100644 index 00c4587a7..000000000 --- a/man/ht_dcphase.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_HT_DCPHASE.R -\name{ht_dcphase} -\alias{ht_dcphase} -\title{Hilbert Transform - Dominant Cycle Phase} -\usage{ -ht_dcphase(x, ...) -} -\description{ -Hilbert Transform - Dominant Cycle Phase -} -\seealso{ -Other Cycle Indicator: -\code{\link{ht_dcperiod}()}, -\code{\link{ht_phasor}()}, -\code{\link{ht_sine}()}, -\code{\link{ht_trendline}()}, -\code{\link{ht_trendmode}()} -} -\concept{Cycle Indicator} diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd index 191145468..cc6cad468 100644 --- a/man/ht_phasor.Rd +++ b/man/ht_phasor.Rd @@ -6,15 +6,61 @@ \usage{ ht_phasor(x, ...) } +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} \description{ -Hilbert Transform - Phasor Components +The \code{ht_phasor()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ht_phasor(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ht_phasor() + ) +} } \seealso{ Other Cycle Indicator: +\code{\link{ht_dc_phase}()}, \code{\link{ht_dcperiod}()}, -\code{\link{ht_dcphase}()}, -\code{\link{ht_sine}()}, -\code{\link{ht_trendline}()}, +\code{\link{ht_sine_wave}()}, \code{\link{ht_trendmode}()} } +\author{ +Serkan Korkmaz +} \concept{Cycle Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/ht_sine.Rd b/man/ht_sine.Rd deleted file mode 100644 index 906e6f035..000000000 --- a/man/ht_sine.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_HT_SINE.R -\name{ht_sine} -\alias{ht_sine} -\title{Hilbert Transform - SineWave} -\usage{ -ht_sine(x, ...) -} -\description{ -Hilbert Transform - SineWave -} -\seealso{ -Other Cycle Indicator: -\code{\link{ht_dcperiod}()}, -\code{\link{ht_dcphase}()}, -\code{\link{ht_phasor}()}, -\code{\link{ht_trendline}()}, -\code{\link{ht_trendmode}()} -} -\concept{Cycle Indicator} diff --git a/man/ht_sine_wave.Rd b/man/ht_sine_wave.Rd new file mode 100644 index 000000000..6ab5b1f8b --- /dev/null +++ b/man/ht_sine_wave.Rd @@ -0,0 +1,66 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_HT_SINE.R +\name{ht_sine_wave} +\alias{ht_sine_wave} +\title{Hilbert Transform - SineWave} +\usage{ +ht_sine_wave(x, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\description{ +The \code{ht_sine_wave()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ht_sine_wave(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ht_sine_wave() + ) +} +} +\seealso{ +Other Cycle Indicator: +\code{\link{ht_dc_phase}()}, +\code{\link{ht_dcperiod}()}, +\code{\link{ht_phasor}()}, +\code{\link{ht_trendmode}()} +} +\author{ +Serkan Korkmaz +} +\concept{Cycle Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index 54b5a2d72..b7a4acd2f 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -6,15 +6,68 @@ \usage{ ht_trendline(x, ...) } +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} \description{ -Hilbert Transform - Instantaneous Trendline +The \code{ht_trendline()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ht_trendline(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ht_trendline() + ) +} } \seealso{ -Other Cycle Indicator: -\code{\link{ht_dcperiod}()}, -\code{\link{ht_dcphase}()}, -\code{\link{ht_phasor}()}, -\code{\link{ht_sine}()}, -\code{\link{ht_trendmode}()} +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()} +} +\author{ +Serkan Korkmaz } -\concept{Cycle Indicator} +\concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index 4053a770b..f99db6f3b 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -6,15 +6,61 @@ \usage{ ht_trendmode(x, ...) } +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} \description{ -Hilbert Transform - Trend vs Cycle Mode +The \code{ht_trendmode()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::ht_trendmode(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::ht_trendmode() + ) +} } \seealso{ Other Cycle Indicator: +\code{\link{ht_dc_phase}()}, \code{\link{ht_dcperiod}()}, -\code{\link{ht_dcphase}()}, \code{\link{ht_phasor}()}, -\code{\link{ht_sine}()}, -\code{\link{ht_trendline}()} +\code{\link{ht_sine_wave}()} +} +\author{ +Serkan Korkmaz } \concept{Cycle Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/money_flow_index.Rd b/man/money_flow_index.Rd index 99e9873ae..46293f20f 100644 --- a/man/money_flow_index.Rd +++ b/man/money_flow_index.Rd @@ -7,13 +7,13 @@ money_flow_index(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{money_flow_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/on_balance_volume.Rd b/man/on_balance_volume.Rd index 26dc53f38..cccabbe82 100644 --- a/man/on_balance_volume.Rd +++ b/man/on_balance_volume.Rd @@ -7,13 +7,13 @@ on_balance_volume(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{on_balance_volume()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index c712048f2..02821fb6f 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -7,13 +7,13 @@ relative_strength_index(x, cols, n = 10, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{relative_strength_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/stochastic.Rd b/man/stochastic.Rd index 21cae876e..af83f5fdd 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -7,13 +7,11 @@ stochastic(x, cols, fastk = 5, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{stochastic()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index b79f1094a..c005343e7 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -14,13 +14,13 @@ stochastic_relative_strength_index( ) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{stochastic_relative_strength_index()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index 01ff86756..ef69e7356 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -7,13 +7,11 @@ three_black_crows(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/three_inside.Rd b/man/three_inside.Rd index 2b0b5c561..c46d87cab 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -7,13 +7,11 @@ three_inside(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd index fffc4033a..9c5c45ea3 100644 --- a/man/three_line_strike.Rd +++ b/man/three_line_strike.Rd @@ -7,13 +7,11 @@ three_line_strike(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/three_outside.Rd b/man/three_outside.Rd index 6a7d616db..50b601886 100644 --- a/man/three_outside.Rd +++ b/man/three_outside.Rd @@ -7,13 +7,11 @@ three_outside(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd index 5367eb1f4..ee83a49c2 100644 --- a/man/three_stars_in_the_south.Rd +++ b/man/three_stars_in_the_south.Rd @@ -7,13 +7,11 @@ three_stars_in_the_south(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd index 01980fe6f..c0ddbd2c2 100644 --- a/man/three_white_soldiers.Rd +++ b/man/three_white_soldiers.Rd @@ -7,13 +7,11 @@ three_white_soldiers(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/two_crows.Rd b/man/two_crows.Rd index 050550e9f..a3c35e81a 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -7,13 +7,11 @@ two_crows(x, cols, ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{additional parameters passed into \link{model.frame}.} - -\item{n}{Window} +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ \describe{ diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index 20c7e67e3..52031ef67 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -12,13 +12,13 @@ ultimate_oscillator(x, cols, n = c(7, 14, 28), ...) } \arguments{ -\item{x}{An OHLC-V series that is coercible to a \link{data.frame}.} +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{cols}{A \link{formula}} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{n}{Window} +\item{n}{An \link{integer} of \link{length} 1.} -\item{...}{additional parameters passed into \link{model.frame}.} +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{ultimate_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide From 8c50396ed06b24e238c291a271eecf2e7db605d6 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 11:24:13 +0200 Subject: [PATCH 132/166] :warning: Updated .Rbuildignore :warning: * See the comments in the files. A quick recap: {talib} compiles and builds without warning/errors with the current setup. There is however a NOTE on the .a-files, if this is added the library does not link to R-side. This MAY need to be fixed on configure-side, but I do not know. --- .Rbuildignore | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/.Rbuildignore b/.Rbuildignore index 3dc14d500..29d626237 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,58 @@ ^_pkgdown\.yml$ ^docs$ ^pkgdown$ +Makefile + +## TA-Lib + +### Executable files +^src/ta-lib/bin/gen_code +^src/ta-lib/bin/ta_regtest +^src/ta-lib/dotnet/src/Release/TA-Lib-Core.dll +^src/ta-lib/src/tools/gen_code/gen_code +^src/ta-lib/src/tools/gen_code/mcpp.exe +^src/ta-lib/src/tools/ta_regtest/.libs/ta_regtest + +### Hidden files +^src/ta-lib/.editorconfig +^src/ta-lib/.git +^src/ta-lib/java/.classpath +^src/ta-lib/src/ta_abstract/frames/.dirstamp +^src/ta-lib/src/ta_abstract/tables/.dirstamp +^src/ta-lib/src/tools/ta_regtest/ta_test_func/.dirstamp +^src/ta-lib/.github +^src/ta-lib/.vscode +^src/ta-lib/src/.libs +^src/ta-lib/src/ta_abstract/.libs +^src/ta-lib/src/ta_abstract/frames/.libs +^src/ta-lib/src/ta_abstract/tables/.libs +^src/ta-lib/src/ta_common/.libs +^src/ta-lib/src/ta_func/.libs +^src/ta-lib/src/tools/ta_regtest/.libs + +### Build files +^src/ta-lib/.*\.(?:o|lo|la|so)$ +# NOTE: +# * if .a is removed it will not install +# this needs to be fixed in configure (I think) +# .a is the static library (Or something) it makes +# everything work. +# +# * checking if this is a source package ... NOTE +# Found the following apparent object files/libraries: +# src/ta-lib/local/lib/libta-lib.a +# +# * When {talib} is getting ready to be submitted +# CRAN must make a decision as to whether this *NOTE* +# is acceptable, or not. +# +# With the current setup of the .Rbuildignore everything +# builds and works --- this has been tested with +# make purge & make build & make check + +### Random stuff +src/ta-lib/m4/lt~obsolete.m4 + +### Makefiles +src/ta-lib/Makefile +src/ta-lib/Makefile.in \ No newline at end of file From 614d159fa265dc5bb1e6a0a0fb38a3942d70a946 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 13:28:06 +0200 Subject: [PATCH 133/166] Parabolic SAR (Normal + Extended) * Unit-tests, documentation and {plotly}-methods added. - It works like charm, all tests passes locally. --- NAMESPACE | 12 ++ R/ta_SAR.R | 206 ++++++++++++++++++++++++++ R/ta_SAREXT.R | 248 ++++++++++++++++++++++++++++++++ man/DEMA.Rd | 4 +- man/EMA.Rd | 4 +- man/KAMA.Rd | 4 +- man/MAMA.Rd | 4 +- man/SMA.Rd | 4 +- man/T3.Rd | 4 +- man/TEMA.Rd | 4 +- man/TRIMA.Rd | 4 +- man/WMA.Rd | 4 +- man/acceleration_bands.Rd | 4 +- man/bollinger_bands.Rd | 4 +- man/extended_parabolic_sar.Rd | 102 +++++++++++++ man/ht_trendline.Rd | 4 +- man/parabolic_sar.Rd | 90 ++++++++++++ src/api.h | 2 + src/init.c | 2 + src/ta_SAR.c | 74 ++++++++++ src/ta_SAREXT.c | 102 +++++++++++++ tests/testthat/test-ta_SAR.R | 55 +++++++ tests/testthat/test-ta_SAREXT.R | 55 +++++++ 23 files changed, 984 insertions(+), 12 deletions(-) create mode 100644 R/ta_SAR.R create mode 100644 R/ta_SAREXT.R create mode 100644 man/extended_parabolic_sar.Rd create mode 100644 man/parabolic_sar.Rd create mode 100644 src/ta_SAR.c create mode 100644 src/ta_SAREXT.c create mode 100644 tests/testthat/test-ta_SAR.R create mode 100644 tests/testthat/test-ta_SAREXT.R diff --git a/NAMESPACE b/NAMESPACE index 0ddad8dc6..dc5e14bc8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -98,6 +98,10 @@ S3method(dragonfly_doji,matrix) S3method(evening_doji_star,data.frame) S3method(evening_doji_star,default) S3method(evening_doji_star,matrix) +S3method(extended_parabolic_sar,data.frame) +S3method(extended_parabolic_sar,default) +S3method(extended_parabolic_sar,matrix) +S3method(extended_parabolic_sar,plotly) S3method(fast_stochastic,data.frame) S3method(fast_stochastic,default) S3method(fast_stochastic,matrix) @@ -135,6 +139,10 @@ S3method(on_balance_volume,data.frame) S3method(on_balance_volume,default) S3method(on_balance_volume,matrix) S3method(on_balance_volume,plotly) +S3method(parabolic_sar,data.frame) +S3method(parabolic_sar,default) +S3method(parabolic_sar,matrix) +S3method(parabolic_sar,plotly) S3method(relative_strength_index,data.frame) S3method(relative_strength_index,default) S3method(relative_strength_index,matrix) @@ -211,6 +219,8 @@ export(MAMA) export(MFI) export(OBV) export(RSI) +export(SAR) +export(SAREXT) export(SMA) export(STOCH) export(STOCHF) @@ -238,6 +248,7 @@ export(double_exponential_moving_average) export(dragonfly_doji) export(evening_doji_star) export(exponential_moving_average) +export(extended_parabolic_sar) export(fast_stochastic) export(ht_dc_phase) export(ht_dcperiod) @@ -251,6 +262,7 @@ export(mesa_adaptive_moving_average) export(money_flow_index) export(moving_average_convergence_divergence) export(on_balance_volume) +export(parabolic_sar) export(relative_strength_index) export(simple_moving_average) export(stochastic) diff --git a/R/ta_SAR.R b/R/ta_SAR.R new file mode 100644 index 000000000..64f7c9897 --- /dev/null +++ b/R/ta_SAR.R @@ -0,0 +1,206 @@ +#' @export +#' @family Overlap Study +#' +#' @title Parabolic Stop and Reverse (SAR) +#' +#' @templateVar .title Parabolic Stop and Reverse (SAR) +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun parabolic_sar +#' +#' @param acceleration A function call to a moving average function. +#' @param maximum A pair of [double] for upper and lower standard deviations. +#' +#' @returns +#' A [data.frame]- or [matrix]-object with the format: +#' +#' \describe{ +#' \item{upper}{[double]. The lower band.} +#' \item{middle}{[double]. The middle band.} +#' \item{lower}{[double]. The upper band.} +#' } +#' +#' @template description +parabolic_sar <- function( + x, + cols, + acceleration = 0.02, + maximum = 0.2, + ... +) { + UseMethod( + generic = "parabolic_sar" + ) +} + +#' @usage NULL +#' @aliases parabolic_sar +#' @export +SAR <- parabolic_sar + +#' @usage NULL +#' @aliases parabolic_sar +#' @export +parabolic_sar.default <- function( + x, + cols, + acceleration = 0.02, + maximum = 0.2, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 2, + paste0( + "'cols' has to be length 2. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + HL <- series( + x = cols, + default = ~ high + low, + data = x, + ... + ) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + output <- as.data.frame( + .Call( + "impl_ta_SAR", + HL[[1]], + HL[[2]], + as.double(acceleration), + as.double(maximum) + ) + ) + + colnames(output)[1] <- "SAR" + + return(output) +} + +#' @usage NULL +#' @aliases parabolic_sar +#' @export +parabolic_sar.data.frame <- function( + x, + cols, + acceleration = 0.02, + maximum = 0.2, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases parabolic_sar +#' @export +parabolic_sar.matrix <- function( + x, + cols, + acceleration = 0.02, + maximum = 0.2, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases parabolic_sar +#' @export +parabolic_sar.plotly <- function( + x, + cols, + acceleration = 0.02, + maximum = 0.2, + ... +) { + ## prepare series + ## from + HL <- series( + x = x, + formula = cols, + default = ~ high + low, + ... + ) + + .indicator <- as.data.frame( + .Call( + "impl_ta_SAR", + HL[[1]], + HL[[2]], + as.double(acceleration), + as.double(maximum) + ) + ) + + colnames(.indicator)[1] <- "SAR" + + .indicator$idx <- 1:nrow(.indicator) + + ## calculate colors for + ## the chart + + ## identify bullish + ## signals + bull <- (.indicator$SAR < as.numeric(HL[[2L]])) + + ## determine colors + ## + colors <- ifelse( + bull, + plotly::toRGB(chart.theme()$bull_color, alpha = 0.8), + plotly::toRGB(chart.theme()$bear_color, alpha = 0.8) + ) + + ## constuct chart + ## element + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~SAR, + type = "scatter", + mode = "markers", + name = sprintf( + "PSAR(%f,%f)", + acceleration, + maximum + ), + inherit = FALSE, + marker = list( + size = 5, + color = colors, + line = list( + color = "black", + width = 1 + ) + ) + ) + + .plotting_environment$main +} diff --git a/R/ta_SAREXT.R b/R/ta_SAREXT.R new file mode 100644 index 000000000..867dd999f --- /dev/null +++ b/R/ta_SAREXT.R @@ -0,0 +1,248 @@ +#' @export +#' @family Overlap Study +#' +#' @title Parabolic Stop and Reverse (SAR) - Extended +#' +#' @templateVar .title Parabolic Stop and Reverse (SAR) - Extended +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun extended_parabolic_sar +#' +#' @param acceleration A function call to a moving average function. +#' @param maximum A pair of [double] for upper and lower standard deviations. +#' +#' @returns +#' A [data.frame]- or [matrix]-object with the format: +#' +#' \describe{ +#' \item{upper}{[double]. The lower band.} +#' \item{middle}{[double]. The middle band.} +#' \item{lower}{[double]. The upper band.} +#' } +#' +#' @template description +extended_parabolic_sar <- function( + x, + cols, + start_value = 0, + offeset_on_reverse = 0, + acceleration_init_long = 0, + acceleration_long = 0, + acceleration_max_long = 0, + accelration_init_short = 0, + acceleration_short = 0, + acceleration_max_short = 0, + ... +) { + UseMethod( + generic = "extended_parabolic_sar" + ) +} + +#' @usage NULL +#' @aliases extended_parabolic_sar +#' @export +SAREXT <- extended_parabolic_sar + +#' @usage NULL +#' @aliases extended_parabolic_sar +#' @export +extended_parabolic_sar.default <- function( + x, + cols, + start_value = 0, + offeset_on_reverse = 0, + acceleration_init_long = 0, + acceleration_long = 0, + acceleration_max_long = 0, + accelration_init_short = 0, + acceleration_short = 0, + acceleration_max_short = 0, + ... +) { + ## check input + ## cols if passed + if (!missing(cols)) { + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + assert( + length(all.vars(cols)) == 2, + paste0( + "'cols' has to be length 2. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## default behaviour is to + ## coerce to a `matrix` check that + ## it is double and then pass to + ## C-side. + HL <- series( + x = cols, + default = ~ high + low, + data = x, + ... + ) + + ## 1) pass `x` assuming that it + ## follows OHLC-V structure + output <- as.data.frame( + .Call( + "impl_ta_SAREXT", + HL[[1]], + HL[[2]], + start_value, + offeset_on_reverse, + acceleration_init_long, + acceleration_long, + acceleration_max_long, + accelration_init_short, + acceleration_short, + acceleration_max_short + ) + ) + + colnames(output)[1] <- "SAR" + + return(output) +} + +#' @usage NULL +#' @aliases extended_parabolic_sar +#' @export +extended_parabolic_sar.data.frame <- function( + x, + cols, + start_value = 0, + offeset_on_reverse = 0, + acceleration_init_long = 0, + acceleration_long = 0, + acceleration_max_long = 0, + accelration_init_short = 0, + acceleration_short = 0, + acceleration_max_short = 0, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases extended_parabolic_sar +#' @export +extended_parabolic_sar.matrix <- function( + x, + cols, + start_value = 0, + offeset_on_reverse = 0, + acceleration_init_long = 0, + acceleration_long = 0, + acceleration_max_long = 0, + accelration_init_short = 0, + acceleration_short = 0, + acceleration_max_short = 0, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases extended_parabolic_sar +#' @export +extended_parabolic_sar.plotly <- function( + x, + cols, + start_value = 0, + offeset_on_reverse = 0, + acceleration_init_long = 0, + acceleration_long = 0, + acceleration_max_long = 0, + accelration_init_short = 0, + acceleration_short = 0, + acceleration_max_short = 0, + ... +) { + ## prepare series + ## from + HL <- series( + x = x, + formula = cols, + default = ~ high + low, + ... + ) + + .indicator <- as.data.frame( + .Call( + "impl_ta_SAREXT", + HL[[1]], + HL[[2]], + start_value, + offeset_on_reverse, + acceleration_init_long, + acceleration_long, + acceleration_max_long, + accelration_init_short, + acceleration_short, + acceleration_max_short + ) + ) + + colnames(.indicator)[1] <- "SAR" + + .indicator$idx <- 1:nrow(.indicator) + + ## calculate colors for + ## the chart + + ## identify bullish + ## signals + bull <- (.indicator$SAR < as.numeric(HL[[2L]])) + + ## determine colors + ## + colors <- ifelse( + bull, + plotly::toRGB(chart.theme()$bull_color, alpha = 0.8), + plotly::toRGB(chart.theme()$bear_color, alpha = 0.8) + ) + + ## constuct chart + ## element + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~SAR, + type = "scatter", + mode = "markers", + name = sprintf( + "EPSAR(%f,%f)", + 1, + 1 + ), + inherit = FALSE, + marker = list( + size = 5, + color = colors, + line = list( + color = "black", + width = 1 + ) + ) + ) + + .plotting_environment$main +} diff --git a/man/DEMA.Rd b/man/DEMA.Rd index be240f923..08ac154ed 100644 --- a/man/DEMA.Rd +++ b/man/DEMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/EMA.Rd b/man/EMA.Rd index df55d4b1a..d9768f8e3 100644 --- a/man/EMA.Rd +++ b/man/EMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/KAMA.Rd b/man/KAMA.Rd index d52b40b59..98330f11a 100644 --- a/man/KAMA.Rd +++ b/man/KAMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/MAMA.Rd b/man/MAMA.Rd index fc8910238..6e8873905 100644 --- a/man/MAMA.Rd +++ b/man/MAMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/SMA.Rd b/man/SMA.Rd index b20fbbf99..13d9d4097 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/T3.Rd b/man/T3.Rd index 7f807d99d..b7a251003 100644 --- a/man/T3.Rd +++ b/man/T3.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/TEMA.Rd b/man/TEMA.Rd index ac5d8bc85..0d9623d7f 100644 --- a/man/TEMA.Rd +++ b/man/TEMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/TRIMA.Rd b/man/TRIMA.Rd index bb74ea599..672349e96 100644 --- a/man/TRIMA.Rd +++ b/man/TRIMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/WMA.Rd b/man/WMA.Rd index bde294a5a..f49c47fe1 100644 --- a/man/WMA.Rd +++ b/man/WMA.Rd @@ -71,7 +71,9 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{acceleration_bands}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 13cfb3c39..4dddbdb16 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -65,7 +65,9 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{bollinger_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index 216ee6d93..1db7d1dba 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -76,7 +76,9 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{ht_trendline}()} +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/extended_parabolic_sar.Rd b/man/extended_parabolic_sar.Rd new file mode 100644 index 000000000..11fc4d819 --- /dev/null +++ b/man/extended_parabolic_sar.Rd @@ -0,0 +1,102 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_SAREXT.R +\name{extended_parabolic_sar} +\alias{extended_parabolic_sar} +\title{Parabolic Stop and Reverse (SAR) - Extended} +\usage{ +extended_parabolic_sar( + x, + cols, + start_value = 0, + offeset_on_reverse = 0, + acceleration_init_long = 0, + acceleration_long = 0, + acceleration_max_long = 0, + accelration_init_short = 0, + acceleration_short = 0, + acceleration_max_short = 0, + ... +) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} + +\item{acceleration}{A function call to a moving average function.} + +\item{maximum}{A pair of \link{double} for upper and lower standard deviations.} +} +\value{ +A \link{data.frame}- or \link{matrix}-object with the format: + +\describe{ +\item{upper}{\link{double}. The lower band.} +\item{middle}{\link{double}. The middle band.} +\item{lower}{\link{double}. The upper band.} +} +} +\description{ +The \code{extended_parabolic_sar()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::extended_parabolic_sar(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::extended_parabolic_sar() + ) +} +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{ht_trendline}()}, +\code{\link{parabolic_sar}()} +} +\author{ +Serkan Korkmaz +} +\concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index b7a4acd2f..67bb655cb 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -61,7 +61,9 @@ Other Overlap Study: \code{\link{TRIMA}()}, \code{\link{WMA}()}, \code{\link{acceleration_bands}()}, -\code{\link{bollinger_bands}()} +\code{\link{bollinger_bands}()}, +\code{\link{extended_parabolic_sar}()}, +\code{\link{parabolic_sar}()} } \author{ Serkan Korkmaz diff --git a/man/parabolic_sar.Rd b/man/parabolic_sar.Rd new file mode 100644 index 000000000..e4455c87c --- /dev/null +++ b/man/parabolic_sar.Rd @@ -0,0 +1,90 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_SAR.R +\name{parabolic_sar} +\alias{parabolic_sar} +\title{Parabolic Stop and Reverse (SAR)} +\usage{ +parabolic_sar(x, cols, acceleration = 0.02, maximum = 0.2, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{acceleration}{A function call to a moving average function.} + +\item{maximum}{A pair of \link{double} for upper and lower standard deviations.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +A \link{data.frame}- or \link{matrix}-object with the format: + +\describe{ +\item{upper}{\link{double}. The lower band.} +\item{middle}{\link{double}. The middle band.} +\item{lower}{\link{double}. The upper band.} +} +} +\description{ +The \code{parabolic_sar()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::parabolic_sar(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::parabolic_sar() + ) +} +} +\seealso{ +Other Overlap Study: +\code{\link{DEMA}()}, +\code{\link{EMA}()}, +\code{\link{KAMA}()}, +\code{\link{MAMA}()}, +\code{\link{SMA}()}, +\code{\link{T3}()}, +\code{\link{TEMA}()}, +\code{\link{TRIMA}()}, +\code{\link{WMA}()}, +\code{\link{acceleration_bands}()}, +\code{\link{bollinger_bands}()}, +\code{\link{extended_parabolic_sar}()}, +\code{\link{ht_trendline}()} +} +\author{ +Serkan Korkmaz +} +\concept{Overlap Study} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/src/api.h b/src/api.h index 3a2bdb04c..a32dac521 100644 --- a/src/api.h +++ b/src/api.h @@ -42,6 +42,8 @@ SEXP impl_ta_MA(SEXP x, SEXP period, SEXP matype); SEXP impl_ta_MFI(SEXP high, SEXP low, SEXP close, SEXP volume, SEXP timeperiod); SEXP impl_ta_OBV(SEXP close, SEXP volume); SEXP impl_ta_RSI(SEXP inReal, SEXP optTimePeriod); +SEXP impl_ta_SAREXT(SEXP high, SEXP low, SEXP start_value, SEXP offset_on_reverse, SEXP accel_init_long, SEXP accel_long, SEXP accel_max_long, SEXP accel_init_short, SEXP accel_short, SEXP accel_max_short); +SEXP impl_ta_SAR(SEXP high, SEXP low, SEXP acceleration, SEXP maximum); SEXP impl_ta_STOCHF(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); SEXP impl_ta_STOCHRSI(SEXP real, SEXP timeperiod, SEXP fastk_period, SEXP fastd_period, SEXP fastd_matype); SEXP impl_ta_STOCH(SEXP high, SEXP low, SEXP close, SEXP fastk_period, SEXP slowk_period, SEXP slowk_matype, SEXP slowd_period, SEXP slowd_matype); diff --git a/src/init.c b/src/init.c index 562eab6a9..ab6b68e8e 100644 --- a/src/init.c +++ b/src/init.c @@ -47,6 +47,8 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_MFI, 5), CALLDEF(impl_ta_OBV, 2), CALLDEF(impl_ta_RSI, 2), + CALLDEF(impl_ta_SAREXT, 10), + CALLDEF(impl_ta_SAR, 4), CALLDEF(impl_ta_STOCHF, 6), CALLDEF(impl_ta_STOCHRSI, 5), CALLDEF(impl_ta_STOCH, 8), diff --git a/src/ta_SAR.c b/src/ta_SAR.c new file mode 100644 index 000000000..d02e14bea --- /dev/null +++ b/src/ta_SAR.c @@ -0,0 +1,74 @@ +// Interface to TA_SAR (Parabolic SAR) +// +// Parameters +// high, low : numeric vectors (same length) +// acceleration : numeric scalar (double), step (e.g., 0.02) +// maximum : numeric scalar (double), max step (e.g., 0.2) +// +// Description +// Returns a numeric vector of length n, padded with NA_REAL for the initial +// lookback, then SAR values thereafter. + +#include "R_ext/Error.h" +#include "Rinternals.h" +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include "ta_libc.h" + +// clang-format off +SEXP impl_ta_SAR( + SEXP high, + SEXP low, + SEXP acceleration, + SEXP maximum) { + // clang-format on + + int protect_count = 0; + + const int n = LENGTH(high); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double acc = REAL(acceleration)[0]; + const double maxv = REAL(maximum)[0]; + + SEXP result = PROTECT(allocVector(REALSXP, n)); + protect_count++; + double *restrict out_ptr = REAL(result); + + const int minimum_lookback = TA_SAR_Lookback(acc, maxv); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_REAL; + + } else { + int outBeg = 0, outNb = 0; + + // clang-format off + TA_RetCode rc = TA_SAR( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inHigh */ high_ptr, + /*inLow */ low_ptr, + /*accel */ acc, + /*maximum */ maxv, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*outReal */ out_ptr + ); + // clang-format on + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_SAR failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_SAREXT.c b/src/ta_SAREXT.c new file mode 100644 index 000000000..25879175e --- /dev/null +++ b/src/ta_SAREXT.c @@ -0,0 +1,102 @@ +// Interface to TA_SAREXT (Parabolic SAR - Extended) +// +// Parameters +// high, low : numeric vectors (same length) +// start_value : numeric scalar (double) +// offset_on_reverse : numeric scalar (double) +// accel_init_long : numeric scalar (double) +// accel_long : numeric scalar (double) +// accel_max_long : numeric scalar (double) +// accel_init_short : numeric scalar (double) +// accel_short : numeric scalar (double) +// accel_max_short : numeric scalar (double) +// +// Description +// Returns a numeric vector of length n, padded with NA_REAL for the initial +// lookback, then SAREXT values thereafter. + +#include "R_ext/Error.h" +#include "Rinternals.h" +#include "lib.h" +#include "shift.h" +#include "ta_func.h" +#include "ta_libc.h" + +// clang-format off +SEXP impl_ta_SAREXT( + SEXP high, + SEXP low, + SEXP start_value, + SEXP offset_on_reverse, + SEXP accel_init_long, + SEXP accel_long, + SEXP accel_max_long, + SEXP accel_init_short, + SEXP accel_short, + SEXP accel_max_short) { + // clang-format on + + int protect_count = 0; + + const int n = LENGTH(high); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + + const double startv = REAL(start_value)[0]; + const double offset_rev = REAL(offset_on_reverse)[0]; + + const double a_init_l = REAL(accel_init_long)[0]; + const double a_l = REAL(accel_long)[0]; + const double a_max_l = REAL(accel_max_long)[0]; + + const double a_init_s = REAL(accel_init_short)[0]; + const double a_s = REAL(accel_short)[0]; + const double a_max_s = REAL(accel_max_short)[0]; + + SEXP result = PROTECT(allocVector(REALSXP, n)); + protect_count++; + double *restrict out_ptr = REAL(result); + + const int minimum_lookback = TA_SAREXT_Lookback( + startv, offset_rev, a_init_l, a_l, a_max_l, a_init_s, a_s, a_max_s); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_REAL; + + } else { + int outBeg = 0, outNb = 0; + + // clang-format off + TA_RetCode rc = TA_SAREXT( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inHigh */ high_ptr, + /*inLow */ low_ptr, + /*startV */ startv, + /*offRev */ offset_rev, + /*aInitL */ a_init_l, + /*aL */ a_l, + /*aMaxL */ a_max_l, + /*aInitS */ a_init_s, + /*aS */ a_s, + /*aMaxS */ a_max_s, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*outReal */ out_ptr + ); + // clang-format on + + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_SAREXT failed: return code %d", rc); + } + + shift_array(out_ptr, n, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/tests/testthat/test-ta_SAR.R b/tests/testthat/test-ta_SAR.R new file mode 100644 index 000000000..2c8351333 --- /dev/null +++ b/tests/testthat/test-ta_SAR.R @@ -0,0 +1,55 @@ +## script: SAR +## author: Serkan Korkmaz +testthat::test_that(desc = "Parabolic SAR", code = { + ## 1) calculate values + ## with and without alias + output <- parabolic_sar(SPY) + alias <- SAR(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(parabolic_sar()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(parabolic_sar(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(parabolic_sar(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = parabolic_sar( + BTC + ), + expected = parabolic_sar( + BTC, + cols = ~ high + low + ) + ) +}) diff --git a/tests/testthat/test-ta_SAREXT.R b/tests/testthat/test-ta_SAREXT.R new file mode 100644 index 000000000..8798b5975 --- /dev/null +++ b/tests/testthat/test-ta_SAREXT.R @@ -0,0 +1,55 @@ +## script: SAREXT +## author: Serkan Korkmaz +testthat::test_that(desc = "Parabolic SAR (Extended)", code = { + ## 1) calculate values + ## with and without alias + output <- extended_parabolic_sar(SPY) + alias <- SAREXT(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(extended_parabolic_sar()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(extended_parabolic_sar(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(extended_parabolic_sar(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = extended_parabolic_sar( + BTC + ), + expected = extended_parabolic_sar( + BTC, + cols = ~ high + low + ) + ) +}) From d69cb647b3a83050e1bf65e1ead404af99ce5411 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 19:10:49 +0200 Subject: [PATCH 134/166] :hammer: Bug-fix is ULTOSC * It was referencing the passed OHLC-V series instead of the one generated via series() --- R/ta_ULTOSC.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R index 7dbf5485c..9eab7b820 100644 --- a/R/ta_ULTOSC.R +++ b/R/ta_ULTOSC.R @@ -57,9 +57,9 @@ ultimate_oscillator.default <- function( x <- as.data.frame( .Call( "impl_ta_ULTOSC", - x[[1]], - x[[2]], - x[[3]], + HLC[[1]], + HLC[[2]], + HLC[[3]], as.integer(n[1]), as.integer(n[2]), as.integer(n[3]) @@ -130,7 +130,7 @@ ultimate_oscillator.plotly <- function( y = ~utimate_oscillator, type = "scatter", mode = "lines", - name = "StochRSI %K", + name = "Ultimate Oscillator", legendgroup = "ultimate_oscillator", showlegend = TRUE ) From e868c82d46b4df386a53bb8ff3bcfd0c8690d635 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 21:34:06 +0200 Subject: [PATCH 135/166] :hammer: Updated Aroon and Aroon Oscillator * The core-files have been updated (These were written at a time where I knew zero C) * Updated documentation. --- R/ta_AROON.R | 12 ++++- R/ta_AROONOSC.R | 21 +++++++- man/aroon.Rd | 8 +++ man/aroon_oscillator.Rd | 7 +++ src/api.h | 4 +- src/ta_AROON.c | 114 ++++++++++++++++++++++------------------ src/ta_AROONOSC.c | 104 ++++++++++++++++++++---------------- 7 files changed, 167 insertions(+), 103 deletions(-) diff --git a/R/ta_AROON.R b/R/ta_AROON.R index 80c063a95..3b2453141 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -6,6 +6,14 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun aroon #' +#' @returns +#' A [data.frame]- or [matrix]-object: +#' +#' \describe{ +#' \item{aroon_up <[double]>}{} +#' \item{aroon_down <[double]>}{} +#' } +#' #' @template description aroon <- function( x, @@ -131,7 +139,7 @@ aroon.plotly <- function( ad_plot <- plotly::plot_ly( data = .indicator, x = ~idx, - y = ~aroondown, + y = ~aroon_down, type = "scatter", mode = "lines", # line = list(color = ad_col), @@ -144,7 +152,7 @@ aroon.plotly <- function( ad_plot <- plotly::add_lines( p = ad_plot, x = .indicator$idx, - y = ~aroonup, + y = ~aroon_up, # line = list(color = ad_col, dash = "dash"), showlegend = FALSE, hoverinfo = "skip", diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index d13dc574c..4f460912b 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -6,8 +6,20 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun aroon_oscillator #' +#' @returns +#' A [data.frame]- or [matrix]-object: +#' +#' \describe{ +#' \item{aroon_oscillator <[double]>}{} +#' } +#' #' @template description -aroon_oscillator <- function(x, cols, n = 10, ...) { +aroon_oscillator <- function( + x, + cols, + n = 10, + ... +) { UseMethod( generic = "aroon_oscillator" ) @@ -19,7 +31,12 @@ aroon_oscillator <- function(x, cols, n = 10, ...) { AROONOSC <- aroon_oscillator #' @export -aroon_oscillator.default <- function(x, cols, n = 10, ...) { +aroon_oscillator.default <- function( + x, + cols, + n = 10, + ... +) { ## check input ## cols if passed if (!missing(cols)) { diff --git a/man/aroon.Rd b/man/aroon.Rd index e348f7681..52b792242 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -15,6 +15,14 @@ aroon(x, cols, n = 10, ...) \item{...}{Additional parameters passed into \link{model.frame}} } +\value{ +A \link{data.frame}- or \link{matrix}-object: + +\describe{ +\item{aroon_up <\link{double}>}{} +\item{aroon_down <\link{double}>}{} +} +} \description{ The \code{aroon()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index a64ec1463..ea78831af 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -15,6 +15,13 @@ aroon_oscillator(x, cols, n = 10, ...) \item{...}{Additional parameters passed into \link{model.frame}} } +\value{ +A \link{data.frame}- or \link{matrix}-object: + +\describe{ +\item{aroon_oscillator <\link{double}>}{} +} +} \description{ The \code{aroon_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. diff --git a/src/api.h b/src/api.h index a32dac521..ac6d49d9d 100644 --- a/src/api.h +++ b/src/api.h @@ -11,8 +11,8 @@ SEXP impl_ta_AD(SEXP inHigh, SEXP inLow, SEXP inClose, SEXP inVolume); SEXP impl_ta_ADXR(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); SEXP impl_ta_ADX(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); SEXP impl_ta_APO(SEXP inRealSEXP, SEXP fastPeriodSEXP, SEXP slowPeriodSEXP, SEXP maTypeSEXP); -SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); -SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP); +SEXP impl_ta_AROONOSC(SEXP high, SEXP low, SEXP timeperiod); +SEXP impl_ta_AROON(SEXP high, SEXP low, SEXP timeperiod); SEXP impl_ta_BBANDS(SEXP inReal, SEXP optTimePeriod, SEXP optNbDevUp, SEXP optNbDevDn, SEXP optMAType); SEXP impl_ta_CCI(SEXP high, SEXP low, SEXP close, SEXP optTimePeriod); SEXP impl_ta_CDL2CROWS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); diff --git a/src/ta_AROON.c b/src/ta_AROON.c index 5555e1d28..70f581eef 100644 --- a/src/ta_AROON.c +++ b/src/ta_AROON.c @@ -1,69 +1,79 @@ -// Interface to ta_AROON.c +// Interface to TA_AROON (Aroon) // // Parameters -// inHigh : Numeric vector of high prices. -// inLow : Numeric vector of low prices. -// timePeriod : Integer, look-back period for Aroon. +// high, low : numeric vectors (same length) +// timeperiod : integer SEXP (typical default 14) // // Description -// Computes the Aroon indicator, which returns two series: -// AroonDown and AroonUp. Returns an n×2 matrix (columns in order: -// "aroondown", "aroonup"), with positions before lookback set to NA. +// Returns an n × 2 REAL matrix with columns "down","up". Leading NA_REAL +// are padded for the initial lookback. + +#include "R_ext/Error.h" +#include "Rinternals.h" #include "lib.h" +#include "names.h" #include "shift.h" -#include -#include -#include +#include "ta_func.h" +#include "ta_libc.h" -SEXP impl_ta_AROON(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { - R_xlen_t n = xlength(inHighSEXP); - if (xlength(inLowSEXP) != n) - error("inHigh and inLow must have the same length"); +// clang-format off +SEXP impl_ta_AROON( + SEXP high, + SEXP low, + SEXP timeperiod) { + // clang-format on - int timePeriod = asInteger(timePeriodSEXP); - const double *restrict inHigh = REAL(inHighSEXP); - const double *restrict inLow = REAL(inLowSEXP); + int protect_count = 0; - // Allocate an n×2 matrix - SEXP outMat = PROTECT(allocMatrix(REALSXP, n, 2)); - double *restrict outDown = REAL(outMat); // column 0 - double *restrict outUp = REAL(outMat) + n; // column 1 + const int n = LENGTH(high); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const int period = INTEGER(timeperiod)[0]; - // Set up dimnames for columns: lowercase names - SEXP dimnames = PROTECT(allocVector(VECSXP, 2)); - SET_VECTOR_ELT(dimnames, 0, R_NilValue); // no row names - SEXP colNames = PROTECT(allocVector(STRSXP, 2)); - SET_STRING_ELT(colNames, 0, mkChar("aroondown")); - SET_STRING_ELT(colNames, 1, mkChar("aroonup")); - SET_VECTOR_ELT(dimnames, 1, colNames); - setAttrib(outMat, R_DimNamesSymbol, dimnames); + // allocate n x 2 matrix: [down | up] + SEXP result = PROTECT(allocMatrix(REALSXP, n, 2)); + protect_count++; + double *restrict down = REAL(result); + double *restrict up = down + n; - // Call TA-Lib - int outBegIdx = 0, outNBElement = 0; + const int minimum_lookback = TA_AROON_Lookback(period); - // clang-format off - TA_RetCode ret = TA_AROON( - 0, - (int)n - 1, - inHigh, - inLow, - timePeriod, - &outBegIdx, - &outNBElement, - outDown, - outUp - ); - // clang-format on + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) { + down[i] = up[i] = NA_REAL; + } + + } else { + int outBeg = 0, outNb = 0; + // clang-format off + TA_RetCode return_code = TA_AROON( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inHigh */ high_ptr, + /*inLow */ low_ptr, + /*optPer */ period, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*outDown */ down, + /*outUp */ up + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_AROON failed: return code %d", return_code); + } - if (ret != TA_SUCCESS) { - UNPROTECT(3); - error("TA_AROON failed with error code %d", ret); + // Align to full length + shift_array(down, n, outBeg); + shift_array(up, n, outBeg); } - // shift - shift_array(outDown, n, outBegIdx); - shift_array(outUp, n, outBegIdx); + // set column names "down","up" + set_colnames(result, "aroon_down", "aroon_up"); - UNPROTECT(3); - return outMat; + UNPROTECT(protect_count); + return result; } diff --git a/src/ta_AROONOSC.c b/src/ta_AROONOSC.c index 7dfa2ac86..583331975 100644 --- a/src/ta_AROONOSC.c +++ b/src/ta_AROONOSC.c @@ -1,56 +1,70 @@ -// Interface to ta_AROONOSC.c +// Interface to TA_AROONOSC (Aroon Oscillator) // // Parameters -// inHigh : Numeric vector of high prices. -// inLow : Numeric vector of low prices. -// timePeriod : Integer, look-back period. +// high, low : numeric vectors (same length) +// timeperiod : integer SEXP (typical default 14) // // Description -// Computes the Aroon Oscillator (difference between AroonUp and -// AroonDown). Returns a numeric vector of same length as input; -// positions before lookback are NA. +// Returns a REALSXP vector of length n (down - up), padded with NA_REAL +// for the initial lookback. + +#include "R_ext/Error.h" +#include "Rinternals.h" #include "lib.h" #include "shift.h" -#include -#include -#include - -SEXP impl_ta_AROONOSC(SEXP inHighSEXP, SEXP inLowSEXP, SEXP timePeriodSEXP) { - R_xlen_t n = xlength(inHighSEXP); - if (xlength(inLowSEXP) != n) - error("inHigh and inLow must have the same length"); - - int timePeriod = asInteger(timePeriodSEXP); - const double *restrict inHigh = REAL(inHighSEXP); - const double *restrict inLow = REAL(inLowSEXP); - - // Allocate output vector - SEXP outOscSEXP = PROTECT(allocVector(REALSXP, n)); - double *restrict outOsc = REAL(outOscSEXP); - - // Call TA-Lib - int outBegIdx = 0, outNBElement = 0; - // clang-format off - TA_RetCode ret = TA_AROONOSC( - 0, - (int)n - 1, - inHigh, - inLow, - timePeriod, - &outBegIdx, - &outNBElement, - outOsc - ); +#include "ta_func.h" +#include "ta_libc.h" + +// clang-format off +SEXP impl_ta_AROONOSC( + SEXP high, + SEXP low, + SEXP timeperiod) { // clang-format on - if (ret != TA_SUCCESS) { - UNPROTECT(1); - error("TA_AROONOSC failed with error code %d", ret); - } + int protect_count = 0; + + const int n = LENGTH(high); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const int period = INTEGER(timeperiod)[0]; + + SEXP result = PROTECT(allocVector(REALSXP, n)); + protect_count++; + double *restrict out_ptr = REAL(result); + + const int minimum_lookback = TA_AROONOSC_Lookback(period); - // shift - shift_array(outOsc, n, outBegIdx); + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (int i = 0; i < n; ++i) + out_ptr[i] = NA_REAL; + + } else { + int outBeg = 0, outNb = 0; + + // clang-format off + TA_RetCode return_code = TA_AROONOSC( + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inHigh */ high_ptr, + /*inLow */ low_ptr, + /*optPer */ period, + /*outBeg */ &outBeg, + /*outNb */ &outNb, + /*outReal */ out_ptr + ); + // clang-format on + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_AROONOSC failed: return code %d", return_code); + } + + shift_array(out_ptr, n, outBeg); + } - UNPROTECT(1); - return outOscSEXP; + UNPROTECT(protect_count); + return result; } From 498e711699c27a2419a7669120a22a9bcc53a085 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Sun, 21 Sep 2025 21:35:08 +0200 Subject: [PATCH 136/166] :books: Updated Documentation * Updated documentation for all functions. --- R/ta_ACCBANDS.R | 9 ++++++++ R/ta_AD.R | 7 ++++++ R/ta_ADOSC.R | 26 +++++++++++++++++++++-- R/ta_CDLEVENINGDOJISTAR.R | 10 ++++----- R/ta_SAR.R | 4 ++-- R/ta_SAREXT.R | 24 +++++++++++++-------- R/ta_STOCH.R | 4 ++++ R/ta_STOCHF.R | 3 +++ R/ta_STOCHRSI.R | 2 ++ R/talib-package.R | 1 + man/abandoned_baby.Rd | 2 ++ man/acceleration_bands.Rd | 9 ++++++++ man/chaikin_AD_line.Rd | 7 ++++++ man/chaikin_AD_oscillator.Rd | 11 ++++++++++ man/evening_doji_star.Rd | 4 +++- man/extended_parabolic_sar.Rd | 20 +++++++++++++---- man/fast_stochastic.Rd | 4 ++++ man/generic_documentation.Rd | 2 ++ man/parabolic_sar.Rd | 4 ++-- man/stochastic.Rd | 6 ++++++ man/stochastic_relative_strength_index.Rd | 4 ++++ 21 files changed, 138 insertions(+), 25 deletions(-) diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 5477953f2..00195cbec 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -7,6 +7,15 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun acceleration_bands #' +#' @returns +#' A [data.frame]- or [matrix]-object: +#' +#' \describe{ +#' \item{upper <[double]>}{The lower band.} +#' \item{middle <[double]>}{The middle band.} +#' \item{lower <[double]>}{The upper band.} +#' } +#' #' @template description acceleration_bands <- function( x, diff --git a/R/ta_AD.R b/R/ta_AD.R index c3ee59f78..77adf7ca6 100644 --- a/R/ta_AD.R +++ b/R/ta_AD.R @@ -7,6 +7,13 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun chaikin_AD_line #' +#' @returns +#' A [data.frame]- or [matrix]-object: +#' +#' \describe{ +#' \item{AD_line <[double]>}{Chaikin A/D Line} +#' } +#' #' @template description chaikin_AD_line <- function( x, diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R index 92b0e0e7c..bb8cb4c81 100644 --- a/R/ta_ADOSC.R +++ b/R/ta_ADOSC.R @@ -7,8 +7,24 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun chaikin_AD_oscillator #' +#' @param fast An <[integer]> of [length] 1. The window size passed into the fast moving average (MA). +#' @param slow An <[integer]> of [length] 1. The window size passed into the slow moving average (MA). +#' +#' @returns +#' A [data.frame]- or [matrix]-object: +#' +#' \describe{ +#' \item{AD_oscillator <[double]>}{Chaikin A/D Oscillator} +#' } +#' #' @template description -chaikin_AD_oscillator <- function(x, cols, fast = 3, slow = 10, ...) { +chaikin_AD_oscillator <- function( + x, + cols, + fast = 3, + slow = 10, + ... +) { UseMethod( "chaikin_AD_oscillator" ) @@ -20,7 +36,13 @@ chaikin_AD_oscillator <- function(x, cols, fast = 3, slow = 10, ...) { ADOSC <- chaikin_AD_oscillator #' @export -chaikin_AD_oscillator.default <- function(x, cols, fast = 3, slow = 10, ...) { +chaikin_AD_oscillator.default <- function( + x, + cols, + fast = 3, + slow = 10, + ... +) { ## check input ## cols if passed if (!missing(cols)) { diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index eb321713f..ef757744c 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -16,7 +16,7 @@ evening_doji_star <- function( x, cols, - penetration = 0.1, + eps = 0.1, ... ) { UseMethod( @@ -35,7 +35,7 @@ CDLEVENINGDOJISTAR <- evening_doji_star evening_doji_star.default <- function( x, cols, - penetration = 0.1, + eps = 0.1, ... ) { ## validate input @@ -85,7 +85,7 @@ evening_doji_star.default <- function( x[[2]], x[[3]], x[[4]], - penetration, + eps, as.logical( getOption("talib.normalize", TRUE) ) @@ -105,7 +105,7 @@ evening_doji_star.default <- function( evening_doji_star.data.frame <- function( x, cols, - penetration = 0.1, + eps = 0.1, ... ) { as.data.frame( @@ -119,7 +119,7 @@ evening_doji_star.data.frame <- function( evening_doji_star.matrix <- function( x, cols, - penetration = 0.1, + eps = 0.1, ... ) { as.matrix( diff --git a/R/ta_SAR.R b/R/ta_SAR.R index 64f7c9897..27baab3ca 100644 --- a/R/ta_SAR.R +++ b/R/ta_SAR.R @@ -7,8 +7,8 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun parabolic_sar #' -#' @param acceleration A function call to a moving average function. -#' @param maximum A pair of [double] for upper and lower standard deviations. +#' @param acceleration Acceleration Factor used up to the Maximum value +#' @param maximum Acceleration Factor Maximum value #' #' @returns #' A [data.frame]- or [matrix]-object with the format: diff --git a/R/ta_SAREXT.R b/R/ta_SAREXT.R index 867dd999f..456030af7 100644 --- a/R/ta_SAREXT.R +++ b/R/ta_SAREXT.R @@ -7,8 +7,14 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun extended_parabolic_sar #' -#' @param acceleration A function call to a moving average function. -#' @param maximum A pair of [double] for upper and lower standard deviations. +#' @param start_value Start value and direction. 0 for Auto, >0 for Long, <0 for Short. +#' @param offset_on_reverse Percent offset added/removed to initial stop on short/long reversal +#' @param acceleration_init_long Acceleration Factor initial value for the Long direction +#' @param acceleration_long Acceleration Factor for the Long direction +#' @param acceleration_max_long Acceleration Factor maximum value for the Long direction +#' @param accelration_init_short Acceleration Factor initial value for the Short direction +#' @param acceleration_short Acceleration Factor for the Short direction +#' @param acceleration_max_short Acceleration Factor maximum value for the Short direction #' #' @returns #' A [data.frame]- or [matrix]-object with the format: @@ -24,7 +30,7 @@ extended_parabolic_sar <- function( x, cols, start_value = 0, - offeset_on_reverse = 0, + offset_on_reverse = 0, acceleration_init_long = 0, acceleration_long = 0, acceleration_max_long = 0, @@ -50,7 +56,7 @@ extended_parabolic_sar.default <- function( x, cols, start_value = 0, - offeset_on_reverse = 0, + offset_on_reverse = 0, acceleration_init_long = 0, acceleration_long = 0, acceleration_max_long = 0, @@ -102,7 +108,7 @@ extended_parabolic_sar.default <- function( HL[[1]], HL[[2]], start_value, - offeset_on_reverse, + offset_on_reverse, acceleration_init_long, acceleration_long, acceleration_max_long, @@ -124,7 +130,7 @@ extended_parabolic_sar.data.frame <- function( x, cols, start_value = 0, - offeset_on_reverse = 0, + offset_on_reverse = 0, acceleration_init_long = 0, acceleration_long = 0, acceleration_max_long = 0, @@ -145,7 +151,7 @@ extended_parabolic_sar.matrix <- function( x, cols, start_value = 0, - offeset_on_reverse = 0, + offset_on_reverse = 0, acceleration_init_long = 0, acceleration_long = 0, acceleration_max_long = 0, @@ -166,7 +172,7 @@ extended_parabolic_sar.plotly <- function( x, cols, start_value = 0, - offeset_on_reverse = 0, + offset_on_reverse = 0, acceleration_init_long = 0, acceleration_long = 0, acceleration_max_long = 0, @@ -190,7 +196,7 @@ extended_parabolic_sar.plotly <- function( HL[[1]], HL[[2]], start_value, - offeset_on_reverse, + offset_on_reverse, acceleration_init_long, acceleration_long, acceleration_max_long, diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index f7d019da1..dc494f0c8 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -7,6 +7,10 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun stochastic #' +#' @param fastk Time period for building the Fast-K line +#' @param slowk Smoothing for making the Slow-K line. +#' @param slowd Smoothing for making the Slow-D line +#' #' @template description stochastic <- function( x, diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index 20b7f7d6a..a5b353ae0 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -7,6 +7,9 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun fast_stochastic #' +#' @param fast_k Time period for building the Fast-K line. +#' @param fast_d_MAtype Smoothing for making the Fast-D line. +#' #' @template description fast_stochastic <- function( x, diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index cdb7767bb..7c5812f8b 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -7,6 +7,8 @@ #' @templateVar .author Serkan Korkmaz #' @templateVar .fun stochastic_relative_strength_index #' +#' @param fast_k Time period for building the Fast-K line. +#' @param fast_d_MAtype Smoothing for making the Fast-D line. #' @template description stochastic_relative_strength_index <- function( x, diff --git a/R/talib-package.R b/R/talib-package.R index 9a7c7c23c..c7df331ae 100644 --- a/R/talib-package.R +++ b/R/talib-package.R @@ -14,6 +14,7 @@ NULL #' @param x An OHLC-V series that is coercible to [data.frame]. The function assumes that all columns are named in lowercase and order invariant. #' @param cols An optional [formula] passed into [model.frame]. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See `vignette("talib")` for more details. #' @param n An [integer] of [length] 1. +#' @param eps A [double] of [length] 1. Percentage of penetration of a candle within another candle. #' @param ... Additional parameters passed into [model.frame] #' #' @returns NULL diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index dda105e58..687b6a479 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -11,6 +11,8 @@ abandoned_baby(x, cols, eps = 0, ...) \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} +\item{eps}{A \link{double} of \link{length} 1. Percentage of penetration of a candle within another candle.} + \item{...}{Additional parameters passed into \link{model.frame}} } \value{ diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 4dddbdb16..ad2728f4c 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -15,6 +15,15 @@ acceleration_bands(x, cols, n = 10, ...) \item{...}{Additional parameters passed into \link{model.frame}} } +\value{ +A \link{data.frame}- or \link{matrix}-object: + +\describe{ +\item{upper <\link{double}>}{The lower band.} +\item{middle <\link{double}>}{The middle band.} +\item{lower <\link{double}>}{The upper band.} +} +} \description{ The \code{acceleration_bands()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index 48dc7c22a..49ce49053 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -13,6 +13,13 @@ chaikin_AD_line(x, cols, ...) \item{...}{Additional parameters passed into \link{model.frame}} } +\value{ +A \link{data.frame}- or \link{matrix}-object: + +\describe{ +\item{AD_line <\link{double}>}{Chaikin A/D Line} +} +} \description{ The \code{chaikin_ad_line()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index 3792cf709..8eccf854d 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -11,8 +11,19 @@ chaikin_AD_oscillator(x, cols, fast = 3, slow = 10, ...) \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} +\item{fast}{An <\link{integer}> of \link{length} 1. The window size passed into the fast moving average (MA).} + +\item{slow}{An <\link{integer}> of \link{length} 1. The window size passed into the slow moving average (MA).} + \item{...}{Additional parameters passed into \link{model.frame}} } +\value{ +A \link{data.frame}- or \link{matrix}-object: + +\describe{ +\item{AD_oscillator <\link{double}>}{Chaikin A/D Oscillator} +} +} \description{ The \code{chaikin_ad_oscillator()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 764d4ec78..666889764 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -4,13 +4,15 @@ \alias{evening_doji_star} \title{Evening Doji Star} \usage{ -evening_doji_star(x, cols, penetration = 0.1, ...) +evening_doji_star(x, cols, eps = 0.1, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} +\item{eps}{A \link{double} of \link{length} 1. Percentage of penetration of a candle within another candle.} + \item{...}{Additional parameters passed into \link{model.frame}} } \value{ diff --git a/man/extended_parabolic_sar.Rd b/man/extended_parabolic_sar.Rd index 11fc4d819..fda397581 100644 --- a/man/extended_parabolic_sar.Rd +++ b/man/extended_parabolic_sar.Rd @@ -8,7 +8,7 @@ extended_parabolic_sar( x, cols, start_value = 0, - offeset_on_reverse = 0, + offset_on_reverse = 0, acceleration_init_long = 0, acceleration_long = 0, acceleration_max_long = 0, @@ -23,11 +23,23 @@ extended_parabolic_sar( \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{...}{Additional parameters passed into \link{model.frame}} +\item{start_value}{Start value and direction. 0 for Auto, >0 for Long, <0 for Short.} + +\item{offset_on_reverse}{Percent offset added/removed to initial stop on short/long reversal} + +\item{acceleration_init_long}{Acceleration Factor initial value for the Long direction} + +\item{acceleration_long}{Acceleration Factor for the Long direction} -\item{acceleration}{A function call to a moving average function.} +\item{acceleration_max_long}{Acceleration Factor maximum value for the Long direction} -\item{maximum}{A pair of \link{double} for upper and lower standard deviations.} +\item{accelration_init_short}{Acceleration Factor initial value for the Short direction} + +\item{acceleration_short}{Acceleration Factor for the Short direction} + +\item{acceleration_max_short}{Acceleration Factor maximum value for the Short direction} + +\item{...}{Additional parameters passed into \link{model.frame}} } \value{ A \link{data.frame}- or \link{matrix}-object with the format: diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index 71373d14c..e983b1154 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -11,6 +11,10 @@ fast_stochastic(x, cols, fast_k = 5, fast_d_MAtype = SMA(n = 10), ...) \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} +\item{fast_k}{Time period for building the Fast-K line.} + +\item{fast_d_MAtype}{Smoothing for making the Fast-D line.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/generic_documentation.Rd b/man/generic_documentation.Rd index 5c617fb8c..fbd59bb95 100644 --- a/man/generic_documentation.Rd +++ b/man/generic_documentation.Rd @@ -10,6 +10,8 @@ \item{n}{An \link{integer} of \link{length} 1.} +\item{eps}{A \link{double} of \link{length} 1. Percentage of penetration of a candle within another candle.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/parabolic_sar.Rd b/man/parabolic_sar.Rd index e4455c87c..9a721a921 100644 --- a/man/parabolic_sar.Rd +++ b/man/parabolic_sar.Rd @@ -11,9 +11,9 @@ parabolic_sar(x, cols, acceleration = 0.02, maximum = 0.2, ...) \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} -\item{acceleration}{A function call to a moving average function.} +\item{acceleration}{Acceleration Factor used up to the Maximum value} -\item{maximum}{A pair of \link{double} for upper and lower standard deviations.} +\item{maximum}{Acceleration Factor Maximum value} \item{...}{Additional parameters passed into \link{model.frame}} } diff --git a/man/stochastic.Rd b/man/stochastic.Rd index af83f5fdd..3a894c663 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -11,6 +11,12 @@ stochastic(x, cols, fastk = 5, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} +\item{fastk}{Time period for building the Fast-K line} + +\item{slowk}{Smoothing for making the Slow-K line.} + +\item{slowd}{Smoothing for making the Slow-D line} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index c005343e7..a18596020 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -20,6 +20,10 @@ stochastic_relative_strength_index( \item{n}{An \link{integer} of \link{length} 1.} +\item{fast_k}{Time period for building the Fast-K line.} + +\item{fast_d_MAtype}{Smoothing for making the Fast-D line.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ From 553d875f6343cde85c2801220b9aa16cfebc50fb Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 22 Sep 2025 09:09:24 +0200 Subject: [PATCH 137/166] :hammer: Outcommented old helper functions * These will be removed when enough tests passes --- R/utils.R | 169 +++++++++++++++++++++++++++--------------------------- 1 file changed, 84 insertions(+), 85 deletions(-) diff --git a/R/utils.R b/R/utils.R index 1439db756..10213842d 100644 --- a/R/utils.R +++ b/R/utils.R @@ -33,21 +33,21 @@ flatten <- function(x) { ## left ear with your right arm ## only added for backwards compatibility ## - should remove it. -.open <- function(x, offset = FALSE) { - x[, 1L + as.integer(offset)] -} -.high <- function(x, offset = FALSE) { - x[, 2L + as.integer(offset)] -} -.low <- function(x, offset = FALSE) { - x[, 3L + as.integer(offset)] -} -.close <- function(x, offset = FALSE) { - x[, 4L + as.integer(offset)] -} -.volume <- function(x, offset = FALSE) { - x[, 5L + as.integer(offset)] -} +# .open <- function(x, offset = FALSE) { +# x[, 1L + as.integer(offset)] +# } +# .high <- function(x, offset = FALSE) { +# x[, 2L + as.integer(offset)] +# } +# .low <- function(x, offset = FALSE) { +# x[, 3L + as.integer(offset)] +# } +# .close <- function(x, offset = FALSE) { +# x[, 4L + as.integer(offset)] +# } +# .volume <- function(x, offset = FALSE) { +# x[, 5L + as.integer(offset)] +# } ## map MAs map_maType_call <- function(call_expr) { @@ -81,82 +81,81 @@ is.number <- function(x) { is.numeric(x) || is.integer(x) } -.unwrap_meta <- function(expr, env) { - repeat { - if (!is.call(expr)) { - break - } - head <- expr[[1L]] - if ( - is.symbol(head) && - as.character(head) %in% - c("substitute", "quote") - ) { - expr <- eval(expr, envir = env, enclos = env) - } else { - break - } - } - expr -} - -.is_ma_spec <- function(expr, env) { - expr1 <- .unwrap_meta(expr, env) - if (is.call(expr1)) { - return(TRUE) - } - if (is.symbol(expr1)) { - v <- try( - get( - as.character(expr1), - envir = env, - inherits = TRUE - ), - silent = TRUE - ) - return(!inherits(v, "try-error") && is.language(v)) - } - FALSE -} - -# Normalize one MA argument to a CALL, without forcing promises. -.normalize_ma_arg_expr <- function(expr, env) { - expr1 <- .unwrap_meta(expr, env) - if (is.call(expr1)) { - return(expr1) - } - if (is.symbol(expr1)) { - v <- get(as.character(expr1), envir = env, inherits = TRUE) - if (is.language(v)) return(v) - } - stop("Expected an MA spec like EMA(n = 12).", call. = FALSE) -} - -# Safe integer eval for the numeric path (after unwrapping). -.eval_int <- function(expr, env) { - expr1 <- .unwrap_meta(expr, env) - v <- eval(expr1, envir = env, enclos = env) - if (!is.number(v) || length(v) != 1L || !is.finite(v)) { - stop( - "fast/slow/signal must be finite numeric scalars.", - call. = FALSE - ) - } - as.integer(v) -} - +# .unwrap_meta <- function(expr, env) { +# repeat { +# if (!is.call(expr)) { +# break +# } +# head <- expr[[1L]] +# if ( +# is.symbol(head) && +# as.character(head) %in% +# c("substitute", "quote") +# ) { +# expr <- eval(expr, envir = env, enclos = env) +# } else { +# break +# } +# } +# expr +# } + +# .is_ma_spec <- function(expr, env) { +# expr1 <- .unwrap_meta(expr, env) +# if (is.call(expr1)) { +# return(TRUE) +# } +# if (is.symbol(expr1)) { +# v <- try( +# get( +# as.character(expr1), +# envir = env, +# inherits = TRUE +# ), +# silent = TRUE +# ) +# return(!inherits(v, "try-error") && is.language(v)) +# } +# FALSE +# } + +# # Normalize one MA argument to a CALL, without forcing promises. +# .normalize_ma_arg_expr <- function(expr, env) { +# expr1 <- .unwrap_meta(expr, env) +# if (is.call(expr1)) { +# return(expr1) +# } +# if (is.symbol(expr1)) { +# v <- get(as.character(expr1), envir = env, inherits = TRUE) +# if (is.language(v)) return(v) +# } +# stop("Expected an MA spec like EMA(n = 12).", call. = FALSE) +# } + +# # Safe integer eval for the numeric path (after unwrapping). +# .eval_int <- function(expr, env) { +# expr1 <- .unwrap_meta(expr, env) +# v <- eval(expr1, envir = env, enclos = env) +# if (!is.number(v) || length(v) != 1L || !is.finite(v)) { +# stop( +# "fast/slow/signal must be finite numeric scalars.", +# call. = FALSE +# ) +# } +# as.integer(v) +# } reclass <- function(x, ...) { class(x) <- c(class(x), ...) } -## series -.univariate_series <- function(x) { - as.double( - x[, 1L] - ) -} +# ## series +# .univariate_series <- function(x) { +# as.double( +# x[, 1L] +# ) +# } is.formula <- function(x) { inherits(x, "formula") From f7ba12199d4b8807a0d67ce12672a41c91789a6f Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Mon, 22 Sep 2025 09:09:55 +0200 Subject: [PATCH 138/166] :hammer: Updated MACD-family of functions * There was a small bug in the MACDEXT.c - Not entirely sure why, as the function follows the remaining structure * The MACD() is now more flexible and handles numeric and calls at the same time. * MACD tests have been added. --- NAMESPACE | 4 + R/ta_MACD.R | 340 ++++++++++++++++--- R/ta_MACDEXT.R | 25 +- R/ta_MACDFIX.R | 25 +- man/moving_average_convergence_divergence.Rd | 75 +++- src/api.h | 2 +- src/ta_MACDEXT.c | 123 ++++--- tests/testthat/test-ta_MACD.R | 55 +++ tests/testthat/test-ta_MACDEXT.R | 86 +++++ tests/testthat/test-ta_MACDFIX.R | 67 ++++ 10 files changed, 680 insertions(+), 122 deletions(-) create mode 100644 tests/testthat/test-ta_MACD.R create mode 100644 tests/testthat/test-ta_MACDEXT.R create mode 100644 tests/testthat/test-ta_MACDFIX.R diff --git a/NAMESPACE b/NAMESPACE index dc5e14bc8..32584b181 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -134,7 +134,11 @@ S3method(money_flow_index,data.frame) S3method(money_flow_index,default) S3method(money_flow_index,matrix) S3method(money_flow_index,plotly) +S3method(moving_average_convergence_divergence,data.frame) S3method(moving_average_convergence_divergence,default) +S3method(moving_average_convergence_divergence,matrix) +S3method(moving_average_convergence_divergence,numeric) +S3method(moving_average_convergence_divergence,plotly) S3method(on_balance_volume,data.frame) S3method(on_balance_volume,default) S3method(on_balance_volume,matrix) diff --git a/R/ta_MACD.R b/R/ta_MACD.R index 400757ca2..1a80fb7a8 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -1,9 +1,31 @@ +#' @export +#' @family Momentum Indicator +#' #' @title Moving Average Convergence Divergence #' -#' @family Momentum Indicator +#' @templateVar .title Bollinger Bands +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun moving_average_convergence_divergence +#' +#' @param fast Number of period for the fast MA. +#' @param slow Number of period for the slow MA. +#' @param signal Smoothing for the signal line. +#' +#' @template description +#' +#' @returns +#' A [data.frame]- or [matrix]-object with the format: +#' +#' \describe{ +#' \item{macd <[double]>}{The lower band.} +#' \item{signal <[double]>}{The middle band.} +#' \item{histogram <[double]>}{The upper band.} +#' } +#' #' @export moving_average_convergence_divergence <- function( x, + cols, fast = 12, slow = 26, signal = 9, @@ -12,25 +34,52 @@ moving_average_convergence_divergence <- function( UseMethod("moving_average_convergence_divergence") } +#' @usage NULL +#' @aliases moving_average_convergence_divergence +#' @export +MACD <- moving_average_convergence_divergence + +#' @usage NULL +#' @aliases moving_average_convergence_divergence #' @export moving_average_convergence_divergence.default <- function( x, + cols, fast = 12, slow = 26, signal = 9, ... ) { - if (!is.null(dim(x)) && !is.numeric(x)) { - stop("`x` has to be a double vector", call. = FALSE) + ## diffuse calls directly + fast_expr <- substitute(fast) + slow_expr <- substitute(slow) + signal_expr <- substitute(signal) + + if (is.name(fast_expr) && identical(fast_expr, quote(fast))) { + fast <- substitute(fast, parent.frame()) + } else { + fast <- fast_expr } - ## ) check args - ## for calls - env <- parent.frame() - exprs <- substitute(list(fast = fast, slow = slow, signal = signal))[ - -1L - ] - is_calls <- vapply(exprs, .is_ma_spec, logical(1L), env = env) + if (is.name(slow_expr) && identical(slow_expr, quote(slow))) { + slow <- substitute(slow, parent.frame()) + } else { + slow <- slow_expr + } + + if (is.name(signal_expr) && identical(signal_expr, quote(signal))) { + signal <- substitute(signal, parent.frame()) + } else { + signal <- signal_expr + } + + ## check if they are all numeric + ## or calls + is_calls <- vapply( + list(fast, slow, signal), + is.call, + logical(1L) + ) if (!(all(is_calls) || all(!is_calls))) { stop( @@ -38,51 +87,264 @@ moving_average_convergence_divergence.default <- function( ) } + ## construct series + x <- series( + x = cols, + default = ~close, + data = x, + ... + ) + + ## if not passed as calls + ## if (!all(is_calls)) { - fast_i <- .eval_int(exprs$fast, env) - slow_i <- .eval_int(exprs$slow, env) - signal_i <- .eval_int(exprs$signal, env) + if (fast == 12L && slow == 26L) { + output <- .Call("impl_ta_MACDFIX", x[[1]], as.integer(signal)) + } else { + output <- .Call( + "impl_ta_MACD", + x[[1]], + as.integer(fast), + as.integer(slow), + as.integer(signal) + ) + } + + output <- as.data.frame( + output + ) + + return(output) + } + + fast <- map_maType_call(fast) + slow <- map_maType_call(slow) + signal <- map_maType_call(signal) + + as.data.frame( + .Call( + "impl_ta_MACDEXT", + x[[1]], + fast$n, + fast$maType, + slow$n, + slow$maType, + signal$n, + signal$maType + ) + ) +} + +#' @usage NULL +#' @aliases moving_average_convergence_divergence +#' @export +moving_average_convergence_divergence.numeric <- function( + x, + cols, + fast = 12, + slow = 26, + signal = 9, + ... +) { + ## determine branch + ## if its a matrix call + ## matrix method and end the function + ## + ## NOTE: this is necessary as matrix are + ## internally doubles + if (is.matrix(x)) { + output <- NextMethod() + + return(output) + } + + ## treat 'x' as a vector + ## + if (!missing(cols)) { + warning( + "'cols' have been passed but is unused in for vectors" + ) + } + + ## diffuse calls directly + fast <- substitute(fast) + slow <- substitute(slow) + signal <- substitute(signal) + + ## check if they are all numeric + ## or calls + is_calls <- vapply( + list(fast, slow, signal), + is.call, + logical(1L) + ) + + if (!(all(is_calls) || all(!is_calls))) { + stop( + "Either all of `fast`, `slow` and `signal` is specified as calls, or none at all. See examples for more details." + ) + } - if (fast_i == 12L && slow_i == 26L) { - return(.Call("impl_ta_MACDFIX", x, signal_i)) + ## if not passed as calls + ## + if (!all(is_calls)) { + if (fast == 12L && slow == 26L) { + output <- .Call("impl_ta_MACDFIX", x, as.integer(signal)) + } else { + output <- .Call( + "impl_ta_MACD", + x, + as.integer(fast), + as.integer(slow), + as.integer(signal) + ) } - return(.Call("impl_ta_MACD", x, fast_i, slow_i, signal_i)) + output <- as.data.frame( + output + ) + + return(output) } - fast_call <- .normalize_ma_arg_expr(exprs$fast, env) - slow_call <- .normalize_ma_arg_expr(exprs$slow, env) - signal_call <- .normalize_ma_arg_expr(exprs$signal, env) - - fast_ma <- map_maType_call(fast_call) - slow_ma <- map_maType_call(slow_call) - signal_ma <- map_maType_call(signal_call) - - .Call( - "impl_ta_MACDEXT", - x, - fast_ma$n, - fast_ma$maType, - slow_ma$n, - slow_ma$maType, - signal_ma$n, - signal_ma$maType + fast <- map_maType_call(fast) + slow <- map_maType_call(slow) + signal <- map_maType_call(signal) + + as.data.frame( + .Call( + "impl_ta_MACDEXT", + x, + fast$n, + fast$maType, + slow$n, + slow$maType, + signal$n, + signal$maType + ) + ) +} + +#' @usage NULL +#' @aliases moving_average_convergence_divergence +#' @export +moving_average_convergence_divergence.data.frame <- function( + x, + cols, + fast = 12, + slow = 26, + signal = 9, + ... +) { + as.data.frame( + moving_average_convergence_divergence.default( + x = x, + cols = cols, + fast = fast, + slow = slow, + signal = signal, + ... + ) ) } +#' @usage NULL +#' @aliases moving_average_convergence_divergence #' @export -MACD <- function( +moving_average_convergence_divergence.matrix <- function( x, + cols, fast = 12, slow = 26, signal = 9, ... ) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), + as.matrix( + moving_average_convergence_divergence.default( + x = x, + cols = cols, + fast = fast, + slow = slow, + signal = signal, + ... + ) + ) +} + +#' @usage NULL +#' @aliases moving_average_convergence_divergence +#' @export +moving_average_convergence_divergence.plotly <- function( + x, + cols, + fast = 12, + slow = 26, + signal = 9, + ... +) { + ## prepare series + ## from + x <- series( + x = x, + formula = cols, + default = ~close, + ... + ) + + ## construct indicator + ## + .indicator <- moving_average_convergence_divergence.default( + x = x, + cols = cols, + fast = 12, + slow = 26, + signal = 9, ... ) + + .indicator$idx <- 1:nrow(.indicator) + .indicator$direction <- .indicator$signal >= .indicator$macd + + ## generate indicator plot + output <- plotly::plot_ly( + data = .indicator, + showlegend = FALSE, + name = 'MACD', + x = ~idx, + y = ~histogram, + color = ~direction, + colors = c( + chart.theme()$bull_color, + chart.theme()$bear_color + ), + type = 'bar' + ) + + output <- plotly::add_lines( + output, + x = ~idx, + y = ~signal, + data = .indicator, + inherit = FALSE + ) + + output <- plotly::add_lines( + output, + x = ~idx, + y = ~macd, + data = .indicator, + inherit = FALSE + ) + + output <- add_title( + x = output, + text = "MACD" + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output } diff --git a/R/ta_MACDEXT.R b/R/ta_MACDEXT.R index d630c282e..fd4990dc1 100644 --- a/R/ta_MACDEXT.R +++ b/R/ta_MACDEXT.R @@ -1,17 +1,28 @@ -#' @family Momentum Indicator +#' @usage NULL +#' @aliases moving_average_convergence_divergence #' @export MACDEXT <- function( x, + cols, fast = EMA(n = 12), slow = EMA(n = 26), signal = EMA(n = 9), ... ) { - moving_average_convergence_divergence( - x, - fast = substitute(fast), - slow = substitute(slow), - signal = substitute(signal), - ... + matched_call <- match.call(expand.dots = TRUE) + function_formals <- formals(sys.function()) + + miss <- setdiff(names(function_formals), names(matched_call)) + miss <- setdiff(miss, "...") + for (nm in miss) { + matched_call[[nm]] <- function_formals[[nm]] + } + + pkg <- utils::packageName(environment()) + matched_call[[1L]] <- call( + "::", + as.name(pkg), + as.name("moving_average_convergence_divergence") ) + eval(matched_call, parent.frame()) } diff --git a/R/ta_MACDFIX.R b/R/ta_MACDFIX.R index b90c4be2f..4bb90264b 100644 --- a/R/ta_MACDFIX.R +++ b/R/ta_MACDFIX.R @@ -1,15 +1,26 @@ -#' @family Momentum Indicator +#' @usage NULL +#' @aliases moving_average_convergence_divergence #' @export MACDFIX <- function( x, + cols, signal = 9, ... ) { - moving_average_convergence_divergence( - x, - 12, - 26, - signal, - ... + matched_call <- match.call(expand.dots = TRUE) + function_formals <- formals(sys.function()) + + miss <- setdiff(names(function_formals), names(matched_call)) + miss <- setdiff(miss, "...") # can't default ... + for (nm in miss) { + matched_call[[nm]] <- function_formals[[nm]] + } + + pkg <- utils::packageName(environment()) + matched_call[[1L]] <- call( + "::", + as.name(pkg), + as.name("moving_average_convergence_divergence") ) + eval(matched_call, parent.frame()) } diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index 035e6bc55..bac857ba9 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -4,10 +4,74 @@ \alias{moving_average_convergence_divergence} \title{Moving Average Convergence Divergence} \usage{ -moving_average_convergence_divergence(x, fast = 12, slow = 26, signal = 9, ...) +moving_average_convergence_divergence( + x, + cols, + fast = 12, + slow = 26, + signal = 9, + ... +) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{fast}{Number of period for the fast MA.} + +\item{slow}{Number of period for the slow MA.} + +\item{signal}{Smoothing for the signal line.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +A \link{data.frame}- or \link{matrix}-object with the format: + +\describe{ +\item{macd <\link{double}>}{The lower band.} +\item{signal <\link{double}>}{The middle band.} +\item{histogram <\link{double}>}{The upper band.} +} } \description{ -Moving Average Convergence Divergence +The \code{moving_average_convergence_divergence()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::moving_average_convergence_divergence(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::moving_average_convergence_divergence() + ) +} } \seealso{ Other Momentum Indicator: @@ -22,4 +86,11 @@ Other Momentum Indicator: \code{\link{stochastic_relative_strength_index}()}, \code{\link{ultimate_oscillator}()} } +\author{ +Serkan Korkmaz +} \concept{Momentum Indicator} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/src/api.h b/src/api.h index ac6d49d9d..15ad103f1 100644 --- a/src/api.h +++ b/src/api.h @@ -35,7 +35,7 @@ SEXP impl_ta_HT_PHASOR(SEXP inReal); SEXP impl_ta_HT_SINE(SEXP inReal); SEXP impl_ta_HT_TRENDLINE(SEXP inReal); SEXP impl_ta_HT_TRENDMODE(SEXP inReal); -SEXP impl_ta_MACDEXT(SEXP inReal, SEXP optFastPeriod, SEXP optFastMAType, SEXP optSlowPeriod, SEXP optSlowMAType, SEXP optSignalPeriod, SEXP optSignalMAType); +SEXP impl_ta_MACDEXT(SEXP x, SEXP fast_period, SEXP fast_matype, SEXP slow_period, SEXP slow_matype, SEXP signal_period, SEXP signal_matype); SEXP impl_ta_MACDFIX(SEXP inReal, SEXP optSignalPeriod); SEXP impl_ta_MACD(SEXP x, SEXP optFastPeriod, SEXP optSlowPeriod, SEXP optSignalPeriod); SEXP impl_ta_MA(SEXP x, SEXP period, SEXP matype); diff --git a/src/ta_MACDEXT.c b/src/ta_MACDEXT.c index 4f74a0410..3ddfab97a 100644 --- a/src/ta_MACDEXT.c +++ b/src/ta_MACDEXT.c @@ -1,67 +1,68 @@ -// ta_MACDEXT.c -// Interface to TA-Lib’s TA_MACDEXT (MACD with controllable MA types) +// Interface to TA_MACDEXT (MACD with controllable MA types) // // Parameters -// inReal : numeric vector of source prices (length n). -// optFastPeriod : integer, fast MA period. -// optFastMAType : integer MAType code for fast MA. -// optSlowPeriod : integer, slow MA period. -// optSlowMAType : integer MAType code for slow MA. -// optSignalPeriod : integer, signal MA period. -// optSignalMAType : integer MAType code for signal MA. +// x : numeric vector +// fast_period : integer (>= 2) +// fast_matype : integer MAType +// slow_period : integer (>= 2) +// slow_matype : integer MAType +// signal_period : integer (>= 1) +// signal_matype : integer MAType // // Description -// Computes MACD line, its signal line, and the MACD histogram -// with user-specified moving average types. Returns an n×3 matrix -// with columns "macd", "signal", "histogram" (all lower-case). +// Computes MACD, signal, and histogram using configurable MA types. +// Returns an n × 3 REAL matrix with columns "macd","signal","hist", +// padded with NA_REAL up to the first valid output (lookback). +// +// Notes +// - Input validation beyond lookback is handled on the R side. +// - Uses in-place shifting to align outputs to length n. #include "MAType.h" +#include "R_ext/Arith.h" +#include "R_ext/Error.h" +#include "Rinternals.h" #include "lib.h" #include "names.h" #include "shift.h" #include "ta_func.h" -#include #include // clang-format off SEXP impl_ta_MACDEXT( - SEXP inReal, - SEXP optFastPeriod, - SEXP optFastMAType, - SEXP optSlowPeriod, - SEXP optSlowMAType, - SEXP optSignalPeriod, - SEXP optSignalMAType) { + SEXP x, + SEXP fast_period, + SEXP fast_matype, + SEXP slow_period, + SEXP slow_matype, + SEXP signal_period, + SEXP signal_matype) { // clang-format on int protect_count = 0; - // determine MAs - TA_MAType fastT = as_MAType(optFastMAType); - TA_MAType slowT = as_MAType(optSlowMAType); - TA_MAType signalT = as_MAType(optSignalMAType); + // input + const int n = LENGTH(x); + const double *restrict x_ptr = REAL(x); - // periods - int fastP = INTEGER(optFastPeriod)[0]; - int slowP = INTEGER(optSlowPeriod)[0]; - int signalP = INTEGER(optSignalPeriod)[0]; + const int fastP = INTEGER(fast_period)[0]; + const int slowP = INTEGER(slow_period)[0]; + const int signalP = INTEGER(signal_period)[0]; - // data - int n = LENGTH(inReal); - const double *restrict src = REAL(inReal); + const TA_MAType fastT = as_MAType(fast_matype); + const TA_MAType slowT = as_MAType(slow_matype); + const TA_MAType signalT = as_MAType(signal_matype); - // clang-format off - SEXP result = PROTECT( - allocMatrix(REALSXP, n, 3) - ); protect_count++; - double *restrict macd = REAL(result); + // output matrix: n x 3 (macd, signal, hist) + SEXP res = PROTECT(allocMatrix(REALSXP, n, 3)); + protect_count++; + double *restrict macd = REAL(res); double *restrict signal = macd + n; - double *restrict histogram = macd + 2 * n; - // clang-format on + double *restrict hist = macd + 2 * n; // clang-format off const int minimum_lookback = TA_MACDEXT_Lookback( - fastP, + fastP, fastT, slowP, slowT, @@ -73,54 +74,44 @@ SEXP impl_ta_MACDEXT( if (n < minimum_lookback) { Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, minimum_lookback); - - for (size_t i = 0; i < n; ++i) { - macd[i] = signal[i] = histogram[i] = NA_REAL; + for (int i = 0; i < n; ++i) { + macd[i] = signal[i] = hist[i] = NA_REAL; } - } else { - - int outBeg, outNb; + int outBeg = 0, outNb = 0; // clang-format off TA_RetCode return_code = TA_MACDEXT( - 0, - n - 1, - src, - fastP, - fastT, - slowP, - slowT, - signalP, - signalT, - &outBeg, - &outNb, - macd + outBeg, - signal + outBeg, - histogram + outBeg + /*startIdx*/ 0, + /*endIdx */ n - 1, + /*inReal */ x_ptr, + /*fast */ fastP, fastT, + /*slow */ slowP, slowT, + /*signal */ signalP, signalT, + /*out */ &outBeg, &outNb, macd, signal, hist ); // clang-format on if (return_code != TA_SUCCESS) { - UNPROTECT(1); - error("TA_MACDEXT failed with code %d", return_code); + UNPROTECT(protect_count); + Rf_error("TA_MACDEXT failed: return code %d", return_code); } - // 4) Shift each output down by outBeg, padding with NA + // align to length n shift_array(macd, n, outBeg); shift_array(signal, n, outBeg); - shift_array(histogram, n, outBeg); + shift_array(hist, n, outBeg); } // set column names // clang-format off set_colnames( - result, + res, "macd", - "signal", + "signal", "histogram" ); // clang-format on UNPROTECT(protect_count); - return result; + return res; } diff --git a/tests/testthat/test-ta_MACD.R b/tests/testthat/test-ta_MACD.R new file mode 100644 index 000000000..631d04d20 --- /dev/null +++ b/tests/testthat/test-ta_MACD.R @@ -0,0 +1,55 @@ +## script: MACD +## author: Serkan Korkmaz +testthat::test_that(desc = "Moving Average Convergence Divergence", code = { + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence(SPY) + alias <- MACD(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(moving_average_convergence_divergence()) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(moving_average_convergence_divergence(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(moving_average_convergence_divergence(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = moving_average_convergence_divergence( + BTC + ), + expected = moving_average_convergence_divergence( + BTC, + cols = ~close + ) + ) +}) diff --git a/tests/testthat/test-ta_MACDEXT.R b/tests/testthat/test-ta_MACDEXT.R new file mode 100644 index 000000000..c7cceed6e --- /dev/null +++ b/tests/testthat/test-ta_MACDEXT.R @@ -0,0 +1,86 @@ +## script: MACDEXT +## author: Serkan Korkmaz +testthat::test_that(desc = "Moving Average Convergence Divergence (Extended)", code = { + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence( + SPY, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9) + ) + alias <- MACDEXT(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(moving_average_convergence_divergence( + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9) + )) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits( + moving_average_convergence_divergence( + SPY, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9) + ), + class(SPY) + ) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits( + moving_average_convergence_divergence( + BTC, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9) + ), + class(BTC) + ) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = moving_average_convergence_divergence( + BTC, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9) + ), + expected = moving_average_convergence_divergence( + BTC, + cols = ~close, + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9) + ) + ) +}) diff --git a/tests/testthat/test-ta_MACDFIX.R b/tests/testthat/test-ta_MACDFIX.R new file mode 100644 index 000000000..6b3bd95b6 --- /dev/null +++ b/tests/testthat/test-ta_MACDFIX.R @@ -0,0 +1,67 @@ +## script: MACDFIXED +## author: Serkan Korkmaz +testthat::test_that(desc = "Moving Average Convergence Divergence (Fixed)", code = { + ## 1) calculate values + ## with and without alias + output <- moving_average_convergence_divergence( + SPY + ) + alias <- MACDFIX(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(moving_average_convergence_divergence( + fast = EMA(n = 12), + slow = EMA(n = 26), + signal = EMA(n = 9), + )) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits( + moving_average_convergence_divergence(SPY), + class(SPY) + ) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits( + moving_average_convergence_divergence(BTC), + class(BTC) + ) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = moving_average_convergence_divergence( + BTC + ), + expected = moving_average_convergence_divergence( + BTC, + cols = ~close + ) + ) +}) From 1411a587e086c8555282d9e0d025ba4590e7d35e Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:39:40 +0200 Subject: [PATCH 139/166] :hammer: Bug-fix in MACD.plotly * Input were hardcoded. --- R/ta_MACD.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/R/ta_MACD.R b/R/ta_MACD.R index 1a80fb7a8..d1e5906b3 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -296,10 +296,9 @@ moving_average_convergence_divergence.plotly <- function( .indicator <- moving_average_convergence_divergence.default( x = x, cols = cols, - fast = 12, - slow = 26, - signal = 9, - ... + fast = fast, + slow = slow, + signal = signal ) .indicator$idx <- 1:nrow(.indicator) From 851cb940300c48d29253aa9318b8c30dd0763492 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:50:01 +0200 Subject: [PATCH 140/166] :hammer: Simplified indicator() * Using NSE was a bit of pain to manage. So now the API have been simplified, which has downstream implications for the entire package. * The MA() functions will now return a list if 'x' is not provided. --- R/chart_indicator.R | 121 +++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 80 deletions(-) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 2c609a699..700b29838 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -11,92 +11,53 @@ #' @description #' Add an indicator to t #' -indicator <- function( - FUN, - cols, - ... -) { - parent_frame <- parent.frame() +indicator <- function(FUN, ...) { + ## extract the function + ## directly + FUN <- match.fun(FUN) - ## resolve 'cols' - has_var <- !missing(cols) - if (has_var) { - var_expr <- eval.parent(substitute(cols)) - stopifnot(inherits(var_expr, "formula")) - environment(var_expr) <- parent_frame - } + ## locate the main chart + ## NOTE: if its not there we might need + ## to initialize a new + plt <- .plotting_environment$main - ## resolve FUN (unchanged) - f_call <- substitute(FUN) - pre_args <- list() - if (is.call(f_call)) { - f <- eval(f_call[[1L]], envir = parent_frame) - pre_args <- as.list(f_call)[-1L] - } else { - f <- match.fun(eval.parent(f_call)) - } - - ## plotting env (unchanged) - .plotting_environment <- get0(".plotting_environment", inherits = TRUE) - if (is.null(.plotting_environment)) { - .plotting_environment <- new.env(parent = emptyenv()) - assign(".plotting_environment", .plotting_environment, inherits = TRUE) - } - if (is.null(.plotting_environment$main)) { - .plotting_environment$main <- .chart_layout( - x = plotly::plotly_empty(), - title_text = "fisk" + ## construct {plotly}-object + ## based on FUN + outcome <- do.call( + what = FUN, + args = list( + x = plt, + ... ) - } - .plot <- .plotting_environment$main + ) - ## base args - args <- c(list(x = .plot), pre_args) - if (has_var) { - f_formals <- tryCatch(names(formals(f)), error = function(e) { - character() - }) - name <- intersect(c("cols", "formula"), f_formals)[1] - if (!is.na(name)) args[[name]] <- var_expr + ## if it doesn't return + ## a {plotly}-object there is + ## a bug somewhere + if (!inherits(outcome, "plotly")) { + stop("Unexpected error.") } - ## --- enforce NAME-ONLY dots using ...names() (no evaluation) --- - dotsQ <- as.list(substitute(list(...)))[-1L] # quoted dots - if (length(dotsQ)) { - dn <- ...names() - if (is.null(dn) || any(!nzchar(dn))) { - stop( - "All arguments in '...' must be named; positional dots are not supported." - ) - } - names(dotsQ) <- dn + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) + stopifnot(all(vapply(panels, inherits, logical(1), what = "plotly"))) + n <- length(panels) + main_h <- getOption("talib.chart.main", 0.7) + heights <- if (n > 1) { + c(main_h, rep((1 - main_h) / (n - 1), n - 1)) + } else { + 1 } - ## --------------------------------------------------------------- - - output <- do.call(f, c(args, dotsQ), envir = parent_frame, quote = FALSE) + fig <- plotly::layout( + plotly::subplot( + panels, + nrows = n, + shareX = TRUE, + margin = 0.02, + heights = heights + ), + showlegend = TRUE + ) + .plotting_environment$chart <- fig - if (inherits(output, "plotly")) { - panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - stopifnot(all(vapply(panels, inherits, logical(1), what = "plotly"))) - n <- length(panels) - main_h <- getOption("talib.chart.main", 0.7) - heights <- if (n > 1) { - c(main_h, rep((1 - main_h) / (n - 1), n - 1)) - } else { - 1 - } - fig <- plotly::layout( - plotly::subplot( - panels, - nrows = n, - shareX = TRUE, - margin = 0.02, - heights = heights - ), - showlegend = TRUE - ) - .plotting_environment$chart <- fig - return(fig) - } - output + return(fig) } From f7cf5bb698523c59a1eb7e4116ac7112d8f55524 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:51:53 +0200 Subject: [PATCH 141/166] :hammer: Updated MA-functions * If 'x' is not provided the functions will return a ma_specification - documentation needs to be updated accordingly. --- R/ta_DEMA.R | 24 ++++++++++++++++++++++++ R/ta_EMA.R | 24 ++++++++++++++++++++++++ R/ta_KAMA.R | 24 ++++++++++++++++++++++++ R/ta_MAMA.R | 24 ++++++++++++++++++++++++ R/ta_SMA.R | 24 ++++++++++++++++++++++++ R/ta_T3.R | 24 ++++++++++++++++++++++++ R/ta_TEMA.R | 24 ++++++++++++++++++++++++ R/ta_TRIMA.R | 24 ++++++++++++++++++++++++ R/ta_WMA.R | 24 ++++++++++++++++++++++++ 9 files changed, 216 insertions(+) diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index e9ccfcc76..66fade64a 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -13,6 +13,30 @@ DEMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("DEMA") } diff --git a/R/ta_EMA.R b/R/ta_EMA.R index 4a8ada3e2..c592690e2 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -13,6 +13,30 @@ EMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("EMA") } diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index 1248d8a79..8312b95d4 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -13,6 +13,30 @@ KAMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("KAMA") } diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index 1a0edf539..e92ac3e16 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -13,6 +13,30 @@ MAMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("MAMA") } diff --git a/R/ta_SMA.R b/R/ta_SMA.R index 89645fb12..ee67d0002 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -13,6 +13,30 @@ SMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod( "SMA" ) diff --git a/R/ta_T3.R b/R/ta_T3.R index a272606e1..9782e8cf1 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -13,6 +13,30 @@ T3 <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("T3") } diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index c1b365d62..7e1481d3c 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -13,6 +13,30 @@ TEMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("TEMA") } diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index 9624191f7..54eabf087 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -13,6 +13,30 @@ TRIMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("TRIMA") } diff --git a/R/ta_WMA.R b/R/ta_WMA.R index 8588e9db3..262a754e9 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -13,6 +13,30 @@ WMA <- function( n = 10, ... ) { + ## if 'x' is missing + ## its safe to assume that + ## the user is calling via + ## indicator() + if (missing(x)) { + ## construct the + ## call + call <- match.call(expand.dots = FALSE) + call$n <- n + + ## construct ma specification + ## class + x <- structure( + { + map_maType_call( + call + ) + }, + class = c("ma_specification") + ) + + return(x) + } + UseMethod("WMA") } From b1b6728c767c29aaae5cfebd9a4157833f97919f Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:53:27 +0200 Subject: [PATCH 142/166] :hammer: Major changes * All functions have had their documenation reworked for examples because of the new API for the indicator function. * Unit-tests have been updated too. --- R/ta_BBANDS.R | 6 --- R/ta_MACD.R | 52 ++++++-------------- R/ta_MACDEXT.R | 22 +++------ R/ta_MACDFIX.R | 22 +++------ R/ta_STOCH.R | 32 ++++++------ R/ta_STOCHF.R | 5 +- R/ta_STOCHRSI.R | 6 +-- README.Rmd | 4 +- README.md | 4 +- man-roxygen/description.R | 2 +- man/DEMA.Rd | 2 +- man/EMA.Rd | 2 +- man/KAMA.Rd | 2 +- man/MAMA.Rd | 2 +- man/SMA.Rd | 2 +- man/T3.Rd | 2 +- man/TEMA.Rd | 2 +- man/TRIMA.Rd | 2 +- man/WMA.Rd | 2 +- man/abandoned_baby.Rd | 2 +- man/acceleration_bands.Rd | 2 +- man/advance_block.Rd | 2 +- man/aroon.Rd | 2 +- man/aroon_oscillator.Rd | 2 +- man/bollinger_bands.Rd | 2 +- man/chaikin_AD_line.Rd | 2 +- man/chaikin_AD_oscillator.Rd | 2 +- man/chande_momentum_oscillator.Rd | 2 +- man/commodity_channel_index.Rd | 2 +- man/doji.Rd | 2 +- man/doji_star.Rd | 2 +- man/dragonfly_doji.Rd | 2 +- man/evening_doji_star.Rd | 2 +- man/extended_parabolic_sar.Rd | 2 +- man/fast_stochastic.Rd | 2 +- man/ht_dc_phase.Rd | 2 +- man/ht_dcperiod.Rd | 2 +- man/ht_phasor.Rd | 2 +- man/ht_sine_wave.Rd | 2 +- man/ht_trendline.Rd | 2 +- man/ht_trendmode.Rd | 2 +- man/indicator.Rd | 6 +-- man/money_flow_index.Rd | 2 +- man/moving_average_convergence_divergence.Rd | 2 +- man/on_balance_volume.Rd | 2 +- man/parabolic_sar.Rd | 2 +- man/relative_strength_index.Rd | 2 +- man/stochastic.Rd | 2 +- man/stochastic_relative_strength_index.Rd | 2 +- man/three_black_crows.Rd | 2 +- man/three_inside.Rd | 2 +- man/three_line_strike.Rd | 2 +- man/three_outside.Rd | 2 +- man/three_stars_in_the_south.Rd | 2 +- man/three_white_soldiers.Rd | 2 +- man/two_crows.Rd | 2 +- man/ultimate_oscillator.Rd | 2 +- tests/testthat/test-charting.R | 2 +- tests/testthat/test-ta_ACCBANDS.R | 2 +- tests/testthat/test-ta_AD.R | 2 +- tests/testthat/test-ta_AROON.R | 2 +- tests/testthat/test-ta_AROONOSC.R | 2 +- tests/testthat/test-ta_BBANDS.R | 2 +- tests/testthat/test-ta_CCI.R | 2 +- tests/testthat/test-ta_CMO.R | 2 +- tests/testthat/test-ta_DEMA.R | 2 +- tests/testthat/test-ta_EMA.R | 2 +- tests/testthat/test-ta_KAMA.R | 2 +- tests/testthat/test-ta_MACD.R | 2 +- tests/testthat/test-ta_MACDEXT.R | 5 +- tests/testthat/test-ta_MACDFIX.R | 7 +-- tests/testthat/test-ta_MAMA.R | 2 +- tests/testthat/test-ta_MFI.R | 2 +- tests/testthat/test-ta_OBV.R | 2 +- tests/testthat/test-ta_RSI.R | 2 +- tests/testthat/test-ta_SAR.R | 2 +- tests/testthat/test-ta_SAREXT.R | 2 +- tests/testthat/test-ta_SMA.R | 2 +- tests/testthat/test-ta_STOCH.R | 2 +- tests/testthat/test-ta_STOCHF.R | 2 +- tests/testthat/test-ta_STOCHRSI.R | 2 +- tests/testthat/test-ta_T3.R | 2 +- tests/testthat/test-ta_TEMA.R | 2 +- tests/testthat/test-ta_TRIMA.R | 2 +- tests/testthat/test-ta_ULTOSC.R | 2 +- tests/testthat/test-ta_WMA.R | 2 +- vignettes/talib.Rmd | 6 +-- 87 files changed, 139 insertions(+), 186 deletions(-) diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index b33233ccb..9ce664fe6 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -77,8 +77,6 @@ bollinger_bands.default <- function( ## coerce to a `matrix` check that ## it is double and then pass to ## C-side. - ma <- map_maType_call(substitute(ma)) - x <- series( x = cols, default = ~open, @@ -111,8 +109,6 @@ bollinger_bands.numeric <- function( down = 2, ... ) { - ma <- map_maType_call(substitute(ma)) - ## determine branch ## if its a matrix call ## matrix method and end the function @@ -188,8 +184,6 @@ bollinger_bands.plotly <- function( down = 2, ... ) { - ma <- map_maType_call(substitute(ma)) - ## prepare series ## from x <- series( diff --git a/R/ta_MACD.R b/R/ta_MACD.R index d1e5906b3..00d11a22c 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -50,34 +50,13 @@ moving_average_convergence_divergence.default <- function( signal = 9, ... ) { - ## diffuse calls directly - fast_expr <- substitute(fast) - slow_expr <- substitute(slow) - signal_expr <- substitute(signal) - - if (is.name(fast_expr) && identical(fast_expr, quote(fast))) { - fast <- substitute(fast, parent.frame()) - } else { - fast <- fast_expr - } - - if (is.name(slow_expr) && identical(slow_expr, quote(slow))) { - slow <- substitute(slow, parent.frame()) - } else { - slow <- slow_expr - } - - if (is.name(signal_expr) && identical(signal_expr, quote(signal))) { - signal <- substitute(signal, parent.frame()) - } else { - signal <- signal_expr - } - ## check if they are all numeric ## or calls is_calls <- vapply( list(fast, slow, signal), - is.call, + FUN = function(x) { + inherits(x, "ma_specification") + }, logical(1L) ) @@ -117,10 +96,6 @@ moving_average_convergence_divergence.default <- function( return(output) } - fast <- map_maType_call(fast) - slow <- map_maType_call(slow) - signal <- map_maType_call(signal) - as.data.frame( .Call( "impl_ta_MACDEXT", @@ -166,16 +141,13 @@ moving_average_convergence_divergence.numeric <- function( ) } - ## diffuse calls directly - fast <- substitute(fast) - slow <- substitute(slow) - signal <- substitute(signal) - ## check if they are all numeric ## or calls is_calls <- vapply( list(fast, slow, signal), - is.call, + FUN = function(x) { + inherits(x, "ma_specification") + }, logical(1L) ) @@ -185,6 +157,14 @@ moving_average_convergence_divergence.numeric <- function( ) } + ## construct series + x <- series( + x = cols, + default = ~close, + data = x, + ... + ) + ## if not passed as calls ## if (!all(is_calls)) { @@ -207,10 +187,6 @@ moving_average_convergence_divergence.numeric <- function( return(output) } - fast <- map_maType_call(fast) - slow <- map_maType_call(slow) - signal <- map_maType_call(signal) - as.data.frame( .Call( "impl_ta_MACDEXT", diff --git a/R/ta_MACDEXT.R b/R/ta_MACDEXT.R index fd4990dc1..7def5c6f4 100644 --- a/R/ta_MACDEXT.R +++ b/R/ta_MACDEXT.R @@ -9,20 +9,12 @@ MACDEXT <- function( signal = EMA(n = 9), ... ) { - matched_call <- match.call(expand.dots = TRUE) - function_formals <- formals(sys.function()) - - miss <- setdiff(names(function_formals), names(matched_call)) - miss <- setdiff(miss, "...") - for (nm in miss) { - matched_call[[nm]] <- function_formals[[nm]] - } - - pkg <- utils::packageName(environment()) - matched_call[[1L]] <- call( - "::", - as.name(pkg), - as.name("moving_average_convergence_divergence") + moving_average_convergence_divergence( + x = x, + cols = cols, + fast = fast, + slow = slow, + signal = signal, + ... ) - eval(matched_call, parent.frame()) } diff --git a/R/ta_MACDFIX.R b/R/ta_MACDFIX.R index 4bb90264b..560968af9 100644 --- a/R/ta_MACDFIX.R +++ b/R/ta_MACDFIX.R @@ -7,20 +7,12 @@ MACDFIX <- function( signal = 9, ... ) { - matched_call <- match.call(expand.dots = TRUE) - function_formals <- formals(sys.function()) - - miss <- setdiff(names(function_formals), names(matched_call)) - miss <- setdiff(miss, "...") # can't default ... - for (nm in miss) { - matched_call[[nm]] <- function_formals[[nm]] - } - - pkg <- utils::packageName(environment()) - matched_call[[1L]] <- call( - "::", - as.name(pkg), - as.name("moving_average_convergence_divergence") + moving_average_convergence_divergence( + x = x, + cols = cols, + fast = 12L, + slow = 26L, + signal = signal, + ... ) - eval(matched_call, parent.frame()) } diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index dc494f0c8..cf6bbb99f 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -73,8 +73,8 @@ stochastic.default <- function( ... ) - slowk_ma <- map_maType_call(substitute(slowk)) - slowd_ma <- map_maType_call(substitute(slowd)) + # slowk <- map_maType_call(substitute(slowk)) + # slowd <- map_maType_call(substitute(slowd)) as.data.frame( .Call( @@ -83,10 +83,10 @@ stochastic.default <- function( HLC[[2]], HLC[[3]], as.integer(fastk), - as.integer(slowk_ma$n), - as.integer(slowk_ma$maType), - as.integer(slowd_ma$n), - as.integer(slowd_ma$maType) + as.integer(slowk$n), + as.integer(slowk$maType), + as.integer(slowd$n), + as.integer(slowd$maType) ) ) } @@ -134,12 +134,12 @@ stochastic.plotly <- function( slowd = SMA(n = 8), ... ) { - # slowk_ma <- map_maType_call(substitute(slowk)) - # slowd_ma <- map_maType_call(substitute(slowd)) - slowk <- substitute(slowk) - slowd <- substitute(slowd) - slowk_ma <- map_maType_call(slowk) - slowd_ma <- map_maType_call(slowd) + # slowk <- map_maType_call(substitute(slowk)) + # slowd <- map_maType_call(substitute(slowd)) + # slowk <- substitute(slowk) + # slowd <- substitute(slowd) + # slowk <- map_maType_call(slowk) + # slowd <- map_maType_call(slowd) ## construct HLC series HLC <- as.data.frame( series( @@ -157,10 +157,10 @@ stochastic.plotly <- function( HLC[[2]], HLC[[3]], as.integer(fastk), - as.integer(slowk_ma$n), - as.integer(slowk_ma$maType), - as.integer(slowd_ma$n), - as.integer(slowd_ma$maType) + as.integer(slowk$n), + as.integer(slowk$maType), + as.integer(slowd$n), + as.integer(slowd$maType) ) ) diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index a5b353ae0..b0cda252a 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -70,7 +70,7 @@ fast_stochastic.default <- function( ... ) - slowk_ma <- map_maType_call(substitute(fast_d_MAtype)) + slowk_ma <- fast_d_MAtype as.data.frame( .Call( @@ -127,8 +127,7 @@ fast_stochastic.plotly <- function( fast_d_MAtype = SMA(n = 10), ... ) { - fast_d_MAtype <- substitute(fast_d_MAtype) - slowk_ma <- map_maType_call(fast_d_MAtype) + slowk_ma <- fast_d_MAtype ## construct HLC series HLC <- as.data.frame(series( diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 7c5812f8b..55fcc294d 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -40,7 +40,7 @@ stochastic_relative_strength_index.default <- function( na.rm = TRUE, ... ) { - fast_d_MAtype <- map_maType_call(substitute(fast_d_MAtype)) + fast_d_MAtype <- fast_d_MAtype ## check input ## cols if passed @@ -129,9 +129,7 @@ stochastic_relative_strength_index.plotly <- function( ... ) { ## input arguments - fast_d_MAtype <- map_maType_call( - substitute(fast_d_MAtype) - ) + fast_d_MAtype <- fast_d_MAtype ## prepare series ## from diff --git a/README.Rmd b/README.Rmd index 4cd13bca4..02a924b86 100644 --- a/README.Rmd +++ b/README.Rmd @@ -76,14 +76,14 @@ x <- talib::BTC ## add bollinger bands ## to the chart talib::indicator( - FUN = talib::SMA(), + FUN = talib::SMA, cols = ~close + open ) ## add bollinger bands ## to the chart talib::indicator( - FUN = talib::stochastic() + FUN = talib::stochastic ) } ``` \ No newline at end of file diff --git a/README.md b/README.md index 73ed8f7f2..dd4ecbbee 100644 --- a/README.md +++ b/README.md @@ -71,14 +71,14 @@ x <- talib::BTC ## add bollinger bands ## to the chart talib::indicator( - FUN = talib::SMA(), + FUN = talib::SMA, cols = ~close + open ) ## add bollinger bands ## to the chart talib::indicator( - FUN = talib::stochastic() + FUN = talib::stochastic ) } ``` diff --git a/man-roxygen/description.R b/man-roxygen/description.R index 6b49e08fe..26f5d6760 100644 --- a/man-roxygen/description.R +++ b/man-roxygen/description.R @@ -41,6 +41,6 @@ #' ## chart indicator #' ## with default values #' talib::indicator( -#' talib::<%= .fun %>() +#' talib::<%= .fun %> #' ) #' } diff --git a/man/DEMA.Rd b/man/DEMA.Rd index 08ac154ed..ba9ed9d12 100644 --- a/man/DEMA.Rd +++ b/man/DEMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::DEMA() + talib::DEMA ) } } diff --git a/man/EMA.Rd b/man/EMA.Rd index d9768f8e3..7a9070172 100644 --- a/man/EMA.Rd +++ b/man/EMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::EMA() + talib::EMA ) } } diff --git a/man/KAMA.Rd b/man/KAMA.Rd index 98330f11a..8b936fe37 100644 --- a/man/KAMA.Rd +++ b/man/KAMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::KAMA() + talib::KAMA ) } } diff --git a/man/MAMA.Rd b/man/MAMA.Rd index 6e8873905..8f05309a5 100644 --- a/man/MAMA.Rd +++ b/man/MAMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::MAMA() + talib::MAMA ) } } diff --git a/man/SMA.Rd b/man/SMA.Rd index 13d9d4097..c08da76f1 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::SMA() + talib::SMA ) } } diff --git a/man/T3.Rd b/man/T3.Rd index b7a251003..ba3022f37 100644 --- a/man/T3.Rd +++ b/man/T3.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::T3() + talib::T3 ) } } diff --git a/man/TEMA.Rd b/man/TEMA.Rd index 0d9623d7f..ec870e6a3 100644 --- a/man/TEMA.Rd +++ b/man/TEMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::TEMA() + talib::TEMA ) } } diff --git a/man/TRIMA.Rd b/man/TRIMA.Rd index 672349e96..4bada7e35 100644 --- a/man/TRIMA.Rd +++ b/man/TRIMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::TRIMA() + talib::TRIMA ) } } diff --git a/man/WMA.Rd b/man/WMA.Rd index f49c47fe1..abd2fa013 100644 --- a/man/WMA.Rd +++ b/man/WMA.Rd @@ -55,7 +55,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::WMA() + talib::WMA ) } } diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index 687b6a479..77a62487e 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -54,7 +54,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::abandoned_baby() + talib::abandoned_baby ) } } diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index ad2728f4c..1166c76d8 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -58,7 +58,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::acceleration_bands() + talib::acceleration_bands ) } } diff --git a/man/advance_block.Rd b/man/advance_block.Rd index 92506e774..5b6e748c7 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::advance_block() + talib::advance_block ) } } diff --git a/man/aroon.Rd b/man/aroon.Rd index 52b792242..1f1a73b89 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -57,7 +57,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::aroon() + talib::aroon ) } } diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index ea78831af..2dc4826ef 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -56,7 +56,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::aroon_oscillator() + talib::aroon_oscillator ) } } diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index 1db7d1dba..b7ae7f1d3 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -60,7 +60,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::bollinger_bands() + talib::bollinger_bands ) } } diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index 49ce49053..619aa5728 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -54,7 +54,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::chaikin_AD_line() + talib::chaikin_AD_line ) } } diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index 8eccf854d..b3b5d02cb 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -58,7 +58,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::chaikin_AD_oscillator() + talib::chaikin_AD_oscillator ) } } diff --git a/man/chande_momentum_oscillator.Rd b/man/chande_momentum_oscillator.Rd index 59ecd069a..b68402fc5 100644 --- a/man/chande_momentum_oscillator.Rd +++ b/man/chande_momentum_oscillator.Rd @@ -49,7 +49,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::chande_momentum_oscillator() + talib::chande_momentum_oscillator ) } } diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd index 7eec401e7..86fb32ce9 100644 --- a/man/commodity_channel_index.Rd +++ b/man/commodity_channel_index.Rd @@ -49,7 +49,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::commodity_channel_index() + talib::commodity_channel_index ) } } diff --git a/man/doji.Rd b/man/doji.Rd index a0355259a..92a710c0d 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::doji() + talib::doji ) } } diff --git a/man/doji_star.Rd b/man/doji_star.Rd index f0e017584..a15343b2c 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::doji_star() + talib::doji_star ) } } diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index 254aaada8..a7d7d542c 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::dragonfly_doji() + talib::dragonfly_doji ) } } diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 666889764..21ce5332c 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -54,7 +54,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::evening_doji_star() + talib::evening_doji_star ) } } diff --git a/man/extended_parabolic_sar.Rd b/man/extended_parabolic_sar.Rd index fda397581..62e50ac83 100644 --- a/man/extended_parabolic_sar.Rd +++ b/man/extended_parabolic_sar.Rd @@ -84,7 +84,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::extended_parabolic_sar() + talib::extended_parabolic_sar ) } } diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index e983b1154..ea24a385b 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -51,7 +51,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::fast_stochastic() + talib::fast_stochastic ) } } diff --git a/man/ht_dc_phase.Rd b/man/ht_dc_phase.Rd index 3a8d588f7..db2fe96fa 100644 --- a/man/ht_dc_phase.Rd +++ b/man/ht_dc_phase.Rd @@ -45,7 +45,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ht_dc_phase() + talib::ht_dc_phase ) } } diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd index 622006e5c..222605dc7 100644 --- a/man/ht_dcperiod.Rd +++ b/man/ht_dcperiod.Rd @@ -45,7 +45,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ht_dcperiod() + talib::ht_dcperiod ) } } diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd index cc6cad468..e1f66941b 100644 --- a/man/ht_phasor.Rd +++ b/man/ht_phasor.Rd @@ -45,7 +45,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ht_phasor() + talib::ht_phasor ) } } diff --git a/man/ht_sine_wave.Rd b/man/ht_sine_wave.Rd index 6ab5b1f8b..cabf28f4b 100644 --- a/man/ht_sine_wave.Rd +++ b/man/ht_sine_wave.Rd @@ -45,7 +45,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ht_sine_wave() + talib::ht_sine_wave ) } } diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index 67bb655cb..6c336c762 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -45,7 +45,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ht_trendline() + talib::ht_trendline ) } } diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index f99db6f3b..d3a8209e4 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -45,7 +45,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ht_trendmode() + talib::ht_trendmode ) } } diff --git a/man/indicator.Rd b/man/indicator.Rd index d81140ced..11919fab4 100644 --- a/man/indicator.Rd +++ b/man/indicator.Rd @@ -4,14 +4,14 @@ \alias{indicator} \title{Indicator} \usage{ -indicator(FUN, cols, ...) +indicator(FUN, ...) } \arguments{ \item{FUN}{An indicator function} -\item{cols}{A formula of variables.} - \item{...}{Arguments passed into \link{model.frame}} + +\item{cols}{A formula of variables.} } \description{ Add an indicator to t diff --git a/man/money_flow_index.Rd b/man/money_flow_index.Rd index 46293f20f..c8a045f7f 100644 --- a/man/money_flow_index.Rd +++ b/man/money_flow_index.Rd @@ -49,7 +49,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::money_flow_index() + talib::money_flow_index ) } } diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index bac857ba9..1def2a81e 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -69,7 +69,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::moving_average_convergence_divergence() + talib::moving_average_convergence_divergence ) } } diff --git a/man/on_balance_volume.Rd b/man/on_balance_volume.Rd index cccabbe82..7c8fff17b 100644 --- a/man/on_balance_volume.Rd +++ b/man/on_balance_volume.Rd @@ -49,7 +49,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::on_balance_volume() + talib::on_balance_volume ) } } diff --git a/man/parabolic_sar.Rd b/man/parabolic_sar.Rd index 9a721a921..a90f5f30e 100644 --- a/man/parabolic_sar.Rd +++ b/man/parabolic_sar.Rd @@ -60,7 +60,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::parabolic_sar() + talib::parabolic_sar ) } } diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index 02821fb6f..bbc779ff9 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -49,7 +49,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::relative_strength_index() + talib::relative_strength_index ) } } diff --git a/man/stochastic.Rd b/man/stochastic.Rd index 3a894c663..3e81a77e9 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -53,7 +53,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::stochastic() + talib::stochastic ) } } diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index a18596020..2b5cc3b95 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -60,7 +60,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::stochastic_relative_strength_index() + talib::stochastic_relative_strength_index ) } } diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index ef69e7356..f42ddfeef 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::three_black_crows() + talib::three_black_crows ) } } diff --git a/man/three_inside.Rd b/man/three_inside.Rd index c46d87cab..0a348431c 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::three_inside() + talib::three_inside ) } } diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd index 9c5c45ea3..f59bb8d98 100644 --- a/man/three_line_strike.Rd +++ b/man/three_line_strike.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::three_line_strike() + talib::three_line_strike ) } } diff --git a/man/three_outside.Rd b/man/three_outside.Rd index 50b601886..952b45c39 100644 --- a/man/three_outside.Rd +++ b/man/three_outside.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::three_outside() + talib::three_outside ) } } diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd index ee83a49c2..3011f19e9 100644 --- a/man/three_stars_in_the_south.Rd +++ b/man/three_stars_in_the_south.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::three_stars_in_the_south() + talib::three_stars_in_the_south ) } } diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd index c0ddbd2c2..bb5051ddf 100644 --- a/man/three_white_soldiers.Rd +++ b/man/three_white_soldiers.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::three_white_soldiers() + talib::three_white_soldiers ) } } diff --git a/man/two_crows.Rd b/man/two_crows.Rd index a3c35e81a..debe0725d 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -52,7 +52,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::two_crows() + talib::two_crows ) } } diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index 52031ef67..ffd2688de 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -54,7 +54,7 @@ tail(output) ## chart indicator ## with default values talib::indicator( - talib::ultimate_oscillator() + talib::ultimate_oscillator ) } } diff --git a/tests/testthat/test-charting.R b/tests/testthat/test-charting.R index cb686cb36..a34b1d21c 100644 --- a/tests/testthat/test-charting.R +++ b/tests/testthat/test-charting.R @@ -25,7 +25,7 @@ testthat::test_that(desc = "Charting", code = { { chart(SPY) indicator( - FUN = SMA(), + FUN = SMA, cols = ~open, data = BTC ) diff --git a/tests/testthat/test-ta_ACCBANDS.R b/tests/testthat/test-ta_ACCBANDS.R index f984cce75..eb416a327 100644 --- a/tests/testthat/test-ta_ACCBANDS.R +++ b/tests/testthat/test-ta_ACCBANDS.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Acceleration Bands", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(acceleration_bands()) + indicator(acceleration_bands) } ) diff --git a/tests/testthat/test-ta_AD.R b/tests/testthat/test-ta_AD.R index 4fb9e6a8b..75418fe8c 100644 --- a/tests/testthat/test-ta_AD.R +++ b/tests/testthat/test-ta_AD.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Chaikin A/D Line", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(chaikin_AD_line()) + indicator(chaikin_AD_line) } ) diff --git a/tests/testthat/test-ta_AROON.R b/tests/testthat/test-ta_AROON.R index 8cbe250dd..7ce6d5a76 100644 --- a/tests/testthat/test-ta_AROON.R +++ b/tests/testthat/test-ta_AROON.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Aroon", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(aroon()) + indicator(FUN = aroon) } ) diff --git a/tests/testthat/test-ta_AROONOSC.R b/tests/testthat/test-ta_AROONOSC.R index 891f24694..e74c905ba 100644 --- a/tests/testthat/test-ta_AROONOSC.R +++ b/tests/testthat/test-ta_AROONOSC.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Aroon Oscillator", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(aroon_oscillator()) + indicator(aroon_oscillator) } ) diff --git a/tests/testthat/test-ta_BBANDS.R b/tests/testthat/test-ta_BBANDS.R index d4d6a3ec8..873053e46 100644 --- a/tests/testthat/test-ta_BBANDS.R +++ b/tests/testthat/test-ta_BBANDS.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Bollinger Bands", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(bollinger_bands()) + indicator(bollinger_bands) } ) diff --git a/tests/testthat/test-ta_CCI.R b/tests/testthat/test-ta_CCI.R index 958a14e8a..f4248a773 100644 --- a/tests/testthat/test-ta_CCI.R +++ b/tests/testthat/test-ta_CCI.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Commodity Channel Index", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(commodity_channel_index()) + indicator(commodity_channel_index) } ) diff --git a/tests/testthat/test-ta_CMO.R b/tests/testthat/test-ta_CMO.R index 94c72ffdf..8c2f4a67c 100644 --- a/tests/testthat/test-ta_CMO.R +++ b/tests/testthat/test-ta_CMO.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Chande Momentum Indicator", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(chande_momentum_oscillator()) + indicator(chande_momentum_oscillator) } ) diff --git a/tests/testthat/test-ta_DEMA.R b/tests/testthat/test-ta_DEMA.R index bbcb9324e..7fefbfb9b 100644 --- a/tests/testthat/test-ta_DEMA.R +++ b/tests/testthat/test-ta_DEMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Double Exponential Moving Average (DEMA)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(double_exponential_moving_average()) + indicator(double_exponential_moving_average) } ) diff --git a/tests/testthat/test-ta_EMA.R b/tests/testthat/test-ta_EMA.R index a2efaf737..84022df83 100644 --- a/tests/testthat/test-ta_EMA.R +++ b/tests/testthat/test-ta_EMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Exponential Moving Average (EMA)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(exponential_moving_average()) + indicator(exponential_moving_average) } ) diff --git a/tests/testthat/test-ta_KAMA.R b/tests/testthat/test-ta_KAMA.R index 287189e43..3af946ef8 100644 --- a/tests/testthat/test-ta_KAMA.R +++ b/tests/testthat/test-ta_KAMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Kaufman’s Adaptive Moving Average (KAMA)", code = output <- testthat::expect_no_error( { chart(BTC) - indicator(kaufmans_adaptive_moving_average()) + indicator(kaufmans_adaptive_moving_average) } ) diff --git a/tests/testthat/test-ta_MACD.R b/tests/testthat/test-ta_MACD.R index 631d04d20..45537bfb2 100644 --- a/tests/testthat/test-ta_MACD.R +++ b/tests/testthat/test-ta_MACD.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Moving Average Convergence Divergence", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(moving_average_convergence_divergence()) + indicator(moving_average_convergence_divergence) } ) diff --git a/tests/testthat/test-ta_MACDEXT.R b/tests/testthat/test-ta_MACDEXT.R index c7cceed6e..8ed6bf804 100644 --- a/tests/testthat/test-ta_MACDEXT.R +++ b/tests/testthat/test-ta_MACDEXT.R @@ -23,11 +23,12 @@ testthat::test_that(desc = "Moving Average Convergence Divergence (Extended)", c output <- testthat::expect_no_error( { chart(BTC) - indicator(moving_average_convergence_divergence( + indicator( + moving_average_convergence_divergence, fast = EMA(n = 12), slow = EMA(n = 26), signal = EMA(n = 9) - )) + ) } ) diff --git a/tests/testthat/test-ta_MACDFIX.R b/tests/testthat/test-ta_MACDFIX.R index 6b3bd95b6..07927fa04 100644 --- a/tests/testthat/test-ta_MACDFIX.R +++ b/tests/testthat/test-ta_MACDFIX.R @@ -20,11 +20,12 @@ testthat::test_that(desc = "Moving Average Convergence Divergence (Fixed)", code output <- testthat::expect_no_error( { chart(BTC) - indicator(moving_average_convergence_divergence( + indicator( + moving_average_convergence_divergence, fast = EMA(n = 12), slow = EMA(n = 26), - signal = EMA(n = 9), - )) + signal = EMA(n = 9) + ) } ) diff --git a/tests/testthat/test-ta_MAMA.R b/tests/testthat/test-ta_MAMA.R index 439e2d0ed..8a7478db2 100644 --- a/tests/testthat/test-ta_MAMA.R +++ b/tests/testthat/test-ta_MAMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Mesa Adaptive Moving Average (MAMA)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(mesa_adaptive_moving_average()) + indicator(mesa_adaptive_moving_average) } ) diff --git a/tests/testthat/test-ta_MFI.R b/tests/testthat/test-ta_MFI.R index 1a2660414..9c58d1dff 100644 --- a/tests/testthat/test-ta_MFI.R +++ b/tests/testthat/test-ta_MFI.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Money Flow Index", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(money_flow_index()) + indicator(money_flow_index) } ) diff --git a/tests/testthat/test-ta_OBV.R b/tests/testthat/test-ta_OBV.R index 12fe90689..2bf35b3c1 100644 --- a/tests/testthat/test-ta_OBV.R +++ b/tests/testthat/test-ta_OBV.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "On-Balance Volume", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(on_balance_volume()) + indicator(on_balance_volume) } ) diff --git a/tests/testthat/test-ta_RSI.R b/tests/testthat/test-ta_RSI.R index a103a6a0a..0cd8bdb5a 100644 --- a/tests/testthat/test-ta_RSI.R +++ b/tests/testthat/test-ta_RSI.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Relative Strength Index", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(relative_strength_index()) + indicator(relative_strength_index) } ) diff --git a/tests/testthat/test-ta_SAR.R b/tests/testthat/test-ta_SAR.R index 2c8351333..341883ba1 100644 --- a/tests/testthat/test-ta_SAR.R +++ b/tests/testthat/test-ta_SAR.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Parabolic SAR", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(parabolic_sar()) + indicator(parabolic_sar) } ) diff --git a/tests/testthat/test-ta_SAREXT.R b/tests/testthat/test-ta_SAREXT.R index 8798b5975..b59c29fab 100644 --- a/tests/testthat/test-ta_SAREXT.R +++ b/tests/testthat/test-ta_SAREXT.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Parabolic SAR (Extended)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(extended_parabolic_sar()) + indicator(extended_parabolic_sar) } ) diff --git a/tests/testthat/test-ta_SMA.R b/tests/testthat/test-ta_SMA.R index fd8ec31f2..ff14dca85 100644 --- a/tests/testthat/test-ta_SMA.R +++ b/tests/testthat/test-ta_SMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Simple Moving Average", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(simple_moving_average()) + indicator(simple_moving_average) } ) diff --git a/tests/testthat/test-ta_STOCH.R b/tests/testthat/test-ta_STOCH.R index 05fb2d0e5..14df712cf 100644 --- a/tests/testthat/test-ta_STOCH.R +++ b/tests/testthat/test-ta_STOCH.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "stochastic", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(stochastic()) + indicator(stochastic) } ) diff --git a/tests/testthat/test-ta_STOCHF.R b/tests/testthat/test-ta_STOCHF.R index f68c1e287..e93f88c77 100644 --- a/tests/testthat/test-ta_STOCHF.R +++ b/tests/testthat/test-ta_STOCHF.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Fast Stochastic", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(fast_stochastic()) + indicator(fast_stochastic) } ) diff --git a/tests/testthat/test-ta_STOCHRSI.R b/tests/testthat/test-ta_STOCHRSI.R index 729db8cf1..b0f8e9688 100644 --- a/tests/testthat/test-ta_STOCHRSI.R +++ b/tests/testthat/test-ta_STOCHRSI.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Stochastic Relative Strength Index", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(stochastic_relative_strength_index(), data = RSI(BTC)) + indicator(stochastic_relative_strength_index, data = RSI(BTC)) } ) diff --git a/tests/testthat/test-ta_T3.R b/tests/testthat/test-ta_T3.R index 5c66a4c00..7e325c9b9 100644 --- a/tests/testthat/test-ta_T3.R +++ b/tests/testthat/test-ta_T3.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "T3 Moving Average (T3)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(T3_moving_average()) + indicator(T3_moving_average) } ) diff --git a/tests/testthat/test-ta_TEMA.R b/tests/testthat/test-ta_TEMA.R index 11847f38f..86c291dbc 100644 --- a/tests/testthat/test-ta_TEMA.R +++ b/tests/testthat/test-ta_TEMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Triple Exponential Moving Average (TEMA)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(triple_exponential_moving_average()) + indicator(triple_exponential_moving_average) } ) diff --git a/tests/testthat/test-ta_TRIMA.R b/tests/testthat/test-ta_TRIMA.R index 13d37df76..4ac645fdb 100644 --- a/tests/testthat/test-ta_TRIMA.R +++ b/tests/testthat/test-ta_TRIMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Triangular Moving Average (TRIMA)", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(triangular_moving_average()) + indicator(triangular_moving_average) } ) diff --git a/tests/testthat/test-ta_ULTOSC.R b/tests/testthat/test-ta_ULTOSC.R index 69ce2dc75..d99bbc4fc 100644 --- a/tests/testthat/test-ta_ULTOSC.R +++ b/tests/testthat/test-ta_ULTOSC.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Ultimate Oscillator", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(ultimate_oscillator()) + indicator(ultimate_oscillator) } ) diff --git a/tests/testthat/test-ta_WMA.R b/tests/testthat/test-ta_WMA.R index 5b331778f..fab324fd2 100644 --- a/tests/testthat/test-ta_WMA.R +++ b/tests/testthat/test-ta_WMA.R @@ -18,7 +18,7 @@ testthat::test_that(desc = "Weighted Moving Average", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(weighted_moving_average()) + indicator(weighted_moving_average) } ) diff --git a/vignettes/talib.Rmd b/vignettes/talib.Rmd index 318c6f482..919a3ffa4 100644 --- a/vignettes/talib.Rmd +++ b/vignettes/talib.Rmd @@ -74,13 +74,13 @@ The charting functionality mimicks the behaviour of `plot()` and `lines()` where ## add SMA talib::indicator( - talib::SMA(), - cols = ~high + low + talib::SMA, + cols = ~high + low ) ## add acceleration bands talib::indicator( - talib::ACCBANDS() + talib::ACCBANDS ) } From 4269a7a0bc7d0393d0f763ba84c8758412797b56 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 25 Sep 2025 16:09:55 +0200 Subject: [PATCH 143/166] :hammer: Added new patterns * Documentation updated --- NAMESPACE | 29 ++++++++ R/ta_CDLBELTHOLD.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDLBREAKAWAY.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDLCLOSINGMARUBOZU.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDLCONCEALBABYSWALL.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDLCOUNTERATTACK.R | 123 ++++++++++++++++++++++++++++++ R/ta_CDLDARKCLOUDCOVER.R | 128 ++++++++++++++++++++++++++++++++ man/abandoned_baby.Rd | 6 ++ man/advance_block.Rd | 6 ++ man/belt_hold.Rd | 87 ++++++++++++++++++++++ man/break_away.Rd | 87 ++++++++++++++++++++++ man/closing_marubozu.Rd | 87 ++++++++++++++++++++++ man/concealing_baby_swallow.Rd | 87 ++++++++++++++++++++++ man/counter_attack.Rd | 87 ++++++++++++++++++++++ man/dark_cloud_cover.Rd | 89 ++++++++++++++++++++++ man/doji.Rd | 6 ++ man/doji_star.Rd | 6 ++ man/dragonfly_doji.Rd | 6 ++ man/evening_doji_star.Rd | 6 ++ man/three_black_crows.Rd | 6 ++ man/three_inside.Rd | 6 ++ man/three_line_strike.Rd | 6 ++ man/three_outside.Rd | 6 ++ man/three_stars_in_the_south.Rd | 6 ++ man/three_white_soldiers.Rd | 6 ++ man/two_crows.Rd | 6 ++ src/api.h | 6 ++ src/init.c | 6 ++ src/ta_CDLBELTHOLD.c | 66 ++++++++++++++++ src/ta_CDLBREAKAWAY.c | 56 ++++++++++++++ src/ta_CDLCLOSINGMARUBOZU.c | 56 ++++++++++++++ src/ta_CDLCONCEALBABYSWALL.c | 56 ++++++++++++++ src/ta_CDLCOUNTERATTACK.c | 56 ++++++++++++++ src/ta_CDLDARKCLOUDCOVER.c | 63 ++++++++++++++++ 34 files changed, 1739 insertions(+) create mode 100644 R/ta_CDLBELTHOLD.R create mode 100644 R/ta_CDLBREAKAWAY.R create mode 100644 R/ta_CDLCLOSINGMARUBOZU.R create mode 100644 R/ta_CDLCONCEALBABYSWALL.R create mode 100644 R/ta_CDLCOUNTERATTACK.R create mode 100644 R/ta_CDLDARKCLOUDCOVER.R create mode 100644 man/belt_hold.Rd create mode 100644 man/break_away.Rd create mode 100644 man/closing_marubozu.Rd create mode 100644 man/concealing_baby_swallow.Rd create mode 100644 man/counter_attack.Rd create mode 100644 man/dark_cloud_cover.Rd create mode 100644 src/ta_CDLBELTHOLD.c create mode 100644 src/ta_CDLBREAKAWAY.c create mode 100644 src/ta_CDLCLOSINGMARUBOZU.c create mode 100644 src/ta_CDLCONCEALBABYSWALL.c create mode 100644 src/ta_CDLCOUNTERATTACK.c create mode 100644 src/ta_CDLDARKCLOUDCOVER.c diff --git a/NAMESPACE b/NAMESPACE index 32584b181..7fb888971 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -63,11 +63,17 @@ S3method(aroon_oscillator,data.frame) S3method(aroon_oscillator,default) S3method(aroon_oscillator,matrix) S3method(aroon_oscillator,plotly) +S3method(belt_hold,data.frame) +S3method(belt_hold,default) +S3method(belt_hold,matrix) S3method(bollinger_bands,data.frame) S3method(bollinger_bands,default) S3method(bollinger_bands,matrix) S3method(bollinger_bands,numeric) S3method(bollinger_bands,plotly) +S3method(break_away,data.frame) +S3method(break_away,default) +S3method(break_away,matrix) S3method(chaikin_AD_line,data.frame) S3method(chaikin_AD_line,default) S3method(chaikin_AD_line,matrix) @@ -82,10 +88,22 @@ S3method(chande_momentum_oscillator,matrix) S3method(chande_momentum_oscillator,numeric) S3method(chande_momentum_oscillator,plotly) S3method(chart,default) +S3method(closing_marubozu,data.frame) +S3method(closing_marubozu,default) +S3method(closing_marubozu,matrix) S3method(commodity_channel_index,data.frame) S3method(commodity_channel_index,default) S3method(commodity_channel_index,matrix) S3method(commodity_channel_index,plotly) +S3method(concealing_baby_swallow,data.frame) +S3method(concealing_baby_swallow,default) +S3method(concealing_baby_swallow,matrix) +S3method(counter_attack,data.frame) +S3method(counter_attack,default) +S3method(counter_attack,matrix) +S3method(dark_cloud_cover,data.frame) +S3method(dark_cloud_cover,default) +S3method(dark_cloud_cover,matrix) S3method(doji,data.frame) S3method(doji,default) S3method(doji,matrix) @@ -202,6 +220,11 @@ export(CDL3OUTSIDE) export(CDL3STARSINSOUTH) export(CDLABANDONEDBABY) export(CDLADVANCEBLOCK) +export(CDLBABYSWALL) +export(CDLBELTHOLD) +export(CDLBREAKAWAY) +export(CDLCOUNTERATTACK) +export(CDLDARKCLOUDCOVER) export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) @@ -240,12 +263,18 @@ export(acceleration_bands) export(advance_block) export(aroon) export(aroon_oscillator) +export(belt_hold) export(bollinger_bands) +export(break_away) export(chaikin_AD_line) export(chaikin_AD_oscillator) export(chande_momentum_oscillator) export(chart) +export(closing_marubozu) export(commodity_channel_index) +export(concealing_baby_swallow) +export(counter_attack) +export(dark_cloud_cover) export(doji) export(doji_star) export(double_exponential_moving_average) diff --git a/R/ta_CDLBELTHOLD.R b/R/ta_CDLBELTHOLD.R new file mode 100644 index 000000000..685ee6469 --- /dev/null +++ b/R/ta_CDLBELTHOLD.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Belt Hold +#' +#' @templateVar .title Belt Hold +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun belt_hold +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{belt_hold}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +belt_hold <- function( + x, + cols, + ... +) { + UseMethod( + "belt_hold" + ) +} + +#' @usage NULL +#' @aliases belt_hold +#' @export +CDLBELTHOLD <- belt_hold + +#' @usage NULL +#' @aliases belt_hold +#' @export +belt_hold.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLBELTHOLD", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "belt_hold" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases belt_hold +#' @export +belt_hold.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases belt_hold +#' @export +belt_hold.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLBREAKAWAY.R b/R/ta_CDLBREAKAWAY.R new file mode 100644 index 000000000..71b377c7c --- /dev/null +++ b/R/ta_CDLBREAKAWAY.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Break Away +#' +#' @templateVar .title Break Away +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun break_away +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{break_away}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +break_away <- function( + x, + cols, + ... +) { + UseMethod( + "break_away" + ) +} + +#' @usage NULL +#' @aliases break_away +#' @export +CDLBREAKAWAY <- break_away + +#' @usage NULL +#' @aliases break_away +#' @export +break_away.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLBREAKAWAY", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "break_away" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases break_away +#' @export +break_away.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases break_away +#' @export +break_away.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLCLOSINGMARUBOZU.R b/R/ta_CDLCLOSINGMARUBOZU.R new file mode 100644 index 000000000..41bb4c7e2 --- /dev/null +++ b/R/ta_CDLCLOSINGMARUBOZU.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Closing Marubozu +#' +#' @templateVar .title Closing Marubozu +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun closing_marubozu +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{closing_marubozu}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +closing_marubozu <- function( + x, + cols, + ... +) { + UseMethod( + "closing_marubozu" + ) +} + +#' @usage NULL +#' @aliases closing_marubozu +#' @export +CDLCOUNTERATTACK <- closing_marubozu + +#' @usage NULL +#' @aliases closing_marubozu +#' @export +closing_marubozu.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLCLOSINGMARUBOZU", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "closing_marubozu" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases closing_marubozu +#' @export +closing_marubozu.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases closing_marubozu +#' @export +closing_marubozu.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLCONCEALBABYSWALL.R b/R/ta_CDLCONCEALBABYSWALL.R new file mode 100644 index 000000000..f2c47f101 --- /dev/null +++ b/R/ta_CDLCONCEALBABYSWALL.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Concealing Baby Swallow +#' +#' @templateVar .title Concealing Baby Swallow +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun concealing_baby_swallow +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{concealing_baby_swallow}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +concealing_baby_swallow <- function( + x, + cols, + ... +) { + UseMethod( + "concealing_baby_swallow" + ) +} + +#' @usage NULL +#' @aliases concealing_baby_swallow +#' @export +CDLBABYSWALL <- concealing_baby_swallow + +#' @usage NULL +#' @aliases concealing_baby_swallow +#' @export +concealing_baby_swallow.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLBABYSWALL", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "concealing_baby_swallow" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases concealing_baby_swallow +#' @export +concealing_baby_swallow.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases concealing_baby_swallow +#' @export +concealing_baby_swallow.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLCOUNTERATTACK.R b/R/ta_CDLCOUNTERATTACK.R new file mode 100644 index 000000000..bdea84168 --- /dev/null +++ b/R/ta_CDLCOUNTERATTACK.R @@ -0,0 +1,123 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Counter Attack +#' +#' @templateVar .title Counter Attack +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun counter_attack +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{counter_attack}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +counter_attack <- function( + x, + cols, + ... +) { + UseMethod( + "counter_attack" + ) +} + +#' @usage NULL +#' @aliases counter_attack +#' @export +CDLCOUNTERATTACK <- counter_attack + +#' @usage NULL +#' @aliases counter_attack +#' @export +counter_attack.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLCOUNTERATTACK", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "counter_attack" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases counter_attack +#' @export +counter_attack.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases counter_attack +#' @export +counter_attack.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/R/ta_CDLDARKCLOUDCOVER.R b/R/ta_CDLDARKCLOUDCOVER.R new file mode 100644 index 000000000..bc5e41b07 --- /dev/null +++ b/R/ta_CDLDARKCLOUDCOVER.R @@ -0,0 +1,128 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Dark Cloud Cover +#' +#' @templateVar .title Dark Cloud Cover +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun dark_cloud_cover +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{dark_cloud_cover}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +dark_cloud_cover <- function( + x, + cols, + eps = 0, + ... +) { + UseMethod( + "dark_cloud_cover" + ) +} + +#' @usage NULL +#' @aliases dark_cloud_cover +#' @export +CDLDARKCLOUDCOVER <- dark_cloud_cover + +#' @usage NULL +#' @aliases dark_cloud_cover +#' @export +dark_cloud_cover.default <- function( + x, + cols, + eps = 0, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLDARKCLOUDCOVER", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.double(eps), + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "dark_cloud_cover" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases dark_cloud_cover +#' @export +dark_cloud_cover.data.frame <- function( + x, + cols, + eps = 0, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases dark_cloud_cover +#' @export +dark_cloud_cover.matrix <- function( + x, + cols, + eps = 0, + ... +) { + as.matrix( + NextMethod() + ) +} diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index 77a62487e..9907c6eac 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -61,6 +61,12 @@ tail(output) \seealso{ Other Pattern Recognition: \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/advance_block.Rd b/man/advance_block.Rd index 5b6e748c7..41d934412 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -59,6 +59,12 @@ tail(output) \seealso{ Other Pattern Recognition: \code{\link{abandoned_baby}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/belt_hold.Rd b/man/belt_hold.Rd new file mode 100644 index 000000000..d414fa101 --- /dev/null +++ b/man/belt_hold.Rd @@ -0,0 +1,87 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLBELTHOLD.R +\name{belt_hold} +\alias{belt_hold} +\title{Belt Hold} +\usage{ +belt_hold(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{belt_hold}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{belt_hold()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::belt_hold(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::belt_hold + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/break_away.Rd b/man/break_away.Rd new file mode 100644 index 000000000..bb601ac2d --- /dev/null +++ b/man/break_away.Rd @@ -0,0 +1,87 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLBREAKAWAY.R +\name{break_away} +\alias{break_away} +\title{Break Away} +\usage{ +break_away(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{break_away}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{break_away()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::break_away(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::break_away + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/closing_marubozu.Rd b/man/closing_marubozu.Rd new file mode 100644 index 000000000..34fb99bd9 --- /dev/null +++ b/man/closing_marubozu.Rd @@ -0,0 +1,87 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLCLOSINGMARUBOZU.R +\name{closing_marubozu} +\alias{closing_marubozu} +\title{Closing Marubozu} +\usage{ +closing_marubozu(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{closing_marubozu}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{closing_marubozu()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::closing_marubozu(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::closing_marubozu + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/concealing_baby_swallow.Rd b/man/concealing_baby_swallow.Rd new file mode 100644 index 000000000..41c46eb27 --- /dev/null +++ b/man/concealing_baby_swallow.Rd @@ -0,0 +1,87 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLCONCEALBABYSWALL.R +\name{concealing_baby_swallow} +\alias{concealing_baby_swallow} +\title{Concealing Baby Swallow} +\usage{ +concealing_baby_swallow(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{concealing_baby_swallow}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{concealing_baby_swallow()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::concealing_baby_swallow(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::concealing_baby_swallow + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/counter_attack.Rd b/man/counter_attack.Rd new file mode 100644 index 000000000..c6b07ea3e --- /dev/null +++ b/man/counter_attack.Rd @@ -0,0 +1,87 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLCOUNTERATTACK.R +\name{counter_attack} +\alias{counter_attack} +\title{Counter Attack} +\usage{ +counter_attack(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{counter_attack}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{counter_attack()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::counter_attack(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::counter_attack + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/dark_cloud_cover.Rd b/man/dark_cloud_cover.Rd new file mode 100644 index 000000000..56b20bfdf --- /dev/null +++ b/man/dark_cloud_cover.Rd @@ -0,0 +1,89 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLDARKCLOUDCOVER.R +\name{dark_cloud_cover} +\alias{dark_cloud_cover} +\title{Dark Cloud Cover} +\usage{ +dark_cloud_cover(x, cols, eps = 0, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{eps}{A \link{double} of \link{length} 1. Percentage of penetration of a candle within another candle.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{dark_cloud_cover}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{dark_cloud_cover()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::dark_cloud_cover(BTC) + +## display the results +tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::dark_cloud_cover + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/doji.Rd b/man/doji.Rd index 92a710c0d..c39ca39ac 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, diff --git a/man/doji_star.Rd b/man/doji_star.Rd index a15343b2c..bddac2308 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{dragonfly_doji}()}, \code{\link{evening_doji_star}()}, diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index a7d7d542c..02605de7d 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{evening_doji_star}()}, diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 21ce5332c..53c224c57 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -62,6 +62,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index f42ddfeef..0aa353a43 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/three_inside.Rd b/man/three_inside.Rd index 0a348431c..ce22f2856 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd index f59bb8d98..d8fcfc645 100644 --- a/man/three_line_strike.Rd +++ b/man/three_line_strike.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/three_outside.Rd b/man/three_outside.Rd index 952b45c39..d57c56163 100644 --- a/man/three_outside.Rd +++ b/man/three_outside.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd index 3011f19e9..56087a441 100644 --- a/man/three_stars_in_the_south.Rd +++ b/man/three_stars_in_the_south.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd index bb5051ddf..7be19b794 100644 --- a/man/three_white_soldiers.Rd +++ b/man/three_white_soldiers.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/man/two_crows.Rd b/man/two_crows.Rd index debe0725d..310b6ac08 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -60,6 +60,12 @@ tail(output) Other Pattern Recognition: \code{\link{abandoned_baby}()}, \code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, diff --git a/src/api.h b/src/api.h index 15ad103f1..fbb4dcafa 100644 --- a/src/api.h +++ b/src/api.h @@ -24,6 +24,12 @@ SEXP impl_ta_CDL3STARSINSOUTH(SEXP open, SEXP high, SEXP low, SEXP close, SEXP n SEXP impl_ta_CDL3WHITESOLDIERS(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLABANDONEDBABY(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); SEXP impl_ta_CDLADVANCEBLOCK(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLBELTHOLD(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLBREAKAWAY(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLCLOSINGMARUBOZU(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLCONCEALBABYSWALL(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLCOUNTERATTACK(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLDARKCLOUDCOVER(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDOJISTARSTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); diff --git a/src/init.c b/src/init.c index ab6b68e8e..96dc3f57f 100644 --- a/src/init.c +++ b/src/init.c @@ -29,6 +29,12 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_CDL3WHITESOLDIERS, 5), CALLDEF(impl_ta_CDLABANDONEDBABY, 6), CALLDEF(impl_ta_CDLADVANCEBLOCK, 5), + CALLDEF(impl_ta_CDLBELTHOLD, 5), + CALLDEF(impl_ta_CDLBREAKAWAY, 5), + CALLDEF(impl_ta_CDLCLOSINGMARUBOZU, 5), + CALLDEF(impl_ta_CDLCONCEALBABYSWALL, 5), + CALLDEF(impl_ta_CDLCOUNTERATTACK, 5), + CALLDEF(impl_ta_CDLDARKCLOUDCOVER, 6), CALLDEF(impl_ta_CDLDOJI, 5), CALLDEF(impl_ta_CDLDOJISTARSTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), diff --git a/src/ta_CDLBELTHOLD.c b/src/ta_CDLBELTHOLD.c new file mode 100644 index 000000000..e46fbaab7 --- /dev/null +++ b/src/ta_CDLBELTHOLD.c @@ -0,0 +1,66 @@ +// Interface to TA_CDLBELTHOLD +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// normalize_flag : logical; if TRUE divide outputs by 100 starting at +// outBeg +// +// Description +// Belt-hold candlestick pattern. Returns integer vector of length n. +// +// Implementation notes +// - Minimal checks: only compare n vs TA_CDLBELTHOLD_Lookback(). +// - Shift in-place using shift_array; optional normalize(). + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include + +SEXP impl_ta_CDLBELTHOLD(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLBELTHOLD_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLBELTHOLD(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLBELTHOLD failed: return code %d", return_code); + } + + // shift & optional normalize + shift_array(out_ptr, n, outBeg); + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLBREAKAWAY.c b/src/ta_CDLBREAKAWAY.c new file mode 100644 index 000000000..58163f527 --- /dev/null +++ b/src/ta_CDLBREAKAWAY.c @@ -0,0 +1,56 @@ +// Interface to TA_CDLBREAKAWAY +// +// Parameters: open, high, low, close, normalize_flag +// Returns: integer vector (length n) + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include + +SEXP impl_ta_CDLBREAKAWAY(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLBREAKAWAY_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLBREAKAWAY(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLBREAKAWAY failed: return code %d", return_code); + } + + shift_array(out_ptr, n, outBeg); + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLCLOSINGMARUBOZU.c b/src/ta_CDLCLOSINGMARUBOZU.c new file mode 100644 index 000000000..1a50a8062 --- /dev/null +++ b/src/ta_CDLCLOSINGMARUBOZU.c @@ -0,0 +1,56 @@ +// Interface to TA_CDLCLOSINGMARUBOZU +// +// Parameters: open, high, low, close, normalize_flag +// Returns: integer vector (length n) + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include + +SEXP impl_ta_CDLCLOSINGMARUBOZU(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLCLOSINGMARUBOZU_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLCLOSINGMARUBOZU(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLCLOSINGMARUBOZU failed: return code %d", return_code); + } + + shift_array(out_ptr, n, outBeg); + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLCONCEALBABYSWALL.c b/src/ta_CDLCONCEALBABYSWALL.c new file mode 100644 index 000000000..c4fa96992 --- /dev/null +++ b/src/ta_CDLCONCEALBABYSWALL.c @@ -0,0 +1,56 @@ +// Interface to TA_CDLCONCEALBABYSWALL +// +// Parameters: open, high, low, close, normalize_flag +// Returns: integer vector (length n) + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include + +SEXP impl_ta_CDLCONCEALBABYSWALL(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLCONCEALBABYSWALL_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLCONCEALBABYSWALL(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLCONCEALBABYSWALL failed: return code %d", return_code); + } + + shift_array(out_ptr, n, outBeg); + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLCOUNTERATTACK.c b/src/ta_CDLCOUNTERATTACK.c new file mode 100644 index 000000000..870f9cc7e --- /dev/null +++ b/src/ta_CDLCOUNTERATTACK.c @@ -0,0 +1,56 @@ +// Interface to TA_CDLCOUNTERATTACK +// +// Parameters: open, high, low, close, normalize_flag +// Returns: integer vector (length n) + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include + +SEXP impl_ta_CDLCOUNTERATTACK(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLCOUNTERATTACK_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLCOUNTERATTACK(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLCOUNTERATTACK failed: return code %d", return_code); + } + + shift_array(out_ptr, n, outBeg); + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLDARKCLOUDCOVER.c b/src/ta_CDLDARKCLOUDCOVER.c new file mode 100644 index 000000000..0bec95b88 --- /dev/null +++ b/src/ta_CDLDARKCLOUDCOVER.c @@ -0,0 +1,63 @@ +// Interface to TA_CDLDARKCLOUDCOVER +// +// Parameters +// open, high, low, close : numeric vectors (same length) +// penetration : numeric scalar (double), typically in [0,100] +// normalize_flag : logical; if TRUE divide outputs by 100 starting at +// outBeg +// +// Returns: integer vector (length n) + +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include + +SEXP impl_ta_CDLDARKCLOUDCOVER(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP penetration, SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const double pen = REAL(penetration)[0]; + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + // Lookback may depend on penetration in TA-Lib + const int minimum_lookback = TA_CDLDARKCLOUDCOVER_Lookback(pen); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLDARKCLOUDCOVER(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + pen, &outBeg, &outNb, out_ptr); + + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLDARKCLOUDCOVER failed: return code %d", return_code); + } + + shift_array(out_ptr, n, outBeg); + if (LOGICAL_VALUE(normalize_flag)) { + normalize(out_ptr, n, 100, outBeg); + } + } + + UNPROTECT(protect_count); + return result; +} From c8487c17a3c9983f8da8aaa1d5d4371451ff1f03 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 25 Sep 2025 18:05:39 +0200 Subject: [PATCH 144/166] :hammer: Added Candlestick Pattern Charts * Added plotly method for all patterns * The pattern charting doesnt (yet) account for agnostic patterns --- NAMESPACE | 19 +++++ R/chart_pattern.R | 72 +++++++++++++++++++ R/ta_CDL2CROWS.R | 37 ++++++++++ R/ta_CDL3BLACKCROWS.R | 37 ++++++++++ R/ta_CDL3INSIDE.R | 37 ++++++++++ R/ta_CDL3LINESTRIKE.R | 37 ++++++++++ R/ta_CDL3OUTSIDE.R | 37 ++++++++++ R/ta_CDL3STARSINSOUTH.R | 37 ++++++++++ R/ta_CDL3WHITESOLDIERS.R | 37 ++++++++++ R/ta_CDLABANDONEDBABY.R | 37 ++++++++++ ...DLADVANCEDBLOCK.R => ta_CDLADVANCEBLOCK.R} | 37 ++++++++++ R/ta_CDLBELTHOLD.R | 37 ++++++++++ R/ta_CDLBREAKAWAY.R | 37 ++++++++++ R/ta_CDLCLOSINGMARUBOZU.R | 37 ++++++++++ R/ta_CDLCONCEALBABYSWALL.R | 39 +++++++++- R/ta_CDLCOUNTERATTACK.R | 37 ++++++++++ R/ta_CDLDARKCLOUDCOVER.R | 37 ++++++++++ R/ta_CDLDOJI.R | 37 ++++++++++ R/ta_CDLDOJISTAR.R | 37 ++++++++++ R/ta_CDLDRAGONFLYDOJI.R | 37 ++++++++++ R/ta_CDLEVENINGDOJISTAR.R | 37 ++++++++++ man/advance_block.Rd | 2 +- 22 files changed, 796 insertions(+), 2 deletions(-) create mode 100644 R/chart_pattern.R rename R/{ta_CDLADVANCEDBLOCK.R => ta_CDLADVANCEBLOCK.R} (74%) diff --git a/NAMESPACE b/NAMESPACE index 7fb888971..f58022b9c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -48,6 +48,7 @@ S3method(WMA,plotly) S3method(abandoned_baby,data.frame) S3method(abandoned_baby,default) S3method(abandoned_baby,matrix) +S3method(abandoned_baby,plotly) S3method(acceleration_bands,data.frame) S3method(acceleration_bands,default) S3method(acceleration_bands,matrix) @@ -55,6 +56,7 @@ S3method(acceleration_bands,plotly) S3method(advance_block,data.frame) S3method(advance_block,default) S3method(advance_block,matrix) +S3method(advance_block,plotly) S3method(aroon,data.frame) S3method(aroon,default) S3method(aroon,matrix) @@ -66,6 +68,7 @@ S3method(aroon_oscillator,plotly) S3method(belt_hold,data.frame) S3method(belt_hold,default) S3method(belt_hold,matrix) +S3method(belt_hold,plotly) S3method(bollinger_bands,data.frame) S3method(bollinger_bands,default) S3method(bollinger_bands,matrix) @@ -74,6 +77,7 @@ S3method(bollinger_bands,plotly) S3method(break_away,data.frame) S3method(break_away,default) S3method(break_away,matrix) +S3method(break_away,plotly) S3method(chaikin_AD_line,data.frame) S3method(chaikin_AD_line,default) S3method(chaikin_AD_line,matrix) @@ -91,6 +95,7 @@ S3method(chart,default) S3method(closing_marubozu,data.frame) S3method(closing_marubozu,default) S3method(closing_marubozu,matrix) +S3method(closing_marubozu,plotly) S3method(commodity_channel_index,data.frame) S3method(commodity_channel_index,default) S3method(commodity_channel_index,matrix) @@ -98,24 +103,31 @@ S3method(commodity_channel_index,plotly) S3method(concealing_baby_swallow,data.frame) S3method(concealing_baby_swallow,default) S3method(concealing_baby_swallow,matrix) +S3method(concealing_baby_swallow,plotly) S3method(counter_attack,data.frame) S3method(counter_attack,default) S3method(counter_attack,matrix) +S3method(counter_attack,plotly) S3method(dark_cloud_cover,data.frame) S3method(dark_cloud_cover,default) S3method(dark_cloud_cover,matrix) +S3method(dark_cloud_cover,plotly) S3method(doji,data.frame) S3method(doji,default) S3method(doji,matrix) +S3method(doji,plotly) S3method(doji_star,data.frame) S3method(doji_star,default) S3method(doji_star,matrix) +S3method(doji_star,plotly) S3method(dragonfly_doji,data.frame) S3method(dragonfly_doji,default) S3method(dragonfly_doji,matrix) +S3method(dragonfly_doji,plotly) S3method(evening_doji_star,data.frame) S3method(evening_doji_star,default) S3method(evening_doji_star,matrix) +S3method(evening_doji_star,plotly) S3method(extended_parabolic_sar,data.frame) S3method(extended_parabolic_sar,default) S3method(extended_parabolic_sar,matrix) @@ -183,24 +195,31 @@ S3method(stochastic_relative_strength_index,plotly) S3method(three_black_crows,data.frame) S3method(three_black_crows,default) S3method(three_black_crows,matrix) +S3method(three_black_crows,plotly) S3method(three_inside,data.frame) S3method(three_inside,default) S3method(three_inside,matrix) +S3method(three_inside,plotly) S3method(three_line_strike,data.frame) S3method(three_line_strike,default) S3method(three_line_strike,matrix) +S3method(three_line_strike,plotly) S3method(three_outside,data.frame) S3method(three_outside,default) S3method(three_outside,matrix) +S3method(three_outside,plotly) S3method(three_stars_in_the_south,data.frame) S3method(three_stars_in_the_south,default) S3method(three_stars_in_the_south,matrix) +S3method(three_stars_in_the_south,plotly) S3method(three_white_soldiers,data.frame) S3method(three_white_soldiers,default) S3method(three_white_soldiers,matrix) +S3method(three_white_soldiers,plotly) S3method(two_crows,data.frame) S3method(two_crows,default) S3method(two_crows,matrix) +S3method(two_crows,plotly) S3method(ultimate_oscillator,data.frame) S3method(ultimate_oscillator,default) S3method(ultimate_oscillator,matrix) diff --git a/R/chart_pattern.R b/R/chart_pattern.R new file mode 100644 index 000000000..2cf0a2e54 --- /dev/null +++ b/R/chart_pattern.R @@ -0,0 +1,72 @@ +pattern <- function( + p, + x, # pattern + high, + low, + pattern_name = "Doji" +) { + ## chart theme controls + chart_theme <- chart.theme() + + ## locate bull and + ## bear indices + idx_bull <- which(x[[1]] > 0L) + idx_bear <- which(x[[1]] < 0L) + + ## add pattern names + ## based on idx + bull_text <- rep(pattern_name, length(idx_bull)) + bear_text <- rep(pattern_name, length(idx_bear)) + + ## calculate offsets + ## to place the markers + offset <- 0.15 * (high - low) + + ## add patterns + ## to the chart + if (length(idx_bear)) { + p <- plotly::add_trace( + p = p, + x = idx_bear, + y = high[idx_bear] + offset[idx_bear], + type = "scatter", + mode = "markers+text", + marker = list( + symbol = "triangle-down", + color = chart_theme$bear_color, + size = 10 + ), + text = bear_text, + textposition = "top center", + textfont = list(color = chart_theme$bear_color, size = 10), + hoverinfo = "skip", + name = "Bearish", + inherit = FALSE, + showlegend = FALSE + ) + } + + if (length(idx_bull)) { + p <- plotly::add_trace( + p = p, + x = idx_bull, + y = low[idx_bull] - offset[idx_bull], + type = "scatter", + mode = "markers+text", + marker = list( + symbol = "triangle-up", + color = chart_theme$bull_color, + size = 10 + ), + text = bull_text, + textposition = "bottom center", + textfont = list(color = chart_theme$bull_color, size = 10), + hoverinfo = "skip", + name = "Bearish", + inherit = FALSE, + showlegend = FALSE + ) + } + + return(p) +} diff --git a/R/ta_CDL2CROWS.R b/R/ta_CDL2CROWS.R index 2cb258914..f5836d44c 100644 --- a/R/ta_CDL2CROWS.R +++ b/R/ta_CDL2CROWS.R @@ -121,3 +121,40 @@ two_crows.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases two_crows +#' @export +two_crows.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- two_crows.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Two Crows" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDL3BLACKCROWS.R b/R/ta_CDL3BLACKCROWS.R index 07f5c68c6..fa48fd215 100644 --- a/R/ta_CDL3BLACKCROWS.R +++ b/R/ta_CDL3BLACKCROWS.R @@ -121,3 +121,40 @@ three_black_crows.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases three_black_crows +#' @export +three_black_crows.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- three_black_crows.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Three Black Crows" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDL3INSIDE.R b/R/ta_CDL3INSIDE.R index fd11eb009..8639c581f 100644 --- a/R/ta_CDL3INSIDE.R +++ b/R/ta_CDL3INSIDE.R @@ -121,3 +121,40 @@ three_inside.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases three_inside +#' @export +three_inside.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- three_inside.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Three Inside" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDL3LINESTRIKE.R b/R/ta_CDL3LINESTRIKE.R index 5b627a898..6cbf42460 100644 --- a/R/ta_CDL3LINESTRIKE.R +++ b/R/ta_CDL3LINESTRIKE.R @@ -121,3 +121,40 @@ three_line_strike.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases three_line_strike +#' @export +three_line_strike.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- three_line_strike.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Three Line Strike" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDL3OUTSIDE.R b/R/ta_CDL3OUTSIDE.R index e2361de30..5519641b4 100644 --- a/R/ta_CDL3OUTSIDE.R +++ b/R/ta_CDL3OUTSIDE.R @@ -121,3 +121,40 @@ three_outside.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases three_outside +#' @export +three_outside.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- three_outside.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Three Outside" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDL3STARSINSOUTH.R b/R/ta_CDL3STARSINSOUTH.R index aec31f958..71b2d14b0 100644 --- a/R/ta_CDL3STARSINSOUTH.R +++ b/R/ta_CDL3STARSINSOUTH.R @@ -121,3 +121,40 @@ three_stars_in_the_south.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases three_stars_in_the_south +#' @export +three_stars_in_the_south.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- three_stars_in_the_south.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Three Stars in the South" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDL3WHITESOLDIERS.R b/R/ta_CDL3WHITESOLDIERS.R index 449b5a4db..7c54c45b7 100644 --- a/R/ta_CDL3WHITESOLDIERS.R +++ b/R/ta_CDL3WHITESOLDIERS.R @@ -121,3 +121,40 @@ three_white_soldiers.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases three_white_soldiers +#' @export +three_white_soldiers.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- three_white_soldiers.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Three White Soldiers" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLABANDONEDBABY.R b/R/ta_CDLABANDONEDBABY.R index 33194dc91..9e02c8243 100644 --- a/R/ta_CDLABANDONEDBABY.R +++ b/R/ta_CDLABANDONEDBABY.R @@ -126,3 +126,40 @@ abandoned_baby.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases abandoned_baby +#' @export +abandoned_baby.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- abandoned_baby.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Abandoned Baby" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLADVANCEDBLOCK.R b/R/ta_CDLADVANCEBLOCK.R similarity index 74% rename from R/ta_CDLADVANCEDBLOCK.R rename to R/ta_CDLADVANCEBLOCK.R index 6a3044de1..42f4437cf 100644 --- a/R/ta_CDLADVANCEDBLOCK.R +++ b/R/ta_CDLADVANCEBLOCK.R @@ -121,3 +121,40 @@ advance_block.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases advance_block +#' @export +advance_block.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- advance_block.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Advance Block" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLBELTHOLD.R b/R/ta_CDLBELTHOLD.R index 685ee6469..224ad82d4 100644 --- a/R/ta_CDLBELTHOLD.R +++ b/R/ta_CDLBELTHOLD.R @@ -121,3 +121,40 @@ belt_hold.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases belt_hold +#' @export +belt_hold.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- belt_hold.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Belt Hold" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLBREAKAWAY.R b/R/ta_CDLBREAKAWAY.R index 71b377c7c..b148b5f79 100644 --- a/R/ta_CDLBREAKAWAY.R +++ b/R/ta_CDLBREAKAWAY.R @@ -121,3 +121,40 @@ break_away.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases break_away +#' @export +break_away.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- break_away.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Break Away" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLCLOSINGMARUBOZU.R b/R/ta_CDLCLOSINGMARUBOZU.R index 41bb4c7e2..5125063b8 100644 --- a/R/ta_CDLCLOSINGMARUBOZU.R +++ b/R/ta_CDLCLOSINGMARUBOZU.R @@ -121,3 +121,40 @@ closing_marubozu.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases closing_marubozu +#' @export +closing_marubozu.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- closing_marubozu.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Closing Marubozu" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLCONCEALBABYSWALL.R b/R/ta_CDLCONCEALBABYSWALL.R index f2c47f101..45dc1db24 100644 --- a/R/ta_CDLCONCEALBABYSWALL.R +++ b/R/ta_CDLCONCEALBABYSWALL.R @@ -78,7 +78,7 @@ concealing_baby_swallow.default <- function( ## from source x <- as.data.frame( .Call( - "impl_ta_CDLBABYSWALL", + "impl_ta_CDLCONCEALBABYSWALL", x[[1]], x[[2]], x[[3]], @@ -121,3 +121,40 @@ concealing_baby_swallow.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases concealing_baby_swallow +#' @export +concealing_baby_swallow.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- concealing_baby_swallow.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Concealing Baby Swallow" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLCOUNTERATTACK.R b/R/ta_CDLCOUNTERATTACK.R index bdea84168..793360d70 100644 --- a/R/ta_CDLCOUNTERATTACK.R +++ b/R/ta_CDLCOUNTERATTACK.R @@ -121,3 +121,40 @@ counter_attack.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases counter_attack +#' @export +counter_attack.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- counter_attack.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Counter Attack" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLDARKCLOUDCOVER.R b/R/ta_CDLDARKCLOUDCOVER.R index bc5e41b07..eba47309c 100644 --- a/R/ta_CDLDARKCLOUDCOVER.R +++ b/R/ta_CDLDARKCLOUDCOVER.R @@ -126,3 +126,40 @@ dark_cloud_cover.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases dark_cloud_cover +#' @export +dark_cloud_cover.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- dark_cloud_cover.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Dark Cloud Cover" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index b844e2732..0b6587a89 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -121,3 +121,40 @@ doji.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases doji +#' @export +doji.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- doji.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Doji" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index 4574af8ba..e6d28cd22 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -121,3 +121,40 @@ doji_star.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases doji_star +#' @export +doji_star.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- doji_star.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Doji Star" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index c3a66d595..d10aa7828 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -121,3 +121,40 @@ dragonfly_doji.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases dragonfly_doji +#' @export +dragonfly_doji.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- dragonfly_doji.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Dragonfly Doji" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index ef757744c..703e3bb51 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -126,3 +126,40 @@ evening_doji_star.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases evening_doji_star +#' @export +evening_doji_star.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- evening_doji_star.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Evening Doji Star" + ) + + .plotting_environment$main +} diff --git a/man/advance_block.Rd b/man/advance_block.Rd index 41d934412..c464d7922 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_CDLADVANCEDBLOCK.R +% Please edit documentation in R/ta_CDLADVANCEBLOCK.R \name{advance_block} \alias{advance_block} \title{Advance Block} From 3d53b2a313459bff87563ae8703f98bdf0602038 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 25 Sep 2025 18:15:13 +0200 Subject: [PATCH 145/166] :hammer: Bug-fix in Doji Star * Was incorrectly named. --- src/api.h | 2 +- src/init.c | 2 +- src/ta_CDLDOJISTAR.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api.h b/src/api.h index fbb4dcafa..b80837384 100644 --- a/src/api.h +++ b/src/api.h @@ -31,7 +31,7 @@ SEXP impl_ta_CDLCONCEALBABYSWALL(SEXP open, SEXP high, SEXP low, SEXP close, SEX SEXP impl_ta_CDLCOUNTERATTACK(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDARKCLOUDCOVER(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); -SEXP impl_ta_CDLDOJISTARSTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); SEXP impl_ta_CMO(SEXP x, SEXP optTimePeriod); diff --git a/src/init.c b/src/init.c index 96dc3f57f..dde94ff18 100644 --- a/src/init.c +++ b/src/init.c @@ -36,7 +36,7 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_CDLCOUNTERATTACK, 5), CALLDEF(impl_ta_CDLDARKCLOUDCOVER, 6), CALLDEF(impl_ta_CDLDOJI, 5), - CALLDEF(impl_ta_CDLDOJISTARSTAR, 5), + CALLDEF(impl_ta_CDLDOJISTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 6), CALLDEF(impl_ta_CMO, 2), diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index a8a622a8c..30c1e0060 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -1,4 +1,4 @@ -// Interface to TA_CDLDOJISTARSTAR +// Interface to TA_CDLDOJISTAR // // Parameters // open: numeric vector of opening prices @@ -21,8 +21,8 @@ #include #include -SEXP impl_ta_CDLDOJISTARSTAR(SEXP open, SEXP high, SEXP low, SEXP close, - SEXP normalize_flag) { +SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { int protect_count = 0; From fba53ab500e75102910420e7501bf4c859784083 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 25 Sep 2025 22:05:11 +0200 Subject: [PATCH 146/166] :hammer: Removed TA check --- src/lib.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/lib.h b/src/lib.h index 0f81525c1..1ce9393bc 100644 --- a/src/lib.h +++ b/src/lib.h @@ -26,14 +26,4 @@ #undef Int32 // clang-format on -static void ensure_ta_initialized(void) { - static int inited = 0; - if (!inited) { - if (TA_Initialize() != TA_SUCCESS) { - Rf_error("TA-Lib initialization failed."); - } - inited = 1; - } -} - #endif // _LIB_H_ \ No newline at end of file From 22ff38f0290a2ca07f2577f275ce208eeff20886 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 25 Sep 2025 22:05:38 +0200 Subject: [PATCH 147/166] :hammer: Hilbert Transform {plotly}-methods * The implementations are a rough sketch. - Primarily for the checks. --- NAMESPACE | 6 +++++ R/ta_HT_DCPERIOD.R | 44 +++++++++++++++++++++++++++++++++++ R/ta_HT_DCPHASE.R | 46 ++++++++++++++++++++++++++++++++++++- R/ta_HT_PHASOR.R | 54 +++++++++++++++++++++++++++++++++++++++++-- R/ta_HT_SINE.R | 56 +++++++++++++++++++++++++++++++++++++++++++-- R/ta_HT_TRENDLINE.R | 49 ++++++++++++++++++++++++++++++++++++++- R/ta_HT_TRENDMODE.R | 51 +++++++++++++++++++++++++++++++++++++++++ man/ht_dcperiod.Rd | 4 +++- man/ht_trendline.Rd | 3 +++ man/ht_trendmode.Rd | 3 +++ 10 files changed, 309 insertions(+), 7 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index f58022b9c..f9013756f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -140,26 +140,32 @@ S3method(ht_dc_phase,data.frame) S3method(ht_dc_phase,default) S3method(ht_dc_phase,matrix) S3method(ht_dc_phase,numeric) +S3method(ht_dc_phase,plotly) S3method(ht_dcperiod,data.frame) S3method(ht_dcperiod,default) S3method(ht_dcperiod,matrix) S3method(ht_dcperiod,numeric) +S3method(ht_dcperiod,plotly) S3method(ht_phasor,data.frame) S3method(ht_phasor,default) S3method(ht_phasor,matrix) S3method(ht_phasor,numeric) +S3method(ht_phasor,plotly) S3method(ht_sine_wave,data.frame) S3method(ht_sine_wave,default) S3method(ht_sine_wave,matrix) S3method(ht_sine_wave,numeric) +S3method(ht_sine_wave,plotly) S3method(ht_trendline,data.frame) S3method(ht_trendline,default) S3method(ht_trendline,matrix) S3method(ht_trendline,numeric) +S3method(ht_trendline,plotly) S3method(ht_trendmode,data.frame) S3method(ht_trendmode,default) S3method(ht_trendmode,matrix) S3method(ht_trendmode,numeric) +S3method(ht_trendmode,plotly) S3method(money_flow_index,data.frame) S3method(money_flow_index,default) S3method(money_flow_index,matrix) diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R index 9e7ea498b..7b0d1f6db 100644 --- a/R/ta_HT_DCPERIOD.R +++ b/R/ta_HT_DCPERIOD.R @@ -10,6 +10,7 @@ #' @template description ht_dcperiod <- function( x, + cols, ... ) { UseMethod("ht_dcperiod") @@ -132,3 +133,46 @@ ht_dcperiod.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases ht_dcperiod +#' @export +ht_dcperiod.plotly <- function( + x, + cols, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + ... + ) + ) + + ## construct indicator + ## + .indicator <- ht_dcperiod.default( + x = x, + cols = cols + ) + + .indicator$idx <- 1:nrow(.indicator) + + output <- plotly::plot_ly( + data = .indicator, + name = "Dominant Cycle Period", + x = ~idx, + y = ~dominant_cycle_period + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R index 64c743734..b1b86e276 100644 --- a/R/ta_HT_DCPHASE.R +++ b/R/ta_HT_DCPHASE.R @@ -10,6 +10,7 @@ #' @template description ht_dc_phase <- function( x, + cols, ... ) { UseMethod("ht_dc_phase") @@ -67,7 +68,7 @@ ht_dc_phase.default <- function( ) ) - colnames(x)[1] <- "dominant_cycle_period" + colnames(x)[1] <- "dominant_cycle_phase" return(x) } @@ -132,3 +133,46 @@ ht_dc_phase.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases ht_dc_phase +#' @export +ht_dc_phase.plotly <- function( + x, + cols, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + ... + ) + ) + + ## construct indicator + ## + .indicator <- ht_dc_phase.default( + x = x, + cols = cols + ) + + .indicator$idx <- 1:nrow(.indicator) + + output <- plotly::plot_ly( + data = .indicator, + name = "Dominant Cycle Phase", + x = ~idx, + y = ~dominant_cycle_phase + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R index a0e49d12b..0cfd6ca7a 100644 --- a/R/ta_HT_PHASOR.R +++ b/R/ta_HT_PHASOR.R @@ -10,6 +10,7 @@ #' @template description ht_phasor <- function( x, + cols, ... ) { UseMethod("ht_phasor") @@ -67,8 +68,6 @@ ht_phasor.default <- function( ) ) - colnames(x)[1] <- "dominant_cycle_period" - return(x) } @@ -132,3 +131,54 @@ ht_phasor.matrix <- function( NextMethod() ) } + +#' @usage NULL +#' @aliases ht_phasor +#' @export +ht_phasor.plotly <- function( + x, + cols, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + ... + ) + ) + + ## construct indicator + ## + .indicator <- ht_phasor.default( + x = x, + cols = cols + ) + + .indicator$idx <- 1:nrow(.indicator) + + output <- plotly::plot_ly( + data = .indicator, + name = "Phasor Components", + x = ~idx, + y = ~inphase + ) + + output <- plotly::add_lines( + output, + x = ~idx, + y = ~quadrature, + data = .indicator, + inherit = FALSE + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R index 2cacc9d4e..240bddcbe 100644 --- a/R/ta_HT_SINE.R +++ b/R/ta_HT_SINE.R @@ -10,6 +10,7 @@ #' @template description ht_sine_wave <- function( x, + cols, ... ) { UseMethod("ht_sine_wave") @@ -67,8 +68,6 @@ ht_sine_wave.default <- function( ) ) - colnames(x)[1] <- "dominant_cycle_period" - return(x) } @@ -132,3 +131,56 @@ ht_sine_wave.matrix <- function( NextMethod() ) } + + +#' @usage NULL +#' @aliases ht_sine_wave +#' @export +ht_sine_wave.plotly <- function( + x, + cols, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + ... + ) + ) + + ## construct indicator + ## + .indicator <- ht_sine_wave.default( + x = x, + cols = cols, + ... + ) + + .indicator$idx <- 1:nrow(.indicator) + + output <- plotly::plot_ly( + data = .indicator, + name = "Sine Wave", + x = ~idx, + y = ~sine + ) + + output <- plotly::add_lines( + p = output, + x = ~idx, + y = ~leadsine, + data = .indicator, + inherit = FALSE + ) + + .plotting_environment$sub <- c( + .plotting_environment$sub, + list(output) + ) + + output +} diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R index 4b7746704..d7fbb10ad 100644 --- a/R/ta_HT_TRENDLINE.R +++ b/R/ta_HT_TRENDLINE.R @@ -10,6 +10,7 @@ #' @template description ht_trendline <- function( x, + cols, ... ) { UseMethod("ht_trendline") @@ -67,7 +68,7 @@ ht_trendline.default <- function( ) ) - colnames(x)[1] <- "dominant_cycle_period" + colnames(x)[1] <- "ht_trendline" return(x) } @@ -132,3 +133,49 @@ ht_trendline.matrix <- function( NextMethod() ) } + + +#' @rdname ht_trendline +#' @usage NULL +#' @export +ht_trendline.plotly <- function( + x, + cols, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = cols, + default = ~open, + ... + ) + ) + + ## indicator + .indicator <- ht_trendline.default( + x = x, + cols = cols + ) + .indicator$idx <- 1:nrow(.indicator) + + for (i in 1:ncol(x)) { + local({ + j <- i + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + data = .indicator, + x = ~idx, + y = ~ .indicator[, j], + type = "scatter", + mode = "lines", + name = sprintf("Trendline"), + inherit = FALSE + ) + }) + } + + .plotting_environment$main +} diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R index e66f7efd1..0ef85549c 100644 --- a/R/ta_HT_TRENDMODE.R +++ b/R/ta_HT_TRENDMODE.R @@ -10,6 +10,7 @@ #' @template description ht_trendmode <- function( x, + cols, ... ) { UseMethod("ht_trendmode") @@ -132,3 +133,53 @@ ht_trendmode.matrix <- function( NextMethod() ) } + +#' @rdname ht_trendmode +#' @usage NULL +#' @export +ht_trendmode.plotly <- function( + x, + cols, + ... +) { + ## prepare series + ## from + x <- as.data.frame( + series( + x = x, + formula = ~ open + high + low + close, + default = ~ open + high + low + close, + ... + ) + ) + + ## indicator + .indicator <- ht_trendmode.default( + x = x, + cols = cols + ) + + .indicator$idx <- 1:nrow(.indicator) + .indicator$mid_price <- rowMeans( + x[, c(2, 4)] + ) + + ## locate all trend modes + trend_idx <- which(.indicator[[1]] == 1) + + .plotting_environment$main <- plotly::add_trace( + .plotting_environment$main, + x = ~ idx[trend_idx], + y = ~ .indicator$mid_price[trend_idx], + type = "scatter", + mode = "markers", + marker = list( + symbol = "star", + size = 10 + ), + name = sprintf("KAMA(%d)", 3), + inherit = FALSE + ) + + .plotting_environment$main +} diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd index 222605dc7..99395edfb 100644 --- a/man/ht_dcperiod.Rd +++ b/man/ht_dcperiod.Rd @@ -4,11 +4,13 @@ \alias{ht_dcperiod} \title{Hilbert Transform - Dominant Cycle Period} \usage{ -ht_dcperiod(x, ...) +ht_dcperiod(x, cols, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index 6c336c762..3f48e1de5 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_TRENDLINE.R \name{ht_trendline} \alias{ht_trendline} +\alias{ht_trendline.plotly} \title{Hilbert Transform - Instantaneous Trendline} \usage{ ht_trendline(x, ...) @@ -10,6 +11,8 @@ ht_trendline(x, ...) \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} \item{...}{Additional parameters passed into \link{model.frame}} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} } \description{ The \code{ht_trendline()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index d3a8209e4..b1d1c7a48 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_TRENDMODE.R \name{ht_trendmode} \alias{ht_trendmode} +\alias{ht_trendmode.plotly} \title{Hilbert Transform - Trend vs Cycle Mode} \usage{ ht_trendmode(x, ...) @@ -10,6 +11,8 @@ ht_trendmode(x, ...) \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} \item{...}{Additional parameters passed into \link{model.frame}} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} } \description{ The \code{ht_trendmode()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide From 5f9e0441eb378f9d1835d51539542f5cb420b690 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Thu, 25 Sep 2025 22:13:16 +0200 Subject: [PATCH 148/166] :hammer: Hilbert Transform Tests --- tests/testthat/test-ta_HT_DCPERIOD.R | 55 +++++++++++++++++++++++++++ tests/testthat/test-ta_HT_DCPHASE.R | 55 +++++++++++++++++++++++++++ tests/testthat/test-ta_HT_PHASOR.R | 55 +++++++++++++++++++++++++++ tests/testthat/test-ta_HT_SINE.R | 55 +++++++++++++++++++++++++++ tests/testthat/test-ta_HT_TRENDLINE.R | 55 +++++++++++++++++++++++++++ 5 files changed, 275 insertions(+) create mode 100644 tests/testthat/test-ta_HT_DCPERIOD.R create mode 100644 tests/testthat/test-ta_HT_DCPHASE.R create mode 100644 tests/testthat/test-ta_HT_PHASOR.R create mode 100644 tests/testthat/test-ta_HT_SINE.R create mode 100644 tests/testthat/test-ta_HT_TRENDLINE.R diff --git a/tests/testthat/test-ta_HT_DCPERIOD.R b/tests/testthat/test-ta_HT_DCPERIOD.R new file mode 100644 index 000000000..6544f8aee --- /dev/null +++ b/tests/testthat/test-ta_HT_DCPERIOD.R @@ -0,0 +1,55 @@ +## script: HTDCPHASE +## author: Serkan Korkmaz +testthat::test_that(desc = "HT DCPERIOD", code = { + ## 1) calculate values + ## with and without alias + output <- ht_dcperiod(SPY) + alias <- HT_DCPERIOD(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(ht_dcperiod) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(ht_dcperiod(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(ht_dcperiod(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = ht_dcperiod( + BTC + ), + expected = ht_dcperiod( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_HT_DCPHASE.R b/tests/testthat/test-ta_HT_DCPHASE.R new file mode 100644 index 000000000..15f04f680 --- /dev/null +++ b/tests/testthat/test-ta_HT_DCPHASE.R @@ -0,0 +1,55 @@ +## script: HTDCPHASE +## author: Serkan Korkmaz +testthat::test_that(desc = "HT DCPHASE", code = { + ## 1) calculate values + ## with and without alias + output <- ht_dc_phase(SPY) + alias <- HT_DCPHASE(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(ht_dc_phase) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(ht_dc_phase(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(ht_dc_phase(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = ht_dc_phase( + BTC + ), + expected = ht_dc_phase( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_HT_PHASOR.R b/tests/testthat/test-ta_HT_PHASOR.R new file mode 100644 index 000000000..8fd2bbf9b --- /dev/null +++ b/tests/testthat/test-ta_HT_PHASOR.R @@ -0,0 +1,55 @@ +## script: HTPHASOR +## author: Serkan Korkmaz +testthat::test_that(desc = "HT PHASOR", code = { + ## 1) calculate values + ## with and without alias + output <- ht_phasor(SPY) + alias <- HT_PHASOR(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(ht_phasor) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(ht_phasor(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(ht_phasor(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = ht_phasor( + BTC + ), + expected = ht_phasor( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_HT_SINE.R b/tests/testthat/test-ta_HT_SINE.R new file mode 100644 index 000000000..9debb9bf5 --- /dev/null +++ b/tests/testthat/test-ta_HT_SINE.R @@ -0,0 +1,55 @@ +## script: HTSINE +## author: Serkan Korkmaz +testthat::test_that(desc = "HT SINEWAVE", code = { + ## 1) calculate values + ## with and without alias + output <- ht_sine_wave(SPY) + alias <- HT_SINE(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(ht_sine_wave) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(ht_sine_wave(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(ht_sine_wave(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = ht_sine_wave( + BTC + ), + expected = ht_sine_wave( + BTC, + cols = ~open + ) + ) +}) diff --git a/tests/testthat/test-ta_HT_TRENDLINE.R b/tests/testthat/test-ta_HT_TRENDLINE.R new file mode 100644 index 000000000..20344a0f5 --- /dev/null +++ b/tests/testthat/test-ta_HT_TRENDLINE.R @@ -0,0 +1,55 @@ +## script: HTTRENDLINE +## author: Serkan Korkmaz +testthat::test_that(desc = "HT TRENDLINE", code = { + ## 1) calculate values + ## with and without alias + output <- ht_trendline(SPY) + alias <- HT_TRENDLINE(SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(ht_trendline) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly") + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits(ht_trendline(SPY), class(SPY)) + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits(ht_trendline(BTC), class(BTC)) + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = ht_trendline( + BTC + ), + expected = ht_trendline( + BTC, + cols = ~open + ) + ) +}) From b5b789ffbce719dcc71a1637907df307cc37ee4a Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 07:45:43 +0200 Subject: [PATCH 149/166] :hammer: StochRSI is now selfcontained * It doesnt need to have RSI passed explicitly. --- R/ta_STOCHRSI.R | 60 ++++++++++++++++++++++--------- R/utils.R | 21 +++++++++++ tests/testthat/test-ta_STOCHRSI.R | 16 ++++----- 3 files changed, 72 insertions(+), 25 deletions(-) diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 55fcc294d..52954bbb9 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -9,11 +9,14 @@ #' #' @param fast_k Time period for building the Fast-K line. #' @param fast_d_MAtype Smoothing for making the Fast-D line. +#' @param n_rsi Time period for [RSI] +#' #' @template description stochastic_relative_strength_index <- function( x, cols, n = 10, + n_rsi = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), ... @@ -35,12 +38,18 @@ stochastic_relative_strength_index.default <- function( x, cols, n = 10, + n_rsi = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), na.rm = TRUE, ... ) { - fast_d_MAtype <- fast_d_MAtype + ## calculate the rows of + ## 'x' as the StochRSI is a combination + ## of two indicators the the lengths + ## will be clipped - all functions must + ## have nrow(in) == nrow(out) + x_rows <- nrow(x) ## check input ## cols if passed @@ -66,23 +75,39 @@ stochastic_relative_strength_index.default <- function( ) } - x <- series( - x = cols, - default = ~RSI, - data = if (na.rm) na.omit(x) else x, + ## calculate RSI + x <- relative_strength_index.default( + x = x, + cols = cols, + n = n_rsi, ... ) - as.data.frame( + x <- as.data.frame( .Call( "impl_ta_STOCHRSI", - x[[1]], + x[[1]][!is.na(x[[1]])], as.integer(n), as.integer(fast_k), fast_d_MAtype$n, fast_d_MAtype$maType ) ) + + ## append na values + ## if there is a mismatch + ## between input rows and + ## output rows + if (nrow(x) != x_rows) { + x <- na_pad( + x = x, + n = x_rows - nrow(x) + ) + } + + return( + x + ) } #' @usage NULL @@ -92,6 +117,7 @@ stochastic_relative_strength_index.data.frame <- function( x, cols, n = 10, + n_rsi = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), ... @@ -108,6 +134,7 @@ stochastic_relative_strength_index.matrix <- function( x, cols, n = 10, + n_rsi = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), ... @@ -124,6 +151,7 @@ stochastic_relative_strength_index.plotly <- function( x, cols, n = 10, + n_rsi = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), ... @@ -137,21 +165,19 @@ stochastic_relative_strength_index.plotly <- function( series( x = x, formula = cols, - default = ~RSI, + default = ~open, ... ) ) ## indicator - .indicator <- as.data.frame( - .Call( - "impl_ta_STOCHRSI", - x[[1]], - as.integer(n), - as.integer(fast_k), - fast_d_MAtype$n, - fast_d_MAtype$maType - ) + .indicator <- stochastic_relative_strength_index.default( + x = x, + cols = cols, + n = n, + n_rsi = n_rsi, + fast_k = fast_k, + fast_d_MAtype = fast_d_MAtype ) .indicator$idx <- 1:nrow(.indicator) diff --git a/R/utils.R b/R/utils.R index 10213842d..ef1b3988c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -24,6 +24,27 @@ flatten <- function(x) { } } +## padding with NAs +na_pad <- function(x, n = 5) { + if (n <= 0L) { + return(x) + } + + rbind( + setNames( + as.data.frame( + matrix( + NA_real_, + nrow = n, + ncol = ncol(x) + ) + ), + colnames(x) + ), + x + ) +} + ## extract open, high, low, close ## and volume by position ## diff --git a/tests/testthat/test-ta_STOCHRSI.R b/tests/testthat/test-ta_STOCHRSI.R index b0f8e9688..9c816d77b 100644 --- a/tests/testthat/test-ta_STOCHRSI.R +++ b/tests/testthat/test-ta_STOCHRSI.R @@ -3,8 +3,8 @@ testthat::test_that(desc = "Stochastic Relative Strength Index", code = { ## 1) calculate values ## with and without alias - output <- stochastic_relative_strength_index(RSI(SPY)) - alias <- STOCHRSI(RSI(SPY)) + output <- stochastic_relative_strength_index(SPY) + alias <- STOCHRSI(SPY) ## 1.1) check if the values ## are equal @@ -18,7 +18,7 @@ testthat::test_that(desc = "Stochastic Relative Strength Index", code = { output <- testthat::expect_no_error( { chart(BTC) - indicator(stochastic_relative_strength_index, data = RSI(BTC)) + indicator(stochastic_relative_strength_index) } ) @@ -33,23 +33,23 @@ testthat::test_that(desc = "Stochastic Relative Strength Index", code = { ## 3.1) matrix testthat::expect_true( - inherits(stochastic_relative_strength_index(RSI(SPY)), class(RSI(SPY))) + inherits(stochastic_relative_strength_index(SPY), class(SPY)) ) ## 3.2) data.frame testthat::expect_true( - inherits(stochastic_relative_strength_index(RSI(BTC)), class(RSI(BTC))) + inherits(stochastic_relative_strength_index(BTC), class(BTC)) ) ## 4) test that default ## values equals testthat::expect_equal( object = stochastic_relative_strength_index( - RSI(BTC) + BTC ), expected = stochastic_relative_strength_index( - RSI(BTC), - cols = ~RSI + BTC, + cols = ~open ) ) }) From f8af65602309d8c615b39f8db047f08f83d79361 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 07:46:19 +0200 Subject: [PATCH 150/166] :books: Updated documentation --- man/ht_dc_phase.Rd | 4 +++- man/ht_phasor.Rd | 4 +++- man/ht_sine_wave.Rd | 4 +++- man/ht_trendline.Rd | 6 +++--- man/ht_trendmode.Rd | 6 +++--- man/stochastic_relative_strength_index.Rd | 3 +++ 6 files changed, 18 insertions(+), 9 deletions(-) diff --git a/man/ht_dc_phase.Rd b/man/ht_dc_phase.Rd index db2fe96fa..45b492d6d 100644 --- a/man/ht_dc_phase.Rd +++ b/man/ht_dc_phase.Rd @@ -4,11 +4,13 @@ \alias{ht_dc_phase} \title{Hilbert Transform - Dominant Cycle Phase} \usage{ -ht_dc_phase(x, ...) +ht_dc_phase(x, cols, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd index e1f66941b..db2c3568d 100644 --- a/man/ht_phasor.Rd +++ b/man/ht_phasor.Rd @@ -4,11 +4,13 @@ \alias{ht_phasor} \title{Hilbert Transform - Phasor Components} \usage{ -ht_phasor(x, ...) +ht_phasor(x, cols, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/ht_sine_wave.Rd b/man/ht_sine_wave.Rd index cabf28f4b..6f8946e6d 100644 --- a/man/ht_sine_wave.Rd +++ b/man/ht_sine_wave.Rd @@ -4,11 +4,13 @@ \alias{ht_sine_wave} \title{Hilbert Transform - SineWave} \usage{ -ht_sine_wave(x, ...) +ht_sine_wave(x, cols, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + \item{...}{Additional parameters passed into \link{model.frame}} } \description{ diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index 3f48e1de5..f763c8e56 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -5,14 +5,14 @@ \alias{ht_trendline.plotly} \title{Hilbert Transform - Instantaneous Trendline} \usage{ -ht_trendline(x, ...) +ht_trendline(x, cols, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{...}{Additional parameters passed into \link{model.frame}} - \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{ht_trendline()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index b1d1c7a48..2b44c8760 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -5,14 +5,14 @@ \alias{ht_trendmode.plotly} \title{Hilbert Transform - Trend vs Cycle Mode} \usage{ -ht_trendmode(x, ...) +ht_trendmode(x, cols, ...) } \arguments{ \item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} -\item{...}{Additional parameters passed into \link{model.frame}} - \item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} } \description{ The \code{ht_trendmode()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index 2b5cc3b95..48b159ca8 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -8,6 +8,7 @@ stochastic_relative_strength_index( x, cols, n = 10, + n_rsi = 10, fast_k = 5, fast_d_MAtype = SMA(n = 10), ... @@ -20,6 +21,8 @@ stochastic_relative_strength_index( \item{n}{An \link{integer} of \link{length} 1.} +\item{n_rsi}{Time period for \link{RSI}} + \item{fast_k}{Time period for building the Fast-K line.} \item{fast_d_MAtype}{Smoothing for making the Fast-D line.} From 2ff7b691d3c5207f7a6f2c5984bd42cc8964a29f Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 08:21:31 +0200 Subject: [PATCH 151/166] :hammer: Updated DESCRIPTION * Added {stats} and {utils} for the examples and helpers. --- DESCRIPTION | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1628b8cb1..a13e0f125 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -24,5 +24,7 @@ Depends: R (>= 3.5) LazyData: true Imports: - plotly + plotly, + stats, + utils VignetteBuilder: knitr From 5cb4b06ae5eb5ad9df0b9ddaf7e1edd507ba7fb3 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 08:23:01 +0200 Subject: [PATCH 152/166] :books: Documentation Updated * All examples are now namespace qualified. * Modified the StochRSI Documentation --- R/ta_STOCHRSI.R | 2 +- R/utils.R | 4 ++-- man-roxygen/description.R | 2 +- man/DEMA.Rd | 2 +- man/EMA.Rd | 2 +- man/KAMA.Rd | 2 +- man/MAMA.Rd | 2 +- man/SMA.Rd | 2 +- man/T3.Rd | 2 +- man/TEMA.Rd | 2 +- man/TRIMA.Rd | 2 +- man/WMA.Rd | 2 +- man/abandoned_baby.Rd | 2 +- man/acceleration_bands.Rd | 2 +- man/advance_block.Rd | 2 +- man/aroon.Rd | 2 +- man/aroon_oscillator.Rd | 2 +- man/belt_hold.Rd | 2 +- man/bollinger_bands.Rd | 2 +- man/break_away.Rd | 2 +- man/chaikin_AD_line.Rd | 2 +- man/chaikin_AD_oscillator.Rd | 2 +- man/chande_momentum_oscillator.Rd | 2 +- man/closing_marubozu.Rd | 2 +- man/commodity_channel_index.Rd | 2 +- man/concealing_baby_swallow.Rd | 2 +- man/counter_attack.Rd | 2 +- man/dark_cloud_cover.Rd | 2 +- man/doji.Rd | 2 +- man/doji_star.Rd | 2 +- man/dragonfly_doji.Rd | 2 +- man/evening_doji_star.Rd | 2 +- man/extended_parabolic_sar.Rd | 2 +- man/fast_stochastic.Rd | 2 +- man/ht_dc_phase.Rd | 2 +- man/ht_dcperiod.Rd | 2 +- man/ht_phasor.Rd | 2 +- man/ht_sine_wave.Rd | 2 +- man/ht_trendline.Rd | 2 +- man/ht_trendmode.Rd | 2 +- man/money_flow_index.Rd | 2 +- man/moving_average_convergence_divergence.Rd | 2 +- man/on_balance_volume.Rd | 2 +- man/parabolic_sar.Rd | 2 +- man/relative_strength_index.Rd | 2 +- man/stochastic.Rd | 2 +- man/stochastic_relative_strength_index.Rd | 4 ++-- man/three_black_crows.Rd | 2 +- man/three_inside.Rd | 2 +- man/three_line_strike.Rd | 2 +- man/three_outside.Rd | 2 +- man/three_stars_in_the_south.Rd | 2 +- man/three_white_soldiers.Rd | 2 +- man/two_crows.Rd | 2 +- man/ultimate_oscillator.Rd | 2 +- 55 files changed, 57 insertions(+), 57 deletions(-) diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 52954bbb9..8f5d5d844 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -9,7 +9,7 @@ #' #' @param fast_k Time period for building the Fast-K line. #' @param fast_d_MAtype Smoothing for making the Fast-D line. -#' @param n_rsi Time period for [RSI] +#' @param n_rsi Time period for [relative_strength_index] #' #' @template description stochastic_relative_strength_index <- function( diff --git a/R/utils.R b/R/utils.R index ef1b3988c..9bf1da01b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -31,7 +31,7 @@ na_pad <- function(x, n = 5) { } rbind( - setNames( + stats::setNames( as.data.frame( matrix( NA_real_, @@ -74,7 +74,7 @@ na_pad <- function(x, n = 5) { map_maType_call <- function(call_expr) { args <- as.list(call_expr)[-1L] head_chr <- as.character(call_expr[[1L]]) - fun_name <- tail(head_chr, 1L) + fun_name <- utils::tail(head_chr, 1L) maType <- switch( fun_name, diff --git a/man-roxygen/description.R b/man-roxygen/description.R index 26f5d6760..821cfe9d8 100644 --- a/man-roxygen/description.R +++ b/man-roxygen/description.R @@ -26,7 +26,7 @@ #' output <- talib::<%= .fun %>(BTC) #' #' ## display the results -#' tail(output) +#' utils::tail(output) #' #' ## visualize the indicator #' ## with candlesticks diff --git a/man/DEMA.Rd b/man/DEMA.Rd index ba9ed9d12..2b7add66a 100644 --- a/man/DEMA.Rd +++ b/man/DEMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::DEMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/EMA.Rd b/man/EMA.Rd index 7a9070172..dd20b0385 100644 --- a/man/EMA.Rd +++ b/man/EMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::EMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/KAMA.Rd b/man/KAMA.Rd index 8b936fe37..1a8c40570 100644 --- a/man/KAMA.Rd +++ b/man/KAMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::KAMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/MAMA.Rd b/man/MAMA.Rd index 8f05309a5..cb9267f47 100644 --- a/man/MAMA.Rd +++ b/man/MAMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::MAMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/SMA.Rd b/man/SMA.Rd index c08da76f1..e10283ed0 100644 --- a/man/SMA.Rd +++ b/man/SMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::SMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/T3.Rd b/man/T3.Rd index ba3022f37..5b3f40f9e 100644 --- a/man/T3.Rd +++ b/man/T3.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::T3(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/TEMA.Rd b/man/TEMA.Rd index ec870e6a3..74bb578b9 100644 --- a/man/TEMA.Rd +++ b/man/TEMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::TEMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/TRIMA.Rd b/man/TRIMA.Rd index 4bada7e35..1fac1cedf 100644 --- a/man/TRIMA.Rd +++ b/man/TRIMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::TRIMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/WMA.Rd b/man/WMA.Rd index abd2fa013..1aea5e11b 100644 --- a/man/WMA.Rd +++ b/man/WMA.Rd @@ -40,7 +40,7 @@ data(BTC, package = "talib") output <- talib::WMA(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index 9907c6eac..7a559362c 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -39,7 +39,7 @@ data(BTC, package = "talib") output <- talib::abandoned_baby(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 1166c76d8..974c4a6d5 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -43,7 +43,7 @@ data(BTC, package = "talib") output <- talib::acceleration_bands(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/advance_block.Rd b/man/advance_block.Rd index c464d7922..290927720 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::advance_block(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/aroon.Rd b/man/aroon.Rd index 1f1a73b89..03e042385 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -42,7 +42,7 @@ data(BTC, package = "talib") output <- talib::aroon(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index 2dc4826ef..a308e8091 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -41,7 +41,7 @@ data(BTC, package = "talib") output <- talib::aroon_oscillator(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/belt_hold.Rd b/man/belt_hold.Rd index d414fa101..efd1e3560 100644 --- a/man/belt_hold.Rd +++ b/man/belt_hold.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::belt_hold(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index b7ae7f1d3..995170975 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -45,7 +45,7 @@ data(BTC, package = "talib") output <- talib::bollinger_bands(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/break_away.Rd b/man/break_away.Rd index bb601ac2d..b85a694c1 100644 --- a/man/break_away.Rd +++ b/man/break_away.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::break_away(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index 619aa5728..b54e0d09c 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -39,7 +39,7 @@ data(BTC, package = "talib") output <- talib::chaikin_AD_line(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index b3b5d02cb..e084891d9 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -43,7 +43,7 @@ data(BTC, package = "talib") output <- talib::chaikin_AD_oscillator(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/chande_momentum_oscillator.Rd b/man/chande_momentum_oscillator.Rd index b68402fc5..fc1eb4d07 100644 --- a/man/chande_momentum_oscillator.Rd +++ b/man/chande_momentum_oscillator.Rd @@ -34,7 +34,7 @@ data(BTC, package = "talib") output <- talib::chande_momentum_oscillator(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/closing_marubozu.Rd b/man/closing_marubozu.Rd index 34fb99bd9..2cacc6b04 100644 --- a/man/closing_marubozu.Rd +++ b/man/closing_marubozu.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::closing_marubozu(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd index 86fb32ce9..0058e5bde 100644 --- a/man/commodity_channel_index.Rd +++ b/man/commodity_channel_index.Rd @@ -34,7 +34,7 @@ data(BTC, package = "talib") output <- talib::commodity_channel_index(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/concealing_baby_swallow.Rd b/man/concealing_baby_swallow.Rd index 41c46eb27..9603eb05f 100644 --- a/man/concealing_baby_swallow.Rd +++ b/man/concealing_baby_swallow.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::concealing_baby_swallow(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/counter_attack.Rd b/man/counter_attack.Rd index c6b07ea3e..62e5c4348 100644 --- a/man/counter_attack.Rd +++ b/man/counter_attack.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::counter_attack(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/dark_cloud_cover.Rd b/man/dark_cloud_cover.Rd index 56b20bfdf..6b40adee8 100644 --- a/man/dark_cloud_cover.Rd +++ b/man/dark_cloud_cover.Rd @@ -39,7 +39,7 @@ data(BTC, package = "talib") output <- talib::dark_cloud_cover(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/doji.Rd b/man/doji.Rd index c39ca39ac..b61d825c2 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::doji(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/doji_star.Rd b/man/doji_star.Rd index bddac2308..4b9e1eec5 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::doji_star(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index 02605de7d..27e9370ae 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::dragonfly_doji(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 53c224c57..da712ea67 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -39,7 +39,7 @@ data(BTC, package = "talib") output <- talib::evening_doji_star(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/extended_parabolic_sar.Rd b/man/extended_parabolic_sar.Rd index 62e50ac83..a17d54202 100644 --- a/man/extended_parabolic_sar.Rd +++ b/man/extended_parabolic_sar.Rd @@ -69,7 +69,7 @@ data(BTC, package = "talib") output <- talib::extended_parabolic_sar(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index ea24a385b..4a49e49b5 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -36,7 +36,7 @@ data(BTC, package = "talib") output <- talib::fast_stochastic(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ht_dc_phase.Rd b/man/ht_dc_phase.Rd index 45b492d6d..9c10ac328 100644 --- a/man/ht_dc_phase.Rd +++ b/man/ht_dc_phase.Rd @@ -32,7 +32,7 @@ data(BTC, package = "talib") output <- talib::ht_dc_phase(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd index 99395edfb..394e70533 100644 --- a/man/ht_dcperiod.Rd +++ b/man/ht_dcperiod.Rd @@ -32,7 +32,7 @@ data(BTC, package = "talib") output <- talib::ht_dcperiod(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd index db2c3568d..056531bd9 100644 --- a/man/ht_phasor.Rd +++ b/man/ht_phasor.Rd @@ -32,7 +32,7 @@ data(BTC, package = "talib") output <- talib::ht_phasor(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ht_sine_wave.Rd b/man/ht_sine_wave.Rd index 6f8946e6d..cd4979103 100644 --- a/man/ht_sine_wave.Rd +++ b/man/ht_sine_wave.Rd @@ -32,7 +32,7 @@ data(BTC, package = "talib") output <- talib::ht_sine_wave(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index f763c8e56..ffdebb575 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -33,7 +33,7 @@ data(BTC, package = "talib") output <- talib::ht_trendline(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index 2b44c8760..8a7a2ed4a 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -33,7 +33,7 @@ data(BTC, package = "talib") output <- talib::ht_trendmode(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/money_flow_index.Rd b/man/money_flow_index.Rd index c8a045f7f..b6355382d 100644 --- a/man/money_flow_index.Rd +++ b/man/money_flow_index.Rd @@ -34,7 +34,7 @@ data(BTC, package = "talib") output <- talib::money_flow_index(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index 1def2a81e..d6f4442df 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -54,7 +54,7 @@ data(BTC, package = "talib") output <- talib::moving_average_convergence_divergence(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/on_balance_volume.Rd b/man/on_balance_volume.Rd index 7c8fff17b..47ea423b5 100644 --- a/man/on_balance_volume.Rd +++ b/man/on_balance_volume.Rd @@ -34,7 +34,7 @@ data(BTC, package = "talib") output <- talib::on_balance_volume(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/parabolic_sar.Rd b/man/parabolic_sar.Rd index a90f5f30e..49bb96410 100644 --- a/man/parabolic_sar.Rd +++ b/man/parabolic_sar.Rd @@ -45,7 +45,7 @@ data(BTC, package = "talib") output <- talib::parabolic_sar(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index bbc779ff9..0c7f41785 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -34,7 +34,7 @@ data(BTC, package = "talib") output <- talib::relative_strength_index(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/stochastic.Rd b/man/stochastic.Rd index 3e81a77e9..3534b13bf 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -38,7 +38,7 @@ data(BTC, package = "talib") output <- talib::stochastic(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index 48b159ca8..1c13da5f2 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -21,7 +21,7 @@ stochastic_relative_strength_index( \item{n}{An \link{integer} of \link{length} 1.} -\item{n_rsi}{Time period for \link{RSI}} +\item{n_rsi}{Time period for \link{relative_strength_index}} \item{fast_k}{Time period for building the Fast-K line.} @@ -48,7 +48,7 @@ data(BTC, package = "talib") output <- talib::stochastic_relative_strength_index(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index 0aa353a43..26b9f7d99 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::three_black_crows(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/three_inside.Rd b/man/three_inside.Rd index ce22f2856..0573f3e63 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::three_inside(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd index d8fcfc645..1ade8b4ab 100644 --- a/man/three_line_strike.Rd +++ b/man/three_line_strike.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::three_line_strike(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/three_outside.Rd b/man/three_outside.Rd index d57c56163..011dc3661 100644 --- a/man/three_outside.Rd +++ b/man/three_outside.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::three_outside(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd index 56087a441..ac3e4c662 100644 --- a/man/three_stars_in_the_south.Rd +++ b/man/three_stars_in_the_south.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::three_stars_in_the_south(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd index 7be19b794..1d9a8de96 100644 --- a/man/three_white_soldiers.Rd +++ b/man/three_white_soldiers.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::three_white_soldiers(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/two_crows.Rd b/man/two_crows.Rd index 310b6ac08..7752a15c5 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -37,7 +37,7 @@ data(BTC, package = "talib") output <- talib::two_crows(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks diff --git a/man/ultimate_oscillator.Rd b/man/ultimate_oscillator.Rd index ffd2688de..625b81865 100644 --- a/man/ultimate_oscillator.Rd +++ b/man/ultimate_oscillator.Rd @@ -39,7 +39,7 @@ data(BTC, package = "talib") output <- talib::ultimate_oscillator(BTC) ## display the results -tail(output) +utils::tail(output) ## visualize the indicator ## with candlesticks From aac7da2fd8774e474ea0a94ef11376c712d24130 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 14:34:35 +0200 Subject: [PATCH 153/166] :hammer: Added new patterns * 6 new patterns added. --- NAMESPACE | 35 +++++++ R/ta_CDLENGULFING.R | 160 ++++++++++++++++++++++++++++++++ R/ta_CDLGAPSIDESIDEWHITE.R | 160 ++++++++++++++++++++++++++++++++ R/ta_CDLGRAVESTONEDOJI.R | 160 ++++++++++++++++++++++++++++++++ R/ta_CDLHAMMER.R | 160 ++++++++++++++++++++++++++++++++ R/ta_CDLHANGINGMAN.R | 160 ++++++++++++++++++++++++++++++++ R/ta_CDLHARAMI.R | 160 ++++++++++++++++++++++++++++++++ man/abandoned_baby.Rd | 6 ++ man/advance_block.Rd | 6 ++ man/belt_hold.Rd | 6 ++ man/break_away.Rd | 6 ++ man/closing_marubozu.Rd | 6 ++ man/concealing_baby_swallow.Rd | 6 ++ man/counter_attack.Rd | 6 ++ man/dark_cloud_cover.Rd | 6 ++ man/doji.Rd | 6 ++ man/doji_star.Rd | 6 ++ man/dragonfly_doji.Rd | 6 ++ man/engulfing.Rd | 93 +++++++++++++++++++ man/evening_doji_star.Rd | 6 ++ man/gaps_side_white.Rd | 93 +++++++++++++++++++ man/gravestone_doji.Rd | 93 +++++++++++++++++++ man/hammer.Rd | 93 +++++++++++++++++++ man/hanging_man.Rd | 93 +++++++++++++++++++ man/harami.Rd | 93 +++++++++++++++++++ man/three_black_crows.Rd | 6 ++ man/three_inside.Rd | 6 ++ man/three_line_strike.Rd | 6 ++ man/three_outside.Rd | 6 ++ man/three_stars_in_the_south.Rd | 6 ++ man/three_white_soldiers.Rd | 6 ++ man/two_crows.Rd | 6 ++ src/api.h | 6 ++ src/init.c | 6 ++ src/ta_CDLENGULFING.c | 52 +++++++++++ src/ta_CDLGAPSIDEIDEWHITE.c | 52 +++++++++++ src/ta_CDLGRAVESTONEDOJI.c | 52 +++++++++++ src/ta_CDLHAMMER.c | 51 ++++++++++ src/ta_CDLHANGINGMAN.c | 51 ++++++++++ src/ta_CDLHARAMI.c | 51 ++++++++++ 40 files changed, 1988 insertions(+) create mode 100644 R/ta_CDLENGULFING.R create mode 100644 R/ta_CDLGAPSIDESIDEWHITE.R create mode 100644 R/ta_CDLGRAVESTONEDOJI.R create mode 100644 R/ta_CDLHAMMER.R create mode 100644 R/ta_CDLHANGINGMAN.R create mode 100644 R/ta_CDLHARAMI.R create mode 100644 man/engulfing.Rd create mode 100644 man/gaps_side_white.Rd create mode 100644 man/gravestone_doji.Rd create mode 100644 man/hammer.Rd create mode 100644 man/hanging_man.Rd create mode 100644 man/harami.Rd create mode 100644 src/ta_CDLENGULFING.c create mode 100644 src/ta_CDLGAPSIDEIDEWHITE.c create mode 100644 src/ta_CDLGRAVESTONEDOJI.c create mode 100644 src/ta_CDLHAMMER.c create mode 100644 src/ta_CDLHANGINGMAN.c create mode 100644 src/ta_CDLHARAMI.c diff --git a/NAMESPACE b/NAMESPACE index f9013756f..ec33a483a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -124,6 +124,10 @@ S3method(dragonfly_doji,data.frame) S3method(dragonfly_doji,default) S3method(dragonfly_doji,matrix) S3method(dragonfly_doji,plotly) +S3method(engulfing,data.frame) +S3method(engulfing,default) +S3method(engulfing,matrix) +S3method(engulfing,plotly) S3method(evening_doji_star,data.frame) S3method(evening_doji_star,default) S3method(evening_doji_star,matrix) @@ -136,6 +140,26 @@ S3method(fast_stochastic,data.frame) S3method(fast_stochastic,default) S3method(fast_stochastic,matrix) S3method(fast_stochastic,plotly) +S3method(gaps_side_white,data.frame) +S3method(gaps_side_white,default) +S3method(gaps_side_white,matrix) +S3method(gaps_side_white,plotly) +S3method(gravestone_doji,data.frame) +S3method(gravestone_doji,default) +S3method(gravestone_doji,matrix) +S3method(gravestone_doji,plotly) +S3method(hammer,data.frame) +S3method(hammer,default) +S3method(hammer,matrix) +S3method(hammer,plotly) +S3method(hanging_man,data.frame) +S3method(hanging_man,default) +S3method(hanging_man,matrix) +S3method(hanging_man,plotly) +S3method(harami,data.frame) +S3method(harami,default) +S3method(harami,matrix) +S3method(harami,plotly) S3method(ht_dc_phase,data.frame) S3method(ht_dc_phase,default) S3method(ht_dc_phase,matrix) @@ -253,7 +277,12 @@ export(CDLDARKCLOUDCOVER) export(CDLDOJI) export(CDLDOJISTAR) export(CDLDRAGONFLYDOJI) +export(CDLENGULFING) export(CDLEVENINGDOJISTAR) +export(CDLGAPSIDESIDEWHITE) +export(CDLGRAVESTONEDOJI) +export(CDLHAMMER) +export(CDLHANGINGMAN) export(CMO) export(DEMA) export(EMA) @@ -304,10 +333,16 @@ export(doji) export(doji_star) export(double_exponential_moving_average) export(dragonfly_doji) +export(engulfing) export(evening_doji_star) export(exponential_moving_average) export(extended_parabolic_sar) export(fast_stochastic) +export(gaps_side_white) +export(gravestone_doji) +export(hammer) +export(hanging_man) +export(harami) export(ht_dc_phase) export(ht_dcperiod) export(ht_phasor) diff --git a/R/ta_CDLENGULFING.R b/R/ta_CDLENGULFING.R new file mode 100644 index 000000000..e882a8299 --- /dev/null +++ b/R/ta_CDLENGULFING.R @@ -0,0 +1,160 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Engulfing +#' +#' @templateVar .title Engulfing +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun engulfing +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{engulfing}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +engulfing <- function( + x, + cols, + ... +) { + UseMethod( + "engulfing" + ) +} + +#' @usage NULL +#' @aliases engulfing +#' @export +CDLENGULFING <- engulfing + +#' @usage NULL +#' @aliases engulfing +#' @export +engulfing.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLENGULFING", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "engulfing" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases engulfing +#' @export +engulfing.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases engulfing +#' @export +engulfing.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases engulfing +#' @export +engulfing.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- engulfing.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Two Crows" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLGAPSIDESIDEWHITE.R b/R/ta_CDLGAPSIDESIDEWHITE.R new file mode 100644 index 000000000..8ad61164d --- /dev/null +++ b/R/ta_CDLGAPSIDESIDEWHITE.R @@ -0,0 +1,160 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Up/Down-gap side-by-side white lines +#' +#' @templateVar .title Up/Down-gap side-by-side white lines +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun gaps_side_white +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{gaps_side_white}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +gaps_side_white <- function( + x, + cols, + ... +) { + UseMethod( + "gaps_side_white" + ) +} + +#' @usage NULL +#' @aliases gaps_side_white +#' @export +CDL2CROWS <- gaps_side_white + +#' @usage NULL +#' @aliases gaps_side_white +#' @export +gaps_side_white.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDL2CROWS", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "gaps_side_white" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases gaps_side_white +#' @export +gaps_side_white.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases gaps_side_white +#' @export +gaps_side_white.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases gaps_side_white +#' @export +gaps_side_white.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- gaps_side_white.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Gaps-side White" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLGRAVESTONEDOJI.R b/R/ta_CDLGRAVESTONEDOJI.R new file mode 100644 index 000000000..11b878264 --- /dev/null +++ b/R/ta_CDLGRAVESTONEDOJI.R @@ -0,0 +1,160 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Gravestone Doji +#' +#' @templateVar .title Gravestone Doji +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun gravestone_doji +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{gravestone_doji}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +gravestone_doji <- function( + x, + cols, + ... +) { + UseMethod( + "gravestone_doji" + ) +} + +#' @usage NULL +#' @aliases gravestone_doji +#' @export +CDLGRAVESTONEDOJI <- gravestone_doji + +#' @usage NULL +#' @aliases gravestone_doji +#' @export +gravestone_doji.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLGRAVESTONEDOJI", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "gravestone_doji" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases gravestone_doji +#' @export +gravestone_doji.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases gravestone_doji +#' @export +gravestone_doji.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases gravestone_doji +#' @export +gravestone_doji.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- gravestone_doji.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Gravestone Doji" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLHAMMER.R b/R/ta_CDLHAMMER.R new file mode 100644 index 000000000..d0768c49c --- /dev/null +++ b/R/ta_CDLHAMMER.R @@ -0,0 +1,160 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Hammer +#' +#' @templateVar .title Hammer +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun hammer +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{hammer}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +hammer <- function( + x, + cols, + ... +) { + UseMethod( + "hammer" + ) +} + +#' @usage NULL +#' @aliases hammer +#' @export +CDLHAMMER <- hammer + +#' @usage NULL +#' @aliases hammer +#' @export +hammer.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLHAMMER", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "hammer" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases hammer +#' @export +hammer.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases hammer +#' @export +hammer.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases hammer +#' @export +hammer.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- hammer.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Hammer" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLHANGINGMAN.R b/R/ta_CDLHANGINGMAN.R new file mode 100644 index 000000000..8e2f26359 --- /dev/null +++ b/R/ta_CDLHANGINGMAN.R @@ -0,0 +1,160 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Hanging Man +#' +#' @templateVar .title Hanging Man +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun hanging_man +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{hanging_man}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +hanging_man <- function( + x, + cols, + ... +) { + UseMethod( + "hanging_man" + ) +} + +#' @usage NULL +#' @aliases hanging_man +#' @export +CDLHANGINGMAN <- hanging_man + +#' @usage NULL +#' @aliases hanging_man +#' @export +hanging_man.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLHANGINGMAN", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "hanging_man" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases hanging_man +#' @export +hanging_man.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases hanging_man +#' @export +hanging_man.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases hanging_man +#' @export +hanging_man.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- hanging_man.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Hanging Man" + ) + + .plotting_environment$main +} diff --git a/R/ta_CDLHARAMI.R b/R/ta_CDLHARAMI.R new file mode 100644 index 000000000..6bdbd46e4 --- /dev/null +++ b/R/ta_CDLHARAMI.R @@ -0,0 +1,160 @@ +#' @export +#' @family Pattern Recognition +#' +#' @title Harami +#' +#' @templateVar .title Harami +#' @templateVar .author Serkan Korkmaz +#' @templateVar .fun harami +#' +#' @template description +#' +#' @returns +#' \describe{ +#' \item{harami}{1 for bullish, -1 for bearish and 0 for no pattern} +#' } +harami <- function( + x, + cols, + ... +) { + UseMethod( + "harami" + ) +} + +#' @usage NULL +#' @aliases harami +#' @export +CDLGAPSIDESIDEWHITE <- harami + +#' @usage NULL +#' @aliases harami +#' @export +harami.default <- function( + x, + cols, + ... +) { + ## validate input + ## asssuming everyting + ## is numerical values + if (!missing(cols)) { + ## check if formula + assert( + is.formula(cols), + paste0( + "'cols' has to be <", + class(~s), + ">. ", + "Got <", + class(cols), + ">." + ) + ) + + ## check if formula has the expected + ## length + assert( + length(all.vars(cols)) == 4, + paste0( + "'cols' has to be length 4. ", + "Got length ", + length(all.vars(cols)) + ) + ) + } + + ## construct OHLC-series + ## from 'x' + OHLC <- series( + x = cols, + default = ~ open + high + low + close, + data = x, + ... + ) + + ## construct data.frame + ## from source + x <- as.data.frame( + .Call( + "impl_ta_CDLHARAMI", + x[[1]], + x[[2]], + x[[3]], + x[[4]], + as.logical( + getOption("talib.normalize", TRUE) + ) + ) + ) + + ## set column names + colnames(x) <- "harami" + + ## return value + return(x) +} + +#' @usage NULL +#' @aliases harami +#' @export +harami.data.frame <- function( + x, + cols, + ... +) { + as.data.frame( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases harami +#' @export +harami.matrix <- function( + x, + cols, + ... +) { + as.matrix( + NextMethod() + ) +} + +#' @usage NULL +#' @aliases harami +#' @export +harami.plotly <- function( + x, + cols, + ... +) { + ## prepare OHLC series + OHLC <- series( + x = x, + formula = cols, + default = ~ open + high + low + close, + ... + ) + + ## calculate pattern + ## indicators + .indicator <- harami.default( + x = OHLC, + cols = ~ open + high + low + close + ) + + .indicator$idx <- 1:nrow(.indicator) + + ## chart patterns + .plotting_environment$main <- pattern( + p = .plotting_environment$main, + x = .indicator, + high = OHLC[[2]], + low = OHLC[[3]], + pattern_name = "Harami" + ) + + .plotting_environment$main +} diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index 7a559362c..4196f0d20 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -70,7 +70,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/advance_block.Rd b/man/advance_block.Rd index 290927720..2600b930e 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/belt_hold.Rd b/man/belt_hold.Rd index efd1e3560..e82c21d57 100644 --- a/man/belt_hold.Rd +++ b/man/belt_hold.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/break_away.Rd b/man/break_away.Rd index b85a694c1..d2f42e30e 100644 --- a/man/break_away.Rd +++ b/man/break_away.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/closing_marubozu.Rd b/man/closing_marubozu.Rd index 2cacc6b04..4a90d33c9 100644 --- a/man/closing_marubozu.Rd +++ b/man/closing_marubozu.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/concealing_baby_swallow.Rd b/man/concealing_baby_swallow.Rd index 9603eb05f..eea1ce2e4 100644 --- a/man/concealing_baby_swallow.Rd +++ b/man/concealing_baby_swallow.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/counter_attack.Rd b/man/counter_attack.Rd index 62e5c4348..cb9ddb18c 100644 --- a/man/counter_attack.Rd +++ b/man/counter_attack.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/dark_cloud_cover.Rd b/man/dark_cloud_cover.Rd index 6b40adee8..ad9c82c66 100644 --- a/man/dark_cloud_cover.Rd +++ b/man/dark_cloud_cover.Rd @@ -70,7 +70,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/doji.Rd b/man/doji.Rd index b61d825c2..9813a4c27 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{dark_cloud_cover}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/doji_star.Rd b/man/doji_star.Rd index 4b9e1eec5..c595d4722 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index 27e9370ae..4d340a382 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -68,7 +68,13 @@ Other Pattern Recognition: \code{\link{dark_cloud_cover}()}, \code{\link{doji}()}, \code{\link{doji_star}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/engulfing.Rd b/man/engulfing.Rd new file mode 100644 index 000000000..4d854d15f --- /dev/null +++ b/man/engulfing.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLENGULFING.R +\name{engulfing} +\alias{engulfing} +\title{Engulfing} +\usage{ +engulfing(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{engulfing}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{engulfing()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::engulfing(BTC) + +## display the results +utils::tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::engulfing + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index da712ea67..0031c127b 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -71,6 +71,12 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/gaps_side_white.Rd b/man/gaps_side_white.Rd new file mode 100644 index 000000000..9ca2b5b08 --- /dev/null +++ b/man/gaps_side_white.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLGAPSIDESIDEWHITE.R +\name{gaps_side_white} +\alias{gaps_side_white} +\title{Up/Down-gap side-by-side white lines} +\usage{ +gaps_side_white(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{gaps_side_white}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{gaps_side_white()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::gaps_side_white(BTC) + +## display the results +utils::tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::gaps_side_white + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, +\code{\link{evening_doji_star}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/gravestone_doji.Rd b/man/gravestone_doji.Rd new file mode 100644 index 000000000..70750adeb --- /dev/null +++ b/man/gravestone_doji.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLGRAVESTONEDOJI.R +\name{gravestone_doji} +\alias{gravestone_doji} +\title{Gravestone Doji} +\usage{ +gravestone_doji(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{gravestone_doji}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{gravestone_doji()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::gravestone_doji(BTC) + +## display the results +utils::tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::gravestone_doji + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, +\code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/hammer.Rd b/man/hammer.Rd new file mode 100644 index 000000000..d2fe0c8ee --- /dev/null +++ b/man/hammer.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLHAMMER.R +\name{hammer} +\alias{hammer} +\title{Hammer} +\usage{ +hammer(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{hammer}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{hammer()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::hammer(BTC) + +## display the results +utils::tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::hammer + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, +\code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/hanging_man.Rd b/man/hanging_man.Rd new file mode 100644 index 000000000..5bac69b27 --- /dev/null +++ b/man/hanging_man.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLHANGINGMAN.R +\name{hanging_man} +\alias{hanging_man} +\title{Hanging Man} +\usage{ +hanging_man(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{hanging_man}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{hanging_man()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::hanging_man(BTC) + +## display the results +utils::tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::hanging_man + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, +\code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{harami}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/harami.Rd b/man/harami.Rd new file mode 100644 index 000000000..64258d8dc --- /dev/null +++ b/man/harami.Rd @@ -0,0 +1,93 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ta_CDLHARAMI.R +\name{harami} +\alias{harami} +\title{Harami} +\usage{ +harami(x, cols, ...) +} +\arguments{ +\item{x}{An OHLC-V series that is coercible to \link{data.frame}. The function assumes that all columns are named in lowercase and order invariant.} + +\item{cols}{An optional \link{formula} passed into \link{model.frame}. If passed into indicators based on univariate series, the function calculates indicators for each element in 'cols'. For indicators based on multivariate series, it will alter the calculation itself. See \code{vignette("talib")} for more details.} + +\item{...}{Additional parameters passed into \link{model.frame}} +} +\value{ +\describe{ +\item{harami}{1 for bullish, -1 for bearish and 0 for no pattern} +} +} +\description{ +The \code{harami()} is a generic S3 function that builds upon 'type-safe'-esque workflows limited to classes in in base \code{R}, and the package-wide +dependencies. Ie. \link{class} in, \link{class} out. Each method is a soft wrapper of \link{model.frame} and therefore the OHLC-V series must be coercible to a \link{data.frame}. +This rule does not transfer to indicators that uses univariate series, unless passed as a 1-column \link{data.frame} or \link{matrix}. In such cases, if univariate series +is passed as a \link{vector} the function calculates the indicator 'as is', and returns a \link{data.frame} if the indicator itself is also a univariate series. + +The indicator, by default, follows its mathematical definition. However, the \code{cols} argument allows for simple rearrangement of the definition by passing relevant +columns in a custom order. Refer to the details-section for more on the calculation of the indicators. +} +\examples{ +## load Bitcoin (BTC) +## series +data(BTC, package = "talib") + +## calculate the indicator +## for Bitcoin (BTC) +output <- talib::harami(BTC) + +## display the results +utils::tail(output) + +## visualize the indicator +## with candlesticks +## +## see ?talib::chart or ?talib::indicator +## for more details +{ + ## chart OHLC-V + ## series with candlesticks + talib::chart(BTC) + + ## chart indicator + ## with default values + talib::indicator( + talib::harami + ) +} +} +\seealso{ +Other Pattern Recognition: +\code{\link{abandoned_baby}()}, +\code{\link{advance_block}()}, +\code{\link{belt_hold}()}, +\code{\link{break_away}()}, +\code{\link{closing_marubozu}()}, +\code{\link{concealing_baby_swallow}()}, +\code{\link{counter_attack}()}, +\code{\link{dark_cloud_cover}()}, +\code{\link{doji}()}, +\code{\link{doji_star}()}, +\code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, +\code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{three_black_crows}()}, +\code{\link{three_inside}()}, +\code{\link{three_line_strike}()}, +\code{\link{three_outside}()}, +\code{\link{three_stars_in_the_south}()}, +\code{\link{three_white_soldiers}()}, +\code{\link{two_crows}()} +} +\author{ +Serkan Korkmaz +} +\concept{Pattern Recognition} +\concept{algorithmic trading} +\concept{finance} +\concept{technical analysis} +\concept{trading} diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index 26b9f7d99..75b4abc16 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, \code{\link{three_outside}()}, diff --git a/man/three_inside.Rd b/man/three_inside.Rd index 0573f3e63..23c408ef5 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_line_strike}()}, \code{\link{three_outside}()}, diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd index 1ade8b4ab..59ed16acd 100644 --- a/man/three_line_strike.Rd +++ b/man/three_line_strike.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_outside}()}, diff --git a/man/three_outside.Rd b/man/three_outside.Rd index 011dc3661..1d70f49a4 100644 --- a/man/three_outside.Rd +++ b/man/three_outside.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd index ac3e4c662..c0e035a60 100644 --- a/man/three_stars_in_the_south.Rd +++ b/man/three_stars_in_the_south.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd index 1d9a8de96..f6d6fe8da 100644 --- a/man/three_white_soldiers.Rd +++ b/man/three_white_soldiers.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/man/two_crows.Rd b/man/two_crows.Rd index 7752a15c5..decca993f 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -69,7 +69,13 @@ Other Pattern Recognition: \code{\link{doji}()}, \code{\link{doji_star}()}, \code{\link{dragonfly_doji}()}, +\code{\link{engulfing}()}, \code{\link{evening_doji_star}()}, +\code{\link{gaps_side_white}()}, +\code{\link{gravestone_doji}()}, +\code{\link{hammer}()}, +\code{\link{hanging_man}()}, +\code{\link{harami}()}, \code{\link{three_black_crows}()}, \code{\link{three_inside}()}, \code{\link{three_line_strike}()}, diff --git a/src/api.h b/src/api.h index b80837384..2957fbe14 100644 --- a/src/api.h +++ b/src/api.h @@ -33,7 +33,13 @@ SEXP impl_ta_CDLDARKCLOUDCOVER(SEXP open, SEXP high, SEXP low, SEXP close, SEXP SEXP impl_ta_CDLDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLDRAGONFLYDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLENGULFING(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CDLEVENINGDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP penetration, SEXP normalize_flag); +SEXP impl_ta_CDLGAPSIDESIDEWHITE(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLGRAVESTONEDOJI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLHAMMER(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLHANGINGMAN(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); +SEXP impl_ta_CDLHARAMI(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag); SEXP impl_ta_CMO(SEXP x, SEXP optTimePeriod); SEXP impl_ta_HT_DCPERIOD(SEXP inReal); SEXP impl_ta_HT_DCPHASE(SEXP inReal); diff --git a/src/init.c b/src/init.c index dde94ff18..f3a7eb95d 100644 --- a/src/init.c +++ b/src/init.c @@ -38,7 +38,13 @@ static const R_CallMethodDef CallEntries[] = { CALLDEF(impl_ta_CDLDOJI, 5), CALLDEF(impl_ta_CDLDOJISTAR, 5), CALLDEF(impl_ta_CDLDRAGONFLYDOJI, 5), + CALLDEF(impl_ta_CDLENGULFING, 5), CALLDEF(impl_ta_CDLEVENINGDOJISTAR, 6), + CALLDEF(impl_ta_CDLGAPSIDESIDEWHITE, 5), + CALLDEF(impl_ta_CDLGRAVESTONEDOJI, 5), + CALLDEF(impl_ta_CDLHAMMER, 5), + CALLDEF(impl_ta_CDLHANGINGMAN, 5), + CALLDEF(impl_ta_CDLHARAMI, 5), CALLDEF(impl_ta_CMO, 2), CALLDEF(impl_ta_HT_DCPERIOD, 1), CALLDEF(impl_ta_HT_DCPHASE, 1), diff --git a/src/ta_CDLENGULFING.c b/src/ta_CDLENGULFING.c new file mode 100644 index 000000000..d8319901e --- /dev/null +++ b/src/ta_CDLENGULFING.c @@ -0,0 +1,52 @@ +// Interface to TA_CDLENGULFING (Engulfing pattern) +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CDLENGULFING(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLENGULFING_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLENGULFING(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLENGULFING failed: return code %d", return_code); + } + shift_array(out_ptr, n, outBeg); + + const bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) + normalize(out_ptr, n, 100, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLGAPSIDEIDEWHITE.c b/src/ta_CDLGAPSIDEIDEWHITE.c new file mode 100644 index 000000000..73f7319be --- /dev/null +++ b/src/ta_CDLGAPSIDEIDEWHITE.c @@ -0,0 +1,52 @@ +// Interface to TA_CDLGAPSIDESIDEWHITE (Up/Down-gap side-by-side white lines) +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CDLGAPSIDESIDEWHITE(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLGAPSIDESIDEWHITE_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLGAPSIDESIDEWHITE(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLGAPSIDESIDEWHITE failed: return code %d", return_code); + } + shift_array(out_ptr, n, outBeg); + + const bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) + normalize(out_ptr, n, 100, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLGRAVESTONEDOJI.c b/src/ta_CDLGRAVESTONEDOJI.c new file mode 100644 index 000000000..a82f861f2 --- /dev/null +++ b/src/ta_CDLGRAVESTONEDOJI.c @@ -0,0 +1,52 @@ +// Interface to TA_CDLGRAVESTONEDOJI (Gravestone Doji) +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CDLGRAVESTONEDOJI(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLGRAVESTONEDOJI_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = + TA_CDLGRAVESTONEDOJI(0, n - 1, open_ptr, high_ptr, low_ptr, close_ptr, + &outBeg, &outNb, out_ptr); + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLGRAVESTONEDOJI failed: return code %d", return_code); + } + shift_array(out_ptr, n, outBeg); + + const bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) + normalize(out_ptr, n, 100, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLHAMMER.c b/src/ta_CDLHAMMER.c new file mode 100644 index 000000000..569ab5f81 --- /dev/null +++ b/src/ta_CDLHAMMER.c @@ -0,0 +1,51 @@ +// Interface to TA_CDLHAMMER (Hammer) +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CDLHAMMER(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLHAMMER_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = TA_CDLHAMMER(0, n - 1, open_ptr, high_ptr, low_ptr, + close_ptr, &outBeg, &outNb, out_ptr); + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLHAMMER failed: return code %d", return_code); + } + shift_array(out_ptr, n, outBeg); + + const bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) + normalize(out_ptr, n, 100, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLHANGINGMAN.c b/src/ta_CDLHANGINGMAN.c new file mode 100644 index 000000000..fd183825b --- /dev/null +++ b/src/ta_CDLHANGINGMAN.c @@ -0,0 +1,51 @@ +// Interface to TA_CDLHANGINGMAN (Hanging Man) +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CDLHANGINGMAN(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLHANGINGMAN_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + } else { + int outBeg = 0, outNb = 0; + TA_RetCode rc = TA_CDLHANGINGMAN(0, n - 1, open_ptr, high_ptr, low_ptr, + close_ptr, &outBeg, &outNb, out_ptr); + if (rc != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLHANGINGMAN failed: return code %d", rc); + } + shift_array(out_ptr, n, outBeg); + + const bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) + normalize(out_ptr, n, 100, outBeg); + } + + UNPROTECT(protect_count); + return result; +} diff --git a/src/ta_CDLHARAMI.c b/src/ta_CDLHARAMI.c new file mode 100644 index 000000000..0e45729be --- /dev/null +++ b/src/ta_CDLHARAMI.c @@ -0,0 +1,51 @@ +// Interface to TA_CDLHARAMI (Harami pattern) +#include "R_ext/Arith.h" +#include "Rdefines.h" +#include "Rinternals.h" +#include "lib.h" +#include "normalize.h" +#include "shift.h" +#include "ta_func.h" +#include +#include +#include + +SEXP impl_ta_CDLHARAMI(SEXP open, SEXP high, SEXP low, SEXP close, + SEXP normalize_flag) { + int protect_count = 0; + + const double *restrict open_ptr = REAL(open); + const double *restrict high_ptr = REAL(high); + const double *restrict low_ptr = REAL(low); + const double *restrict close_ptr = REAL(close); + const int n = LENGTH(open); + + SEXP result = PROTECT(allocVector(INTSXP, n)); + protect_count++; + int *restrict out_ptr = INTEGER(result); + + const int minimum_lookback = TA_CDLHARAMI_Lookback(); + + if (n < minimum_lookback) { + Rf_warning("Input length (%d) is smaller than required lookback (%d).", n, + minimum_lookback); + for (size_t i = 0; i < (size_t)n; ++i) + out_ptr[i] = NA_INTEGER; + } else { + int outBeg = 0, outNb = 0; + TA_RetCode return_code = TA_CDLHARAMI(0, n - 1, open_ptr, high_ptr, low_ptr, + close_ptr, &outBeg, &outNb, out_ptr); + if (return_code != TA_SUCCESS) { + UNPROTECT(protect_count); + Rf_error("TA_CDLHARAMI failed: return code %d", return_code); + } + shift_array(out_ptr, n, outBeg); + + const bool do_normalize = LOGICAL_VALUE(normalize_flag); + if (do_normalize) + normalize(out_ptr, n, 100, outBeg); + } + + UNPROTECT(protect_count); + return result; +} From 0027e6b2c95027bf9fe8c59fe41d07e3e849f050 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:15:40 +0200 Subject: [PATCH 154/166] :hammer: Unit-tests * Testing all candlesticks --- tests/testthat/test-ta_CDLPATTERN.R | 168 ++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 tests/testthat/test-ta_CDLPATTERN.R diff --git a/tests/testthat/test-ta_CDLPATTERN.R b/tests/testthat/test-ta_CDLPATTERN.R new file mode 100644 index 000000000..0b68f055b --- /dev/null +++ b/tests/testthat/test-ta_CDLPATTERN.R @@ -0,0 +1,168 @@ +## script: CDLPATTERN +## objective: +## +## Test all candlestick patterns +## and their aliases +## +## 1) list all candlestick +## functions and their +## aliases +candlestick_patterns <- list( + CDL2CROWS = list( + CDL2CROWS, + two_crows + ), + CDL3BLACKCROWS = list( + CDL3BLACKCROWS, + three_black_crows + ), + CDL3INSIDE = list( + CDL3INSIDE, + three_inside + ), + CDL3LINESTRIKE = list( + CDL3LINESTRIKE, + three_line_strike + ), + CDL3OUTSIDE = list( + CDL3OUTSIDE, + three_outside + ), + CDL3STARSINSOUTH = list( + CDL3STARSINSOUTH, + three_stars_in_the_south + ), + CDLABANDONEDBABY = list( + CDLABANDONEDBABY, + abandoned_baby + ), + CDLADVANCEBLOCK = list( + CDLADVANCEBLOCK, + advance_block + ), + CDLBABYSWALL = list( + CDLBABYSWALL, + concealing_baby_swallow + ), + CDLBELTHOLD = list( + CDLBELTHOLD, + belt_hold + ), + CDLBREAKAWAY = list( + CDLBREAKAWAY, + break_away + ), + CDLCOUNTERATTACK = list( + CDLCOUNTERATTACK, + counter_attack + ), + CDLDARKCLOUDCOVER = list( + CDLDARKCLOUDCOVER, + dark_cloud_cover + ), + CDLDOJI = list( + CDLDOJI, + doji + ), + CDLDOJISTAR = list( + CDLDOJISTAR, + doji_star + ), + CDLDRAGONFLYDOJI = list( + CDLDRAGONFLYDOJI, + dragonfly_doji + ), + CDLENGULFING = list( + CDLENGULFING, + engulfing + ), + CDLEVENINGDOJISTAR = list( + CDLEVENINGDOJISTAR, + evening_doji_star + ), + CDLGAPSIDESIDEWHITE = list( + CDLGAPSIDESIDEWHITE, + gaps_side_white + ), + CDLGRAVESTONEDOJI = list( + CDLGRAVESTONEDOJI, + gravestone_doji + ), + CDLHAMMER = list( + CDLHAMMER, + hammer + ), + CDLHANGINGMAN = list( + CDLHANGINGMAN, + hanging_man + ) +) + +## conduct the tests +testthat::test_that(desc = "Candlestick Patterns", code = { + ## test all functions + for (test_pattern in names(candlestick_patterns)) { + ## 1) calculate values + ## with and without alias + output <- candlestick_patterns[[test_pattern]][[2]](SPY) + alias <- candlestick_patterns[[test_pattern]][[1]](SPY) + + ## 1.1) check if the values + ## are equal + testthat::expect_equal( + object = output, + expected = alias, + label = test_pattern + ) + + ## 2) test that charting + ## works + output <- testthat::expect_no_error( + { + chart(BTC) + indicator(candlestick_patterns[[test_pattern]][[2]]) + } + ) + + ## 2.1) test that it outputs + ## a plotly object + testthat::expect_true( + inherits(output, "plotly"), + label = test_pattern + ) + + ## 3) test class-in and class-out + ## equality + + ## 3.1) matrix + testthat::expect_true( + inherits( + candlestick_patterns[[test_pattern]][[2]](SPY), + class(SPY) + ), + label = test_pattern + ) + + ## 3.2) data.frame + testthat::expect_true( + inherits( + candlestick_patterns[[test_pattern]][[2]](BTC), + class(BTC) + ), + label = test_pattern + ) + + ## 4) test that default + ## values equals + testthat::expect_equal( + object = candlestick_patterns[[test_pattern]][[2]]( + BTC + ), + expected = candlestick_patterns[[test_pattern]][[2]]( + BTC, + cols = ~ open + high + low + close + ), + label = test_pattern + ) + } +}) From b8e590e88cecd9d7ef392de6e88db9ab54e8baef Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:16:20 +0200 Subject: [PATCH 155/166] :hammer: Bug-fix * All candlesticks were using input 'x' instead of derived series. - So much for copy-pasting. --- NAMESPACE | 2 ++ R/ta_CDL2CROWS.R | 8 ++++---- R/ta_CDL3BLACKCROWS.R | 8 ++++---- R/ta_CDL3INSIDE.R | 8 ++++---- R/ta_CDL3LINESTRIKE.R | 8 ++++---- R/ta_CDL3OUTSIDE.R | 8 ++++---- R/ta_CDL3STARSINSOUTH.R | 8 ++++---- R/ta_CDL3WHITESOLDIERS.R | 10 +++++----- R/ta_CDLABANDONEDBABY.R | 8 ++++---- R/ta_CDLADVANCEBLOCK.R | 8 ++++---- R/ta_CDLBELTHOLD.R | 8 ++++---- R/ta_CDLBREAKAWAY.R | 8 ++++---- R/ta_CDLCLOSINGMARUBOZU.R | 8 ++++---- R/ta_CDLCONCEALBABYSWALL.R | 8 ++++---- R/ta_CDLCOUNTERATTACK.R | 8 ++++---- R/ta_CDLDARKCLOUDCOVER.R | 8 ++++---- R/ta_CDLDOJI.R | 8 ++++---- R/ta_CDLDOJISTAR.R | 8 ++++---- R/ta_CDLDRAGONFLYDOJI.R | 8 ++++---- R/ta_CDLENGULFING.R | 8 ++++---- R/ta_CDLEVENINGDOJISTAR.R | 8 ++++---- R/ta_CDLGAPSIDESIDEWHITE.R | 4 ++-- R/ta_CDLGRAVESTONEDOJI.R | 8 ++++---- R/ta_CDLHAMMER.R | 8 ++++---- R/ta_CDLHANGINGMAN.R | 8 ++++---- R/ta_CDLHARAMI.R | 10 +++++----- 26 files changed, 102 insertions(+), 100 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index ec33a483a..cbe45e005 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -267,6 +267,7 @@ export(CDL3INSIDE) export(CDL3LINESTRIKE) export(CDL3OUTSIDE) export(CDL3STARSINSOUTH) +export(CDL3WHITESOLDIERS) export(CDLABANDONEDBABY) export(CDLADVANCEBLOCK) export(CDLBABYSWALL) @@ -283,6 +284,7 @@ export(CDLGAPSIDESIDEWHITE) export(CDLGRAVESTONEDOJI) export(CDLHAMMER) export(CDLHANGINGMAN) +export(CDLHARAMI) export(CMO) export(DEMA) export(EMA) diff --git a/R/ta_CDL2CROWS.R b/R/ta_CDL2CROWS.R index f5836d44c..61a6daba2 100644 --- a/R/ta_CDL2CROWS.R +++ b/R/ta_CDL2CROWS.R @@ -79,10 +79,10 @@ two_crows.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL2CROWS", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDL3BLACKCROWS.R b/R/ta_CDL3BLACKCROWS.R index fa48fd215..8e0f7bcf1 100644 --- a/R/ta_CDL3BLACKCROWS.R +++ b/R/ta_CDL3BLACKCROWS.R @@ -79,10 +79,10 @@ three_black_crows.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL3BLACKCROWS", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDL3INSIDE.R b/R/ta_CDL3INSIDE.R index 8639c581f..0f4e35077 100644 --- a/R/ta_CDL3INSIDE.R +++ b/R/ta_CDL3INSIDE.R @@ -79,10 +79,10 @@ three_inside.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL3INSIDE", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDL3LINESTRIKE.R b/R/ta_CDL3LINESTRIKE.R index 6cbf42460..678a68e29 100644 --- a/R/ta_CDL3LINESTRIKE.R +++ b/R/ta_CDL3LINESTRIKE.R @@ -79,10 +79,10 @@ three_line_strike.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL3LINESTRIKE", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDL3OUTSIDE.R b/R/ta_CDL3OUTSIDE.R index 5519641b4..2035de269 100644 --- a/R/ta_CDL3OUTSIDE.R +++ b/R/ta_CDL3OUTSIDE.R @@ -79,10 +79,10 @@ three_outside.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL3OUTSIDE", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDL3STARSINSOUTH.R b/R/ta_CDL3STARSINSOUTH.R index 71b2d14b0..0ecd1ae2f 100644 --- a/R/ta_CDL3STARSINSOUTH.R +++ b/R/ta_CDL3STARSINSOUTH.R @@ -79,10 +79,10 @@ three_stars_in_the_south.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL3STARSINSOUTH", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDL3WHITESOLDIERS.R b/R/ta_CDL3WHITESOLDIERS.R index 7c54c45b7..63c87f8cd 100644 --- a/R/ta_CDL3WHITESOLDIERS.R +++ b/R/ta_CDL3WHITESOLDIERS.R @@ -26,7 +26,7 @@ three_white_soldiers <- function( #' @usage NULL #' @aliases three_white_soldiers #' @export -CDL3STARSINSOUTH <- three_white_soldiers +CDL3WHITESOLDIERS <- three_white_soldiers #' @usage NULL #' @aliases three_white_soldiers @@ -79,10 +79,10 @@ three_white_soldiers.default <- function( x <- as.data.frame( .Call( "impl_ta_CDL3WHITESOLDIERS", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLABANDONEDBABY.R b/R/ta_CDLABANDONEDBABY.R index 9e02c8243..a11b0da28 100644 --- a/R/ta_CDLABANDONEDBABY.R +++ b/R/ta_CDLABANDONEDBABY.R @@ -81,10 +81,10 @@ abandoned_baby.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLABANDONEDBABY", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.double(eps), as.logical( getOption("talib.normalize", TRUE) diff --git a/R/ta_CDLADVANCEBLOCK.R b/R/ta_CDLADVANCEBLOCK.R index 42f4437cf..72e469f1e 100644 --- a/R/ta_CDLADVANCEBLOCK.R +++ b/R/ta_CDLADVANCEBLOCK.R @@ -79,10 +79,10 @@ advance_block.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLADVANCEBLOCK", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLBELTHOLD.R b/R/ta_CDLBELTHOLD.R index 224ad82d4..4fd2431c0 100644 --- a/R/ta_CDLBELTHOLD.R +++ b/R/ta_CDLBELTHOLD.R @@ -79,10 +79,10 @@ belt_hold.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLBELTHOLD", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLBREAKAWAY.R b/R/ta_CDLBREAKAWAY.R index b148b5f79..536019121 100644 --- a/R/ta_CDLBREAKAWAY.R +++ b/R/ta_CDLBREAKAWAY.R @@ -79,10 +79,10 @@ break_away.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLBREAKAWAY", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLCLOSINGMARUBOZU.R b/R/ta_CDLCLOSINGMARUBOZU.R index 5125063b8..968eb4bf0 100644 --- a/R/ta_CDLCLOSINGMARUBOZU.R +++ b/R/ta_CDLCLOSINGMARUBOZU.R @@ -79,10 +79,10 @@ closing_marubozu.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLCLOSINGMARUBOZU", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLCONCEALBABYSWALL.R b/R/ta_CDLCONCEALBABYSWALL.R index 45dc1db24..9d69cafe9 100644 --- a/R/ta_CDLCONCEALBABYSWALL.R +++ b/R/ta_CDLCONCEALBABYSWALL.R @@ -79,10 +79,10 @@ concealing_baby_swallow.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLCONCEALBABYSWALL", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLCOUNTERATTACK.R b/R/ta_CDLCOUNTERATTACK.R index 793360d70..0ac52845d 100644 --- a/R/ta_CDLCOUNTERATTACK.R +++ b/R/ta_CDLCOUNTERATTACK.R @@ -79,10 +79,10 @@ counter_attack.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLCOUNTERATTACK", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLDARKCLOUDCOVER.R b/R/ta_CDLDARKCLOUDCOVER.R index eba47309c..ea8768e2f 100644 --- a/R/ta_CDLDARKCLOUDCOVER.R +++ b/R/ta_CDLDARKCLOUDCOVER.R @@ -81,10 +81,10 @@ dark_cloud_cover.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLDARKCLOUDCOVER", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.double(eps), as.logical( getOption("talib.normalize", TRUE) diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index 0b6587a89..d4d99affb 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -79,10 +79,10 @@ doji.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLDOJI", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index e6d28cd22..910570487 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -79,10 +79,10 @@ doji_star.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLDOJISTAR", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index d10aa7828..05d7cdb7a 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -79,10 +79,10 @@ dragonfly_doji.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLDRAGONFLYDOJI", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLENGULFING.R b/R/ta_CDLENGULFING.R index e882a8299..2c1841c35 100644 --- a/R/ta_CDLENGULFING.R +++ b/R/ta_CDLENGULFING.R @@ -79,10 +79,10 @@ engulfing.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLENGULFING", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index 703e3bb51..53efe9af4 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -81,10 +81,10 @@ evening_doji_star.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLEVENINGDOJISTAR", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], eps, as.logical( getOption("talib.normalize", TRUE) diff --git a/R/ta_CDLGAPSIDESIDEWHITE.R b/R/ta_CDLGAPSIDESIDEWHITE.R index 8ad61164d..eaafe369e 100644 --- a/R/ta_CDLGAPSIDESIDEWHITE.R +++ b/R/ta_CDLGAPSIDESIDEWHITE.R @@ -26,7 +26,7 @@ gaps_side_white <- function( #' @usage NULL #' @aliases gaps_side_white #' @export -CDL2CROWS <- gaps_side_white +CDLGAPSIDESIDEWHITE <- gaps_side_white #' @usage NULL #' @aliases gaps_side_white @@ -78,7 +78,7 @@ gaps_side_white.default <- function( ## from source x <- as.data.frame( .Call( - "impl_ta_CDL2CROWS", + "impl_ta_CDLGAPSIDESIDEWHITE", x[[1]], x[[2]], x[[3]], diff --git a/R/ta_CDLGRAVESTONEDOJI.R b/R/ta_CDLGRAVESTONEDOJI.R index 11b878264..014c0a066 100644 --- a/R/ta_CDLGRAVESTONEDOJI.R +++ b/R/ta_CDLGRAVESTONEDOJI.R @@ -79,10 +79,10 @@ gravestone_doji.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLGRAVESTONEDOJI", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLHAMMER.R b/R/ta_CDLHAMMER.R index d0768c49c..e3c675d8e 100644 --- a/R/ta_CDLHAMMER.R +++ b/R/ta_CDLHAMMER.R @@ -79,10 +79,10 @@ hammer.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLHAMMER", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLHANGINGMAN.R b/R/ta_CDLHANGINGMAN.R index 8e2f26359..675d41f98 100644 --- a/R/ta_CDLHANGINGMAN.R +++ b/R/ta_CDLHANGINGMAN.R @@ -79,10 +79,10 @@ hanging_man.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLHANGINGMAN", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) diff --git a/R/ta_CDLHARAMI.R b/R/ta_CDLHARAMI.R index 6bdbd46e4..6d2305483 100644 --- a/R/ta_CDLHARAMI.R +++ b/R/ta_CDLHARAMI.R @@ -26,7 +26,7 @@ harami <- function( #' @usage NULL #' @aliases harami #' @export -CDLGAPSIDESIDEWHITE <- harami +CDLHARAMI <- harami #' @usage NULL #' @aliases harami @@ -79,10 +79,10 @@ harami.default <- function( x <- as.data.frame( .Call( "impl_ta_CDLHARAMI", - x[[1]], - x[[2]], - x[[3]], - x[[4]], + OHLC[[1]], + OHLC[[2]], + OHLC[[3]], + OHLC[[4]], as.logical( getOption("talib.normalize", TRUE) ) From 20cb2608b34de27806ba3ac29763980e1bd36b1b Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:16:33 +0200 Subject: [PATCH 156/166] :hammer: Added Github Actions * Updated README --- .Rbuildignore | 3 +- .github/.gitignore | 1 + .github/workflows/R-CMD-check.yaml | 51 +++++++++++++++++++++++ .github/workflows/test-coverage.yaml | 62 ++++++++++++++++++++++++++++ README.Rmd | 4 +- README.md | 4 ++ 6 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/R-CMD-check.yaml create mode 100644 .github/workflows/test-coverage.yaml diff --git a/.Rbuildignore b/.Rbuildignore index 29d626237..a49da4383 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -58,4 +58,5 @@ src/ta-lib/m4/lt~obsolete.m4 ### Makefiles src/ta-lib/Makefile -src/ta-lib/Makefile.in \ No newline at end of file +src/ta-lib/Makefile.in +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 000000000..2d19fc766 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 000000000..60068b8b0 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,51 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, devel, init, refactor] + pull_request: + +name: R-CMD-check.yaml + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml new file mode 100644 index 000000000..0ab748d65 --- /dev/null +++ b/.github/workflows/test-coverage.yaml @@ -0,0 +1,62 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + +name: test-coverage.yaml + +permissions: read-all + +jobs: + test-coverage: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::covr, any::xml2 + needs: coverage + + - name: Test coverage + run: | + cov <- covr::package_coverage( + quiet = FALSE, + clean = FALSE, + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") + ) + print(cov) + covr::to_cobertura(cov) + shell: Rscript {0} + + - uses: codecov/codecov-action@v5 + with: + # Fail if error if not on PR, or if on PR and token is given + fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} + files: ./cobertura.xml + plugins: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Show testthat output + if: always() + run: | + ## -------------------------------------------------------------------- + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true + shell: bash + + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-test-failures + path: ${{ runner.temp }}/package diff --git a/README.Rmd b/README.Rmd index 02a924b86..596881df5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -21,6 +21,8 @@ knitr::opts_chunk$set( # {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) +[![R-CMD-check](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml) +[![Codecov test coverage](https://codecov.io/gh/serkor1/curly-giggle/graph/badge.svg)](https://app.codecov.io/gh/serkor1/curly-giggle) {talib} provides R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib), a C-library for Technical Analysis indicators and Candlestick patterns. @@ -86,4 +88,4 @@ x <- talib::BTC FUN = talib::stochastic ) } -``` \ No newline at end of file +``` diff --git a/README.md b/README.md index dd4ecbbee..2b1ee98a9 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ # {talib}: R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib) + +[![R-CMD-check](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml) +[![Codecov test +coverage](https://codecov.io/gh/serkor1/curly-giggle/graph/badge.svg)](https://app.codecov.io/gh/serkor1/curly-giggle) {talib} provides R bindings for From 235bc8e31f083989cba58aeb25b5cf9b5fa1f557 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:29:39 +0200 Subject: [PATCH 157/166] :hammer: The rodeo starts! * But I have been here before! --- .github/workflows/R-CMD-check.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 60068b8b0..0755f571f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -31,6 +31,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: r-lib/actions/setup-pandoc@v2 From 3cf32d21a8dbdb3200c4f4e02653d9a2a6d64a05 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 16:39:10 +0200 Subject: [PATCH 158/166] :hammer: Added include headers --- src/ta_CDLDOJISTAR.c | 1 + src/ta_CDLDRAGONFLYDOJI.c | 1 + src/ta_CDLEVENINGDOJISTAR.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index 30c1e0060..e975ae7c3 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -20,6 +20,7 @@ #include "normalize.h" #include #include +#include SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag) { diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c index 9f7d612a7..93655449b 100644 --- a/src/ta_CDLDRAGONFLYDOJI.c +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -16,6 +16,7 @@ #include "normalize.h" #include #include +#include // clang-format off SEXP impl_ta_CDLDRAGONFLYDOJI( diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c index ae320935d..34ff3c67f 100644 --- a/src/ta_CDLEVENINGDOJISTAR.c +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -23,6 +23,7 @@ #include "shift.h" #include #include +#include // clang-format off SEXP impl_ta_CDLEVENINGDOJISTAR( From 59a5ee762cb411fcfc0e3e7dcccbbf1d045d074d Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:24:18 +0200 Subject: [PATCH 159/166] :hammer: Documentation Update * Corrected license. * Added proper documentation for aliases. * S3 signatures - Everything related to the checks --- DESCRIPTION | 2 +- NAMESPACE | 1 + R/series.R | 19 ++-- R/ta_ACCBANDS.R | 5 +- R/ta_AD.R | 5 +- R/ta_ADOSC.R | 5 +- R/ta_AROON.R | 5 +- R/ta_AROONOSC.R | 5 +- R/ta_BBANDS.R | 5 +- R/ta_CCI.R | 5 +- R/ta_CDL2CROWS.R | 5 +- R/ta_CDL3BLACKCROWS.R | 5 +- R/ta_CDL3INSIDE.R | 5 +- R/ta_CDL3LINESTRIKE.R | 5 +- R/ta_CDL3OUTSIDE.R | 5 +- R/ta_CDL3STARSINSOUTH.R | 5 +- R/ta_CDL3WHITESOLDIERS.R | 5 +- R/ta_CDLABANDONEDBABY.R | 5 +- R/ta_CDLADVANCEBLOCK.R | 5 +- R/ta_CDLBELTHOLD.R | 5 +- R/ta_CDLBREAKAWAY.R | 5 +- R/ta_CDLCLOSINGMARUBOZU.R | 7 +- R/ta_CDLCONCEALBABYSWALL.R | 5 +- R/ta_CDLCOUNTERATTACK.R | 5 +- R/ta_CDLDARKCLOUDCOVER.R | 5 +- R/ta_CDLDOJI.R | 5 +- R/ta_CDLDOJISTAR.R | 5 +- R/ta_CDLDRAGONFLYDOJI.R | 5 +- R/ta_CDLENGULFING.R | 5 +- R/ta_CDLEVENINGDOJISTAR.R | 5 +- R/ta_CDLGAPSIDESIDEWHITE.R | 5 +- R/ta_CDLGRAVESTONEDOJI.R | 5 +- R/ta_CDLHAMMER.R | 5 +- R/ta_CDLHANGINGMAN.R | 5 +- R/ta_CDLHARAMI.R | 5 +- R/ta_CMO.R | 5 +- R/ta_DEMA.R | 7 +- R/ta_EMA.R | 7 +- R/ta_HT_DCPERIOD.R | 5 +- R/ta_HT_DCPHASE.R | 5 +- R/ta_HT_PHASOR.R | 5 +- R/ta_HT_SINE.R | 5 +- R/ta_HT_TRENDLINE.R | 5 +- R/ta_HT_TRENDMODE.R | 5 +- R/ta_KAMA.R | 7 +- R/ta_MACD.R | 5 +- R/ta_MACDEXT.R | 5 +- R/ta_MACDFIX.R | 5 +- R/ta_MAMA.R | 7 +- R/ta_MFI.R | 5 +- R/ta_OBV.R | 5 +- R/ta_RSI.R | 5 +- R/ta_SAR.R | 5 +- R/ta_SAREXT.R | 5 +- R/ta_SMA.R | 7 +- R/ta_STOCH.R | 5 +- R/ta_STOCHF.R | 5 +- R/ta_STOCHRSI.R | 5 +- R/ta_T3.R | 7 +- R/ta_TEMA.R | 7 +- R/ta_TRIMA.R | 7 +- R/ta_ULTOSC.R | 7 +- R/ta_WMA.R | 7 +- man/abandoned_baby.Rd | 1 + man/acceleration_bands.Rd | 1 + man/advance_block.Rd | 1 + man/aroon.Rd | 1 + man/aroon_oscillator.Rd | 1 + man/belt_hold.Rd | 1 + man/bollinger_bands.Rd | 1 + man/break_away.Rd | 1 + man/chaikin_AD_line.Rd | 1 + man/chaikin_AD_oscillator.Rd | 1 + man/chande_momentum_oscillator.Rd | 1 + man/closing_marubozu.Rd | 1 + man/commodity_channel_index.Rd | 1 + man/concealing_baby_swallow.Rd | 1 + man/counter_attack.Rd | 1 + man/dark_cloud_cover.Rd | 1 + man/doji.Rd | 1 + man/doji_star.Rd | 1 + man/dragonfly_doji.Rd | 1 + man/engulfing.Rd | 1 + man/evening_doji_star.Rd | 1 + man/extended_parabolic_sar.Rd | 1 + man/fast_stochastic.Rd | 1 + man/gaps_side_white.Rd | 1 + man/gravestone_doji.Rd | 1 + man/hammer.Rd | 1 + man/hanging_man.Rd | 1 + man/harami.Rd | 1 + man/ht_dc_phase.Rd | 1 + man/ht_dcperiod.Rd | 1 + man/ht_phasor.Rd | 1 + man/ht_sine_wave.Rd | 1 + man/ht_trendline.Rd | 1 + man/ht_trendmode.Rd | 1 + man/money_flow_index.Rd | 1 + man/moving_average_convergence_divergence.Rd | 5 +- man/on_balance_volume.Rd | 1 + man/parabolic_sar.Rd | 1 + man/relative_strength_index.Rd | 1 + man/stochastic.Rd | 1 + man/stochastic_relative_strength_index.Rd | 1 + man/three_black_crows.Rd | 1 + man/three_inside.Rd | 1 + man/three_line_strike.Rd | 1 + man/three_outside.Rd | 1 + man/three_stars_in_the_south.Rd | 1 + man/three_white_soldiers.Rd | 1 + man/two_crows.Rd | 1 + src/ta_CDLDOJISTAR.c | 2 +- src/ta_CDLDRAGONFLYDOJI.c | 2 +- src/ta_CDLEVENINGDOJISTAR.c | 2 +- tools/generate_unit-tests.R | 102 +++++++++++++++++++ 115 files changed, 421 insertions(+), 83 deletions(-) create mode 100644 tools/generate_unit-tests.R diff --git a/DESCRIPTION b/DESCRIPTION index a13e0f125..e23aa854f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -11,7 +11,7 @@ Authors@R: c( ) ) Description: TA-lib offers 200+ technical trading indicators, including candlestick pattern recognition. -License: BSD_3_Clause + file LICENSE +License: BSD_3_clause + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 diff --git a/NAMESPACE b/NAMESPACE index cbe45e005..a42f6df04 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -273,6 +273,7 @@ export(CDLADVANCEBLOCK) export(CDLBABYSWALL) export(CDLBELTHOLD) export(CDLBREAKAWAY) +export(CDLCLOSINGMARUBOZU) export(CDLCOUNTERATTACK) export(CDLDARKCLOUDCOVER) export(CDLDOJI) diff --git a/R/series.R b/R/series.R index e113f2fee..7e241db0b 100644 --- a/R/series.R +++ b/R/series.R @@ -15,8 +15,8 @@ series <- function( #' @export series.plotly <- function( x, - formula, default, + formula, ... ) { if (missing(formula)) { @@ -40,10 +40,12 @@ series.plotly <- function( dotsQ$data <- quote(.plotting_environment$x) } - do.call( - series.formula, - c(list(x = formula, default = default), dotsQ), - quote = FALSE + as.data.frame( + do.call( + series.formula, + c(list(x = formula, default = default), dotsQ), + quote = FALSE + ) ) } @@ -88,10 +90,13 @@ series.formula <- function( } else { # Model frame with exactly one 'data' out <- do.call( - model.frame, + stats::model.frame, c(list(formula = x, data = data), dotsQ), quote = FALSE ) } - out + + as.data.frame( + out + ) } diff --git a/R/ta_ACCBANDS.R b/R/ta_ACCBANDS.R index 00195cbec..b693b4315 100644 --- a/R/ta_ACCBANDS.R +++ b/R/ta_ACCBANDS.R @@ -26,9 +26,12 @@ acceleration_bands <- function( UseMethod("acceleration_bands") } +#' @export +#' #' @usage NULL +#' +#' @rdname acceleration_bands #' @aliases acceleration_bands -#' @export ACCBANDS <- acceleration_bands #' @usage NULL diff --git a/R/ta_AD.R b/R/ta_AD.R index 77adf7ca6..a80034e45 100644 --- a/R/ta_AD.R +++ b/R/ta_AD.R @@ -25,9 +25,12 @@ chaikin_AD_line <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname chaikin_AD_line #' @aliases chaikin_AD_line -#' @export AD <- chaikin_AD_line #' @usage NULL diff --git a/R/ta_ADOSC.R b/R/ta_ADOSC.R index bb8cb4c81..ae59d9803 100644 --- a/R/ta_ADOSC.R +++ b/R/ta_ADOSC.R @@ -30,9 +30,12 @@ chaikin_AD_oscillator <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname chaikin_AD_oscillator #' @aliases chaikin_AD_oscillator -#' @export ADOSC <- chaikin_AD_oscillator #' @export diff --git a/R/ta_AROON.R b/R/ta_AROON.R index 3b2453141..8bdd3e0bb 100644 --- a/R/ta_AROON.R +++ b/R/ta_AROON.R @@ -26,9 +26,12 @@ aroon <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname aroon #' @aliases aroon -#' @export AROON <- aroon #' @export diff --git a/R/ta_AROONOSC.R b/R/ta_AROONOSC.R index 4f460912b..a481a16a3 100644 --- a/R/ta_AROONOSC.R +++ b/R/ta_AROONOSC.R @@ -25,9 +25,12 @@ aroon_oscillator <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname aroon_oscillator #' @aliases aroon_oscillator -#' @export AROONOSC <- aroon_oscillator #' @export diff --git a/R/ta_BBANDS.R b/R/ta_BBANDS.R index 9ce664fe6..efb634342 100644 --- a/R/ta_BBANDS.R +++ b/R/ta_BBANDS.R @@ -33,9 +33,12 @@ bollinger_bands <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname bollinger_bands #' @aliases bollinger_bands -#' @export BBANDS <- bollinger_bands #' @usage NULL diff --git a/R/ta_CCI.R b/R/ta_CCI.R index f7321cf99..c399d1d33 100644 --- a/R/ta_CCI.R +++ b/R/ta_CCI.R @@ -19,9 +19,12 @@ commodity_channel_index <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname commodity_channel_index #' @aliases commodity_channel_index -#' @export CCI <- commodity_channel_index #' @usage NULL diff --git a/R/ta_CDL2CROWS.R b/R/ta_CDL2CROWS.R index 61a6daba2..6fb58d88c 100644 --- a/R/ta_CDL2CROWS.R +++ b/R/ta_CDL2CROWS.R @@ -23,9 +23,12 @@ two_crows <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname two_crows #' @aliases two_crows -#' @export CDL2CROWS <- two_crows #' @usage NULL diff --git a/R/ta_CDL3BLACKCROWS.R b/R/ta_CDL3BLACKCROWS.R index 8e0f7bcf1..4f91c148c 100644 --- a/R/ta_CDL3BLACKCROWS.R +++ b/R/ta_CDL3BLACKCROWS.R @@ -23,9 +23,12 @@ three_black_crows <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname three_black_crows #' @aliases three_black_crows -#' @export CDL3BLACKCROWS <- three_black_crows #' @usage NULL diff --git a/R/ta_CDL3INSIDE.R b/R/ta_CDL3INSIDE.R index 0f4e35077..a16a3cffd 100644 --- a/R/ta_CDL3INSIDE.R +++ b/R/ta_CDL3INSIDE.R @@ -23,9 +23,12 @@ three_inside <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname three_inside #' @aliases three_inside -#' @export CDL3INSIDE <- three_inside #' @usage NULL diff --git a/R/ta_CDL3LINESTRIKE.R b/R/ta_CDL3LINESTRIKE.R index 678a68e29..b02176815 100644 --- a/R/ta_CDL3LINESTRIKE.R +++ b/R/ta_CDL3LINESTRIKE.R @@ -23,9 +23,12 @@ three_line_strike <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname three_line_strike #' @aliases three_line_strike -#' @export CDL3LINESTRIKE <- three_line_strike #' @usage NULL diff --git a/R/ta_CDL3OUTSIDE.R b/R/ta_CDL3OUTSIDE.R index 2035de269..53339b54b 100644 --- a/R/ta_CDL3OUTSIDE.R +++ b/R/ta_CDL3OUTSIDE.R @@ -23,9 +23,12 @@ three_outside <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname three_outside #' @aliases three_outside -#' @export CDL3OUTSIDE <- three_outside #' @usage NULL diff --git a/R/ta_CDL3STARSINSOUTH.R b/R/ta_CDL3STARSINSOUTH.R index 0ecd1ae2f..c8722d037 100644 --- a/R/ta_CDL3STARSINSOUTH.R +++ b/R/ta_CDL3STARSINSOUTH.R @@ -23,9 +23,12 @@ three_stars_in_the_south <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname three_stars_in_the_south #' @aliases three_stars_in_the_south -#' @export CDL3STARSINSOUTH <- three_stars_in_the_south #' @usage NULL diff --git a/R/ta_CDL3WHITESOLDIERS.R b/R/ta_CDL3WHITESOLDIERS.R index 63c87f8cd..5ff1c524e 100644 --- a/R/ta_CDL3WHITESOLDIERS.R +++ b/R/ta_CDL3WHITESOLDIERS.R @@ -23,9 +23,12 @@ three_white_soldiers <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname three_white_soldiers #' @aliases three_white_soldiers -#' @export CDL3WHITESOLDIERS <- three_white_soldiers #' @usage NULL diff --git a/R/ta_CDLABANDONEDBABY.R b/R/ta_CDLABANDONEDBABY.R index a11b0da28..c2dde44d0 100644 --- a/R/ta_CDLABANDONEDBABY.R +++ b/R/ta_CDLABANDONEDBABY.R @@ -24,9 +24,12 @@ abandoned_baby <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname abandoned_baby #' @aliases abandoned_baby -#' @export CDLABANDONEDBABY <- abandoned_baby #' @usage NULL diff --git a/R/ta_CDLADVANCEBLOCK.R b/R/ta_CDLADVANCEBLOCK.R index 72e469f1e..9ddfeda8a 100644 --- a/R/ta_CDLADVANCEBLOCK.R +++ b/R/ta_CDLADVANCEBLOCK.R @@ -23,9 +23,12 @@ advance_block <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname advance_block #' @aliases advance_block -#' @export CDLADVANCEBLOCK <- advance_block #' @usage NULL diff --git a/R/ta_CDLBELTHOLD.R b/R/ta_CDLBELTHOLD.R index 4fd2431c0..00ed85df0 100644 --- a/R/ta_CDLBELTHOLD.R +++ b/R/ta_CDLBELTHOLD.R @@ -23,9 +23,12 @@ belt_hold <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname belt_hold #' @aliases belt_hold -#' @export CDLBELTHOLD <- belt_hold #' @usage NULL diff --git a/R/ta_CDLBREAKAWAY.R b/R/ta_CDLBREAKAWAY.R index 536019121..946013d8a 100644 --- a/R/ta_CDLBREAKAWAY.R +++ b/R/ta_CDLBREAKAWAY.R @@ -23,9 +23,12 @@ break_away <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname break_away #' @aliases break_away -#' @export CDLBREAKAWAY <- break_away #' @usage NULL diff --git a/R/ta_CDLCLOSINGMARUBOZU.R b/R/ta_CDLCLOSINGMARUBOZU.R index 968eb4bf0..4eae5cc36 100644 --- a/R/ta_CDLCLOSINGMARUBOZU.R +++ b/R/ta_CDLCLOSINGMARUBOZU.R @@ -23,10 +23,13 @@ closing_marubozu <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname closing_marubozu #' @aliases closing_marubozu -#' @export -CDLCOUNTERATTACK <- closing_marubozu +CDLCLOSINGMARUBOZU <- closing_marubozu #' @usage NULL #' @aliases closing_marubozu diff --git a/R/ta_CDLCONCEALBABYSWALL.R b/R/ta_CDLCONCEALBABYSWALL.R index 9d69cafe9..307ca485b 100644 --- a/R/ta_CDLCONCEALBABYSWALL.R +++ b/R/ta_CDLCONCEALBABYSWALL.R @@ -23,9 +23,12 @@ concealing_baby_swallow <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname concealing_baby_swallow #' @aliases concealing_baby_swallow -#' @export CDLBABYSWALL <- concealing_baby_swallow #' @usage NULL diff --git a/R/ta_CDLCOUNTERATTACK.R b/R/ta_CDLCOUNTERATTACK.R index 0ac52845d..430a03e3f 100644 --- a/R/ta_CDLCOUNTERATTACK.R +++ b/R/ta_CDLCOUNTERATTACK.R @@ -23,9 +23,12 @@ counter_attack <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname counter_attack #' @aliases counter_attack -#' @export CDLCOUNTERATTACK <- counter_attack #' @usage NULL diff --git a/R/ta_CDLDARKCLOUDCOVER.R b/R/ta_CDLDARKCLOUDCOVER.R index ea8768e2f..11512d9ec 100644 --- a/R/ta_CDLDARKCLOUDCOVER.R +++ b/R/ta_CDLDARKCLOUDCOVER.R @@ -24,9 +24,12 @@ dark_cloud_cover <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname dark_cloud_cover #' @aliases dark_cloud_cover -#' @export CDLDARKCLOUDCOVER <- dark_cloud_cover #' @usage NULL diff --git a/R/ta_CDLDOJI.R b/R/ta_CDLDOJI.R index d4d99affb..a3e1daa28 100644 --- a/R/ta_CDLDOJI.R +++ b/R/ta_CDLDOJI.R @@ -23,9 +23,12 @@ doji <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname doji #' @aliases doji -#' @export CDLDOJI <- doji #' @usage NULL diff --git a/R/ta_CDLDOJISTAR.R b/R/ta_CDLDOJISTAR.R index 910570487..d0138897a 100644 --- a/R/ta_CDLDOJISTAR.R +++ b/R/ta_CDLDOJISTAR.R @@ -23,9 +23,12 @@ doji_star <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname doji_star #' @aliases doji_star -#' @export CDLDOJISTAR <- doji_star #' @usage NULL diff --git a/R/ta_CDLDRAGONFLYDOJI.R b/R/ta_CDLDRAGONFLYDOJI.R index 05d7cdb7a..ff3e89736 100644 --- a/R/ta_CDLDRAGONFLYDOJI.R +++ b/R/ta_CDLDRAGONFLYDOJI.R @@ -23,9 +23,12 @@ dragonfly_doji <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname dragonfly_doji #' @aliases dragonfly_doji -#' @export CDLDRAGONFLYDOJI <- dragonfly_doji #' @usage NULL diff --git a/R/ta_CDLENGULFING.R b/R/ta_CDLENGULFING.R index 2c1841c35..ee0b47adc 100644 --- a/R/ta_CDLENGULFING.R +++ b/R/ta_CDLENGULFING.R @@ -23,9 +23,12 @@ engulfing <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname engulfing #' @aliases engulfing -#' @export CDLENGULFING <- engulfing #' @usage NULL diff --git a/R/ta_CDLEVENINGDOJISTAR.R b/R/ta_CDLEVENINGDOJISTAR.R index 53efe9af4..9db7e8f20 100644 --- a/R/ta_CDLEVENINGDOJISTAR.R +++ b/R/ta_CDLEVENINGDOJISTAR.R @@ -24,9 +24,12 @@ evening_doji_star <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname evening_doji_star #' @aliases evening_doji_star -#' @export CDLEVENINGDOJISTAR <- evening_doji_star #' @usage NULL diff --git a/R/ta_CDLGAPSIDESIDEWHITE.R b/R/ta_CDLGAPSIDESIDEWHITE.R index eaafe369e..b6d9b50b3 100644 --- a/R/ta_CDLGAPSIDESIDEWHITE.R +++ b/R/ta_CDLGAPSIDESIDEWHITE.R @@ -23,9 +23,12 @@ gaps_side_white <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname gaps_side_white #' @aliases gaps_side_white -#' @export CDLGAPSIDESIDEWHITE <- gaps_side_white #' @usage NULL diff --git a/R/ta_CDLGRAVESTONEDOJI.R b/R/ta_CDLGRAVESTONEDOJI.R index 014c0a066..a13c7c592 100644 --- a/R/ta_CDLGRAVESTONEDOJI.R +++ b/R/ta_CDLGRAVESTONEDOJI.R @@ -23,9 +23,12 @@ gravestone_doji <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname gravestone_doji #' @aliases gravestone_doji -#' @export CDLGRAVESTONEDOJI <- gravestone_doji #' @usage NULL diff --git a/R/ta_CDLHAMMER.R b/R/ta_CDLHAMMER.R index e3c675d8e..5b36e1251 100644 --- a/R/ta_CDLHAMMER.R +++ b/R/ta_CDLHAMMER.R @@ -23,9 +23,12 @@ hammer <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname hammer #' @aliases hammer -#' @export CDLHAMMER <- hammer #' @usage NULL diff --git a/R/ta_CDLHANGINGMAN.R b/R/ta_CDLHANGINGMAN.R index 675d41f98..e405f8e27 100644 --- a/R/ta_CDLHANGINGMAN.R +++ b/R/ta_CDLHANGINGMAN.R @@ -23,9 +23,12 @@ hanging_man <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname hanging_man #' @aliases hanging_man -#' @export CDLHANGINGMAN <- hanging_man #' @usage NULL diff --git a/R/ta_CDLHARAMI.R b/R/ta_CDLHARAMI.R index 6d2305483..de5183daf 100644 --- a/R/ta_CDLHARAMI.R +++ b/R/ta_CDLHARAMI.R @@ -23,9 +23,12 @@ harami <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname harami #' @aliases harami -#' @export CDLHARAMI <- harami #' @usage NULL diff --git a/R/ta_CMO.R b/R/ta_CMO.R index bfd58e69e..cfd7d95aa 100644 --- a/R/ta_CMO.R +++ b/R/ta_CMO.R @@ -19,9 +19,12 @@ chande_momentum_oscillator <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname chande_momentum_oscillator #' @aliases chande_momentum_oscillator -#' @export CMO <- chande_momentum_oscillator #' @usage NULL diff --git a/R/ta_DEMA.R b/R/ta_DEMA.R index 66fade64a..1d1c1ceeb 100644 --- a/R/ta_DEMA.R +++ b/R/ta_DEMA.R @@ -40,9 +40,12 @@ DEMA <- function( UseMethod("DEMA") } -#' @rdname DEMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname DEMA +#' @aliases DEMA double_exponential_moving_average <- DEMA #' @rdname DEMA diff --git a/R/ta_EMA.R b/R/ta_EMA.R index c592690e2..bbd228407 100644 --- a/R/ta_EMA.R +++ b/R/ta_EMA.R @@ -40,9 +40,12 @@ EMA <- function( UseMethod("EMA") } -#' @rdname EMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname EMA +#' @aliases EMA exponential_moving_average <- EMA #' @rdname EMA diff --git a/R/ta_HT_DCPERIOD.R b/R/ta_HT_DCPERIOD.R index 7b0d1f6db..437a84a18 100644 --- a/R/ta_HT_DCPERIOD.R +++ b/R/ta_HT_DCPERIOD.R @@ -16,9 +16,12 @@ ht_dcperiod <- function( UseMethod("ht_dcperiod") } +#' @export +#' #' @usage NULL +#' +#' @rdname ht_dcperiod #' @aliases ht_dcperiod -#' @export HT_DCPERIOD <- ht_dcperiod #' @usage NULL diff --git a/R/ta_HT_DCPHASE.R b/R/ta_HT_DCPHASE.R index b1b86e276..21cfd6a84 100644 --- a/R/ta_HT_DCPHASE.R +++ b/R/ta_HT_DCPHASE.R @@ -16,9 +16,12 @@ ht_dc_phase <- function( UseMethod("ht_dc_phase") } +#' @export +#' #' @usage NULL +#' +#' @rdname ht_dc_phase #' @aliases ht_dc_phase -#' @export HT_DCPHASE <- ht_dc_phase #' @usage NULL diff --git a/R/ta_HT_PHASOR.R b/R/ta_HT_PHASOR.R index 0cfd6ca7a..7dfd6ad98 100644 --- a/R/ta_HT_PHASOR.R +++ b/R/ta_HT_PHASOR.R @@ -16,9 +16,12 @@ ht_phasor <- function( UseMethod("ht_phasor") } +#' @export +#' #' @usage NULL +#' +#' @rdname ht_phasor #' @aliases ht_phasor -#' @export HT_PHASOR <- ht_phasor #' @usage NULL diff --git a/R/ta_HT_SINE.R b/R/ta_HT_SINE.R index 240bddcbe..ff7ac7a0c 100644 --- a/R/ta_HT_SINE.R +++ b/R/ta_HT_SINE.R @@ -16,9 +16,12 @@ ht_sine_wave <- function( UseMethod("ht_sine_wave") } +#' @export +#' #' @usage NULL +#' +#' @rdname ht_sine_wave #' @aliases ht_sine_wave -#' @export HT_SINE <- ht_sine_wave #' @usage NULL diff --git a/R/ta_HT_TRENDLINE.R b/R/ta_HT_TRENDLINE.R index d7fbb10ad..d27982db4 100644 --- a/R/ta_HT_TRENDLINE.R +++ b/R/ta_HT_TRENDLINE.R @@ -16,9 +16,12 @@ ht_trendline <- function( UseMethod("ht_trendline") } +#' @export +#' #' @usage NULL +#' +#' @rdname ht_trendline #' @aliases ht_trendline -#' @export HT_TRENDLINE <- ht_trendline #' @usage NULL diff --git a/R/ta_HT_TRENDMODE.R b/R/ta_HT_TRENDMODE.R index 0ef85549c..942f98f08 100644 --- a/R/ta_HT_TRENDMODE.R +++ b/R/ta_HT_TRENDMODE.R @@ -16,9 +16,12 @@ ht_trendmode <- function( UseMethod("ht_trendmode") } +#' @export +#' #' @usage NULL +#' +#' @rdname ht_trendmode #' @aliases ht_trendmode -#' @export HT_TRENDMODE <- ht_trendmode #' @usage NULL diff --git a/R/ta_KAMA.R b/R/ta_KAMA.R index 8312b95d4..f66e85918 100644 --- a/R/ta_KAMA.R +++ b/R/ta_KAMA.R @@ -40,9 +40,12 @@ KAMA <- function( UseMethod("KAMA") } -#' @rdname KAMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname KAMA +#' @aliases KAMA kaufmans_adaptive_moving_average <- KAMA #' @rdname KAMA diff --git a/R/ta_MACD.R b/R/ta_MACD.R index 00d11a22c..d7f2bfc62 100644 --- a/R/ta_MACD.R +++ b/R/ta_MACD.R @@ -34,9 +34,12 @@ moving_average_convergence_divergence <- function( UseMethod("moving_average_convergence_divergence") } +#' @export +#' #' @usage NULL +#' +#' @rdname moving_average_convergence_divergence #' @aliases moving_average_convergence_divergence -#' @export MACD <- moving_average_convergence_divergence #' @usage NULL diff --git a/R/ta_MACDEXT.R b/R/ta_MACDEXT.R index 7def5c6f4..6c0fe1bb0 100644 --- a/R/ta_MACDEXT.R +++ b/R/ta_MACDEXT.R @@ -1,6 +1,9 @@ +#' @export +#' #' @usage NULL +#' +#' @rdname moving_average_convergence_divergence #' @aliases moving_average_convergence_divergence -#' @export MACDEXT <- function( x, cols, diff --git a/R/ta_MACDFIX.R b/R/ta_MACDFIX.R index 560968af9..19426aeda 100644 --- a/R/ta_MACDFIX.R +++ b/R/ta_MACDFIX.R @@ -1,6 +1,9 @@ +#' @export +#' #' @usage NULL +#' +#' @rdname moving_average_convergence_divergence #' @aliases moving_average_convergence_divergence -#' @export MACDFIX <- function( x, cols, diff --git a/R/ta_MAMA.R b/R/ta_MAMA.R index e92ac3e16..d6a0e0d21 100644 --- a/R/ta_MAMA.R +++ b/R/ta_MAMA.R @@ -40,9 +40,12 @@ MAMA <- function( UseMethod("MAMA") } -#' @rdname MAMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname MAMA +#' @aliases MAMA mesa_adaptive_moving_average <- MAMA #' @rdname MAMA diff --git a/R/ta_MFI.R b/R/ta_MFI.R index e71a00b5a..b7cbc3c8e 100644 --- a/R/ta_MFI.R +++ b/R/ta_MFI.R @@ -17,9 +17,12 @@ money_flow_index <- function( UseMethod("money_flow_index") } +#' @export +#' #' @usage NULL +#' +#' @rdname money_flow_index #' @aliases money_flow_index -#' @export MFI <- money_flow_index #' @usage NULL diff --git a/R/ta_OBV.R b/R/ta_OBV.R index 705feeb6f..ccf840b69 100644 --- a/R/ta_OBV.R +++ b/R/ta_OBV.R @@ -17,9 +17,12 @@ on_balance_volume <- function( UseMethod("on_balance_volume") } +#' @export +#' #' @usage NULL +#' +#' @rdname on_balance_volume #' @aliases on_balance_volume -#' @export OBV <- on_balance_volume #' @usage NULL diff --git a/R/ta_RSI.R b/R/ta_RSI.R index 051c0d644..8b2826a9d 100644 --- a/R/ta_RSI.R +++ b/R/ta_RSI.R @@ -19,9 +19,12 @@ relative_strength_index <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname relative_strength_index #' @aliases relative_strength_index -#' @export RSI <- relative_strength_index #' @usage NULL diff --git a/R/ta_SAR.R b/R/ta_SAR.R index 27baab3ca..1488d3803 100644 --- a/R/ta_SAR.R +++ b/R/ta_SAR.R @@ -32,9 +32,12 @@ parabolic_sar <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname parabolic_sar #' @aliases parabolic_sar -#' @export SAR <- parabolic_sar #' @usage NULL diff --git a/R/ta_SAREXT.R b/R/ta_SAREXT.R index 456030af7..3248951c6 100644 --- a/R/ta_SAREXT.R +++ b/R/ta_SAREXT.R @@ -44,9 +44,12 @@ extended_parabolic_sar <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname extended_parabolic_sar #' @aliases extended_parabolic_sar -#' @export SAREXT <- extended_parabolic_sar #' @usage NULL diff --git a/R/ta_SMA.R b/R/ta_SMA.R index ee67d0002..eae9a9968 100644 --- a/R/ta_SMA.R +++ b/R/ta_SMA.R @@ -42,9 +42,12 @@ SMA <- function( ) } -#' @rdname SMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname SMA +#' @aliases SMA simple_moving_average <- SMA #' @rdname SMA diff --git a/R/ta_STOCH.R b/R/ta_STOCH.R index cf6bbb99f..fbf4fdcc8 100644 --- a/R/ta_STOCH.R +++ b/R/ta_STOCH.R @@ -25,9 +25,12 @@ stochastic <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname stochastic #' @aliases stochastic -#' @export STOCH <- stochastic #' @usage NULL diff --git a/R/ta_STOCHF.R b/R/ta_STOCHF.R index b0cda252a..9d01bb270 100644 --- a/R/ta_STOCHF.R +++ b/R/ta_STOCHF.R @@ -23,9 +23,12 @@ fast_stochastic <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname fast_stochastic #' @aliases fast_stochastic -#' @export STOCHF <- fast_stochastic #' @usage NULL diff --git a/R/ta_STOCHRSI.R b/R/ta_STOCHRSI.R index 8f5d5d844..be8eed63b 100644 --- a/R/ta_STOCHRSI.R +++ b/R/ta_STOCHRSI.R @@ -26,9 +26,12 @@ stochastic_relative_strength_index <- function( ) } +#' @export +#' #' @usage NULL +#' +#' @rdname stochastic_relative_strength_index #' @aliases stochastic_relative_strength_index -#' @export STOCHRSI <- stochastic_relative_strength_index #' @usage NULL diff --git a/R/ta_T3.R b/R/ta_T3.R index 9782e8cf1..43714a729 100644 --- a/R/ta_T3.R +++ b/R/ta_T3.R @@ -40,9 +40,12 @@ T3 <- function( UseMethod("T3") } -#' @rdname T3 -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname T3 +#' @aliases T3 T3_moving_average <- T3 #' @rdname T3 diff --git a/R/ta_TEMA.R b/R/ta_TEMA.R index 7e1481d3c..88d4e1352 100644 --- a/R/ta_TEMA.R +++ b/R/ta_TEMA.R @@ -40,9 +40,12 @@ TEMA <- function( UseMethod("TEMA") } -#' @rdname TEMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname TEMA +#' @aliases TEMA triple_exponential_moving_average <- TEMA #' @rdname TEMA diff --git a/R/ta_TRIMA.R b/R/ta_TRIMA.R index 54eabf087..1c5dd371a 100644 --- a/R/ta_TRIMA.R +++ b/R/ta_TRIMA.R @@ -40,9 +40,12 @@ TRIMA <- function( UseMethod("TRIMA") } -#' @rdname TRIMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname TRIMA +#' @aliases TRIMA triangular_moving_average <- TRIMA #' @rdname TRIMA diff --git a/R/ta_ULTOSC.R b/R/ta_ULTOSC.R index 9eab7b820..eeeb93d29 100644 --- a/R/ta_ULTOSC.R +++ b/R/ta_ULTOSC.R @@ -18,9 +18,12 @@ ultimate_oscillator <- function( ) } -#' @rdname ultimate_oscillator -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname ultimate_oscillator +#' @aliases ultimate_oscillator ULTOSC <- ultimate_oscillator #' @rdname ultimate_oscillator diff --git a/R/ta_WMA.R b/R/ta_WMA.R index 262a754e9..08875c93c 100644 --- a/R/ta_WMA.R +++ b/R/ta_WMA.R @@ -40,9 +40,12 @@ WMA <- function( UseMethod("WMA") } -#' @rdname WMA -#' @usage NULL #' @export +#' +#' @usage NULL +#' +#' @rdname WMA +#' @aliases WMA weighted_moving_average <- WMA #' @rdname WMA diff --git a/man/abandoned_baby.Rd b/man/abandoned_baby.Rd index 4196f0d20..7a3dc0918 100644 --- a/man/abandoned_baby.Rd +++ b/man/abandoned_baby.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLABANDONEDBABY.R \name{abandoned_baby} \alias{abandoned_baby} +\alias{CDLABANDONEDBABY} \title{Abandoned Baby} \usage{ abandoned_baby(x, cols, eps = 0, ...) diff --git a/man/acceleration_bands.Rd b/man/acceleration_bands.Rd index 974c4a6d5..a64aa5ca4 100644 --- a/man/acceleration_bands.Rd +++ b/man/acceleration_bands.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_ACCBANDS.R \name{acceleration_bands} \alias{acceleration_bands} +\alias{ACCBANDS} \title{Acceleration Bands} \usage{ acceleration_bands(x, cols, n = 10, ...) diff --git a/man/advance_block.Rd b/man/advance_block.Rd index 2600b930e..2dafd03c0 100644 --- a/man/advance_block.Rd +++ b/man/advance_block.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLADVANCEBLOCK.R \name{advance_block} \alias{advance_block} +\alias{CDLADVANCEBLOCK} \title{Advance Block} \usage{ advance_block(x, cols, ...) diff --git a/man/aroon.Rd b/man/aroon.Rd index 03e042385..7c7a66dfb 100644 --- a/man/aroon.Rd +++ b/man/aroon.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_AROON.R \name{aroon} \alias{aroon} +\alias{AROON} \title{Aroon} \usage{ aroon(x, cols, n = 10, ...) diff --git a/man/aroon_oscillator.Rd b/man/aroon_oscillator.Rd index a308e8091..e890c8550 100644 --- a/man/aroon_oscillator.Rd +++ b/man/aroon_oscillator.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_AROONOSC.R \name{aroon_oscillator} \alias{aroon_oscillator} +\alias{AROONOSC} \title{Aroon Oscillator} \usage{ aroon_oscillator(x, cols, n = 10, ...) diff --git a/man/belt_hold.Rd b/man/belt_hold.Rd index e82c21d57..cd65afd86 100644 --- a/man/belt_hold.Rd +++ b/man/belt_hold.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLBELTHOLD.R \name{belt_hold} \alias{belt_hold} +\alias{CDLBELTHOLD} \title{Belt Hold} \usage{ belt_hold(x, cols, ...) diff --git a/man/bollinger_bands.Rd b/man/bollinger_bands.Rd index 995170975..03183db1e 100644 --- a/man/bollinger_bands.Rd +++ b/man/bollinger_bands.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_BBANDS.R \name{bollinger_bands} \alias{bollinger_bands} +\alias{BBANDS} \title{Bollinger Bands} \usage{ bollinger_bands(x, cols, ma = SMA(n = 10), up = 2, down = 2, ...) diff --git a/man/break_away.Rd b/man/break_away.Rd index d2f42e30e..7b277b30d 100644 --- a/man/break_away.Rd +++ b/man/break_away.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLBREAKAWAY.R \name{break_away} \alias{break_away} +\alias{CDLBREAKAWAY} \title{Break Away} \usage{ break_away(x, cols, ...) diff --git a/man/chaikin_AD_line.Rd b/man/chaikin_AD_line.Rd index b54e0d09c..26e94e7b5 100644 --- a/man/chaikin_AD_line.Rd +++ b/man/chaikin_AD_line.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_AD.R \name{chaikin_AD_line} \alias{chaikin_AD_line} +\alias{AD} \title{Chaikin A/D Line} \usage{ chaikin_AD_line(x, cols, ...) diff --git a/man/chaikin_AD_oscillator.Rd b/man/chaikin_AD_oscillator.Rd index e084891d9..816cc45bc 100644 --- a/man/chaikin_AD_oscillator.Rd +++ b/man/chaikin_AD_oscillator.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_ADOSC.R \name{chaikin_AD_oscillator} \alias{chaikin_AD_oscillator} +\alias{ADOSC} \title{Chaikin A/D Oscillator} \usage{ chaikin_AD_oscillator(x, cols, fast = 3, slow = 10, ...) diff --git a/man/chande_momentum_oscillator.Rd b/man/chande_momentum_oscillator.Rd index fc1eb4d07..27dbe7cf0 100644 --- a/man/chande_momentum_oscillator.Rd +++ b/man/chande_momentum_oscillator.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CMO.R \name{chande_momentum_oscillator} \alias{chande_momentum_oscillator} +\alias{CMO} \title{Chande Momentum Oscillator} \usage{ chande_momentum_oscillator(x, cols, n = 10, ...) diff --git a/man/closing_marubozu.Rd b/man/closing_marubozu.Rd index 4a90d33c9..c45537d76 100644 --- a/man/closing_marubozu.Rd +++ b/man/closing_marubozu.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLCLOSINGMARUBOZU.R \name{closing_marubozu} \alias{closing_marubozu} +\alias{CDLCLOSINGMARUBOZU} \title{Closing Marubozu} \usage{ closing_marubozu(x, cols, ...) diff --git a/man/commodity_channel_index.Rd b/man/commodity_channel_index.Rd index 0058e5bde..c940b9665 100644 --- a/man/commodity_channel_index.Rd +++ b/man/commodity_channel_index.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CCI.R \name{commodity_channel_index} \alias{commodity_channel_index} +\alias{CCI} \title{Commodity Channel Index} \usage{ commodity_channel_index(x, cols, n = 10, ...) diff --git a/man/concealing_baby_swallow.Rd b/man/concealing_baby_swallow.Rd index eea1ce2e4..85fd9c2d3 100644 --- a/man/concealing_baby_swallow.Rd +++ b/man/concealing_baby_swallow.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLCONCEALBABYSWALL.R \name{concealing_baby_swallow} \alias{concealing_baby_swallow} +\alias{CDLBABYSWALL} \title{Concealing Baby Swallow} \usage{ concealing_baby_swallow(x, cols, ...) diff --git a/man/counter_attack.Rd b/man/counter_attack.Rd index cb9ddb18c..79b048745 100644 --- a/man/counter_attack.Rd +++ b/man/counter_attack.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLCOUNTERATTACK.R \name{counter_attack} \alias{counter_attack} +\alias{CDLCOUNTERATTACK} \title{Counter Attack} \usage{ counter_attack(x, cols, ...) diff --git a/man/dark_cloud_cover.Rd b/man/dark_cloud_cover.Rd index ad9c82c66..b137ad349 100644 --- a/man/dark_cloud_cover.Rd +++ b/man/dark_cloud_cover.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLDARKCLOUDCOVER.R \name{dark_cloud_cover} \alias{dark_cloud_cover} +\alias{CDLDARKCLOUDCOVER} \title{Dark Cloud Cover} \usage{ dark_cloud_cover(x, cols, eps = 0, ...) diff --git a/man/doji.Rd b/man/doji.Rd index 9813a4c27..6c045d51c 100644 --- a/man/doji.Rd +++ b/man/doji.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLDOJI.R \name{doji} \alias{doji} +\alias{CDLDOJI} \title{Doji} \usage{ doji(x, cols, ...) diff --git a/man/doji_star.Rd b/man/doji_star.Rd index c595d4722..53ddc8013 100644 --- a/man/doji_star.Rd +++ b/man/doji_star.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLDOJISTAR.R \name{doji_star} \alias{doji_star} +\alias{CDLDOJISTAR} \title{Doji Star} \usage{ doji_star(x, cols, ...) diff --git a/man/dragonfly_doji.Rd b/man/dragonfly_doji.Rd index 4d340a382..04ab436e5 100644 --- a/man/dragonfly_doji.Rd +++ b/man/dragonfly_doji.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLDRAGONFLYDOJI.R \name{dragonfly_doji} \alias{dragonfly_doji} +\alias{CDLDRAGONFLYDOJI} \title{Dragonfly Doji} \usage{ dragonfly_doji(x, cols, ...) diff --git a/man/engulfing.Rd b/man/engulfing.Rd index 4d854d15f..117257fe5 100644 --- a/man/engulfing.Rd +++ b/man/engulfing.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLENGULFING.R \name{engulfing} \alias{engulfing} +\alias{CDLENGULFING} \title{Engulfing} \usage{ engulfing(x, cols, ...) diff --git a/man/evening_doji_star.Rd b/man/evening_doji_star.Rd index 0031c127b..14cb8d38b 100644 --- a/man/evening_doji_star.Rd +++ b/man/evening_doji_star.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLEVENINGDOJISTAR.R \name{evening_doji_star} \alias{evening_doji_star} +\alias{CDLEVENINGDOJISTAR} \title{Evening Doji Star} \usage{ evening_doji_star(x, cols, eps = 0.1, ...) diff --git a/man/extended_parabolic_sar.Rd b/man/extended_parabolic_sar.Rd index a17d54202..4ccab17dc 100644 --- a/man/extended_parabolic_sar.Rd +++ b/man/extended_parabolic_sar.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_SAREXT.R \name{extended_parabolic_sar} \alias{extended_parabolic_sar} +\alias{SAREXT} \title{Parabolic Stop and Reverse (SAR) - Extended} \usage{ extended_parabolic_sar( diff --git a/man/fast_stochastic.Rd b/man/fast_stochastic.Rd index 4a49e49b5..181622d8c 100644 --- a/man/fast_stochastic.Rd +++ b/man/fast_stochastic.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_STOCHF.R \name{fast_stochastic} \alias{fast_stochastic} +\alias{STOCHF} \title{Fast Stochastic} \usage{ fast_stochastic(x, cols, fast_k = 5, fast_d_MAtype = SMA(n = 10), ...) diff --git a/man/gaps_side_white.Rd b/man/gaps_side_white.Rd index 9ca2b5b08..c8ba8f702 100644 --- a/man/gaps_side_white.Rd +++ b/man/gaps_side_white.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLGAPSIDESIDEWHITE.R \name{gaps_side_white} \alias{gaps_side_white} +\alias{CDLGAPSIDESIDEWHITE} \title{Up/Down-gap side-by-side white lines} \usage{ gaps_side_white(x, cols, ...) diff --git a/man/gravestone_doji.Rd b/man/gravestone_doji.Rd index 70750adeb..8ed4a1f01 100644 --- a/man/gravestone_doji.Rd +++ b/man/gravestone_doji.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLGRAVESTONEDOJI.R \name{gravestone_doji} \alias{gravestone_doji} +\alias{CDLGRAVESTONEDOJI} \title{Gravestone Doji} \usage{ gravestone_doji(x, cols, ...) diff --git a/man/hammer.Rd b/man/hammer.Rd index d2fe0c8ee..2c74916d7 100644 --- a/man/hammer.Rd +++ b/man/hammer.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLHAMMER.R \name{hammer} \alias{hammer} +\alias{CDLHAMMER} \title{Hammer} \usage{ hammer(x, cols, ...) diff --git a/man/hanging_man.Rd b/man/hanging_man.Rd index 5bac69b27..70770a734 100644 --- a/man/hanging_man.Rd +++ b/man/hanging_man.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLHANGINGMAN.R \name{hanging_man} \alias{hanging_man} +\alias{CDLHANGINGMAN} \title{Hanging Man} \usage{ hanging_man(x, cols, ...) diff --git a/man/harami.Rd b/man/harami.Rd index 64258d8dc..a30e4b522 100644 --- a/man/harami.Rd +++ b/man/harami.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDLHARAMI.R \name{harami} \alias{harami} +\alias{CDLHARAMI} \title{Harami} \usage{ harami(x, cols, ...) diff --git a/man/ht_dc_phase.Rd b/man/ht_dc_phase.Rd index 9c10ac328..7dfb597cf 100644 --- a/man/ht_dc_phase.Rd +++ b/man/ht_dc_phase.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_DCPHASE.R \name{ht_dc_phase} \alias{ht_dc_phase} +\alias{HT_DCPHASE} \title{Hilbert Transform - Dominant Cycle Phase} \usage{ ht_dc_phase(x, cols, ...) diff --git a/man/ht_dcperiod.Rd b/man/ht_dcperiod.Rd index 394e70533..c92dc8a12 100644 --- a/man/ht_dcperiod.Rd +++ b/man/ht_dcperiod.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_DCPERIOD.R \name{ht_dcperiod} \alias{ht_dcperiod} +\alias{HT_DCPERIOD} \title{Hilbert Transform - Dominant Cycle Period} \usage{ ht_dcperiod(x, cols, ...) diff --git a/man/ht_phasor.Rd b/man/ht_phasor.Rd index 056531bd9..aec2a6413 100644 --- a/man/ht_phasor.Rd +++ b/man/ht_phasor.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_PHASOR.R \name{ht_phasor} \alias{ht_phasor} +\alias{HT_PHASOR} \title{Hilbert Transform - Phasor Components} \usage{ ht_phasor(x, cols, ...) diff --git a/man/ht_sine_wave.Rd b/man/ht_sine_wave.Rd index cd4979103..672376b51 100644 --- a/man/ht_sine_wave.Rd +++ b/man/ht_sine_wave.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_SINE.R \name{ht_sine_wave} \alias{ht_sine_wave} +\alias{HT_SINE} \title{Hilbert Transform - SineWave} \usage{ ht_sine_wave(x, cols, ...) diff --git a/man/ht_trendline.Rd b/man/ht_trendline.Rd index ffdebb575..6e70ee5ac 100644 --- a/man/ht_trendline.Rd +++ b/man/ht_trendline.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_TRENDLINE.R \name{ht_trendline} \alias{ht_trendline} +\alias{HT_TRENDLINE} \alias{ht_trendline.plotly} \title{Hilbert Transform - Instantaneous Trendline} \usage{ diff --git a/man/ht_trendmode.Rd b/man/ht_trendmode.Rd index 8a7a2ed4a..0c2d8763c 100644 --- a/man/ht_trendmode.Rd +++ b/man/ht_trendmode.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_HT_TRENDMODE.R \name{ht_trendmode} \alias{ht_trendmode} +\alias{HT_TRENDMODE} \alias{ht_trendmode.plotly} \title{Hilbert Transform - Trend vs Cycle Mode} \usage{ diff --git a/man/money_flow_index.Rd b/man/money_flow_index.Rd index b6355382d..409917871 100644 --- a/man/money_flow_index.Rd +++ b/man/money_flow_index.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_MFI.R \name{money_flow_index} \alias{money_flow_index} +\alias{MFI} \title{Money Flow Index} \usage{ money_flow_index(x, cols, n = 10, ...) diff --git a/man/moving_average_convergence_divergence.Rd b/man/moving_average_convergence_divergence.Rd index d6f4442df..1bb94dfa7 100644 --- a/man/moving_average_convergence_divergence.Rd +++ b/man/moving_average_convergence_divergence.Rd @@ -1,7 +1,10 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/ta_MACD.R +% Please edit documentation in R/ta_MACD.R, R/ta_MACDEXT.R, R/ta_MACDFIX.R \name{moving_average_convergence_divergence} \alias{moving_average_convergence_divergence} +\alias{MACD} +\alias{MACDEXT} +\alias{MACDFIX} \title{Moving Average Convergence Divergence} \usage{ moving_average_convergence_divergence( diff --git a/man/on_balance_volume.Rd b/man/on_balance_volume.Rd index 47ea423b5..3c6b7e140 100644 --- a/man/on_balance_volume.Rd +++ b/man/on_balance_volume.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_OBV.R \name{on_balance_volume} \alias{on_balance_volume} +\alias{OBV} \title{On-Balance Volume} \usage{ on_balance_volume(x, cols, n = 10, ...) diff --git a/man/parabolic_sar.Rd b/man/parabolic_sar.Rd index 49bb96410..cde6f7ec6 100644 --- a/man/parabolic_sar.Rd +++ b/man/parabolic_sar.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_SAR.R \name{parabolic_sar} \alias{parabolic_sar} +\alias{SAR} \title{Parabolic Stop and Reverse (SAR)} \usage{ parabolic_sar(x, cols, acceleration = 0.02, maximum = 0.2, ...) diff --git a/man/relative_strength_index.Rd b/man/relative_strength_index.Rd index 0c7f41785..e82430385 100644 --- a/man/relative_strength_index.Rd +++ b/man/relative_strength_index.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_RSI.R \name{relative_strength_index} \alias{relative_strength_index} +\alias{RSI} \title{Relative Strength Index} \usage{ relative_strength_index(x, cols, n = 10, ...) diff --git a/man/stochastic.Rd b/man/stochastic.Rd index 3534b13bf..325350e2d 100644 --- a/man/stochastic.Rd +++ b/man/stochastic.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_STOCH.R \name{stochastic} \alias{stochastic} +\alias{STOCH} \title{Stochastic} \usage{ stochastic(x, cols, fastk = 5, slowk = SMA(n = 10), slowd = SMA(n = 8), ...) diff --git a/man/stochastic_relative_strength_index.Rd b/man/stochastic_relative_strength_index.Rd index 1c13da5f2..58846e532 100644 --- a/man/stochastic_relative_strength_index.Rd +++ b/man/stochastic_relative_strength_index.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_STOCHRSI.R \name{stochastic_relative_strength_index} \alias{stochastic_relative_strength_index} +\alias{STOCHRSI} \title{Stochastic Relative Strength Index} \usage{ stochastic_relative_strength_index( diff --git a/man/three_black_crows.Rd b/man/three_black_crows.Rd index 75b4abc16..0bf59f8f8 100644 --- a/man/three_black_crows.Rd +++ b/man/three_black_crows.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL3BLACKCROWS.R \name{three_black_crows} \alias{three_black_crows} +\alias{CDL3BLACKCROWS} \title{Three Black Crows} \usage{ three_black_crows(x, cols, ...) diff --git a/man/three_inside.Rd b/man/three_inside.Rd index 23c408ef5..f8cbfe784 100644 --- a/man/three_inside.Rd +++ b/man/three_inside.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL3INSIDE.R \name{three_inside} \alias{three_inside} +\alias{CDL3INSIDE} \title{Three Inside} \usage{ three_inside(x, cols, ...) diff --git a/man/three_line_strike.Rd b/man/three_line_strike.Rd index 59ed16acd..14372a505 100644 --- a/man/three_line_strike.Rd +++ b/man/three_line_strike.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL3LINESTRIKE.R \name{three_line_strike} \alias{three_line_strike} +\alias{CDL3LINESTRIKE} \title{Three-Line Strike} \usage{ three_line_strike(x, cols, ...) diff --git a/man/three_outside.Rd b/man/three_outside.Rd index 1d70f49a4..09ae084bb 100644 --- a/man/three_outside.Rd +++ b/man/three_outside.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL3OUTSIDE.R \name{three_outside} \alias{three_outside} +\alias{CDL3OUTSIDE} \title{Three Outside} \usage{ three_outside(x, cols, ...) diff --git a/man/three_stars_in_the_south.Rd b/man/three_stars_in_the_south.Rd index c0e035a60..40cc563b3 100644 --- a/man/three_stars_in_the_south.Rd +++ b/man/three_stars_in_the_south.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL3STARSINSOUTH.R \name{three_stars_in_the_south} \alias{three_stars_in_the_south} +\alias{CDL3STARSINSOUTH} \title{Three Stars in the South} \usage{ three_stars_in_the_south(x, cols, ...) diff --git a/man/three_white_soldiers.Rd b/man/three_white_soldiers.Rd index f6d6fe8da..cb226457b 100644 --- a/man/three_white_soldiers.Rd +++ b/man/three_white_soldiers.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL3WHITESOLDIERS.R \name{three_white_soldiers} \alias{three_white_soldiers} +\alias{CDL3WHITESOLDIERS} \title{Three White Soldiers} \usage{ three_white_soldiers(x, cols, ...) diff --git a/man/two_crows.Rd b/man/two_crows.Rd index decca993f..e1a22a740 100644 --- a/man/two_crows.Rd +++ b/man/two_crows.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/ta_CDL2CROWS.R \name{two_crows} \alias{two_crows} +\alias{CDL2CROWS} \title{Two Crows} \usage{ two_crows(x, cols, ...) diff --git a/src/ta_CDLDOJISTAR.c b/src/ta_CDLDOJISTAR.c index e975ae7c3..9d18eaf52 100644 --- a/src/ta_CDLDOJISTAR.c +++ b/src/ta_CDLDOJISTAR.c @@ -19,8 +19,8 @@ #include "lib.h" #include "normalize.h" #include -#include #include +#include SEXP impl_ta_CDLDOJISTAR(SEXP open, SEXP high, SEXP low, SEXP close, SEXP normalize_flag) { diff --git a/src/ta_CDLDRAGONFLYDOJI.c b/src/ta_CDLDRAGONFLYDOJI.c index 93655449b..f10009e9a 100644 --- a/src/ta_CDLDRAGONFLYDOJI.c +++ b/src/ta_CDLDRAGONFLYDOJI.c @@ -15,8 +15,8 @@ #include "lib.h" #include "normalize.h" #include -#include #include +#include // clang-format off SEXP impl_ta_CDLDRAGONFLYDOJI( diff --git a/src/ta_CDLEVENINGDOJISTAR.c b/src/ta_CDLEVENINGDOJISTAR.c index 34ff3c67f..f0b48efce 100644 --- a/src/ta_CDLEVENINGDOJISTAR.c +++ b/src/ta_CDLEVENINGDOJISTAR.c @@ -22,8 +22,8 @@ #include "normalize.h" #include "shift.h" #include -#include #include +#include // clang-format off SEXP impl_ta_CDLEVENINGDOJISTAR( diff --git a/tools/generate_unit-tests.R b/tools/generate_unit-tests.R new file mode 100644 index 000000000..3651c7495 --- /dev/null +++ b/tools/generate_unit-tests.R @@ -0,0 +1,102 @@ +OK good. Now to a proper challenge. I need to run it in a for loop: +## script: Generate unit-tests +## information: +## +## All tests are basically the same +## with only variation in function, alias +## and col arg +## +## So instead of rewriting all damned +## tests everytime, I use a boilerplate +## template. +## +## NOTE: This could also work for the 'C'-wrappers +## actually. +## +## 1) construct function +## for generating test-files +all_functions <- list( + `test-ta_ACCBANDS` = list( + alias = quote(ACCBANDS), + main = quote(acceleration_bands), + cols = quote(~ open + high + close) + ), + `test-ta_AD` = list( + alias = quote(AD), + main = quote(chaikin_AD_line), + cols = quote(~ high + low + close + volume) + ) +) + +## 2) comment-aware emitter (your version, unchanged) +.as_lines <- function(x) if (inherits(x, "ta_comment")) paste0("## ", x) else deparse(x, width.cutoff = 80) +.indent <- function(x, n = 1L) paste0(strrep("\t", n), x) + +write_ta_test <- function(file, main, alias, cols, style = TRUE) { + add_text <- function(...) structure(paste(..., collapse = " "), class = "ta_comment") + + main_sym <- substitute(main) + alias_sym <- substitute(alias) + cols_expr <- substitute(cols) + alias_chr <- deparse(alias_sym) + + if (!grepl("\\.R$", file, ignore.case = TRUE)) file <- paste0(file, ".R") + outdir <- file.path("tests", "testthat") + dir.create(outdir, recursive = TRUE, showWarnings = FALSE) + path <- file.path(outdir, file) + + body <- list( + add_text("1) calculate values", "with and without alias"), + bquote(output <- .(main_sym)(SPY)), + bquote(alias <- .(alias_sym)(SPY)), + + add_text("1.1) check if the values", "are equal"), + bquote(testthat::expect_equal(object = output, expected = alias)), + + add_text("2) test that charting", "works"), + bquote(output <- testthat::expect_no_error({ + chart(BTC) + indicator(.(main_sym)) + })), + + add_text("2.1) test that it outputs", "a plotly object"), + quote(testthat::expect_true(inherits(output, "plotly"))), + + add_text("3) test class-in and class-out", "equality"), + add_text("3.1) matrix"), + bquote(testthat::expect_true(inherits(.(main_sym)(SPY), class(SPY)))), + + add_text("3.2) data.frame"), + bquote(testthat::expect_true(inherits(.(main_sym)(BTC), class(BTC)))), + + add_text("4) test that default", "values equals"), + bquote(testthat::expect_equal( + object = .(main_sym)(BTC), + expected = .(main_sym)(BTC, cols = .(cols_expr)) + )) + ) + + lines <- c( + sprintf("## script: %s", alias_chr), + "## author: Serkan Korkmaz", + sprintf('testthat::test_that(desc = "%s", code = {', alias_chr), + .indent(unlist(lapply(body, .as_lines)), 1L), + "})" + ) + + if (style && requireNamespace("styler", quietly = TRUE)) { + lines <- styler::style_text(lines) + } + writeLines(lines, path) + invisible(path) +} + +## 3) generate all files — preserve expressions with quote=TRUE +for (nm in names(all_functions)) { + spec <- all_functions[[nm]] + do.call( + write_ta_test, + args = c(list(file = nm), spec, list(style = TRUE)), + quote = TRUE + ) +} \ No newline at end of file From e416ef9a96a4d613b8fecfd0c0e7fd7cfeadad77 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 21:41:21 +0200 Subject: [PATCH 160/166] :hammer: Charting and Indicator Documentation --- R/chart.R | 36 +++++++++++++++++-- R/chart_indicator.R | 76 ++++++++++++++++++++++++++++------------- man/chart.Rd | 71 +++++++++++++++++++++++++++++++++++--- man/examples/charting.R | 48 ++++++++++++++++++++++++++ man/indicator.Rd | 61 ++++++++++++++++++++++++++++++--- 5 files changed, 257 insertions(+), 35 deletions(-) create mode 100644 man/examples/charting.R diff --git a/R/chart.R b/R/chart.R index 5045406d4..bff65b563 100644 --- a/R/chart.R +++ b/R/chart.R @@ -4,16 +4,46 @@ #' #' @title Chart #' -#' @param x An OHLC-V object. -#' @param type A [character]. +#' @description +#' The [chart]-function is a generic S3 function for charting OHLC series as either +#' candlesticks or 'traditional' OHLC-bars. The function is a high-level wrapper of [plotly::plot_ly] with +#' predefined OHLC values based on the input series. +#' +#' @details +#' The function uses various controlable options: +#' +#' \describe{ +#' \item{talib.deficiency <[logical]>}{`FALSE` by default. If `TRUE` it uses colorblind-friendly colors.} +#' \item{talib.chart.dark <[logical]>}{`TRUE` by default. If `FALSE` it charting is done in light mode.} +#' \item{talib.chart.slider <[logical]>}{`FALSE` by default. If `TRUE` a `rangeslider` is added to the chart.} +#' \item{talib.chart.slider.size <[numeric]>}{0.05 by default. Controls the size of the `rangeslider`.} +#' \item{talib.chart.legend <[logical]>}{`TRUE` by default. If `FALSE` the chart comes without legends.} +#' \item{talib.chart.scale <[numeric]>}{1 by default. Controls the scale of fonts.} +#' } +#' +#' @param x An OHLC object to be charted. +#' @param type A [character] of [length] 1. Either `candlestick` or `ohlc`. #' @param ... Parameters passed into [plotly::plot_ly] #' -#' @family charting +#' @example man/examples/charting.R +#' +#' @author Serkan Korkmaz chart <- function( x, type = "candlestick", ... ) { + ## clear env if called + ## without passing 'x' + if (missing(x)) { + rm( + list = ls(envir = .plotting_environment, all.names = TRUE), + envir = .plotting_environment + ) + + return(invisible(NULL)) + } + UseMethod( "chart" ) diff --git a/R/chart_indicator.R b/R/chart_indicator.R index 700b29838..b978af695 100644 --- a/R/chart_indicator.R +++ b/R/chart_indicator.R @@ -4,14 +4,25 @@ #' #' @title Indicator #' +#' @description +#' This function is a high-level wrapper of the indicator functions and [\{plotly\}](plotly)-objects. +#' Its implemented similar to the [apply]-family, where the indicator function is passed, and its additional arguments +#' are specificied by ... +#' +#' Internally it will look for a [chart]-object, and attach the indicator to the object if found. Otherwise it will return +#' the indicator as a plot if `data` is provided. +#' #' @param FUN An indicator function -#' @param cols A formula of variables. -#' @param ... Arguments passed into [model.frame] +#' @param ... Arguments passed into FUN. #' -#' @description -#' Add an indicator to t +#' @example man/examples/charting.R #' +#' @author Serkan Korkmaz indicator <- function(FUN, ...) { + ## plotting environment + ## does exist + chart_called <- TRUE + ## extract the function ## directly FUN <- match.fun(FUN) @@ -21,6 +32,15 @@ indicator <- function(FUN, ...) { ## to initialize a new plt <- .plotting_environment$main + if (is.null(plt)) { + chart_called <- FALSE + + ## add empty {plotly} + ## object to trigger .plotly + ## method downstream + plt <- plotly::plot_ly() + } + ## construct {plotly}-object ## based on FUN outcome <- do.call( @@ -38,26 +58,34 @@ indicator <- function(FUN, ...) { stop("Unexpected error.") } - panels <- c(list(.plotting_environment$main), .plotting_environment$sub) - stopifnot(all(vapply(panels, inherits, logical(1), what = "plotly"))) - n <- length(panels) - main_h <- getOption("talib.chart.main", 0.7) - heights <- if (n > 1) { - c(main_h, rep((1 - main_h) / (n - 1), n - 1)) - } else { - 1 + if (chart_called) { + panels <- c(list(.plotting_environment$main), .plotting_environment$sub) + n <- length(panels) + main_h <- getOption("talib.chart.main", 0.7) + heights <- if (n > 1) { + c(main_h, rep((1 - main_h) / (n - 1), n - 1)) + } else { + 1 + } + fig <- plotly::layout( + plotly::subplot( + panels, + nrows = n, + shareX = TRUE, + margin = 0.02, + heights = heights + ), + showlegend = TRUE + ) + .plotting_environment$chart <- fig + + return(fig) } - fig <- plotly::layout( - plotly::subplot( - panels, - nrows = n, - shareX = TRUE, - margin = 0.02, - heights = heights - ), - showlegend = TRUE - ) - .plotting_environment$chart <- fig - return(fig) + ## reconstruct charting + ## as if called from chart() + .chart_layout( + x = outcome, + title_text = "title_text" + ) } diff --git a/man/chart.Rd b/man/chart.Rd index 07dc74657..461c5672e 100644 --- a/man/chart.Rd +++ b/man/chart.Rd @@ -7,14 +7,78 @@ chart(x, type = "candlestick", ...) } \arguments{ -\item{x}{An OHLC-V object.} +\item{x}{An OHLC object to be charted.} -\item{type}{A \link{character}.} +\item{type}{A \link{character} of \link{length} 1. Either \code{candlestick} or \code{ohlc}.} \item{...}{Parameters passed into \link[plotly:plot_ly]{plotly::plot_ly}} } \description{ -Chart +The \link{chart}-function is a generic S3 function for charting OHLC series as either +candlesticks or 'traditional' OHLC-bars. The function is a high-level wrapper of \link[plotly:plot_ly]{plotly::plot_ly} with +predefined OHLC values based on the input series. +} +\details{ +The function uses various controlable options: + +\describe{ +\item{talib.deficiency <\link{logical}>}{\code{FALSE} by default. If \code{TRUE} it uses colorblind-friendly colors.} +\item{talib.chart.dark <\link{logical}>}{\code{TRUE} by default. If \code{FALSE} it charting is done in light mode.} +\item{talib.chart.slider <\link{logical}>}{\code{FALSE} by default. If \code{TRUE} a \code{rangeslider} is added to the chart.} +\item{talib.chart.slider.size <\link{numeric}>}{0.05 by default. Controls the size of the \code{rangeslider}.} +\item{talib.chart.legend <\link{logical}>}{\code{TRUE} by default. If \code{FALSE} the chart comes without legends.} +\item{talib.chart.scale <\link{numeric}>}{1 by default. Controls the scale of fonts.} +} +} +\examples{ +## charting in {talib} +## using {plotly} +x <- talib::BTC + +## candlestick chart +## of BTC +talib::chart(x) + +## adding indicators +## via indicator() +{ + ## simple moving + ## averages + talib::indicator( + FUN = talib::SMA, + n = 7 + ) + talib::indicator( + FUN = talib::SMA, + n = 14 + ) + talib::indicator( + FUN = talib::SMA, + n = 21 + ) + + ## MACD + talib::indicator( + FUN = talib::MACD + ) + + ## OBV + talib::indicator( + FUN = talib::OBV + ) +} + +## chart indicators +## without candlesticks +## by resetting the previous +## chart +talib::chart() + +## chart indicator +talib::indicator( + FUN = stochastic, + data = x +) } \seealso{ Other Charting: @@ -24,4 +88,3 @@ Other Charting: Serkan Korkmaz } \concept{Charting} -\concept{charting} diff --git a/man/examples/charting.R b/man/examples/charting.R new file mode 100644 index 000000000..a8ffb580b --- /dev/null +++ b/man/examples/charting.R @@ -0,0 +1,48 @@ +## charting in {talib} +## using {plotly} +x <- talib::BTC + +## candlestick chart +## of BTC +talib::chart(x) + +## adding indicators +## via indicator() +{ + ## simple moving + ## averages + talib::indicator( + FUN = talib::SMA, + n = 7 + ) + talib::indicator( + FUN = talib::SMA, + n = 14 + ) + talib::indicator( + FUN = talib::SMA, + n = 21 + ) + + ## MACD + talib::indicator( + FUN = talib::MACD + ) + + ## OBV + talib::indicator( + FUN = talib::OBV + ) +} + +## chart indicators +## without candlesticks +## by resetting the previous +## chart +talib::chart() + +## chart indicator +talib::indicator( + FUN = stochastic, + data = x +) diff --git a/man/indicator.Rd b/man/indicator.Rd index 11919fab4..175a2915e 100644 --- a/man/indicator.Rd +++ b/man/indicator.Rd @@ -9,12 +9,65 @@ indicator(FUN, ...) \arguments{ \item{FUN}{An indicator function} -\item{...}{Arguments passed into \link{model.frame}} - -\item{cols}{A formula of variables.} +\item{...}{Arguments passed into FUN.} } \description{ -Add an indicator to t +This function is a high-level wrapper of the indicator functions and \href{plotly}{\{plotly\}}-objects. +Its implemented similar to the \link{apply}-family, where the indicator function is passed, and its additional arguments +are specificied by ... + +Internally it will look for a \link{chart}-object, and attach the indicator to the object if found. Otherwise it will return +the indicator as a plot if \code{data} is provided. +} +\examples{ +## charting in {talib} +## using {plotly} +x <- talib::BTC + +## candlestick chart +## of BTC +talib::chart(x) + +## adding indicators +## via indicator() +{ + ## simple moving + ## averages + talib::indicator( + FUN = talib::SMA, + n = 7 + ) + talib::indicator( + FUN = talib::SMA, + n = 14 + ) + talib::indicator( + FUN = talib::SMA, + n = 21 + ) + + ## MACD + talib::indicator( + FUN = talib::MACD + ) + + ## OBV + talib::indicator( + FUN = talib::OBV + ) +} + +## chart indicators +## without candlesticks +## by resetting the previous +## chart +talib::chart() + +## chart indicator +talib::indicator( + FUN = stochastic, + data = x +) } \seealso{ Other Charting: From cf8d4cc76fa3a1a8c4998f104a4edccc11e7850f Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 21:54:41 +0200 Subject: [PATCH 161/166] :hammer: R-CMD-check * Disabled Windows and OSX until the package is stable for ubuntu. * Added concurrency and other QoL stuff. --- .github/workflows/R-CMD-check.yaml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0755f571f..830a6ca27 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,11 +1,16 @@ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +name: R-CMD-check + on: push: branches: [main, devel, init, refactor] pull_request: + branches: [devel] -name: R-CMD-check.yaml +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true permissions: read-all @@ -16,14 +21,19 @@ jobs: name: ${{ matrix.config.os }} (${{ matrix.config.r }}) strategy: - fail-fast: false + fail-fast: true matrix: config: - - {os: macos-latest, r: 'release'} - - {os: windows-latest, r: 'release'} + # ignore macos and windows for now + # - {os: macos-latest, r: 'release'} + # - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + + # Ubuntu - {os: ubuntu-latest, r: 'release'} - {os: ubuntu-latest, r: 'oldrel-1'} + - {os: ubuntu-latest, r: 'oldrel-2'} + - {os: ubuntu-latest, r: 'oldrel-3'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} From 6163dfdea57078bd6d3c81ee26d992642594d763 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 21:55:50 +0200 Subject: [PATCH 162/166] :hammer: Updated Makefile * Formatting now includes air format * Formatting now happens (almost) on every command --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b527141be..a194d158a 100644 --- a/Makefile +++ b/Makefile @@ -10,18 +10,18 @@ help: | sed -E 's/^[[:space:]]*//' \ | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-15s\033[m \xE2\x80\x94 %s\n", $$1, $$2}' -build: clean ## Build the R package +build: clean fmt ## Build the R package @tools/generate_API.sh src/ src/api.h && tools/generate_FFI.sh src/api.h src/init.c && $(MAKE) fmt @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD INSTALL $(tarball_location) @rm -rf README.md @Rscript -e "rmarkdown::render('README.Rmd', output_format = rmarkdown::github_document(html_preview = FALSE), clean = TRUE)" -check: ## Check the R package +check: fmt ## Check the R package @Rscript --verbose -e "devtools::document()" @R CMD build . && R CMD check $(tarball_location) -test: ## Run tests +test: fmt ## Run tests @Rscript --verbose -e "library(talib); testthat::test_dir('tests/testthat')" clean: ## Remove artifacts @@ -38,6 +38,7 @@ purge: clean ## Remove TA-Lib arifacts fmt: ## Format code @clang-format -style=LLVM -dump-config > .clang-format && clang-format -i src/*.c src/*.h + @air format R @rm -rf ./.clang-format pkgdown-build: ## Build {pkgdown} documentation From ddd6e1840499527d5a98bf6797fd268a34e262b6 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 22:13:17 +0200 Subject: [PATCH 163/166] :hammer: Updated Description * Bumped Version to 0.9-0 * Reformatted TA-Lib --- DESCRIPTION | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e23aa854f..f6d9f209f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: talib -Title: Bindings to the Technical Analysis Library (TA-lib) -Version: 0.0-1 +Title: Bindings to the Technical Analysis Library (TA-Lib) +Version: 0.9-0 Authors@R: c( person( given = "Serkan", @@ -8,9 +8,9 @@ Authors@R: c( email = "serkor1@duck.com", role = c("cre", "aut", "cph"), comment = c(ORCID = "0000-0002-5052-0982") - ) + ) ) -Description: TA-lib offers 200+ technical trading indicators, including candlestick pattern recognition. +Description: 'TA-Lib' offers 200+ technical trading indicators, including candlestick pattern recognition. License: BSD_3_clause + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) From be21f9adcc8e95ada16e8b8330308ac990bbcd26 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 22:13:56 +0200 Subject: [PATCH 164/166] :books: Updated README --- README.Rmd | 41 ++++++++++++++++++----------- README.md | 42 ++++++++++++++++++++---------- man/figures/README-charting-1.png | Bin 149520 -> 180325 bytes 3 files changed, 54 insertions(+), 29 deletions(-) diff --git a/README.Rmd b/README.Rmd index 596881df5..6a41458e7 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,6 +23,8 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/serkor1/curly-giggle/graph/badge.svg)](https://app.codecov.io/gh/serkor1/curly-giggle) +[![CRAN status](https://www.r-pkg.org/badges/version/talib)](https://CRAN.R-project.org/package=talib) +[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/last-month/talib?color=blue)](https://r-pkg.org/pkg/talib) {talib} provides R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib), a C-library for Technical Analysis indicators and Candlestick patterns. @@ -31,10 +33,13 @@ knitr::opts_chunk$set( ## Installation -You can install the development version of talib from [GitHub](https://github.com/) with: +### Stable +```{r devel_install, echo = TRUE, eval = FALSE} +pak::pak("talib") +``` -``` r -# install.packages("pak") +### Development +```{r cran_install, echo = TRUE, eval = FALSE} pak::pak("serkor1/curly-giggle") ``` @@ -44,24 +49,18 @@ pak::pak("serkor1/curly-giggle") This is a basic example which shows you how to solve a common problem: ```{r indicator, echo = TRUE} -library(talib) - -## calculate bollinger -## bands -x <- talib::BTC - ## calculate bollinger ## bands tail( talib::bollinger_bands( - x + talib::BTC ) ) ``` ### Charting -```{r charting, fig.align='center', fig.dpi=180, echo = TRUE} +```{r charting, fig.align = 'center', fig.dpi = 180, echo = TRUE} library(talib) ## calculate bollinger @@ -69,8 +68,8 @@ library(talib) x <- talib::BTC { - ## calculate bollinger - ## bands + ## chart Bitcoin + ## with candlesticks talib::chart( x = x ) @@ -79,13 +78,25 @@ x <- talib::BTC ## to the chart talib::indicator( FUN = talib::SMA, - cols = ~close + open + cols = ~ close + open ) ## add bollinger bands ## to the chart talib::indicator( - FUN = talib::stochastic + FUN = talib::bollinger_bands + ) + + ## add RSI indicator + ## to the chart + talib::indicator( + FUN = talib::relative_strength_index + ) + + ## add harami indicators + ## to the chart + talib::indicator( + FUN = talib::harami ) } ``` diff --git a/README.md b/README.md index 2b1ee98a9..557c86832 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ [![R-CMD-check](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/serkor1/curly-giggle/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/serkor1/curly-giggle/graph/badge.svg)](https://app.codecov.io/gh/serkor1/curly-giggle) +[![CRAN +status](https://www.r-pkg.org/badges/version/talib)](https://CRAN.R-project.org/package=talib) +[![CRAN RStudio mirror +downloads](https://cranlogs.r-pkg.org/badges/last-month/talib?color=blue)](https://r-pkg.org/pkg/talib) {talib} provides R bindings for @@ -18,11 +22,15 @@ Analysis indicators and Candlestick patterns. ## Installation -You can install the development version of talib from -[GitHub](https://github.com/) with: +### Stable + +``` r +pak::pak("talib") +``` + +### Development ``` r -# install.packages("pak") pak::pak("serkor1/curly-giggle") ``` @@ -33,17 +41,11 @@ pak::pak("serkor1/curly-giggle") This is a basic example which shows you how to solve a common problem: ``` r -library(talib) - -## calculate bollinger -## bands -x <- talib::BTC - ## calculate bollinger ## bands tail( talib::bollinger_bands( - x + talib::BTC ) ) ``` @@ -66,8 +68,8 @@ library(talib) x <- talib::BTC { - ## calculate bollinger - ## bands + ## chart Bitcoin + ## with candlesticks talib::chart( x = x ) @@ -76,13 +78,25 @@ x <- talib::BTC ## to the chart talib::indicator( FUN = talib::SMA, - cols = ~close + open + cols = ~ close + open ) ## add bollinger bands ## to the chart talib::indicator( - FUN = talib::stochastic + FUN = talib::bollinger_bands + ) + + ## add RSI indicator + ## to the chart + talib::indicator( + FUN = talib::relative_strength_index + ) + + ## add harami indicators + ## to the chart + talib::indicator( + FUN = talib::harami ) } ``` diff --git a/man/figures/README-charting-1.png b/man/figures/README-charting-1.png index 19ffaae870d00f6e4a7d390bc094a8e98cfb84f2..92dee688face8403b3b995f659e4978954caa3b8 100644 GIT binary patch literal 180325 zc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5Ct_n_wol!+*rJmshg(I9ii@`=&zJHANL09#^|B7Z+wSiF;o|e5tE>8A-P!xK>n!x-)XpC&FEn53+U)O)X9WgbIbF%dleW}~JOV^7 z`SsY^Vu{Ha51hk~YP*1Ef6ojk{~;^5@Cm_ziwpdq5rI<#ek63aAY7tU&#UbVeTQF5 MiOY)>ix_ Date: Fri, 26 Sep 2025 22:36:58 +0200 Subject: [PATCH 165/166] :hammer: CoC and README updates * Installation guides * Reworked introduction --- .github/CODE_OF_CONDUCT.md | 126 +++++++++++++++++++++++++++++++++++++ README.Rmd | 30 +++++++-- README.md | 35 ++++++++--- 3 files changed, 177 insertions(+), 14 deletions(-) create mode 100644 .github/CODE_OF_CONDUCT.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..dc6086528 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,126 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at serkor1@duck.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion]. + +For answers to common questions about this code of conduct, see the FAQ at +. Translations are available at . + +[homepage]: https://www.contributor-covenant.org diff --git a/README.Rmd b/README.Rmd index 6a41458e7..5d7406191 100644 --- a/README.Rmd +++ b/README.Rmd @@ -27,23 +27,34 @@ knitr::opts_chunk$set( [![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/last-month/talib?color=blue)](https://r-pkg.org/pkg/talib) -{talib} provides R bindings for [TA-Lib](https://github.com/TA-Lib/ta-lib), a C-library for Technical Analysis indicators and Candlestick patterns. - -{talib} also provides interactive financial charts based on {plotly}. +[{talib}]() provides high-performance R bindings to the [TA-Lib](https://github.com/TA-Lib/ta-lib) C-library for Technical Analysis indicators, Candlestick patterns and interactive charting via [{plotly}](). ## Installation -### Stable +### Stable version ```{r devel_install, echo = TRUE, eval = FALSE} pak::pak("talib") ``` -### Development +### Development version + +The development version can be installed via:[^1] + ```{r cran_install, echo = TRUE, eval = FALSE} pak::pak("serkor1/curly-giggle") ``` -## Example +Or it can be installed by cloning the repository: + +```sh +git clone --recursive https://github.com/serkor1/ta-lib-R.git +cd ta-lib-R +make build +``` + +Use `make` for all package-level build-tools. + +## Basic Usage ### Indicators This is a basic example which shows you how to solve a common problem: @@ -100,3 +111,10 @@ x <- talib::BTC ) } ``` + +## Code of Conduct + +Please note that [{talib}]() is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. + + +[^1]: Requires that [TA-Lib]() is preinstalled. \ No newline at end of file diff --git a/README.md b/README.md index 557c86832..81f7ac2e9 100644 --- a/README.md +++ b/README.md @@ -14,27 +14,38 @@ status](https://www.r-pkg.org/badges/version/talib)](https://CRAN.R-project.org/ downloads](https://cranlogs.r-pkg.org/badges/last-month/talib?color=blue)](https://r-pkg.org/pkg/talib) -{talib} provides R bindings for -[TA-Lib](https://github.com/TA-Lib/ta-lib), a C-library for Technical -Analysis indicators and Candlestick patterns. - -{talib} also provides interactive financial charts based on {plotly}. +[{talib}]() provides high-performance R bindings to the +[TA-Lib](https://github.com/TA-Lib/ta-lib) C-library for Technical +Analysis indicators, Candlestick patterns and interactive charting via +[{plotly}](). ## Installation -### Stable +### Stable version ``` r pak::pak("talib") ``` -### Development +### Development version + +The development version can be installed via:[^1] ``` r pak::pak("serkor1/curly-giggle") ``` -## Example +Or it can be installed by cloning the repository: + +``` sh +git clone --recursive https://github.com/serkor1/ta-lib-R.git +cd ta-lib-R +make build +``` + +Use `make` for all package-level build-tools. + +## Basic Usage ### Indicators @@ -102,3 +113,11 @@ x <- talib::BTC ``` + +## Code of Conduct + +Please note that [{talib}]() is released with a [Contributor Code of +Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). +By contributing to this project, you agree to abide by its terms. + +[^1]: Requires that [TA-Lib]() is preinstalled. From a449a3cad9c88e7ce880797c693871559c1aa310 Mon Sep 17 00:00:00 2001 From: serkor1 <77464572+serkor1@users.noreply.github.com> Date: Fri, 26 Sep 2025 22:43:55 +0200 Subject: [PATCH 166/166] :hammer: Updated .github * codecov is based on devel * removed init and refactor from check --- .github/workflows/R-CMD-check.yaml | 2 +- .github/workflows/test-coverage.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 830a6ca27..248e5b5f5 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -4,7 +4,7 @@ name: R-CMD-check on: push: - branches: [main, devel, init, refactor] + branches: [main, devel] pull_request: branches: [devel] diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0ab748d65..61a04a9da 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -2,7 +2,7 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [devel] pull_request: name: test-coverage.yaml